From patchwork Mon Dec 9 10:28:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Cavallari X-Patchwork-Id: 11279001 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 603486C1 for ; Mon, 9 Dec 2019 10:28:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3CDC0207FF for ; Mon, 9 Dec 2019 10:28:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727466AbfLIK2x (ORCPT ); Mon, 9 Dec 2019 05:28:53 -0500 Received: from mout.kundenserver.de ([217.72.192.75]:49049 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727143AbfLIK2x (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 1MXGzQ-1iETnT00pa-00YhTa; 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 2/4] brcmfmac: Do not allow deleting station in IBSS mode. Date: Mon, 9 Dec 2019 11:28:07 +0100 Message-Id: <20191209102808.12014-3-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:prXbdW76TtwtqcADBuYpY6/a331iqmlHWd9SZDw51+h9foZvEvo yIAw9xdMo3xDG2lTOT5JoPCZI276sWQTJfEG4g1n+Bv8QSUhpDdrdKiu/PMaSFe6tlEm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GnH4dPDd5TSssVxhJYNP5rPz2cU1m9GArbUdzpJQTyizffuaZir 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 EOPNOTSUPP. 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/broadcom/brcm80211/brcmfmac/cfg80211.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c index 5598bbd09b62..5436ffd74ecb 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c @@ -4848,6 +4848,8 @@ brcmf_cfg80211_del_station(struct wiphy *wiphy, struct net_device *ndev, if (!params->mac) return -EFAULT; + if (!brcmf_is_apmode(ifp->vif)) + return -EOPNOTSUPP; brcmf_dbg(TRACE, "Enter %pM\n", params->mac);