From 3bd8ef6799524fd48044a83aab38da57d9a98dbc Mon Sep 17 00:00:00 2001 From: Arend van Spriel Date: Mon, 15 Aug 2011 15:34:25 +0200 Subject: [PATCH] staging: brcm80211: restrict register access method for bcm47xx The driver contained conditional code for resolving issue with dma transaction reordering. This code was conditionalized using __mips__ macro, but it actually is specific to bcm47xx chips. This patch replaces it for the more speficic CONFIG_BCM47XX macro. Tested on BCM63281. Reviewed-by: Henry Ptasinski Reviewed-by: Roland Vossen Tested-by: Jonas Gorski Signed-off-by: Arend van Spriel Signed-off-by: Greg Kroah-Hartman --- drivers/staging/brcm80211/brcmsmac/phy/phy_cmn.c | 2 +- drivers/staging/brcm80211/brcmsmac/types.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/brcm80211/brcmsmac/phy/phy_cmn.c b/drivers/staging/brcm80211/brcmsmac/phy/phy_cmn.c index c00178d18b5a..448afae0d69e 100644 --- a/drivers/staging/brcm80211/brcmsmac/phy/phy_cmn.c +++ b/drivers/staging/brcm80211/brcmsmac/phy/phy_cmn.c @@ -380,7 +380,7 @@ void write_phy_reg(struct brcms_phy *pi, u16 addr, u16 val) regs = pi->regs; -#ifdef __mips__ +#ifdef CONFIG_BCM47XX W_REG_FLUSH(®s->phyregaddr, addr); W_REG(®s->phyregdata, val); if (addr == 0x72) diff --git a/drivers/staging/brcm80211/brcmsmac/types.h b/drivers/staging/brcm80211/brcmsmac/types.h index ad874a79cb4c..d44db5674b31 100644 --- a/drivers/staging/brcm80211/brcmsmac/types.h +++ b/drivers/staging/brcm80211/brcmsmac/types.h @@ -362,7 +362,7 @@ do { \ } \ } while (0) -#ifdef __mips__ +#ifdef CONFIG_BCM47XX /* * bcm4716 (which includes 4717 & 4718), plus 4706 on PCIe can reorder * transactions. As a fix, a read after write is performed on certain places @@ -371,7 +371,7 @@ do { \ #define W_REG_FLUSH(r, v) ({ W_REG((r), (v)); (void)R_REG(r); }) #else #define W_REG_FLUSH(r, v) W_REG((r), (v)) -#endif /* __mips__ */ +#endif /* CONFIG_BCM47XX */ #define AND_REG(r, v) W_REG((r), R_REG(r) & (v)) #define OR_REG(r, v) W_REG((r), R_REG(r) | (v)) -- 2.20.1