summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2025-03-19wifi: mt76: mt7996: rework mt7996_net_fill_forward_path to support MLOLorenzo Bianconi
Rework mt7996_net_fill_forward_path routine in order to support multi-link setup. Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Link: https://patch.msgid.link/20250312-b4-mt7996-mlo-p2-v1-15-015b3d6fd928@kernel.org Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-19wifi: mt76: mt7996: rework mt7996_update_mu_group to support MLOLorenzo Bianconi
Rework mt7996_update_mu_group routine in order to support multi-link setup. Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Link: https://patch.msgid.link/20250312-b4-mt7996-mlo-p2-v1-14-015b3d6fd928@kernel.org Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-19wifi: mt76: mt7996: rework mt7996_mac_sta_poll to support MLOLorenzo Bianconi
Rework mt7996_mac_sta_poll routine in order to support multi-link setup. Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Link: https://patch.msgid.link/20250312-b4-mt7996-mlo-p2-v1-13-015b3d6fd928@kernel.org Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-19wifi: mt76: mt7996: rework mt7996_mac_sta_rc_work to support MLOLorenzo Bianconi
Rework mt7996_mac_sta_rc_work routine in order to support multi-link setup. Co-developed-by: Bo Jiao <Bo.Jiao@mediatek.com> Signed-off-by: Bo Jiao <Bo.Jiao@mediatek.com> Co-developed-by: Peter Chiu <chui-hao.chiu@mediatek.com> Signed-off-by: Peter Chiu <chui-hao.chiu@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/20250312-b4-mt7996-mlo-p2-v1-12-015b3d6fd928@kernel.org Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-19wifi: mt76: mt7996: remove mt7996_mac_enable_rtscts()Shayne Chen
It is controlled by FW, also, driver should not directly write WTBL to prevent WTBL overwritten issues. Signed-off-by: Shayne Chen <shayne.chen@mediatek.com> Link: https://patch.msgid.link/20250312-b4-mt7996-mlo-p2-v1-11-015b3d6fd928@kernel.org Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-19wifi: mt76: mt7996: rework mt7996_sta_hw_queue_read to support MLOLorenzo Bianconi
Extend mt7996_sta_hw_queue_read to support multi-link setup. Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Link: https://patch.msgid.link/20250312-b4-mt7996-mlo-p2-v1-10-015b3d6fd928@kernel.org Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-19wifi: mt76: mt7996: rework mt7996_set_hw_key to support MLOShayne Chen
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 <Bo.Jiao@mediatek.com> Signed-off-by: Bo Jiao <Bo.Jiao@mediatek.com> Co-developed-by: Peter Chiu <chui-hao.chiu@mediatek.com> Signed-off-by: Peter Chiu <chui-hao.chiu@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/20250312-b4-mt7996-mlo-p2-v1-9-015b3d6fd928@kernel.org Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-19wifi: mt76: mt7996: Add mt7996_sta_link to mt7996_mcu_add_bss_info signatureLorenzo Bianconi
This is a preliminary patch to introduce MLO support for MT996 driver. Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Link: https://patch.msgid.link/20250312-b4-mt7996-mlo-p2-v1-8-015b3d6fd928@kernel.org Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-19wifi: mt76: mt7996: rework mt7996_sta_set_4addr and ↵Shayne Chen
mt7996_sta_set_decap_offload to support MLO Rework mt7996_sta_set_4addr and mt7996_sta_set_decap_offload routines in order to properly support multi-link. This is a preliminary patch to enable MLO for MT7996 driver. Co-developed-by: Bo Jiao <Bo.Jiao@mediatek.com> Signed-off-by: Bo Jiao <Bo.Jiao@mediatek.com> Co-developed-by: Peter Chiu <chui-hao.chiu@mediatek.com> Signed-off-by: Peter Chiu <chui-hao.chiu@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/20250312-b4-mt7996-mlo-p2-v1-7-015b3d6fd928@kernel.org Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-19wifi: mt76: mt7996: rework mt7996_rx_get_wcid to support MLOShayne Chen
The wcid idx and band idx in the TXS are sometimes mismatched since the FW will select a transmission link according to a private algorithm. That is, the wcid idx in the TXS would be the one registered by the driver rather than the actual wcid idx used during transmission. However, the band idx in the TXS is the band select for transmission. Therefore, we should get the driver-registered wcid in order to notify the driver the packet has been acked; otherwise, the driver will be unable to match the transmitted packet and its TXS. This is a preliminary patch to enable MLO for MT7996 driver. Co-developed-by: Bo Jiao <Bo.Jiao@mediatek.com> Signed-off-by: Bo Jiao <Bo.Jiao@mediatek.com> Co-developed-by: Peter Chiu <chui-hao.chiu@mediatek.com> Signed-off-by: Peter Chiu <chui-hao.chiu@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/20250312-b4-mt7996-mlo-p2-v1-6-015b3d6fd928@kernel.org Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-19wifi: mt76: mt7996: Rely on wcid_to_sta in mt7996_mac_add_txs_skb()Shayne Chen
This is a preliminary patch to enable MLO for MT7996 driver Co-developed-by: Bo Jiao <Bo.Jiao@mediatek.com> Signed-off-by: Bo Jiao <Bo.Jiao@mediatek.com> Co-developed-by: Peter Chiu <chui-hao.chiu@mediatek.com> Signed-off-by: Peter Chiu <chui-hao.chiu@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/20250312-b4-mt7996-mlo-p2-v1-5-015b3d6fd928@kernel.org Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-19wifi: mt76: mt7996: rework mt7996_mac_write_txwi() for MLO supportShayne Chen
Update mt7996_mac_write_txwi routine and all the called subroutines to support MLO. This is a preliminary patch to enable MLO for MT7996 driver Co-developed-by: Bo Jiao <Bo.Jiao@mediatek.com> Signed-off-by: Bo Jiao <Bo.Jiao@mediatek.com> Co-developed-by: Peter Chiu <chui-hao.chiu@mediatek.com> Signed-off-by: Peter Chiu <chui-hao.chiu@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/20250312-b4-mt7996-mlo-p2-v1-4-015b3d6fd928@kernel.org Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-19wifi: mt76: mt7996: Add mt7996_mcu_teardown_mld_sta rouineShayne Chen
mt7996_mcu_teardown_mld_sta is used to remove MLO configuration from the MCU. This is a preliminary patch to enable MLO for MT7996 driver Co-developed-by: Bo Jiao <Bo.Jiao@mediatek.com> Signed-off-by: Bo Jiao <Bo.Jiao@mediatek.com> Co-developed-by: Peter Chiu <chui-hao.chiu@mediatek.com> Signed-off-by: Peter Chiu <chui-hao.chiu@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/20250312-b4-mt7996-mlo-p2-v1-3-015b3d6fd928@kernel.org Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-19wifi: mt76: mt7996: Add mt7996_mcu_sta_mld_setup_tlv() and ↵Shayne Chen
mt7996_mcu_sta_eht_mld_tlv() mt7996_mcu_sta_mld_setup_tlv is needed to push MLO configuration to the MCU. This is a preliminary patch to enable MLO for MT7996 driver Co-developed-by: Bo Jiao <Bo.Jiao@mediatek.com> Signed-off-by: Bo Jiao <Bo.Jiao@mediatek.com> Co-developed-by: Peter Chiu <chui-hao.chiu@mediatek.com> Signed-off-by: Peter Chiu <chui-hao.chiu@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/20250312-b4-mt7996-mlo-p2-v1-2-015b3d6fd928@kernel.org Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-19wifi: mt76: mt7996: Update mt7996_mcu_add_rate_ctrl to MLOShayne Chen
Update mt7996_mcu_add_rate_ctrl routine and all the called subroutines to support MLO. This is a preliminary patch to enable MLO for MT7996 driver Co-developed-by: Bo Jiao <Bo.Jiao@mediatek.com> Signed-off-by: Bo Jiao <Bo.Jiao@mediatek.com> Co-developed-by: Peter Chiu <chui-hao.chiu@mediatek.com> Signed-off-by: Peter Chiu <chui-hao.chiu@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/20250312-b4-mt7996-mlo-p2-v1-1-015b3d6fd928@kernel.org Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-19wifi: mt76: mt7996: Rely on mt7996_vif/sta_link in twt teardownLorenzo Bianconi
This is a preliminary patch to enable MLO for MT7996 driver Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Link: https://patch.msgid.link/20250311-mt7996-mlo-v2-13-31df6972519b@kernel.org Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-19wifi: mt76: mt7996: Rely on mt7996_vif_link in mt7996_mcu_twt_agrt_update ↵Shayne Chen
signature This is a preliminary patch to enable MLO for MT7996 driver Co-developed-by: Bo Jiao <Bo.Jiao@mediatek.com> Signed-off-by: Bo Jiao <Bo.Jiao@mediatek.com> Co-developed-by: Peter Chiu <chui-hao.chiu@mediatek.com> Signed-off-by: Peter Chiu <chui-hao.chiu@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/20250311-mt7996-mlo-v2-12-31df6972519b@kernel.org Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-19wifi: mt76: mt7996: Update mt7996_mcu_add_sta to MLO supportShayne Chen
Update mt7996_mcu_add_sta routine and all the called subroutines to support MLO. This is a preliminary patch to enable MLO for MT7996 driver. Co-developed-by: Bo Jiao <Bo.Jiao@mediatek.com> Signed-off-by: Bo Jiao <Bo.Jiao@mediatek.com> Co-developed-by: Peter Chiu <chui-hao.chiu@mediatek.com> Signed-off-by: Peter Chiu <chui-hao.chiu@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/20250311-mt7996-mlo-v2-11-31df6972519b@kernel.org Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-19wifi: mt76: Check link_conf pointer in mt76_connac_mcu_sta_basic_tlv()Shayne Chen
This is a preliminary patch to introduce MLO support for MT7996 driver. Signed-off-by: Shayne Chen <shayne.chen@mediatek.com> Link: https://patch.msgid.link/20250311-mt7996-mlo-v2-10-31df6972519b@kernel.org Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-19wifi: mt76: mt7996: Support MLO in mt7996_mac_sta_event()Lorenzo Bianconi
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 <Bo.Jiao@mediatek.com> Signed-off-by: Bo Jiao <Bo.Jiao@mediatek.com> Co-developed-by: Peter Chiu <chui-hao.chiu@mediatek.com> Signed-off-by: Peter Chiu <chui-hao.chiu@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/20250311-mt7996-mlo-v2-9-31df6972519b@kernel.org Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-19wifi: mt76: mt7996: Add mt7996_mac_sta_change_links callbackShayne Chen
Intrdouce mt7996_mac_sta_change_links routine to set change_sta_links required by mac80211. This is a preliminary patch to introduce MLO support for MT7996 driver. Co-developed-by: Bo Jiao <Bo.Jiao@mediatek.com> Signed-off-by: Bo Jiao <Bo.Jiao@mediatek.com> Co-developed-by: Peter Chiu <chui-hao.chiu@mediatek.com> Signed-off-by: Peter Chiu <chui-hao.chiu@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/20250311-mt7996-mlo-v2-8-31df6972519b@kernel.org Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-19wifi: mt76: mt7996: Rely on mt7996_sta_link in sta_add/sta_remove callbacksLorenzo Bianconi
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 <Bo.Jiao@mediatek.com> Signed-off-by: Bo Jiao <Bo.Jiao@mediatek.com> Co-developed-by: Peter Chiu <chui-hao.chiu@mediatek.com> Signed-off-by: Peter Chiu <chui-hao.chiu@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/20250311-mt7996-mlo-v2-7-31df6972519b@kernel.org Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-19wifi: mt76: mt7996: Add mt7996_sta_state routineLorenzo Bianconi
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 <lorenzo@kernel.org> Link: https://patch.msgid.link/20250311-mt7996-mlo-v2-6-31df6972519b@kernel.org Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-19wifi: mt76: mt7996: Add link_info_changed callbackLorenzo Bianconi
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 <lorenzo@kernel.org> Link: https://patch.msgid.link/20250311-mt7996-mlo-v2-5-31df6972519b@kernel.org Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-19wifi: mt76: mt7996: Add vif_cfg_changed callbackLorenzo Bianconi
Introduce vif_cfg_changed mac80211 callback as preliminary patch to enable MLO support in MT7996 driver. Co-developed-by: Bo Jiao <Bo.Jiao@mediatek.com> Signed-off-by: Bo Jiao <Bo.Jiao@mediatek.com> Co-developed-by: Peter Chiu <chui-hao.chiu@mediatek.com> Signed-off-by: Peter Chiu <chui-hao.chiu@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/20250311-mt7996-mlo-v2-4-31df6972519b@kernel.org Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-19wifi: mt76: mt7996: Add mt7996_sta_link struct in mt7996_vif_linkLorenzo Bianconi
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 <lorenzo@kernel.org> Link: https://patch.msgid.link/20250311-mt7996-mlo-v2-3-31df6972519b@kernel.org Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-19wifi: mt76: mt7996: Introduce mt7996_sta_link containerLorenzo Bianconi
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 <Bo.Jiao@mediatek.com> Signed-off-by: Bo Jiao <Bo.Jiao@mediatek.com> Co-developed-by: Peter Chiu <chui-hao.chiu@mediatek.com> Signed-off-by: Peter Chiu <chui-hao.chiu@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/20250311-mt7996-mlo-v2-2-31df6972519b@kernel.org Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-19wifi: mt76: mt7996: Add change_vif_links stubLorenzo Bianconi
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 <lorenzo@kernel.org> Link: https://patch.msgid.link/20250311-mt7996-mlo-v2-1-31df6972519b@kernel.org Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-19wifi: mt76: scan: fix setting tx_info fieldsFelix Fietkau
ieee80211_tx_prepare_skb initializes the skb cb, so fields need to be set afterwards. Link: https://patch.msgid.link/20250311103646.43346-8-nbd@nbd.name Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-19wifi: mt76: mt7996: implement driver specific get_txpower functionFelix Fietkau
Fixes reporting tx power for vifs that don't have a channel context assigned. Report the tx power of a phy that is covered by the vif's radio mask. Link: https://patch.msgid.link/20250311103646.43346-7-nbd@nbd.name Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-19wifi: mt76: only mark tx-status-failed frames as ACKed on mt76x0/2Felix Fietkau
The interrupt status polling is unreliable, which can cause status events to get lost. On all newer chips, txs-timeout is an indication that the packet was either never sent, or never acked. Fixes issues with inactivity polling. Link: https://patch.msgid.link/20250311103646.43346-6-nbd@nbd.name Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-19wifi: mt76: mt7996: use the correct vif link for scanning/rocFelix Fietkau
Use the newly added offchannel_link pointer in vif data Link: https://patch.msgid.link/20250311103646.43346-5-nbd@nbd.name Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-19wifi: mt76: scan: set vif offchannel link for scanning/rocFelix Fietkau
The driver needs to know what vif link to use Link: https://patch.msgid.link/20250311103646.43346-4-nbd@nbd.name Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-19wifi: mt76: mt7996: remove unnecessary key->cipher check for BIP framesMichael-CY Lee
The cipher type check is redundant, and there is no need to dereference the key struct here. Signed-off-by: Michael-CY Lee <michael-cy.lee@mediatek.com> Link: https://patch.msgid.link/20250311103646.43346-3-nbd@nbd.name Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-19wifi: mt76: mt7996: fix SER reset trigger on WED resetRex Lu
The firmware needs a specific trigger when WED is being reset due to an ethernet reset condition. This helps prevent further L1 SER failure. Signed-off-by: Rex Lu <rex.lu@mediatek.com> Link: https://patch.msgid.link/20250311103646.43346-2-nbd@nbd.name Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-19wifi: mt76: mt7996: revise TXS sizeBenjamin Lin
Size of MPDU/PPDU TXS is 12 DWs. In mt7996/mt7992, last 4 DWs are reserved, so TXS size was mistakenly considered to be 8 DWs. However, in mt7990, 9th DW of TXS starts to be used. Signed-off-by: Benjamin Lin <benjamin-jw.lin@mediatek.com> Link: https://patch.msgid.link/20250311103646.43346-1-nbd@nbd.name Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-19wifi: mt76: mt7996: cleanup mt7996_get_power_boundRazvan Grigore
Refactor for making use of mt76_get_power_bound instead of the specific mt7996_get_power_bound, since we need this for other chipsets as well when calculating txpower Signed-off-by: Razvan Grigore <razvan.grigore@vampirebyte.ro> Link: https://patch.msgid.link/20250211081247.5892-6-razvan.grigore@vampirebyte.ro Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-19wifi: mt76: mt7915: cleanup mt7915_get_power_boundRazvan Grigore
Refactor for making use of mt76_get_power_bound instead of the specific mt7915_get_power_bound, since we need this for other chipsets as well when calculating txpower Signed-off-by: Razvan Grigore <razvan.grigore@vampirebyte.ro> Link: https://patch.msgid.link/20250211081247.5892-5-razvan.grigore@vampirebyte.ro Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-19wifi: mt76: add mt76_get_power_bound helper functionRazvan Grigore
This will replace mt7915_get_power_bound function from b/mt7915/mcu.h, since we will need it also for mt7921 and mt7925 Signed-off-by: Razvan Grigore <razvan.grigore@vampirebyte.ro> Link: https://patch.msgid.link/20250211081247.5892-2-razvan.grigore@vampirebyte.ro Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-19wifi: mt76: mt7925: add MTCL support to enhance the regulatory complianceMing Yen Hsieh
Apply the MTCL configuration to improving channel availability and regulatory compliance if MTCL table is supported. Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com> Link: https://patch.msgid.link/20250304113649.867387-6-mingyen.hsieh@mediatek.com Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-19wifi: mt76: mt792x: extend MTCL of APCI to version3 for EHT controlMing Yen Hsieh
This patch introduces version 3 of the MTCL table, which provides regulatory information for WiFi 7. It also configured by the platform vender like the version 1 and 2. Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com> Link: https://patch.msgid.link/20250304113649.867387-5-mingyen.hsieh@mediatek.com Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-19wifi: mt76: mt7925: remove unused acpi function for clcMing Yen Hsieh
The code for handling ACPI configuration in CLC was copied from the mt7921 driver but is not utilized in the mt7925 implementation. So removes the unused functionality to clean up the codebase. Cc: stable@vger.kernel.org Fixes: c948b5da6bbe ("wifi: mt76: mt7925: add Mediatek Wi-Fi7 driver for mt7925 chips") Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com> Link: https://patch.msgid.link/20250304113649.867387-4-mingyen.hsieh@mediatek.com Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-19wifi: mt76: mt7925: update the channel usage when the regd domain changedMing Yen Hsieh
The 5.9/6GHz channel license of a certain platform device has been regulated in various countries. That may be difference with standard Liunx regulatory domain settings. In this case, when .reg_notifier() called for regulatory change, mt7925 chipset should update the channel usage based on CLC data. Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com> Link: https://patch.msgid.link/20250304113649.867387-3-mingyen.hsieh@mediatek.com Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-19wifi: mt76: mt7925: add EHT control support based on the CLC dataMing Yen Hsieh
Some countries do not support EHT modulation for now. To prevent violating regulations, the MT7925 chipset should control the EHT capabilities. Therefore, when a regulatory domain change is detected during scanning, the `mt7925_regd_be_ctrl` will process the CLC data to update the EHT capabilities. Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com> Link: https://patch.msgid.link/20250304113649.867387-2-mingyen.hsieh@mediatek.com Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-19wifi: mt76: mt7925: load the appropriate CLC data based on hardware typeMing Yen Hsieh
Read the EEPROM to determine the hardware type and uses this to load the correct CLC data. Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com> Link: https://patch.msgid.link/20250304113649.867387-1-mingyen.hsieh@mediatek.com Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-19wifi: mt76: mt7925: update the power-saving flowMing Yen Hsieh
After joining MLO, ensure that all links are setup before enabling power-saving. Fixes: 86c051f2c418 ("wifi: mt76: mt7925: enabling MLO when the firmware supports it") Cc: stable@vger.kernel.org Co-developed-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Sean Wang <sean.wang@mediatek.com> Tested-by: Caleb Jorden <cjorden@gmail.com> Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com> Link: https://patch.msgid.link/20250305000851.493671-6-sean.wang@kernel.org Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-19wifi: mt76: mt7925: integrate *mlo_sta_cmd and *sta_cmdMing Yen Hsieh
Integrate *mlo_sta_cmd and *sta_cmd for the MLO firmware. Fixes: 86c051f2c418 ("wifi: mt76: mt7925: enabling MLO when the firmware supports it") Cc: stable@vger.kernel.org Co-developed-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Sean Wang <sean.wang@mediatek.com> Tested-by: Caleb Jorden <cjorden@gmail.com> Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com> Link: https://patch.msgid.link/20250305000851.493671-5-sean.wang@kernel.org Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-19wifi: mt76: mt7925: adjust rm BSS flow to prevent next connection failureMing Yen Hsieh
Removing BSS without removing STAREC first will cause firmware abnormal and next connection fail. Fixes: 816161051a03 ("wifi: mt76: mt7925: Cleanup MLO settings post-disconnection") Cc: stable@vger.kernel.org Co-developed-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Sean Wang <sean.wang@mediatek.com> Tested-by: Caleb Jorden <cjorden@gmail.com> Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com> Link: https://patch.msgid.link/20250305000851.493671-4-sean.wang@kernel.org Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-19wifi: mt76: mt7925: fix the wrong simultaneous cap for MLOMing Yen Hsieh
The mt7925 chip is only support a single radio, so the maximum number of simultaneous should be 0. Fixes: 86c051f2c418 ("wifi: mt76: mt7925: enabling MLO when the firmware supports it") Cc: stable@vger.kernel.org Co-developed-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Sean Wang <sean.wang@mediatek.com> Tested-by: Caleb Jorden <cjorden@gmail.com> Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com> Link: https://patch.msgid.link/20250305000851.493671-3-sean.wang@kernel.org Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-19wifi: mt76: mt7925: fix the wrong link_idx when a p2p_device is presentMing Yen Hsieh
When the p2p device and MLO station are running concurrently, the p2p device will occupy the wrong link_idx when the MLO secondary link is added. Fixes: 9e4c3a007f01 ("wifi: mt76: connac: Extend mt76_connac_mcu_uni_add_dev for MLO") Cc: stable@vger.kernel.org Co-developed-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Sean Wang <sean.wang@mediatek.com> Tested-by: Caleb Jorden <cjorden@gmail.com> Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com> Link: https://patch.msgid.link/20250305000851.493671-2-sean.wang@kernel.org Signed-off-by: Felix Fietkau <nbd@nbd.name>