]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ath9k: Fix RTC reset delay
authorSujith Manoharan <c_manoha@qca.qualcomm.com>
Wed, 18 Dec 2013 04:23:26 +0000 (09:53 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 18 Dec 2013 20:23:49 +0000 (15:23 -0500)
The delay that is required after issuing a RTC reset
varies for each chip. Handle this properly.

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

index 28009148e313f41ff8bf924a9d26e35c747e64aa..3ca682f3c704b9746f0df38a077b4b28263432ec 100644 (file)
@@ -1363,7 +1363,12 @@ static bool ath9k_hw_set_reset(struct ath_hw *ah, int type)
 
        REGWRITE_BUFFER_FLUSH(ah);
 
-       udelay(50);
+       if (AR_SREV_9300_20_OR_LATER(ah))
+               udelay(50);
+       else if (AR_SREV_9100(ah))
+               udelay(10000);
+       else
+               udelay(100);
 
        REG_WRITE(ah, AR_RTC_RC, 0);
        if (!ath9k_hw_wait(ah, AR_RTC_RC, AR_RTC_RC_M, 0, AH_WAIT_TIMEOUT)) {