All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] cfg80211: wext: set bssid to NULL in SIOCIWESSID
@ 2010-01-29 23:39 shanyu.zhao
  2010-01-30  8:37 ` Johannes Berg
  0 siblings, 1 reply; 7+ messages in thread
From: shanyu.zhao @ 2010-01-29 23:39 UTC (permalink / raw)
  To: linux-wireless; +Cc: Shanyu Zhao

From: Shanyu Zhao <shanyu.zhao@intel.com>

Need to set bssid to NULL in cfg80211's SIOCIWESSID function, otherwise
after "iwconfig wlanx ap <mac>", the "iwconfig wlanx essid" won't work.

Cc: stable@kernel.org

Signed-off-by: Shanyu Zhao <shanyu.zhao@intel.com>
---
 net/wireless/wext-sme.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/net/wireless/wext-sme.c b/net/wireless/wext-sme.c
index eede356..5a67dd5 100644
--- a/net/wireless/wext-sme.c
+++ b/net/wireless/wext-sme.c
@@ -194,6 +194,7 @@ int cfg80211_mgd_wext_siwessid(struct net_device *dev,
 	wdev->wext.connect.ssid = wdev->wext.ssid;
 	memcpy(wdev->wext.ssid, ssid, len);
 	wdev->wext.connect.ssid_len = len;
+	wdev->wext.connect.bssid = NULL;
 
 	wdev->wext.connect.crypto.control_port = false;
 
-- 
1.6.0.4


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

* Re: [PATCH 1/1] cfg80211: wext: set bssid to NULL in SIOCIWESSID
  2010-01-29 23:39 [PATCH 1/1] cfg80211: wext: set bssid to NULL in SIOCIWESSID shanyu.zhao
@ 2010-01-30  8:37 ` Johannes Berg
  2010-02-01 18:57   ` Zhao, Shanyu
  0 siblings, 1 reply; 7+ messages in thread
From: Johannes Berg @ 2010-01-30  8:37 UTC (permalink / raw)
  To: shanyu.zhao; +Cc: linux-wireless

[-- Attachment #1: Type: text/plain, Size: 1112 bytes --]

On Fri, 2010-01-29 at 15:39 -0800, shanyu.zhao@intel.com wrote:
> From: Shanyu Zhao <shanyu.zhao@intel.com>
> 
> Need to set bssid to NULL in cfg80211's SIOCIWESSID function, otherwise
> after "iwconfig wlanx ap <mac>", the "iwconfig wlanx essid" won't work.
> 
> Cc: stable@kernel.org
> 
> Signed-off-by: Shanyu Zhao <shanyu.zhao@intel.com>
> ---
>  net/wireless/wext-sme.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/net/wireless/wext-sme.c b/net/wireless/wext-sme.c
> index eede356..5a67dd5 100644
> --- a/net/wireless/wext-sme.c
> +++ b/net/wireless/wext-sme.c
> @@ -194,6 +194,7 @@ int cfg80211_mgd_wext_siwessid(struct net_device *dev,
>  	wdev->wext.connect.ssid = wdev->wext.ssid;
>  	memcpy(wdev->wext.ssid, ssid, len);
>  	wdev->wext.connect.ssid_len = len;
> +	wdev->wext.connect.bssid = NULL;

This is incorrect. If you want to connect to an AP with the SSID "foo"
and the BSSID "00:...:ff" you need to make two calls, e.g.

iwconfig wlan0 essid "foo"
iwconfig wlan0 ap "00:...:ff"

Your patch disables that functionality.

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

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

* RE: [PATCH 1/1] cfg80211: wext: set bssid to NULL in SIOCIWESSID
  2010-01-30  8:37 ` Johannes Berg
@ 2010-02-01 18:57   ` Zhao, Shanyu
  2010-02-01 19:27     ` Johannes Berg
  0 siblings, 1 reply; 7+ messages in thread
From: Zhao, Shanyu @ 2010-02-01 18:57 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless

DQpBY3R1YWxseSBJIGRvbid0IHRoaW5rIG15IHBhdGNoIGRpc2FibGVzIHRoYXQgZnVuY3Rpb25h
bGl0eS4gSWYgdGhlcmUncmUgbXVsdGlwbGUgQVAgd2l0aCB0aGUgc2FtZSBlc3NpZCAiZm9vIiBh
bmQgb25lIG9mIHRoZW0gaGFzIE1BQyAiMDA6Li4uOmZmIiwgdGhlbjoNCg0KaXdjb25maWcgd2xh
bjAgZXNzaWQ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MCBhcCAiMDA6Li4uOmZmIg0K
DQpZb3VyIHBhdGNoIGRpc2FibGVzIHRoYXQgZnVuY3Rpb25hbGl0eS4NCg0Kam9oYW5uZXMNCg==

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

* RE: [PATCH 1/1] cfg80211: wext: set bssid to NULL in SIOCIWESSID
  2010-02-01 18:57   ` Zhao, Shanyu
@ 2010-02-01 19:27     ` Johannes Berg
  2010-02-01 19:47       ` John W. Linville
  0 siblings, 1 reply; 7+ messages in thread
From: Johannes Berg @ 2010-02-01 19:27 UTC (permalink / raw)
  To: Zhao, Shanyu; +Cc: linux-wireless

[-- Attachment #1: Type: text/plain, Size: 793 bytes --]

On Mon, 2010-02-01 at 10:57 -0800, Zhao, Shanyu wrote:
> Actually I don't think my patch disables that functionality. If
> there're multiple AP with the same essid "foo" and one of them has MAC
> "00:...:ff", then:
> 
> iwconfig wlan0 essid "foo"
> This will make the station associate with the first AP with essid
> "foo".
> 
> iwconfig wlan0 ap "00:...:ff"
> This will disassociate from the previous AP, and then associate with
> the first AP with MAC "00:...:ff".
> 
> Am I missing anything here?

No, I missed something. The problem will only occur when the SSID is
hidden as well, because the connect code will not have the SSID and not
know what to scan for, or which SSID to choose (there are Cisco APs that
use the same BSSID for multiple hidden SSIDs).

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

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

* Re: [PATCH 1/1] cfg80211: wext: set bssid to NULL in SIOCIWESSID
  2010-02-01 19:27     ` Johannes Berg
