From: Johannes Berg Date: Wed, 31 Jan 2024 15:48:56 +0000 (+0100) Subject: wifi: mac80211: fix waiting for beacons logic X-Git-Tag: v6.6.17~81 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=733031cd485c93e5f91ce94caf4b53efac15b0fd;p=platform%2Fkernel%2Flinux-rpi.git wifi: mac80211: fix waiting for beacons logic [ Upstream commit a0b4f2291319c5d47ecb196b90400814fdcfd126 ] 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 Signed-off-by: Sasha Levin --- diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 73f8df0..d9e716f 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -7727,8 +7727,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?