Commit Graph
317 Commits
Author SHA1 Message Date
Lorenzo BianconiandFelix 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 BianconiandFelix 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 BianconiandFelix 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
Rameshkumar SundaramandFelix Fietkau e41c778558 wifi: mac80211: get tx power per link
ML interfaces can have multiple affiliated links to it and
hence there is a need to report tx power of specified link
rather deflink.

Add changes to report tx power of requested link from mac80211,
also pass link id as an argument in get_tx_power op so that supported
drivers can use it to report link's tx power.

Co-developed-by: Aaradhana Sahu <[email protected]>
Signed-off-by: Aaradhana Sahu <[email protected]>
Signed-off-by: Rameshkumar Sundaram <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Johannes Berg <[email protected]>
2025-07-04 20:47:07 +02:00
Felix Fietkau 243e572d89 wifi: mt76: add a wrapper for wcid access with validation
Several places use rcu_dereference to get a wcid entry without validating
if the index exceeds the array boundary. Fix this by using a helper function,
which handles validation.

Signed-off-by: Felix Fietkau <[email protected]>
2025-07-04 20:46:06 +02:00
Lorenzo BianconiandFelix 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 BianconiandFelix 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 BianconiandFelix 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 BianconiandFelix 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
Shayne ChenandFelix Fietkau da2c23bec4 wifi: mt76: support power delta calculation for 5 TX paths
One variant of MT7992 has 5 TX paths, so extend the power delta function
to support it. Also, rename nss_delta to path_delta since the value is
based on the number of TX paths rather tha the number of spatial streams.
(path delta [0.5 dBm] = 10 * log(path number) [dBm] * 2)

Co-developed-by: StanleyYP Wang <[email protected]>
Signed-off-by: StanleyYP Wang <[email protected]>
Signed-off-by: Shayne Chen <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2025-05-21 14:44:30 +02:00
Shayne ChenandFelix Fietkau 8808d7c4ee wifi: mt76: mt7996: fix RX buffer size of MCU event
Some management frames are first processed by the firmware and then
passed to the driver through the MCU event rings. In CONNAC3, event rings
do not support scatter-gather and have a size limitation of 2048 bytes.
If a packet sized between 1728 and 2048 bytes arrives from an event ring,
the ring will hang because the driver attempts to use scatter-gather to
process it.

To fix this, include the size of struct skb_shared_info in the MCU RX
buffer size to prevent scatter-gather from being used for event skb in
mt76_dma_rx_fill_buf().

Fixes: 98686cd21624 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices")
Co-developed-by: Peter Chiu <[email protected]>
Signed-off-by: Peter Chiu <[email protected]>
Signed-off-by: Shayne Chen <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2025-05-21 14:44:30 +02:00
Peter ChiuandFelix Fietkau b9f01d7c36 wifi: mt76: mt7996: change max beacon size
According to hardware capability, the maximum beacon size is 2048 bytes
minus the size of TLV headers.

Signed-off-by: Peter Chiu <[email protected]>
Signed-off-by: Shayne Chen <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2025-05-21 14:44:30 +02:00
Peter ChiuandFelix Fietkau bf22595a1d wifi: mt76: mt7996: fix invalid NSS setting when TX path differs from NSS
The maximum TX path and NSS may differ on a band. For example, one variant
of the MT7992 has 5 TX paths and 4 NSS on the 5 GHz band. To address this,
add orig_antenna_mask to record the maximum NSS and prevent setting an
invalid NSS in mt7996_set_antenna().

Fixes: 69d54ce7491d ("wifi: mt76: mt7996: switch to single multi-radio wiphy")
Signed-off-by: Peter Chiu <[email protected]>
Signed-off-by: Shayne Chen <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2025-05-21 14:44:30 +02:00
Benjamin LinandFelix Fietkau 7d30840e5b wifi: mt76: mt7996: drop fragments with multicast or broadcast RA
IEEE 802.11 fragmentation can only be applied to unicast frames.
Therefore, drop fragments with multicast or broadcast RA. This patch
addresses vulnerabilities such as CVE-2020-26145.

Signed-off-by: Benjamin Lin <[email protected]>
Signed-off-by: Shayne Chen <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2025-05-21 14:44:30 +02:00
Peter ChiuandFelix Fietkau 3bda39f146 wifi: mt76: mt7996: set EHT max ampdu length capability
Set the max AMPDU length in the EHT MAC CAP. Without this patch, the
peer station cannot obtain the correct capability, which prevents
achieving peak throughput on the 2 GHz band.

