diff options
author | Johannes Berg <johannes.berg@intel.com> | 2023-08-28 14:00:01 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2023-09-11 11:27:22 +0200 |
commit | 4d3acf4311a0401e3e97c2f2302256cd9d7f5692 (patch) | |
tree | 6277e7906606c83ba38921acac8e66e66429512a /net/mac80211/debugfs.c | |
parent | wifi: mac80211: take wiphy lock for MAC addr change (diff) | |
download | linux-4d3acf4311a0401e3e97c2f2302256cd9d7f5692.tar.xz linux-4d3acf4311a0401e3e97c2f2302256cd9d7f5692.zip |
wifi: mac80211: remove sta_mtx
We now hold the wiphy mutex everywhere that we use or
needed the sta_mtx, so we don't need this mutex any
more. Remove it.
Most of this change was done automatically with spatch.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/debugfs.c')
-rw-r--r-- | net/mac80211/debugfs.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/mac80211/debugfs.c b/net/mac80211/debugfs.c index 2efc6ccbfcf6..b575ae90e57f 100644 --- a/net/mac80211/debugfs.c +++ b/net/mac80211/debugfs.c @@ -288,10 +288,10 @@ static ssize_t aql_txq_limit_write(struct file *file, q_limit_low_old = local->aql_txq_limit_low[ac]; q_limit_high_old = local->aql_txq_limit_high[ac]; + wiphy_lock(local->hw.wiphy); local->aql_txq_limit_low[ac] = q_limit_low; local->aql_txq_limit_high[ac] = q_limit_high; - mutex_lock(&local->sta_mtx); list_for_each_entry(sta, &local->sta_list, list) { /* If a sta has customized queue limits, keep it */ if (sta->airtime[ac].aql_limit_low == q_limit_low_old && @@ -300,7 +300,8 @@ static ssize_t aql_txq_limit_write(struct file *file, sta->airtime[ac].aql_limit_high = q_limit_high; } } - mutex_unlock(&local->sta_mtx); + wiphy_unlock(local->hw.wiphy); + return count; } |