linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Crispin <john@phrozen.org>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless@vger.kernel.org, John Crispin <john@phrozen.org>,
	Aloka Dixit <alokad@codeaurora.org>
Subject: [PATCH V4 4/4] mac80211: don't allow CSA on non-transmitting interfaces
Date: Fri,  9 Oct 2020 12:15:28 +0200	[thread overview]
Message-ID: <20201009101528.4780-5-john@phrozen.org> (raw)
In-Reply-To: <20201009101528.4780-1-john@phrozen.org>

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@codeaurora.org>
Signed-off-by: John Crispin <john@phrozen.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


      parent reply	other threads:[~2020-10-09 10:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-09 10:15 [PATCH V4 0/4] mac80211: add multiple bssid support John Crispin
2020-10-09 10:15 ` [PATCH V4 1/4] nl80211: add basic " John Crispin
2020-10-09 10:15 ` [PATCH V4 2/4] mac80211: add multiple bssid support to interface handling John Crispin
2020-10-09 10:15 ` [PATCH V4 3/4] mac80211: add multiple bssid/EMA support to beacon handling John Crispin
2020-10-09 10:15 ` John Crispin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201009101528.4780-5-john@phrozen.org \
    --to=john@phrozen.org \
    --cc=alokad@codeaurora.org \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).