void mt76_wake_tx_queue(struct ieee80211_hw *hw, struct ieee80211_txq *txq);
 void mt76_stop_tx_queues(struct mt76_dev *dev, struct ieee80211_sta *sta,
                         bool send_bar);
+void mt76_tx_check_agg_ssn(struct ieee80211_sta *sta, struct sk_buff *skb);
 void mt76_txq_schedule(struct mt76_phy *phy, enum mt76_txq_id qid);
 void mt76_txq_schedule_all(struct mt76_phy *phy);
 void mt76_tx_tasklet(unsigned long data);
 
        return txq->ac;
 }
 
-static void
-mt76_check_agg_ssn(struct mt76_txq *mtxq, struct sk_buff *skb)
+void
+mt76_tx_check_agg_ssn(struct ieee80211_sta *sta, struct sk_buff *skb)
 {
        struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
+       struct ieee80211_txq *txq;
+       struct mt76_txq *mtxq;
+       u8 tid;
 
-       if (!ieee80211_is_data_qos(hdr->frame_control) ||
+       if (!sta || !ieee80211_is_data_qos(hdr->frame_control) ||
            !ieee80211_is_data_present(hdr->frame_control))
                return;
 
+       tid = skb->priority & IEEE80211_QOS_CTL_TAG1D_MASK;
+       txq = sta->txq[tid];
+       mtxq = (struct mt76_txq *)txq->drv_priv;
+       if (!mtxq->aggr)
+               return;
+
        mtxq->agg_ssn = le16_to_cpu(hdr->seq_ctrl) + 0x10;
 }
+EXPORT_SYMBOL_GPL(mt76_tx_check_agg_ssn);
 
 void
 mt76_tx_status_lock(struct mt76_dev *dev, struct sk_buff_head *list)
                ieee80211_get_tx_rates(info->control.vif, sta, skb,
                                       info->control.rates, 1);
 
-       if (sta && ieee80211_is_data_qos(hdr->frame_control)) {
-               struct ieee80211_txq *txq;
-               struct mt76_txq *mtxq;
-               u8 tid;
-
-               tid = skb->priority & IEEE80211_QOS_CTL_TID_MASK;
-               txq = sta->txq[tid];
-               mtxq = (struct mt76_txq *)txq->drv_priv;
-
-               if (mtxq->aggr)
-                       mt76_check_agg_ssn(mtxq, skb);
-       }
-
        if (ext_phy)
                info->hw_queue |= MT_TX_HW_QUEUE_EXT_PHY;
 
                        if (!skb)
                                break;
 
-                       if (mtxq->aggr)
-                               mt76_check_agg_ssn(mtxq, skb);
-
                        nframes--;
                        if (last_skb)
                                mt76_queue_ps_skb(dev, sta, last_skb, false);
        ampdu = IEEE80211_SKB_CB(skb)->flags & IEEE80211_TX_CTL_AMPDU;
        limit = ampdu ? 16 : 3;
 
-       if (ampdu)
-               mt76_check_agg_ssn(mtxq, skb);
-
        idx = dev->queue_ops->tx_queue_skb(dev, qid, skb, wcid, txq->sta);
 
        if (idx < 0)
 
                info->control.rates[0] = tx_rate;
 
-               if (cur_ampdu)
-                       mt76_check_agg_ssn(mtxq, skb);
-
                idx = dev->queue_ops->tx_queue_skb(dev, qid, skb, wcid,
                                                   txq->sta);
                if (idx < 0)