summaryrefslogtreecommitdiffstats
path: root/net/wireless/util.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2023-06-19 12:03:51 +0200
committerJohannes Berg <johannes.berg@intel.com>2023-06-19 12:04:16 +0200
commitd5a17cfb9875a873474985f630b5061a4f2142b2 (patch)
tree14e6a9c9064c3a190ff25aa3af61316646acc36d /net/wireless/util.c
parentwifi: ray_cs: fix stringop-truncation GCC warning (diff)
parentwifi: iwlwifi: mvm: spin_lock_bh() to fix lockdep regression (diff)
downloadlinux-d5a17cfb9875a873474985f630b5061a4f2142b2.tar.xz
linux-d5a17cfb9875a873474985f630b5061a4f2142b2.zip
Merge wireless into wireless-next
There are some locking changes that will later otherwise cause conflicts, so merge wireless into wireless-next to avoid those. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/util.c')
-rw-r--r--net/wireless/util.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/net/wireless/util.c b/net/wireless/util.c
index 610a867c14f7..89c9ad6c886e 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>
@@ -2668,6 +2668,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)