Skip to content

Commit

Permalink
P2P: Use 'type=progressive' while calling P2P_FIND to discover peer
Browse files Browse the repository at this point in the history
The current behavior of P2P_FIND with no additional arguments will start
one full channel scan followed by only social channel scans. If GO is
operating in not social channel and due to some reason the first full
channel scan is not able to discover GO, subsequent social channel scans
will fail to discover GO.

Adding 'type=progressive' while sending P2P_FIND will insure to scan one
non-social channel (different channel in each iteration) along with
social channels and eventually the GO will be discovered.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
  • Loading branch information
Purushottam Kushwaha authored and jmalinen committed Mar 13, 2017
1 parent 431c600 commit a46a453
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion p2p.c
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ static int p2p_discover_peer(struct sigma_dut *dut, const char *ifname,
if (p2p_peer_known(ifname, peer, full))
return 0;
printf("Peer not yet discovered - start discovery\n");
if (wpa_command(ifname, "P2P_FIND") < 0) {
if (wpa_command(ifname, "P2P_FIND type=progressive") < 0) {
printf("Failed to start discovery\n");
return -1;
}
Expand Down

0 comments on commit a46a453

Please sign in to comment.