From: Jouni Malinen Date: Wed, 30 Dec 2015 22:03:21 +0000 (+0200) Subject: P2P: Stop offchannel TX wait on P2P_STOP_FIND/P2P_LISTEN X-Git-Tag: hostap_2_6~1065 X-Git-Url: http://www.project-moonshot.org/gitweb/?a=commitdiff_plain;ds=sidebyside;h=944f693591077d05c29cb60790bf0578eff216b4;p=mech_eap.git 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 --- 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");