From patchwork Mon Dec 9 10:28:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Cavallari X-Patchwork-Id: 11278997 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 31E6F930 for ; Mon, 9 Dec 2019 10:28:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0FED7207FD for ; Mon, 9 Dec 2019 10:28:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727476AbfLIK2y (ORCPT ); Mon, 9 Dec 2019 05:28:54 -0500 Received: from mout.kundenserver.de ([212.227.17.13]:38603 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727359AbfLIK2x (ORCPT ); Mon, 9 Dec 2019 05:28:53 -0500 Received: from evilbit.green-communications.fr ([92.154.77.116]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.184]) with ESMTPSA (Nemesis) id 1MMoT4-1iLdTB0m6G-00Ii7g; Mon, 09 Dec 2019 11:28:49 +0100 From: Nicolas Cavallari To: =?utf-8?q?Krzysztof_Ha=C5=82asa?= , Johannes Berg Cc: linux-wireless@vger.kernel.org, Kalle Valo Subject: [RFC PATCH v1 3/4] mwifiex: Do not allow deleting station in IBSS mode. Date: Mon, 9 Dec 2019 11:28:08 +0100 Message-Id: <20191209102808.12014-4-nicolas.cavallari@green-communications.fr> X-Mailer: git-send-email 2.24.0 In-Reply-To: References: MIME-Version: 1.0 X-Provags-ID: V03:K1:WtLVDy6lCBGKrcXQRP5BsZitH8ttNG6uNOaehXYGA394tggpcHi U+2R57f4fT1/Sq86ECjvsSXnkXuMIfb9WmV1yKxgDhpour1KX0IBPNbu9cN5zeyFhn7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+pdG8pjhKUjyjF7YMxZBtADukQetTx//jPXxDSGZLT50/6 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org 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 --- 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);