brcmsmac: handle non pci in ai_deviceremoved()
authorHauke Mehrtens <hauke@hauke-m.de>
Sun, 29 Apr 2012 00:50:43 +0000 (02:50 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 16 May 2012 16:45:26 +0000 (12:45 -0400)
This is based on code from the Broadcom SDK.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/brcm80211/brcmsmac/aiutils.c

index dd4698df6dad614d452d4a303c77eacfdb3e71ad..6d8b7213643aa320dbb05edc026a4510620ef747 100644 (file)
@@ -816,6 +816,9 @@ bool ai_deviceremoved(struct si_pub *sih)
 
        sii = (struct si_info *)sih;
 
+       if (sii->icbus->hosttype != BCMA_HOSTTYPE_PCI)
+               return false;
+
        pci_read_config_dword(sii->pcibus, PCI_VENDOR_ID, &w);
        if ((w & 0xFFFF) != PCI_VENDOR_ID_BROADCOM)
                return true;