diff mbox series

[2/2] rtw88: 8821ce: Disable PCIe ASPM L1 for 8821CE using chip ID

Message ID 20220407075123.420696-3-honyuenkwun@gmail.com
State New
Headers show
Series rtw88: 8821ce: add support for device ID 0xb821 | expand

Commit Message

Jimmy Hon April 7, 2022, 7:51 a.m. UTC
Make workaround work for other 8821CE devices with different PCI ID

Signed-off-by: Jimmy Hon <honyuenkwun@gmail.com>
---
 drivers/net/wireless/realtek/rtw88/pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ping-Ke Shih April 7, 2022, 9:35 a.m. UTC | #1
On Thu, 2022-04-07 at 02:51 -0500, Jimmy Hon wrote:
> Make workaround work for other 8821CE devices with different PCI ID
> 
> Signed-off-by: Jimmy Hon <honyuenkwun@gmail.com>

Reviewed-by: Ping-Ke Shih <pkshih@realtek.com>

> ---
>  drivers/net/wireless/realtek/rtw88/pci.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/wireless/realtek/rtw88/pci.c b/drivers/net/wireless/realtek/rtw88/pci.c
> index a0991d3f15c0..0edb5711b546 100644
> --- a/drivers/net/wireless/realtek/rtw88/pci.c
> +++ b/drivers/net/wireless/realtek/rtw88/pci.c
> @@ -1770,7 +1770,7 @@ int rtw_pci_probe(struct pci_dev *pdev,
>  	}
>  
>  	/* Disable PCIe ASPM L1 while doing NAPI poll for 8821CE */
> -	if (pdev->device == 0xc821 && bridge->vendor == PCI_VENDOR_ID_INTEL)
> +	if (rtwdev->chip->id == RTW_CHIP_TYPE_8821C && bridge->vendor == PCI_VENDOR_ID_INTEL)
>  		rtwpci->rx_no_aspm = true;
>  
>  	rtw_pci_phy_cfg(rtwdev);
diff mbox series

Patch

diff --git a/drivers/net/wireless/realtek/rtw88/pci.c b/drivers/net/wireless/realtek/rtw88/pci.c
index a0991d3f15c0..0edb5711b546 100644
--- a/drivers/net/wireless/realtek/rtw88/pci.c
+++ b/drivers/net/wireless/realtek/rtw88/pci.c
@@ -1770,7 +1770,7 @@  int rtw_pci_probe(struct pci_dev *pdev,
 	}
 
 	/* Disable PCIe ASPM L1 while doing NAPI poll for 8821CE */
-	if (pdev->device == 0xc821 && bridge->vendor == PCI_VENDOR_ID_INTEL)
+	if (rtwdev->chip->id == RTW_CHIP_TYPE_8821C && bridge->vendor == PCI_VENDOR_ID_INTEL)
 		rtwpci->rx_no_aspm = true;
 
 	rtw_pci_phy_cfg(rtwdev);