@ 2010-02-01 19:47       ` John W. Linville
  2010-02-01 21:25         ` Johannes Berg
  0 siblings, 1 reply; 7+ messages in thread
From: John W. Linville @ 2010-02-01 19:47 UTC (permalink / raw)
  To: Johannes Berg; +Cc: Zhao, Shanyu, linux-wireless

On Mon, Feb 01, 2010 at 08:27:40PM +0100, Johannes Berg wrote:
> On Mon, 2010-02-01 at 10:57 -0800, Zhao, Shanyu wrote:
> > Actually I don't think my patch disables that functionality. If
> > there're multiple AP with the same essid "foo" and one of them has MAC
> > "00:...:ff", then:
> > 
> > iwconfig wlan0 essid "foo"
> > This will make the station associate with the first AP with essid
> > "foo".
> > 
> > iwconfig wlan0 ap "00:...:ff"
> > This will disassociate from the previous AP, and then associate with
> > the first AP with MAC "00:...:ff".
> > 
> > Am I missing anything here?
> 
> No, I missed something. The problem will only occur when the SSID is
> hidden as well, because the connect code will not have the SSID and not
> know what to scan for, or which SSID to choose (there are Cisco APs that
> use the same BSSID for multiple hidden SSIDs).

Well, in the confusion I deleted the original post.  Could you
(i.e. Shanyu Zhao) resend it to me?

Thanks,

John
-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

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

* Re: [PATCH 1/1] cfg80211: wext: set bssid to NULL in SIOCIWESSID
  2010-02-01 19:47       ` John W. Linville
@ 2010-02-01 21:25         ` Johannes Berg
  2010-02-01 21:29           ` John W. Linville
  0 siblings, 1 reply; 7+ messages in thread
From: Johannes Berg @ 2010-02-01 21:25 UTC (permalink / raw)
  To: John W. Linville; +Cc: Zhao, Shanyu, linux-wireless

[-- Attachment #1: Type: text/plain, Size: 941 bytes --]

On Mon, 2010-02-01 at 14:47 -0500, John W. Linville wrote:

> > > iwconfig wlan0 essid "foo"
> > > This will make the station associate with the first AP with essid
> > > "foo".
> > > 
> > > iwconfig wlan0 ap "00:...:ff"
> > > This will disassociate from the previous AP, and then associate with
> > > the first AP with MAC "00:...:ff".
> > > 
> > > Am I missing anything here?
> > 
> > No, I missed something. The problem will only occur when the SSID is
> > hidden as well, because the connect code will not have the SSID and not
> > know what to scan for, or which SSID to choose (there are Cisco APs that
> > use the same BSSID for multiple hidden SSIDs).
> 
> Well, in the confusion I deleted the original post.  Could you
> (i.e. Shanyu Zhao) resend it to me?

Sorry -- I wasn't clear. My mail missed something in describing the
problem, but that doesn't change the fact that the patch will break it.

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

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

* Re: [PATCH 1/1] cfg80211: wext: set bssid to NULL in SIOCIWESSID
  2010-02-01 21:25         ` Johannes Berg
@ 2010-02-01 21:29           ` John W. Linville
  0 siblings, 0 replies; 7+ messages in thread
From: John W. Linville @ 2010-02-01 21:29 UTC (permalink / raw)
  To: Johannes Berg; +Cc: Zhao, Shanyu, linux-wireless

On Mon, Feb 01, 2010 at 10:25:04PM +0100, Johannes Berg wrote:
> On Mon, 2010-02-01 at 14:47 -0500, John W. Linville wrote:
> 
> > > > iwconfig wlan0 essid "foo"
> > > > This will make the station associate with the first AP with essid
> > > > "foo".
> > > > 
> > > > iwconfig wlan0 ap "00:...:ff"
> > > > This will disassociate from the previous AP, and then associate with
> > > > the first AP with MAC "00:...:ff".
> > > > 
> > > > Am I missing anything here?
> > > 
> > > No, I missed something. The problem will only occur when the SSID is
> > > hidden as well, because the connect code will not have the SSID and not
> > > know what to scan for, or which SSID to choose (there are Cisco APs that
> > > use the same BSSID for multiple hidden SSIDs).
> > 
> > Well, in the confusion I deleted the original post.  Could you
> > (i.e. Shanyu Zhao) resend it to me?
> 
> Sorry -- I wasn't clear. My mail missed something in describing the
> problem, but that doesn't change the fact that the patch will break it.

OK, thanks for clarifying! :-)

John
-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

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

end of thread, other threads:[~2010-02-01 21:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-29 23:39 [PATCH 1/1] cfg80211: wext: set bssid to NULL in SIOCIWESSID shanyu.zhao
2010-01-30  8:37 ` Johannes Berg
2010-02-01 18:57   ` Zhao, Shanyu
2010-02-01 19:27     ` Johannes Berg
2010-02-01 19:47       ` John W. Linville
2010-02-01 21:25         ` Johannes Berg
2010-02-01 21:29           ` John W. Linville

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.