mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-10 07:00:48 +00:00
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>
This commit is contained in:
parent
e6693eab35
commit
d419b9f0fa
@ -538,13 +538,12 @@ static void ieee80211_sta_find_ibss(struct ieee80211_sub_if_data *sdata)
|
||||
WLAN_CAPABILITY_PRIVACY,
|
||||
capability);
|
||||
|
||||
if (bss) {
|
||||
#ifdef CONFIG_MAC80211_IBSS_DEBUG
|
||||
if (bss)
|
||||
printk(KERN_DEBUG " sta_find_ibss: selected %pM current "
|
||||
"%pM\n", bss->cbss.bssid, ifibss->bssid);
|
||||
#endif /* CONFIG_MAC80211_IBSS_DEBUG */
|
||||
|
||||
if (bss && !memcmp(ifibss->bssid, bss->cbss.bssid, ETH_ALEN)) {
|
||||
printk(KERN_DEBUG "%s: Selected IBSS BSSID %pM"
|
||||
" based on configured SSID\n",
|
||||
sdata->dev->name, bss->cbss.bssid);
|
||||
@ -552,8 +551,7 @@ static void ieee80211_sta_find_ibss(struct ieee80211_sub_if_data *sdata)
|
||||
ieee80211_sta_join_ibss(sdata, bss);
|
||||
ieee80211_rx_bss_put(local, bss);
|
||||
return;
|
||||
} else if (bss)
|
||||
ieee80211_rx_bss_put(local, bss);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_MAC80211_IBSS_DEBUG
|
||||
printk(KERN_DEBUG " did not try to join ibss\n");
|
||||
|
Loading…
x
Reference in New Issue
Block a user