seqno << IEEE80211_SEQ_SEQ_SHIFT);
 }
 
+static void ath_set_rates(struct ieee80211_vif *vif, struct ieee80211_sta *sta,
+                         struct ath_buf *bf)
+{
+       ieee80211_get_tx_rates(vif, sta, bf->bf_mpdu, bf->rates,
+                              ARRAY_SIZE(bf->rates));
+}
+
 static void ath_tx_flush_tid(struct ath_softc *sc, struct ath_atx_tid *tid)
 {
        struct ath_txq *txq = tid->ac->txq;
                        ath_tx_complete_buf(sc, bf, txq, &bf_head, &ts, 0);
                        sendbar = true;
                } else {
+                       ath_set_rates(tid->an->vif, tid->an->sta, bf);
                        ath_tx_send_normal(sc, txq, NULL, skb);
                }
        }
 
        tx_info = IEEE80211_SKB_CB(skb);
 
-       memcpy(rates, tx_info->control.rates, sizeof(rates));
+       memcpy(rates, bf->rates, sizeof(rates));
 
        retries = ts->ts_longretry + 1;
        for (i = 0; i < ts->ts_rateindex; i++)
                                  bool first_subfrm)
 {
 #define FIRST_DESC_NDELIMS 60
-       struct sk_buff *skb = bf->bf_mpdu;
-       struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
        u32 nsymbits, nsymbols;
        u16 minlen;
        u8 flags, rix;
        if (tid->an->mpdudensity == 0)
                return ndelim;
 
-       rix = tx_info->control.rates[0].idx;
-       flags = tx_info->control.rates[0].flags;
+       rix = bf->rates[0].idx;
+       flags = bf->rates[0].flags;
        width = (flags & IEEE80211_TX_RC_40_MHZ_WIDTH) ? 1 : 0;
        half_gi = (flags & IEEE80211_TX_RC_SHORT_GI) ? 1 : 0;
 
                        bf_first = bf;
 
                if (!rl) {
+                       ath_set_rates(tid->an->vif, tid->an->sta, bf);
                        aggr_limit = ath_lookup_rate(sc, bf, tid);
                        rl = 1;
                }
 
        skb = bf->bf_mpdu;
        tx_info = IEEE80211_SKB_CB(skb);
-       rates = tx_info->control.rates;
+       rates = bf->rates;
        hdr = (struct ieee80211_hdr *)skb->data;
 
        /* set dur_update_en for l-sig computation except for PS-Poll frames */
        info->dur_update = !ieee80211_is_pspoll(hdr->frame_control);
        info->rtscts_rate = fi->rtscts_rate;
 
-       for (i = 0; i < 4; i++) {
+       for (i = 0; i < ARRAY_SIZE(bf->rates); i++) {
                bool is_40, is_sgi, is_sp;
                int phy;
 
                return;
        }
 
+       ath_set_rates(tid->an->vif, tid->an->sta, bf);
        bf->bf_state.bf_type = BUF_AMPDU;
        INIT_LIST_HEAD(&bf_head);
        list_add(&bf->list, &bf_head);
        if (txctl->paprd)
                bf->bf_state.bfs_paprd_timestamp = jiffies;
 
+       ath_set_rates(vif, sta, bf);
        ath_tx_send_normal(sc, txctl->txq, tid, skb);
 
 out: