Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6ca66722 authored by Lorenzo Bianconi's avatar Lorenzo Bianconi Committed by Felix Fietkau
Browse files

mt76: dma: introduce skb field in mt76_txwi_cache



Introduce skb field in mt76_txwi_cache. Moreover add txwi_flags
to mt76_driver_ops since new chipsets will release mt76_txwi_cache/skbs
at tx completion instead of dma one.
This is a preliminary patch to add mt7615 support

Signed-off-by: default avatarLorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent cfaae9e6
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -174,6 +174,7 @@ mt76_dma_tx_cleanup(struct mt76_dev *dev, enum mt76_txq_id qid, bool flush)
			dev->drv->tx_complete_skb(dev, qid, &entry);

		if (entry.txwi) {
			if (!(dev->drv->txwi_flags & MT_TXWI_NO_FREE))
				mt76_put_txwi(dev, entry.txwi);
			wake = !flush;
		}
+5 −0
Original line number Diff line number Diff line
@@ -232,6 +232,8 @@ struct mt76_txq {
struct mt76_txwi_cache {
	struct list_head list;
	dma_addr_t dma_addr;

	struct sk_buff *skb;
};

struct mt76_rx_tid {
@@ -285,8 +287,11 @@ struct mt76_hw_cap {
	bool has_5ghz;
};

#define MT_TXWI_NO_FREE			BIT(0)

struct mt76_driver_ops {
	bool tx_aligned4_skbs;
	u32 txwi_flags;
	u16 txwi_size;

	void (*update_survey)(struct mt76_dev *dev);
+1 −0
Original line number Diff line number Diff line
@@ -74,6 +74,7 @@ mt76_put_txwi(struct mt76_dev *dev, struct mt76_txwi_cache *t)
	list_add(&t->list, &dev->txwi_cache);
	spin_unlock_bh(&dev->lock);
}
EXPORT_SYMBOL_GPL(mt76_put_txwi);

void mt76_tx_free(struct mt76_dev *dev)
{