aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2014-07-04 03:21:56 -0400
committerJohn W. Linville <linville@tuxdriver.com>2014-07-07 16:32:16 -0400
commitfe5e499f427dadbeeb079e0a796702f4a3da78a0 (patch)
treed77369a3839a0dd06136d19946cbcb34711d945d /drivers/net/wireless/b43
parentc4e197195a0c38b2c0928a03ed1de1a4a32f52c3 (diff)
b43: fix reading info about radio for new devices (cores 40 & 42)
This changes b43-phy0: Found Radio: Manuf 0x17F, Version 0x7769, Revision 4 to the b43-phy0: Found Radio: Manuf 0x17F, Version 0x2069, Revision 4 which matches what closed source driver reports: $ wl revinfo radiorev 0x42069000 Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/b43')
-rw-r--r--drivers/net/wireless/b43/main.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index ca4a19077d7e..b2bc593a6513 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -4329,6 +4329,7 @@ static char *b43_phy_name(struct b43_wldev *dev, u8 phy_type)
4329static int b43_phy_versioning(struct b43_wldev *dev) 4329static int b43_phy_versioning(struct b43_wldev *dev)
4330{ 4330{
4331 struct b43_phy *phy = &dev->phy; 4331 struct b43_phy *phy = &dev->phy;
4332 const u8 core_rev = dev->dev->core_rev;
4332 u32 tmp; 4333 u32 tmp;
4333 u8 analog_type; 4334 u8 analog_type;
4334 u8 phy_type; 4335 u8 phy_type;
@@ -4394,7 +4395,15 @@ static int b43_phy_versioning(struct b43_wldev *dev)
4394 analog_type, phy_type, b43_phy_name(dev, phy_type), phy_rev); 4395 analog_type, phy_type, b43_phy_name(dev, phy_type), phy_rev);
4395 4396
4396 /* Get RADIO versioning */ 4397 /* Get RADIO versioning */
4397 if (dev->dev->core_rev >= 24) { 4398 if (core_rev == 40 || core_rev == 42) {
4399 radio_manuf = 0x17F;
4400
4401 b43_write16(dev, B43_MMIO_RADIO24_CONTROL, 0);
4402 radio_rev = b43_read16(dev, B43_MMIO_RADIO24_DATA);
4403
4404 b43_write16(dev, B43_MMIO_RADIO24_CONTROL, 1);
4405 radio_ver = b43_read16(dev, B43_MMIO_RADIO24_DATA);
4406 } else if (core_rev >= 24) {
4398 u16 radio24[3]; 4407 u16 radio24[3];
4399 4408
4400 for (tmp = 0; tmp < 3; tmp++) { 4409 for (tmp = 0; tmp < 3; tmp++) {