aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-07-10 11:53:34 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-07-24 15:05:11 -0400
commit908d4369a394e816767d566d9c3d15a5af8c1c55 (patch)
treea1aa369a55a6f998109448cdb6dbbcf77ff9b5f0
parent4b14c96dfbf068acb85c3fa2446b3949c0230deb (diff)
cfg80211: don't look at wdev->ssid for giwessid
This variable is only used internally, _while_ connected. If we use it, the sequence # iwconfig wlan1 essid foo <connects> # iwconfig wlan1 essid "" <disconnects> # iwconfig will still display "foo" as the SSID afterwards, which is obviously quite bogus. Fix this by only displaying the wext SSID, if present. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--net/wireless/wext-sme.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/net/wireless/wext-sme.c b/net/wireless/wext-sme.c
index c33ea9a5de78..cd5764fd001a 100644
--- a/net/wireless/wext-sme.c
+++ b/net/wireless/wext-sme.c
@@ -209,11 +209,7 @@ int cfg80211_mgd_wext_giwessid(struct net_device *dev,
209 data->flags = 0; 209 data->flags = 0;
210 210
211 wdev_lock(wdev); 211 wdev_lock(wdev);
212 if (wdev->ssid_len) { 212 if (wdev->wext.connect.ssid && wdev->wext.connect.ssid_len) {
213 data->flags = 1;
214 data->length = wdev->ssid_len;
215 memcpy(ssid, wdev->ssid, data->length);
216 } else if (wdev->wext.connect.ssid && wdev->wext.connect.ssid_len) {
217 data->flags = 1; 213 data->flags = 1;
218 data->length = wdev->wext.connect.ssid_len; 214 data->length = wdev->wext.connect.ssid_len;
219 memcpy(ssid, wdev->wext.connect.ssid, data->length); 215 memcpy(ssid, wdev->wext.connect.ssid, data->length);