]> git.infradead.org Git - nvme.git/commitdiff
wifi: mac80211: fix waiting for beacons logic
authorJohannes Berg <johannes.berg@intel.com>
Wed, 31 Jan 2024 15:48:56 +0000 (16:48 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 2 Feb 2024 12:11:28 +0000 (13:11 +0100)
This should be waiting if we don't have a beacon yet,
but somehow I managed to invert the logic. Fix that.

Fixes: 74e1309acedc ("wifi: mac80211: mlme: look up beacon elems only if needed")
Link: https://msgid.link/20240131164856.922701229546.I239b379e7cee04608e73c016b737a5245e5b23dd@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/mlme.c

index f1cdd2df323e79d3cebbbc4522bb4d716544390f..12f67871af698b20eaf0a15d35ad58b661e91a88 100644 (file)
@@ -8046,8 +8046,7 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata,
 
                rcu_read_lock();
                beacon_ies = rcu_dereference(req->bss->beacon_ies);
-
-               if (beacon_ies) {
+               if (!beacon_ies) {
                        /*
                         * Wait up to one beacon interval ...
                         * should this be more if we miss one?