aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/p2p_supplicant.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2015-12-30 22:03:21 (GMT)
committerJouni Malinen <j@w1.fi>2015-12-30 22:03:21 (GMT)
commit944f693591077d05c29cb60790bf0578eff216b4 (patch)
tree423cabdf869e2aae068ae201e99df3417b030587 /wpa_supplicant/p2p_supplicant.c
parent56dfb604a4f51d4dc724e7cd6f70a3c4861a47e0 (diff)
downloadhostap-944f693591077d05c29cb60790bf0578eff216b4.zip
hostap-944f693591077d05c29cb60790bf0578eff216b4.tar.gz
hostap-944f693591077d05c29cb60790bf0578eff216b4.tar.bz2
P2P: Stop offchannel TX wait on P2P_STOP_FIND/P2P_LISTEN
Previously it was possible for the pending Action frame TX to be cleared, but the offchannel TX operation being left in wait state in the kernel. This would delay start of the next operation (e.g., that listen operation requested by P2P_LISTEN) until the wait time for the previously pending Action frame had expired. Optimize this by explicitly stopping any pending offchannel Action frame TX when clearing the internal offchannel TX state in wpas_p2p_clear_pending_action_tx(). Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant/p2p_supplicant.c')
-rw-r--r--wpa_supplicant/p2p_supplicant.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c
index af623ad..9b36b63 100644
--- a/wpa_supplicant/p2p_supplicant.c
+++ b/wpa_supplicant/p2p_supplicant.c
@@ -6505,8 +6505,12 @@ static void wpas_p2p_clear_pending_action_tx(struct wpa_supplicant *wpa_s)
if (!offchannel_pending_action_tx(wpa_s))
return;
- if (wpa_s->p2p_send_action_work)
+ if (wpa_s->p2p_send_action_work) {
wpas_p2p_free_send_action_work(wpa_s);
+ eloop_cancel_timeout(wpas_p2p_send_action_work_timeout,
+ wpa_s, NULL);
+ offchannel_send_action_done(wpa_s);
+ }
wpa_printf(MSG_DEBUG, "P2P: Drop pending Action TX due to new "
"operation request");