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>
This commit is contained in:
Jouni Malinen 2015-12-31 00:03:21 +02:00 committed by Jouni Malinen
parent 56dfb604a4
commit 944f693591

View file

@ -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");