P2P: Do not request station mode scans during P2P operations

The P2P search mechanism depends on the same scan functionality that
is used for station mode scans. If these operations are being used
at the same time, scan result processing is not handled properly.
Avoid unexpected behavior by delaying station mode scan requests
if a P2P operation is in progress.

Among other things, this allows the station mode connection attempt
to be continued after a P2P find or group formation has been completed
if the interface is available (i.e., when the P2P group uses a
separate virtual interface).
This commit is contained in:
Jouni Malinen 2011-09-29 16:53:55 +03:00 committed by Jouni Malinen
parent 0c96fd6d03
commit 303f60d39b
5 changed files with 39 additions and 0 deletions

View file

@ -3681,3 +3681,11 @@ p2p_get_peer_found(struct p2p_data *p2p, const u8 *addr, int next)
return &dev->info;
}
int p2p_in_progress(struct p2p_data *p2p)
{
if (p2p == NULL)
return 0;
return p2p->state != P2P_IDLE;
}