From patchwork Fri Jan 3 10:34:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Cavallari X-Patchwork-Id: 11316761 X-Patchwork-Delegate: johannes@sipsolutions.net 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 E1E83138D for ; Fri, 3 Jan 2020 10:35:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C0008222C3 for ; Fri, 3 Jan 2020 10:35:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727489AbgACKfu (ORCPT ); Fri, 3 Jan 2020 05:35:50 -0500 Received: from mout.kundenserver.de ([212.227.126.134]:46503 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727350AbgACKft (ORCPT ); Fri, 3 Jan 2020 05:35:49 -0500 Received: from evilbit.green-communications.fr ([92.154.77.116]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.168]) with ESMTPSA (Nemesis) id 1M277h-1ikqGh3VVZ-002XHv; Fri, 03 Jan 2020 11:35:46 +0100 From: Nicolas Cavallari To: Johannes Berg Cc: linux-wireless@vger.kernel.org, =?utf-8?q?Krzysztof_Ha=C5=82asa?= Subject: [PATCH v2 2/2] mac80211: Allow deleting stations in ibss mode to reset their state. Date: Fri, 3 Jan 2020 11:34:57 +0100 Message-Id: <20200103103457.22778-3-nicolas.cavallari@green-communications.fr> X-Mailer: git-send-email 2.25.0.rc0 In-Reply-To: <20200103103457.22778-1-nicolas.cavallari@green-communications.fr> References: <20200103103457.22778-1-nicolas.cavallari@green-communications.fr> MIME-Version: 1.0 X-Provags-ID: V03:K1:hqoj2+HquQp6sR66zV8sfHprA+JFQ6c11uohl/K7RM9OazH1QsS ongj8hE6LrKNI7Jj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3HXGDYpGteTRiYgZH4BTk7b XQAlU+PBQkMbXVFN+E99R6hvezk3Xo/2euX6Iod+S1FZzBSD8X1kkF9yX3+ljT Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Set the NL80211_EXT_FEATURE_DEL_IBSS_STA if the interface support IBSS mode, so that stations can be resetted from user space. mac80211 already deletes stations by itself, so mac80211 drivers must already support this. This has been successfuly tested with ath9k. Signed-off-by: Nicolas Cavallari --- net/mac80211/main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/net/mac80211/main.c b/net/mac80211/main.c index 4c2b5ba3ac09..02f36590c01d 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c @@ -1065,6 +1065,10 @@ int ieee80211_register_hw(struct ieee80211_hw *hw) NL80211_EXT_FEATURE_EXT_KEY_ID); } + if (local->hw.wiphy->interface_modes & BIT(NL80211_IFTYPE_ADHOC)) + wiphy_ext_feature_set(local->hw.wiphy, + NL80211_EXT_FEATURE_DEL_IBSS_STA); + /* * Calculate scan IE length -- we need this to alloc * memory and to subtract from the driver limit. It