Re: [PATCH rtw-next 2/3] wifi: rtlwifi: convert pci ID if-statement to table

From: Uwe Kleine-König

Date: Wed Jun 17 2026 - 04:27:04 EST


On Sun, Jun 14, 2026 at 03:55:07PM +0200, William Hansen-Baird wrote:
> Refactor the ASUSTek quirk logic from an if-statement to a standard
> pci_device_id table. This allows future devices with the same quirk
> to be added more easily and avoiding a large if-chain.
>
> Signed-off-by: William Hansen-Baird <william.hansen.baird@xxxxxxxxx>
> ---
> drivers/net/wireless/realtek/rtlwifi/pci.c | 11 +++++++----
> 1 file changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/wireless/realtek/rtlwifi/pci.c b/drivers/net/wireless/realtek/rtlwifi/pci.c
> index 4ef1faf649e9..03b743809258 100644
> --- 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) },
> + { 0 }

I recently reworked many pci_device_id arrays and en passant made the
terminator an empty initializer with a single space (i.e. `{ }`).

If you resend, adapting to that style would be nice.

Best regards
Uwe

Attachment: signature.asc
Description: PGP signature