blob: 1bb036dafcb7efb5ec6259021711c40ce4f7f977 [file] [log] [blame]
From 65e5845ce53a6060cb3201a7dcae96b57eb2ea45 Mon Sep 17 00:00:00 2001
From: Shayne Chen <shayne.chen@mediatek.com>
Date: Mon, 29 Jan 2024 18:37:15 +0800
Subject: [PATCH 45/61] mtk: mac80211: fix ieee80211_probe_client warning
Only get chanctx for non-mld VIF.
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
---
net/mac80211/cfg.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 0cb68fb..6e3b28e 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -4211,11 +4211,13 @@ static int ieee80211_probe_client(struct wiphy *wiphy, struct net_device *dev,
qos = sta->sta.wme;
chanctx_conf = rcu_dereference(sdata->vif.bss_conf.chanctx_conf);
- if (WARN_ON(!chanctx_conf)) {
- ret = -EINVAL;
- goto unlock;
+ if (!ieee80211_vif_is_mld(&sdata->vif)) {
+ if (WARN_ON(!chanctx_conf)) {
+ ret = -EINVAL;
+ goto unlock;
+ }
}
- band = chanctx_conf->def.chan->band;
+ band = chanctx_conf ? chanctx_conf->def.chan->band : 0;
if (qos) {
fc = cpu_to_le16(IEEE80211_FTYPE_DATA |
--
2.18.0