]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
b43: N-PHY: fix 32-bit reads of tables
authorRafał Miłecki <zajec5@gmail.com>
Mon, 12 Dec 2011 20:38:35 +0000 (21:38 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 13 Dec 2011 20:47:44 +0000 (15:47 -0500)
The order is different than on older PHYs.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/b43/tables_nphy.c

index 691839e7541cc2f9398833b02fc20262091a1136..e1fc337df84be445cabdd3a0c17d8725bb7c3d09 100644 (file)
@@ -2880,9 +2880,8 @@ u32 b43_ntab_read(struct b43_wldev *dev, u32 offset)
                break;
        case B43_NTAB_32BIT:
                b43_phy_write(dev, B43_NPHY_TABLE_ADDR, offset);
-               value = b43_phy_read(dev, B43_NPHY_TABLE_DATAHI);
-               value <<= 16;
-               value |= b43_phy_read(dev, B43_NPHY_TABLE_DATALO);
+               value = b43_phy_read(dev, B43_NPHY_TABLE_DATALO);
+               value |= b43_phy_read(dev, B43_NPHY_TABLE_DATAHI) << 16;
                break;
        default:
                B43_WARN_ON(1);
@@ -2916,9 +2915,10 @@ void b43_ntab_read_bulk(struct b43_wldev *dev, u32 offset,
                        data += 2;
                        break;
                case B43_NTAB_32BIT:
-                       *((u32 *)data) = b43_phy_read(dev, B43_NPHY_TABLE_DATAHI);
-                       *((u32 *)data) <<= 16;
-                       *((u32 *)data) |= 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;
                        break;
                default: