mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
tx: store aggregation starting sequence number on first tx attempt, not on initial dequeue
Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
@@ -187,7 +187,6 @@ static struct sk_buff *
|
||||
mt76_txq_dequeue(struct mt76_dev *dev, struct mt76_txq *mtxq, bool ps)
|
||||
{
|
||||
struct ieee80211_txq *txq = mtxq_to_txq(mtxq);
|
||||
struct ieee80211_hdr *hdr;
|
||||
struct sk_buff *skb;
|
||||
|
||||
skb = skb_dequeue(&mtxq->retry_q);
|
||||
@@ -204,12 +203,16 @@ mt76_txq_dequeue(struct mt76_dev *dev, struct mt76_txq *mtxq, bool ps)
|
||||
if (!skb)
|
||||
return NULL;
|
||||
|
||||
hdr = (struct ieee80211_hdr *) skb->data;
|
||||
mtxq->agg_ssn = le16_to_cpu(hdr->seq_ctrl) + 0x10;
|
||||
|
||||
return skb;
|
||||
}
|
||||
|
||||
static void
|
||||
mt76_check_agg_ssn(struct mt76_txq *mtxq, struct sk_buff *skb)
|
||||
{
|
||||
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
|
||||
mtxq->agg_ssn = le16_to_cpu(hdr->seq_ctrl) + 0x10;
|
||||
}
|
||||
|
||||
static void
|
||||
mt76_queue_ps_skb(struct mt76_dev *dev, struct ieee80211_sta *sta,
|
||||
struct sk_buff *skb, bool last)
|
||||
@@ -251,6 +254,9 @@ mt76_release_buffered_frames(struct ieee80211_hw *hw, struct ieee80211_sta *sta,
|
||||
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);
|
||||
@@ -303,6 +309,10 @@ mt76_txq_send_burst(struct mt76_dev *dev, struct mt76_queue *hwq,
|
||||
probe = (info->flags & IEEE80211_TX_CTL_RATE_CTRL_PROBE);
|
||||
ampdu = IEEE80211_SKB_CB(skb)->flags & IEEE80211_TX_CTL_AMPDU;
|
||||
limit = ampdu ? 16 : 3;
|
||||
|
||||
if (ampdu)
|
||||
mt76_check_agg_ssn(mtxq, skb);
|
||||
|
||||
idx = mt76_tx_queue_skb(dev, hwq, skb, wcid, txq->sta);
|
||||
|
||||
if (idx < 0)
|
||||
@@ -331,6 +341,9 @@ mt76_txq_send_burst(struct mt76_dev *dev, struct mt76_queue *hwq,
|
||||
info = IEEE80211_SKB_CB(skb);
|
||||
info->control.rates[0] = tx_rate;
|
||||
|
||||
if (cur_ampdu)
|
||||
mt76_check_agg_ssn(mtxq, skb);
|
||||
|
||||
idx = mt76_tx_queue_skb(dev, hwq, skb, wcid, txq->sta);
|
||||
if (idx < 0)
|
||||
return idx;
|
||||
|
||||
Reference in New Issue
Block a user