return true;
 }
 
+/**
+ * ath_dynack_set_timeout - configure timeouts/slottime registers
+ * @ah: ath hw
+ * @to: timeout value
+ *
+ */
+static void ath_dynack_set_timeout(struct ath_hw *ah, int to)
+{
+       struct ath_common *common = ath9k_hw_common(ah);
+       int slottime = (to - 3) / 2;
+
+       ath_dbg(common, DYNACK, "ACK timeout %u slottime %u\n",
+               to, slottime);
+       ath9k_hw_setslottime(ah, slottime);
+       ath9k_hw_set_ack_timeout(ah, to);
+       ath9k_hw_set_cts_timeout(ah, to);
+}
+
 /**
  * ath_dynack_compute_ackto - compute ACK timeout as the maximum STA timeout
  * @ah: ath hw
  */
 static void ath_dynack_compute_ackto(struct ath_hw *ah)
 {
-       struct ath_common *common = ath9k_hw_common(ah);
        struct ath_dynack *da = &ah->dynack;
        struct ath_node *an;
        int to = 0;
                        to = an->ackto;
 
        if (to && da->ackto != to) {
-               u32 slottime;
-
-               slottime = (to - 3) / 2;
+               ath_dynack_set_timeout(ah, to);
                da->ackto = to;
-               ath_dbg(common, DYNACK, "ACK timeout %u slottime %u\n",
-                       da->ackto, slottime);
-               ath9k_hw_setslottime(ah, slottime);
-               ath9k_hw_set_ack_timeout(ah, da->ackto);
-               ath9k_hw_set_cts_timeout(ah, da->ackto);
        }
 }
 
                    ieee80211_is_assoc_resp(hdr->frame_control) ||
                    ieee80211_is_auth(hdr->frame_control)) {
                        ath_dbg(common, DYNACK, "late ack\n");
-
-                       ath9k_hw_setslottime(ah, (LATEACK_TO - 3) / 2);
-                       ath9k_hw_set_ack_timeout(ah, LATEACK_TO);
-                       ath9k_hw_set_cts_timeout(ah, LATEACK_TO);
+                       ath_dynack_set_timeout(ah, LATEACK_TO);
                        if (sta) {
                                struct ath_node *an;
 
        da->ack_rbf.h_rb = 0;
 
        /* init acktimeout */
-       ath9k_hw_setslottime(ah, (ackto - 3) / 2);
-       ath9k_hw_set_ack_timeout(ah, ackto);
-       ath9k_hw_set_cts_timeout(ah, ackto);
+       ath_dynack_set_timeout(ah, ackto);
 }
 EXPORT_SYMBOL(ath_dynack_reset);