Fixes: 1816ad9381e0 ("wifi: mt76: mt7996: add max mpdu len capability")
Signed-off-by: Peter Chiu <[email protected]>
Signed-off-by: Shayne Chen <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2025-05-21 14:44:30 +02:00
Howard HsuandFelix Fietkau 1865f5ea80 wifi: mt76: mt7996: fix beamformee SS field
Fix the beamformee SS field for the mt7996, mt7992 and mt7990 chipsets.
For the mt7992, this value shall be set to 0x4, while the others shall
be set to 0x3.

Fixes: 5b20557593d4 ("wifi: mt76: connac: adjust phy capabilities based on band constraints")
Signed-off-by: Howard Hsu <[email protected]>
Signed-off-by: Shayne Chen <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2025-05-21 14:44:30 +02:00
Howard HsuandFelix Fietkau a2838480f8 wifi: mt76: remove capability of partial bandwidth UL MU-MIMO
The firmware only supports full bandwidth UL MU-MIMO, so remove the
partial bandwidth capability from HE PHY CAP.

Signed-off-by: Howard Hsu <[email protected]>
Signed-off-by: Shayne Chen <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2025-05-21 14:44:30 +02:00
Henry MartinandFelix Fietkau a68584ddf9 wifi: mt76: mt7996: Fix null-ptr-deref in mt7996_mmio_wed_init()
devm_ioremap() returns NULL on error. Currently, mt7996_mmio_wed_init()
does not check for this case, which results in a NULL pointer
dereference.

Prevent null pointer dereference in mt7996_mmio_wed_init()

Fixes: 83eafc9251d6 ("wifi: mt76: mt7996: add wed tx support")
Signed-off-by: Henry Martin <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2025-05-21 14:35:42 +02:00
Dan CarpenterandFelix Fietkau ca76c1bced wifi: mt76: mt7996: remove duplicate check in mt7996_mcu_sta_mld_setup_tlv()
The "msta_link" pointer has two NULL checks.  Delete the second check.

Signed-off-by: Dan Carpenter <[email protected]>
Acked-by: Lorenzo Bianconi <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2025-05-21 14:30:01 +02:00
sunlimingandFelix Fietkau 925d156dab wifi: mt76: mt7996: fix uninitialized symbol warning
Fix below smatch warnings:
drivers/net/wireless/mediatek/mt76/mt7996/main.c:952 mt7996_mac_sta_add_links()
error: uninitialized symbol 'err'.
drivers/net/wireless/mediatek/mt76/mt7996/main.c:1133 mt7996_set_rts_threshold()
error: uninitialized symbol 'ret'.

Reported-by: kernel test robot <[email protected]>
Reported-by: Dan Carpenter <[email protected]>
Closes: https://lore.kernel.org/r/[email protected]/
Signed-off-by: sunliming <[email protected]>
Link: https://patch.msgid.link/[email protected]
2025-05-21 14:25:17 +02:00
Qasim IjazandFelix Fietkau 7fdbe4cb5c wifi: mt76: mt7996: avoid null deref in mt7996_stop_phy()
In mt7996_stop_phy() the mt7996_phy structure is
dereferenced before the null sanity check which could
lead to a null deref.

Fix by moving the dereference operation after the
sanity check.

Fixes: 69d54ce7491d ("wifi: mt76: mt7996: switch to single multi-radio wiphy")
Signed-off-by: Qasim Ijaz <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2025-05-21 14:25:17 +02:00
Qasim IjazandFelix Fietkau d0ef73122e wifi: mt76: mt7996: avoid NULL pointer dereference in mt7996_set_monitor()
The function mt7996_set_monitor() dereferences phy before
the NULL sanity check.

Fix this to avoid NULL pointer dereference by moving the
dereference after the check.

Fixes: 69d54ce7491d ("wifi: mt76: mt7996: switch to single multi-radio wiphy")
Signed-off-by: Qasim Ijaz <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2025-05-21 14:25:17 +02:00
Qasim IjazandFelix Fietkau 29363a6691 wifi: mt76: mt7996: prevent uninit return in mt7996_mac_sta_add_links
If link_conf_dereference_protected() or mt7996_vif_link()
or link_sta_dereference_protected() fail the code jumps to
the error_unlink label and returns ret which is uninitialised.

Fix this by setting err before jumping to error_unlink.

Fixes: c7e4fc362443 ("wifi: mt76: mt7996: Update mt7996_mcu_add_sta to MLO support")
Fixes: dd82a9e02c05 ("wifi: mt76: mt7996: Rely on mt7996_sta_link in sta_add/sta_remove callbacks")
Signed-off-by: Qasim Ijaz <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2025-05-21 14:10:11 +02:00
Shayne ChenandFelix Fietkau 55218e6360 Revert "wifi: mt76: mt7996: fill txd by host driver"
This reverts commit 3b522cadedfe6e9e0e8193d7d4ab5aa8d0c73209.

