* [PATCH wireless] wifi: b43: load the N-PHY SPROM power limits for the current band
@ 2026-10-15 21:54 Rosen Penev
0 siblings, 0 replies; only message in thread
From: Rosen Penev @ 2026-10-15 21:54 UTC (permalink / raw)
To: linux-wireless
Cc: John W. Linville, Rafał Miłecki,
open list:B43 WIRELESS DRIVER, open list
b43_nphy_op_recalc_txpower() always builds the per-rate power limits
from the 2.4 GHz SPROM entries (maxpwr_2g, ofdm2gpo, mcs2gpo), even on
5 GHz channels. The resulting maximum then overrides the per-band
target b43_nphy_tx_power_ctl_setup() reads from the SPROM, so 5 GHz
transmits aim at the 2.4 GHz limit.
Pick the SPROM band from the current channel, splitting 5 GHz the same
way b43_nphy_tx_power_ctl_setup() does.
Fixes: 8615eb2870f1 ("b43: N-PHY: support setting custom TX power")
Assisted-by: LLM
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
drivers/net/wireless/broadcom/b43/phy_n.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/broadcom/b43/phy_n.c b/drivers/net/wireless/broadcom/b43/phy_n.c
index 22359bd9db47..a8dc7c12a5a9 100644
--- a/drivers/net/wireless/broadcom/b43/phy_n.c
+++ b/drivers/net/wireless/broadcom/b43/phy_n.c
@@ -5833,6 +5833,7 @@ static enum b43_txpwr_result b43_nphy_op_recalc_txpower(struct b43_wldev *dev,
struct b43_phy_n *nphy = dev->phy.n;
struct ieee80211_channel *channel = dev->wl->hw->conf.chandef.chan;
struct b43_ppr *ppr = &nphy->tx_pwr_max_ppr;
+ enum b43_band band;
u8 max; /* qdBm */
if (nphy->tx_pwr_last_recalc_freq == channel->center_freq &&
@@ -5843,7 +5844,15 @@ static enum b43_txpwr_result b43_nphy_op_recalc_txpower(struct b43_wldev *dev,
b43_ppr_clear(dev, ppr);
/* HW limitations */
- b43_ppr_load_max_from_sprom(dev, ppr, B43_BAND_2G);
+ if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ)
+ band = B43_BAND_2G;
+ else if (channel->center_freq < 5100)
+ band = B43_BAND_5G_LO;
+ else if (channel->center_freq < 5500)
+ band = B43_BAND_5G_MI;
+ else
+ band = B43_BAND_5G_HI;
+ b43_ppr_load_max_from_sprom(dev, ppr, band);
/* Regulatory & user settings */
max = INT_TO_Q52(phy->chandef->chan->max_power);
--
2.56.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-15 21:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-15 21:54 [PATCH wireless] wifi: b43: load the N-PHY SPROM power limits for the current band Rosen Penev
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox