* [PATCH] wifi: mac80211: Fix setting txpower with emulate_chanctx
@ 2024-09-24 1:13 greearb
0 siblings, 0 replies; only message in thread
From: greearb @ 2024-09-24 1:13 UTC (permalink / raw)
To: linux-wireless; +Cc: Ben Greear
From: Ben Greear <greearb@candelatech.com>
Propagate hw conf into the driver when txpower changes
and driver is emulating channel contexts.
Signed-off-by: Ben Greear <greearb@candelatech.com>
---
net/mac80211/cfg.c | 5 +++++
1 file changed, 5 insertions(+)
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;
}
--
2.42.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2024-09-24 1:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-24 1:13 [PATCH] wifi: mac80211: Fix setting txpower with emulate_chanctx greearb
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).