linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nicolas Cavallari <nicolas.cavallari@green-communications.fr>
To: "Krzysztof Hałasa" <khalasa@piap.pl>,
	"Johannes Berg" <johannes@sipsolutions.net>
Cc: linux-wireless@vger.kernel.org, Kalle Valo <kvalo@codeaurora.org>
Subject: [RFC PATCH v1 3/4] mwifiex: Do not allow deleting station in IBSS mode.
Date: Mon,  9 Dec 2019 11:28:08 +0100	[thread overview]
Message-ID: <20191209102808.12014-4-nicolas.cavallari@green-communications.fr> (raw)
In-Reply-To: <m34l02mh71.fsf@t19.piap.pl>

In preparation of allowing userspace to explicitly reset station state
in IBSS mode, reject attempts to delete stations in IBSS mode with error
ENOTSUPP.

Signed-off-by: Nicolas Cavallari <nicolas.cavallari@green-communications.fr>
--
I do not know if the driver could possibly support this, so take the
safe route and reject it.
---
 drivers/net/wireless/marvell/mwifiex/cfg80211.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/wireless/marvell/mwifiex/cfg80211.c b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
index d89684168500..9135fc6d5a70 100644
--- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c
+++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
@@ -1828,6 +1828,10 @@ mwifiex_cfg80211_del_station(struct wiphy *wiphy, struct net_device *dev,
 	struct mwifiex_sta_node *sta_node;
 	u8 deauth_mac[ETH_ALEN];
 
+	if (priv->bss_mode != NL80211_IFTYPE_AP &&
+	    priv->bss_mode != NL80211_IFTYPE_P2P_GO)
+		return -ENOTSUPP;
+
 	if (!priv->bss_started && priv->wdev.cac_started) {
 		mwifiex_dbg(priv->adapter, INFO, "%s: abort CAC!\n", __func__);
 		mwifiex_abort_cac(priv);
-- 
2.24.0


  parent reply	other threads:[~2019-12-09 10:28 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-21 12:11 802.11n IBSS: wlan0 stops receiving packets due to aggregation after sender reboot Krzysztof Hałasa
2019-10-21 12:18 ` [PATCH] " Krzysztof Hałasa
2019-10-22  9:42   ` Sergei Shtylyov
2019-10-21 12:18 ` Krzysztof Hałasa
2019-10-25 10:21 ` [PATCH v2] " Krzysztof Hałasa
2019-10-28 12:21   ` Johannes Berg
2019-10-29  8:41     ` Koen Vandeputte
2019-10-29  8:58       ` Sebastian Gottschall
2019-10-29  9:40         ` Koen Vandeputte
2019-10-29  9:03       ` Johannes Berg
2019-10-29  9:47         ` Koen Vandeputte
2019-10-29  8:54     ` Krzysztof Hałasa
2019-10-29  9:07       ` Johannes Berg
2019-10-29 10:51         ` Krzysztof Hałasa
2019-10-29 10:57           ` Johannes Berg
2019-12-09 10:28 ` [RFC] Allow userspace to reset IBSS stations to fix aggregation issue Nicolas Cavallari
2019-12-11  6:58   ` Krzysztof Hałasa
2019-12-11 10:31     ` Nicolas Cavallari
2019-12-09 10:28 ` [RFC PATCH v1 1/4] ath6kl: Do not allow deleting station in IBSS mode Nicolas Cavallari
2019-12-09 10:28 ` [RFC PATCH v1 2/4] brcmfmac: " Nicolas Cavallari
2019-12-09 10:28 ` Nicolas Cavallari [this message]
2019-12-09 10:28 ` [RFC PATCH v1 4/4] nl80211: Allow deleting stations in ibss mode to reset their state Nicolas Cavallari
2019-12-11 21:32   ` Johannes Berg
2019-12-12  9:56     ` Nicolas Cavallari

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=20191209102808.12014-4-nicolas.cavallari@green-communications.fr \
    --to=nicolas.cavallari@green-communications.fr \
    --cc=johannes@sipsolutions.net \
    --cc=khalasa@piap.pl \
    --cc=kvalo@codeaurora.org \
    --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).