summaryrefslogtreecommitdiffstats
path: root/net/wireless
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-08-04 09:32:23 +0200
committerJohn W. Linville <linville@tuxdriver.com>2009-08-04 16:44:26 -0400
commit8dadadb7e977a91b46ed3549f9d2f22a629e5043 (patch)
tree0197012596c7c6f148e8b268b78f69a0e7f45250 /net/wireless
parent847c1e130092240c225a7be08607a7bf4e296fbd (diff)
downloadlinux-8dadadb7e977a91b46ed3549f9d2f22a629e5043.tar.bz2
cfg80211: clear SSID on disconnect/no connection
The SME state machine in cfg80211 uses the SSID stored in struct wireless_dev internally, but fails to clear it in multiple places (when giving up on a connection attempt and when disconnecting). This doesn't matter to the SME state machine, but does matter for IBSS. Thus, in those cases, clear the SSID to avoid messing up the IBSS state machine. Reported-by: Joerg Albert <jal2@gmx.de> Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/wireless')
-rw-r--r--net/wireless/sme.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/wireless/sme.c b/net/wireless/sme.c
index af91192eedf5..8a7dcbf90602 100644
--- a/net/wireless/sme.c
+++ b/net/wireless/sme.c
@@ -385,6 +385,7 @@ void __cfg80211_connect_result(struct net_device *dev, const u8 *bssid,
wdev->conn = NULL;
kfree(wdev->connect_keys);
wdev->connect_keys = NULL;
+ wdev->ssid_len = 0;
return;
}
@@ -566,6 +567,7 @@ void __cfg80211_disconnected(struct net_device *dev, const u8 *ie,
wdev->current_bss = NULL;
wdev->sme_state = CFG80211_SME_IDLE;
+ wdev->ssid_len = 0;
if (wdev->conn) {
kfree(wdev->conn->ie);
@@ -721,6 +723,7 @@ int __cfg80211_connect(struct cfg80211_registered_device *rdev,
wdev->conn = NULL;
wdev->sme_state = CFG80211_SME_IDLE;
wdev->connect_keys = NULL;
+ wdev->ssid_len = 0;
}
return err;
@@ -785,6 +788,7 @@ int __cfg80211_disconnect(struct cfg80211_registered_device *rdev,
wdev->sme_state = CFG80211_SME_IDLE;
kfree(wdev->conn);
wdev->conn = NULL;
+ wdev->ssid_len = 0;
return 0;
}