aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/mediatek/mtk_wed_mcu.c
AgeCommit message (Collapse)AuthorFilesLines
2023-10-24net: ethernet: mtk_wed: remove wo pointer in wo_r32/wo_w32 signatureLorenzo Bianconi1-6/+6
wo pointer is no longer used in wo_r32 and wo_w32 routines so get rid of it. Signed-off-by: Lorenzo Bianconi <[email protected]> Link: https://lore.kernel.org/r/530537db0872f7523deff21f0a5dfdd9b75fdc9d.1698098459.git.lorenzo@kernel.org Signed-off-by: Jakub Kicinski <[email protected]>
2023-10-24net: ethernet: mtk_wed: fix firmware loading for MT7986 SoCLorenzo Bianconi1-23/+25
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: c6d961aeaa77 ("net: ethernet: mtk_wed: move mem_region array out of mtk_wed_mcu_load_firmware") Tested-by: Frank Wunderlich <[email protected]> Signed-off-by: Lorenzo Bianconi <[email protected]> Reviewed-by: Jacob Keller <[email protected]> Link: https://lore.kernel.org/r/d983cbfe8ea562fef9264de8f0c501f7d5705bd5.1698098381.git.lorenzo@kernel.org Signed-off-by: Jakub Kicinski <[email protected]>
2023-09-19net: ethernet: mtk_wed: introduce WED support for MT7988Sujuan Chen1-9/+24
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 <[email protected]> Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Sujuan Chen <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
2023-09-19net: ethernet: mtk_wed: make memory region optionalLorenzo Bianconi1-10/+13
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 <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
2023-09-19net: ethernet: mtk_wed: move mem_region array out of mtk_wed_mcu_load_firmwareLorenzo Bianconi1-19/+18
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 <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
2023-09-19net: ethernet: mtk_wed: do not configure rx offload if not supportedLorenzo Bianconi1-1/+1
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 <[email protected]> Signed-off-by: Sujuan Chen <[email protected]> Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
2023-09-19net: ethernet: mtk_wed: introduce versioning utility routinesLorenzo Bianconi1-1/+1
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 <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
2023-09-14net: ethernet: mtk_wed: check update_wo_rx_stats in mtk_wed_update_rx_stats()Lorenzo Bianconi1-0/+3
Check if update_wo_rx_stats function pointer is properly set in mtk_wed_update_rx_stats routine before accessing it. Signed-off-by: Lorenzo Bianconi <[email protected]> Reviewed-by: Simon Horman <[email protected]> Link: https://lore.kernel.org/r/b0d233386e059bccb59f18f69afb79a7806e5ded.1694507226.git.lorenzo@kernel.org Signed-off-by: Paolo Abeni <[email protected]>
2023-04-22net: ethernet: mtk_eth_soc: use WO firmware for MT7981Daniel Golle1-1/+6
In order to support wireless offloading on MT7981 we need to load the appropriate firmware. Recognize MT7981 and load mt7981_wo.bin. Signed-off-by: Daniel Golle <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2022-12-08net: ethernet: mtk_wed: fix some possible NULL pointer dereferencesLorenzo Bianconi1-0/+3
Fix possible NULL pointer dereference in mtk_wed_detach routine checking wo pointer is properly allocated before running mtk_wed_wo_reset() and mtk_wed_wo_deinit(). Even if it is just a theoretical issue at the moment check wo pointer is not NULL in mtk_wed_mcu_msg_update. Moreover, honor mtk_wed_mcu_send_msg return value in mtk_wed_wo_reset() Fixes: 799684448e3e ("net: ethernet: mtk_wed: introduce wed wo support") Fixes: 4c5de09eb0d0 ("net: ethernet: mtk_wed: add configure wed wo support") Signed-off-by: Lorenzo Bianconi <[email protected]> Reviewed-by: Leon Romanovsky <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
2022-11-11net: ethernet: mtk_wed: add configure wed wo supportLorenzo Bianconi1-8/+37
Enable RX Wireless Ethernet Dispatch available on MT7986 Soc. Tested-by: Daniel Golle <[email protected]> Co-developed-by: Sujuan Chen <[email protected]> Signed-off-by: Sujuan Chen <[email protected]> Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2022-11-11net: ethernet: mtk_wed: introduce wed wo supportLorenzo Bianconi1-2/+1
Introduce WO chip support to mtk wed driver. MTK WED WO is used to implement RX Wireless Ethernet Dispatch and offload traffic received by wlan nic to the wired interface. Tested-by: Daniel Golle <[email protected]> Co-developed-by: Sujuan Chen <[email protected]> Signed-off-by: Sujuan Chen <[email protected]> Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2022-11-11net: ethernet: mtk_wed: introduce wed mcu supportSujuan Chen1-0/+359
Introduce WED mcu support used to configure WED WO chip. This is a preliminary patch in order to add RX Wireless Ethernet Dispatch available on MT7986 SoC. Tested-by: Daniel Golle <[email protected]> Co-developed-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Sujuan Chen <[email protected]> Signed-off-by: David S. Miller <[email protected]>