diff options
author | Lorenzo Bianconi <lorenzo@kernel.org> | 2020-09-05 11:26:04 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2020-09-24 18:10:19 +0200 |
commit | e98e6df6d6820c8609315630409cd8766953d122 (patch) | |
tree | 94e5e889261c890e199436277c813e987582dbb9 /drivers/net/wireless/mediatek/mt76/sdio.c | |
parent | ab25d9d46760d8e5450edd8e12386654940803a5 (diff) | |
download | linux-stable-e98e6df6d6820c8609315630409cd8766953d122.tar.gz linux-stable-e98e6df6d6820c8609315630409cd8766953d122.tar.bz2 linux-stable-e98e6df6d6820c8609315630409cd8766953d122.zip |
mt76: move pad estimation out of mt76_skb_adjust_pad
Move frame pad computation out of mt76_skb_adjust_pad routine.
This is a preliminary patch to introduce sdio tx aggregation.
Tested-by: Sean Wang <sean.wang@mediatek.com>
Co-developed-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/sdio.c')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/sdio.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/sdio.c b/drivers/net/wireless/mediatek/mt76/sdio.c index 7777d4944081..9a4d95a2a707 100644 --- a/drivers/net/wireless/mediatek/mt76/sdio.c +++ b/drivers/net/wireless/mediatek/mt76/sdio.c @@ -226,12 +226,13 @@ mt76s_tx_queue_skb_raw(struct mt76_dev *dev, enum mt76_txq_id qid, struct sk_buff *skb, u32 tx_info) { struct mt76_queue *q = dev->q_tx[qid]; - int ret = -ENOSPC, len = skb->len; + int ret = -ENOSPC, len = skb->len, pad; if (q->queued == q->ndesc) goto error; - ret = mt76_skb_adjust_pad(skb); + pad = round_up(skb->len, 4) - skb->len; + ret = mt76_skb_adjust_pad(skb, pad); if (ret) goto error; |