ath9k: do not overwrite ACK timeout estimation
authorLorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Tue, 16 Sep 2014 00:13:11 +0000 (02:13 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 16 Sep 2014 20:18:38 +0000 (16:18 -0400)
Do not overwrite ACK timeout estimation in ath9k_hw_init_global_settings() if
dynack processing has been enabled

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/hw.c

index e71f824cb040e528386d4d9fac909b1631ee2d7c..949d5d6fe56dc3c85b5af929409519a9dafe3b1a 100644 (file)
@@ -1055,6 +1055,14 @@ void ath9k_hw_init_global_settings(struct ath_hw *ah)
                ctstimeout += 48 - sifstime - ah->slottime;
        }
 
+       if (ah->dynack.enabled) {
+               acktimeout = ah->dynack.ackto;
+               ctstimeout = acktimeout;
+               slottime = (acktimeout - 3) / 2;
+       } else {
+               ah->dynack.ackto = acktimeout;
+       }
+
        ath9k_hw_set_sifs_time(ah, sifstime);
        ath9k_hw_setslottime(ah, slottime);
        ath9k_hw_set_ack_timeout(ah, acktimeout);