diff options
author | Reinette Chatre <reinette.chatre@intel.com> | 2009-10-19 17:55:37 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-10-27 16:29:46 -0400 |
commit | d419b9f0fa69e79ccba3e5e79a58a52ae0c2ed6a (patch) | |
tree | 9437f790f07c46a645b867871e81a71dc1058749 | |
parent | e6693eab351fc19809e76167cd18a6f028661e8a (diff) |
mac80211: fix ibss joining
Recent commit "mac80211: fix logic error ibss merge bssid check" fixed
joining of ibss cell when static bssid is provided. In this case
ifibss->bssid is set before the cell is joined and comparing that address
to a bss should thus always succeed. Unfortunately this change broke the
other case of joining a ibss cell without providing a static bssid where
the value of ifibss->bssid is not set before the cell is joined.
Since ifibss->bssid may be set before or after joining the cell we do not
learn anything by comparing it to a known bss. Remove this check.
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | net/mac80211/ibss.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c index 6eaf69823439..ca8ecce31d34 100644 --- a/net/mac80211/ibss.c +++ b/net/mac80211/ibss.c | |||
@@ -538,13 +538,12 @@ static void ieee80211_sta_find_ibss(struct ieee80211_sub_if_data *sdata) | |||
538 | WLAN_CAPABILITY_PRIVACY, | 538 | WLAN_CAPABILITY_PRIVACY, |
539 | capability); | 539 | capability); |
540 | 540 | ||
541 | if (bss) { | ||
541 | #ifdef CONFIG_MAC80211_IBSS_DEBUG | 542 | #ifdef CONFIG_MAC80211_IBSS_DEBUG |
542 | if (bss) | ||
543 | printk(KERN_DEBUG " sta_find_ibss: selected %pM current " | 543 | printk(KERN_DEBUG " sta_find_ibss: selected %pM current " |
544 | "%pM\n", bss->cbss.bssid, ifibss->bssid); | 544 | "%pM\n", bss->cbss.bssid, ifibss->bssid); |
545 | #endif /* CONFIG_MAC80211_IBSS_DEBUG */ | 545 | #endif /* CONFIG_MAC80211_IBSS_DEBUG */ |
546 | 546 | ||
547 | if (bss && !memcmp(ifibss->bssid, bss->cbss.bssid, ETH_ALEN)) { | ||
548 | printk(KERN_DEBUG "%s: Selected IBSS BSSID %pM" | 547 | printk(KERN_DEBUG "%s: Selected IBSS BSSID %pM" |
549 | " based on configured SSID\n", | 548 | " based on configured SSID\n", |
550 | sdata->dev->name, bss->cbss.bssid); | 549 | sdata->dev->name, bss->cbss.bssid); |
@@ -552,8 +551,7 @@ static void ieee80211_sta_find_ibss(struct ieee80211_sub_if_data *sdata) | |||
552 | ieee80211_sta_join_ibss(sdata, bss); | 551 | ieee80211_sta_join_ibss(sdata, bss); |
553 | ieee80211_rx_bss_put(local, bss); | 552 | ieee80211_rx_bss_put(local, bss); |
554 | return; | 553 | return; |
555 | } else if (bss) | 554 | } |
556 | ieee80211_rx_bss_put(local, bss); | ||
557 | 555 | ||
558 | #ifdef CONFIG_MAC80211_IBSS_DEBUG | 556 | #ifdef CONFIG_MAC80211_IBSS_DEBUG |
559 | printk(KERN_DEBUG " did not try to join ibss\n"); | 557 | printk(KERN_DEBUG " did not try to join ibss\n"); |