Commit 7dcf3c04 authored by Felix Fietkau's avatar Felix Fietkau

mt76: mt7915: fix tx skb dma unmap

The first pointer in the txp needs to be unmapped as well, otherwise it will
leak DMA mapping entries
Reported-by: default avatarBen Greear <greearb@candelatech.com>
Fixes: 27d5c528 ("mt76: fix double DMA unmap of the first buffer on 7615/7915")
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent ebee7885
......@@ -1136,7 +1136,7 @@ void mt7915_txp_skb_unmap(struct mt76_dev *dev,
int i;
txp = mt7915_txwi_to_txp(dev, t);
for (i = 1; i < txp->nbuf; i++)
for (i = 0; i < txp->nbuf; i++)
dma_unmap_single(dev->dev, le32_to_cpu(txp->buf[i]),
le16_to_cpu(txp->len[i]), DMA_TO_DEVICE);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment