From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
To: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Cc: Ping-Ke Shih <pkshih@realtek.com>, Luka Gejak <luka.gejak@linux.dev>
Subject: [PATCH rtw-next v2 3/3] wifi: rtw88: 8723b: Read the chip variant from efuse
Date: Tue, 20 Oct 2026 23:53:23 +0300 [thread overview]
Message-ID: <a551ce83-278b-4844-98c5-95e0ada3596a@gmail.com> (raw)
In-Reply-To: <8e47daa4-538d-4e0a-84f9-fd4e91613ff8@gmail.com>
The RTL8703AS appears to be a variant of RTL8723BS which doesn't support
40 MHz channel width, so read the chip variant from efuse and disable
support for 40 MHz.
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
---
v2:
- Split into a separate patch.
- Get the byte from the efuse physical map stored in RAM instead of
reading it again from the chip.
- Use macros for the address, mask, and chip variants.
---
drivers/net/wireless/realtek/rtw88/rtw8723b.c | 13 +++++++++++++
drivers/net/wireless/realtek/rtw88/rtw8723b.h | 3 +++
2 files changed, 16 insertions(+)
diff --git a/drivers/net/wireless/realtek/rtw88/rtw8723b.c b/drivers/net/wireless/realtek/rtw88/rtw8723b.c
index f550c8708e01..48102baf66fc 100644
--- a/drivers/net/wireless/realtek/rtw88/rtw8723b.c
+++ b/drivers/net/wireless/realtek/rtw88/rtw8723b.c
@@ -2376,6 +2376,18 @@ static void rtw8723b_read_package_type(struct rtw_dev *rtwdev, u8 *phy_map)
}
}
+static void rtw8723b_read_chip_variant(struct rtw_dev *rtwdev, u8 *phy_map)
+{
+ u8 val_1fb, variant;
+
+ val_1fb = phy_map[RTW8723B_EFUSE_PACKAGE_TYPE];
+ variant = u8_get_bits(val_1fb, RTW8723B_VARIANT_MASK);
+
+ if (rtw_hci_type(rtwdev) == RTW_HCI_TYPE_SDIO &&
+ variant == RTW8723B_VARIANT_8703AS)
+ rtwdev->efuse.hw_cap.bw &= ~BIT(RTW_CHANNEL_WIDTH_40);
+}
+
static int rtw8723b_read_efuse(struct rtw_dev *rtwdev, u8 *log_map, u8 *phy_map)
{
struct rtw_efuse *efuse = &rtwdev->efuse;
@@ -2402,6 +2414,7 @@ static int rtw8723b_read_efuse(struct rtw_dev *rtwdev, u8 *log_map, u8 *phy_map)
BIT(RTW_CHANNEL_WIDTH_40);
rtw8723b_read_package_type(rtwdev, phy_map);
+ rtw8723b_read_chip_variant(rtwdev, phy_map);
return 0;
}
diff --git a/drivers/net/wireless/realtek/rtw88/rtw8723b.h b/drivers/net/wireless/realtek/rtw88/rtw8723b.h
index f1eaf7ab2a81..39b92ec5153b 100644
--- a/drivers/net/wireless/realtek/rtw88/rtw8723b.h
+++ b/drivers/net/wireless/realtek/rtw88/rtw8723b.h
@@ -19,6 +19,9 @@ enum rtw8723b_package_type {
#define RTW8723B_EFUSE_PACKAGE_TYPE 0x1fb
#define RTW8723B_PACKAGE_TYPE_MASK GENMASK(2, 0)
+#define RTW8723B_VARIANT_MASK GENMASK(5, 4)
+#define RTW8723B_VARIANT_8723BS 0x3
+#define RTW8723B_VARIANT_8703AS 0x2
extern const struct rtw_chip_info rtw8723b_hw_spec;
--
2.55.0
next prev parent reply other threads:[~2026-10-20 20:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-20 20:50 [PATCH rtw-next v2 1/3] wifi: rtw88: Pass the physical map to the read_efuse chip op Bitterblue Smith
2026-10-20 20:51 ` [PATCH rtw-next v2 2/3] wifi: rtw88: 8723b: Read the package type from efuse Bitterblue Smith
2026-10-21 3:42 ` Ping-Ke Shih
2026-10-21 4:41 ` Luka Gejak
2026-10-20 20:53 ` Bitterblue Smith [this message]
2026-10-21 3:45 ` [PATCH rtw-next v2 3/3] wifi: rtw88: 8723b: Read the chip variant " Ping-Ke Shih
2026-10-21 4:42 ` Luka Gejak
2026-10-21 3:39 ` [PATCH rtw-next v2 1/3] wifi: rtw88: Pass the physical map to the read_efuse chip op Ping-Ke Shih
2026-10-21 4:41 ` Luka Gejak
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=a551ce83-278b-4844-98c5-95e0ada3596a@gmail.com \
--to=rtl8821cerfe2@gmail.com \
--cc=linux-wireless@vger.kernel.org \
--cc=luka.gejak@linux.dev \
--cc=pkshih@realtek.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