mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Johannes Berg <johannes.berg@intel.com>,
	Gregory Greenman <gregory.greenman@intel.com>,
	Sasha Levin <sashal@kernel.org>,
	johannes@sipsolutions.net, davem@davemloft.net,
	edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
	linux-wireless@vger.kernel.org, netdev@vger.kernel.org
Subject: [PATCH AUTOSEL 6.3 01/16] wifi: cfg80211: remove links only on AP
Date: Mon, 26 Jun 2023 17:49:41 -0400	[thread overview]
Message-ID: <20230626214956.178942-1-sashal@kernel.org> (raw)

From: Johannes Berg <johannes.berg@intel.com>

[ Upstream commit 34d4e3eb67fed9c19719bedb748e5a8b6ccc97a5 ]

Since links are only controlled by userspace via cfg80211
in AP mode, also only remove them from the driver in that
case.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20230608163202.ed65b94916fa.I2458c46888284cc5ce30715fe642bc5fc4340c8f@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 net/wireless/util.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/net/wireless/util.c b/net/wireless/util.c
index d1a89e82ead08..4053d65d0218b 100644
--- a/net/wireless/util.c
+++ b/net/wireless/util.c
@@ -5,7 +5,7 @@
  * Copyright 2007-2009	Johannes Berg <johannes@sipsolutions.net>
  * Copyright 2013-2014  Intel Mobile Communications GmbH
  * Copyright 2017	Intel Deutschland GmbH
- * Copyright (C) 2018-2022 Intel Corporation
+ * Copyright (C) 2018-2023 Intel Corporation
  */
 #include <linux/export.h>
 #include <linux/bitops.h>
@@ -2548,6 +2548,13 @@ void cfg80211_remove_links(struct wireless_dev *wdev)
 {
 	unsigned int link_id;
 
+	/*
+	 * links are controlled by upper layers (userspace/cfg)
+	 * only for AP mode, so only remove them here for AP
+	 */
+	if (wdev->iftype != NL80211_IFTYPE_AP)
+		return;
+
 	wdev_lock(wdev);
 	if (wdev->valid_links) {
 		for_each_valid_link(wdev, link_id)
-- 
2.39.2


             reply	other threads:[~2023-06-26 21:50 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-26 21:49 Sasha Levin [this message]
2023-06-26 21:49 ` [PATCH AUTOSEL 6.3 02/16] wifi: mac80211: Use active_links instead of valid_links in Tx Sasha Levin
2023-06-26 21:49 ` [PATCH AUTOSEL 6.3 03/16] netlabel: fix shift wrapping bug in netlbl_catmap_setlong() Sasha Levin
2023-06-26 21:49 ` [PATCH AUTOSEL 6.3 04/16] bnx2x: fix page fault following EEH recovery Sasha Levin
2023-06-26 21:49 ` [PATCH AUTOSEL 6.3 05/16] smb/client: print "Unknown" instead of bogus link speed value Sasha Levin
2023-06-26 21:49 ` [PATCH AUTOSEL 6.3 06/16] cifs: fix sockaddr comparison in iface_cmp Sasha Levin
2023-06-26 21:49 ` [PATCH AUTOSEL 6.3 07/16] cifs: fix max_credits implementation Sasha Levin
2023-06-26 21:49 ` [PATCH AUTOSEL 6.3 08/16] sctp: handle invalid error codes without calling BUG() Sasha Levin
2023-06-26 21:49 ` [PATCH AUTOSEL 6.3 09/16] cifs: add a warning when the in-flight count goes negative Sasha Levin
2023-06-26 21:49 ` [PATCH AUTOSEL 6.3 10/16] scsi: aacraid: Reply queue mapping to CPUs based on IRQ affinity Sasha Levin
2023-06-26 21:49 ` [PATCH AUTOSEL 6.3 11/16] scsi: storvsc: Always set no_report_opcodes Sasha Levin
2023-06-26 21:49 ` [PATCH AUTOSEL 6.3 12/16] scsi: lpfc: Fix incorrect big endian type assignment in bsg loopback path Sasha Levin
2023-06-26 21:49 ` [PATCH AUTOSEL 6.3 13/16] LoongArch: Let pmd_present() return true when splitting pmd Sasha Levin
2023-06-26 21:49 ` [PATCH AUTOSEL 6.3 14/16] LoongArch: Fix the write_fcsr() macro Sasha Levin
2023-06-26 21:49 ` [PATCH AUTOSEL 6.3 15/16] LoongArch: Avoid uninitialized alignment_mask Sasha Levin
2023-06-26 21:49 ` [PATCH AUTOSEL 6.3 16/16] ALSA: seq: oss: Fix racy open/close of MIDI devices Sasha Levin

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=20230626214956.178942-1-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gregory.greenman@intel.com \
    --cc=johannes.berg@intel.com \
    --cc=johannes@sipsolutions.net \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=stable@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

all inboxes | Powered by JetHome®