summaryrefslogtreecommitdiff
path: root/net/mac80211/debugfs_sta.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2023-08-28 14:59:31 +0300
committerJohannes Berg <johannes.berg@intel.com>2023-09-11 12:27:18 +0300
commite911a8192e29d7326e9062947ecd753c8572eb09 (patch)
tree01d20f7c9a211e8ebcb5fa55c0234d320f7ffb87 /net/mac80211/debugfs_sta.c
parent0ab6cba0696da4c6dff6e047ef8aa6c9c0fadf13 (diff)
downloadlinux-e911a8192e29d7326e9062947ecd753c8572eb09.tar.xz
wifi: mac80211: lock wiphy for aggregation debugfs
To change aggregation status may call into the driver, lock the wiphy for this. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/debugfs_sta.c')
-rw-r--r--net/mac80211/debugfs_sta.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/mac80211/debugfs_sta.c b/net/mac80211/debugfs_sta.c
index 5a97fb248c85..06e3613bf46b 100644
--- a/net/mac80211/debugfs_sta.c
+++ b/net/mac80211/debugfs_sta.c
@@ -5,7 +5,7 @@
* Copyright 2007 Johannes Berg <johannes@sipsolutions.net>
* Copyright 2013-2014 Intel Mobile Communications GmbH
* Copyright(c) 2016 Intel Deutschland GmbH
- * Copyright (C) 2018 - 2022 Intel Corporation
+ * Copyright (C) 2018 - 2023 Intel Corporation
*/
#include <linux/debugfs.h>
@@ -420,6 +420,7 @@ static ssize_t sta_agg_status_write(struct file *file, const char __user *userbu
if (ret || tid >= IEEE80211_NUM_TIDS)
return -EINVAL;
+ wiphy_lock(sta->local->hw.wiphy);
if (tx) {
if (start)
ret = ieee80211_start_tx_ba_session(&sta->sta, tid,
@@ -431,6 +432,7 @@ static ssize_t sta_agg_status_write(struct file *file, const char __user *userbu
3, true);
ret = 0;
}
+ wiphy_unlock(sta->local->hw.wiphy);
return ret ?: count;
}