aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/events.c
diff options
context:
space:
mode:
authorLior David <qca_liord@qca.qualcomm.com>2016-03-30 14:57:31 +0300
committerHamad Kadmany <hkadmany@codeaurora.org>2016-08-25 14:50:14 +0300
commit2e0692fa2acf4b8851b7bcd9564683cb2759b9a8 (patch)
treec58a12d62fefad92f40b6531a0f28afef04281ad /wpa_supplicant/events.c
parent8c633e95429cefa89026546ca80e8f54f03f862d (diff)
downloadandroid_external_wpa_supplicant_8-2e0692fa2acf4b8851b7bcd9564683cb2759b9a8.tar.gz
android_external_wpa_supplicant_8-2e0692fa2acf4b8851b7bcd9564683cb2759b9a8.tar.bz2
android_external_wpa_supplicant_8-2e0692fa2acf4b8851b7bcd9564683cb2759b9a8.zip
Fix sending non-Public Action frames over P2P Device interface
The P2P Device interface can only send Public Action frames. Non-Public Action frames must be sent over a group interface. The previous implementation sometimes tried to send non-Public Action frames such as GO Discoverability over the P2P Device interface, however, the source address of the frame was set to the group interface address so the code in offchannel.c knew to select the correct interface for the TX. The check breaks when the P2P Device and group interfaces have the same MAC address. In this case the frame will be sent over the P2P Device interface and the send will fail. Fix this problem in two places: 1. In offchannel, route non-Public Action frames to the GO interface when the above conditions are met. 2. When a TX_STATUS event arrives on such routed frame, it will arrive on the GO interface but it must be handled by the P2P Device interface since it has the relevant state logic. Change-Id: I616fcc75abde6f261026eb0db4bf97d5775e4f80 Signed-off-by: Lior David <qca_liord@qca.qualcomm.com> Git-commit: a26c9c2e710a74c7e0fc9a5bf1ddf79b2bdfc49a Git-repo: git://w1.fi/srv/git/hostap.git CRs-Fixed: 1059345
Diffstat (limited to 'wpa_supplicant/events.c')
-rw-r--r--wpa_supplicant/events.c11
1 files changed, 7 insertions, 4 deletions
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 ?