* [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
* Re: [PATCH] cfg80211: don't look at wdev->ssid for giwessid
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
0 siblings, 1 reply; 4+ messages in thread
From: Pavel Roskin @ 2009-07-10 16:31 UTC (permalink / raw)
To: Johannes Berg; +Cc: John Linville, linux-wireless
On Fri, 2009-07-10 at 17:53 +0200, Johannes Berg wrote:
> This variable is only used internally, _while_ connected.
> If we use it, the sequence
>
> # iwconfig wlan1 essid foo
> <connects>
> # iwconfig wlan1 essid ""
> <disconnects>
> # iwconfig
That was quick, thank you! Indeed, it's possible to unset ESSID not and
set it to another value. But switching from "foo" to "bar" is still not
working.
--
Regards,
Pavel Roskin
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] cfg80211: don't look at wdev->ssid for giwessid
2009-07-10 16:31 ` Pavel Roskin
@ 2009-07-10 16:32 ` Johannes Berg
2009-07-10 16:37 ` Johannes Berg
0 siblings, 1 reply; 4+ messages in thread
From: Johannes Berg @ 2009-07-10 16:32 UTC (permalink / raw)
To: Pavel Roskin; +Cc: John Linville, linux-wireless
[-- Attachment #1: Type: text/plain, Size: 615 bytes --]
On Fri, 2009-07-10 at 12:31 -0400, Pavel Roskin wrote:
> On Fri, 2009-07-10 at 17:53 +0200, Johannes Berg wrote:
> > This variable is only used internally, _while_ connected.
> > If we use it, the sequence
> >
> > # iwconfig wlan1 essid foo
> > <connects>
> > # iwconfig wlan1 essid ""
> > <disconnects>
> > # iwconfig
>
> That was quick, thank you! Indeed, it's possible to unset ESSID not and
> set it to another value. But switching from "foo" to "bar" is still not
> working.
Dunno, switching is definitely working for me... And I can't see how the
code could _possibly_ fail.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] cfg80211: don't look at wdev->ssid for giwessid
2009-07-10 16:32 ` Johannes Berg
@ 2009-07-10 16:37 ` Johannes Berg
0 siblings, 0 replies; 4+ messages in thread
From: Johannes Berg @ 2009-07-10 16:37 UTC (permalink / raw)
To: Pavel Roskin; +Cc: John Linville, linux-wireless
[-- Attachment #1: Type: text/plain, Size: 247 bytes --]
On Fri, 2009-07-10 at 18:32 +0200, Johannes Berg wrote:
> Dunno, switching is definitely working for me... And I can't see how the
> code could _possibly_ fail.
Yeah so the GIWESSID code is correct now ... just not SIWESSID :)
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ 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