ath9k_htc: Use multiple register writes
authorSujith <Sujith.Manoharan@atheros.com>
Fri, 23 Apr 2010 04:58:11 +0000 (10:28 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 26 Apr 2010 18:21:17 +0000 (14:21 -0400)
This patch fixes a code segment in configpciepowersave()
to make use of multiple register writes.

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

index adb33b34a56df27a0227dc3599f9fc2efe565030..a8a8cdc04afa1f445f499ed8501d3e90fc1ddf56 100644 (file)
@@ -408,6 +408,8 @@ static void ar9002_hw_configpcipowersave(struct ath_hw *ah,
                        REG_WRITE(ah, AR_PCIE_SERDES2, 0x00000000);
 
                } else {
+                       ENABLE_REGWRITE_BUFFER(ah);
+
                        REG_WRITE(ah, AR_PCIE_SERDES, 0x9248fc00);
                        REG_WRITE(ah, AR_PCIE_SERDES, 0x24924924);
 
@@ -428,6 +430,9 @@ static void ar9002_hw_configpcipowersave(struct ath_hw *ah,
 
                        /* Load the new settings */
                        REG_WRITE(ah, AR_PCIE_SERDES2, 0x00000000);
+
+                       REGWRITE_BUFFER_FLUSH(ah);
+                       DISABLE_REGWRITE_BUFFER(ah);
                }
 
                udelay(1000);