Commit 3fd48508 authored by Rafał Miłecki's avatar Rafał Miłecki Committed by John W. Linville
Browse files

b43: use radio ID reading code to older cores only



Newer ones need separated way
Signed-off-by: default avatarRafał Miłecki <zajec5@gmail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 8c8b964c
...@@ -4218,22 +4218,30 @@ static int b43_phy_versioning(struct b43_wldev *dev) ...@@ -4218,22 +4218,30 @@ static int b43_phy_versioning(struct b43_wldev *dev)
analog_type, phy_type, phy_rev); analog_type, phy_type, phy_rev);
/* Get RADIO versioning */ /* Get RADIO versioning */
if (dev->dev->chip_id == 0x4317) { if (dev->dev->core_rev >= 24) {
if (dev->dev->chip_rev == 0) /* TODO */
tmp = 0x3205017F;
else if (dev->dev->chip_rev == 1)
tmp = 0x4205017F;
else
tmp = 0x5205017F;
} else { } else {
b43_write16(dev, B43_MMIO_RADIO_CONTROL, B43_RADIOCTL_ID); if (dev->dev->chip_id == 0x4317) {
tmp = b43_read16(dev, B43_MMIO_RADIO_DATA_LOW); if (dev->dev->chip_rev == 0)
b43_write16(dev, B43_MMIO_RADIO_CONTROL, B43_RADIOCTL_ID); tmp = 0x3205017F;
tmp |= (u32)b43_read16(dev, B43_MMIO_RADIO_DATA_HIGH) << 16; else if (dev->dev->chip_rev == 1)
} tmp = 0x4205017F;
radio_manuf = (tmp & 0x00000FFF); else
radio_ver = (tmp & 0x0FFFF000) >> 12; tmp = 0x5205017F;
radio_rev = (tmp & 0xF0000000) >> 28; } else {
b43_write16(dev, B43_MMIO_RADIO_CONTROL,
B43_RADIOCTL_ID);
tmp = b43_read16(dev, B43_MMIO_RADIO_DATA_LOW);
b43_write16(dev, B43_MMIO_RADIO_CONTROL,
B43_RADIOCTL_ID);
tmp |= (u32)b43_read16(dev, B43_MMIO_RADIO_DATA_HIGH)
<< 16;
}
radio_manuf = (tmp & 0x00000FFF);
radio_ver = (tmp & 0x0FFFF000) >> 12;
radio_rev = (tmp & 0xF0000000) >> 28;
}
if (radio_manuf != 0x17F /* Broadcom */) if (radio_manuf != 0x17F /* Broadcom */)
unsupported = 1; unsupported = 1;
switch (phy_type) { switch (phy_type) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment