Commit 0340b45d authored by Gustavo Zacarias's avatar Gustavo Zacarias Committed by Peter Korsgaard
Browse files

wpa_supplicant: bump to version 1.0



Bump to version 1.0
Also convert to gentargets.

Signed-off-by: default avatarGustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: default avatarPeter Korsgaard <jacmet@sunsite.dk>
parent 3e8c13db
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -5,27 +5,25 @@ config BR2_PACKAGE_WPA_SUPPLICANT

	  http://hostap.epitest.fi/wpa_supplicant/

if BR2_PACKAGE_WPA_SUPPLICANT

config BR2_PACKAGE_WPA_SUPPLICANT_EAP
	bool "Enable EAP"
	depends on BR2_PACKAGE_WPA_SUPPLICANT
	help
	  Enable support for EAP.

config BR2_PACKAGE_WPA_SUPPLICANT_CLI
	bool "Install wpa_cli binary"
	depends on BR2_PACKAGE_WPA_SUPPLICANT
	help
	  Install wpa_cli command line utility

config BR2_PACKAGE_WPA_SUPPLICANT_PASSPHRASE
	bool "Install wpa_passphrase binary"
	depends on BR2_PACKAGE_WPA_SUPPLICANT
	help
	  Install wpa_passphrase command line utility

config BR2_PACKAGE_WPA_SUPPLICANT_AP_SUPPORT
	bool "Enable support for soft AP"
	depends on BR2_PACKAGE_WPA_SUPPLICANT
	help
	  With this option enabled, wpa_supplicant can act as
	  access point. This can be used for open and WPA2-Personal networks
@@ -34,6 +32,7 @@ config BR2_PACKAGE_WPA_SUPPLICANT_AP_SUPPORT

config BR2_PACKAGE_WPA_SUPPLICANT_WPS
	bool "Enable support for WPS"
	depends on BR2_PACKAGE_WPA_SUPPLICANT
	help
	  Enable support for Wi-Fi Protected Setup (WPS)

endif
+0 −61
Original line number Diff line number Diff line
From b80b5639935d37b95d00f86b57f2844a9c775f57 Mon Sep 17 00:00:00 2001
From: Dan Williams <dcbw@redhat.com>
Date: Fri, 17 Dec 2010 15:56:01 +0200
Subject: [PATCH] dbus: Emit property changed events when adding/removing BSSes

The supplicant was not emitting property changed events when the BSSs
property changed.

Signed-off-by: Dan Williams <dcbw@redhat.com>
(cherry picked from commit 1e6288df6b07a353a9246b77e0de2a840b5f2c72)
---
 wpa_supplicant/dbus/dbus_new.c |    6 ++++++
 wpa_supplicant/dbus/dbus_new.h |    1 +
 2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/wpa_supplicant/dbus/dbus_new.c b/wpa_supplicant/dbus/dbus_new.c
index bdfbbac..c66640a 100644
--- a/wpa_supplicant/dbus/dbus_new.c
+++ b/wpa_supplicant/dbus/dbus_new.c
@@ -691,6 +691,10 @@ void wpas_dbus_signal_prop_changed(struct wpa_supplicant *wpa_s,
 			wpas_dbus_getter_current_network;
 		prop = "CurrentNetwork";
 		break;
+	case WPAS_DBUS_PROP_BSSS:
+		getter = (WPADBusPropertyAccessor) wpas_dbus_getter_bsss;
+		prop = "BSSs";
+		break;
 	default:
 		wpa_printf(MSG_ERROR, "dbus: %s: Unknown Property value %d",
 			   __func__, property);
@@ -1199,6 +1203,7 @@ int wpas_dbus_unregister_bss(struct wpa_supplicant *wpa_s,
 	}
 
 	wpas_dbus_signal_bss_removed(wpa_s, bss_obj_path);
+	wpas_dbus_signal_prop_changed(wpa_s, WPAS_DBUS_PROP_BSSS);
 
 	return 0;
 }
@@ -1263,6 +1268,7 @@ int wpas_dbus_register_bss(struct wpa_supplicant *wpa_s,
 	}
 
 	wpas_dbus_signal_bss_added(wpa_s, bss_obj_path);
