Linux wireless drivers development
 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 V5 4/4] mac80211: don't allow CSA on non-transmitting interfaces
Date: Tue,  3 Nov 2020 10:17:43 +0100	[thread overview]
Message-ID: <20201103091743.1924854-5-john@phrozen.org> (raw)
In-Reply-To: <20201103091743.1924854-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 cfe38480a3fc..457a956bb637 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -3508,6 +3508,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-11-03  9:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-03  9:17 [PATCH V5 0/4] mac80211: add multiple bssid support John Crispin
2020-11-03  9:17 ` [PATCH V5 1/4] nl80211: add basic " John Crispin
2020-11-06  9:24   ` Johannes Berg
2020-11-06  9:26     ` Johannes Berg
2020-11-03  9:17 ` [PATCH V5 2/4] mac80211: add multiple bssid support to interface handling John Crispin
2020-11-03  9:17 ` [PATCH V5 3/4] mac80211: add multiple bssid/EMA support to beacon handling John Crispin
2020-11-06  9:31   ` Johannes Berg
2020-11-03  9:17 ` 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=20201103091743.1924854-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