b43: N-PHY: workaround broken auto-increment on BCM43224
authorRafał Miłecki <zajec5@gmail.com>
Mon, 12 Dec 2011 20:38:36 +0000 (21:38 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 13 Dec 2011 20:47:48 +0000 (15:47 -0500)
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 e1fc337df84be445cabdd3a0c17d8725bb7c3d09..3252560e9fa157b32e330c43ffeaa9e24c951d62 100644 (file)
@@ -2905,6 +2905,12 @@ void b43_ntab_read_bulk(struct b43_wldev *dev, u32 offset,
        b43_phy_write(dev, B43_NPHY_TABLE_ADDR, offset);
 
        for (i = 0; i < nr_elements; i++) {
+               /* Auto increment broken + caching issue on BCM43224? */
+               if (dev->dev->chip_id == 43224 && dev->dev->chip_rev == 1) {
+                       b43_phy_read(dev, B43_NPHY_TABLE_DATALO);
+                       b43_phy_write(dev, B43_NPHY_TABLE_ADDR, offset + i);
+               }
+
                switch (type) {
                case B43_NTAB_8BIT:
                        *data = b43_phy_read(dev, B43_NPHY_TABLE_DATALO) & 0xFF;