Skip to content

Commit fa7ccfb

Browse files
lwfingerlinvjw
authored andcommitted
rtlwifi: rtl8192se: Handle duplicate PCI ID 0x10ec:0x8192 conflict with r8192e_pci
There are two devices with PCI ID 0x10ec:0x8192, namely RTL8192E and RTL8192SE. The method of distinguishing them is by the revision ID at offset 0x8 of the PCI configuration space. If the value is 0x10, then the device uses rtl8192se for a driver. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
1 parent 40fad6b commit fa7ccfb

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

  • drivers/net/wireless/rtlwifi

‎drivers/net/wireless/rtlwifi/pci.c‎

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1624,6 +1624,16 @@ static bool _rtl_pci_find_adapter(struct pci_dev *pdev,
16241624
pci_read_config_byte(pdev, 0x8, &revisionid);
16251625
pci_read_config_word(pdev, 0x3C, &irqline);
16261626

1627+
/* PCI ID 0x10ec:0x8192 occurs for both RTL8192E, which uses
1628+
* r8192e_pci, and RTL8192SE, which uses this driver. If the
1629+
* revision ID is RTL_PCI_REVISION_ID_8192PCIE (0x01), then
1630+
* the correct driver is r8192e_pci, thus this routine should
1631+
* return false.
1632+
*/
1633+
if (deviceid == RTL_PCI_8192SE_DID &&
1634+
revisionid == RTL_PCI_REVISION_ID_8192PCIE)
1635+
return false;
1636+
16271637
if (deviceid == RTL_PCI_8192_DID ||
16281638
deviceid == RTL_PCI_0044_DID ||
16291639
deviceid == RTL_PCI_0047_DID ||
@@ -1856,7 +1866,8 @@ int __devinit rtl_pci_probe(struct pci_dev *pdev,
18561866
pci_write_config_byte(pdev, 0x04, 0x07);
18571867

18581868
/* find adapter */
1859-
_rtl_pci_find_adapter(pdev, hw);
1869+
if (!_rtl_pci_find_adapter(pdev, hw))
1870+
goto fail3;
18601871

18611872
/* Init IO handler */
18621873
_rtl_pci_io_handler_init(&pdev->dev, hw);

0 commit comments

Comments
 (0)