]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Remove cfg80211 state mismatch workaround for authentication
authorJouni Malinen <j@w1.fi>
Mon, 5 Jan 2015 10:21:12 +0000 (12:21 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 5 Jan 2015 10:21:12 +0000 (12:21 +0200)
cfg80211 dropped support for tracking BSS authentication state and
setting NL80211_BSS_STATUS_AUTHENTICATED in 'cfg80211: stop tracking
authenticated state' three years ago (starting in Linux 3.4). As such,
this workaround code in wpa_supplicant cannot be reached anymore. There
is no real need for maintaining it for older kernels either, since there
are other ways of detecting and working around state mismatches with the
actual authentication operations failing.

Signed-off-by: Jouni Malinen <j@w1.fi>
src/drivers/driver.h
src/drivers/driver_nl80211_scan.c

index eeaba668078eedca4c84b81db70cb667a965f3fb..8cdef8d38bd95d13ea5bb42de884196576c4f1dd 100644 (file)
@@ -198,7 +198,6 @@ struct hostapd_hw_modes {
 #define WPA_SCAN_NOISE_INVALID         BIT(1)
 #define WPA_SCAN_LEVEL_INVALID         BIT(2)
 #define WPA_SCAN_LEVEL_DBM             BIT(3)
-#define WPA_SCAN_AUTHENTICATED         BIT(4)
 #define WPA_SCAN_ASSOCIATED            BIT(5)
 
 /**
index 7538d602412768556473b9b14f72c48795a5af8c..c35b4d7ef0484a74148054b6370669360dafeadf 100644 (file)
@@ -599,9 +599,6 @@ int bss_info_handler(struct nl_msg *msg, void *arg)
                enum nl80211_bss_status status;
                status = nla_get_u32(bss[NL80211_BSS_STATUS]);
                switch (status) {
-               case NL80211_BSS_STATUS_AUTHENTICATED:
-                       r->flags |= WPA_SCAN_AUTHENTICATED;
-                       break;
                case NL80211_BSS_STATUS_ASSOCIATED:
                        r->flags |= WPA_SCAN_ASSOCIATED;
                        break;
@@ -677,23 +674,6 @@ static void wpa_driver_nl80211_check_bss_status(
 
        for (i = 0; i < res->num; i++) {
                struct wpa_scan_res *r = res->res[i];
-               if (r->flags & WPA_SCAN_AUTHENTICATED) {
-                       wpa_printf(MSG_DEBUG, "nl80211: Scan results "
-                                  "indicates BSS status with " MACSTR
-                                  " as authenticated",
-                                  MAC2STR(r->bssid));
-                       if (is_sta_interface(drv->nlmode) &&
-                           os_memcmp(r->bssid, drv->bssid, ETH_ALEN) != 0 &&
-                           os_memcmp(r->bssid, drv->auth_bssid, ETH_ALEN) !=
-                           0) {
-                               wpa_printf(MSG_DEBUG, "nl80211: Unknown BSSID"
-                                          " in local state (auth=" MACSTR
-                                          " assoc=" MACSTR ")",
-                                          MAC2STR(drv->auth_bssid),
-                                          MAC2STR(drv->bssid));
-                               clear_state_mismatch(drv, r->bssid);
-                       }
-               }
 
                if (r->flags & WPA_SCAN_ASSOCIATED) {
                        wpa_printf(MSG_DEBUG, "nl80211: Scan results "
@@ -786,9 +766,8 @@ void nl80211_dump_scan(struct wpa_driver_nl80211_data *drv)
        wpa_printf(MSG_DEBUG, "nl80211: Scan result dump");
        for (i = 0; i < res->num; i++) {
                struct wpa_scan_res *r = res->res[i];
-               wpa_printf(MSG_DEBUG, "nl80211: %d/%d " MACSTR "%s%s",
+               wpa_printf(MSG_DEBUG, "nl80211: %d/%d " MACSTR "%s",
                           (int) i, (int) res->num, MAC2STR(r->bssid),
-                          r->flags & WPA_SCAN_AUTHENTICATED ? " [auth]" : "",
                           r->flags & WPA_SCAN_ASSOCIATED ? " [assoc]" : "");
        }