P2P: Try SD Query with each non-ACK peer only once per search iteration
authorJouni Malinen <jouni@qca.qualcomm.com>
Mon, 4 Jan 2016 23:03:28 +0000 (01:03 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 4 Jan 2016 23:03:28 +0000 (01:03 +0200)
commitcba9ebfdc27154e68a21a08341ea79a1854f5f20
tree8c814ddf92b6f4b6c4038558eb355d91c5cb3959
parente9ccfc38fd0cf319919994adf93098b632be11d9
P2P: Try SD Query with each non-ACK peer only once per search iteration

The previous behavior of bursting out all retry attempts of an SD Query
frame during a single search/listen iteration does not look very helpful
in the case where the peer does not ACK the query frame. Since the peer
was found in the search, but is not ACKing frames anymore, it is likely
that it left its listen state and we might as well do something more
useful to burst out a significant number of frames in hopes of seeing
the peer.

Modify the SD Query design during P2P Search to send out only a single
attempt (with likely multiple link-layer retries, if needed) per
search/listen iteration to each peer that has pending SD queries. Once
no more peers with pending queries remain, force another Listen and
Search phase to go through before continuing with the pending SD
queries.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
src/p2p/p2p.c
src/p2p/p2p_i.h
src/p2p/p2p_sd.c