wifi: mt76: mt7996: Introduce RRO MSDU callbacks

Introduce rx_rro_ind_process and rx_rro_add_msdu_page callbacks and the
related logic in the MT7996 driver. This is a preliminary patch to
decouple RRO logic from WED support and reuse RRO when WED module is not
available.

Signed-off-by: Rex Lu <[email protected]>
Co-developed-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
Rex Lu
2025-09-04 19:09:11 +02:00
committed by Felix Fietkau
parent 6b518355fe
commit 13eb05fa4a
7 changed files with 400 additions and 0 deletions
+6
View File
@@ -775,6 +775,10 @@ void mt7996_rro_hw_init(struct mt7996_dev *dev)
if (!dev->has_rro)
return;
INIT_LIST_HEAD(&dev->wed_rro.page_cache);
for (i = 0; i < ARRAY_SIZE(dev->wed_rro.page_map); i++)
INIT_LIST_HEAD(&dev->wed_rro.page_map[i]);
if (is_mt7992(&dev->mt76)) {
/* Set emul 3.0 function */
mt76_wr(dev, MT_RRO_3_0_EMU_CONF,
@@ -1657,6 +1661,8 @@ void mt7996_unregister_device(struct mt7996_dev *dev)
mt7996_mcu_exit(dev);
mt7996_tx_token_put(dev);
mt7996_dma_cleanup(dev);
if (dev->has_rro && !mtk_wed_device_active(&dev->mt76.mmio.wed))
mt7996_rro_msdu_page_map_free(dev);
tasklet_disable(&dev->mt76.irq_tasklet);
mt76_free_device(&dev->mt76);