Felix Fietkau
b36d556102
wifi: mt76: abort scan/roc on hw restart
...
Avoid spurious channel changes and clean up allocated links
Link: https://patch.msgid.link/20250915075910.47558-15-nbd@nbd.name
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2025-09-15 13:23:02 +02:00
Felix Fietkau
3f34cced88
wifi: mt76: improve phy reset on hw restart
...
- fix number of station accounting for scanning code.
- reset channel context
Link: https://patch.msgid.link/20250915075910.47558-14-nbd@nbd.name
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2025-09-15 13:23:02 +02:00
Howard Hsu
6855bebea8
wifi: mt76: mt7996: fill User Priority in skb->priority for rx packets
...
Set UP in skb->priority to allow DSCP Learning at upper layers
Signed-off-by: Howard Hsu <howard-yh.hsu@mediatek.com >
Link: https://patch.msgid.link/20250915075910.47558-13-nbd@nbd.name
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2025-09-15 13:23:01 +02:00
Peter Chiu
5847e7579e
wifi: mt76: mt7996: set VTA in txwi
...
Enable VTA flag in txwi to enable HQD in SPL which is needed by
the PST. Without this patch, PST cannot get the correct delay of
TxD and lead to a large latency.
Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com >
Link: https://patch.msgid.link/20250915075910.47558-12-nbd@nbd.name
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2025-09-15 13:23:01 +02:00
Howard Hsu
e99113ac09
wifi: mt76: mt7996: remove the mem_total field of STA_REC_BF command
...
It is not used by the firmware.
Signed-off-by: Howard Hsu <howard-yh.hsu@mediatek.com >
Link: https://patch.msgid.link/20250915075910.47558-11-nbd@nbd.name
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2025-09-15 13:23:01 +02:00
Peter Chiu
a4a66cbaa2
wifi: mt76: mt7996: disable promiscuous mode by default
...
Set MT_WF_RFCR_DROP_OTHER_UC by default and disable this flag in
mt7996_set_monitor only if monitor mode is enabled.
Without this patch, the MT_WF_RFCR_DROP_OTHER_UC would not be set so the
driver would receive lots of packets meant for other devices.
Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com >
Link: https://patch.msgid.link/20250915075910.47558-10-nbd@nbd.name
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2025-09-15 13:23:01 +02:00
Felix Fietkau
12911593ef
wifi: mt76: use altx queue for offchannel tx on connac+
...
This ensures that packets are sent out immediately and are not held by
firmware internal buffering.
Link: https://patch.msgid.link/20250915075910.47558-9-nbd@nbd.name
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2025-09-15 13:23:01 +02:00
Felix Fietkau
467cf7ae60
wifi: mt76: mt7996: fix updating beacon protection with beacons enabled
...
Disable and re-enable beacon after beacon protection key change, in order
to fully apply the changes.
Link: https://patch.msgid.link/20250915075910.47558-8-nbd@nbd.name
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2025-09-15 13:23:01 +02:00
Felix Fietkau
eddc7286f6
wifi: mt76: mt7996: fix key add/remove imbalance
...
Ensure that a key for a link is only added and removed once.
When bringing up a link, only upload keys for that particular link, instead
of iterating over all of them.
Link: https://patch.msgid.link/20250915075910.47558-7-nbd@nbd.name
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2025-09-15 13:23:01 +02:00
Felix Fietkau
04414d7bba
wifi: mt76: mt7996: delete vif keys when requested
...
While deleting sta keys can be omitted in order to fix race conditions,
vif keys must be deleted before being replaced in order to prevent
accidental reuse in firmware.
Link: https://patch.msgid.link/20250915075910.47558-6-nbd@nbd.name
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2025-09-15 13:23:01 +02:00
Felix Fietkau
7c0f63fe37
wifi: mt76: mt7996: fix memory leak on mt7996_mcu_sta_key_tlv error
...
Free the allocated skb on error
Link: https://patch.msgid.link/20250915075910.47558-5-nbd@nbd.name
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2025-09-15 13:23:01 +02:00
Felix Fietkau
0c45d52276
wifi: mt76: mt7996: fix setting beacon protection keys
...
Include beacon key information in the STA_REC_UPDATE call.
Remove mt7996_mcu_get_pn - when installing a new key, we should
not reuse any existing PN value.
Signed-off-by: Allen Ye <allen.ye@mediatek.com >
Signed-off-by: Michael-CY Lee <michael-cy.lee@mediatek.com >
Link: https://patch.msgid.link/20250915075910.47558-4-nbd@nbd.name
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2025-09-15 13:23:01 +02:00
Felix Fietkau
beb01caa57
wifi: mt76: mt7996: decrease timeout for commonly issued MCU commands
...
This allows faster recovery from firmware issues.
Based on patch by Chad Monroe and ported from mt7915.
Link: https://patch.msgid.link/20250915075910.47558-3-nbd@nbd.name
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2025-09-15 13:23:01 +02:00
Felix Fietkau
ace5d3b6b4
wifi: mt76: mt7996: improve hardware restart reliability
...
Port latest version of similar changes from mt7915:
- use reconfig_complete to restart mac_work / queues
- clear wcid and vif mask to avoid leak
- fix sta poll list corruption
- reset station links
- reset interface links
- clear rro list
Link: https://patch.msgid.link/20250915075910.47558-2-nbd@nbd.name
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2025-09-15 13:23:01 +02:00
Felix Fietkau
0a5df0ec47
wifi: mt76: mt7996: remove redundant per-phy mac80211 calls during restart
...
There is only one wiphy, so extra calls must be removed.
For calls that need to remain per-wiphy, use mt7996_for_each_phy
Fixes: 69d54ce749 ("wifi: mt76: mt7996: switch to single multi-radio wiphy")
Link: https://patch.msgid.link/20250915075910.47558-1-nbd@nbd.name
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2025-09-15 13:23:01 +02:00
Nick Morrow
fc6627ca8a
wifi: mt76: mt7921u: Add VID/PID for Netgear A7500
...
Add VID/PID 0846/9065 for Netgear A7500.
Reported-by: Autumn Dececco <autumndececco@gmail.com >
Tested-by: Autumn Dececco <autumndececco@gmail.com >
Signed-off-by: Nick Morrow <morrownr@gmail.com >
Cc: stable@vger.kernel.org
Acked-by: Lorenzo Bianconi <lorenzo@kernel.org >
Link: https://patch.msgid.link/80bacfd6-6073-4ce5-be32-ae9580832337@gmail.com
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2025-09-15 09:49:51 +02:00
Rosen Penev
c7c682100c
wifi: mt76: mt76_eeprom_override to int
...
mt76_eeprom_override has of_get_mac_address, which can return
-EPROBE_DEFER if the nvmem driver gets loaded after mt76 for some
reason.
Make sure this gets passed to probe so that nvmem mac overrides always
work.
Signed-off-by: Rosen Penev <rosenp@gmail.com >
Link: https://patch.msgid.link/20250911221619.16035-1-rosenp@gmail.com
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2025-09-15 09:49:50 +02:00
Howard Hsu
cb6ebbdffe
wifi: mt76: mt7996: support writing MAC TXD for AddBA Request
...
Support writing MAC TXD for the AddBA Req. Without this commit, the
start sequence number in AddBA Req will be unexpected value for MT7996
and MT7992. This can result in certain stations (e.g., AX200) dropping
packets, leading to ping failures and degraded connectivity. Ensuring
the correct MAC TXD and TXP helps maintain reliable packet transmission
and prevents interoperability issues with affected stations.
Signed-off-by: Howard Hsu <howard-yh.hsu@mediatek.com >
Link: https://patch.msgid.link/20250909-mt7996-addba-txd-fix-v1-1-feec16f0c6f0@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2025-09-15 09:47:42 +02:00
Ming Yen Hsieh
9557b6fe0c
wifi: mt76: mt7925: refine the txpower initialization flow
...
Refactor the initialization and reset flow for tx power setting to
eliminate redundant configurations
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com >
Link: https://patch.msgid.link/20250908071245.1833006-1-mingyen.hsieh@mediatek.com
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2025-09-15 09:47:42 +02:00
Zhi-Jun You
2b660ee10a
wifi: mt76: mt7915: fix mt7981 pre-calibration
...
In vendor driver, size of group cal and dpd cal for mt7981 includes 6G
although the chip doesn't support it.
mt76 doesn't take this into account which results in reading from the
incorrect offset.
For devices with precal, this would lead to lower bitrate.
Fix this by aligning groupcal size with vendor driver and switch to
freq_list_v2 in mt7915_dpd_freq_idx in order to get the correct offset.
Below are iwinfo of the test device with two clients connected
(iPhone 16, Intel AX210).
Before :
Mode: Master Channel: 36 (5.180 GHz) HT Mode: HE80
Center Channel 1: 42 2: unknown
Tx-Power: 23 dBm Link Quality: 43/70
Signal: -67 dBm Noise: -92 dBm
Bit Rate: 612.4 MBit/s
Encryption: WPA3 SAE (CCMP)
Type: nl80211 HW Mode(s): 802.11ac/ax/n
Hardware: embedded [MediaTek MT7981]
After:
Mode: Master Channel: 36 (5.180 GHz) HT Mode: HE80
Center Channel 1: 42 2: unknown
Tx-Power: 23 dBm Link Quality: 43/70
Signal: -67 dBm Noise: -92 dBm
Bit Rate: 900.6 MBit/s
Encryption: WPA3 SAE (CCMP)
Type: nl80211 HW Mode(s): 802.11ac/ax/n
Hardware: embedded [MediaTek MT7981]
Tested-on: mt7981 20240823
Fixes: 19a954edec ("wifi: mt76: mt7915: add mt7986, mt7916 and mt7981 pre-calibration")
Signed-off-by: Zhi-Jun You <hujy652@gmail.com >
Link: https://patch.msgid.link/20250909064824.16847-1-hujy652@gmail.com
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2025-09-15 09:47:42 +02:00
Lorenzo Bianconi
a09d2f9d69
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/20250909-mt7996-rro-rework-v5-0-7d66f6eb7795@kernel.org/T/#m8b488004d69036cd3672b9eeca8005a937ec0313
Fixes: 950d0abb5c ("wifi: mt76: mt7996: add wed rx support")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org >
Link: https://patch.msgid.link/301d5f2982ddb729c876fb65f9ac2443ce3f5ff1.1757414621.git.lorenzo@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2025-09-15 09:47:42 +02:00
Rex Lu
3a29164425
wifi: mt76: mt7996: Add SW path for HW-RRO v3.1
...
Introduce HW-RRO v3.1 support to be reused when Wireless Ethernet
Dispatcher (WED) is not available. HW-RRO v3.1 is supported by
MT7992 chipset.
Signed-off-by: Rex Lu <rex.lu@mediatek.com >
Co-developed-by: Lorenzo Bianconi <lorenzo@kernel.org >
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org >
Link: https://patch.msgid.link/20250909-mt7996-rro-rework-v5-16-7d66f6eb7795@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2025-09-15 09:47:42 +02:00
Lorenzo Bianconi
e50d4d710e
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 <rex.lu@mediatek.com >
Signed-off-by: Rex Lu <rex.lu@mediatek.com >
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org >
Link: https://patch.msgid.link/20250909-mt7996-rro-rework-v5-15-7d66f6eb7795@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2025-09-15 09:47:41 +02:00
Rex Lu
7b3c83dd87
wifi: mt76: mt7996: Decouple RRO logic from WED support
...
Decouple RRO logic from WED support in MT7996 driver in order to reuse
it when WED module is not available.
Signed-off-by: Rex Lu <rex.lu@mediatek.com >
Co-developed-by: Lorenzo Bianconi <lorenzo@kernel.org >
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org >
Link: https://patch.msgid.link/20250909-mt7996-rro-rework-v5-14-7d66f6eb7795@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2025-09-15 09:47:41 +02:00
Lorenzo Bianconi
1a7c1bffd3
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 <rex.lu@mediatek.com >
Signed-off-by: Rex Lu <rex.lu@mediatek.com >
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org >
Link: https://patch.msgid.link/20250909-mt7996-rro-rework-v5-13-7d66f6eb7795@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2025-09-15 09:47:41 +02:00
Rex Lu
b1e58e137b
wifi: mt76: mt7996: Introduce RRO MSDU callbacks
...
Introduce rx_rro_ind_process and rx_rro_add_msdu_page callbacks and the
related logic in the MT7996 driver. This is a preliminary patch to
decouple RRO logic from WED support and reuse RRO when WED module is not
available.
Signed-off-by: Rex Lu <rex.lu@mediatek.com >
Co-developed-by: Lorenzo Bianconi <lorenzo@kernel.org >
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org >
Link: https://patch.msgid.link/20250909-mt7996-rro-rework-v5-12-7d66f6eb7795@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2025-09-15 09:47:41 +02:00
Lorenzo Bianconi
809054a60d
wifi: mt76: mt7996: Convert mt7996_wed_rro_addr to LE
...
Do not use bitmask in mt7996_wed_rro_addr DMA descriptor in order to not
break endianness
Fixes: 950d0abb5c ("wifi: mt76: mt7996: add wed rx support")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org >
Link: https://patch.msgid.link/20250909-mt7996-rro-rework-v5-11-7d66f6eb7795@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2025-09-15 09:47:41 +02:00
Rex Lu
0d4dafacc1
wifi: mt76: mt7996: Enable WED for MT7992 chipset
...
Introduce WED offload support for MT7992 chipset in MT7996 driver.
Co-developed-by: Sujuan Chen <sujuan.chen@mediatek.com >
Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com >
Co-developed-by: Benjamin Lin <benjamin-jw.lin@mediatek.com >
Signed-off-by: Benjamin Lin <benjamin-jw.lin@mediatek.com >
Signed-off-by: Rex Lu <rex.lu@mediatek.com >
Co-developed-by: Lorenzo Bianconi <lorenzo@kernel.org >
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org >
Link: https://patch.msgid.link/20250909-mt7996-rro-rework-v5-10-7d66f6eb7795@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2025-09-15 09:47:41 +02:00
Lorenzo Bianconi
cffed52dbf
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: 83eafc9251 ("wifi: mt76: mt7996: add wed tx support")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org >
Link: https://patch.msgid.link/20250909-mt7996-rro-rework-v5-9-7d66f6eb7795@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2025-09-15 09:47:41 +02:00
Lorenzo Bianconi
77ff8caf3b
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: 83eafc9251 ("wifi: mt76: mt7996: add wed tx support")
Co-developed-by: Sujuan Chen <sujuan.chen@mediatek.com >
Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com >
Co-developed-by: Benjamin Lin <benjamin-jw.lin@mediatek.com >
Signed-off-by: Benjamin Lin <benjamin-jw.lin@mediatek.com >
Co-developed-by: Rex Lu <rex.lu@mediatek.com >
Signed-off-by: Rex Lu <rex.lu@mediatek.com >
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org >
Link: https://patch.msgid.link/20250909-mt7996-rro-rework-v5-8-7d66f6eb7795@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2025-09-15 09:47:41 +02:00
Rex Lu
9dd5beb7f0
wifi: mt76: mt7996: Introduce the capability to reset MT7992 WED device
...
This is a preliminary patch to enable WED support for MT7992 Kite
chipset supported by MT7996 driver.
Co-developed-by: Sujuan Chen <sujuan.chen@mediatek.com >
Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com >
Co-developed-by: Benjamin Lin <benjamin-jw.lin@mediatek.com >
Signed-off-by: Benjamin Lin <benjamin-jw.lin@mediatek.com >
Signed-off-by: Rex Lu <rex.lu@mediatek.com >
Co-developed-by: Lorenzo Bianconi <lorenzo@kernel.org >
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org >
Link: https://patch.msgid.link/20250909-mt7996-rro-rework-v5-7-7d66f6eb7795@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2025-09-15 09:47:41 +02:00
Rex Lu
eedb427eb2
wifi: mt76: mt7996: Enable HW RRO for MT7992 chipset
...
This is a preliminary patch to enable WED support for MT7992 Kite
chipset supported by MT7996 driver.
Co-developed-by: Sujuan Chen <sujuan.chen@mediatek.com >
Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com >
Co-developed-by: Benjamin Lin <benjamin-jw.lin@mediatek.com >
Signed-off-by: Benjamin Lin <benjamin-jw.lin@mediatek.com >
Signed-off-by: Rex Lu <rex.lu@mediatek.com >
Co-developed-by: Lorenzo Bianconi <lorenzo@kernel.org >
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org >
Link: https://patch.msgid.link/20250909-mt7996-rro-rework-v5-6-7d66f6eb7795@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2025-09-15 09:47:41 +02:00
Rex Lu
3bc2f02f5c
wifi: mt76: mt7996: Initial DMA configuration for MT7992 WED support
...
Manage differences in DMA and RX queues configuration for MT7992 and
MT7996.
This is a preliminary patch to enable WED support for MT7992 Kite
chipset supported by MT7996 driver.
Co-developed-by: Sujuan Chen <sujuan.chen@mediatek.com >
Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com >
Co-developed-by: Benjamin Lin <benjamin-jw.lin@mediatek.com >
Signed-off-by: Benjamin Lin <benjamin-jw.lin@mediatek.com >
Signed-off-by: Rex Lu <rex.lu@mediatek.com >
Co-developed-by: Lorenzo Bianconi <lorenzo@kernel.org >
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org >
Link: https://patch.msgid.link/20250909-mt7996-rro-rework-v5-5-7d66f6eb7795@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2025-09-15 09:47:41 +02:00
Lorenzo Bianconi
d77f77ff45
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 <lorenzo@kernel.org >
Link: https://patch.msgid.link/20250909-mt7996-rro-rework-v5-4-7d66f6eb7795@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2025-09-15 09:47:40 +02:00
Rex Lu
ba9f68bb77
wifi: mt76: Differentiate between RRO data and RRO MSDU queues
...
This is a preliminary patch to enable WED support for MT7992 Kite
chipset supported by MT7996 driver.
Co-developed-by: Sujuan Chen <sujuan.chen@mediatek.com >
Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com >
Co-developed-by: Benjamin Lin <benjamin-jw.lin@mediatek.com >
Signed-off-by: Benjamin Lin <benjamin-jw.lin@mediatek.com >
Signed-off-by: Rex Lu <rex.lu@mediatek.com >
Co-developed-by: Lorenzo Bianconi <lorenzo@kernel.org >
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org >
Link: https://patch.msgid.link/20250909-mt7996-rro-rework-v5-3-7d66f6eb7795@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2025-09-15 09:47:40 +02:00
Lorenzo Bianconi
2182974e9f
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 <lorenzo@kernel.org >
Link: https://patch.msgid.link/20250909-mt7996-rro-rework-v5-2-7d66f6eb7795@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2025-09-15 09:47:40 +02:00
Lorenzo Bianconi
f6b29367b0
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 <rex.lu@mediatek.com >
Signed-off-by: Rex Lu <rex.lu@mediatek.com >
Co-developed-by: Sujuan Chen <sujuan.chen@mediatek.com >
Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com >
Co-developed-by: Benjamin Lin <benjamin-jw.lin@mediatek.com >
Signed-off-by: Benjamin Lin <benjamin-jw.lin@mediatek.com >
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org >
Link: https://patch.msgid.link/20250909-mt7996-rro-rework-v5-1-7d66f6eb7795@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2025-09-15 09:47:40 +02:00
Lorenzo Bianconi
f5160304d5
wifi: mt76: mt7996: Enable MLO support for client interfaces
...
Report MT7996 MLO STA capabilities to mac80211 stack.
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org >
Link: https://patch.msgid.link/20250901-mt7996-enable-mlo-client-v1-1-50c46317325d@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2025-09-15 09:47:40 +02:00
Lorenzo Bianconi
24e2846f15
wifi: mt76: mt7996: Set EML capabilities for AP interface
...
Report EML capabilities to hostapd for AP interface.
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org >
Link: https://patch.msgid.link/20250830-mt7996_ap_eml_capa-v1-1-ef69c97c6adc@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2025-09-15 09:47:40 +02:00
Shayne Chen
a9eae65d97
wifi: mt76: mt7996: Export MLO AP capabilities to mac80211
...
Report MT7996 MLO AP capabilities to mac80211 stack.
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com >
Co-developed-by: Lorenzo Bianconi <lorenzo@kernel.org >
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org >
Link: https://patch.msgid.link/20250827-mt7996-mlo-ap-capa-v1-1-b5cfbcafa25f@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2025-09-15 09:47:40 +02:00
Benjamin Lin
e6291bb7a5
wifi: mt76: mt7996: Temporarily disable EPCS
...
EPCS is not yet ready, so do not claim to support it.
Signed-off-by: Benjamin Lin <benjamin-jw.lin@mediatek.com >
Co-developed-by: Lorenzo Bianconi <lorenzo@kernel.org >
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org >
Link: https://patch.msgid.link/20250904-mt7996-mlo-more-fixes-v1-4-89d8fed67f20@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2025-09-15 09:47:40 +02:00
Shayne Chen
7ef0c7ad73
wifi: mt76: mt7996: Implement MLD address translation for EAPOL
...
Do the MLD to link address translation for EAPOL frames in driver.
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com >
Co-developed-by: Lorenzo Bianconi <lorenzo@kernel.org >
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org >
Link: https://patch.msgid.link/20250904-mt7996-mlo-more-fixes-v1-3-89d8fed67f20@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2025-09-15 09:47:40 +02:00
Lorenzo Bianconi
9aa03d1823
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 <Bo.Jiao@mediatek.com >
Signed-off-by: Bo Jiao <Bo.Jiao@mediatek.com >
Co-developed-by: Shayne Chen <shayne.chen@mediatek.com >
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com >
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org >
Link: https://patch.msgid.link/20250904-mt7996-mlo-more-fixes-v1-2-89d8fed67f20@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2025-09-15 09:47:40 +02:00
Shayne Chen
a3ea1c309b
wifi: mt76: mt7996: Fix mt7996_reverse_frag0_hdr_trans for MLO
...
Update mt7996_reverse_frag0_hdr_trans routine to support MLO.
Co-developed-by: Bo Jiao <Bo.Jiao@mediatek.com >
Signed-off-by: Bo Jiao <Bo.Jiao@mediatek.com >
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com >
Co-developed-by: Lorenzo Bianconi <lorenzo@kernel.org >
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org >
Link: https://patch.msgid.link/20250904-mt7996-mlo-more-fixes-v1-1-89d8fed67f20@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2025-09-15 09:47:39 +02:00
Lorenzo Bianconi
141f0c9a89
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 <lorenzo@kernel.org >
Link: https://patch.msgid.link/20250902-mt7996_mcu_add_group-fix-v1-1-312e14794dee@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2025-09-15 09:47:39 +02:00
Quan Zhou
25ef5b5d02
wifi: mt76: mt7921: Add 160MHz beamformee capability for mt7922 device
...
Enable 160MHz beamformee support on mt7922 by updating HE capability
element configuration. Previously, only 160MHz channel width was set,
but beamformee for 160MHz was not properly advertised. This patch
adds BEAMFORMEE_MAX_STS_ABOVE_80MHZ_4 capability to allow devices
to utilize 160MHz BW for beamforming.
Tested by connecting to 160MHz-bandwidth beamforming AP and verified
HE capability.
Signed-off-by: Quan Zhou <quan.zhou@mediatek.com >
Link: https://patch.msgid.link/ae637afaffed387018fdc43709470ef65898ff0b.1756383627.git.quan.zhou@mediatek.com
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2025-09-15 09:47:39 +02:00
Jack Kao
d54424fbc5
wifi: mt76: mt7925: add pci restore for hibernate
...
Due to hibernation causing a power off and power on,
this modification adds mt7925_pci_restore callback function for kernel.
When hibernation resumes, it calls mt7925_pci_restore to reset the device,
allowing it to return to the state it was in before the power off.
Signed-off-by: Jack Kao <jack.kao@mediatek.com >
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com >
Link: https://patch.msgid.link/20250901073200.230033-1-mingyen.hsieh@mediatek.com
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2025-09-15 09:47:39 +02:00
Lorenzo Bianconi
fe5fffadc6
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: dd82a9e02c ("wifi: mt76: mt7996: Rely on mt7996_sta_link in sta_add/sta_remove callbacks")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org >
Link: https://patch.msgid.link/20250830-mt7996_mac_sta_add_links-fix-v1-1-4219fb8755ee@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2025-09-15 09:47:39 +02:00
Lorenzo Bianconi
afff432554
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: 0762bdd302 ("wifi: mt76: mt7996: rework mt7996_mac_sta_rc_work to support MLO")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org >
Link: https://patch.msgid.link/20250901-mt7996-fix-link_sta_rc_update-callback-v1-1-e24caf196222@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2025-09-15 09:47:39 +02:00
Lorenzo Bianconi
1318d6822f
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 <lorenzo@kernel.org >
Link: https://patch.msgid.link/20250826-mt76_scan_work-dead-code-v1-1-ac5234c4d044@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2025-09-15 09:47:39 +02:00