From: Alina Friedrichsen Date: Thu, 29 Jan 2009 08:59:43 +0000 (+0100) Subject: mac80211: Creating new IBSS with fixed BSSID X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c0415b547d37e8065ad4adf289d11db2f3b16dfd;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git mac80211: Creating new IBSS with fixed BSSID This fixes a bug when creating a new IBSS network with a fixed BSSID. The fixed BSSID situation is now with one of my last patches handled in ieee80211_sta_find_ibss() function. It's more robust to test against (ifsta->flags & IEEE80211_STA_PREV_BSSID_SET), because ifsta->state is not seted right in every situation and so the creating of the new IBSS network sometimes hangs after the first try to scan for a network to merge. Signed-off-by: Alina Friedrichsen Signed-off-by: John W. Linville --- diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index a8755df0cf74..0ece151659c0 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -2722,9 +2722,8 @@ void ieee80211_mlme_notify_scan_completed(struct ieee80211_local *local) if (sdata && sdata->vif.type == NL80211_IFTYPE_ADHOC) { ifsta = &sdata->u.sta; - if (!(ifsta->flags & IEEE80211_STA_BSSID_SET) || - (!(ifsta->state == IEEE80211_STA_MLME_IBSS_JOINED) && - !ieee80211_sta_active_ibss(sdata))) + if ((!(ifsta->flags & IEEE80211_STA_PREV_BSSID_SET)) || + !ieee80211_sta_active_ibss(sdata)) ieee80211_sta_find_ibss(sdata, ifsta); }