mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
mt76: mt76x02: fix tx reordering on rate control probing without a-mpdu
To avoid aggregating rate control probing packets with other traffic, and to ensure that the probing rate gets used, probing packets get assigned a different internal queueing priority. This causes packets to be transmitted in a different order, which is compensated by the receiver side reordering. However, if A-MPDU is disabled, this reordering can become visible to upper layers on the receiver side. Disable the priority change if A-MPDU is disabled. Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
+2
-1
@@ -156,6 +156,7 @@ int mt76x02_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
|
||||
struct mt76x02_txwi *txwi = txwi_ptr;
|
||||
struct sk_buff *skb = tx_info->skb;
|
||||
int hdrlen, pad, len, pid, qsel = MT_QSEL_EDCA;
|
||||
bool ampdu = IEEE80211_SKB_CB(skb)->flags & IEEE80211_TX_CTL_AMPDU;
|
||||
|
||||
if (qid == MT_TXQ_PSD && wcid && wcid->idx < 128)
|
||||
mt76x02_mac_wcid_set_drop(dev, wcid->idx, false);
|
||||
@@ -173,7 +174,7 @@ int mt76x02_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
|
||||
|
||||
txwi->pktid = pid;
|
||||
|
||||
if (mt76_is_skb_pktid(pid))
|
||||
if (mt76_is_skb_pktid(pid) && ampdu)
|
||||
qsel = MT_QSEL_MGMT;
|
||||
|
||||
tx_info->info = FIELD_PREP(MT_TXD_INFO_QSEL, qsel) |
|
||||
|
||||
+2
-1
@@ -80,6 +80,7 @@ int mt76x02u_tx_prepare_skb(struct mt76_dev *mdev, void *data,
|
||||
struct sk_buff *skb = tx_info->skb;
|
||||
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
|
||||
int pid, hdrlen, len = skb->len, ep = q2ep(mdev->q_tx[qid].q->hw_idx);
|
||||
bool ampdu = IEEE80211_SKB_CB(skb)->flags & IEEE80211_TX_CTL_AMPDU;
|
||||
struct mt76x02_txwi *txwi;
|
||||
enum mt76_qsel qsel;
|
||||
u32 flags;
|
||||
@@ -98,7 +99,7 @@ int mt76x02u_tx_prepare_skb(struct mt76_dev *mdev, void *data,
|
||||
|
||||
txwi->pktid = pid;
|
||||
|
||||
if (mt76_is_skb_pktid(pid) || ep == MT_EP_OUT_HCCA)
|
||||
if ((mt76_is_skb_pktid(pid) && ampdu) || ep == MT_EP_OUT_HCCA)
|
||||
qsel = MT_QSEL_MGMT;
|
||||
else
|
||||
qsel = MT_QSEL_EDCA;
|
||||
|
||||
Reference in New Issue
Block a user