Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp18451108ybl; Fri, 3 Jan 2020 02:37:12 -0800 (PST) X-Google-Smtp-Source: APXvYqy5mtmD4vmLYCNBkUVjXGds2/xJN+NB3amQQVVypN0Uy9dWCxGN1u4X6bPkHk0jhmCK05BI X-Received: by 2002:a05:6830:1bda:: with SMTP id v26mr94244411ota.314.1578047832155; Fri, 03 Jan 2020 02:37:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578047832; cv=none; d=google.com; s=arc-20160816; b=AuONrJht+CDPUZJvSXLnjn9IRqvVU/D7NBYClacs9zwjs5oDlQOUAv6yCbPSr4EMqU S6sooA281/3i2XEZ7s9PvMbLFaViNEXecJi2O3jfrTr+5g/mjaROZYuzgA//B0raSzCZ nKtQN4jemzyBF59cQVEmRSLzHJ9nJhGI3VGH5wwE9FxFkvEq78igs9Y9B2FBs9+iVlcW aoQdK3ejl9qeIe+ywPWFtPB7jhyaoDTBFJ52Bf8OuL5PuaFrCsggqh3RgM6qLkA2lG5o kJIPQwXgJfLLud6NxOwhLb2UbQyujiDfFSUhCSopNySLodF8RsnlVnFO6qL7CquDlYqh Oiig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=30aVw6THL5C8kdb3e7ezS0Y+et/oJP6/VpO1jk712iY=; b=AQ8JH5y5CRJBBWOQRWD6C1jM2BP54EeMwlzq+af3HodwtwZi+C0mIvZjQPNph4/ptm q3y2VGB2guhiS4MBJjC81azhiXqxWESW/N+vmAqOIuFPapKeFlnEazJ+QS7mZ+aHyKft +gihJsaJ5zbSqbenuwQY1F1nk7Ze0fuymsIjQBSI5429Q0omUs46FXNwy/qHMeKry0VI 3GBY3Ph4DpfH84Ym/eCcLh4LtR/7uDCG5XfPCeRBhA2+u5I+ct2tFHkJbWZffdqyFEGd txTeSiZ2Vu8B/L7tiKPpVVZQJijLsEBz1qpNcOTXtkU8gM60X3ZA7qWraQaLEqf10PGs UZYw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w1si27885229oia.169.2020.01.03.02.37.02; Fri, 03 Jan 2020 02:37:12 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727462AbgACKfu (ORCPT + 99 others); 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=20Ha=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 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:hqoj2+HquQp6sR66zV8sfHprA+JFQ6c11uohl/K7RM9OazH1QsS ongj8hE6LrKNI7JjMGcVW89PWwSyKBqqVfe4jp+YLzjTcFoFLL9N95Mxl8Qi6OsECO9adzk zWUZfSVbb+mpLDSv9bgvEaffoTC70niVj94k4VHWJTuV8SSMp9mJyBkvSNu9Ah9/ky9jt/I Ro9SUmlnwLuqSK+vbY1oA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:jXTC2dIqgQ4=:S3q+UgbBcw4GqpNVmUGugL vvZRc9lWU1vZpVNScBMQXlIOFzQldBuBazA/VPSod5aMfKJY6RWTbncj/OFSOQdyfA1HFsvoD VosMexXzcp2ZfYikmyglrxGPqxTQnc9MLzvAjG8ZxPe4Qrgk+R2D2Zya8zi7OojnLKkQ5nyYf qW8mnxOp5Ix0vn/y2yEpRi2AnlHXRu3wn+GACqa+xtJQacI8t3Pd4Udcdudz+gS9UPjjWQM9V 5uXn8QrOu00OmBrwH4pgQuGjOJsCwy8ECSnN/4z+cDKCjd/EGiyV9u1p4d9PgJKzJOxWqmBrG uOu0bjUYagmP/sKSWut9BwIpy0UCwA5C1t1dvrulThseSI24zklqWzPNiWuFt89KEsUawlKFE CpUAxq9HfW5ZDNVehd2oMZah4QPjGmyqo+dro1W3nA/l37+3ijm2ez/73vT+Zt5R/P7G4LDTz MV12UYcAul4Xuxm5derNib3sm69VxSnz0Ghpo54KfXc6IIJAO5A15w4nDWMwjcy6qmXnCi248 fMWx2mnZAM6gs40bJZmgdXfNWp2jGCy0lzcj35FXcHNn+trkEoLieiLo2klMtZhCWhzBKIL3Q xtvO15XUNlslEob4VTVG5t70WBlCqFI7xKlVMeHYa6QGCiOSWLWiyygBStPMrDuobmhFtxBc9 5A5atEjeYloggNBmJD6KdBBeHTV1vzTUOJC99YW/DPemuRFuP3pet1F0Idh7cX3HNjfrObuXk vWkuAL9O0v4d80xTGoxVwrliKhZmHkIT9rPYAgxKt4ySwC+1JYtyszzYleFpvJyu5tr5Irnpm BRkNp2i1gXxU7alVs/ooK1gPQ5fM6qCNoJRl7XWdMdI8i1rzzr3HXGDYpGteTRiYgZH4BTk7b 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 -- 2.25.0.rc0