mirror of
https://github.com/torvalds/linux.git
synced 2026-10-10 12:28:02 +02:00
wifi: mt76: mt792x: consolidate rx interrupt masks into all_complete_mask
Add all_complete_mask to irq_map rx sub-struct and use it in mt792x_irq_tasklet() and mt792x_dma_enable() to replace individual per-ring mask OR expressions. This is a preparation patch before enabling MT7928 PCIe support. Signed-off-by: Emery Hsin <emery.hsin@mediatek.com> Link: https://patch.msgid.link/20260612075042.2577193-1-jb.tsai@mediatek.com Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
bda8324270
commit
047dc4dc58
|
|
@ -200,6 +200,7 @@ struct mt792x_irq_map {
|
|||
u32 mcu_complete_mask;
|
||||
} tx;
|
||||
struct {
|
||||
u32 all_complete_mask;
|
||||
u32 data_complete_mask;
|
||||
u32 wm_complete_mask;
|
||||
u32 wm2_complete_mask;
|
||||
|
|
|
|||
|
|
@ -39,9 +39,7 @@ void mt792x_irq_tasklet(unsigned long data)
|
|||
|
||||
trace_dev_irq(&dev->mt76, intr, dev->mt76.mmio.irqmask);
|
||||
|
||||
mask |= intr & (irq_map->rx.data_complete_mask |
|
||||
irq_map->rx.wm_complete_mask |
|
||||
irq_map->rx.wm2_complete_mask);
|
||||
mask |= intr & irq_map->rx.all_complete_mask;
|
||||
if (intr & dev->irq_map->tx.mcu_complete_mask)
|
||||
mask |= dev->irq_map->tx.mcu_complete_mask;
|
||||
|
||||
|
|
@ -276,9 +274,7 @@ int mt792x_dma_enable(struct mt792x_dev *dev)
|
|||
/* enable interrupts for TX/RX rings */
|
||||
mt76_connac_irq_enable(&dev->mt76,
|
||||
dev->irq_map->tx.all_complete_mask |
|
||||
dev->irq_map->rx.data_complete_mask |
|
||||
dev->irq_map->rx.wm2_complete_mask |
|
||||
dev->irq_map->rx.wm_complete_mask |
|
||||
dev->irq_map->rx.all_complete_mask |
|
||||
MT_INT_MCU_CMD);
|
||||
mt76_set(dev, MT_MCU2HOST_SW_INT_ENA, MT_MCU_CMD_WAKE_RX_PCIE);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user