Skip to content

Commit 34d4e3e

Browse files
committed
wifi: cfg80211: remove links only on AP
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>
1 parent 15846f9 commit 34d4e3e

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

net/wireless/util.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Copyright 2007-2009 Johannes Berg <johannes@sipsolutions.net>
66
* Copyright 2013-2014 Intel Mobile Communications GmbH
77
* Copyright 2017 Intel Deutschland GmbH
8-
* Copyright (C) 2018-2022 Intel Corporation
8+
* Copyright (C) 2018-2023 Intel Corporation
99
*/
1010
#include <linux/export.h>
1111
#include <linux/bitops.h>
@@ -2558,6 +2558,13 @@ void cfg80211_remove_links(struct wireless_dev *wdev)
25582558
{
25592559
unsigned int link_id;
25602560

2561+
/*
2562+
* links are controlled by upper layers (userspace/cfg)
2563+
* only for AP mode, so only remove them here for AP
2564+
*/
2565+
if (wdev->iftype != NL80211_IFTYPE_AP)
2566+
return;
2567+
25612568
wdev_lock(wdev);
25622569
if (wdev->valid_links) {
25632570
for_each_valid_link(wdev, link_id)

0 commit comments

Comments
 (0)