The MTK connac3 has introduced new hardware, SDO (Software Defined
Offload), to offload the process of filling the TX descriptor. Initially,
there were some issues, but after several fixes, it should now be stable,
allowing us to revert this commit.

Additionally, activating SDO is essential for the proper functioning of
features like TX checksum offload.

Signed-off-by: Shayne Chen <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2025-04-16 17:13:03 +02:00
Charles HanandFelix Fietkau be28ef77e3 wifi: mt76: mt7996: Add NULL check in mt7996_thermal_init
devm_kasprintf() can return a NULL pointer on failure,but this
returned value in mt7996_thermal_init() is not checked.
Add NULL check in mt7996_thermal_init(), to handle kernel NULL
pointer dereference error.

Fixes: 69d54ce7491d ("wifi: mt76: mt7996: switch to single multi-radio wiphy")
Signed-off-by: Charles Han <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2025-04-11 11:07:15 +02:00
StanleyYP WangandFelix Fietkau a19543c7e0 wifi: mt76: mt7996: rework radar HWRDD idx
The definition of MT_RX_SEL (for rdd_rx_sel) is mixed with the
definition of HWRDD idx.
For example, MT_RX_SEL2 is for background HWRDD idx, not an
option of rdd_rx_sel.
Additionally, HWRDD idx does not exactly map to band idx for
Connac 3 chips. So, add mt7996_get_rdd_idx as a helper function.

Finally, remove some parts of the code inherited from the legacy chips.
For instance,
1. rdd_state is used for single-band-dual-HWRDD chips (for 80+80),
especially the 76xx series.
2. rdd_rx_sel is also used for single-band-dual-HWRDD chips
rx_sel = 0 => RDD0 for WF0, RDD1 for WF2
rx_sel = 1 => RDD0 for WF1, RDD1 for WF3

Chip Variants              | 5G rdd idx     | Background rdd idx
---------------------------|----------------|-------------------
MT7996 (except 205/255)    | 1              | 2
MT7992                     | 1              | 2
MT7990                     | 1              | 2

Signed-off-by: StanleyYP Wang <[email protected]>
Reviewed-by: Shayne Chen <[email protected]>
Reviewed-by: Money Wang <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2025-04-11 10:40:33 +02:00
Peter ChiuandFelix Fietkau f8c3dd3677 wifi: mt76: mt7996: add PCI device id for mt7990
Add PCI device IDs to enable support for mt7990 chipsets.

Signed-off-by: Peter Chiu <[email protected]>
Signed-off-by: Shayne Chen <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2025-04-11 10:29:38 +02:00
StanleyYP WangandFelix Fietkau bc588ac3d1 wifi: mt76: mt7996: rework background radar check for mt7990
The MT7990 comes in 2T2R and 3T3R variants, with only the 2T2R supporting
background radar.

Signed-off-by: StanleyYP Wang <[email protected]>
Signed-off-by: Shayne Chen <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2025-04-11 10:29:38 +02:00
Shayne ChenandFelix Fietkau 10c3ea97a8 wifi: mt76: connac: rework TX descriptor and TX free for mt7990
Adjust the TX descriptor and TX free for updated hardware fields.
This is a preliminary patch to support mt7990 chipset.

Co-developed-by: StanleyYP Wang <[email protected]>
Signed-off-by: StanleyYP Wang <[email protected]>
Co-developed-by: Benjamin Lin <[email protected]>
Signed-off-by: Benjamin Lin <[email protected]>
Co-developed-by: Peter Chiu <[email protected]>
Signed-off-by: Peter Chiu <[email protected]>
Signed-off-by: Shayne Chen <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2025-04-11 10:29:38 +02:00
Peter ChiuandFelix Fietkau d0799f3303 wifi: mt76: mt7996: adjust HW capabilities for mt7990
This is a preliminary patch to support mt7990 chipset.

Co-developed-by: Howard Hsu <[email protected]>
Signed-off-by: Howard Hsu <[email protected]>
Co-developed-by: Shayne Chen <[email protected]>
Signed-off-by: Shayne Chen <[email protected]>
Signed-off-by: Peter Chiu <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2025-04-11 10:29:38 +02:00
StanleyYP WangandFelix Fietkau 51db7a2d57 wifi: mt76: mt7996: add eeprom support for mt7990
Add eeprom definition and default bin file for mt7990.
This is a preliminary patch to support mt7990 chipset.

