diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2016-08-31 22:06:35 -0700 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2016-08-31 22:06:35 -0700 |
commit | aa06895af28c248b97d0c6c2d592f956eb5927bd (patch) | |
tree | 1df3e0fe89904f61486bb4514d17532fa179a2e1 | |
parent | 0500a73ec5b62ac80c836ddc3233f894955f9750 (diff) | |
parent | ed615fcb50b78c8921b0dff7b54a50f7dd754500 (diff) | |
download | android_external_wpa_supplicant_8-aa06895af28c248b97d0c6c2d592f956eb5927bd.tar.gz android_external_wpa_supplicant_8-aa06895af28c248b97d0c6c2d592f956eb5927bd.tar.bz2 android_external_wpa_supplicant_8-aa06895af28c248b97d0c6c2d592f956eb5927bd.zip |
Merge changes Id9b2361e,I616fcc75 into wlan-aosp-service.lnx.2.0-dev
* changes:
wpa_supplicant: Configurable EAP fragment size in AP mode
Fix sending non-Public Action frames over P2P Device interface
-rw-r--r-- | wpa_supplicant/ap.c | 2 | ||||
-rw-r--r-- | wpa_supplicant/events.c | 11 | ||||
-rw-r--r-- | wpa_supplicant/offchannel.c | 23 |
3 files changed, 31 insertions, 5 deletions
diff --git a/wpa_supplicant/ap.c b/wpa_supplicant/ap.c index 803ff296..99d3cc35 100644 --- a/wpa_supplicant/ap.c +++ b/wpa_supplicant/ap.c @@ -446,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/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. |