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>
This commit is contained in:
Sunil Dutt 2019-05-09 16:35:03 +05:30 committed by Jouni Malinen
parent a8391db7cf
commit 2e3bff5919

View File

@ -1556,7 +1556,7 @@ static int wpas_send_action_work(struct wpa_supplicant *wpa_s,
{ {
struct send_action_work *awork; 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"); wpa_printf(MSG_DEBUG, "P2P: Cannot schedule new p2p-send-action work since one is already pending");
return -1; return -1;
} }