aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/brcm80211/brcmsmac/channel.c
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2012-04-29 02:50:25 +0200
committerJohn W. Linville <linville@tuxdriver.com>2012-05-16 12:45:23 -0400
commit898d3c3b2462cd439edb575f43b732425693aff0 (patch)
tree51e4fe1eec628acbed53fbfc37808bdc52e401bd /drivers/net/wireless/brcm80211/brcmsmac/channel.c
parent2b2715b83c433d22b10bd654e102baea6f5589b0 (diff)
brcmsmac: use sprom from bcma
bcma now provides all sprom attributes needed by brcmsmac and also parses them from the pci sprom ant otp. 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>
Diffstat (limited to 'drivers/net/wireless/brcm80211/brcmsmac/channel.c')
-rw-r--r--drivers/net/wireless/brcm80211/brcmsmac/channel.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/channel.c b/drivers/net/wireless/brcm80211/brcmsmac/channel.c
index 0efe88e25a9..eb77ac3cfb6 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/channel.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/channel.c
@@ -1110,7 +1110,7 @@ struct brcms_cm_info *brcms_c_channel_mgr_attach(struct brcms_c_info *wlc)
char country_abbrev[BRCM_CNTRY_BUF_SZ];
const struct country_info *country;
struct brcms_pub *pub = wlc->pub;
- char *ccode;
+ struct ssb_sprom *sprom = &wlc->hw->d11core->bus->sprom;
BCMMSG(wlc->wiphy, "wl%d\n", wlc->pub->unit);
@@ -1122,9 +1122,8 @@ struct brcms_cm_info *brcms_c_channel_mgr_attach(struct brcms_c_info *wlc)
wlc->cmi = wlc_cm;
/* store the country code for passing up as a regulatory hint */
- ccode = getvar(wlc->hw->sih, BRCMS_SROM_CCODE);
- if (ccode && brcms_c_country_valid(ccode))
- strncpy(wlc->pub->srom_ccode, ccode, BRCM_CNTRY_BUF_SZ - 1);
+ if (sprom->alpha2 && brcms_c_country_valid(sprom->alpha2))
+ strncpy(wlc->pub->srom_ccode, sprom->alpha2, sizeof(sprom->alpha2));
/*
* internal country information which must match