Message ID | 20240924011325.1509103-1-greearb@candelatech.com (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Johannes Berg |
Headers | show |
Series | wifi: mac80211: Fix setting txpower with emulate_chanctx | expand |
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 842d3023c9c7..7e2aaae8398d 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -3102,6 +3102,7 @@ static int ieee80211_set_tx_power(struct wiphy *wiphy, enum nl80211_tx_power_setting txp_type = type; bool update_txp_type = false; bool has_monitor = false; + int old_power = local->user_power_level; lockdep_assert_wiphy(local->hw.wiphy); @@ -3184,6 +3185,10 @@ static int ieee80211_set_tx_power(struct wiphy *wiphy, } } + if (local->emulate_chanctx && + (old_power != local->user_power_level)) + ieee80211_hw_conf_chan(local); + return 0; }