nl80211: Clear cfg80211 authentication data for old entries
authorJouni Malinen <j@w1.fi>
Mon, 25 Jan 2010 02:07:34 +0000 (18:07 -0800)
committerJouni Malinen <j@w1.fi>
Mon, 25 Jan 2010 02:07:34 +0000 (18:07 -0800)
cfg80211 has a limit on pending authentications, so we better clear
the entries that we do not care about to avoid hitting the limit
when roaming between multiple APs.

src/drivers/driver_nl80211.c

index 49eedfe..1f742ed 100644 (file)
@@ -1581,7 +1581,7 @@ static void clear_state_mismatch(struct wpa_driver_nl80211_data *drv,
 {
        if (drv->capa.flags & WPA_DRIVER_FLAGS_SME) {
                wpa_printf(MSG_DEBUG, "nl80211: Clear possible state "
-                          "mismatch");
+                          "mismatch (" MACSTR ")", MAC2STR(addr));
                wpa_driver_nl80211_mlme(drv, addr,
                                        NL80211_CMD_DEAUTHENTICATE,
                                        WLAN_REASON_PREV_AUTH_NOT_VALID);
@@ -1610,6 +1610,7 @@ static void wpa_driver_nl80211_check_bss_status(
                                           " assoc=" MACSTR ")",
                                           MAC2STR(drv->auth_bssid),
                                           MAC2STR(drv->bssid));
+                               clear_state_mismatch(drv, r->bssid);
                        }
                }