Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH] cfg80211: don't look at wdev->ssid for giwessid
@ 2009-07-10 15:53 Johannes Berg
  2009-07-10 16:31 ` Pavel Roskin
  0 siblings, 1 reply; 4+ messages in thread
From: Johannes Berg @ 2009-07-10 15:53 UTC (permalink / raw)
  To: John Linville; +Cc: linux-wireless, Pavel Roskin

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>
---
 net/wireless/wext-sme.c |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

--- wireless-testing.orig/net/wireless/wext-sme.c	2009-07-10 17:40:43.000000000 +0200
+++ wireless-testing/net/wireless/wext-sme.c	2009-07-10 17:47:50.000000000 +0200
@@ -209,11 +209,7 @@ int cfg80211_mgd_wext_giwessid(struct ne
 	data->flags = 0;
 
 	wdev_lock(wdev);
-	if (wdev->ssid_len) {
-		data->flags = 1;
-		data->length = wdev->ssid_len;
-		memcpy(ssid, wdev->ssid, data->length);
-	} else if (wdev->wext.connect.ssid && wdev->wext.connect.ssid_len) {
+	if (wdev->wext.connect.ssid && wdev->wext.connect.ssid_len) {
 		data->flags = 1;
 		data->length = wdev->wext.connect.ssid_len;
 		memcpy(ssid, wdev->wext.connect.ssid, data->length);



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-07-10 16:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-10 15:53 [PATCH] cfg80211: don't look at wdev->ssid for giwessid Johannes Berg
2009-07-10 16:31 ` Pavel Roskin
2009-07-10 16:32   ` Johannes Berg
2009-07-10 16:37     ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox