aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/sme.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-07-07 17:46:51 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-07-24 15:05:06 -0400
commit4bde0f7d1dca0a7d886997eb8dee3fb47a6484e4 (patch)
tree81d9b826c357200fe054ff31e6199235524789d6 /net/wireless/sme.c
parenta71d62dbf3f0523b7a456333196cb26cf783fe92 (diff)
cfg80211: fix two buglets
This fixes two small bugs: 1) the connect variable is already initialised, and the assignment to auth_type overwrites the previous setting with a wrong value 2) when all authentication attempts fail, we need to report that we couldn't connect Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/wireless/sme.c')
-rw-r--r--net/wireless/sme.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/wireless/sme.c b/net/wireless/sme.c
index df9173f73604..79ca56cbfd36 100644
--- a/net/wireless/sme.c
+++ b/net/wireless/sme.c
@@ -295,9 +295,8 @@ void cfg80211_sme_rx_auth(struct net_device *dev,
295 wdev->conn->state = CFG80211_CONN_AUTHENTICATE_NEXT; 295 wdev->conn->state = CFG80211_CONN_AUTHENTICATE_NEXT;
296 schedule_work(&rdev->conn_work); 296 schedule_work(&rdev->conn_work);
297 } else if (status_code != WLAN_STATUS_SUCCESS) { 297 } else if (status_code != WLAN_STATUS_SUCCESS) {
298 wdev->sme_state = CFG80211_SME_IDLE; 298 __cfg80211_connect_result(dev, mgmt->bssid, NULL, 0, NULL, 0,
299 kfree(wdev->conn); 299 status_code, false);
300 wdev->conn = NULL;
301 } else if (wdev->sme_state == CFG80211_SME_CONNECTING && 300 } else if (wdev->sme_state == CFG80211_SME_CONNECTING &&
302 wdev->conn->state == CFG80211_CONN_AUTHENTICATING) { 301 wdev->conn->state == CFG80211_CONN_AUTHENTICATING) {
303 wdev->conn->state = CFG80211_CONN_ASSOCIATE_NEXT; 302 wdev->conn->state = CFG80211_CONN_ASSOCIATE_NEXT;