diff options
author | Stanislav Fomichev <kernel@fomichev.me> | 2011-04-10 22:34:18 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-04-25 16:29:40 -0700 |
commit | d108b7a4ddef464f239e8b655494ae3c49239230 (patch) | |
tree | 4dbd63dbae19f155293609c106000abfe9c9eaba /drivers/staging/brcm80211/util | |
parent | 8fcf92d1cf85329d0efc029c65af3f92b2041bf2 (diff) | |
download | op-kernel-dev-d108b7a4ddef464f239e8b655494ae3c49239230.zip op-kernel-dev-d108b7a4ddef464f239e8b655494ae3c49239230.tar.gz |
brcm80211: use native PCI register offsets
Signed-off-by: Stanislav Fomichev <kernel@fomichev.me>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/brcm80211/util')
-rw-r--r-- | drivers/staging/brcm80211/util/nicpci.c | 6 | ||||
-rw-r--r-- | drivers/staging/brcm80211/util/siutils.c | 5 |
2 files changed, 6 insertions, 5 deletions
diff --git a/drivers/staging/brcm80211/util/nicpci.c b/drivers/staging/brcm80211/util/nicpci.c index a1fb2f0..d603452 100644 --- a/drivers/staging/brcm80211/util/nicpci.c +++ b/drivers/staging/brcm80211/util/nicpci.c @@ -130,16 +130,16 @@ pcicore_find_pci_capability(void *dev, u8 req_cap_id, u8 byte_val; /* check for Header type 0 */ - pci_read_config_byte(dev, PCI_CFG_HDR, &byte_val); + pci_read_config_byte(dev, PCI_HEADER_TYPE, &byte_val); if ((byte_val & 0x7f) != PCI_HEADER_NORMAL) goto end; /* check if the capability pointer field exists */ - pci_read_config_byte(dev, PCI_CFG_STAT, &byte_val); + pci_read_config_byte(dev, PCI_STATUS, &byte_val); if (!(byte_val & PCI_CAPPTR_PRESENT)) goto end; - pci_read_config_byte(dev, PCI_CFG_CAPPTR, &cap_ptr); + pci_read_config_byte(dev, PCI_CAPABILITY_LIST, &cap_ptr); /* check if the capability pointer is 0x00 */ if (cap_ptr == 0x00) goto end; diff --git a/drivers/staging/brcm80211/util/siutils.c b/drivers/staging/brcm80211/util/siutils.c index e88a7bb..29b6fa7 100644 --- a/drivers/staging/brcm80211/util/siutils.c +++ b/drivers/staging/brcm80211/util/siutils.c @@ -312,7 +312,8 @@ static __used void si_nvram_process(si_info_t *sii, char *pvars) switch (sii->pub.bustype) { case PCI_BUS: /* do a pci config read to get subsystem id and subvendor id */ - pci_read_config_dword(sii->pbus, PCI_CFG_SVID, &w); + pci_read_config_dword(sii->pbus, PCI_SUBSYSTEM_VENDOR_ID, + &w); /* Let nvram variables override subsystem Vend/ID */ sii->pub.boardvendor = (u16)si_getdevpathintvar(&sii->pub, "boardvendor"); @@ -1864,7 +1865,7 @@ bool si_deviceremoved(si_t *sih) switch (sih->bustype) { case PCI_BUS: ASSERT(sii->pbus != NULL); - pci_read_config_dword(sii->pbus, PCI_CFG_VID, &w); + pci_read_config_dword(sii->pbus, PCI_VENDOR_ID, &w); if ((w & 0xFFFF) != PCI_VENDOR_ID_BROADCOM) return true; break; |