summaryrefslogtreecommitdiffstats
path: root/net/mac80211/main.c
diff options
context:
space:
mode:
authorBen Greear <greearb@candelatech.com>2024-10-10 22:39:54 +0200
committerJohannes Berg <johannes.berg@intel.com>2024-10-25 17:53:38 +0200
commit9b15c6cf8d2e82c8427cd06f535d8de93b5b995c (patch)
tree1cde691d486a9740d0a4f342c5be43758036f493 /net/mac80211/main.c
parentRevert "wifi: iwlwifi: remove retry loops in start" (diff)
downloadlinux-9b15c6cf8d2e82c8427cd06f535d8de93b5b995c.tar.xz
linux-9b15c6cf8d2e82c8427cd06f535d8de93b5b995c.zip
mac80211: fix user-power when emulating chanctx
ieee80211_calc_hw_conf_chan was ignoring the configured user_txpower. If it is set, use it to potentially decrease txpower as requested. Signed-off-by: Ben Greear <greearb@candelatech.com> Link: https://patch.msgid.link/20241010203954.1219686-1-greearb@candelatech.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to '')
-rw-r--r--net/mac80211/main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index 89084690350f..ee1211a213d7 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -167,6 +167,8 @@ static u32 ieee80211_calc_hw_conf_chan(struct ieee80211_local *local,
}
power = ieee80211_chandef_max_power(&chandef);
+ if (local->user_power_level != IEEE80211_UNSET_POWER_LEVEL)
+ power = min(local->user_power_level, power);
rcu_read_lock();
list_for_each_entry_rcu(sdata, &local->interfaces, list) {