All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH wireless] wifi: b43: write the HT-PHY TX power estimates as 16-bit entries
@ 2026-10-18 20:10 ` Rosen Penev
  0 siblings, 0 replies; 2+ messages in thread
From: Rosen Penev @ 2026-10-18 20:10 UTC (permalink / raw)
  To: linux-wireless; +Cc: open list, John W. Linville, open list:B43 WIRELESS DRIVER

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")
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 drivers/net/wireless/broadcom/b43/phy_ht.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/broadcom/b43/phy_ht.c b/drivers/net/wireless/broadcom/b43/phy_ht.c
index fab8399c64f7..b63e7734db6f 100644
--- a/drivers/net/wireless/broadcom/b43/phy_ht.c
+++ b/drivers/net/wireless/broadcom/b43/phy_ht.c
@@ -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);
-- 
2.56.0


_______________________________________________
b43-dev mailing list
b43-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/b43-dev

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH wireless] wifi: b43: write the HT-PHY TX power estimates as 16-bit entries
@ 2026-10-18 20:10 ` Rosen Penev
  0 siblings, 0 replies; 2+ messages in thread
From: Rosen Penev @ 2026-10-18 20:10 UTC (permalink / raw)
  To: linux-wireless
  Cc: John W. Linville, Rafał Miłecki,
	open list:B43 WIRELESS DRIVER, open list

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")
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 drivers/net/wireless/broadcom/b43/phy_ht.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/broadcom/b43/phy_ht.c b/drivers/net/wireless/broadcom/b43/phy_ht.c
index fab8399c64f7..b63e7734db6f 100644
--- a/drivers/net/wireless/broadcom/b43/phy_ht.c
+++ b/drivers/net/wireless/broadcom/b43/phy_ht.c
@@ -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);
-- 
2.56.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-10-18 20:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-18 20:10 [PATCH wireless] wifi: b43: write the HT-PHY TX power estimates as 16-bit entries Rosen Penev
2026-10-18 20:10 ` Rosen Penev

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.