wifi: mt76: mt7996: Fix NULL pointer dereference in mt7996_init_tx_queues()

When MT76_NPU and CONFIG_NET_MEDIATEK_SOC_WED are enabled and
mt76 detects properly the Airoha NPU SoC, mt7996_init_tx_queues() will
dereference a NULL WED pointer.
Fix the issue by always passing the WED pointer from mt7996_dma_init().

Fixes: cd7951f242a7 ("wifi: mt76: mt7996: Integrate MT7990 dma configuration for NPU")
Signed-off-by: Lorenzo Bianconi <[email protected]>
Link: https://patch.msgid.link/[email protected]
This commit is contained in:
Lorenzo Bianconi
2026-05-28 11:16:16 +02:00
committed by Felix Fietkau
parent 756b1c67eb
commit 58331e62df
+1 -1
View File
@@ -683,7 +683,7 @@ int mt7996_dma_init(struct mt7996_dev *dev)
ret = mt7996_init_tx_queues(&dev->phy, MT_TXQ_ID(0), ret = mt7996_init_tx_queues(&dev->phy, MT_TXQ_ID(0),
MT7996_NPU_TX_RING_SIZE, MT7996_NPU_TX_RING_SIZE,
MT_TXQ_RING_BASE(0) + hif1_ofs, MT_TXQ_RING_BASE(0) + hif1_ofs,
NULL); wed);
else else
ret = mt7996_init_tx_queues(&dev->phy, ret = mt7996_init_tx_queues(&dev->phy,
MT_TXQ_ID(dev->mphy.band_idx), MT_TXQ_ID(dev->mphy.band_idx),