aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2024-01-29 19:34:39 +0100
committerJohannes Berg <johannes.berg@intel.com>2024-02-08 12:58:38 +0100
commit9bf7079bc2271321fac467cae981c44e495b76b9 (patch)
treef7c21ec872ca5c29d0cf8805ce2fcafc1ecb0f19 /net/mac80211
parent0a44dfc070749514b804ccac0b1fd38718f7daa1 (diff)
downloadlinux-9bf7079bc2271321fac467cae981c44e495b76b9.tar.gz
wifi: mac80211: chan: chandef is non-NULL for reserved
The last caller of this with a NULL argument was related to the non-chanctx code, so we can now remove this odd logic. Reviewed-by: Miriam Rachel Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20240129194108.bad8ec1e76c8.I12287452f42c54baf75821e75491cf6d021af20a@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/chan.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/mac80211/chan.c b/net/mac80211/chan.c
index cf6297ffaef32..6b82c79cf7a6e 100644
--- a/net/mac80211/chan.c
+++ b/net/mac80211/chan.c
@@ -90,11 +90,11 @@ ieee80211_chanctx_reserved_chandef(struct ieee80211_local *local,
lockdep_assert_wiphy(local->hw.wiphy);
+ if (WARN_ON(!compat))
+ return NULL;
+
list_for_each_entry(link, &ctx->reserved_links,
reserved_chanctx_list) {
- if (!compat)
- compat = &link->reserved_chandef;
-
compat = cfg80211_chandef_compatible(&link->reserved_chandef,
compat);
if (!compat)