[Deepin-Kernel-SIG] [linux 6.6.y] [Upstream] Add WED support for MT7988 chipset from mainline-v6.7-rc1#1854
Conversation
mainline inclusion from mainline-v6.7-rc1 category: feature Introduce MT7988 SoC compatibility string in mt7986-wo-ccif binding. Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Paolo Abeni <pabeni@redhat.com> (cherry picked from commit 4518b25) Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
mainline inclusion from mainline-v6.7-rc1 category: feature Introduce MT7988 SoC compatibility string in mtk_wed binding. Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Paolo Abeni <pabeni@redhat.com> (cherry picked from commit f881f27) Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
mainline inclusion from mainline-v6.7-rc1 category: feature Similar to mtk_eth_soc, introduce the following wed versioning utility routines: - mtk_wed_is_v1 - mtk_wed_is_v2 This is a preliminary patch to introduce WED support for MT7988 SoC Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Paolo Abeni <pabeni@redhat.com> (cherry picked from commit d274d52) Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
mainline inclusion from mainline-v6.7-rc1 category: feature Check if rx offload is supported running mtk_wed_get_rx_capa routine before configuring it. This is a preliminary patch to introduce Wireless Ethernet Dispatcher (WED) support for MT7988 SoC. Co-developed-by: Sujuan Chen <sujuan.chen@mediatek.com> Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Paolo Abeni <pabeni@redhat.com> (cherry picked from commit 7d5a727) Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
mainline inclusion from mainline-v6.7-rc1 category: feature Rename mtk_rxbm_desc structure in mtk_wed_bm_desc since it will be used even on tx side by MT7988 SoC. Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Paolo Abeni <pabeni@redhat.com> (cherry picked from commit bafd764) Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
mainline inclusion from mainline-v6.7-rc1 category: feature Introduce mtk_wed_buf structure to store both virtual and physical addresses allocated in mtk_wed_tx_buffer_alloc() routine. This is a preliminary patch to add WED support for MT7988 SoC since it relies on a different dma descriptor layout not storing page dma addresses. Co-developed-by: Sujuan Chen <sujuan.chen@mediatek.com> Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Paolo Abeni <pabeni@redhat.com> (cherry picked from commit ff0ea57) Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
…_firmware mainline inclusion from mainline-v6.7-rc1 category: feature Remove mtk_wed_wo_memory_region boot structure in mtk_wed_wo. This is a preliminary patch to introduce WED support for MT7988 SoC. Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Paolo Abeni <pabeni@redhat.com> (cherry picked from commit c6d961a) Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
mainline inclusion from mainline-v6.7-rc1 category: feature Make mtk_wed_wo_memory_region optionals. This is a preliminary patch to introduce Wireless Ethernet Dispatcher support for MT7988 SoC since MT7988 WED fw image will have a different layout. Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Paolo Abeni <pabeni@redhat.com> (cherry picked from commit 71e2135) Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
mainline inclusion from mainline-v6.7-rc1 category: feature Introduce mtk_wed_soc_data utility structure to contain per-SoC definitions. Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Paolo Abeni <pabeni@redhat.com> (cherry picked from commit 9ae7eca) Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
mainline inclusion from mainline-v6.7-rc1 category: feature Similar to MT7986 and MT7622, enable Wireless Ethernet Ditpatcher for MT7988 in order to offload traffic forwarded from LAN/WLAN to WLAN/LAN Co-developed-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com> (cherry picked from commit e2f64db) Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
mainline inclusion from mainline-v6.7-rc1 category: feature Refactor mtk_wed_check_wfdma_rx_fill() in order to be reused adding HW receive offload support for MT7988 SoC. Co-developed-by: Sujuan Chen <sujuan.chen@mediatek.com> Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Paolo Abeni <pabeni@redhat.com> (cherry picked from commit 96ddb4d) Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
…T7988 mainline inclusion from mainline-v6.7-rc1 category: feature Introduce partial AMSDU offload support for MT7988 SoC in order to merge in hw packets belonging to the same AMSDU before passing them to the WLAN nic. Co-developed-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com> (cherry picked from commit b230812) Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
mainline inclusion from mainline-v6.7-rc1 category: feature MT7988 SoC support 802.11 receive reordering offload in hw while MT7986 SoC implements it through the firmware running on the mcu. Co-developed-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com> (cherry picked from commit 6757d34) Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
…s array mainline inclusion from mainline-v6.7-rc1 category: feature Move specific WED2.0 debugfs entries out of regs array. This is a preliminary patch to introduce WED 3.0 debugfs info. Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Paolo Abeni <pabeni@redhat.com> (cherry picked from commit 4b7e02b) Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
mainline inclusion from mainline-v6.7-rc1 category: feature Introduce WED3.0 debugfs entries useful for debugging. Co-developed-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com> (cherry picked from commit 3f3de09) Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
mainline inclusion from mainline-v6.7-rc1 category: feature Introduce support for resetting Wireless Ethernet Dispatcher 3.0 available on MT988 SoC. Co-developed-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com> (cherry picked from commit 1543b8f) Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
Reviewer's GuideAdds WED 3.0 support and MT7988 SoC integration, including HW RRO and partial AMSDU offload paths, extends PPE/WDMA plumbing and debugfs/MCU firmware handling, and refactors WED core code around SoC-specific data and versioned capabilities. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
/approve |
There was a problem hiding this comment.
Hey - I've found 1 issue, and left some high level feedback:
- The new buffer allocation helpers (e.g. mtk_wed_amsdu_buffer_alloc() and mtk_wed_hwrro_buffer_alloc()) lack symmetric cleanup on failure paths: already-allocated pages and descriptors are not freed/unmapped when a later allocation or dma_map_single/page fails, which will leak memory and DMA mappings in partial-init scenarios; consider adding unwind loops mirroring the success cleanup logic.
- In the HW RRO buffer handling, the size used for descriptor allocation and that used for freeing differ (allocation uses dev->wlan.rx_nbuf * sizeof(*desc) while free uses dev->hw_rro.size * sizeof(*desc)), which can lead to over/under frees when rx_nbuf is not equal to the aligned size; it would be safer to use a single, consistent length field for both alloc and free.
- Some of the new debugfs register mask dumps (e.g. the WED_MON_AMSDU_ENG_CNT9() indices reused across different engines) appear to copy-paste indices inconsistently, which risks exposing misleading counters; it may be worth double-checking the engine index and field macros per block to ensure they match the intended hardware registers.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The new buffer allocation helpers (e.g. mtk_wed_amsdu_buffer_alloc() and mtk_wed_hwrro_buffer_alloc()) lack symmetric cleanup on failure paths: already-allocated pages and descriptors are not freed/unmapped when a later allocation or dma_map_single/page fails, which will leak memory and DMA mappings in partial-init scenarios; consider adding unwind loops mirroring the success cleanup logic.
- In the HW RRO buffer handling, the size used for descriptor allocation and that used for freeing differ (allocation uses dev->wlan.rx_nbuf * sizeof(*desc) while free uses dev->hw_rro.size * sizeof(*desc)), which can lead to over/under frees when rx_nbuf is not equal to the aligned size; it would be safer to use a single, consistent length field for both alloc and free.
- Some of the new debugfs register mask dumps (e.g. the WED_MON_AMSDU_ENG_CNT9() indices reused across different engines) appear to copy-paste indices inconsistently, which risks exposing misleading counters; it may be worth double-checking the engine index and field macros per block to ensure they match the intended hardware registers.
## Individual Comments
### Comment 1
<location path="drivers/net/ethernet/mediatek/mtk_wed.c" line_range="522" />
<code_context>
}
+static int
+mtk_wed_amsdu_buffer_alloc(struct mtk_wed_device *dev)
+{
+ struct mtk_wed_hw *hw = dev->hw;
</code_context>
<issue_to_address>
**issue:** AMSdu buffer error path leaks pages and partially mapped buffers.
In mtk_wed_amsdu_buffer_alloc(), if __get_free_pages() or dma_map_single() fails, the error path only dma_unmap_single()s previously mapped buffers and returns, but never free_pages() the corresponding allocations. This leaks memory on partial init failures. Please also free the pages (and reset wed_amsdu[i].txd / txd_phy as needed), mirroring mtk_wed_amsdu_free_buffer().
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| } | ||
|
|
||
| static int | ||
| mtk_wed_amsdu_buffer_alloc(struct mtk_wed_device *dev) |
There was a problem hiding this comment.
issue: AMSdu buffer error path leaks pages and partially mapped buffers.
In mtk_wed_amsdu_buffer_alloc(), if __get_free_pages() or dma_map_single() fails, the error path only dma_unmap_single()s previously mapped buffers and returns, but never free_pages() the corresponding allocations. This leaks memory on partial init failures. Please also free the pages (and reset wed_amsdu[i].txd / txd_phy as needed), mirroring mtk_wed_amsdu_free_buffer().
There was a problem hiding this comment.
Pull request overview
This PR backports upstream MediaTek WED (Wireless Ethernet Dispatcher) v3 support for MT7988 into the 6.6.y tree, extending the existing WED/PPE integration to support new RX/RRO and (partial) AMSDU offload paths, plus new per-SoC abstractions and debugfs visibility.
Changes:
- Add MT7988 (WED v3) support including new rings, reset paths, and RX/RRO/AMSDU plumbing.
- Introduce per-SoC WED definitions via
mtk_wed_soc_datato handle differing register layouts/descriptor sizes across MT7622/MT7986/MT7988. - Extend PPE/WED offload metadata and debugfs outputs for v3-specific monitoring.
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| include/linux/soc/mediatek/mtk_wed.h | Extends public WED device structures and ops for v3 (RRO/page rings, AMSDU capability helpers). |
| include/linux/netdevice.h | Adds WDMA path metadata (amsdu) to net_device_path. |
| drivers/net/wireless/mediatek/mt76/mt7915/mmio.c | Updates RX BM descriptor type rename usage. |
| drivers/net/ethernet/mediatek/mtk_wed.h | Adds per-SoC data, version helper utilities, and PCIe base selection logic. |
| drivers/net/ethernet/mediatek/mtk_wed.c | Main WED v3 implementation: new reset flows, AMSDU buffers, HW-RRO/page BM buffers, ring setup, and IRQ/config changes. |
| drivers/net/ethernet/mediatek/mtk_wed_wo.h | Adds MT7988 WO firmware names and adjusts WO struct fields. |
| drivers/net/ethernet/mediatek/mtk_wed_regs.h | Adds/updates many v3 register definitions and new reset/ctrl bits. |
| drivers/net/ethernet/mediatek/mtk_wed_mcu.c | Refactors WO firmware region handling and adds MT7988 firmware selection. |
| drivers/net/ethernet/mediatek/mtk_wed_debugfs.c | Adds v3 debugfs entries and expands rxinfo/rtqm/rro/amsdu dumps. |
| drivers/net/ethernet/mediatek/mtk_ppe.h | Renames/repurposes FOE fields for AMSDU hints and updates WDMA setter signature. |
| drivers/net/ethernet/mediatek/mtk_ppe.c | Threads AMSDU enable into netsys v3 FOE entries. |
| drivers/net/ethernet/mediatek/mtk_ppe_offload.c | Propagates amsdu from netdevice path into FOE setup; adds WDMA2 port mapping. |
| drivers/net/ethernet/mediatek/mtk_eth_soc.h | Expands WDMA base array to 3 entries. |
| drivers/net/ethernet/mediatek/mtk_eth_soc.c | Adds WDMA2 base for MT7988. |
| Documentation/devicetree/bindings/soc/mediatek/mediatek,mt7986-wo-ccif.yaml | Adds MT7988 WO-CCIF compatible. |
| Documentation/devicetree/bindings/arm/mediatek/mediatek,mt7622-wed.yaml | Adds MT7988 WED compatible. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| for (i = 0; i < MTK_WED_AMSDU_NPAGES; i++) { | ||
| void *ptr; | ||
|
|
||
| /* each segment is 64K */ | ||
| ptr = (void *)__get_free_pages(GFP_KERNEL | __GFP_NOWARN | | ||
| __GFP_ZERO | __GFP_COMP | | ||
| GFP_DMA32, | ||
| get_order(MTK_WED_AMSDU_BUF_SIZE)); | ||
| if (!ptr) | ||
| goto error; | ||
|
|
||
| wed_amsdu[i].txd = ptr; | ||
| wed_amsdu[i].txd_phy = dma_map_single(hw->dev, ptr, | ||
| MTK_WED_AMSDU_BUF_SIZE, | ||
| DMA_TO_DEVICE); | ||
| if (dma_mapping_error(hw->dev, wed_amsdu[i].txd_phy)) | ||
| goto error; | ||
| } | ||
| dev->hw->wed_amsdu = wed_amsdu; | ||
|
|
||
| return 0; | ||
|
|
||
| error: | ||
| for (i--; i >= 0; i--) | ||
| dma_unmap_single(hw->dev, wed_amsdu[i].txd_phy, | ||
| MTK_WED_AMSDU_BUF_SIZE, DMA_TO_DEVICE); | ||
| return -ENOMEM; |
| for (s = 0; s < MTK_WED_BUF_PER_PAGE; s++) { | ||
| u32 txd_size; | ||
| u32 ctrl; | ||
|
|
||
| txd_size = dev->wlan.init_buf(buf, buf_phys, token++); | ||
| struct mtk_wdma_desc *desc = desc_ptr; | ||
|
|
||
| desc->buf0 = cpu_to_le32(buf_phys); | ||
| desc->buf1 = cpu_to_le32(buf_phys + txd_size); | ||
|
|
||
| if (dev->hw->version == 1) | ||
| ctrl = FIELD_PREP(MTK_WDMA_DESC_CTRL_LEN0, txd_size) | | ||
| FIELD_PREP(MTK_WDMA_DESC_CTRL_LEN1, | ||
| MTK_WED_BUF_SIZE - txd_size) | | ||
| MTK_WDMA_DESC_CTRL_LAST_SEG1; | ||
| else | ||
| ctrl = FIELD_PREP(MTK_WDMA_DESC_CTRL_LEN0, txd_size) | | ||
| FIELD_PREP(MTK_WDMA_DESC_CTRL_LEN1_V2, | ||
| MTK_WED_BUF_SIZE - txd_size) | | ||
| MTK_WDMA_DESC_CTRL_LAST_SEG0; | ||
| desc->ctrl = cpu_to_le32(ctrl); | ||
| desc->info = 0; | ||
| desc++; | ||
|
|
||
| if (!mtk_wed_is_v3_or_greater(dev->hw)) { | ||
| u32 txd_size, ctrl; | ||
|
|
||
| txd_size = dev->wlan.init_buf(buf, buf_phys, | ||
| token++); | ||
| desc->buf1 = cpu_to_le32(buf_phys + txd_size); | ||
| ctrl = FIELD_PREP(MTK_WDMA_DESC_CTRL_LEN0, txd_size); | ||
| if (mtk_wed_is_v1(dev->hw)) | ||
| ctrl |= MTK_WDMA_DESC_CTRL_LAST_SEG1 | | ||
| FIELD_PREP(MTK_WDMA_DESC_CTRL_LEN1, | ||
| MTK_WED_BUF_SIZE - txd_size); | ||
| else | ||
| ctrl |= MTK_WDMA_DESC_CTRL_LAST_SEG0 | | ||
| FIELD_PREP(MTK_WDMA_DESC_CTRL_LEN1_V2, | ||
| MTK_WED_BUF_SIZE - txd_size); | ||
| desc->ctrl = cpu_to_le32(ctrl); | ||
| desc->info = 0; | ||
| } else { | ||
| desc->ctrl = cpu_to_le32(token << 16); | ||
| } | ||
|
|
| dev->hw_rro.size = dev->wlan.rx_nbuf & ~(MTK_WED_BUF_PER_PAGE - 1); | ||
| dev->hw_rro.pages = page_list; | ||
| desc = dma_alloc_coherent(dev->hw->dev, | ||
| dev->wlan.rx_nbuf * sizeof(*desc), | ||
| &desc_phys, GFP_KERNEL); | ||
| if (!desc) | ||
| return -ENOMEM; |
| mtk_wed_free_rx_buffer(dev); | ||
| mtk_wed_hwrro_free_buffer(dev); |
| static struct mtk_wed_wo_memory_region mem_region[] = { | ||
| [MTK_WED_WO_REGION_EMI] = { | ||
| .name = "wo-emi", | ||
| }, | ||
| [MTK_WED_WO_REGION_ILM] = { | ||
| .name = "wo-ilm", | ||
| }, | ||
| [MTK_WED_WO_REGION_DATA] = { | ||
| .name = "wo-data", | ||
| .shared = true, | ||
| }, | ||
| [MTK_WED_WO_REGION_BOOT] = { | ||
| .name = "wo-boot", | ||
| }, | ||
| }; | ||
|
|
||
| static u32 wo_r32(struct mtk_wed_wo *wo, u32 reg) | ||
| { | ||
| return readl(wo->boot.addr + reg); | ||
| return readl(mem_region[MTK_WED_WO_REGION_BOOT].addr + reg); | ||
| } | ||
|
|
||
| static void wo_w32(struct mtk_wed_wo *wo, u32 reg, u32 val) | ||
| { | ||
| writel(val, wo->boot.addr + reg); | ||
| writel(val, mem_region[MTK_WED_WO_REGION_BOOT].addr + reg); | ||
| } |
| DUMP_WED_MASK(WED_MON_AMSDU_ENG_CNT9(2), | ||
| WED_AMSDU_ENG_MAX_BUF_MERGED), | ||
| DUMP_WED_MASK(WED_MON_AMSDU_ENG_CNT9(2), | ||
| WED_AMSDU_ENG_MAX_MSDU_MERGED), |
| DUMP_WED_MASK(WED_MON_AMSDU_ENG_CNT9(4), | ||
| WED_AMSDU_ENG_MAX_MSDU_MERGED), |
| DUMP_STR("WED Route QM IGRS0(N2H + Recycle)"), | ||
| DUMP_WED(WED_RTQM_IGRS0_I2HW_DMAD_CNT), | ||
| DUMP_WED(WED_RTQM_IGRS0_I2H_DMAD_CNT(0)), | ||
| DUMP_WED(WED_RTQM_IGRS0_I2H_DMAD_CNT(1)), | ||
| DUMP_WED(WED_RTQM_IGRS0_I2HW_PKT_CNT), | ||
| DUMP_WED(WED_RTQM_IGRS0_I2H_PKT_CNT(0)), | ||
| DUMP_WED(WED_RTQM_IGRS0_I2H_PKT_CNT(0)), | ||
| DUMP_WED(WED_RTQM_IGRS0_FDROP_CNT), | ||
|
|
||
| DUMP_STR("WED Route QM IGRS1(Legacy)"), | ||
| DUMP_WED(WED_RTQM_IGRS1_I2HW_DMAD_CNT), | ||
| DUMP_WED(WED_RTQM_IGRS1_I2H_DMAD_CNT(0)), | ||
| DUMP_WED(WED_RTQM_IGRS1_I2H_DMAD_CNT(1)), | ||
| DUMP_WED(WED_RTQM_IGRS1_I2HW_PKT_CNT), | ||
| DUMP_WED(WED_RTQM_IGRS1_I2H_PKT_CNT(0)), | ||
| DUMP_WED(WED_RTQM_IGRS1_I2H_PKT_CNT(1)), | ||
| DUMP_WED(WED_RTQM_IGRS1_FDROP_CNT), | ||
|
|
||
| DUMP_STR("WED Route QM IGRS2(RRO3.0)"), | ||
| DUMP_WED(WED_RTQM_IGRS2_I2HW_DMAD_CNT), | ||
| DUMP_WED(WED_RTQM_IGRS2_I2H_DMAD_CNT(0)), | ||
| DUMP_WED(WED_RTQM_IGRS2_I2H_DMAD_CNT(1)), | ||
| DUMP_WED(WED_RTQM_IGRS2_I2HW_PKT_CNT), | ||
| DUMP_WED(WED_RTQM_IGRS2_I2H_PKT_CNT(0)), | ||
| DUMP_WED(WED_RTQM_IGRS2_I2H_PKT_CNT(1)), | ||
| DUMP_WED(WED_RTQM_IGRS2_FDROP_CNT), | ||
|
|
||
| DUMP_STR("WED Route QM IGRS3(DEBUG)"), | ||
| DUMP_WED(WED_RTQM_IGRS2_I2HW_DMAD_CNT), | ||
| DUMP_WED(WED_RTQM_IGRS3_I2H_DMAD_CNT(0)), | ||
| DUMP_WED(WED_RTQM_IGRS3_I2H_DMAD_CNT(1)), | ||
| DUMP_WED(WED_RTQM_IGRS3_I2HW_PKT_CNT), | ||
| DUMP_WED(WED_RTQM_IGRS3_I2H_PKT_CNT(0)), | ||
| DUMP_WED(WED_RTQM_IGRS3_I2H_PKT_CNT(1)), | ||
| DUMP_WED(WED_RTQM_IGRS3_FDROP_CNT), |
mainline inclusion from mainline-v6.7-rc1 category: bugfix The WED mcu firmware does not contain all the memory regions defined in the dts reserved_memory node (e.g. MT7986 WED firmware does not contain cpu-boot region). Reverse the mtk_wed_mcu_run_firmware() logic to check all the fw sections are defined in the dts reserved_memory node. Fixes: c6d961a ("net: ethernet: mtk_wed: move mem_region array out of mtk_wed_mcu_load_firmware") Tested-by: Frank Wunderlich <frank-w@public-files.de> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Link: https://lore.kernel.org/r/d983cbfe8ea562fef9264de8f0c501f7d5705bd5.1698098381.git.lorenzo@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> (cherry picked from commit c35d763) Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
mainline inclusion
from mainline-v6.12-rc6
category: bugfix
linux-firmware commit 808cba84 ("mtk_wed: add firmware for mt7988
Wireless Ethernet Dispatcher") added mt7988_wo_{0,1}.bin in the
'mediatek/mt7988' directory while driver current expects the files in
the 'mediatek' directory.
Change path in the driver header now that the firmware has been added.
Fixes: e2f64db ("net: ethernet: mtk_wed: introduce WED support for MT7988")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://patch.msgid.link/Zxz0GWTR5X5LdWPe@pidgin.makrotopia.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
(cherry picked from commit 637f414)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Avenger-285714 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Link: https://lore.kernel.org/all/cover.1695032290.git.lorenzo@kernel.org/
Merged:
net: ethernet: mtk_wed: fix EXT_INT_STATUS_RX_FBUF definitions for MT7986 SoC
Similar to MT7622 and MT7986, introduce Wireless Ethernet Dispatcher (WED)
support for MT7988 chipset in order to offload to the hw packet engine traffic
received from LAN/WAN device to WLAN nic (MT7996E).
Add WED RX support in order to offload traffic received by WLAN nic to the
wired interfaces (LAN/WAN).
Changes since v1:
Lorenzo Bianconi (12):
dt-bindings: soc: mediatek: mt7986-wo-ccif: add binding for MT7988 SoC
dt-bindings: arm: mediatek: mt7622-wed: add WED binding for MT7988 SoC
net: ethernet: mtk_wed: introduce versioning utility routines
net: ethernet: mtk_wed: do not configure rx offload if not supported
net: ethernet: mtk_wed: rename mtk_rxbm_desc in mtk_wed_bm_desc
net: ethernet: mtk_wed: introduce mtk_wed_buf structure
net: ethernet: mtk_wed: move mem_region array out of
mtk_wed_mcu_load_firmware
net: ethernet: mtk_wed: make memory region optional
net: ethernet: mtk_wed: fix EXT_INT_STATUS_RX_FBUF definitions for
MT7986 SoC
net: ethernet: mtk_wed: add mtk_wed_soc_data structure
net: ethernet: mtk_wed: refactor mtk_wed_check_wfdma_rx_fill routine
net: ethernet: mtk_wed: debugfs: move wed_v2 specific regs out of regs
array
Sujuan Chen (5):
net: ethernet: mtk_wed: introduce WED support for MT7988
net: ethernet: mtk_wed: introduce partial AMSDU offload support for
MT7988
net: ethernet: mtk_wed: introduce hw_rro support for MT7988
net: ethernet: mtk_wed: debugfs: add WED 3.0 debugfs entries
net: ethernet: mtk_wed: add wed 3.0 reset support
.../arm/mediatek/mediatek,mt7622-wed.yaml | 1 +
.../soc/mediatek/mediatek,mt7986-wo-ccif.yaml | 1 +
drivers/net/ethernet/mediatek/mtk_eth_soc.c | 1 +
drivers/net/ethernet/mediatek/mtk_eth_soc.h | 2 +-
drivers/net/ethernet/mediatek/mtk_ppe.c | 4 +-
drivers/net/ethernet/mediatek/mtk_ppe.h | 19 +-
.../net/ethernet/mediatek/mtk_ppe_offload.c | 6 +-
drivers/net/ethernet/mediatek/mtk_wed.c | 1400 ++++++++++++++---
drivers/net/ethernet/mediatek/mtk_wed.h | 57 +
.../net/ethernet/mediatek/mtk_wed_debugfs.c | 400 ++++-
drivers/net/ethernet/mediatek/mtk_wed_mcu.c | 95 +-
drivers/net/ethernet/mediatek/mtk_wed_regs.h | 369 ++++-
drivers/net/ethernet/mediatek/mtk_wed_wo.h | 3 +-
.../net/wireless/mediatek/mt76/mt7915/mmio.c | 2 +-
include/linux/netdevice.h | 1 +
include/linux/soc/mediatek/mtk_wed.h | 76 +-
16 files changed, 2109 insertions(+), 328 deletions(-)
--
2.41.0
Summary by Sourcery
Add WED v3 support for the MT7988 SoC, including RX/RRO/AMSDU offload paths and per-SoC abstraction, and extend PPE/WED integration and debugfs/firmware handling accordingly.
New Features:
Bug Fixes:
Enhancements:
Documentation: