Commit Graph
4441 Commits
Author SHA1 Message Date
Felix Fietkau ddbe1f6eb2 wifi: mt76: abort scan/roc on hw restart
Avoid spurious channel changes and clean up allocated links

Signed-off-by: Felix Fietkau <[email protected]>
2025-09-12 13:51:36 +02:00
Felix Fietkau d17519baab wifi: mt76: improve phy reset on hw restart
- fix number of station accounting for scanning code.
- reset channel context

Signed-off-by: Felix Fietkau <[email protected]>
2025-09-12 13:51:36 +02:00
Howard HsuandFelix Fietkau a06461861f 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 <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2025-09-12 13:05:40 +02:00
Peter ChiuandFelix Fietkau e88deeb145 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 <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2025-09-12 13:00:54 +02:00
Howard HsuandFelix Fietkau a9d21b7ece 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 <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2025-09-12 12:48:23 +02:00
Peter ChiuandFelix Fietkau fd4c0858e5 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 <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2025-09-12 12:41:40 +02:00
Felix Fietkau 1383b5548f 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.

Signed-off-by: Felix Fietkau <[email protected]>
2025-09-12 11:56:26 +02:00
Felix Fietkau bba7ae0b1a wifi: mt76: mt7996: drop connac mcu wtbl clear
The firmware does not support the command

Signed-off-by: Felix Fietkau <[email protected]>
2025-09-11 10:28:24 +02:00
Felix Fietkau 5b0cbb0580 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.

Signed-off-by: Felix Fietkau <[email protected]>
2025-09-10 17:59:04 +02:00
Felix Fietkau e995f6198d 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.

Signed-off-by: Felix Fietkau <[email protected]>
2025-09-10 17:59:04 +02:00
Felix Fietkau 587012a433 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.

Signed-off-by: Felix Fietkau <[email protected]>
2025-09-10 17:59:04 +02:00
Felix Fietkau 75cd7c365b wifi: mt76: mt7996: fix memory leak on mt7996_mcu_sta_key_tlv error
Free the allocated skb on error

Signed-off-by: Felix Fietkau <[email protected]>
2025-09-10 17:59:04 +02:00
Felix Fietkau 904abc93b7 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 <[email protected]>
Signed-off-by: Michael-CY Lee <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2025-09-10 17:58:46 +02:00
Felix Fietkau a6559a003d 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.

Signed-off-by: Felix Fietkau <[email protected]>
2025-09-09 18:09:51 +02:00
Felix Fietkau ffda443265 wifi: mt76: mt7996: improve hardware restart reliability
Port latest version of similar changes from mt7915:
- use reconfig_complete to restart mac_work / queues
- reset full wtbl after firmware init
- clear wcid and vif mask to avoid leak
- fix sta poll list corruption
- clear rro list

Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2025-09-09 18:09:50 +02:00
Felix Fietkau a4d6f193be 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: 69d54ce7491d ("wifi: mt76: mt7996: switch to single multi-radio wiphy")
Signed-off-by: Felix Fietkau <[email protected]>
2025-09-09 18:09:50 +02:00
Lorenzo BianconiandFelix 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
Howard HsuandFelix Fietkau b50c633f91 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 <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2025-09-09 18:07:40 +02:00
Ming Yen HsiehandFelix Fietkau 5776b32929 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 <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2025-09-09 15:11:50 +02:00
Ming Yen HsiehandFelix Fietkau 015349622b wifi: mt76: mt7925: fix incorrect length field in txpower command
Set `tx_power_tlv->len` to `msg_len` instead of `sizeof(*tx_power_tlv)`
to ensure the correct message length is sent to firmware.

Cc: [email protected]
Fixes: c948b5da6bbe ("wifi: mt76: mt7925: add Mediatek Wi-Fi7 driver for mt7925 chips")
Signed-off-by: Ming Yen Hsieh <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2025-09-09 15:11:01 +02:00
Zhi-Jun YouandFelix Fietkau 0d6eaa4174 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: 19a954edec63 ("wifi: mt76: mt7915: add mt7986, mt7916 and mt7981 pre-calibration")
Signed-off-by: Zhi-Jun You <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2025-09-09 15:08:35 +02:00
Lorenzo BianconiandFelix 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
Felix Fietkau 76401f5e2e mt76: update RRO patches to the latest version
Fix endian issues

Signed-off-by: Felix Fietkau <[email protected]>
2025-09-09 15:06:06 +02:00
Felix Fietkau 91dcccebfe firmware: update mt7996/mt7992 firmware to 20250905
Upstream description:
"Update FW to 20250905 to fix MLO T.P issue scan or channel switch."

Signed-off-by: Felix Fietkau <[email protected]>
2025-09-09 10:40:24 +02:00
Felix Fietkau 03b0c87163 wifi: mt76: mt7996: add missing NULL pointer check
Fixes: d1a2900a39 ("wifi: mt76: mt7996: Set proper link destination address in mt7996_tx()")
Signed-off-by: Felix Fietkau <[email protected]>
2025-09-09 09:56:12 +02:00
Ming Yen HsiehandFelix Fietkau 719cda7c9f wifi: mt76: mt7925: prevent NULL pointer dereference in mt7925_tx_check_aggr()
Move the NULL check for 'sta' before dereferencing it to prevent a
possible crash.

