diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2012-04-29 02:04:10 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-05-16 12:45:21 -0400 |
commit | bf7d420b4a3ea06d9638ec7f1b9d7971fa7f4f66 (patch) | |
tree | 78b03e4de848b3d2a2b62ee22391c3008ac553f3 /drivers/bcma/sprom.c | |
parent | a25595562291baea4ccc2ed570dd15c638b67b21 (diff) |
ssb/bcma: fill attribute alpha2 from sprom
The attribute country_code and alpha2 are two different attributes in
the sprom. country_code contains some code in an 8 bit coding and
alpha2 contains two chars with the country code. The attributes where
read out wrongly in the past and country_code is only available on
sprom version 1.
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/bcma/sprom.c')
-rw-r--r-- | drivers/bcma/sprom.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/bcma/sprom.c b/drivers/bcma/sprom.c index 3e2a6002aae6..1799372131d2 100644 --- a/drivers/bcma/sprom.c +++ b/drivers/bcma/sprom.c @@ -243,7 +243,8 @@ static void bcma_sprom_extract_r8(struct bcma_bus *bus, const u16 *sprom) SPEX(boardflags2_lo, SSB_SPROM8_BFL2LO, ~0, 0); SPEX(boardflags2_hi, SSB_SPROM8_BFL2HI, ~0, 0); - SPEX(country_code, SSB_SPROM8_CCODE, ~0, 0); + SPEX(alpha2[0], SSB_SPROM8_CCODE, 0xff00, 8); + SPEX(alpha2[1], SSB_SPROM8_CCODE, 0x00ff, 0); /* Extract cores power info info */ for (i = 0; i < ARRAY_SIZE(pwr_info_offset); i++) { |