diff mbox series

wifi: mac80211: fix waiting for beacons logic

Message ID 20240131164856.922701229546.I239b379e7cee04608e73c016b737a5245e5b23dd@changeid
State New
Headers show
Series wifi: mac80211: fix waiting for beacons logic | expand

Commit Message

Johannes Berg Jan. 31, 2024, 3:48 p.m. UTC
From: Johannes Berg <johannes.berg@intel.com>

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")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 net/mac80211/mlme.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 0349e0ded1d8..dd97f402a624 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -8372,8 +8372,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?