RE: [PATCH rtw-next 2/3] wifi: rtlwifi: convert pci ID if-statement to table
From: Ping-Ke Shih
Date: Sun Jun 14 2026 - 21:37:28 EST
William Hansen-Baird <william.hansen.baird@xxxxxxxxx> wrote:
[...]
> --- a/drivers/net/wireless/realtek/rtlwifi/pci.c
> +++ b/drivers/net/wireless/realtek/rtlwifi/pci.c
> @@ -31,6 +31,11 @@ static const u8 ac_to_hwq[] = {
> BK_QUEUE
> };
>
> +static const struct pci_device_id rtl8723be_aspm_quirks[] = {
> + { PCI_DEVICE_SUB(PCI_ANY_ID, PCI_ANY_ID, 0x11ad, 0x1723) },
Why not filling VID/PID explicitly? As there is only one listed in
rtl8723be_pci_ids[].
{RTL_PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0xB723, ...)},
> + { 0 }
> +};
> +
> static u8 _rtl_mac_to_hwqueue(struct ieee80211_hw *hw, struct sk_buff *skb)
> {
> struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
> @@ -327,14 +332,12 @@ static void rtl_pci_init_aspm(struct ieee80211_hw *hw)
>
> _rtl_pci_update_default_setting(hw);
>
> - /* RTL8723BE found on some ASUSTek laptops, such as F441U and
> - * X555UQ with subsystem ID 11ad:1723 are known to output large
> + /* RTL8723BE with certain subsytem IDs are known to output large
> * amounts of PCIe AER errors during and after boot up, causing
> * heavy lags, poor network throughput, and occasional lock-ups.
> */
> if (rtlpriv->rtlhal.hw_type == HARDWARE_TYPE_RTL8723BE &&
With above opinion, here just check pci_match_id(), no need to check RTL8723BE.
> - (rtlpci->pdev->subsystem_vendor == 0x11ad &&
> - rtlpci->pdev->subsystem_device == 0x1723)) {
> + pci_match_id(rtl8723be_aspm_quirks, rtlpci->pdev)) {
> rtl_pci_disable_aspm(hw);
> ppsc->support_aspm = false;
> }
> --
> 2.54.0