mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
mt76: rename mt76_driver_ops txwi_flags to drv_flags and include tx aligned4
This reduces the struct size and is useful for adding more flags later Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
@@ -164,7 +164,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))
|
||||
if (!(dev->drv->drv_flags & MT_DRV_TXWI_NO_FREE))
|
||||
mt76_put_txwi(dev, entry.txwi);
|
||||
wake = !flush;
|
||||
}
|
||||
@@ -299,7 +299,7 @@ mt76_dma_tx_queue_skb(struct mt76_dev *dev, enum mt76_txq_id qid,
|
||||
txwi = mt76_get_txwi_ptr(dev, t);
|
||||
|
||||
skb->prev = skb->next = NULL;
|
||||
if (dev->drv->tx_aligned4_skbs)
|
||||
if (dev->drv->drv_flags & MT_DRV_TX_ALIGNED4_SKBS)
|
||||
mt76_insert_hdr_pad(skb);
|
||||
|
||||
len = skb_headlen(skb);
|
||||
|
||||
@@ -279,11 +279,11 @@ struct mt76_hw_cap {
|
||||
bool has_5ghz;
|
||||
};
|
||||
|
||||
#define MT_TXWI_NO_FREE BIT(0)
|
||||
#define MT_DRV_TXWI_NO_FREE BIT(0)
|
||||
#define MT_DRV_TX_ALIGNED4_SKBS BIT(1)
|
||||
|
||||
struct mt76_driver_ops {
|
||||
bool tx_aligned4_skbs;
|
||||
u32 txwi_flags;
|
||||
u32 drv_flags;
|
||||
u16 txwi_size;
|
||||
|
||||
void (*update_survey)(struct mt76_dev *dev);
|
||||
|
||||
+1
-1
@@ -72,7 +72,7 @@ static int mt7615_pci_probe(struct pci_dev *pdev,
|
||||
static const struct mt76_driver_ops drv_ops = {
|
||||
/* txwi_size = txd size + txp size */
|
||||
.txwi_size = MT_TXD_SIZE + sizeof(struct mt7615_txp),
|
||||
.txwi_flags = MT_TXWI_NO_FREE,
|
||||
.drv_flags = MT_DRV_TXWI_NO_FREE,
|
||||
.tx_prepare_skb = mt7615_tx_prepare_skb,
|
||||
.tx_complete_skb = mt7615_tx_complete_skb,
|
||||
.rx_skb = mt7615_queue_rx_skb,
|
||||
|
||||
+1
-1
@@ -142,7 +142,7 @@ mt76x0e_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||
{
|
||||
static const struct mt76_driver_ops drv_ops = {
|
||||
.txwi_size = sizeof(struct mt76x02_txwi),
|
||||
.tx_aligned4_skbs = true,
|
||||
.drv_flags = MT_DRV_TX_ALIGNED4_SKBS,
|
||||
.update_survey = mt76x02_update_channel,
|
||||
.tx_prepare_skb = mt76x02_tx_prepare_skb,
|
||||
.tx_complete_skb = mt76x02_tx_complete_skb,
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ mt76pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||
{
|
||||
static const struct mt76_driver_ops drv_ops = {
|
||||
.txwi_size = sizeof(struct mt76x02_txwi),
|
||||
.tx_aligned4_skbs = true,
|
||||
.drv_flags = MT_DRV_TX_ALIGNED4_SKBS,
|
||||
.update_survey = mt76x02_update_channel,
|
||||
.tx_prepare_skb = mt76x02_tx_prepare_skb,
|
||||
.tx_complete_skb = mt76x02_tx_complete_skb,
|
||||
|
||||
Reference in New Issue
Block a user