mac80211: Reset assoc_scan_tries after an unsuccessful scan run
authorSujith <Sujith.Manoharan@atheros.com>
Thu, 29 Jan 2009 04:04:22 +0000 (09:34 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 9 Feb 2009 20:03:38 +0000 (15:03 -0500)
Trying to associate with a non-existent SSID stops the
state machine after the first run. Subsequent association
requests fail to start the scan engine. Fix this by resetting
assoc_scan_tries to zero after completing a scan run.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/mlme.c

index 9d51e278c1e5c74baa90c9604059144f069ceed8..a8755df0cf746a51ee3adfe38351b8e33bd2da46 100644 (file)
@@ -2415,8 +2415,10 @@ static int ieee80211_sta_config_auth(struct ieee80211_sub_if_data *sdata,
                                                         ifsta->ssid_len);
                        ifsta->state = IEEE80211_STA_MLME_AUTHENTICATE;
                        set_bit(IEEE80211_STA_REQ_AUTH, &ifsta->request);
-               } else
+               } else {
+                       ifsta->assoc_scan_tries = 0;
                        ifsta->state = IEEE80211_STA_MLME_DISABLED;
+               }
        }
        return -1;
 }