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 1/4] ath6kl: Do not allow deleting station in IBSS mode.
Date: Mon,  9 Dec 2019 11:28:06 +0100	[thread overview]
Message-ID: <20191209102808.12014-2-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/ath/ath6kl/cfg80211.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c
index 37cf602d8adf..c894b9756605 100644
--- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
@@ -2993,6 +2993,9 @@ static int ath6kl_del_station(struct wiphy *wiphy, struct net_device *dev,
 	struct ath6kl *ar = ath6kl_priv(dev);
 	struct ath6kl_vif *vif = netdev_priv(dev);
 	const u8 *addr = params->mac ? params->mac : bcast_addr;
+	if (vif->wdev.iftype != NL80211_IFTYPE_AP &&
+	    vif->wdev.iftype != NL80211_IFTYPE_P2P_GO)
+		return -ENOTSUPP;
 
 	return ath6kl_wmi_ap_set_mlme(ar->wmi, vif->fw_vif_idx, WMI_AP_DEAUTH,
 				      addr, WLAN_REASON_PREV_AUTH_NOT_VALID);
-- 
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 ` Nicolas Cavallari [this message]
2019-12-09 10:28 ` [RFC PATCH v1 2/4] brcmfmac: Do not allow deleting station in IBSS mode Nicolas Cavallari
2019-12-09 10:28 ` [RFC PATCH v1 3/4] mwifiex: " Nicolas Cavallari
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-2-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).