ath9k_hw: fix synth delay for half/quarter channels
authorFelix Fietkau <nbd@openwrt.org>
Sat, 9 Jul 2011 04:12:53 +0000 (11:12 +0700)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 11 Jul 2011 19:02:15 +0000 (15:02 -0400)
The radio needs twice / four times as much time to stabilize for half/quarter
channels.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/ar5008_phy.c

index 441bb33f17adb705af53f5a04f764a6cfa911f46..fac2c6da6ca4d14986120e0c8079d27ac584fda1 100644 (file)
@@ -627,6 +627,11 @@ static void ar5008_hw_init_bb(struct ath_hw *ah,
        else
                synthDelay /= 10;
 
+       if (IS_CHAN_HALF_RATE(chan))
+               synthDelay *= 2;
+       else if (IS_CHAN_QUARTER_RATE(chan))
+               synthDelay *= 4;
+
        REG_WRITE(ah, AR_PHY_ACTIVE, AR_PHY_ACTIVE_EN);
 
        udelay(synthDelay + BASE_ACTIVATE_DELAY);