Skip to content

Commit

Permalink
staging: brcm80211: cleaned up softmac phy macro's affecting code flow
Browse files Browse the repository at this point in the history
Substituted macro's.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Roland Vossen authored and Greg Kroah-Hartman committed Sep 6, 2011
1 parent 33bc955 commit 0d62b4d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
6 changes: 4 additions & 2 deletions drivers/staging/brcm80211/brcmsmac/phy/phy_cmn.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,15 +204,17 @@ u16 read_radio_reg(struct brcms_phy *pi, u16 addr)

switch (pi->pubpi.phy_type) {
case PHY_TYPE_N:
CASECHECK(PHYTYPE, PHY_TYPE_N);
if (!CONF_HAS(PHYTYPE, PHY_TYPE_N))
break;
if (NREV_GE(pi->pubpi.phy_rev, 7))
addr |= RADIO_2057_READ_OFF;
else
addr |= RADIO_2055_READ_OFF;
break;

case PHY_TYPE_LCN:
CASECHECK(PHYTYPE, PHY_TYPE_LCN);
if (!CONF_HAS(PHYTYPE, PHY_TYPE_LCN))
break;
addr |= RADIO_2064_READ_OFF;
break;

Expand Down
5 changes: 0 additions & 5 deletions drivers/staging/brcm80211/brcmsmac/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -220,11 +220,6 @@
#define PHYTYPE_IS(var, val)\
(PHYCONF_HAS(val) && (PHYCONF_IS(val) || ((var) == (val))))

/* Finally, early-exit from switch case if anyone wants it... */

#define CASECHECK(config, val) if (!(CONF_HAS(config, val))) break
#define CASEMSK(config, mask) if (!(CONF_MSK(config, mask))) break

/* Set up PHYTYPE automatically: (depends on PHY_TYPE_X, from d11.h) */

#define _PHYCONF_N (1 << PHY_TYPE_N)
Expand Down

0 comments on commit 0d62b4d

Please sign in to comment.