linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: mac80211: fix managed mode BSSID handling
@ 2009-05-19  8:32 Johannes Berg
  2009-05-20 17:06 ` John W. Linville
  0 siblings, 1 reply; 2+ messages in thread
From: Johannes Berg @ 2009-05-19  8:32 UTC (permalink / raw)
  To: John Linville; +Cc: linux-wireless

John,

You asked whether the fix-up was correct, but was there also a problem
applying that to wireless-testing? It seems to be missing a hunk (below)
in commit

commit 4eca27a55d34bc3256fb367842ab225948fa155b
Author: Johannes Berg <johannes@sipsolutions.net>
Date:   Thu May 14 13:10:14 2009 +0200

    mac80211: fix managed mode BSSID handling

---
 net/mac80211/main.c |   16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

--- wireless-testing.orig/net/mac80211/main.c	2009-05-18 19:48:04.000000000 +0200
+++ wireless-testing/net/mac80211/main.c	2009-05-19 10:30:50.000000000 +0200
@@ -219,18 +219,26 @@ void ieee80211_bss_info_change_notify(st
 				      u32 changed)
 {
 	struct ieee80211_local *local = sdata->local;
+	static const u8 zero[ETH_ALEN] = { 0 };
 
 	if (!changed)
 		return;
 
-	if (sdata->vif.type == NL80211_IFTYPE_STATION)
-		sdata->vif.bss_conf.bssid = sdata->u.mgd.bssid;
-	else if (sdata->vif.type == NL80211_IFTYPE_ADHOC)
+	if (sdata->vif.type == NL80211_IFTYPE_STATION) {
+		/*
+		 * While not associated, claim a BSSID of all-zeroes
+		 * so that drivers don't do any weird things with the
+		 * BSSID at that time.
+		 */
+		if (sdata->vif.bss_conf.assoc)
+			sdata->vif.bss_conf.bssid = sdata->u.mgd.bssid;
+		else
+			sdata->vif.bss_conf.bssid = zero;
+	} else if (sdata->vif.type == NL80211_IFTYPE_ADHOC)
 		sdata->vif.bss_conf.bssid = sdata->u.ibss.bssid;
 	else if (sdata->vif.type == NL80211_IFTYPE_AP)
 		sdata->vif.bss_conf.bssid = sdata->dev->dev_addr;
 	else if (ieee80211_vif_is_mesh(&sdata->vif)) {
-		static const u8 zero[ETH_ALEN] = { 0 };
 		sdata->vif.bss_conf.bssid = zero;
 	} else {
 		WARN_ON(1);



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

* Re: mac80211: fix managed mode BSSID handling
  2009-05-19  8:32 mac80211: fix managed mode BSSID handling Johannes Berg
@ 2009-05-20 17:06 ` John W. Linville
  0 siblings, 0 replies; 2+ messages in thread
From: John W. Linville @ 2009-05-20 17:06 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless

On Tue, May 19, 2009 at 10:32:29AM +0200, Johannes Berg wrote:
> John,
> 
> You asked whether the fix-up was correct, but was there also a problem
> applying that to wireless-testing? It seems to be missing a hunk (below)
> in commit
> 
> commit 4eca27a55d34bc3256fb367842ab225948fa155b
> Author: Johannes Berg <johannes@sipsolutions.net>
> Date:   Thu May 14 13:10:14 2009 +0200
> 
>     mac80211: fix managed mode BSSID handling
> 
> ---
>  net/mac80211/main.c |   16 ++++++++++++----
>  1 file changed, 12 insertions(+), 4 deletions(-)
> 
> --- wireless-testing.orig/net/mac80211/main.c	2009-05-18 19:48:04.000000000 +0200
> +++ wireless-testing/net/mac80211/main.c	2009-05-19 10:30:50.000000000 +0200
> @@ -219,18 +219,26 @@ void ieee80211_bss_info_change_notify(st
>  				      u32 changed)
>  {
>  	struct ieee80211_local *local = sdata->local;
> +	static const u8 zero[ETH_ALEN] = { 0 };

Looks like a busted rebase from pending-fixes to master -- that hunk
went to a function that doesn't exist on master.

Thanks for the vigilence!  I'll get a fix-up for this...

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] 2+ messages in thread

end of thread, other threads:[~2009-05-20 17:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-19  8:32 mac80211: fix managed mode BSSID handling Johannes Berg
2009-05-20 17:06 ` John W. Linville

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).