+	wpas_dbus_signal_prop_changed(wpa_s, WPAS_DBUS_PROP_BSSS);
 
 	return 0;
 
diff --git a/wpa_supplicant/dbus/dbus_new.h b/wpa_supplicant/dbus/dbus_new.h
index 80ea98c..9cdefcb 100644
--- a/wpa_supplicant/dbus/dbus_new.h
+++ b/wpa_supplicant/dbus/dbus_new.h
@@ -30,6 +30,7 @@ enum wpas_dbus_prop {
 	WPAS_DBUS_PROP_STATE,
 	WPAS_DBUS_PROP_CURRENT_BSS,
 	WPAS_DBUS_PROP_CURRENT_NETWORK,
+	WPAS_DBUS_PROP_BSSS,
 };
 
 enum wpas_dbus_bss_prop {
-- 
1.7.4-rc1
+0 −52
Original line number Diff line number Diff line
From dea50507861b79f522c70500fe978072f143af8f Mon Sep 17 00:00:00 2001
From: Jouni Malinen <jouni.malinen@atheros.com>
Date: Fri, 12 Nov 2010 18:31:56 +0200
Subject: [PATCH] AP: Verify that HT40 secondary channel is supported

Refuse to enable HT40 mode AP unless both the primary and secondary
channels are enabled for AP use.
(cherry picked from commit 8ea3dd21d2e8b760612af0c7b6a3bb5b89ba7304)
---
 src/ap/hw_features.c |   26 ++++++++++++++++++++++++++
 1 files changed, 26 insertions(+), 0 deletions(-)

diff --git a/src/ap/hw_features.c b/src/ap/hw_features.c
index 0159c72..7fc5b83 100644
--- a/src/ap/hw_features.c
+++ b/src/ap/hw_features.c
@@ -642,6 +642,32 @@ int hostapd_select_hw_mode(struct hostapd_iface *iface)
 			break;
 		}
 	}
