Skip to content

Commit 9b15c6c

Browse files
greearbjmberg-intel
authored andcommitted
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 <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Johannes Berg <[email protected]>
1 parent bfc0ed7 commit 9b15c6c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

net/mac80211/main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,8 @@ static u32 ieee80211_calc_hw_conf_chan(struct ieee80211_local *local,
167167
}
168168

169169
power = ieee80211_chandef_max_power(&chandef);
170+
if (local->user_power_level != IEEE80211_UNSET_POWER_LEVEL)
171+
power = min(local->user_power_level, power);
170172

171173
rcu_read_lock();
172174
list_for_each_entry_rcu(sdata, &local->interfaces, list) {

0 commit comments

Comments
 (0)