diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2016-09-01 06:03:02 -0700 |
---|---|---|
committer | Linux Build Service Account <lnxbuild@localhost> | 2016-09-01 06:03:02 -0700 |
commit | 44f100057998df58e805f212d038a0139e80ae46 (patch) | |
tree | 1df3e0fe89904f61486bb4514d17532fa179a2e1 | |
parent | fa163511320de5acd4c82fce552306b8057cd9b9 (diff) | |
parent | aa06895af28c248b97d0c6c2d592f956eb5927bd (diff) | |
download | android_external_wpa_supplicant_8-44f100057998df58e805f212d038a0139e80ae46.tar.gz android_external_wpa_supplicant_8-44f100057998df58e805f212d038a0139e80ae46.tar.bz2 android_external_wpa_supplicant_8-44f100057998df58e805f212d038a0139e80ae46.zip |
Promotion of wlan-aosp-service.lnx.2.0-00003.
CRs Change ID Subject
--------------------------------------------------------------------------------------------------------------
1059345 Id9b2361ee00b9d54c13c75d2446583edff867ade wpa_supplicant: Configurable EAP fragment size in AP mod
1039034 I762f4137e6f86786f6f858c876e6893eb13fbbc8 Reserve QCA vendor specific nl80211 command 121
1059345 I94aa3956665f1ee23fa80820424f5dde526d3330 wpa_supplicant: Add wps_disabled parameter to network bl
1059345 I616fcc75abde6f261026eb0db4bf97d5775e4f80 Fix sending non-Public Action frames over P2P Device int
Change-Id: I92304c4df1ac3697e52f8f7def85dacd03a9d243
CRs-Fixed: 1059345, 1039034
-rw-r--r-- | src/common/qca-vendor.h | 1 | ||||
-rw-r--r-- | wpa_supplicant/ap.c | 4 | ||||
-rw-r--r-- | wpa_supplicant/config.c | 1 | ||||
-rw-r--r-- | wpa_supplicant/config_file.c | 1 | ||||
-rw-r--r-- | wpa_supplicant/config_ssid.h | 8 | ||||
-rw-r--r-- | wpa_supplicant/events.c | 11 | ||||
-rw-r--r-- | wpa_supplicant/offchannel.c | 23 | ||||
-rw-r--r-- | wpa_supplicant/wpa_cli.c | 2 | ||||
-rw-r--r-- | wpa_supplicant/wpa_supplicant.conf | 5 |
9 files changed, 50 insertions, 6 deletions
diff --git a/src/common/qca-vendor.h b/src/common/qca-vendor.h index 8794f0d6..961a5f38 100644 --- a/src/common/qca-vendor.h +++ b/src/common/qca-vendor.h @@ -196,6 +196,7 @@ enum qca_nl80211_vendor_subcmds { QCA_NL80211_VENDOR_SUBCMD_SET_SAP_CONFIG = 118, QCA_NL80211_VENDOR_SUBCMD_TSF = 119, QCA_NL80211_VENDOR_SUBCMD_WISA = 120, + /* 121 - reserved for QCA */ QCA_NL80211_VENDOR_SUBCMD_P2P_LISTEN_OFFLOAD_START = 122, QCA_NL80211_VENDOR_SUBCMD_P2P_LISTEN_OFFLOAD_STOP = 123, QCA_NL80211_VENDOR_SUBCMD_SAP_CONDITIONAL_CHAN_SWITCH = 124, diff --git a/wpa_supplicant/ap.c b/wpa_supplicant/ap.c index f6abd706..99d3cc35 100644 --- a/wpa_supplicant/ap.c +++ b/wpa_supplicant/ap.c @@ -416,6 +416,8 @@ static int wpa_supplicant_conf_ap(struct wpa_supplicant *wpa_s, !(bss->wpa & 2))) goto no_wps; /* WPS2 does not allow WPA/TKIP-only * configuration */ + if (ssid->wps_disabled) + goto no_wps; bss->eap_server = 1; if (!ssid->ignore_broadcast_ssid) @@ -444,6 +446,8 @@ static int wpa_supplicant_conf_ap(struct wpa_supplicant *wpa_s, os_memcpy(bss->uuid, wpa_s->conf->uuid, WPS_UUID_LEN); os_memcpy(bss->os_version, wpa_s->conf->os_version, 4); bss->pbc_in_m1 = wpa_s->conf->pbc_in_m1; + if (ssid->eap.fragment_size != DEFAULT_FRAGMENT_SIZE) + bss->fragment_size = ssid->eap.fragment_size; no_wps: #endif /* CONFIG_WPS */ diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c index e2aa9708..da418a24 100644 --- a/wpa_supplicant/config.c +++ b/wpa_supplicant/config.c @@ -2055,6 +2055,7 @@ static const struct parse_data ssid_fields[] = { #endif /* CONFIG_HS20 */ { INT_RANGE(mac_addr, 0, 2) }, { INT_RANGE(pbss, 0, 2) }, + { INT_RANGE(wps_disabled, 0, 1) }, }; #undef OFFSET diff --git a/wpa_supplicant/config_file.c b/wpa_supplicant/config_file.c index 9b4046ca..e72f8441 100644 --- a/wpa_supplicant/config_file.c +++ b/wpa_supplicant/config_file.c @@ -756,6 +756,7 @@ static void wpa_config_write_network(FILE *f, struct wpa_ssid *ssid) INT(mixed_cell); INT(max_oper_chwidth); INT(pbss); + INT(wps_disabled); #ifdef CONFIG_IEEE80211W write_int(f, "ieee80211w", ssid->ieee80211w, MGMT_FRAME_PROTECTION_DEFAULT); diff --git a/wpa_supplicant/config_ssid.h b/wpa_supplicant/config_ssid.h index c2af91df..1ecdfc09 100644 --- a/wpa_supplicant/config_ssid.h +++ b/wpa_supplicant/config_ssid.h @@ -748,6 +748,14 @@ struct wpa_ssid { * this MBSS will trigger a peering attempt. */ int no_auto_peer; + + /** + * wps_disabled - WPS disabled in AP mode + * + * 0 = WPS enabled and configured (default) + * 1 = WPS disabled + */ + int wps_disabled; }; #endif /* CONFIG_SSID_H */ diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c index d11d5646..adb59b8c 100644 --- a/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c @@ -3585,17 +3585,20 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event, #endif /* CONFIG_AP */ #ifdef CONFIG_OFFCHANNEL wpa_dbg(wpa_s, MSG_DEBUG, "EVENT_TX_STATUS pending_dst=" - MACSTR, MAC2STR(wpa_s->parent->pending_action_dst)); + MACSTR, MAC2STR(wpa_s->p2pdev->pending_action_dst)); /* * Catch TX status events for Action frames we sent via group - * interface in GO mode. + * interface in GO mode, or via standalone AP interface. + * Note, wpa_s->p2pdev will be the same as wpa_s->parent, + * except when the primary interface is used as a GO interface + * (for drivers which do not have group interface concurrency) */ if (data->tx_status.type == WLAN_FC_TYPE_MGMT && data->tx_status.stype == WLAN_FC_STYPE_ACTION && - os_memcmp(wpa_s->parent->pending_action_dst, + os_memcmp(wpa_s->p2pdev->pending_action_dst, data->tx_status.dst, ETH_ALEN) == 0) { offchannel_send_action_tx_status( - wpa_s->parent, data->tx_status.dst, + wpa_s->p2pdev, data->tx_status.dst, data->tx_status.data, data->tx_status.data_len, data->tx_status.ack ? diff --git a/wpa_supplicant/offchannel.c b/wpa_supplicant/offchannel.c index 6b3f83c4..26d41a4a 100644 --- a/wpa_supplicant/offchannel.c +++ b/wpa_supplicant/offchannel.c @@ -23,8 +23,29 @@ wpas_get_tx_interface(struct wpa_supplicant *wpa_s, const u8 *src) { struct wpa_supplicant *iface; - if (os_memcmp(src, wpa_s->own_addr, ETH_ALEN) == 0) + if (os_memcmp(src, wpa_s->own_addr, ETH_ALEN) == 0) { +#ifdef CONFIG_P2P + if (wpa_s->p2p_mgmt && wpa_s != wpa_s->parent && + wpa_s->parent->ap_iface && + os_memcmp(wpa_s->parent->own_addr, + wpa_s->own_addr, ETH_ALEN) == 0 && + wpabuf_len(wpa_s->pending_action_tx) >= 2 && + *wpabuf_head_u8(wpa_s->pending_action_tx) != + WLAN_ACTION_PUBLIC) { + /* + * When P2P Device interface has same MAC address as + * the GO interface, make sure non-Public Action frames + * are sent through the GO interface. The P2P Device + * interface can only send Public Action frames. + */ + wpa_printf(MSG_DEBUG, + "P2P: Use GO interface %s instead of interface %s for Action TX", + wpa_s->parent->ifname, wpa_s->ifname); + return wpa_s->parent; + } +#endif /* CONFIG_P2P */ return wpa_s; + } /* * Try to find a group interface that matches with the source address. diff --git a/wpa_supplicant/wpa_cli.c b/wpa_supplicant/wpa_cli.c index 812abfc1..ccbd538e 100644 --- a/wpa_supplicant/wpa_cli.c +++ b/wpa_supplicant/wpa_cli.c @@ -1612,7 +1612,7 @@ static const char *network_fields[] = { #ifdef CONFIG_HS20 "update_identifier", #endif /* CONFIG_HS20 */ - "mac_addr", "pbss" + "mac_addr", "pbss", "wps_disabled" }; diff --git a/wpa_supplicant/wpa_supplicant.conf b/wpa_supplicant/wpa_supplicant.conf index 2017a1a7..ff3aa841 100644 --- a/wpa_supplicant/wpa_supplicant.conf +++ b/wpa_supplicant/wpa_supplicant.conf @@ -1179,6 +1179,11 @@ fast_reauth=1 # Beacon interval (default: 100 TU) #beacon_int=100 +# WPS in AP mode +# 0 = WPS enabled and configured (default) +# 1 = WPS disabled +#wps_disabled=0 + # MAC address policy # 0 = use permanent MAC address # 1 = use random MAC address for each ESS connection |