aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Greear <[email protected]>2024-09-23 18:13:25 -0700
committerJohannes Berg <[email protected]>2024-10-08 21:15:19 +0200
commit8dd0498983eef524a8d104eb8abb32ec4c595bec (patch)
treefd61f13b88c2dd718dc6a6670ec45a3c113f13e8
parentb3e046c31441d182b954fc2f57b2dc38c71ad4bc (diff)
wifi: mac80211: Fix setting txpower with emulate_chanctx
Propagate hw conf into the driver when txpower changes and driver is emulating channel contexts. Signed-off-by: Ben Greear <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Johannes Berg <[email protected]>
-rw-r--r--net/mac80211/cfg.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 847304a3a29a..7cefe763b772 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -3046,6 +3046,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);
@@ -3128,6 +3129,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;
}