mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Rosen Penev <rosenp@gmail.com>
To: linux-wireless@vger.kernel.org
Cc: "John W. Linville" <linville@tuxdriver.com>,
	"Rafał Miłecki" <zajec5@gmail.com>,
	b43-dev@lists.infradead.org (open list:B43 WIRELESS DRIVER),
	linux-kernel@vger.kernel.org (open list)
Subject: [PATCH wireless] wifi: b43: write the HT-PHY TX power estimates as 16-bit entries
Date: Sun, 18 Oct 2026 13:10:29 -0700	[thread overview]
Message-ID: <20261018201029.50082-1-rosenp@gmail.com> (raw)

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


                 reply	other threads:[~2026-10-18 20:10 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261018201029.50082-1-rosenp@gmail.com \
    --to=rosenp@gmail.com \
    --cc=b43-dev@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=zajec5@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®