[PATCH 11/28] wifi: mt76: mt7925: parse the FW hybrid-MLO third-link band limit

Emery Hsin emery.hsin at mediatek.com
Mon Nov 9 19:12:27 PST 2026


The EML capability TLV also carries a bitmap of the bands the firmware
forbids as the third (virtual) hybrid-MLO link. Store it so the
multi-link setup can keep those bands off the firmware virtual link.

Signed-off-by: Emery Hsin <emery.hsin at mediatek.com>
---
 drivers/net/wireless/mediatek/mt76/mt7925/mcu.c | 5 ++++-
 drivers/net/wireless/mediatek/mt76/mt792x.h     | 8 ++++++++
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c
index 557f8d3dea12..1d59c02645c6 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c
@@ -1127,8 +1127,10 @@ mt7925_mcu_parse_phy_cap(struct mt792x_dev *dev, char *data, int len)
 static void
 mt7925_mcu_parse_eml_cap(struct mt792x_dev *dev, char *data, int len)
 {
+	/* The TLV also carries the third-link band limit for hybrid MLO at offset 3. */
 	struct mt7925_mcu_eml_cap {
-		u8 rsv[4];
+		u8 rsv[3];
+		u8 third_link_band_limit;
 		__le16 eml_cap;
 		u8 rsv2[6];
 	} __packed * cap;
@@ -1139,6 +1141,7 @@ mt7925_mcu_parse_eml_cap(struct mt792x_dev *dev, char *data, int len)
 	cap = (struct mt7925_mcu_eml_cap *)data;
 
 	dev->phy.eml_cap = le16_to_cpu(cap->eml_cap);
+	dev->phy.mlo_third_link_band_limit = cap->third_link_band_limit;
 }
 
 static int
diff --git a/drivers/net/wireless/mediatek/mt76/mt792x.h b/drivers/net/wireless/mediatek/mt76/mt792x.h
index b9bcc5e1197c..5a501e72baca 100644
--- a/drivers/net/wireless/mediatek/mt76/mt792x.h
+++ b/drivers/net/wireless/mediatek/mt76/mt792x.h
@@ -228,6 +228,12 @@ struct mt792x_vif {
 	struct mt792x_nan nan;
 };
 
+/* Bands the firmware forbids as the hybrid-MLO 3rd (virtual) link.
+ * 6 GHz is never restricted, so it has no bit here.
+ */
+#define MT792x_THIRD_LINK_LIMIT_2G	BIT(0)
+#define MT792x_THIRD_LINK_LIMIT_5G	BIT(1)
+
 struct mt792x_phy {
 	struct mt76_phy *mt76;
 	struct mt792x_dev *dev;
@@ -259,6 +265,8 @@ struct mt792x_phy {
 	void *clc[MT792x_CLC_MAX_NUM];
 	u64 chip_cap;
 	u16 eml_cap;
+	/* bands not allowed as the 3rd link */
+	u8 mlo_third_link_band_limit;
 
 	struct work_struct roc_work;
 	struct timer_list roc_timer;
-- 
2.45.2




More information about the Linux-mediatek mailing list