+	if (ok && iface->conf->secondary_channel) {
+		int sec_ok = 0;
+		int sec_chan = iface->conf->channel +
+			iface->conf->secondary_channel * 4;
+		for (j = 0; j < iface->current_mode->num_channels; j++) {
+			struct hostapd_channel_data *chan =
+				&iface->current_mode->channels[j];
+			if (!(chan->flag & HOSTAPD_CHAN_DISABLED) &&
+			    (chan->chan == sec_chan)) {
+				sec_ok = 1;
+				break;
+			}
+		}
+		if (!sec_ok) {
+			hostapd_logger(iface->bss[0], NULL,
+				       HOSTAPD_MODULE_IEEE80211,
+				       HOSTAPD_LEVEL_WARNING,
+				       "Configured HT40 secondary channel "
+				       "(%d) not found from the channel list "
+				       "of current mode (%d) %s",
+				       sec_chan, iface->current_mode->mode,
+				       hostapd_hw_mode_txt(
+					       iface->current_mode->mode));
+			ok = 0;
+		}
+	}
 	if (iface->conf->channel == 0) {
 		/* TODO: could request a scan of neighboring BSSes and select
 		 * the channel automatically */
-- 
1.7.4-rc1
+0 −15
Original line number Diff line number Diff line
--- a/src/drivers/drivers.mak	2011-11-29 19:19:56.684221050 +0100
+++ b/src/drivers/drivers.mak	2011-11-29 19:20:12.199609246 +0100
@@ -31,10 +31,10 @@
 NEED_AP_MLME=y
 NEED_NETLINK=y
 NEED_LINUX_IOCTL=y
-DRV_LIBS += -lnl
+DRV_LIBS += -lnl-3
 
 ifdef CONFIG_LIBNL20
-DRV_LIBS += -lnl-genl
+DRV_LIBS += -lnl-genl-3
 DRV_CFLAGS += -DCONFIG_LIBNL20
 endif
 endif
+0 −89
Original line number Diff line number Diff line
From d0f3f451f0002339ad75b43e79f1322f2e2e4ed1 Mon Sep 17 00:00:00 2001
From: Jouni Malinen <jouni.malinen@atheros.com>
Date: Mon, 13 Dec 2010 21:08:53 +0200
Subject: [PATCH] nl80211: Set cipher suites when using user space SME

Previously, pairwise and group cipher suites were configured only
when kernel SME (nl80211 connect API) was used. However, mac80211
needs this information even in the user space SME case for one
thing: to disable HT when TKIP/WEP is used. Add
NL80211_ATTR_CIPHER_SUITES_PAIRWISE to fix this special case with
user space SME. This allows mac80211 to disable HT properly when
the AP is configured with configuration that is not allowed.
(cherry picked from commit aca016054885c17d58c41888698761f2e1ce2b39)
---
 src/drivers/driver_nl80211.c |   44 ++++++++++++++++++++++++++++++++++++++++++
 wpa_supplicant/sme.c         |    2 +
 2 files changed, 46 insertions(+), 0 deletions(-)

diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index 364158c..fb75c2e 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -3940,6 +3940,50 @@ static int wpa_driver_nl80211_associate(
 		NLA_PUT(msg, NL80211_ATTR_IE, params->wpa_ie_len,
 			params->wpa_ie);
 
+	if (params->pairwise_suite != CIPHER_NONE) {
+		int cipher;
+
+		switch (params->pairwise_suite) {
+		case CIPHER_WEP40:
+			cipher = WLAN_CIPHER_SUITE_WEP40;
+			break;
+		case CIPHER_WEP104:
+			cipher = WLAN_CIPHER_SUITE_WEP104;
+			break;
+		case CIPHER_CCMP:
+			cipher = WLAN_CIPHER_SUITE_CCMP;
+			break;
+		case CIPHER_TKIP:
+		default:
+			cipher = WLAN_CIPHER_SUITE_TKIP;
+			break;
+		}
+		wpa_printf(MSG_DEBUG, "  * pairwise=0x%x\n", cipher);
+		NLA_PUT_U32(msg, NL80211_ATTR_CIPHER_SUITES_PAIRWISE, cipher);
+	}
+
+	if (params->group_suite != CIPHER_NONE) {
+		int cipher;
+
+		switch (params->group_suite) {
+		case CIPHER_WEP40:
+			cipher = WLAN_CIPHER_SUITE_WEP40;
+			break;
+		case CIPHER_WEP104:
+			cipher = WLAN_CIPHER_SUITE_WEP104;
+			break;
+		case CIPHER_CCMP:
+			cipher = WLAN_CIPHER_SUITE_CCMP;
+			break;
+		case CIPHER_TKIP:
+		default:
+			cipher = WLAN_CIPHER_SUITE_TKIP;
+			break;
+		}
+		wpa_printf(MSG_DEBUG, "  * group=0x%x\n", cipher);
+		NLA_PUT_U32(msg, NL80211_ATTR_CIPHER_SUITE_GROUP, cipher);
+	}
+
 #ifdef CONFIG_IEEE80211W
 	if (params->mgmt_frame_protection == MGMT_FRAME_PROTECTION_REQUIRED)
 		NLA_PUT_U32(msg, NL80211_ATTR_USE_MFP, NL80211_MFP_REQUIRED);
diff --git a/wpa_supplicant/sme.c b/wpa_supplicant/sme.c
index 5604e97..878bbf0 100644
--- a/wpa_supplicant/sme.c
+++ b/wpa_supplicant/sme.c
@@ -333,6 +333,8 @@ void sme_associate(struct wpa_supplicant *wpa_s, enum wpas_mode mode,
 	params.wpa_ie = wpa_s->sme.assoc_req_ie_len ?
 		wpa_s->sme.assoc_req_ie : NULL;
 	params.wpa_ie_len = wpa_s->sme.assoc_req_ie_len;
+	params.pairwise_suite = cipher_suite2driver(wpa_s->pairwise_cipher);
+	params.group_suite = cipher_suite2driver(wpa_s->group_cipher);
 #ifdef CONFIG_IEEE80211R
 	if (auth_type == WLAN_AUTH_FT && wpa_s->sme.ft_ies) {
 		params.wpa_ie = wpa_s->sme.ft_ies;
-- 
1.7.4-rc1
Loading