hostapd/src/p2p
Hu Wang f3c077929f P2P: Fix listen state machine getting stuck in send_action() scheduled case
Commit 947b5a1532 ("P2P: Stop listen state if Action frame TX is
needed on another channel") added an optimization for P2P response
transmission in certain concurrent operation cases. However, it did not
take into account possibility of the driver not being in listen
state (p2p->drv_in_listen == 0) and could end up getting stuck with the
P2P state machine in a manner that made the device not listen for
following messages. This showed up in following manner in the debug log:

P2P: Starting short listen state (state=SEARCH)
P2P: Driver ended Listen state (freq=2437)
process received frame and send a response
P2P: Stop listen on 0 MHz to allow a frame to be sent immediately on 2437 MHz
P2P: Clear timeout (state=SEARCH)
--> state machine stuck

Fix this by adding drv_in_listen > 0 condition for the optimization to
stop the listen operation in send_action() resulting in scheduled TX.

Fixes: 947b5a1532 ("P2P: Stop listen state if Action frame TX is needed on another channel")
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2019-11-13 23:59:37 +02:00
..
Makefile tests: Add p2p-fuzzer 2015-04-22 11:44:19 +03:00
p2p.c P2P: Fix listen state machine getting stuck in send_action() scheduled case 2019-11-13 23:59:37 +02:00
p2p.h P2P: Stop listen state if Action frame TX is needed on another channel 2019-02-17 16:53:03 +02:00
p2p_build.c WPS: Add multi_ap_subelem to wps_build_wfa_ext() 2019-02-18 20:30:26 +02:00
p2p_dev_disc.c P2PS: Refactor p2p_data::query_hash and p2p_data::query_count use 2015-06-15 17:30:01 +03:00
p2p_go_neg.c P2P: Fix memory size for os_memmove() in p2p_check_pref_chan() 2019-06-26 20:22:33 +03:00
p2p_group.c P2P: Stop listen state if Action frame TX is needed on another channel 2019-02-17 16:53:03 +02:00
p2p_i.h P2P: Send Action frame regardless if p2p_scan in progress 2019-05-31 16:52:15 +03:00
p2p_invitation.c P2P: Allow the avoid channels for P2P discovery/negotiation 2019-01-30 12:15:19 +02:00
p2p_parse.c P2P: Filter control chars in group client device name similarly to peer 2015-10-26 23:43:45 +02:00
p2p_pd.c P2P: Clear old P2PS provision data 2016-10-29 00:55:49 +03:00
p2p_sd.c P2P: Do not use wait_time for SD Response TX for last fragmentation 2017-04-01 14:25:26 +03:00
p2p_utils.c P2P: Allow the avoid channels for P2P discovery/negotiation 2019-01-30 12:15:19 +02:00