D-Bus: Add Signal to notify WPS PBC Overlap event
[mech_eap.git] / wpa_supplicant / events.c
index 0777a56..3af1c7d 100644 (file)
@@ -1201,6 +1201,7 @@ int wpa_supplicant_connect(struct wpa_supplicant *wpa_s,
 #endif /* CONFIG_P2P */
 
 #ifdef CONFIG_WPS
+               wpas_wps_pbc_overlap(wpa_s);
                wpas_wps_cancel(wpa_s);
 #endif /* CONFIG_WPS */
                return -1;
@@ -2067,6 +2068,7 @@ static void wpa_supplicant_event_assoc(struct wpa_supplicant *wpa_s,
 {
        u8 bssid[ETH_ALEN];
        int ft_completed;
+       int new_bss = 0;
 
 #ifdef CONFIG_AP
        if (wpa_s->ap_iface) {
@@ -2098,6 +2100,7 @@ static void wpa_supplicant_event_assoc(struct wpa_supplicant *wpa_s,
        if (os_memcmp(bssid, wpa_s->bssid, ETH_ALEN) != 0) {
                wpa_dbg(wpa_s, MSG_DEBUG, "Associated to a new BSS: BSSID="
                        MACSTR, MAC2STR(bssid));
+               new_bss = 1;
                random_add_randomness(bssid, ETH_ALEN);
                os_memcpy(wpa_s->bssid, bssid, ETH_ALEN);
                os_memset(wpa_s->pending_bssid, 0, ETH_ALEN);
@@ -2111,13 +2114,13 @@ static void wpa_supplicant_event_assoc(struct wpa_supplicant *wpa_s,
                                wpa_s, WLAN_REASON_DEAUTH_LEAVING);
                        return;
                }
+       }
 
-               if (wpa_s->conf->ap_scan == 1 &&
-                   wpa_s->drv_flags & WPA_DRIVER_FLAGS_BSS_SELECTION) {
-                       if (wpa_supplicant_assoc_update_ie(wpa_s) < 0)
-                               wpa_msg(wpa_s, MSG_WARNING,
-                                       "WPA/RSN IEs not updated");
-               }
+       if (wpa_s->conf->ap_scan == 1 &&
+           wpa_s->drv_flags & WPA_DRIVER_FLAGS_BSS_SELECTION) {
+               if (wpa_supplicant_assoc_update_ie(wpa_s) < 0 && new_bss)
+                       wpa_msg(wpa_s, MSG_WARNING,
+                               "WPA/RSN IEs not updated");
        }
 
 #ifdef CONFIG_SME