Commit 629ebb85 authored by Johannes Berg's avatar Johannes Berg

wifi: mac80211: debugfs: lock wiphy instead of RTNL

Since we no longer really use the RTNL, there's no point
in locking it here. Most drivers don't really need to
have any locks here anyway, and the rest are probably
completely broken, but it's a debugfs-only callback so
it really doesn't matter much.
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent e3640a82
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* *
* Copyright 2007 Johannes Berg <johannes@sipsolutions.net> * Copyright 2007 Johannes Berg <johannes@sipsolutions.net>
* Copyright 2013-2014 Intel Mobile Communications GmbH * Copyright 2013-2014 Intel Mobile Communications GmbH
* Copyright (C) 2018 - 2019, 2021-2022 Intel Corporation * Copyright (C) 2018 - 2019, 2021-2023 Intel Corporation
*/ */
#include <linux/debugfs.h> #include <linux/debugfs.h>
...@@ -594,9 +594,9 @@ static ssize_t format_devstat_counter(struct ieee80211_local *local, ...@@ -594,9 +594,9 @@ static ssize_t format_devstat_counter(struct ieee80211_local *local,
char buf[20]; char buf[20];
int res; int res;
rtnl_lock(); wiphy_lock(local->hw.wiphy);
res = drv_get_stats(local, &stats); res = drv_get_stats(local, &stats);
rtnl_unlock(); wiphy_unlock(local->hw.wiphy);
if (res) if (res)
return res; return res;
res = printvalue(&stats, buf, sizeof(buf)); res = printvalue(&stats, buf, sizeof(buf));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment