Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Rafał Miłecki and committed by
John W. Linville
fe5e499f c4e19719

+10 -1
+10 -1
drivers/net/wireless/b43/main.c
··· 4329 4329 static int b43_phy_versioning(struct b43_wldev *dev) 4330 4330 { 4331 4331 struct b43_phy *phy = &dev->phy; 4332 + const u8 core_rev = dev->dev->core_rev; 4332 4333 u32 tmp; 4333 4334 u8 analog_type; 4334 4335 u8 phy_type; ··· 4395 4394 analog_type, phy_type, b43_phy_name(dev, phy_type), phy_rev); 4396 4395 4397 4396 /* Get RADIO versioning */ 4398 - if (dev->dev->core_rev >= 24) { 4397 + if (core_rev == 40 || core_rev == 42) { 4398 + radio_manuf = 0x17F; 4399 + 4400 + b43_write16(dev, B43_MMIO_RADIO24_CONTROL, 0); 4401 + radio_rev = b43_read16(dev, B43_MMIO_RADIO24_DATA); 4402 + 4403 + b43_write16(dev, B43_MMIO_RADIO24_CONTROL, 1); 4404 + radio_ver = b43_read16(dev, B43_MMIO_RADIO24_DATA); 4405 + } else if (core_rev >= 24) { 4399 4406 u16 radio24[3]; 4400 4407 4401 4408 for (tmp = 0; tmp < 3; tmp++) {