RE: [PATCH v2 01/11] wifi: rtw88: add the RTL8723B chip type and SDIO helper
From: Ping-Ke Shih
Date: Mon Jul 27 2026 - 03:18:19 EST
luka.gejak@xxxxxxxxx <luka.gejak@xxxxxxxxx> wrote:
> From: Luka Gejak <luka.gejak@xxxxxxxxx>
>
> The RTL8723B is a 802.11n combo chip whose SDIO variant, RTL8723BS, runs
> a Realtek vendor firmware that differs from the firmware used by the
> other rtw88 8723 family devices. Supporting it needs a number of small
> adjustments spread across the shared core, all of which have to be
> restricted to this one chip and bus combination.
>
> Add the chip type and a helper that tests for it, so the changes that
> follow can be gated without repeating the chip and bus comparison.
>
> Signed-off-by: Luka Gejak <luka.gejak@xxxxxxxxx>
> ---
> drivers/net/wireless/realtek/rtw88/main.h | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/net/wireless/realtek/rtw88/main.h b/drivers/net/wireless/realtek/rtw88/main.h
> index c6e981ba7986..8f86f7c12de5 100644
> --- a/drivers/net/wireless/realtek/rtw88/main.h
> +++ b/drivers/net/wireless/realtek/rtw88/main.h
> @@ -194,6 +194,7 @@ enum rtw_chip_type {
> RTW_CHIP_TYPE_8723D,
> RTW_CHIP_TYPE_8821C,
> RTW_CHIP_TYPE_8703B,
> + RTW_CHIP_TYPE_8723B,
> RTW_CHIP_TYPE_8821A,
> RTW_CHIP_TYPE_8812A,
> RTW_CHIP_TYPE_8814A,
> @@ -2194,6 +2195,12 @@ static inline bool rtw_chip_has_tx_stbc(struct rtw_dev *rtwdev)
> return rtwdev->chip->tx_stbc;
> }
>
> +static inline bool rtw_is_8723bs(struct rtw_dev *rtwdev)
As RTL8723B generation is very different from other chips, you need to add
this to deliver different flow. I'd think if we need a set of ops to make
code clearer.
> +{
> + return rtwdev->chip->id == RTW_CHIP_TYPE_8723B &&
> + rtwdev->hci.type == RTW_HCI_TYPE_SDIO;
> +}
> +
> static inline u8 rtw_acquire_macid(struct rtw_dev *rtwdev)
> {
> unsigned long mac_id;
> --
> 2.55.0