From: Hauke Mehrtens Date: Sun, 29 Apr 2012 00:50:43 +0000 (+0200) Subject: brcmsmac: handle non pci in ai_deviceremoved() X-Git-Tag: v3.5-rc1~101^2~6^2^2~53 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=22291cea073d342109a527055dabcf7edef8fa7c;p=karo-tx-linux.git brcmsmac: handle non pci in ai_deviceremoved() This is based on code from the Broadcom SDK. Signed-off-by: Hauke Mehrtens Tested-by: Arend van Spriel Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/brcm80211/brcmsmac/aiutils.c b/drivers/net/wireless/brcm80211/brcmsmac/aiutils.c index dd4698df6dad..6d8b7213643a 100644 --- a/drivers/net/wireless/brcm80211/brcmsmac/aiutils.c +++ b/drivers/net/wireless/brcm80211/brcmsmac/aiutils.c @@ -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;