Lorenzo Bianconi and Felix Fietkau
a3b6c67c97
wifi: mt76: Add the capability to set TX token start ID
...
This is a preliminary patch to enable traffic forward offloading via the
Airoha NPU module available on the Airoha EN7581 SoC.
Signed-off-by: Lorenzo Bianconi <[email protected] >
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected] >
2025-10-30 11:48:48 +00:00
Lorenzo Bianconi and Felix Fietkau
85e6517b0a
wifi: mt76: Add mt76_dev pointer in mt76_queue struct.
...
This is a preliminary patch to enable traffic forward offloading via the
Airoha NPU module available on the Airoha EN7581 SoC.
Signed-off-by: Lorenzo Bianconi <[email protected] >
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected] >
2025-10-30 11:48:48 +00:00
Lorenzo Bianconi and Felix Fietkau
05b3d899ad
wifi: mt76: Move Q_READ/Q_WRITE definitions in dma.h
...
This is a preliminary patch to enable traffic forward offloading between
the MT76 NIC and the Airoha ethernet one via the Airoha NPU module
available on the Airoha EN7581 SoC.
Signed-off-by: Lorenzo Bianconi <[email protected] >
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected] >
2025-10-30 11:48:48 +00:00
Lorenzo Bianconi and Felix Fietkau
0aece3089a
wifi: mt76: mt7996: Remove useless check in mt7996_msdu_page_get_from_cache()
...
Get rid of useless null-pointer check in mt7996_msdu_page_get_from_cache
since we have already verfied the list is not empty.
Fixes: b1e58e137b616 ("wifi: mt76: mt7996: Introduce RRO MSDU callbacks")
Reported-by: kernel test robot <[email protected] >
Closes: https://lore.kernel.org/r/[email protected] /
Signed-off-by: Lorenzo Bianconi <[email protected] >
Link: https://patch.msgid.link/20251014-mt7996_msdu_page_get_from_cache-remove-null-ptr-check-v1-1-fbeb7881e192@kernel.org
Signed-off-by: Felix Fietkau <[email protected] >
2025-10-30 11:48:48 +00:00
Lorenzo Bianconi and Felix Fietkau
1e91eadc9d
wifi: mt76: wed: use proper wed reference in mt76 wed driver callabacks
...
MT7996 driver can use both wed and wed_hif2 devices to offload traffic
from/to the wireless NIC. In the current codebase we assume to always
use the primary wed device in wed callbacks resulting in the following
crash if the hw runs wed_hif2 (e.g. 6GHz link).
[ 297.455876] Unable to handle kernel read from unreadable memory at virtual address 000000000000080a
[ 297.464928] Mem abort info:
[ 297.467722] ESR = 0x0000000096000005
[ 297.471461] EC = 0x25: DABT (current EL), IL = 32 bits
[ 297.476766] SET = 0, FnV = 0
[ 297.479809] EA = 0, S1PTW = 0
[ 297.482940] FSC = 0x05: level 1 translation fault
[ 297.487809] Data abort info:
[ 297.490679] ISV = 0, ISS = 0x00000005, ISS2 = 0x00000000
[ 297.496156] CM = 0, WnR = 0, TnD = 0, TagAccess = 0
[ 297.501196] GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0
[ 297.506500] user pgtable: 4k pages, 39-bit VAs, pgdp=0000000107480000
[ 297.512927] [000000000000080a] pgd=08000001097fb003, p4d=08000001097fb003, pud=08000001097fb003, pmd=0000000000000000
[ 297.523532] Internal error: Oops: 0000000096000005 [#1 ] SMP
[ 297.715393] CPU: 2 UID: 0 PID: 45 Comm: kworker/u16:2 Tainted: G O 6.12.50 #0
[ 297.723908] Tainted: [O]=OOT_MODULE
[ 297.727384] Hardware name: Banana Pi BPI-R4 (2x SFP+) (DT)
[ 297.732857] Workqueue: nf_ft_offload_del nf_flow_rule_route_ipv6 [nf_flow_table]
[ 297.740254] pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[ 297.747205] pc : mt76_wed_offload_disable+0x64/0xa0 [mt76]
[ 297.752688] lr : mtk_wed_flow_remove+0x58/0x80
[ 297.757126] sp : ffffffc080fe3ae0
[ 297.760430] x29: ffffffc080fe3ae0 x28: ffffffc080fe3be0 x27: 00000000deadbef7
[ 297.767557] x26: ffffff80c5ebca00 x25: 0000000000000001 x24: ffffff80c85f4c00
[ 297.774683] x23: ffffff80c1875b78 x22: ffffffc080d42cd0 x21: ffffffc080660018
[ 297.781809] x20: ffffff80c6a076d0 x19: ffffff80c6a043c8 x18: 0000000000000000
[ 297.788935] x17: 0000000000000000 x16: 0000000000000001 x15: 0000000000000000
[ 297.796060] x14: 0000000000000019 x13: ffffff80c0ad8ec0 x12: 00000000fa83b2da
[ 297.803185] x11: ffffff80c02700c0 x10: ffffff80c0ad8ec0 x9 : ffffff81fef96200
[ 297.810311] x8 : ffffff80c02700c0 x7 : ffffff80c02700d0 x6 : 0000000000000002
[ 297.817435] x5 : 0000000000000400 x4 : 0000000000000000 x3 : 0000000000000000
[ 297.824561] x2 : 0000000000000001 x1 : 0000000000000800 x0 : ffffff80c6a063c8
[ 297.831686] Call trace:
[ 297.834123] mt76_wed_offload_disable+0x64/0xa0 [mt76]
[ 297.839254] mtk_wed_flow_remove+0x58/0x80
[ 297.843342] mtk_flow_offload_cmd+0x434/0x574
[ 297.847689] mtk_wed_setup_tc_block_cb+0x30/0x40
[ 297.852295] nf_flow_offload_ipv6_hook+0x7f4/0x964 [nf_flow_table]
[ 297.858466] nf_flow_rule_route_ipv6+0x438/0x4a4 [nf_flow_table]
[ 297.864463] process_one_work+0x174/0x300
[ 297.868465] worker_thread+0x278/0x430
[ 297.872204] kthread+0xd8/0xdc
[ 297.875251] ret_from_fork+0x10/0x20
[ 297.878820] Code: 928b5ae0 8b000273 91400a60 f943fa61 (79401421)
[ 297.884901] ---[ end trace 0000000000000000 ]---
Fix the issue detecting the proper wed reference to use running wed
callabacks.
Fixes: 83eafc9251d6 ("wifi: mt76: mt7996: add wed tx support")
Tested-by: Daniel Pawlik <[email protected] >
Tested-by: Matteo Croce <[email protected] >
Signed-off-by: Lorenzo Bianconi <[email protected] >
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected] >
2025-10-13 12:51:05 +02:00
Lorenzo Bianconi and Felix Fietkau
754e335704
wifi: mt76: mt7996: Remove unnecessary link_id checks in mt7996_tx
...
Remove unnecessary link_id checks in mt7996_tx routine since if the link
identifier provided by mac80211 is unspecified the value will be
overwritten at the beginning on the function.
Fixes: f940c9b7aef6 ("wifi: mt76: mt7996: Set proper link destination address in mt7996_tx()")
Signed-off-by: Lorenzo Bianconi <[email protected] >
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected] >
2025-10-13 12:49:14 +02:00
Lorenzo Bianconi and Felix Fietkau
ea99986935
wifi: mt76: mt7996: Add missing DMA sync for EAPOL frames
...
Add missing DMA sync before updating EAPOL frames 802.11 addresses.
Signed-off-by: Lorenzo Bianconi <[email protected] >
Link: https://patch.msgid.link/20250909-mt7996-mlo-eapol-missing-dma-sync-v1-1-623924fdb875@kernel.org
Signed-off-by: Felix Fietkau <[email protected] >
2025-09-09 18:07:56 +02:00
Lorenzo Bianconi and Felix Fietkau
7b4b6c8445
wifi: mt76: Convert mt76_wed_rro_ind to LE
...
Do not use bitmask in mt76_wed_rro_ind DMA descriptor in order to not
break endianness.
This patch is based on the following series:
https://lore.kernel.org/linux-wireless/[email protected] /T/#m8b488004d69036cd3672b9eeca8005a937ec0313
Fixes: 950d0abb5cd94 ("wifi: mt76: mt7996: add wed rx support")
Signed-off-by: Lorenzo Bianconi <[email protected] >
Link: https://patch.msgid.link/301d5f2982ddb729c876fb65f9ac2443ce3f5ff1.1757414621.git.lorenzo@kernel.org
Signed-off-by: Felix Fietkau <[email protected] >
2025-09-09 15:08:35 +02:00
Lorenzo Bianconi and Felix Fietkau
0a32ae3cc2
wifi: mt76: Add mt76_dma_get_rxdmad_c_buf utility routione
...
Introduce mt76_dma_get_rxdmad_c_buf routine to process packets received
by HW-RRO v3.1 module.
This is a preliminary patch to introduce SW path for HW-RRO v3.1 module
available on MT7992 chipset.
Co-developed-by: Rex Lu <[email protected] >
Signed-off-by: Rex Lu <[email protected] >
Signed-off-by: Lorenzo Bianconi <[email protected] >
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected] >
2025-09-04 19:09:11 +02:00
Lorenzo Bianconi and Felix Fietkau
ac1bca4997
wifi: mt76: Add rx_queue_init callback
...
Introduce rx_queue_init DMA callback. This is a preliminary patch to
configure RRO RX queues and decouple RRO logic from WED support.
Co-developed-by: Rex Lu <[email protected] >
Signed-off-by: Rex Lu <[email protected] >
Signed-off-by: Lorenzo Bianconi <[email protected] >
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected] >
2025-09-04 19:09:11 +02:00
Lorenzo Bianconi and Felix Fietkau
f559eef156
wifi: mt76: mt7996: Fix RX packets configuration for primary WED device
...
In order to properly set the number of rx packets for primary WED device
if hif device is available, move hif pointer initialization before
running mt7996_mmio_wed_init routine.
Fixes: 83eafc9251d6d ("wifi: mt76: mt7996: add wed tx support")
Signed-off-by: Lorenzo Bianconi <[email protected] >
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected] >
2025-09-04 19:09:11 +02:00
Lorenzo Bianconi and Felix Fietkau
4f81d751b5
wifi: mt76: mt7996: Fix tx-queues initialization for second phy on mt7996
...
Fix the second phy tx queue initialization if hif device is not
available for MT7990 chipset.
Fixes: 83eafc9251d6d ("wifi: mt76: mt7996: add wed tx support")
Co-developed-by: Sujuan Chen <[email protected] >
Signed-off-by: Sujuan Chen <[email protected] >
Co-developed-by: Benjamin Lin <[email protected] >
Signed-off-by: Benjamin Lin <[email protected] >
Co-developed-by: Rex Lu <[email protected] >
Signed-off-by: Rex Lu <[email protected] >
Signed-off-by: Lorenzo Bianconi <[email protected] >
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected] >
2025-09-04 19:09:11 +02:00
Lorenzo Bianconi and Felix Fietkau
d0217732f9
wifi: mt76: Do not always enable NAPIs for WED RRO queues
...
Do not initialize NAPIs for WED RRO queues if WED is active.
Signed-off-by: Lorenzo Bianconi <[email protected] >
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected] >
2025-09-04 19:09:11 +02:00
Lorenzo Bianconi and Felix Fietkau
4a3a5a7d71
wifi: mt76: Remove q->ndesc check in mt76_dma_rx_fill()
...
Remove q->ndesc check in mt76_dma_rx_fill routine since this is already
done in mt76_dma_rx_fill_buf().
Signed-off-by: Lorenzo Bianconi <[email protected] >
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected] >
2025-09-04 19:09:11 +02:00
Lorenzo Bianconi and Felix Fietkau
245f6ff460
wifi: mt76: Add reset_idx to reset_q mt76_queue_ops signature.
...
Remove __mt76_dma_queue_reset routine and use mt76_dma_queue_reset
directly instead in mt76_queue_ops struct.
This is a preliminary patch to enable WED support for MT7992 Kite
chipset supported by MT7996 driver.
Co-developed-by: Rex Lu <[email protected] >
Signed-off-by: Rex Lu <[email protected] >
Co-developed-by: Sujuan Chen <[email protected] >
Signed-off-by: Sujuan Chen <[email protected] >
Co-developed-by: Benjamin Lin <[email protected] >
Signed-off-by: Benjamin Lin <[email protected] >
Signed-off-by: Lorenzo Bianconi <[email protected] >
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected] >
2025-09-04 19:09:11 +02:00
Lorenzo Bianconi and Felix Fietkau
29bca0ca46
net: mediatek: wed: Introduce MT7992 WED support to MT7988 SoC
...
Introduce the second WDMA RX ring in WED driver for MT7988 SoC since the
Mediatek MT7992 WiFi chipset supports two separated WDMA rings.
Add missing MT7988 configurations to properly support WED for MT7992 in
MT76 driver.
Co-developed-by: Rex Lu <[email protected] >
Signed-off-by: Rex Lu <[email protected] >
Signed-off-by: Lorenzo Bianconi <[email protected] >
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected] >
2025-09-04 19:08:36 +02:00
Lorenzo Bianconi and Felix Fietkau
7cf18f8ebb
wifi: mt76: mt7996: Add all active links to poll list in mt7996_mac_tx_free()
...
Add all valid links to poll list for Airtime Fairness/AQL accounting when
tx-free event occurs.
Co-developed-by: Bo Jiao <[email protected] >
Signed-off-by: Bo Jiao <[email protected] >
Co-developed-by: Shayne Chen <[email protected] >
Signed-off-by: Shayne Chen <[email protected] >
Signed-off-by: Lorenzo Bianconi <[email protected] >
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected] >
2025-09-04 15:01:06 +02:00
Lorenzo Bianconi and Felix Fietkau
435e596914
wifi: mt76: mt7996: Use proper link info in mt7996_mcu_add_group
...
Do not always use default link in mt7996_mcu_add_group routine.
Signed-off-by: Lorenzo Bianconi <[email protected] >
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected] >
2025-09-02 19:56:52 +02:00
Lorenzo Bianconi and Felix Fietkau
15fa4e33ee
wifi: mt76: mt7996: Enable MLO support for client interfaces
...
Report MT7996 MLO STA capabilities to mac80211 stack.
Signed-off-by: Lorenzo Bianconi <[email protected] >
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected] >
2025-09-01 16:45:04 +02:00
Lorenzo Bianconi and Felix Fietkau
08df8dd7b0
wifi: mt76: mt7996: Use proper link_id in link_sta_rc_update callback
...
Do not always use deflink_id in link_sta_rc_update mac80211
callback but use the proper link_id provided by mac80211.
Fixes: 0762bdd30279f ("wifi: mt76: mt7996: rework mt7996_mac_sta_rc_work to support MLO")
Signed-off-by: Lorenzo Bianconi <[email protected] >
Link: https://patch.msgid.link/20250901-mt7996-fix-link_sta_rc_update-callback-v1-1-e24caf196222@kernel.org
Signed-off-by: Felix Fietkau <[email protected] >
2025-09-01 16:45:04 +02:00
Lorenzo Bianconi and Felix Fietkau
95c9b8099e
wifi: mt76: mt7996: Set EML capabilities for AP interface
...
Report EML capabilities to hostapd for AP interface.
Signed-off-by: Lorenzo Bianconi <[email protected] >
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected] >
2025-09-01 16:45:04 +02:00
Lorenzo Bianconi and Felix Fietkau
27ad37728c
wifi: mt76: mt7996: Check phy before init msta_link in mt7996_mac_sta_add_links()
...
In order to avoid a possible NULL pointer dereference in
mt7996_mac_sta_init_link routine, move the phy pointer check before
running mt7996_mac_sta_init_link() in mt7996_mac_sta_add_links routine.
Fixes: dd82a9e02c054 ("wifi: mt76: mt7996: Rely on mt7996_sta_link in sta_add/sta_remove callbacks")
Signed-off-by: Lorenzo Bianconi <[email protected] >
Link: https://patch.msgid.link/20250830-mt7996_mac_sta_add_links-fix-v1-1-4219fb8755ee@kernel.org
Signed-off-by: Felix Fietkau <[email protected] >
2025-09-01 16:45:04 +02:00
Lorenzo Bianconi and Felix Fietkau
9bae5f956e
wifi: mt76: Remove dead code in mt76_scan_work
...
Duration can't be equal to 0 in mt76_scan_work routine so get rid of
related if condition.
Signed-off-by: Lorenzo Bianconi <[email protected] >
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected] >
2025-08-27 11:15:47 +02:00
Lorenzo Bianconi and Felix Fietkau
384d3a9bff
wifi: mt76: mt7996: Use deflink for AMPDU rx reordering
...
Packets belonging to the same TID can be sent over multiple links.
AMPDU rx reordering must be performed over all active links. Fix the
problem always using default link for AMPDU rx reordering.
Signed-off-by: Lorenzo Bianconi <[email protected] >
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected] >
2025-08-27 11:15:47 +02:00
Lorenzo Bianconi and Felix Fietkau
d1a2900a39
wifi: mt76: mt7996: Set proper link destination address in mt7996_tx()
...
Overwrite 802.11 destination address with in-use link address for MLD
capable VIFs in mt7996_tx routine.
Signed-off-by: Lorenzo Bianconi <[email protected] >
Tested-by: Jose Ignacio Tornos Martinez <[email protected] >
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected] >
2025-08-04 18:49:29 +02:00
Lorenzo Bianconi and Felix Fietkau
b3613d9a31
wifi: mt76: mt7996: Set def_wcid pointer in mt7996_mac_sta_init_link()
...
In order to get the ieee80211_sta pointer from wcid struct for a MLO
client, set def_wcid pointer in mt7996_mac_sta_init_link routine.
Signed-off-by: Lorenzo Bianconi <[email protected] >
Tested-by: Jose Ignacio Tornos Martinez <[email protected] >
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected] >
2025-08-04 18:49:29 +02:00
Lorenzo Bianconi and Felix Fietkau
110ecc3311
wifi: mt76: mt7996: Fix mt7996_mcu_bss_mld_tlv routine
...
Update mt7996_mcu_bss_mld_tlv routine to properly support MLO
configuring the BSS.
Fixes: 98686cd21624c ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices")
Signed-off-by: Lorenzo Bianconi <[email protected] >
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected] >
2025-07-18 20:51:35 +02:00
Lorenzo Bianconi and Felix Fietkau
2601bb91e0
wifi: mt76: mt7996: Fix mt7996_mcu_sta_ba wcid configuration
...
Fix the wcid pointer used in mt7996_mcu_sta_ba routine to properly
support MLO scenario.
Fixes: 98686cd21624c ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices")
Signed-off-by: Lorenzo Bianconi <[email protected] >
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected] >
2025-07-18 19:39:31 +02:00
Lorenzo Bianconi and Felix Fietkau
00275548ba
wifi: mt76: mt7996: Overwrite unspecified link_id in mt7996_tx()
...
Set link_id to msta or mvif primary value if it is set to
IEEE80211_LINK_UNSPECIFIED by mac80211 in mt7996_tx routine.
Signed-off-by: Lorenzo Bianconi <[email protected] >
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected] >
2025-07-18 19:39:31 +02:00
Lorenzo Bianconi and Felix Fietkau
a94166b21e
wifi: mt76: Get rid of dma_sync_single_for_device() for MMIO devices
...
Since the page_pool for MT76 MMIO devices are created with
PP_FLAG_DMA_SYNC_DEV flag, we do not need to sync_for_device each page
received from the pool since it is already done by the page_pool
codebase.
Signed-off-by: Lorenzo Bianconi <[email protected] >
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected] >
2025-07-07 18:05:04 +02:00
Lorenzo Bianconi and Felix Fietkau
2937786524
wifi: mt76: mt7996: Move num_sta accounting in mt7996_mac_sta_{add,remove}_links
...
Move phy num_sta accounting in mt7996_mac_sta_add() and
mt7996_mac_sta_remove() routines in order to take into account all
possibles MLO links.
Signed-off-by: Lorenzo Bianconi <[email protected] >
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected] >
2025-07-07 18:03:48 +02:00
Lorenzo Bianconi and Felix Fietkau
68dd28b99d
wifi: mt76: mt7996: Add MLO support to mt7996_tx_check_aggr()
...
Generalize mt7996_tx_check_aggr() and mt7996_txwi_free() routines to
introduce MLO support for MT7996 driver.
Signed-off-by: Lorenzo Bianconi <[email protected] >
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected] >
2025-07-07 18:03:48 +02:00
Lorenzo Bianconi and Felix Fietkau
afe63e7581
wifi: mt76: mt7996: Fix valid_links bitmask in mt7996_mac_sta_{add,remove}
...
sta->valid_links bitmask can be set even for non-MLO client.
Fixes: dd82a9e02c054 ("wifi: mt76: mt7996: Rely on mt7996_sta_link in sta_add/sta_remove callbacks")
Signed-off-by: Lorenzo Bianconi <[email protected] >
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected] >
2025-07-07 18:03:48 +02:00
Lorenzo Bianconi and Felix Fietkau
ffff9f71e2
wifi: mt76: mt7996: Fix possible OOB access in mt7996_tx()
...
Fis possible Out-Of-Boundary access in mt7996_tx routine if link_id is
set to IEEE80211_LINK_UNSPECIFIED
Fixes: 3ce8acb86b661 ("wifi: mt76: mt7996: Update mt7996_tx to MLO support")
Signed-off-by: Lorenzo Bianconi <[email protected] >
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected] >
2025-07-07 18:03:48 +02:00
Lorenzo Bianconi and Felix Fietkau
32f8c5849e
wifi: mt76: mt7996: Fix mlink lookup in mt7996_tx_prepare_skb
...
Use proper link_id in mt7996_tx_prepare_skb routine for mlink lookup.
Signed-off-by: Lorenzo Bianconi <[email protected] >
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected] >
2025-07-07 18:03:48 +02:00
Lorenzo Bianconi and Felix Fietkau
d71108eeda
wifi: mt76: mt7996: Do not set wcid.sta to 1 in mt7996_mac_sta_event()
...
msta_link->wcid.sta is already set to 1 in mt7996_mac_sta_init_link
routine.
Signed-off-by: Lorenzo Bianconi <[email protected] >
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected] >
2025-07-07 18:03:48 +02:00
Lorenzo Bianconi and Felix Fietkau
cf89b62180
wifi: mt76: mt7996: Rely on for_each_sta_active_link() in mt7996_mcu_sta_mld_setup_tlv()
...
Reuse for_each_sta_active_link utility macro in
mt7996_mcu_sta_mld_setup_tlv routine.
Signed-off-by: Lorenzo Bianconi <[email protected] >
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected] >
2025-07-07 18:03:48 +02:00
Lorenzo Bianconi and Felix Fietkau
7b3cd3274a
wifi: mt76: mt7996: Fix secondary link lookup in mt7996_mcu_sta_mld_setup_tlv()
...
Use proper link_id value for secondary link lookup in
mt7996_mcu_sta_mld_setup_tlv routine.
Fixes: 00cef41d9d8f5 ("wifi: mt76: mt7996: Add mt7996_mcu_sta_mld_setup_tlv() and mt7996_mcu_sta_eht_mld_tlv()")
Signed-off-by: Lorenzo Bianconi <[email protected] >
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected] >
2025-07-07 18:03:48 +02:00
Lorenzo Bianconi and Felix Fietkau
5603bd03d5
wifi: mt76: Remove RCU section in mt7996_mac_sta_rc_work()
...
Since mt7996_mcu_add_rate_ctrl() and mt7996_mcu_set_fixed_field() can't
run in atomic context, move RCU critical section in
mt7996_mcu_add_rate_ctrl() and mt7996_mcu_set_fixed_field(). This patch
fixes a 'sleep while atomic' issue in mt7996_mac_sta_rc_work().
Fixes: 0762bdd30279 ("wifi: mt76: mt7996: rework mt7996_mac_sta_rc_work to support MLO")
Signed-off-by: Lorenzo Bianconi <[email protected] >
Tested-by: Ben Greear <[email protected] >
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected] >
2025-06-18 16:28:19 +02:00
Lorenzo Bianconi and Felix Fietkau
189532e383
wifi: mt76: Move RCU section in mt7996_mcu_add_rate_ctrl()
...
Since mt76_mcu_skb_send_msg() routine can't be executed in atomic context,
move RCU section in mt7996_mcu_add_rate_ctrl() and execute
mt76_mcu_skb_send_msg() in non-atomic context. This is a preliminary
patch to fix a 'sleep while atomic' issue in mt7996_mac_sta_rc_work().
Fixes: 0762bdd30279 ("wifi: mt76: mt7996: rework mt7996_mac_sta_rc_work to support MLO")
Signed-off-by: Lorenzo Bianconi <[email protected] >
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected] >
2025-06-18 16:28:19 +02:00
Lorenzo Bianconi and Felix Fietkau
4f47d90943
wifi: mt76: Move RCU section in mt7996_mcu_add_rate_ctrl_fixed()
...
Since mt7996_mcu_set_fixed_field() can't be executed in a RCU critical
section, move RCU section in mt7996_mcu_add_rate_ctrl_fixed() and run
mt7996_mcu_set_fixed_field() in non-atomic context. This is a
preliminary patch to fix a 'sleep while atomic' issue in
mt7996_mac_sta_rc_work().
Fixes: 0762bdd30279 ("wifi: mt76: mt7996: rework mt7996_mac_sta_rc_work to support MLO")
Signed-off-by: Lorenzo Bianconi <[email protected] >
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected] >
2025-06-18 16:28:19 +02:00
Lorenzo Bianconi and Felix Fietkau
656eb209ec
wifi: mt76: Move RCU section in mt7996_mcu_set_fixed_field()
...
Since mt76_mcu_skb_send_msg() routine can't be executed in atomic context,
move RCU section in mt7996_mcu_set_fixed_field() and execute
mt76_mcu_skb_send_msg() in non-atomic context. This is a preliminary
patch to fix a 'sleep while atomic' issue in mt7996_mac_sta_rc_work().
Fixes: 0762bdd30279 ("wifi: mt76: mt7996: rework mt7996_mac_sta_rc_work to support MLO")
Signed-off-by: Lorenzo Bianconi <[email protected] >
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected] >
2025-06-18 16:28:19 +02:00
Lorenzo Bianconi and Felix Fietkau
f294304688
wifi: mt76: Assume __mt76_connac_mcu_alloc_sta_req runs in atomic context
...
Rely on GFP_ATOMIC flag in __mt76_connac_mcu_alloc_sta_req since it can
run in atomic context. This is a preliminary patch to fix a 'sleep while
atomic' issue in mt7996_mac_sta_rc_work().
Fixes: 0762bdd30279 ("wifi: mt76: mt7996: rework mt7996_mac_sta_rc_work to support MLO")
Signed-off-by: Lorenzo Bianconi <[email protected] >
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected] >
2025-06-18 16:28:19 +02:00
Lorenzo Bianconi and Felix Fietkau
a403590fd4
Revert "wifi: mt76: Check link_conf pointer in mt76_connac_mcu_sta_basic_tlv()"
...
In mt76_connac_mcu_sta_basic_tlv() link_conf is always not NULL.
Revert the commit '9890624c1b39 ("wifi: mt76: Check link_conf pointer in
mt76_connac_mcu_sta_basic_tlv()")' in order to fix the following
warning:
drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c:394 mt76_connac_mcu_sta_basic_tlv()
warn: variable dereferenced before check 'link_conf'
This reverts commit 9890624c1b3948c1c7f1d0e19ef0bb7680b8c80d.
Signed-off-by: Lorenzo Bianconi <[email protected] >
Link: https://patch.msgid.link/20250325-mt76_connac_mcu_sta_basic_tlv-link_conf-revert-v1-1-b84efefb74ee@kernel.org
Signed-off-by: Felix Fietkau <[email protected] >
2025-05-21 14:30:01 +02:00
Lorenzo Bianconi and Felix Fietkau
d5cddf65f7
wifi: mt76: mt7996: Update mt7996_tx to MLO support
...
Rework mt7996_tx routine in order to support multi-link
setup.
Signed-off-by: Lorenzo Bianconi <[email protected] >
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected] >
2025-03-19 13:05:59 +01:00
Lorenzo Bianconi and Felix Fietkau
d01b9d300e
wifi: mt76: mt7996: rework mt7996_ampdu_action to support MLO
...
Active/de-active TX/RX BA sessssion for each active links running
mt7996_ampdu_action routine.
Signed-off-by: Lorenzo Bianconi <[email protected] >
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected] >
2025-03-19 13:05:59 +01:00
Lorenzo Bianconi and Felix Fietkau
974e6c2df9
wifi: mt76: mt7996: set vif default link_id adding/removing vif links
...
This info will be consumed by subsequent patches (e.g. in set/get tsf
routines).
Signed-off-by: Lorenzo Bianconi <[email protected] >
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected] >
2025-03-19 13:05:59 +01:00
Lorenzo Bianconi and Felix Fietkau
d1a5a0afa6
wifi: mt76: mt7996: rework mt7996_net_fill_forward_path to support MLO
...
Rework mt7996_net_fill_forward_path routine in order to support multi-link
setup.
Signed-off-by: Lorenzo Bianconi <[email protected] >
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected] >
2025-03-19 13:05:59 +01:00
Lorenzo Bianconi and Felix Fietkau
b9682a51c1
wifi: mt76: mt7996: rework mt7996_update_mu_group to support MLO
...
Rework mt7996_update_mu_group routine in order to support multi-link
setup.
Signed-off-by: Lorenzo Bianconi <[email protected] >
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected] >
2025-03-19 13:05:59 +01:00
Lorenzo Bianconi and Felix Fietkau
057822770c
wifi: mt76: mt7996: rework mt7996_mac_sta_poll to support MLO
...
Rework mt7996_mac_sta_poll routine in order to support multi-link
setup.
Signed-off-by: Lorenzo Bianconi <[email protected] >
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected] >
2025-03-19 13:05:59 +01:00
Lorenzo Bianconi and Felix Fietkau
275e6a681b
wifi: mt76: mt7996: rework mt7996_mac_sta_rc_work to support MLO
...
Rework mt7996_mac_sta_rc_work routine in order to support multi-link
setup.
Co-developed-by: Bo Jiao <[email protected] >
Signed-off-by: Bo Jiao <[email protected] >
Co-developed-by: Peter Chiu <[email protected] >
Signed-off-by: Peter Chiu <[email protected] >
Co-developed-by: Shayne Chen <[email protected] >
Signed-off-by: Shayne Chen <[email protected] >
Signed-off-by: Lorenzo Bianconi <[email protected] >
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected] >
2025-03-19 13:05:59 +01:00
Lorenzo Bianconi and Felix Fietkau
60967d28a5
wifi: mt76: mt7996: rework mt7996_sta_hw_queue_read to support MLO
...
Extend mt7996_sta_hw_queue_read to support multi-link setup.
Signed-off-by: Lorenzo Bianconi <[email protected] >
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected] >
2025-03-19 13:05:59 +01:00
Lorenzo Bianconi and Felix Fietkau
a369b0c14d
wifi: mt76: mt7996: Add mt7996_sta_link to mt7996_mcu_add_bss_info signature
...
This is a preliminary patch to introduce MLO support for MT996 driver.
Signed-off-by: Lorenzo Bianconi <[email protected] >
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected] >
2025-03-19 13:05:59 +01:00
Lorenzo Bianconi and Felix Fietkau
d195324131
wifi: mt76: mt7996: Rely on mt7996_vif/sta_link in twt teardown
...
This is a preliminary patch to enable MLO for MT7996 driver
Signed-off-by: Lorenzo Bianconi <[email protected] >
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected] >
2025-03-12 10:38:01 +01:00
Lorenzo Bianconi and Felix Fietkau
2efb26f1fc
wifi: mt76: mt7996: Support MLO in mt7996_mac_sta_event()
...
Similar to mt7996_mac_sta_add() adn mt7996_mac_sta_remove(), update
mt7996_mac_sta_event routine to take into account MLO support.
Please note mcu routines does not support MLO yet.
Co-developed-by: Bo Jiao <[email protected] >
Signed-off-by: Bo Jiao <[email protected] >
Co-developed-by: Peter Chiu <[email protected] >
Signed-off-by: Peter Chiu <[email protected] >
Co-developed-by: Shayne Chen <[email protected] >
Signed-off-by: Shayne Chen <[email protected] >
Signed-off-by: Lorenzo Bianconi <[email protected] >
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected] >
2025-03-12 10:38:01 +01:00
Lorenzo Bianconi and Felix Fietkau
46e20e5d74
wifi: mt76: mt7996: Rely on mt7996_sta_link in sta_add/sta_remove callbacks
...
Generalize mt7996_mac_sta_add() and mt7996_mac_sta_remove() routines to
deal with mt7996_sta_link structure.
This is a preliminary patch to introduce MLO support for MT7996 driver.
Co-developed-by: Bo Jiao <[email protected] >
Signed-off-by: Bo Jiao <[email protected] >
Co-developed-by: Peter Chiu <[email protected] >
Signed-off-by: Peter Chiu <[email protected] >
Co-developed-by: Shayne Chen <[email protected] >
Signed-off-by: Shayne Chen <[email protected] >
Signed-off-by: Lorenzo Bianconi <[email protected] >
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected] >
2025-03-12 10:38:01 +01:00
Lorenzo Bianconi and Felix Fietkau
3082c9edbe
wifi: mt76: mt7996: Add mt7996_sta_state routine
...
Introduce mt7996_sta_state routine in order to initialize wcid structure
in mt7996 codebase. This is a preliminary patch to enable MLO support in
MT7996 driver.
Signed-off-by: Lorenzo Bianconi <[email protected] >
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected] >
2025-03-12 10:38:01 +01:00
Lorenzo Bianconi and Felix Fietkau
f419c62e91
wifi: mt76: mt7996: Add link_info_changed callback
...
Convert bss_info_changed mac80211 callback in link_info_changed one.
This is a preliminary patch to enable MLO support in MT7996 driver.
Signed-off-by: Lorenzo Bianconi <[email protected] >
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected] >
2025-03-12 10:37:53 +01:00
Lorenzo Bianconi and Felix Fietkau
3e06380a43
wifi: mt76: mt7996: Add vif_cfg_changed callback
...
Introduce vif_cfg_changed mac80211 callback as preliminary patch to
enable MLO support in MT7996 driver.
Co-developed-by: Bo Jiao <[email protected] >
Signed-off-by: Bo Jiao <[email protected] >
Co-developed-by: Peter Chiu <[email protected] >
Signed-off-by: Peter Chiu <[email protected] >
Co-developed-by: Shayne Chen <[email protected] >
Signed-off-by: Shayne Chen <[email protected] >
Signed-off-by: Lorenzo Bianconi <[email protected] >
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected] >
2025-03-12 10:37:42 +01:00
Lorenzo Bianconi and Felix Fietkau
915938e83c
wifi: mt76: mt7996: Add mt7996_sta_link struct in mt7996_vif_link
...
Introduce mt7996_sta_link field in mt7996_vif_link structure instead of
mt7996_sta. This is a preliminary patch to support MLO in MT7996 driver.
Signed-off-by: Lorenzo Bianconi <[email protected] >
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected] >
2025-03-12 10:37:15 +01:00
Lorenzo Bianconi and Felix Fietkau
b3b61abd73
wifi: mt76: mt7996: Introduce mt7996_sta_link container
...
Similar to mt7996_vif_link, add mt7996_sta_link structure as driver
representation for sta links. This is a preliminary patch to introduce
MLO support for MT7996 driver.
Co-developed-by: Bo Jiao <[email protected] >
Signed-off-by: Bo Jiao <[email protected] >
Co-developed-by: Peter Chiu <[email protected] >
Signed-off-by: Peter Chiu <[email protected] >
Co-developed-by: Shayne Chen <[email protected] >
Signed-off-by: Shayne Chen <[email protected] >
Signed-off-by: Lorenzo Bianconi <[email protected] >
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected] >
2025-03-12 10:37:15 +01:00
Lorenzo Bianconi and Felix Fietkau
52f51a398e
wifi: mt76: mt7996: Add change_vif_links stub
...
change_vif_links callback is required by mac80211.
This is a preliminary patch to introduce MLO support for MT7996 driver.
Signed-off-by: Lorenzo Bianconi <[email protected] >
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected] >
2025-03-12 10:37:15 +01:00
Lorenzo Bianconi and Felix Fietkau
7ff11c7259
wifi: mt76: sdio: move mcu queue size check inside critical section
...
Even if it is not a real issue at the moment since concurrent access to
mcu message queue is protected by mcu mutex, make the code more robust
and move mcu queue free space check inside queue spinlock critical section.
Signed-off-by: Lorenzo Bianconi <[email protected] >
Signed-off-by: Felix Fietkau <[email protected] >
2024-04-03 12:39:18 +02:00
Lorenzo Bianconi and Felix Fietkau
b96ab5e620
wifi: mt76: mt7996: fix uninitialized variable in mt7996_irq_tasklet()
...
Set intr1 to 0 in mt7996_irq_tasklet() in order to avoid possible
uninitialized variable usage if wed is not active for hif2.
Fixes: 83eafc9251d6 ("wifi: mt76: mt7996: add wed tx support")
Signed-off-by: Lorenzo Bianconi <[email protected] >
Signed-off-by: Felix Fietkau <[email protected] >
2024-04-03 12:39:12 +02:00
Lorenzo Bianconi and Felix Fietkau
e507b4e32e
wifi: mt76: mt7921: fix fw used for offload check for mt7922
...
Fix the firmware version used for offload capability check used by 0x0616
devices. This path enables offload capabilities for 0x0616 devices.
Link: https://bugzilla.kernel.org/show_bug.cgi?id=217245
Fixes: 034ae28b56f1 ("wifi: mt76: mt7921: introduce remain_on_channel support")
Cc: [email protected]
Signed-off-by: Lorenzo Bianconi <[email protected] >
Signed-off-by: Kalle Valo <[email protected] >
Link: https://lore.kernel.org/r/632d8f0c9781c9902d7160e2c080aa7e9232d50d.1679997487.git.lorenzo@kernel.org
2024-04-03 12:39:07 +02:00
Lorenzo Bianconi and Felix Fietkau
e8b5991f7d
wifi: mt76: mt7915: workaround too long expansion sparse warnings
...
Fix the following sparse warnings:
drivers/net/wireless/mediatek/mt76/mt7915/debugfs.c:1133:29: error: too long token expansion
drivers/net/wireless/mediatek/mt76/mt7915/debugfs.c:1133:29: error: too long token expansion
drivers/net/wireless/mediatek/mt76/mt7915/debugfs.c:1133:29: error: too long token expansion
drivers/net/wireless/mediatek/mt76/mt7915/debugfs.c:1133:29: error: too long token expansion
No functional changes, compile tested only.
Fixes: e3296759f347 ("wifi: mt76: mt7915: enable per bandwidth power limit support")
Signed-off-by: Lorenzo Bianconi <[email protected] >
Acked-by: Felix Fietkau <[email protected] >
Signed-off-by: Kalle Valo <[email protected] >
Link: https://msgid.link/5457b92e41909dd75ab3db7a0e9ec372b917a386.1710858172.git.lorenzo@kernel.org
2024-04-03 11:55:55 +02:00
Lorenzo Bianconi and Felix Fietkau
9827df56b2
wifi: mt76: move wed common utilities in wed.c
...
Introduce wed.c in order to collect mt76 wed common codebase used by
mt7915 and mt7996 drivers.
Signed-off-by: Lorenzo Bianconi <[email protected] >
Signed-off-by: Felix Fietkau <[email protected] >
2024-02-03 15:04:42 +01:00
Lorenzo Bianconi and Felix Fietkau
e8909c610c
wifi: mt76: usb: store usb endpoint in mt76_queue
...
Store usb endpoint in mt76_queue structure and rework q2ep routine.
Signed-off-by: Lorenzo Bianconi <[email protected] >
Signed-off-by: Deren Wu <[email protected] >
Signed-off-by: Felix Fietkau <[email protected] >
2024-02-03 15:04:42 +01:00
Lorenzo Bianconi and Felix Fietkau
027bab6a88
wifi: mt76: usb: create a dedicated queue for psd traffic
...
Create a dedicate queue for psd/mgmt traffic and do not rely on voice
one. This is a preliminary patch to fix mt7921u/mt7925 usb dmasl
configuration.
Signed-off-by: Lorenzo Bianconi <[email protected] >
Signed-off-by: Deren Wu <[email protected] >
Signed-off-by: Felix Fietkau <[email protected] >
2024-02-03 15:04:42 +01:00
Lorenzo Bianconi and Felix Fietkau
bc37a7ebc2
wifi: mt76: mt7996: fix fw loading timeout
...
Fix the following firmware loading error due to a wrong dma register
configuration if wed is disabled.
[ 8.245881] mt7996e_hif 0001:01:00.0: assign IRQ: got 128
[ 8.251308] mt7996e_hif 0001:01:00.0: enabling device (0000 -> 0002)
[ 8.257674] mt7996e_hif 0001:01:00.0: enabling bus mastering
[ 8.263488] mt7996e 0000:01:00.0: assign IRQ: got 126
[ 8.268537] mt7996e 0000:01:00.0: enabling device (0000 -> 0002)
[ 8.274551] mt7996e 0000:01:00.0: enabling bus mastering
[ 28.648773] mt7996e 0000:01:00.0: Message 00000010 (seq 1) timeout
[ 28.654959] mt7996e 0000:01:00.0: Failed to get patch semaphore
[ 29.661033] mt7996e: probe of 0000:01:00.0 failed with error -11
Suggested-by: Sujuan Chen" <[email protected] >
Fixes: 4920a3a1285f ("wifi: mt76: mt7996: set DMA mask to 36 bits for boards with more than 4GB of RAM")
Signed-off-by: Lorenzo Bianconi <[email protected] >
Signed-off-by: Felix Fietkau <[email protected] >
2024-02-03 15:04:42 +01:00
Lorenzo Bianconi and Felix Fietkau
4423b4eb69
wifi: mt76: mt7996: fix endianness in mt7996_mcu_wed_rro_event
...
Fix tag endianness in mt7996_mcu_wed_rro_event routine
Signed-off-by: Lorenzo Bianconi <[email protected] >
Signed-off-by: Felix Fietkau <[email protected] >
2023-11-17 18:09:54 +01:00
Lorenzo Bianconi and Felix Fietkau
9c7b98c031
net: ethernet: mtk_wed: rename mtk_rxbm_desc in mtk_wed_bm_desc
...
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 <[email protected] >
Signed-off-by: Paolo Abeni <[email protected] >
2023-11-17 18:02:16 +01:00
Lorenzo Bianconi and Felix Fietkau
94e3632e4e
wifi: mt76: mt7925: remove iftype from mt7925_init_eht_caps signature
...
Get rid of nl80211_iftype from mt7925_init_eht_caps routine signature
since it is not actually used.
Signed-off-by: Lorenzo Bianconi <[email protected] >
Signed-off-by: Felix Fietkau <[email protected] >
2023-11-17 14:13:04 +01:00
Lorenzo Bianconi and Felix Fietkau
a58b75f863
wifi: mt76: mt7915: fallback to non-wed mode if platform_get_resource fails in mt7915_mmio_wed_init()
...
mt76 assumes mt7915_mmio_wed_init can fail just after wed driver has
been attached running mtk_wed_device_attach().
Fall back to non-wed mode if platform_get_resource fails in
mt7915_mmio_wed_init routines.
Fixes: eebb70976be5 ("wifi: mt76: mt7915: enable wed for mt7986-wmac chipset")
Signed-off-by: Lorenzo Bianconi <[email protected] >
Signed-off-by: Felix Fietkau <[email protected] >
2023-11-17 14:12:32 +01:00
Lorenzo Bianconi and Felix Fietkau
0f89bf58ef
wifi: mt76: mt7996: add wed rro delete session garbage collector
...
Introduce the capability to clear WED rro session configured in the hw
according to the event reported by the MCU firmware
Co-developed-by: Sujuan Chen <[email protected] >
Signed-off-by: Sujuan Chen <[email protected] >
Co-developed-by: Bo Jiao <[email protected] >
Signed-off-by: Bo Jiao <[email protected] >
Signed-off-by: Lorenzo Bianconi <[email protected] >
Signed-off-by: Felix Fietkau <[email protected] >
2023-11-17 14:12:32 +01:00
Lorenzo Bianconi and Felix Fietkau
7f17e164fb
wifi: mt76: mt7996: add wed reset support
...
Introduce the capability to reset mt7996 chipset if requested by wed
driver.
Signed-off-by: Lorenzo Bianconi <[email protected] >
Signed-off-by: Felix Fietkau <[email protected] >
2023-11-17 14:12:32 +01:00
Lorenzo Bianconi and Felix Fietkau
be2e74c0c4
wifi: mt76: move wed reset common code in mt76 module
...
Move WED reset code shared between mt7915 and mt7996 in common module.
This is a preliminary patch to introduce WED reset support for mt7996.
Signed-off-by: Lorenzo Bianconi <[email protected] >
Signed-off-by: Felix Fietkau <[email protected] >
2023-11-17 14:12:32 +01:00
Lorenzo Bianconi and Felix Fietkau
a469aaac97
wifi: mt76: mt7996: use u16 for val field in mt7996_mcu_set_rro signature
...
This is a preliminary patch to introduce WED rx support for mt7996
driver.
Signed-off-by: Lorenzo Bianconi <[email protected] >
Signed-off-by: Felix Fietkau <[email protected] >
2023-11-17 14:12:32 +01:00
Lorenzo Bianconi and Felix Fietkau
ec8765a02f
wifi: mt76: dma: introduce __mt76_dma_queue_reset utility routine
...
This is a preliminary patch to introduce WED support for mt7996
Signed-off-by: Lorenzo Bianconi <[email protected] >
Signed-off-by: Felix Fietkau <[email protected] >
2023-11-17 14:12:32 +01:00
Lorenzo Bianconi and Felix Fietkau
c550204e34
wifi: mt76: increase MT_QFLAG_WED_TYPE size
...
This is a preliminary patch to introduce WED support for mt7996
Signed-off-by: Lorenzo Bianconi <[email protected] >
Signed-off-by: Felix Fietkau <[email protected] >
2023-11-17 14:12:32 +01:00
Lorenzo Bianconi and Felix Fietkau
48b0cedbf8
wifi: mt76: introduce wed pointer in mt76_queue
...
Introduce mtk_wed_device pointer in mt76_queue structure in order to
configure WED chip.
Get rid of dev parameter in Q_READ and Q_WRITE macros.
Introduce wed parameter to the following routine signatures:
- mt76_init_queue
- mt76_init_tx_queue
This is a preliminary patch to introduce WED support for mt7996 since
mt7996 runs two separate WED chips.
Signed-off-by: Lorenzo Bianconi <[email protected] >
Signed-off-by: Felix Fietkau <[email protected] >
2023-11-17 14:12:32 +01:00
Lorenzo Bianconi and Felix Fietkau
d798d5d6f7
wifi: mt76: introduce mt76_queue_is_wed_tx_free utility routine
...
This is a preliminary patch to introduce WED support for mt7996
Signed-off-by: Lorenzo Bianconi <[email protected] >
Signed-off-by: Felix Fietkau <[email protected] >
2023-11-17 14:12:32 +01:00
Lorenzo Bianconi and Felix Fietkau
4b47145ecf
wifi: mt76: move mt76_net_setup_tc in common code
...
This is a preliminary patch to introduce WED support for mt7996
Signed-off-by: Lorenzo Bianconi <[email protected] >
Signed-off-by: Felix Fietkau <[email protected] >
2023-11-17 14:12:32 +01:00
Lorenzo Bianconi and Felix Fietkau
9fb0277d7e
wifi: mt76: move mt76_mmio_wed_offload_{enable,disable} in common code
...
mt76_mmio_wed_offload_enable and mt76_mmio_wed_offload_disable routines
will be reused by mt7996 driver for wed support.
Signed-off-by: Lorenzo Bianconi <[email protected] >
Signed-off-by: Felix Fietkau <[email protected] >
2023-11-17 14:12:32 +01:00
Lorenzo Bianconi and Felix Fietkau
ea28142891
wifi: mt76: mmio: move mt76_mmio_wed_{init,release}_rx_buf in common code
...
Move mt76_mmio_wed_init_rx_buf and mt76_mmio_wed_release_rx_buf routines
in common code.
This is a preliminary patch to introduce WED support for mt7996
Signed-off-by: Lorenzo Bianconi <[email protected] >
Signed-off-by: Felix Fietkau <[email protected] >
2023-11-17 14:12:32 +01:00
Lorenzo Bianconi and Felix Fietkau
bc85355885
wifi: mt76: mt792x: move some common usb code in mt792x module
...
Move the following shared usb routines in mt792x module:
- mt792xu_stop
- mt792x_stop
Signed-off-by: Lorenzo Bianconi <[email protected] >
Signed-off-by: Felix Fietkau <[email protected] >
2023-09-30 20:17:46 +02:00
Lorenzo Bianconi and Felix Fietkau
77cc145962
wifi: mt76: mt792x: move mt7921_skb_add_usb_sdio_hdr in mt792x module
...
Since mt7921_skb_add_usb_sdio_hdr is shared between mt7925 and mt7921
drivers, move it in mt792x module.
Signed-off-by: Lorenzo Bianconi <[email protected] >
Signed-off-by: Felix Fietkau <[email protected] >
2023-09-30 20:17:46 +02:00
Lorenzo Bianconi and Felix Fietkau
fcc2f3d82b
wifi: mt76: fix lock dependency problem for wed_lock
...
Fix the following kernel depency lock holding wed_lock with BH disabled.
[ 40.579696] mt798x-wmac 18000000.wifi: attaching wed device 0 version 2
[ 40.604648] platform 15010000.wed: MTK WED WO Firmware Version: DEV_000000, Build Time: 20221208202138
[ 40.613972] platform 15010000.wed: MTK WED WO Chip ID 00 Region 3
[ 40.943617]
[ 40.945118] ========================================================
[ 40.951457] WARNING: possible irq lock inversion dependency detected
[ 40.957797] 5.15.127 #0 Not tainted
[ 40.961276] --------------------------------------------------------
[ 40.967614] insmod/2329 just changed the state of lock:
[ 40.972827] ffffff8004003b08 (&dev->wed_lock){+.+.}-{2:2}, at: mt76_get_rxwi+0x1c/0xac [mt76]
[ 40.981387] but this lock was taken by another, SOFTIRQ-safe lock in the past:
[ 40.988592] (&q->lock){+.-.}-{2:2}
[ 40.988602]
[ 40.988602]
[ 40.988602] and interrupts could create inverse lock ordering between them.
[ 40.988602]
[ 41.003445]
[ 41.003445] other info that might help us debug this:
[ 41.009957] Possible interrupt unsafe locking scenario:
[ 41.009957]
[ 41.016729] CPU0 CPU1
[ 41.021245] ---- ----
[ 41.025761] lock(&dev->wed_lock);
[ 41.029241] local_irq_disable();
[ 41.035145] lock(&q->lock);
[ 41.040620] lock(&dev->wed_lock);
[ 41.046616] <Interrupt>
[ 41.049223] lock(&q->lock);
[ 41.052356]
[ 41.052356] *** DEADLOCK ***
[ 41.052356]
[ 41.058260] 1 lock held by insmod/2329:
[ 41.062085] #0 : ffffff80003b9988 (&dev->mutex){....}-{3:3}, at: __driver_attach+0x88/0x190
[ 41.070442]
[ 41.070442] the shortest dependencies between 2nd lock and 1st lock:
[ 41.078257] -> (&q->lock){+.-.}-{2:2} {
[ 41.082177] HARDIRQ-ON-W at:
[ 41.085396] lock_acquire+0xfc/0x2c0
[ 41.090787] _raw_spin_lock_bh+0x84/0xa0
[ 41.096525] mt76_dma_cleanup+0x24c/0x650 [mt76]
[ 41.102977] mt76_dma_cleanup+0x614/0x650 [mt76]
[ 41.109428] mt7915_eeprom_get_power_delta+0x1168/0x2464 [mt7915e]
[ 41.117435] mt7915_eeprom_init+0x40/0x340 [mt7915e]
[ 41.124222] cleanup_module+0x94/0xb28 [mt7915e]
[ 41.130662] platform_probe+0x64/0xbc
[ 41.136139] really_probe.part.0+0x98/0x2f4
[ 41.142134] __driver_probe_device+0x94/0x16c
[ 41.148303] driver_probe_device+0x40/0x120
[ 41.154299] __driver_attach+0x94/0x190
[ 41.159947] bus_for_each_dev+0x5c/0x94
[ 41.165594] driver_attach+0x20/0x30
[ 41.170983] bus_add_driver+0x104/0x1f4
[ 41.176631] driver_register+0x74/0x120
[ 41.182280] __platform_driver_register+0x24/0x30
[ 41.188797] 0xffffffc000cb1074
[ 41.193754] do_one_initcall+0x70/0x2cc
[ 41.199403] do_init_module+0x44/0x240
[ 41.204968] load_module+0x1f5c/0x2874
[ 41.210532] __do_sys_init_module+0x1d8/0x2ac
[ 41.216702] __arm64_sys_init_module+0x18/0x20
[ 41.222958] invoke_syscall.constprop.0+0x4c/0xe0
[ 41.229474] do_el0_svc+0x50/0xf0
[ 41.234602] el0_svc+0x4c/0xcc
[ 41.239471] el0t_64_sync_handler+0xe0/0x110
[ 41.245556] el0t_64_sync+0x15c/0x160
[ 41.251029] IN-SOFTIRQ-W at:
[ 41.254249] lock_acquire+0xfc/0x2c0
[ 41.259638] _raw_spin_lock_bh+0x84/0xa0
[ 41.265372] mt76_queue_tx_complete+0x34/0x70 [mt76]
[ 41.272170] mt76_free_pending_rxwi+0x36c/0x5d0 [mt76]
[ 41.279140] mt76_free_pending_rxwi+0x5c0/0x5d0 [mt76]
[ 41.286111] mt7915_eeprom_get_power_delta+0x620/0x2464 [mt7915e]
[ 41.294026] __napi_poll.constprop.0+0x5c/0x230
[ 41.300372] net_rx_action+0xe4/0x294
[ 41.305847] _stext+0x154/0x4cc
[ 41.310801] do_softirq+0xa4/0xbc
[ 41.315930] __local_bh_enable_ip+0x168/0x174
[ 41.322097] napi_threaded_poll+0xbc/0x140
[ 41.328007] kthread+0x13c/0x150
[ 41.333049] ret_from_fork+0x10/0x20
[ 41.338437] INITIAL USE at:
[ 41.341568] lock_acquire+0xfc/0x2c0
[ 41.346869] _raw_spin_lock_bh+0x84/0xa0
[ 41.352519] mt76_dma_cleanup+0x24c/0x650 [mt76]
[ 41.358882] mt76_dma_cleanup+0x614/0x650 [mt76]
[ 41.365245] mt7915_eeprom_get_power_delta+0x1168/0x2464 [mt7915e]
[ 41.373160] mt7915_eeprom_init+0x40/0x340 [mt7915e]
[ 41.379860] cleanup_module+0x94/0xb28 [mt7915e]
[ 41.386213] platform_probe+0x64/0xbc
[ 41.391602] really_probe.part.0+0x98/0x2f4
[ 41.397511] __driver_probe_device+0x94/0x16c
[ 41.403594] driver_probe_device+0x40/0x120
[ 41.409502] __driver_attach+0x94/0x190
[ 41.415063] bus_for_each_dev+0x5c/0x94
[ 41.420625] driver_attach+0x20/0x30
[ 41.425926] bus_add_driver+0x104/0x1f4
[ 41.431487] driver_register+0x74/0x120
[ 41.437049] __platform_driver_register+0x24/0x30
[ 41.443479] 0xffffffc000cb1074
[ 41.448346] do_one_initcall+0x70/0x2cc
[ 41.453907] do_init_module+0x44/0x240
[ 41.459383] load_module+0x1f5c/0x2874
[ 41.464860] __do_sys_init_module+0x1d8/0x2ac
[ 41.470944] __arm64_sys_init_module+0x18/0x20
[ 41.477113] invoke_syscall.constprop.0+0x4c/0xe0
[ 41.483542] do_el0_svc+0x50/0xf0
[ 41.488582] el0_svc+0x4c/0xcc
[ 41.493364] el0t_64_sync_handler+0xe0/0x110
[ 41.499361] el0t_64_sync+0x15c/0x160
[ 41.504748] }
[ 41.506489] ... key at: [<ffffffc000c65ba0>] __this_module+0x3e0/0xffffffffffffa840 [mt76]
[ 41.515371] ... acquired at:
[ 41.518413] _raw_spin_lock+0x60/0x74
[ 41.522240] mt76_get_rxwi+0x1c/0xac [mt76]
[ 41.526608] mt76_dma_cleanup+0x3e0/0x650 [mt76]
[ 41.531410] mt76_dma_cleanup+0x614/0x650 [mt76]
[ 41.536211] mt7915_dma_init+0x408/0x7b0 [mt7915e]
[ 41.541177] mt7915_register_device+0x310/0x620 [mt7915e]
[ 41.546749] mt7915_mmio_probe+0xcec/0x1d44 [mt7915e]
[ 41.551973] platform_probe+0x64/0xbc
[ 41.555802] really_probe.part.0+0x98/0x2f4
[ 41.560149] __driver_probe_device+0x94/0x16c
[ 41.564670] driver_probe_device+0x40/0x120
[ 41.569017] __driver_attach+0x94/0x190
[ 41.573019] bus_for_each_dev+0x5c/0x94
[ 41.577018] driver_attach+0x20/0x30
[ 41.580758] bus_add_driver+0x104/0x1f4
[ 41.584758] driver_register+0x74/0x120
[ 41.588759] __platform_driver_register+0x24/0x30
[ 41.593628] init_module+0x74/0x1000 [mt7915e]
[ 41.598248] do_one_initcall+0x70/0x2cc
[ 41.602248] do_init_module+0x44/0x240
[ 41.606162] load_module+0x1f5c/0x2874
[ 41.610078] __do_sys_init_module+0x1d8/0x2ac
[ 41.614600] __arm64_sys_init_module+0x18/0x20
[ 41.619209] invoke_syscall.constprop.0+0x4c/0xe0
[ 41.624076] do_el0_svc+0x50/0xf0
[ 41.627555] el0_svc+0x4c/0xcc
[ 41.630776] el0t_64_sync_handler+0xe0/0x110
[ 41.635211] el0t_64_sync+0x15c/0x160
[ 41.639037]
[ 41.640517] -> (&dev->wed_lock){+.+.}-{2:2} {
[ 41.644872] HARDIRQ-ON-W at:
[ 41.648003] lock_acquire+0xfc/0x2c0
[ 41.653219] _raw_spin_lock+0x60/0x74
[ 41.658520] mt76_free_pending_rxwi+0xc0/0x5d0 [mt76]
[ 41.665232] mt76_dma_cleanup+0x1dc/0x650 [mt76]
[ 41.671508] mt7915_eeprom_get_power_delta+0x1830/0x2464 [mt7915e]
[ 41.679336] mt7915_unregister_device+0x5b4/0x910 [mt7915e]
[ 41.686555] mt7915_eeprom_get_target_power+0xb8/0x230 [mt7915e]
[ 41.694209] mt7986_wmac_enable+0xc30/0xcd0 [mt7915e]
[ 41.700909] platform_remove+0x4c/0x64
[ 41.706298] __device_release_driver+0x194/0x240
[ 41.712554] driver_detach+0xc0/0x100
[ 41.717857] bus_remove_driver+0x54/0xac
[ 41.723418] driver_unregister+0x2c/0x54
[ 41.728980] platform_driver_unregister+0x10/0x20
[ 41.735323] mt7915_ops+0x244/0xffffffffffffed58 [mt7915e]
[ 41.742457] __arm64_sys_delete_module+0x170/0x23c
[ 41.748887] invoke_syscall.constprop.0+0x4c/0xe0
[ 41.755229] do_el0_svc+0x50/0xf0
[ 41.760183] el0_svc+0x4c/0xcc
[ 41.764878] el0t_64_sync_handler+0xe0/0x110
[ 41.770788] el0t_64_sync+0x15c/0x160
[ 41.776088] SOFTIRQ-ON-W at:
[ 41.779220] lock_acquire+0xfc/0x2c0
[ 41.784435] _raw_spin_lock+0x60/0x74
[ 41.789737] mt76_get_rxwi+0x1c/0xac [mt76]
[ 41.795580] mt7915_debugfs_rx_log+0x804/0xb74 [mt7915e]
[ 41.802540] mtk_wed_start+0x970/0xaa0
[ 41.807929] mt7915_dma_start+0x26c/0x630 [mt7915e]
[ 41.814455] mt7915_dma_start+0x5a4/0x630 [mt7915e]
[ 41.820981] mt7915_dma_init+0x45c/0x7b0 [mt7915e]
[ 41.827420] mt7915_register_device+0x310/0x620 [mt7915e]
[ 41.834467] mt7915_mmio_probe+0xcec/0x1d44 [mt7915e]
[ 41.841167] platform_probe+0x64/0xbc
[ 41.846469] really_probe.part.0+0x98/0x2f4
[ 41.852291] __driver_probe_device+0x94/0x16c
[ 41.858286] driver_probe_device+0x40/0x120
[ 41.864107] __driver_attach+0x94/0x190
[ 41.869582] bus_for_each_dev+0x5c/0x94
[ 41.875056] driver_attach+0x20/0x30
[ 41.880270] bus_add_driver+0x104/0x1f4
[ 41.885745] driver_register+0x74/0x120
[ 41.891221] __platform_driver_register+0x24/0x30
[ 41.897564] init_module+0x74/0x1000 [mt7915e]
[ 41.903657] do_one_initcall+0x70/0x2cc
[ 41.909130] do_init_module+0x44/0x240
[ 41.914520] load_module+0x1f5c/0x2874
[ 41.919909] __do_sys_init_module+0x1d8/0x2ac
[ 41.925905] __arm64_sys_init_module+0x18/0x20
[ 41.931989] invoke_syscall.constprop.0+0x4c/0xe0
[ 41.938331] do_el0_svc+0x50/0xf0
[ 41.943285] el0_svc+0x4c/0xcc
[ 41.947981] el0t_64_sync_handler+0xe0/0x110
[ 41.953892] el0t_64_sync+0x15c/0x160
[ 41.959192] INITIAL USE at:
[ 41.962238] lock_acquire+0xfc/0x2c0
[ 41.967365] _raw_spin_lock+0x60/0x74
[ 41.972580] mt76_free_pending_rxwi+0xc0/0x5d0 [mt76]
[ 41.979206] mt76_dma_cleanup+0x1dc/0x650 [mt76]
[ 41.985395] mt7915_eeprom_get_power_delta+0x1830/0x2464 [mt7915e]
[ 41.993137] mt7915_unregister_device+0x5b4/0x910 [mt7915e]
[ 42.000270] mt7915_eeprom_get_target_power+0xb8/0x230 [mt7915e]
[ 42.007837] mt7986_wmac_enable+0xc30/0xcd0 [mt7915e]
[ 42.014450] platform_remove+0x4c/0x64
[ 42.019753] __device_release_driver+0x194/0x240
[ 42.025922] driver_detach+0xc0/0x100
[ 42.031137] bus_remove_driver+0x54/0xac
[ 42.036612] driver_unregister+0x2c/0x54
[ 42.042087] platform_driver_unregister+0x10/0x20
[ 42.048344] mt7915_ops+0x244/0xffffffffffffed58 [mt7915e]
[ 42.055391] __arm64_sys_delete_module+0x170/0x23c
[ 42.061735] invoke_syscall.constprop.0+0x4c/0xe0
[ 42.067990] do_el0_svc+0x50/0xf0
[ 42.072857] el0_svc+0x4c/0xcc
[ 42.077466] el0t_64_sync_handler+0xe0/0x110
[ 42.083289] el0t_64_sync+0x15c/0x160
[ 42.088503] }
[ 42.090157] ... key at: [<ffffffc000c65c10>] __this_module+0x450/0xffffffffffffa840 [mt76]
[ 42.098951] ... acquired at:
[ 42.101907] __lock_acquire+0x718/0x1df0
[ 42.105994] lock_acquire+0xfc/0x2c0
[ 42.109734] _raw_spin_lock+0x60/0x74
[ 42.113561] mt76_get_rxwi+0x1c/0xac [mt76]
[ 42.117929] mt7915_debugfs_rx_log+0x804/0xb74 [mt7915e]
[ 42.123415] mtk_wed_start+0x970/0xaa0
[ 42.127328] mt7915_dma_start+0x26c/0x630 [mt7915e]
[ 42.132379] mt7915_dma_start+0x5a4/0x630 [mt7915e]
[ 42.137430] mt7915_dma_init+0x45c/0x7b0 [mt7915e]
[ 42.142395] mt7915_register_device+0x310/0x620 [mt7915e]
[ 42.147967] mt7915_mmio_probe+0xcec/0x1d44 [mt7915e]
[ 42.153192] platform_probe+0x64/0xbc
[ 42.157019] really_probe.part.0+0x98/0x2f4
[ 42.161367] __driver_probe_device+0x94/0x16c
[ 42.165887] driver_probe_device+0x40/0x120
[ 42.170234] __driver_attach+0x94/0x190
[ 42.174235] bus_for_each_dev+0x5c/0x94
[ 42.178235] driver_attach+0x20/0x30
[ 42.181974] bus_add_driver+0x104/0x1f4
[ 42.185974] driver_register+0x74/0x120
[ 42.189974] __platform_driver_register+0x24/0x30
[ 42.194842] init_module+0x74/0x1000 [mt7915e]
[ 42.199460] do_one_initcall+0x70/0x2cc
[ 42.203460] do_init_module+0x44/0x240
[ 42.207376] load_module+0x1f5c/0x2874
[ 42.211290] __do_sys_init_module+0x1d8/0x2ac
[ 42.215813] __arm64_sys_init_module+0x18/0x20
[ 42.220421] invoke_syscall.constprop.0+0x4c/0xe0
[ 42.225288] do_el0_svc+0x50/0xf0
[ 42.228768] el0_svc+0x4c/0xcc
[ 42.231989] el0t_64_sync_handler+0xe0/0x110
[ 42.236424] el0t_64_sync+0x15c/0x160
[ 42.240249]
[ 42.241730]
[ 42.241730] stack backtrace:
[ 42.246074] CPU: 1 PID: 2329 Comm: insmod Not tainted 5.15.127 #0
[ 42.252157] Hardware name: GainStrong Oolite-MT7981B V1 Dev Board (NAND boot) (DT)
[ 42.259712] Call trace:
[ 42.262147] dump_backtrace+0x0/0x174
[ 42.265802] show_stack+0x14/0x20
[ 42.269108] dump_stack_lvl+0x84/0xac
[ 42.272761] dump_stack+0x14/0x2c
[ 42.276066] print_irq_inversion_bug.part.0+0x1b0/0x1c4
[ 42.281285] mark_lock+0x8b8/0x8bc
[ 42.284678] __lock_acquire+0x718/0x1df0
[ 42.288592] lock_acquire+0xfc/0x2c0
[ 42.292158] _raw_spin_lock+0x60/0x74
[ 42.295811] mt76_get_rxwi+0x1c/0xac [mt76]
[ 42.300008] mt7915_debugfs_rx_log+0x804/0xb74 [mt7915e]
[ 42.305320] mtk_wed_start+0x970/0xaa0
[ 42.309059] mt7915_dma_start+0x26c/0x630 [mt7915e]
[ 42.313937] mt7915_dma_start+0x5a4/0x630 [mt7915e]
[ 42.318815] mt7915_dma_init+0x45c/0x7b0 [mt7915e]
[ 42.323606] mt7915_register_device+0x310/0x620 [mt7915e]
[ 42.329005] mt7915_mmio_probe+0xcec/0x1d44 [mt7915e]
[ 42.334056] platform_probe+0x64/0xbc
[ 42.337711] really_probe.part.0+0x98/0x2f4
[ 42.341885] __driver_probe_device+0x94/0x16c
[ 42.346232] driver_probe_device+0x40/0x120
[ 42.350407] __driver_attach+0x94/0x190
[ 42.354234] bus_for_each_dev+0x5c/0x94
[ 42.358061] driver_attach+0x20/0x30
[ 42.361627] bus_add_driver+0x104/0x1f4
[ 42.365454] driver_register+0x74/0x120
[ 42.369282] __platform_driver_register+0x24/0x30
[ 42.373977] init_module+0x74/0x1000 [mt7915e]
[ 42.378423] do_one_initcall+0x70/0x2cc
[ 42.382249] do_init_module+0x44/0x240
[ 42.385990] load_module+0x1f5c/0x2874
[ 42.389733] __do_sys_init_module+0x1d8/0x2ac
[ 42.394082] __arm64_sys_init_module+0x18/0x20
[ 42.398518] invoke_syscall.constprop.0+0x4c/0xe0
[ 42.403211] do_el0_svc+0x50/0xf0
[ 42.406517] el0_svc+0x4c/0xcc
[ 42.409565] el0t_64_sync_handler+0xe0/0x110
[ 42.413827] el0t_64_sync+0x15c/0x160
[ 42.674858] mt798x-wmac 18000000.wifi: HW/SW Version: 0x8a108a10, Build Time: 20221208201745a
[ 42.674858]
[ 42.692078] mt798x-wmac 18000000.wifi: WM Firmware Version: ____000000, Build Time: 20221208201806
[ 42.735606] mt798x-wmac 18000000.wifi: WA Firmware Version: DEV_000000, Build Time: 20221208202048
Tested-by: Daniel Golle <[email protected] >
Fixes: 2666bece0905 ("wifi: mt76: introduce rxwi and rx token utility routines")
Signed-off-by: Lorenzo Bianconi <[email protected] >
Acked-by: Felix Fietkau <[email protected] >
Signed-off-by: Kalle Valo <[email protected] >
Link: https://lore.kernel.org/r/ee80be41c2a8d8749d83c6950a272a5e77aadd45.1693228333.git.lorenzo@kernel.org
2023-09-19 21:48:30 +02:00
Lorenzo Bianconi and Felix Fietkau
ca4917062f
wifi: mt76: mt76x0: remove dead code in mt76x0_phy_get_target_power
...
tx_rate can't be greater than 3 in mt76x0_phy_get_target_power routine
for cck rates. Get rid of dead code.
Signed-off-by: Lorenzo Bianconi <[email protected] >
Signed-off-by: Felix Fietkau <[email protected] >
2023-09-11 13:10:51 +02:00
Lorenzo Bianconi and Felix Fietkau
9e4cb87a04
wifi: mt76: mt7921: move mt7921u_disconnect mt792x-lib
...
mt7921u_disconnect routine is shared between mt7921 and mt7925 so move
it in mt792x-usb module.
Signed-off-by: Lorenzo Bianconi <[email protected] >
Signed-off-by: Deren Wu <[email protected] >
Signed-off-by: Felix Fietkau <[email protected] >
2023-07-26 13:15:57 +02:00
Lorenzo Bianconi and Felix Fietkau
58b2b90ad8
wifi: mt76: mt7921: move mt7921_dma_init in pci.c
...
Move mt7921_dma_init routine in pci.c and make it static since it is run
just in mt7921_pci_probe(). Get rid of dma.c.
Signed-off-by: Lorenzo Bianconi <[email protected] >
Signed-off-by: Deren Wu <[email protected] >
Signed-off-by: Felix Fietkau <[email protected] >
2023-07-26 13:15:57 +02:00
Lorenzo Bianconi and Felix Fietkau
700041dcf7
wifi: mt76: mt792x: move MT7921_PM_TIMEOUT and MT7921_HW_SCAN_TIMEOUT in common code
...
MT7921_PM_TIMEOUT is shared between mt7925 and mt7921 so move it in
mt792x module.
Signed-off-by: Lorenzo Bianconi <[email protected] >
Signed-off-by: Deren Wu <[email protected] >
Signed-off-by: Felix Fietkau <[email protected] >
2023-07-26 13:15:57 +02:00
Lorenzo Bianconi and Felix Fietkau
cf752af84c
wifi: mt76: mt76_connac3: move lmac queue enumeration in mt76_connac3_mac.h
...
This is a preliminary patch to introduce mt7925 chip support
Signed-off-by: Lorenzo Bianconi <[email protected] >
Signed-off-by: Deren Wu <[email protected] >
Signed-off-by: Felix Fietkau <[email protected] >
2023-07-26 13:15:57 +02:00
Lorenzo Bianconi and Felix Fietkau
7067ea0f1b
wifi: mt76: mt792x: move mt7921_load_firmware in mt792x-lib module
...
mt7921_load_firmware routine is shared between mt7921 and mt7925 chipset
so move it in mt792x-lib module.
Signed-off-by: Lorenzo Bianconi <[email protected] >
Signed-off-by: Deren Wu <[email protected] >
Signed-off-by: Felix Fietkau <[email protected] >
2023-07-26 13:15:57 +02:00
Lorenzo Bianconi and Felix Fietkau
bd84b8ebaf
wifi: mt76: mt792x: introduce mt792x-usb module
...
Add usb shared code between mt7921 and mt7925 chipset to mt792x-usb module.
Signed-off-by: Lorenzo Bianconi <[email protected] >
Signed-off-by: Deren Wu <[email protected] >
Signed-off-by: Felix Fietkau <[email protected] >
2023-07-26 13:15:57 +02:00
Lorenzo Bianconi and Felix Fietkau
4551f8c838
wifi: mt76: mt7921: move acpi_sar code in mt792x-lib module
...
Move acpi_sar code in mt792x-lib module since it is shared between
mt7921 and mt7925 driver.
Signed-off-by: Lorenzo Bianconi <[email protected] >
Signed-off-by: Deren Wu <[email protected] >
Signed-off-by: Felix Fietkau <[email protected] >
2023-07-26 13:15:57 +02:00
Lorenzo Bianconi and Felix Fietkau
3d65cd7a8d
wifi: mt76: mt7921: move runtime-pm pci code in mt792x-lib
...
Move the following runtime-pm pci routines in mt792x-lib since they are
shared between mt7921 and mt7925 chipsets:
- __mt7921e_mcu_drv_pmctrl
- mt7921e_mcu_drv_pmctrl
- mt7921e_mcu_fw_pmctrl
Signed-off-by: Lorenzo Bianconi <[email protected] >
Signed-off-by: Deren Wu <[email protected] >
Signed-off-by: Felix Fietkau <[email protected] >
2023-07-26 13:15:57 +02:00
Lorenzo Bianconi and Felix Fietkau
e07540abe8
wifi: mt76: mt7921: move shared runtime-pm code on mt792x-lib
...
Moving hif_ops marcos in mt792x.h, we can move shared runtime-pm code
between mt7925 and mt7921 in mt792x-lib module.
Signed-off-by: Lorenzo Bianconi <[email protected] >
Signed-off-by: Deren Wu <[email protected] >
Signed-off-by: Felix Fietkau <[email protected] >
2023-07-26 13:15:57 +02:00
Lorenzo Bianconi and Felix Fietkau
0b1603ce70
wifi: mt76: mt7921: move hif_ops macro in mt792x.h
...
Move the following hif_ops macro in mt792x.h:
- mt7925_init_reset
- mt7925_dev_reset
- mt7925_mcu_init
- __mt7925_mcu_drv_pmctrl
- __mt7925_mcu_fw_pmctrl
Signed-off-by: Lorenzo Bianconi <[email protected] >
Signed-off-by: Deren Wu <[email protected] >
Signed-off-by: Felix Fietkau <[email protected] >
2023-07-26 13:15:57 +02:00
Lorenzo Bianconi and Felix Fietkau
b7c7fadf22
wifi: mt76: mt792x: move more dma shared code in mt792x_dma
...
Rely on irq_map support, move more dma shared code between mt7921 and
mt7925 in mt792x_dma.c
Move the following dma code in mt792x-lib
- mt792x_dma_enable
- mt792x_dma_reset
- mt792x_wpdma_reset
- mt792x_wpdma_reinit_cond
Signed-off-by: Lorenzo Bianconi <[email protected] >
Signed-off-by: Deren Wu <[email protected] >
Signed-off-by: Felix Fietkau <[email protected] >
2023-07-26 13:15:57 +02:00