From: Rosen Penev <rosenp@gmail.com>
To: linux-wireless@vger.kernel.org
Cc: "Rafał Miłecki" <zajec5@gmail.com>,
"John W. Linville" <linville@tuxdriver.com>,
b43-dev@lists.infradead.org (open list:B43 WIRELESS DRIVER),
linux-kernel@vger.kernel.org (open list)
Subject: [PATCH wireless] wifi: b43: HT-PHY: read 32-bit table entries low half first
Date: Thu, 22 Oct 2026 12:26:13 -0700 [thread overview]
Message-ID: <20261022192613.3329978-1-rosenp@gmail.com> (raw)
From: Erik Conijn <egc112@msn.com>
The PHY latches a 32-bit table entry on the access to the low data
register, as b43's N-PHY table code and Broadcom's wlc_phy_read_table
assume. The HT-PHY code read the high half first and got the stale high
half of the previous access: TX gain table entry 0x1a/0xc0 0x10f90040
read back as 0x10190040, so b43_phy_ht_tx_power_fix() programmed a
corrupted radio gain word.
Fixes: 1a9313923718 ("b43: HT-PHY: prepare place for HT-PHY tables")
Signed-off-by: Erik Conijn <egc112@msn.com>
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
drivers/net/wireless/broadcom/b43/tables_phy_ht.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/net/wireless/broadcom/b43/tables_phy_ht.c b/drivers/net/wireless/broadcom/b43/tables_phy_ht.c
index 1acf2df66e5e..a6db39c644e3 100644
--- a/drivers/net/wireless/broadcom/b43/tables_phy_ht.c
+++ b/drivers/net/wireless/broadcom/b43/tables_phy_ht.c
@@ -622,9 +622,9 @@ u32 b43_httab_read(struct b43_wldev *dev, u32 offset)
break;
case B43_HTTAB_32BIT:
b43_phy_write(dev, B43_PHY_HT_TABLE_ADDR, offset);
- value = b43_phy_read(dev, B43_PHY_HT_TABLE_DATAHI);
- value <<= 16;
- value |= b43_phy_read(dev, B43_PHY_HT_TABLE_DATALO);
+ /* the low half latches the entry: read it first */
+ value = b43_phy_read(dev, B43_PHY_HT_TABLE_DATALO);
+ value |= b43_phy_read(dev, B43_PHY_HT_TABLE_DATAHI) << 16;
break;
default:
B43_WARN_ON(1);
@@ -658,9 +658,8 @@ void b43_httab_read_bulk(struct b43_wldev *dev, u32 offset,
data += 2;
break;
case B43_HTTAB_32BIT:
- *((u32 *)data) = b43_phy_read(dev, B43_PHY_HT_TABLE_DATAHI);
- *((u32 *)data) <<= 16;
- *((u32 *)data) |= b43_phy_read(dev, B43_PHY_HT_TABLE_DATALO);
+ *((u32 *)data) = b43_phy_read(dev, B43_PHY_HT_TABLE_DATALO);
+ *((u32 *)data) |= b43_phy_read(dev, B43_PHY_HT_TABLE_DATAHI) << 16;
data += 4;
break;
default:
--
2.56.0
reply other threads:[~2026-10-22 19:26 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=20261022192613.3329978-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®