* Regression caused by commit e32b1b9a33759e8a83ac566c4c43f23ed5d6343b
@ 2009-01-23 2:08 Larry Finger
2009-01-23 2:14 ` John W. Linville
` (2 more replies)
0 siblings, 3 replies; 15+ messages in thread
From: Larry Finger @ 2009-01-23 2:08 UTC (permalink / raw)
To: Alina Friedrichsen
Cc: John Linville, samuel, Kalle Valo, maximlevitsky, wireless
With the commit of the subject, my b43 and p54usb devices stopped working. They could
associate and authenticate with my WPA2 network, but never finish the DHCP connection and
get an IP address. Surprisingly, my rtl8187 devices continued to work.
Please excuse the second sending of this. I missed wireless the first time.
Larry
^ permalink raw reply [flat|nested] 15+ messages in thread* Re: Regression caused by commit e32b1b9a33759e8a83ac566c4c43f23ed5d6343b 2009-01-23 2:08 Regression caused by commit e32b1b9a33759e8a83ac566c4c43f23ed5d6343b Larry Finger @ 2009-01-23 2:14 ` John W. Linville 2009-01-23 2:21 ` Alina Friedrichsen 2009-01-23 5:32 ` Larry Finger 2009-01-23 5:17 ` Hin-Tak Leung 2009-01-23 15:47 ` Michael Buesch 2 siblings, 2 replies; 15+ messages in thread From: John W. Linville @ 2009-01-23 2:14 UTC (permalink / raw) To: Larry Finger Cc: Alina Friedrichsen, samuel, Kalle Valo, maximlevitsky, wireless On Thu, Jan 22, 2009 at 08:08:31PM -0600, Larry Finger wrote: > With the commit of the subject, my b43 and p54usb devices stopped working. They could > associate and authenticate with my WPA2 network, but never finish the DHCP connection and > get an IP address. Surprisingly, my rtl8187 devices continued to work. > > Please excuse the second sending of this. I missed wireless the first time. I reverted this in wireless-testing (and it never went anywhere upstream). Of course, now it looks like Samuel has a fix...maybe I'll combine them... John -- John W. Linville Linux should be at the core linville@tuxdriver.com of your literate lifestyle. ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Regression caused by commit e32b1b9a33759e8a83ac566c4c43f23ed5d6343b 2009-01-23 2:14 ` John W. Linville @ 2009-01-23 2:21 ` Alina Friedrichsen 2009-01-23 5:32 ` Larry Finger 1 sibling, 0 replies; 15+ messages in thread From: Alina Friedrichsen @ 2009-01-23 2:21 UTC (permalink / raw) To: John W. Linville, Larry.Finger Cc: linux-wireless, maximlevitsky, kalle.valo, samuel Hello! > I reverted this in wireless-testing (and it never went anywhere > upstream). Of course, now it looks like Samuel has a fix...maybe > I'll combine them... I will check this problem and look for the cleanest solution. Sorry, for the trouble. :( Regards Alina --=20 Psssst! Schon vom neuen GMX MultiMessenger geh=F6rt? Der kann`s mit all= en: http://www.gmx.net/de/go/multimessenger -- To unsubscribe from this list: send the line "unsubscribe linux-wireles= s" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Regression caused by commit e32b1b9a33759e8a83ac566c4c43f23ed5d6343b 2009-01-23 2:14 ` John W. Linville 2009-01-23 2:21 ` Alina Friedrichsen @ 2009-01-23 5:32 ` Larry Finger 2009-01-23 7:13 ` Alina Friedrichsen 1 sibling, 1 reply; 15+ messages in thread From: Larry Finger @ 2009-01-23 5:32 UTC (permalink / raw) To: John W. Linville Cc: Alina Friedrichsen, samuel, Kalle Valo, maximlevitsky, wireless John W. Linville wrote: > > I reverted this in wireless-testing (and it never went anywhere > upstream). Of course, now it looks like Samuel has a fix...maybe > I'll combine them... Samuel's fix works for me. Larry ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Regression caused by commit e32b1b9a33759e8a83ac566c4c43f23ed5d6343b 2009-01-23 5:32 ` Larry Finger @ 2009-01-23 7:13 ` Alina Friedrichsen 2009-01-23 9:56 ` Sedat Dilek ` (2 more replies) 0 siblings, 3 replies; 15+ messages in thread From: Alina Friedrichsen @ 2009-01-23 7:13 UTC (permalink / raw) To: Larry Finger, linville; +Cc: linux-wireless, maximlevitsky, kalle.valo, samuel [-- Attachment #1: Type: text/plain, Size: 711 bytes --] Hello! > > I reverted this in wireless-testing (and it never went anywhere > > upstream). Of course, now it looks like Samuel has a fix...maybe > > I'll combine them... > > Samuel's fix works for me. If this works for the others too, I would propose the following patch. Without it, e.g. the beacon messages in IBSS mode are broken, if you set a fixed BSSID. (The iwl4965 low level driver sends back an error code, if you want to set a fixed BSSID, so I think, we should simply ignore it, as it will be tried the next time when the initiated new network join is complete.) Regards Alina -- Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger [-- Attachment #2: fixed-bssid-revisited-v3.patch --] [-- Type: text/x-patch, Size: 4158 bytes --] diff -urN compat-wireless-2009-01-23.orig/net/mac80211/mlme.c compat-wireless-2009-01-23/net/mac80211/mlme.c --- compat-wireless-2009-01-23.orig/net/mac80211/mlme.c 2009-01-23 06:12:14.000000000 +0100 +++ compat-wireless-2009-01-23/net/mac80211/mlme.c 2009-01-23 07:58:31.000000000 +0100 @@ -1614,6 +1614,7 @@ ieee80211_sta_def_wmm_params(sdata, bss); + ifsta->flags |= IEEE80211_STA_PREV_BSSID_SET; ifsta->state = IEEE80211_STA_MLME_IBSS_JOINED; mod_timer(&ifsta->timer, jiffies + IEEE80211_IBSS_MERGE_INTERVAL); @@ -2177,19 +2178,18 @@ int i; int ret; -#if 0 - /* Easier testing, use fixed BSSID. */ - memset(bssid, 0xfe, ETH_ALEN); -#else - /* Generate random, not broadcast, locally administered BSSID. Mix in - * own MAC address to make sure that devices that do not have proper - * random number generator get different BSSID. */ - get_random_bytes(bssid, ETH_ALEN); - for (i = 0; i < ETH_ALEN; i++) - bssid[i] ^= sdata->dev->dev_addr[i]; - bssid[0] &= ~0x01; - bssid[0] |= 0x02; -#endif + if (sdata->u.sta.flags & IEEE80211_STA_BSSID_SET) { + memcpy(bssid, ifsta->bssid, ETH_ALEN); + } else { + /* Generate random, not broadcast, locally administered BSSID. Mix in + * own MAC address to make sure that devices that do not have proper + * random number generator get different BSSID. */ + get_random_bytes(bssid, ETH_ALEN); + for (i = 0; i < ETH_ALEN; i++) + bssid[i] ^= sdata->dev->dev_addr[i]; + bssid[0] &= ~0x01; + bssid[0] |= 0x02; + } printk(KERN_DEBUG "%s: Creating new IBSS network, BSSID %pM\n", sdata->dev->name, bssid); @@ -2250,6 +2250,9 @@ memcmp(ifsta->ssid, bss->ssid, bss->ssid_len) != 0 || !(bss->capability & WLAN_CAPABILITY_IBSS)) continue; + if ((ifsta->flags & IEEE80211_STA_BSSID_SET) && + memcmp(ifsta->bssid, bss->bssid, ETH_ALEN) != 0) + continue; #ifdef CONFIG_MAC80211_IBSS_DEBUG printk(KERN_DEBUG " bssid=%pM found\n", bss->bssid); #endif /* CONFIG_MAC80211_IBSS_DEBUG */ @@ -2266,7 +2269,9 @@ "%pM\n", bssid, ifsta->bssid); #endif /* CONFIG_MAC80211_IBSS_DEBUG */ - if (found && memcmp(ifsta->bssid, bssid, ETH_ALEN) != 0) { + if (found && + ((!(ifsta->flags & IEEE80211_STA_PREV_BSSID_SET)) || + memcmp(ifsta->bssid, bssid, ETH_ALEN) != 0)) { int ret; int search_freq; @@ -2604,16 +2609,16 @@ memset(ifsta->ssid, 0, sizeof(ifsta->ssid)); memcpy(ifsta->ssid, ssid, len); ifsta->ssid_len = len; - ifsta->flags &= ~IEEE80211_STA_PREV_BSSID_SET; } + ifsta->flags &= ~IEEE80211_STA_PREV_BSSID_SET; + if (len) ifsta->flags |= IEEE80211_STA_SSID_SET; else ifsta->flags &= ~IEEE80211_STA_SSID_SET; - if (sdata->vif.type == NL80211_IFTYPE_ADHOC && - !(ifsta->flags & IEEE80211_STA_BSSID_SET)) { + if (sdata->vif.type == NL80211_IFTYPE_ADHOC) { ifsta->ibss_join_req = jiffies; ifsta->state = IEEE80211_STA_MLME_IBSS_SEARCH; return ieee80211_sta_find_ibss(sdata, ifsta); @@ -2633,36 +2638,21 @@ int ieee80211_sta_set_bssid(struct ieee80211_sub_if_data *sdata, u8 *bssid) { struct ieee80211_if_sta *ifsta; - int res; - bool valid; ifsta = &sdata->u.sta; - valid = is_valid_ether_addr(bssid); - if (memcmp(ifsta->bssid, bssid, ETH_ALEN) != 0) { - if(valid) - memcpy(ifsta->bssid, bssid, ETH_ALEN); - else - memset(ifsta->bssid, 0, ETH_ALEN); - res = 0; - /* - * Hack! See also ieee80211_sta_set_ssid. - */ - if (netif_running(sdata->dev)) - res = ieee80211_if_config(sdata, IEEE80211_IFCC_BSSID); - if (res) { - printk(KERN_DEBUG "%s: Failed to config new BSSID to " - "the low-level driver\n", sdata->dev->name); - return res; - } - } - - if (valid) + if (is_valid_ether_addr(bssid)) { + memcpy(ifsta->bssid, bssid, ETH_ALEN); ifsta->flags |= IEEE80211_STA_BSSID_SET; - else + } else { + memset(ifsta->bssid, 0, ETH_ALEN); ifsta->flags &= ~IEEE80211_STA_BSSID_SET; + } - return 0; + if (netif_running(sdata->dev)) + ieee80211_if_config(sdata, IEEE80211_IFCC_BSSID); + + return ieee80211_sta_set_ssid(sdata, ifsta->ssid, ifsta->ssid_len); } int ieee80211_sta_set_extra_ie(struct ieee80211_sub_if_data *sdata, char *ie, size_t len) ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Regression caused by commit e32b1b9a33759e8a83ac566c4c43f23ed5d6343b 2009-01-23 7:13 ` Alina Friedrichsen @ 2009-01-23 9:56 ` Sedat Dilek 2009-01-23 12:29 ` Samuel Ortiz 2009-01-23 16:33 ` Larry Finger 2 siblings, 0 replies; 15+ messages in thread From: Sedat Dilek @ 2009-01-23 9:56 UTC (permalink / raw) To: Alina Friedrichsen Cc: Larry Finger, linville, linux-wireless, maximlevitsky, kalle.valo, samuel [-- Attachment #1: Type: text/plain, Size: 1295 bytes --] Hi Alina, Version 4 of your patch is working for me against wl (master-2009-01-22) and with iwl3945. Samuel's patch is obsolete. Could you please send a separate email containing your new patch v4? >>> [PATCH v4] mac80211: Fixed BSSID handling revisited. <<< My 2nd request is just cosmetics: Can you please patch next time against wireless directory (patch is attached). This is just a proposal. Thanks for your help. Kind Regards, Sedat On Fri, Jan 23, 2009 at 8:13 AM, Alina Friedrichsen <x-alina@gmx.net> wrote: > Hello! > >> > I reverted this in wireless-testing (and it never went anywhere >> > upstream). Of course, now it looks like Samuel has a fix...maybe >> > I'll combine them... >> >> Samuel's fix works for me. > > If this works for the others too, I would propose the following patch. Without it, e.g. the beacon messages in IBSS mode are broken, if you set a fixed BSSID. > > (The iwl4965 low level driver sends back an error code, if you want to set a fixed BSSID, so I think, we should simply ignore it, as it will be tried the next time when the initiated new network join is complete.) > > Regards > Alina > > -- > Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger > [-- Attachment #2: mac80211-Fixed-BSSID-handling-revisited-v4.patch --] [-- Type: text/x-diff, Size: 4069 bytes --] Index: wireless-testing/net/mac80211/mlme.c =================================================================== --- wireless-testing.orig/net/mac80211/mlme.c +++ wireless-testing/net/mac80211/mlme.c @@ -1614,6 +1614,7 @@ ieee80211_sta_def_wmm_params(sdata, bss); + ifsta->flags |= IEEE80211_STA_PREV_BSSID_SET; ifsta->state = IEEE80211_STA_MLME_IBSS_JOINED; mod_timer(&ifsta->timer, jiffies + IEEE80211_IBSS_MERGE_INTERVAL); @@ -2177,19 +2178,18 @@ int i; int ret; -#if 0 - /* Easier testing, use fixed BSSID. */ - memset(bssid, 0xfe, ETH_ALEN); -#else - /* Generate random, not broadcast, locally administered BSSID. Mix in - * own MAC address to make sure that devices that do not have proper - * random number generator get different BSSID. */ - get_random_bytes(bssid, ETH_ALEN); - for (i = 0; i < ETH_ALEN; i++) - bssid[i] ^= sdata->dev->dev_addr[i]; - bssid[0] &= ~0x01; - bssid[0] |= 0x02; -#endif + if (sdata->u.sta.flags & IEEE80211_STA_BSSID_SET) { + memcpy(bssid, ifsta->bssid, ETH_ALEN); + } else { + /* Generate random, not broadcast, locally administered BSSID. Mix in + * own MAC address to make sure that devices that do not have proper + * random number generator get different BSSID. */ + get_random_bytes(bssid, ETH_ALEN); + for (i = 0; i < ETH_ALEN; i++) + bssid[i] ^= sdata->dev->dev_addr[i]; + bssid[0] &= ~0x01; + bssid[0] |= 0x02; + } printk(KERN_DEBUG "%s: Creating new IBSS network, BSSID %pM\n", sdata->dev->name, bssid); @@ -2250,6 +2250,9 @@ memcmp(ifsta->ssid, bss->ssid, bss->ssid_len) != 0 || !(bss->capability & WLAN_CAPABILITY_IBSS)) continue; + if ((ifsta->flags & IEEE80211_STA_BSSID_SET) && + memcmp(ifsta->bssid, bss->bssid, ETH_ALEN) != 0) + continue; #ifdef CONFIG_MAC80211_IBSS_DEBUG printk(KERN_DEBUG " bssid=%pM found\n", bss->bssid); #endif /* CONFIG_MAC80211_IBSS_DEBUG */ @@ -2266,7 +2269,9 @@ "%pM\n", bssid, ifsta->bssid); #endif /* CONFIG_MAC80211_IBSS_DEBUG */ - if (found && memcmp(ifsta->bssid, bssid, ETH_ALEN) != 0) { + if (found && + ((!(ifsta->flags & IEEE80211_STA_PREV_BSSID_SET)) || + memcmp(ifsta->bssid, bssid, ETH_ALEN) != 0)) { int ret; int search_freq; @@ -2604,16 +2609,16 @@ memset(ifsta->ssid, 0, sizeof(ifsta->ssid)); memcpy(ifsta->ssid, ssid, len); ifsta->ssid_len = len; - ifsta->flags &= ~IEEE80211_STA_PREV_BSSID_SET; } + ifsta->flags &= ~IEEE80211_STA_PREV_BSSID_SET; + if (len) ifsta->flags |= IEEE80211_STA_SSID_SET; else ifsta->flags &= ~IEEE80211_STA_SSID_SET; - if (sdata->vif.type == NL80211_IFTYPE_ADHOC && - !(ifsta->flags & IEEE80211_STA_BSSID_SET)) { + if (sdata->vif.type == NL80211_IFTYPE_ADHOC) { ifsta->ibss_join_req = jiffies; ifsta->state = IEEE80211_STA_MLME_IBSS_SEARCH; return ieee80211_sta_find_ibss(sdata, ifsta); @@ -2633,36 +2638,21 @@ int ieee80211_sta_set_bssid(struct ieee80211_sub_if_data *sdata, u8 *bssid) { struct ieee80211_if_sta *ifsta; - int res; - bool valid; ifsta = &sdata->u.sta; - valid = is_valid_ether_addr(bssid); - if (memcmp(ifsta->bssid, bssid, ETH_ALEN) != 0) { - if(valid) - memcpy(ifsta->bssid, bssid, ETH_ALEN); - else - memset(ifsta->bssid, 0, ETH_ALEN); - res = 0; - /* - * Hack! See also ieee80211_sta_set_ssid. - */ - if (netif_running(sdata->dev)) - res = ieee80211_if_config(sdata, IEEE80211_IFCC_BSSID); - if (res) { - printk(KERN_DEBUG "%s: Failed to config new BSSID to " - "the low-level driver\n", sdata->dev->name); - return res; - } - } - - if (valid) + if (is_valid_ether_addr(bssid)) { + memcpy(ifsta->bssid, bssid, ETH_ALEN); ifsta->flags |= IEEE80211_STA_BSSID_SET; - else + } else { + memset(ifsta->bssid, 0, ETH_ALEN); ifsta->flags &= ~IEEE80211_STA_BSSID_SET; + } - return 0; + if (netif_running(sdata->dev)) + ieee80211_if_config(sdata, IEEE80211_IFCC_BSSID); + + return ieee80211_sta_set_ssid(sdata, ifsta->ssid, ifsta->ssid_len); } int ieee80211_sta_set_extra_ie(struct ieee80211_sub_if_data *sdata, char *ie, size_t len) ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Regression caused by commit e32b1b9a33759e8a83ac566c4c43f23ed5d6343b 2009-01-23 7:13 ` Alina Friedrichsen 2009-01-23 9:56 ` Sedat Dilek @ 2009-01-23 12:29 ` Samuel Ortiz 2009-01-23 23:16 ` Alina Friedrichsen 2009-01-23 16:33 ` Larry Finger 2 siblings, 1 reply; 15+ messages in thread From: Samuel Ortiz @ 2009-01-23 12:29 UTC (permalink / raw) To: Alina Friedrichsen Cc: Larry Finger, linville, linux-wireless, maximlevitsky, kalle.valo On Fri, Jan 23, 2009 at 08:13:45AM +0100, Alina Friedrichsen wrote: > Hello! >=20 > > > I reverted this in wireless-testing (and it never went anywhere > > > upstream). Of course, now it looks like Samuel has a fix...maybe > > > I'll combine them... > >=20 > > Samuel's fix works for me. >=20 > If this works for the others too, I would propose the following patch= =2E Without it, e.g. the beacon messages in IBSS mode are broken, if yo= u set a fixed BSSID. >=20 > (The iwl4965 low level driver sends back an error code, if you want t= o set a fixed BSSID, so I think, we should simply ignore it, as it will= be tried the next time when the initiated new network join is complete= =2E) > I dont think we should ignore the if_config() return value. Is the 4965 error code sent when trying to set a fixed BSSID in IBSS ? I dont see it in STA mode, when associating to my AP. Cheers, Samuel. =20 > Regards > Alina >=20 > --=20 > Psssst! Schon vom neuen GMX MultiMessenger geh=F6rt? Der kann`s mit a= llen: http://www.gmx.net/de/go/multimessenger > diff -urN compat-wireless-2009-01-23.orig/net/mac80211/mlme.c compat-= wireless-2009-01-23/net/mac80211/mlme.c > --- compat-wireless-2009-01-23.orig/net/mac80211/mlme.c 2009-01-23 06= :12:14.000000000 +0100 > +++ compat-wireless-2009-01-23/net/mac80211/mlme.c 2009-01-23 07:58:3= 1.000000000 +0100 > @@ -1614,6 +1614,7 @@ > =20 > ieee80211_sta_def_wmm_params(sdata, bss); > =20 > + ifsta->flags |=3D IEEE80211_STA_PREV_BSSID_SET; > ifsta->state =3D IEEE80211_STA_MLME_IBSS_JOINED; > mod_timer(&ifsta->timer, jiffies + IEEE80211_IBSS_MERGE_INTERVAL); > =20 > @@ -2177,19 +2178,18 @@ > int i; > int ret; > =20 > -#if 0 > - /* Easier testing, use fixed BSSID. */ > - memset(bssid, 0xfe, ETH_ALEN); > -#else > - /* Generate random, not broadcast, locally administered BSSID. Mix = in > - * own MAC address to make sure that devices that do not have prope= r > - * random number generator get different BSSID. */ > - get_random_bytes(bssid, ETH_ALEN); > - for (i =3D 0; i < ETH_ALEN; i++) > - bssid[i] ^=3D sdata->dev->dev_addr[i]; > - bssid[0] &=3D ~0x01; > - bssid[0] |=3D 0x02; > -#endif > + if (sdata->u.sta.flags & IEEE80211_STA_BSSID_SET) { > + memcpy(bssid, ifsta->bssid, ETH_ALEN); > + } else { > + /* Generate random, not broadcast, locally administered BSSID. Mix= in > + * own MAC address to make sure that devices that do not have prop= er > + * random number generator get different BSSID. */ > + get_random_bytes(bssid, ETH_ALEN); > + for (i =3D 0; i < ETH_ALEN; i++) > + bssid[i] ^=3D sdata->dev->dev_addr[i]; > + bssid[0] &=3D ~0x01; > + bssid[0] |=3D 0x02; > + } > =20 > printk(KERN_DEBUG "%s: Creating new IBSS network, BSSID %pM\n", > sdata->dev->name, bssid); > @@ -2250,6 +2250,9 @@ > memcmp(ifsta->ssid, bss->ssid, bss->ssid_len) !=3D 0 > || !(bss->capability & WLAN_CAPABILITY_IBSS)) > continue; > + if ((ifsta->flags & IEEE80211_STA_BSSID_SET) && > + memcmp(ifsta->bssid, bss->bssid, ETH_ALEN) !=3D 0) > + continue; > #ifdef CONFIG_MAC80211_IBSS_DEBUG > printk(KERN_DEBUG " bssid=3D%pM found\n", bss->bssid); > #endif /* CONFIG_MAC80211_IBSS_DEBUG */ > @@ -2266,7 +2269,9 @@ > "%pM\n", bssid, ifsta->bssid); > #endif /* CONFIG_MAC80211_IBSS_DEBUG */ > =20 > - if (found && memcmp(ifsta->bssid, bssid, ETH_ALEN) !=3D 0) { > + if (found && > + ((!(ifsta->flags & IEEE80211_STA_PREV_BSSID_SET)) || > + memcmp(ifsta->bssid, bssid, ETH_ALEN) !=3D 0)) { > int ret; > int search_freq; > =20 > @@ -2604,16 +2609,16 @@ > memset(ifsta->ssid, 0, sizeof(ifsta->ssid)); > memcpy(ifsta->ssid, ssid, len); > ifsta->ssid_len =3D len; > - ifsta->flags &=3D ~IEEE80211_STA_PREV_BSSID_SET; > } > =20 > + ifsta->flags &=3D ~IEEE80211_STA_PREV_BSSID_SET; > + > if (len) > ifsta->flags |=3D IEEE80211_STA_SSID_SET; > else > ifsta->flags &=3D ~IEEE80211_STA_SSID_SET; > =20 > - if (sdata->vif.type =3D=3D NL80211_IFTYPE_ADHOC && > - !(ifsta->flags & IEEE80211_STA_BSSID_SET)) { > + if (sdata->vif.type =3D=3D NL80211_IFTYPE_ADHOC) { > ifsta->ibss_join_req =3D jiffies; > ifsta->state =3D IEEE80211_STA_MLME_IBSS_SEARCH; > return ieee80211_sta_find_ibss(sdata, ifsta); > @@ -2633,36 +2638,21 @@ > int ieee80211_sta_set_bssid(struct ieee80211_sub_if_data *sdata, u8 = *bssid) > { > struct ieee80211_if_sta *ifsta; > - int res; > - bool valid; > =20 > ifsta =3D &sdata->u.sta; > - valid =3D is_valid_ether_addr(bssid); > =20 > - if (memcmp(ifsta->bssid, bssid, ETH_ALEN) !=3D 0) { > - if(valid) > - memcpy(ifsta->bssid, bssid, ETH_ALEN); > - else > - memset(ifsta->bssid, 0, ETH_ALEN); > - res =3D 0; > - /* > - * Hack! See also ieee80211_sta_set_ssid. > - */ > - if (netif_running(sdata->dev)) > - res =3D ieee80211_if_config(sdata, IEEE80211_IFCC_BSSID); > - if (res) { > - printk(KERN_DEBUG "%s: Failed to config new BSSID to " > - "the low-level driver\n", sdata->dev->name); > - return res; > - } > - } > - > - if (valid) > + if (is_valid_ether_addr(bssid)) { > + memcpy(ifsta->bssid, bssid, ETH_ALEN); > ifsta->flags |=3D IEEE80211_STA_BSSID_SET; > - else > + } else { > + memset(ifsta->bssid, 0, ETH_ALEN); > ifsta->flags &=3D ~IEEE80211_STA_BSSID_SET; > + } > =20 > - return 0; > + if (netif_running(sdata->dev)) > + ieee80211_if_config(sdata, IEEE80211_IFCC_BSSID); > + > + return ieee80211_sta_set_ssid(sdata, ifsta->ssid, ifsta->ssid_len); > } > =20 > int ieee80211_sta_set_extra_ie(struct ieee80211_sub_if_data *sdata, = char *ie, size_t len) --=20 Intel Open Source Technology Centre http://oss.intel.com/ -- To unsubscribe from this list: send the line "unsubscribe linux-wireles= s" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Regression caused by commit e32b1b9a33759e8a83ac566c4c43f23ed5d6343b 2009-01-23 12:29 ` Samuel Ortiz @ 2009-01-23 23:16 ` Alina Friedrichsen 0 siblings, 0 replies; 15+ messages in thread From: Alina Friedrichsen @ 2009-01-23 23:16 UTC (permalink / raw) To: kalle.valo, maximlevitsky, linux-wireless, linville, Larry.Finger Hi Samuel! > I dont think we should ignore the if_config() return value. I can write a warning in the kernel log, to help the low-level driver d= evelopers to debug this problem, but I don't want to stop the new mergi= ng process, so that the driver hangs in a mostly undefined state. > Is the 4965 error code sent when trying to set a fixed BSSID in IBSS = ? > I dont see it in STA mode, when associating to my AP. I unfortunately don't know the error code, because I don't have the car= d, but I think if the setting of the BSSID fails here, I should work in= the new initiated normal joining process, even in broken low-level dri= vers. Regards Alina --=20 Psssst! Schon vom neuen GMX MultiMessenger geh=F6rt? Der kann`s mit all= en: http://www.gmx.net/de/go/multimessenger -- To unsubscribe from this list: send the line "unsubscribe linux-wireles= s" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Regression caused by commit e32b1b9a33759e8a83ac566c4c43f23ed5d6343b 2009-01-23 7:13 ` Alina Friedrichsen 2009-01-23 9:56 ` Sedat Dilek 2009-01-23 12:29 ` Samuel Ortiz @ 2009-01-23 16:33 ` Larry Finger 2009-01-23 20:18 ` Sedat Dilek 2 siblings, 1 reply; 15+ messages in thread From: Larry Finger @ 2009-01-23 16:33 UTC (permalink / raw) To: Alina Friedrichsen Cc: linville, linux-wireless, maximlevitsky, kalle.valo, samuel I saw some mention of a V4 of this patch in other mails but V3 fixes the problem for me. Larry ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Regression caused by commit e32b1b9a33759e8a83ac566c4c43f23ed5d6343b 2009-01-23 16:33 ` Larry Finger @ 2009-01-23 20:18 ` Sedat Dilek 0 siblings, 0 replies; 15+ messages in thread From: Sedat Dilek @ 2009-01-23 20:18 UTC (permalink / raw) To: Larry Finger Cc: Alina Friedrichsen, linville, linux-wireless, maximlevitsky, kalle.valo, samuel Sorry for the confusion, it's "mac80211-Fixed-BSSID-handling-revisited-v3.patch" (not v4, see [1]). And as I mentioned before - it works for me, too. I requested to Alina to send a separate email incl. this new v3 patch. Hope this will stop confusing. Don't know if Samuels complains about if_config()/STA mode for iwl4965 [2] were clarified in the meantime. -SD [1] http://marc.info/?l=linux-wireless&m=123270461025225&w=2 [2] http://marc.info/?l=linux-wireless&m=123271402006665&w=2 On Fri, Jan 23, 2009 at 5:33 PM, Larry Finger <Larry.Finger@lwfinger.net> wrote: > I saw some mention of a V4 of this patch in other mails but V3 fixes > the problem for me. > > Larry > > -- > To unsubscribe from this list: send the line "unsubscribe linux-wireless" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Regression caused by commit e32b1b9a33759e8a83ac566c4c43f23ed5d6343b 2009-01-23 2:08 Regression caused by commit e32b1b9a33759e8a83ac566c4c43f23ed5d6343b Larry Finger 2009-01-23 2:14 ` John W. Linville @ 2009-01-23 5:17 ` Hin-Tak Leung 2009-01-23 5:40 ` Alina Friedrichsen 2009-01-23 15:47 ` Michael Buesch 2 siblings, 1 reply; 15+ messages in thread From: Hin-Tak Leung @ 2009-01-23 5:17 UTC (permalink / raw) To: Larry Finger Cc: Alina Friedrichsen, John Linville, samuel, Kalle Valo, maximlevitsky, wireless On Fri, Jan 23, 2009 at 2:08 AM, Larry Finger <Larry.Finger@lwfinger.net> wrote: > With the commit of the subject, my b43 and p54usb devices stopped working. They could > associate and authenticate with my WPA2 network, but never finish the DHCP connection and > get an IP address. Surprisingly, my rtl8187 devices continued to work. I don't want to do a "me too", but my rtl8187B broke yesterday after upgrading to wireless-testing/compat-wireless head, and it worked again today. There are only two patches between yesterday and today and one of them is John's revert, so it is possible that the rtl8187B is also affected. The symptom is as you said, I can associate and authenticate, but dhcp won't finish and wpa_suplicant ifdown the device. I tried that a few times and restarting NM, modprobe -r/-v, etc. In the end it was easier just to blow away the compat-wireless update redirectory and revert back to the vendor-shipped kernel modules - and hope that it is just a transient problem and the problem would go away when I git fetch next time :-). ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Regression caused by commit e32b1b9a33759e8a83ac566c4c43f23ed5d6343b 2009-01-23 5:17 ` Hin-Tak Leung @ 2009-01-23 5:40 ` Alina Friedrichsen 0 siblings, 0 replies; 15+ messages in thread From: Alina Friedrichsen @ 2009-01-23 5:40 UTC (permalink / raw) To: Hin-Tak Leung, Larry.Finger Cc: linux-wireless, maximlevitsky, kalle.valo, samuel, linville Hello! > I don't want to do a "me too", but my rtl8187B broke yesterday after > upgrading to wireless-testing/compat-wireless head, > and it worked again today. There are only two patches between > yesterday and today and one of them is John's revert, so it is > possible that the rtl8187B is also affected. >=20 > The symptom is as you said, I can associate and authenticate, but dhc= p > won't finish and wpa_suplicant ifdown the device. > I tried that a few times and restarting NM, modprobe -r/-v, etc. In > the end it was easier just to blow away the compat-wireless update > redirectory and revert back to the vendor-shipped kernel modules - an= d > hope that it is just a transient problem and the problem would go awa= y > when I git fetch next time :-). I unfortunately can't reproduce the problem with my b43 und my other ca= rds work fine, too. But I think the problem is that the NetworkManager = does the following: (And causes with it some low level drivers and wifi= cards into trouble.) [99554.112921] wlan0: Set SSID [99554.113853] wlan0: Set BSSID [99554.113861] wlan0: Set SSID [99554.115084] wlan0: Set BSSID [99554.115091] wlan0: Set SSID Have you test it manual with the NetworkManager disabled? Regards Alina --=20 Psssst! Schon vom neuen GMX MultiMessenger geh=F6rt? Der kann`s mit all= en: http://www.gmx.net/de/go/multimessenger -- To unsubscribe from this list: send the line "unsubscribe linux-wireles= s" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Regression caused by commit e32b1b9a33759e8a83ac566c4c43f23ed5d6343b 2009-01-23 2:08 Regression caused by commit e32b1b9a33759e8a83ac566c4c43f23ed5d6343b Larry Finger 2009-01-23 2:14 ` John W. Linville 2009-01-23 5:17 ` Hin-Tak Leung @ 2009-01-23 15:47 ` Michael Buesch 2009-01-23 15:49 ` John W. Linville 2 siblings, 1 reply; 15+ messages in thread From: Michael Buesch @ 2009-01-23 15:47 UTC (permalink / raw) To: Larry Finger Cc: Alina Friedrichsen, John Linville, samuel, Kalle Valo, maximlevitsky, wireless On Friday 23 January 2009 03:08:31 Larry Finger wrote: > With the commit of the subject, my b43 and p54usb devices stopped working. They could > associate and authenticate with my WPA2 network, but never finish the DHCP connection and > get an IP address. Surprisingly, my rtl8187 devices continued to work. > > Please excuse the second sending of this. I missed wireless the first time. Do you have a diff of this commit? Or at least the date it was committed? I have some strange AP mode issue and it might be related to this. I just want to verify. -- Greetings, Michael. ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Regression caused by commit e32b1b9a33759e8a83ac566c4c43f23ed5d6343b 2009-01-23 15:47 ` Michael Buesch @ 2009-01-23 15:49 ` John W. Linville 2009-01-23 16:03 ` Michael Buesch 0 siblings, 1 reply; 15+ messages in thread From: John W. Linville @ 2009-01-23 15:49 UTC (permalink / raw) To: Michael Buesch Cc: Larry Finger, Alina Friedrichsen, samuel, Kalle Valo, maximlevitsky, wireless On Fri, Jan 23, 2009 at 04:47:50PM +0100, Michael Buesch wrote: > On Friday 23 January 2009 03:08:31 Larry Finger wrote: > > With the commit of the subject, my b43 and p54usb devices stopped working. They could > > associate and authenticate with my WPA2 network, but never finish the DHCP connection and > > get an IP address. Surprisingly, my rtl8187 devices continued to work. > > > > Please excuse the second sending of this. I missed wireless the first time. > > Do you have a diff of this commit? Or at least the date it was committed? > I have some strange AP mode issue and it might be related to this. I just want to verify. That commit ID should still be available in wireless-testing -- git show e32b1b9a33759e8a83ac566c4c43f23ed5d6343b Hth! 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] 15+ messages in thread
* Re: Regression caused by commit e32b1b9a33759e8a83ac566c4c43f23ed5d6343b 2009-01-23 15:49 ` John W. Linville @ 2009-01-23 16:03 ` Michael Buesch 0 siblings, 0 replies; 15+ messages in thread From: Michael Buesch @ 2009-01-23 16:03 UTC (permalink / raw) To: John W. Linville Cc: Larry Finger, Alina Friedrichsen, samuel, Kalle Valo, maximlevitsky, wireless On Friday 23 January 2009 16:49:18 John W. Linville wrote: > On Fri, Jan 23, 2009 at 04:47:50PM +0100, Michael Buesch wrote: > > On Friday 23 January 2009 03:08:31 Larry Finger wrote: > > > With the commit of the subject, my b43 and p54usb devices stopped working. They could > > > associate and authenticate with my WPA2 network, but never finish the DHCP connection and > > > get an IP address. Surprisingly, my rtl8187 devices continued to work. > > > > > > Please excuse the second sending of this. I missed wireless the first time. > > > > Do you have a diff of this commit? Or at least the date it was committed? > > I have some strange AP mode issue and it might be related to this. I just want to verify. > > That commit ID should still be available in wireless-testing -- > git show e32b1b9a33759e8a83ac566c4c43f23ed5d6343b Oh ok. I thought you just took it out and rebased. Thanks :) -- Greetings, Michael. ^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2009-01-23 23:16 UTC | newest] Thread overview: 15+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-01-23 2:08 Regression caused by commit e32b1b9a33759e8a83ac566c4c43f23ed5d6343b Larry Finger 2009-01-23 2:14 ` John W. Linville 2009-01-23 2:21 ` Alina Friedrichsen 2009-01-23 5:32 ` Larry Finger 2009-01-23 7:13 ` Alina Friedrichsen 2009-01-23 9:56 ` Sedat Dilek 2009-01-23 12:29 ` Samuel Ortiz 2009-01-23 23:16 ` Alina Friedrichsen 2009-01-23 16:33 ` Larry Finger 2009-01-23 20:18 ` Sedat Dilek 2009-01-23 5:17 ` Hin-Tak Leung 2009-01-23 5:40 ` Alina Friedrichsen 2009-01-23 15:47 ` Michael Buesch 2009-01-23 15:49 ` John W. Linville 2009-01-23 16:03 ` Michael Buesch
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).