Do not overwrite ack timeout estimation in ath9k_hw_init_global_settings() if
dynack processing is enabled

Signed-off-by: Lorenzo Bianconi <lorenzo.biancon...@gmail.com>
---
 drivers/net/wireless/ath/ath9k/hw.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/net/wireless/ath/ath9k/hw.c 
b/drivers/net/wireless/ath/ath9k/hw.c
index 9a6b113..b2ca47a 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -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);
-- 
1.9.1

_______________________________________________
ath9k-devel mailing list
ath9k-devel@lists.ath9k.org
https://lists.ath9k.org/mailman/listinfo/ath9k-devel

Reply via email to