Message ID | 20220404000107.11327-1-honyuenkwun@gmail.com (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Kalle Valo |
Headers | show |
Series | rtw88: 8821ce: add support for device ID 0xb821 | expand |
On Sun, 2022-04-03 at 19:01 -0500, Jimmy Hon wrote: > New device ID 0xb821 found on TP-Link T2E > Tested it with c821 driver. 2.4GHz and 5GHz works. > > PCI id: > 05:00.0 Network controller: Realtek Semiconductor Co., Ltd. Device b821 > Subsystem: Realtek Semiconductor Co., Ltd. Device b821 > > Signed-off-by: Jimmy Hon <honyuenkwun@gmail.com> > --- > drivers/net/wireless/realtek/rtw88/pci.c | 2 +- > drivers/net/wireless/realtek/rtw88/rtw8821ce.c | 4 ++++ > 2 files changed, 5 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/wireless/realtek/rtw88/pci.c b/drivers/net/wireless/realtek/rtw88/pci.c > index a0991d3f15c0..38ed5c35a2bd 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 ((pdev->device == 0xc821 || pdev->device == 0xc821) && bridge->vendor == > PCI_VENDOR_ID_INTEL) This statment is used to fix 0xc821 while doing NAPI poll. Actually, you didn't really fill the new ID 0xb821, but it still works. So, I don't think you need to add 0xb821 to this statement, right? If you really want to add 0xb821, use chip_id would be better. - if (pdev->device == 0xc821 && bridge->vendor == PCI_VENDOR_ID_INTEL) + if (rtwdev->chip->id == RTW_CHIP_TYPE_8821C && bridge->vendor == PCI_VENDOR_ID_INTEL) -- Ping-Ke
diff --git a/drivers/net/wireless/realtek/rtw88/pci.c b/drivers/net/wireless/realtek/rtw88/pci.c index a0991d3f15c0..38ed5c35a2bd 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 ((pdev->device == 0xc821 || pdev->device == 0xc821) && bridge->vendor == PCI_VENDOR_ID_INTEL) rtwpci->rx_no_aspm = true; rtw_pci_phy_cfg(rtwdev); diff --git a/drivers/net/wireless/realtek/rtw88/rtw8821ce.c b/drivers/net/wireless/realtek/rtw88/rtw8821ce.c index f34de115e4bc..56d22f9de904 100644 --- a/drivers/net/wireless/realtek/rtw88/rtw8821ce.c +++ b/drivers/net/wireless/realtek/rtw88/rtw8821ce.c @@ -8,6 +8,10 @@ #include "rtw8821ce.h" static const struct pci_device_id rtw_8821ce_id_table[] = { + { + PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0xB821), + .driver_data = (kernel_ulong_t)&rtw8821c_hw_spec + }, { PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0xC821), .driver_data = (kernel_ulong_t)&rtw8821c_hw_spec
New device ID 0xb821 found on TP-Link T2E Tested it with c821 driver. 2.4GHz and 5GHz works. PCI id: 05:00.0 Network controller: Realtek Semiconductor Co., Ltd. Device b821 Subsystem: Realtek Semiconductor Co., Ltd. Device b821 Signed-off-by: Jimmy Hon <honyuenkwun@gmail.com> --- drivers/net/wireless/realtek/rtw88/pci.c | 2 +- drivers/net/wireless/realtek/rtw88/rtw8821ce.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-)