ath5k: Restore saved initval after POST
authorNick Kossifidis <mick@madwifi.org>
Sun, 20 Jul 2008 03:32:32 +0000 (06:32 +0300)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 1 Aug 2008 19:31:31 +0000 (15:31 -0400)
 * Restore saved initial value after POST

Changes-licensed-under: ISC
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath5k/hw.c

index 42ef41e..b3b9baa 100644 (file)
@@ -139,6 +139,8 @@ static int ath5k_hw_post(struct ath5k_hw *ah)
        for (c = 0; c < 2; c++) {
 
                cur_reg = regs[c];
+
+               /* Save previous value */
                init_val = ath5k_hw_reg_read(ah, cur_reg);
 
                for (i = 0; i < 256; i++) {
@@ -170,6 +172,10 @@ static int ath5k_hw_post(struct ath5k_hw *ah)
                        var_pattern = 0x003b080f;
                        ath5k_hw_reg_write(ah, var_pattern, cur_reg);
                }
+
+               /* Restore previous value */
+               ath5k_hw_reg_write(ah, init_val, cur_reg);
+
        }
 
        return 0;