]> git.ipfire.org Git - thirdparty/hostap.git/commit - src/p2p/p2p.c
P2P: Wait 100 ms if driver fails to start listen operation
authorJouni Malinen <jouni@qca.qualcomm.com>
Tue, 8 May 2012 08:50:03 +0000 (11:50 +0300)
committerJouni Malinen <j@w1.fi>
Tue, 8 May 2012 08:50:03 +0000 (11:50 +0300)
commit3fe8b68d63060d7766946bf29f937e255e1bd749
tree208ffbb2002815090687feeb480f27a4611c6e0f
parentfea7c3a0558787d6cc89b93207a612607f04d665
P2P: Wait 100 ms if driver fails to start listen operation

Some drivers may accept the remain-on-channel command, but instead of
indicating start event for remain-on-channel, just indicate that the
operation has been canceled immediately. This could result in continuous
loop of search/listen states with very limited time to do anything else
in wpa_supplicant if the scan command is also completed quickly (e.g.,
if the driver is unable to scan other channels than the current
operating channel).

As a workaround, do not start the next step (search) in P2P device
discovery if this type of rejection of listen operation is detected.
This gives some more time for wpa_supplicant to handle whatever else
may be needed at to be done at the same time and reduces the amount
of CPU used in a loop that does not really work correctly from the
view point of being discoverable.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
intended-for: hostap-1
src/p2p/p2p.c