aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/p2p_supplicant.c
diff options
context:
space:
mode:
authorAvraham Stern <avraham.stern@intel.com>2015-11-03 14:25:01 (GMT)
committerJouni Malinen <j@w1.fi>2015-11-21 16:53:22 (GMT)
commit2c51c0bd8323b8bfa7b5a640488841d2c2c1d2ae (patch)
tree7e5a870be7330810cda576806ef2c96b837b6397 /wpa_supplicant/p2p_supplicant.c
parent6bdc43c4db724ee82aa4ecf6d0b7ea853cd6007a (diff)
downloadhostap-2c51c0bd8323b8bfa7b5a640488841d2c2c1d2ae.zip
hostap-2c51c0bd8323b8bfa7b5a640488841d2c2c1d2ae.tar.gz
hostap-2c51c0bd8323b8bfa7b5a640488841d2c2c1d2ae.tar.bz2
P2P: Clear send action work without waiting on find/stop/listen
When clearing pending TX action to start a new P2P operation like P2P_FIND or P2P_LISTEN, wpas_p2p_action_tx_clear() was used to clear the send action work. However, in cases where the action work has wait time, it is not cleared immediately but only after the wait time ends. This may cause delay in starting the P2P operation. Fix that by always clearing the send action work immediately on these P2P commands that result in immediate P2P state change and practically stopping a previous operation, if one was pending. Signed-off-by: Avraham Stern <avraham.stern@intel.com>
Diffstat (limited to 'wpa_supplicant/p2p_supplicant.c')
-rw-r--r--wpa_supplicant/p2p_supplicant.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c
index 7d78623..4e27c87 100644
--- a/wpa_supplicant/p2p_supplicant.c
+++ b/wpa_supplicant/p2p_supplicant.c
@@ -6340,7 +6340,8 @@ static void wpas_p2p_clear_pending_action_tx(struct wpa_supplicant *wpa_s)
if (!offchannel_pending_action_tx(wpa_s))
return;
- wpas_p2p_action_tx_clear(wpa_s);
+ if (wpa_s->p2p_send_action_work)
+ wpas_p2p_free_send_action_work(wpa_s);
wpa_printf(MSG_DEBUG, "P2P: Drop pending Action TX due to new "
"operation request");