Fixes: 44eb173bdd4f ("wifi: mt76: mt7925: add link handling in mt7925_txwi_free")
Signed-off-by: Ming Yen Hsieh <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2025-09-09 07:19:41 +02:00
Ming Yen HsiehandFelix Fietkau d48b221e39 wifi: mt76: mt7925: prevent NULL vif dereference in mt7925_mac_write_txwi
Check for a NULL `vif` before accessing `ieee80211_vif_is_mld(vif)` to
avoid a potential kernel panic in scenarios where `vif` might not be
initialized.

Fixes: ebb1406813c6 ("wifi: mt76: mt7925: add link handling to txwi")
Signed-off-by: Ming Yen Hsieh <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2025-09-09 07:19:41 +02:00
Felix Fietkau f271ce48d7 mt76: mt7996: fix unsigned comparison
Fixes detecing error condition from get_own_mld_idx

Fixes: 110ecc3311 ("wifi: mt76: mt7996: Fix mt7996_mcu_bss_mld_tlv routine")
Signed-off-by: Felix Fietkau <[email protected]>
2025-09-09 06:36:19 +02:00
Rex LuandFelix Fietkau 6c902ccba8 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 <[email protected]>
Co-developed-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2025-09-04 19:09:11 +02:00
Lorenzo BianconiandFelix 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
Rex LuandFelix Fietkau d82330a9d0 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 <[email protected]>
Co-developed-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2025-09-04 19:09:11 +02:00
Lorenzo BianconiandFelix 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
Rex LuandFelix Fietkau 13eb05fa4a wifi: mt76: mt7996: Introduce RRO MSDU callbacks
Introduce rx_rro_ind_process and rx_rro_add_msdu_page callbacks and the
related logic in the MT7996 driver. This is a preliminary patch to
decouple RRO logic from WED support and reuse RRO when WED module is not
available.

Signed-off-by: Rex Lu <[email protected]>
Co-developed-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2025-09-04 19:09:11 +02:00
Rex LuandFelix Fietkau 6b518355fe wifi: mt76: mt7996: Enable WED for MT7992 chipset
Introduce WED offload support for MT7992 chipset in MT7996 driver.

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: Rex Lu <[email protected]>
Co-developed-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2025-09-04 19:09:11 +02:00
Lorenzo BianconiandFelix 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 BianconiandFelix 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
Rex LuandFelix Fietkau 8134055d34 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 <[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: Rex Lu <[email protected]>
Co-developed-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2025-09-04 19:09:11 +02:00
Rex LuandFelix Fietkau fca511f401 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 <[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: Rex Lu <[email protected]>
Co-developed-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2025-09-04 19:09:11 +02:00
Rex LuandFelix Fietkau 1df7908392 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 <[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: Rex Lu <[email protected]>
Co-developed-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2025-09-04 19:09:11 +02:00
Lorenzo BianconiandFelix 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
Rex LuandFelix Fietkau d540538299 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 <[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: Rex Lu <[email protected]>
Co-developed-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2025-09-04 19:09:11 +02:00
Lorenzo BianconiandFelix 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 BianconiandFelix 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 BianconiandFelix 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
Breno LeitaoandFelix Fietkau ef2468830f wifi: mt76: un-embedd netdev from mt76_dev
Embedding net_device into structures prohibits the usage of flexible
arrays in the net_device structure. For more details, see the discussion
at [1].

Un-embed the net_devices from struct mt76_dev by converting them
into pointers, and allocating them dynamically. Use the leverage
alloc_netdev_dummy() to allocate the net_device object at
mt76_dma_init().

The free of the device occurs at mt76_dma_cleanup().

Link: https://lore.kernel.org/all/[email protected]/ [1]
Reviewed-by: Simon Horman <[email protected]>
Signed-off-by: Breno Leitao <[email protected]>
Acked-by: Kalle Valo <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
2025-09-04 19:05:35 +02:00
Rory LittleandFelix Fietkau 5f3ea4562f wifi: mt76: mt7921: Place upper limit on station AID
Any station configured with an AID over 20 causes a firmware crash.
This situation occurred in our testing using an AP interface on 7922
hardware, with a modified hostapd, sourced from Mediatek's OpenWRT
feeds.

In stock hostapd, station AIDs begin counting at 1, and this
configuration is prevented with an upper limit on associated stations.
However, the modified hostapd began allocation at 65, which caused the
firmware to crash. This fix does not allow these AIDs to work, but will
prevent the firmware crash.

This crash was only seen on IFTYPE_AP interfaces, and the fix does not
appear to have an effect on IFTYPE_STATION behavior.

Fixes: 5c14a5f944b9 ("mt76: mt7921: introduce mt7921e support")
Signed-off-by: Rory Little <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2025-09-04 15:02:50 +02:00
Benjamin LinandFelix Fietkau a1c319500a wifi: mt76: mt7996: Temporarily disable EPCS
EPCS is not yet ready, so do not claim to support it.

Signed-off-by: Benjamin Lin <[email protected]>
Co-developed-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2025-09-04 15:01:06 +02:00
Shayne ChenandFelix Fietkau 16090cb27d 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 <[email protected]>
Co-developed-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2025-09-04 15:01:06 +02:00
Lorenzo BianconiandFelix 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
Shayne ChenandFelix Fietkau 304226bc45 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 <[email protected]>
Signed-off-by: Bo Jiao <[email protected]>
Signed-off-by: Shayne Chen <[email protected]>
Co-developed-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2025-09-04 15:01:06 +02:00