mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
wifi: mt76: add mt76_connac_irq_enable utility routine
Most of connac based drivers (mt7921, mt7615, mt7663) share the same code to enable interrupts. Move it in mt76_connac module. Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
482d2a765b
commit
2936b03618
+6
-7
@@ -31,14 +31,12 @@ MODULE_PARM_DESC(disable_aspm, "disable PCI ASPM support");
|
||||
static void
|
||||
mt7921_rx_poll_complete(struct mt76_dev *mdev, enum mt76_rxq_id q)
|
||||
{
|
||||
struct mt7921_dev *dev = container_of(mdev, struct mt7921_dev, mt76);
|
||||
|
||||
if (q == MT_RXQ_MAIN)
|
||||
mt7921_irq_enable(dev, MT_INT_RX_DONE_DATA);
|
||||
mt76_connac_irq_enable(mdev, MT_INT_RX_DONE_DATA);
|
||||
else if (q == MT_RXQ_MCU_WA)
|
||||
mt7921_irq_enable(dev, MT_INT_RX_DONE_WM2);
|
||||
mt76_connac_irq_enable(mdev, MT_INT_RX_DONE_WM2);
|
||||
else
|
||||
mt7921_irq_enable(dev, MT_INT_RX_DONE_WM);
|
||||
mt76_connac_irq_enable(mdev, MT_INT_RX_DONE_WM);
|
||||
}
|
||||
|
||||
static irqreturn_t mt7921_irq_handler(int irq, void *dev_instance)
|
||||
@@ -469,8 +467,9 @@ static int mt7921_pci_resume(struct device *device)
|
||||
|
||||
/* enable interrupt */
|
||||
mt76_wr(dev, MT_PCIE_MAC_INT_ENABLE, 0xff);
|
||||
mt7921_irq_enable(dev, MT_INT_RX_DONE_ALL | MT_INT_TX_DONE_ALL |
|
||||
MT_INT_MCU_CMD);
|
||||
mt76_connac_irq_enable(&dev->mt76,
|
||||
MT_INT_RX_DONE_ALL | MT_INT_TX_DONE_ALL |
|
||||
MT_INT_MCU_CMD);
|
||||
mt76_set(dev, MT_MCU2HOST_SW_INT_ENA, MT_MCU_CMD_WAKE_RX_PCIE);
|
||||
|
||||
/* put dma enabled */
|
||||
|
||||
Reference in New Issue
Block a user