[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201009101317.4657-5-john@phrozen.org>
Date: Fri, 9 Oct 2020 12:13:17 +0200
From: John Crispin <john@...ozen.org>
To: Johannes Berg <johannes@...solutions.net>
Cc: linux-kernel@...r.kernel.org, John Crispin <john@...ozen.org>,
Aloka Dixit <alokad@...eaurora.org>
Subject: [PATCH V4 4/4] mac80211: don't allow CSA on non-transmitting interfaces
As a non-transmitting interface does not broadcast a beacon, we do not want
to allow channel switch announcements. They need to be triggered on the
transmitting interface.
Signed-off-by: Aloka Dixit <alokad@...eaurora.org>
Signed-off-by: John Crispin <john@...ozen.org>
---
net/mac80211/cfg.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 11cecb2ed640..7693894c4f84 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -3504,6 +3504,9 @@ __ieee80211_channel_switch(struct wiphy *wiphy, struct net_device *dev,
if (sdata->vif.csa_active)
return -EBUSY;
+ if (sdata->vif.multiple_bssid.flags & IEEE80211_VIF_MBSS_NON_TRANSMITTING)
+ return -EINVAL;
+
mutex_lock(&local->chanctx_mtx);
conf = rcu_dereference_protected(sdata->vif.chanctx_conf,
lockdep_is_held(&local->chanctx_mtx));
--
2.25.1
Powered by blists - more mailing lists