From: Johannes Berg <johannes@sipsolutions.net>
To: John Linville <linville@tuxdriver.com>
Cc: linux-wireless <linux-wireless@vger.kernel.org>,
Pavel Roskin <proski@gnu.org>
Subject: [PATCH] cfg80211: don't look at wdev->ssid for giwessid
Date: Fri, 10 Jul 2009 17:53:34 +0200 [thread overview]
Message-ID: <1247241214.29747.5.camel@johannes.local> (raw)
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);
next reply other threads:[~2009-07-10 15:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-10 15:53 Johannes Berg [this message]
2009-07-10 16:31 ` [PATCH] cfg80211: don't look at wdev->ssid for giwessid Pavel Roskin
2009-07-10 16:32 ` Johannes Berg
2009-07-10 16:37 ` Johannes Berg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1247241214.29747.5.camel@johannes.local \
--to=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=proski@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox