aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43/main.c
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2011-07-06 14:27:24 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-07-08 11:11:22 -0400
commit3fd48508d0d3d8e5423cab6b52a3b818085b6245 (patch)
tree449d79ac5f2ca359ee084f600a817f1dc4516279 /drivers/net/wireless/b43/main.c
parent8c8b964c20adb79a7deb58dc9d55754b0ca1233c (diff)
b43: use radio ID reading code to older cores only
Newer ones need separated way 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/main.c')
-rw-r--r--drivers/net/wireless/b43/main.c38
1 files changed, 23 insertions, 15 deletions
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index cddc5a87df7c..074765a1e671 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -4218,22 +4218,30 @@ static int b43_phy_versioning(struct b43_wldev *dev)
4218 analog_type, phy_type, phy_rev); 4218 analog_type, phy_type, phy_rev);
4219 4219
4220 /* Get RADIO versioning */ 4220 /* Get RADIO versioning */
4221 if (dev->dev->chip_id == 0x4317) { 4221 if (dev->dev->core_rev >= 24) {
4222 if (dev->dev->chip_rev == 0) 4222 /* TODO */
4223 tmp = 0x3205017F;
4224 else if (dev->dev->chip_rev == 1)
4225 tmp = 0x4205017F;
4226 else
4227 tmp = 0x5205017F;
4228 } else { 4223 } else {
4229 b43_write16(dev, B43_MMIO_RADIO_CONTROL, B43_RADIOCTL_ID); 4224 if (dev->dev->chip_id == 0x4317) {
4230 tmp = b43_read16(dev, B43_MMIO_RADIO_DATA_LOW); 4225 if (dev->dev->chip_rev == 0)
4231 b43_write16(dev, B43_MMIO_RADIO_CONTROL, B43_RADIOCTL_ID); 4226 tmp = 0x3205017F;
4232 tmp |= (u32)b43_read16(dev, B43_MMIO_RADIO_DATA_HIGH) << 16; 4227 else if (dev->dev->chip_rev == 1)
4233 } 4228 tmp = 0x4205017F;
4234 radio_manuf = (tmp & 0x00000FFF); 4229 else
4235 radio_ver = (tmp & 0x0FFFF000) >> 12; 4230 tmp = 0x5205017F;
4236 radio_rev = (tmp & 0xF0000000) >> 28; 4231 } else {
4232 b43_write16(dev, B43_MMIO_RADIO_CONTROL,
4233 B43_RADIOCTL_ID);
4234 tmp = b43_read16(dev, B43_MMIO_RADIO_DATA_LOW);
4235 b43_write16(dev, B43_MMIO_RADIO_CONTROL,
4236 B43_RADIOCTL_ID);
4237 tmp |= (u32)b43_read16(dev, B43_MMIO_RADIO_DATA_HIGH)
4238 << 16;
4239 }
4240 radio_manuf = (tmp & 0x00000FFF);
4241 radio_ver = (tmp & 0x0FFFF000) >> 12;
4242 radio_rev = (tmp & 0xF0000000) >> 28;
4243 }
4244
4237 if (radio_manuf != 0x17F /* Broadcom */) 4245 if (radio_manuf != 0x17F /* Broadcom */)
4238 unsupported = 1; 4246 unsupported = 1;
4239 switch (phy_type) { 4247 switch (phy_type) {