P2P: Ignore PBC overlap in P2P provisioning
authorEyal Shapira <eyal@wizery.com>
Thu, 1 Mar 2012 12:01:44 +0000 (14:01 +0200)
committerEyal Shapira <eyal@wizery.com>
Thu, 15 Mar 2012 16:42:17 +0000 (18:42 +0200)
PBC overlap can be ignored as the P2P client knows
that it should connect to the P2P GO so no point of failing
the WPS session in case of overlap because some other
AP had WPS PBC on at the same time.

wpa_supplicant/wps_supplicant.c

index 49654399719e5b8ccd1f90ed9b87920d93898ac1..b6bc9b51545c9a782d20a00d441c820e08fe235a 100644 (file)
@@ -1370,6 +1370,14 @@ int wpas_wps_scan_pbc_overlap(struct wpa_supplicant *wpa_s,
        if (!eap_is_wps_pbc_enrollee(&ssid->eap))
                return 0;
 
        if (!eap_is_wps_pbc_enrollee(&ssid->eap))
                return 0;
 
+#ifdef CONFIG_P2P
+       if (wpa_s->p2p_in_provisioning) {
+               wpa_printf(MSG_DEBUG,
+                          "WPS: Don't check for PBC overlap in P2P");
+               return 0;
+       }
+#endif
+
        wpa_printf(MSG_DEBUG, "WPS: Check whether PBC session overlap is "
                   "present in scan results; selected BSSID " MACSTR,
                   MAC2STR(selected->bssid));
        wpa_printf(MSG_DEBUG, "WPS: Check whether PBC session overlap is "
                   "present in scan results; selected BSSID " MACSTR,
                   MAC2STR(selected->bssid));