path: root/wpa_supplicant
diff options
authorSunil Dutt <usdutt@codeaurora.org>2019-05-09 11:05:03 (GMT)
committerJouni Malinen <j@w1.fi>2019-05-31 13:52:15 (GMT)
commit2e3bff5919e1007b4b2084a524eade9a0053fdd6 (patch)
tree108fe46c6d02067aa136c6d99ec6252652880274 /wpa_supplicant
parenta8391db7cfce796bea2acf6e64aad5c314da31b0 (diff)
P2P: Reject p2p-send-action work while other one is pending
The previous implementation rejects the p2p-send-action work while there is already one in progress (wpas_send_action_cb() has already been called for it to start operation). Enhance the same to also consider any p2p-send-action works pending in the radio work (i.e., waiting for that wpas_send_action_cb() call). This is considering the current behaviour of P2P to handle the state corresponding to respective Action frame transmission: pending_action_state. If a new P2P Action frame transmission is queued while there is another one already in the queue, the transmit status of the first frame is wrongly intepreted by the P2P state machine which has already scheduled/queued another frame for transmission. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
Diffstat (limited to 'wpa_supplicant')
1 files changed, 1 insertions, 1 deletions
diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c
index a56cdd0..8e260a0 100644
--- a/wpa_supplicant/p2p_supplicant.c
+++ b/wpa_supplicant/p2p_supplicant.c
@@ -1556,7 +1556,7 @@ static int wpas_send_action_work(struct wpa_supplicant *wpa_s,
struct send_action_work *awork;
- if (wpa_s->p2p_send_action_work) {
+ if (radio_work_pending(wpa_s, "p2p-send-action")) {
wpa_printf(MSG_DEBUG, "P2P: Cannot schedule new p2p-send-action work since one is already pending");
return -1;