P2P: Prefer direct Probe Response frames over GO's client list
authorAndrei Otcheretianski <andrei.otcheretianski@intel.com>
Wed, 10 Jun 2015 08:43:37 +0000 (11:43 +0300)
committerJouni Malinen <j@w1.fi>
Sun, 14 Jun 2015 20:16:55 +0000 (23:16 +0300)
commit8f524099728fa93130f3b3cc62a19ede50e6a816
tree7afe9b074d4648d7c2922da109dedd32425a657f
parent4e8817f7f00d9a64add247d22115942c3eecd393
P2P: Prefer direct Probe Response frames over GO's client list

A P2P Client may be discoverable and reply to Probe Request frames,
while at the same time the P2P GO would also be discoverable and include
the P2P Client information in the P2P Group Info attribute of the Probe
Response frames.

If a seeker constantly hears the Probe Response frames from a P2P Client
and then from the GO, but handles them in the opposite order (due to
scan results ordering), the more valuable Probe Response frame from the
P2P Client will be ignored. Fix this by defining a threshold (1 second)
during which the direct Probe Response frame will be preferred over the
information acquired from the GO and will not be considered as old.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Reviewed-by: Ilan Peer <ilan.peer@intel.com>
src/p2p/p2p.c
src/p2p/p2p_i.h