Signed-off-by: StanleyYP Wang <[email protected]>
Signed-off-by: Shayne Chen <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2025-04-11 10:29:38 +02:00
StanleyYP WangandFelix Fietkau a8def214d7 wifi: mt76: mt7996: rework register mapping for mt7990
Rework register offset and l1/l2/cbtop mapping for mt7990.
This is a preliminary patch to support mt7990 chipset.

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: StanleyYP Wang <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2025-04-11 10:29:38 +02:00
Peter ChiuandFelix Fietkau 6243414a4e wifi: mt76: mt7996: rework DMA configuration for mt7990
Modify DMA ring setting for mt7990.
This is a preliminary patch to support mt7990 chipset.

Co-developed-by: StanleyYP Wang <[email protected]>
Signed-off-by: StanleyYP Wang <[email protected]>
Signed-off-by: Peter Chiu <[email protected]>
Signed-off-by: Shayne Chen <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2025-04-11 10:29:38 +02:00
Peter ChiuandFelix Fietkau 3908cf04aa wifi: mt76: mt7996: rework WA mcu command for mt7990
Since mt7990 lacks WA firmware, some WA commands are not supported or
need to be refactored to use the SDO command.
This is a preliminary patch to support mt7990 chipset.

Signed-off-by: Peter Chiu <[email protected]>
Signed-off-by: Shayne Chen <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2025-04-11 10:29:38 +02:00
StanleyYP WangandFelix Fietkau a2dd2f7896 wifi: mt76: connac: add support to load firmware for mt7990
Add firmware download support. Note that mt7990 does not have WA and DSP
firmwares. This is a preliminary patch to support mt7990 chipset.

Co-developed-by: Peter Chiu <[email protected]>
Signed-off-by: Peter Chiu <[email protected]>
Signed-off-by: StanleyYP Wang <[email protected]>
Signed-off-by: Shayne Chen <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2025-04-11 10:29:38 +02:00
Shayne ChenandFelix Fietkau 63a4edf1cb wifi: mt76: mt7996: add macros for pci decive id
The chipset name (i.e., brand name) used by the driver may cause confusion
with the PCI device ID when adding support for new chipsets.

| Chipset name | PCI device id  |
|--------------|----------------|
| 7996         | 0x7990, 0x7991 |
| 7992         | 0x7992, 0x799a |
| 7990         | 0x7993, 0x799b |

To prevent confusion, replace the code that directly uses the device ID
with macros. This is a preliminary patch to support mt7990 chipset.

Co-developed-by: Peter Chiu <[email protected]>
Signed-off-by: Peter Chiu <[email protected]>
Signed-off-by: Shayne Chen <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2025-04-11 10:29:38 +02:00
Johannes BergandFelix Fietkau de635e1e3a wifi: mt76: mt7996: fix locking in mt7996_mac_sta_rc_work()
The 'continue' statements need to be under spinlock, since
the spinlock needs to be held as a loop invariant.

Fixes: 0762bdd30279 ("wifi: mt76: mt7996: rework mt7996_mac_sta_rc_work to support MLO")
Signed-off-by: Johannes Berg <[email protected]>
2025-03-20 10:35:27 +01:00
Lorenzo BianconiandFelix 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 BianconiandFelix 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
Shayne ChenandFelix Fietkau 70717b761a wifi: mt76: mt7996: rework set/get_tsf callabcks to support MLO
This is a preliminary patch in order to enable MLO 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]>
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-03-19 13:05:59 +01:00
Lorenzo BianconiandFelix 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
Shayne ChenandFelix Fietkau c788d5748d wifi: mt76: mt7996: rework mt7996_mcu_beacon_inband_discov to support MLO
Rework mt7996_mcu_beacon_inband_discov 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]>
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-03-19 13:05:59 +01:00
Shayne ChenandFelix Fietkau 56529041b3 wifi: mt76: mt7996: rework mt7996_mcu_add_obss_spr to support MLO
Rework mt7996_mcu_add_obss_spr 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]>
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-03-19 13:05:59 +01:00
Lorenzo BianconiandFelix 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 BianconiandFelix 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 BianconiandFelix 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 BianconiandFelix 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
Shayne ChenandFelix Fietkau 3668d57795 wifi: mt76: mt7996: remove mt7996_mac_enable_rtscts()
It is controlled by FW, also, driver should not directly write WTBL to
prevent WTBL overwritten issues.

Signed-off-by: Shayne Chen <[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 BianconiandFelix 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
Shayne ChenandFelix Fietkau 9c6ec015af wifi: mt76: mt7996: rework mt7996_set_hw_key to support MLO
Modify mt7996_set_hw_key routine to work in a multi-link setup.
This is a preliminary patch to enable MLO 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]>
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-03-19 13:05:59 +01:00