]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
ath9k_hw: Configure byte swap for non AR9271 chips
authorSujith <Sujith.Manoharan@atheros.com>
Wed, 2 Jun 2010 10:23:31 +0000 (15:53 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 4 Jun 2010 20:00:39 +0000 (16:00 -0400)
This patch fixes programming the byte swap registers
for chipsets other than AR9271. This is needed for
AR7010.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/hw.c

index b0e42b0374c2c05f01ade7b53327430333506ed3..2adc7e78cebfe38d3ba7ba7a09248a0a1d792460 100644 (file)
@@ -1424,9 +1424,13 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
                                "Setting CFG 0x%x\n", REG_READ(ah, AR_CFG));
                }
        } else {
-               /* Configure AR9271 target WLAN */
-                if (AR_SREV_9271(ah))
-                       REG_WRITE(ah, AR_CFG, AR_CFG_SWRB | AR_CFG_SWTB);
+               if (common->bus_ops->ath_bus_type == ATH_USB) {
+                       /* Configure AR9271 target WLAN */
+                       if (AR_SREV_9271(ah))
+                               REG_WRITE(ah, AR_CFG, AR_CFG_SWRB | AR_CFG_SWTB);
+                       else
+                               REG_WRITE(ah, AR_CFG, AR_CFG_SWTD | AR_CFG_SWRD);
+               }
 #ifdef __BIG_ENDIAN
                 else
                        REG_WRITE(ah, AR_CFG, AR_CFG_SWTD | AR_CFG_SWRD);