Skip to content

Commit fe5e499

Browse files
rmileckilinvjw
authored andcommitted
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>
1 parent c4e1971 commit fe5e499

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

  • drivers/net/wireless/b43

‎drivers/net/wireless/b43/main.c‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4329,6 +4329,7 @@ static char *b43_phy_name(struct b43_wldev *dev, u8 phy_type)
43294329
static int b43_phy_versioning(struct b43_wldev *dev)
43304330
{
43314331
struct b43_phy *phy = &dev->phy;
4332+
const u8 core_rev = dev->dev->core_rev;
43324333
u32 tmp;
43334334
u8 analog_type;
43344335
u8 phy_type;
@@ -4394,7 +4395,15 @@ static int b43_phy_versioning(struct b43_wldev *dev)
43944395
analog_type, phy_type, b43_phy_name(dev, phy_type), phy_rev);
43954396

43964397
/* 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) {
43984407
u16 radio24[3];
43994408

44004409
for (tmp = 0; tmp < 3; tmp++) {

0 commit comments

Comments
 (0)