Commit 03f665c8 authored by Rafał Miłecki's avatar Rafał Miłecki Committed by John W. Linville

b43: N-PHY: fix 32-bit reads of tables

The order is different than on older PHYs.
Signed-off-by: default avatarRafał Miłecki <zajec5@gmail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent daadc6b3
...@@ -2880,9 +2880,8 @@ u32 b43_ntab_read(struct b43_wldev *dev, u32 offset) ...@@ -2880,9 +2880,8 @@ u32 b43_ntab_read(struct b43_wldev *dev, u32 offset)
break; break;
case B43_NTAB_32BIT: case B43_NTAB_32BIT:
b43_phy_write(dev, B43_NPHY_TABLE_ADDR, offset); b43_phy_write(dev, B43_NPHY_TABLE_ADDR, offset);
value = b43_phy_read(dev, B43_NPHY_TABLE_DATAHI); value = b43_phy_read(dev, B43_NPHY_TABLE_DATALO);
value <<= 16; value |= b43_phy_read(dev, B43_NPHY_TABLE_DATAHI) << 16;
value |= b43_phy_read(dev, B43_NPHY_TABLE_DATALO);
break; break;
default: default:
B43_WARN_ON(1); B43_WARN_ON(1);
...@@ -2916,9 +2915,10 @@ void b43_ntab_read_bulk(struct b43_wldev *dev, u32 offset, ...@@ -2916,9 +2915,10 @@ void b43_ntab_read_bulk(struct b43_wldev *dev, u32 offset,
data += 2; data += 2;
break; break;
case B43_NTAB_32BIT: case B43_NTAB_32BIT:
*((u32 *)data) = b43_phy_read(dev, B43_NPHY_TABLE_DATAHI); *((u32 *)data) =
*((u32 *)data) <<= 16; b43_phy_read(dev, B43_NPHY_TABLE_DATALO);
*((u32 *)data) |= b43_phy_read(dev, B43_NPHY_TABLE_DATALO); *((u32 *)data) |=
b43_phy_read(dev, B43_NPHY_TABLE_DATAHI) << 16;
data += 4; data += 4;
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