Commit 243dcfcc authored by Michael Buesch's avatar Michael Buesch Committed by David S. Miller

b43: Fix radio ID register reading

This fixes reading of the high 16 bits of the radio ID
on new devices. 2055 radios want lo16 to be read first.
Signed-off-by: default avatarMichael Buesch <mb@bu3sch.de>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 89539ebe
...@@ -3139,10 +3139,9 @@ static int b43_phy_versioning(struct b43_wldev *dev) ...@@ -3139,10 +3139,9 @@ static int b43_phy_versioning(struct b43_wldev *dev)
tmp = 0x5205017F; tmp = 0x5205017F;
} else { } else {
b43_write16(dev, B43_MMIO_RADIO_CONTROL, B43_RADIOCTL_ID); b43_write16(dev, B43_MMIO_RADIO_CONTROL, B43_RADIOCTL_ID);
tmp = b43_read16(dev, B43_MMIO_RADIO_DATA_HIGH); tmp = b43_read16(dev, B43_MMIO_RADIO_DATA_LOW);
tmp <<= 16;
b43_write16(dev, B43_MMIO_RADIO_CONTROL, B43_RADIOCTL_ID); b43_write16(dev, B43_MMIO_RADIO_CONTROL, B43_RADIOCTL_ID);
tmp |= b43_read16(dev, B43_MMIO_RADIO_DATA_LOW); tmp |= (u32)b43_read16(dev, B43_MMIO_RADIO_DATA_HIGH) << 16;
} }
radio_manuf = (tmp & 0x00000FFF); radio_manuf = (tmp & 0x00000FFF);
radio_ver = (tmp & 0x0FFFF000) >> 12; radio_ver = (tmp & 0x0FFFF000) >> 12;
...@@ -3167,7 +3166,7 @@ static int b43_phy_versioning(struct b43_wldev *dev) ...@@ -3167,7 +3166,7 @@ static int b43_phy_versioning(struct b43_wldev *dev)
unsupported = 1; unsupported = 1;
break; break;
case B43_PHYTYPE_N: case B43_PHYTYPE_N:
if (radio_ver != 5) if (radio_ver != 0x2055)
unsupported = 1; unsupported = 1;
break; break;
default: default:
......
Markdown is supported
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