diff options
author | Felix Fietkau <nbd@nbd.name> | 2019-09-06 10:19:19 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2019-11-20 13:23:49 +0100 |
commit | 355f8d00c597f944213708d296e86a06f7a9ade8 (patch) | |
tree | 729833b0e2650e11eef05854090a4df9cf922bfc /drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c | |
parent | b02f42f4ed2ff5756780da024108866aa87aa528 (diff) | |
download | linux-stable-355f8d00c597f944213708d296e86a06f7a9ade8.tar.gz linux-stable-355f8d00c597f944213708d296e86a06f7a9ade8.tar.bz2 linux-stable-355f8d00c597f944213708d296e86a06f7a9ade8.zip |
mt76: mt76x02: track approximate tx airtime for airtime fairness and survey
Estimate by calculating duration for EWMA packet size + estimated A-MPDU
length on tx status events
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c b/drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c index 203420087ac4..4294ffc0478b 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c @@ -104,7 +104,9 @@ int mt76x02u_tx_prepare_skb(struct mt76_dev *mdev, void *data, /* encode packet rate for no-skb packet id to fix up status reporting */ if (pid == MT_PACKET_ID_NO_SKB) pid = MT_PACKET_ID_HAS_RATE | - (le16_to_cpu(txwi->rate) & MT_RXWI_RATE_INDEX); + (le16_to_cpu(txwi->rate) & MT_PKTID_RATE) | + FIELD_PREP(MT_PKTID_AC, + skb_get_queue_mapping(tx_info->skb)); txwi->pktid = pid; |