Skip to contentSkip to conversation

wifi: b43: write the HT-PHY TX power estimates as 16-bit entries

PATCH New Rosen Penev 1 participant 1 message Oct 18 B43 wireless driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 wifi: b43: write the HT-PHY TX power estimates as 16-bit entries

b43_phy_ht_tx_power_ctl_setup() computes the 64 power estimates per core in a u32 array and writes them with b43_httab_write_bulk() as 16-bit entries, which reads the array as u16. Each table then holds the low half of an estimate in every even entry and its high half, 0, in every odd one, and only the first 32 estimates are written. The hardware TX power control maps half of the TSSI readings to a power of 0 and raises the TX gain towards its maximum.

The wl driver writes the same 64 entries of tables 26-28 as 16-bit values, which match the ones b43 computes. Use a u16 array.

Fixes 5949e0406041 ("b43: HT-PHY: setup TX power control")
---
 drivers/net/wireless/broadcom/b43/phy_ht.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/broadcom/b43/phy_ht.c +1 -1
index fab8399c64f7..b63e7734db6f 100644
@@ -714,7 +714,7 @@ static void b43_phy_ht_tx_power_ctl_setup(struct b43_wldev *dev)
 
 	for (c = 0; c < 3; c++) {
 		s32 num, den, pwr;
-		u32 regval[64];
+		u16 regval[64];
 
 		for (i = 0; i < 64; i++) {
 			num = 8 * (16 * b0[c] + b1[c] * i);
Signature · 1 line
2.56.0