Commit 5fd0ff3b authored by Ming Yen Hsieh's avatar Ming Yen Hsieh Committed by Felix Fietkau
Browse files

wifi: mt76: mt7925: introduce MLO capability control



This patch introduces MLO capability control for the MT792x Wi-Fi driver.
It removes the unused `MT792x_CHIP_CAP_MLO_EVT_EN` flag and introduces new
capability flags `MT792x_CHIP_CAP_MLO_EN` and `MT792x_CHIP_CAP_MLO_EML_EN`
to enable MLO and EML features based on firmware capabilities.

Signed-off-by: default avatarMing Yen Hsieh <mingyen.hsieh@mediatek.com>
Reviewed-by: default avatarSabeeh Khan <sabeeh-khan@ti.com>
Link: https://patch.msgid.link/20250217081729.1840930-1-mingyen.hsieh@mediatek.com


Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent 3fd552b2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -251,7 +251,7 @@ int mt7925_init_mlo_caps(struct mt792x_phy *phy)
		},
	};

	if (!(phy->chip_cap & MT792x_CHIP_CAP_MLO_EVT_EN))
	if (!(phy->chip_cap & MT792x_CHIP_CAP_MLO_EN))
		return 0;

	ext_capab[0].eml_capabilities = phy->eml_cap;
+8 −2
Original line number Diff line number Diff line
@@ -2559,6 +2559,7 @@ mt7925_mcu_bss_mld_tlv(struct sk_buff *skb,
	struct ieee80211_vif *vif = link_conf->vif;
	struct mt792x_bss_conf *mconf = mt792x_link_conf_to_mconf(link_conf);
	struct mt792x_vif *mvif = (struct mt792x_vif *)link_conf->vif->drv_priv;
	struct mt792x_phy *phy = mvif->phy;
	struct bss_mld_tlv *mld;
	struct tlv *tlv;
	bool is_mld;
@@ -2574,8 +2575,13 @@ mt7925_mcu_bss_mld_tlv(struct sk_buff *skb,
	mld->group_mld_id = is_mld ? mvif->bss_conf.mt76.idx : 0xff;
	mld->own_mld_id = mconf->mt76.idx + 32;
	mld->remap_idx = 0xff;

	if (phy->chip_cap & MT792x_CHIP_CAP_MLO_EML_EN) {
		mld->eml_enable = !!(link_conf->vif->cfg.eml_cap &
				     IEEE80211_EML_CAP_EMLSR_SUPP);
	} else {
		mld->eml_enable = 0;
	}

	memcpy(mld->mac_addr, vif->addr, ETH_ALEN);
}
+2 −1
Original line number Diff line number Diff line
@@ -27,8 +27,9 @@

#define MT792x_CHIP_CAP_CLC_EVT_EN BIT(0)
#define MT792x_CHIP_CAP_RSSI_NOTIFY_EVT_EN BIT(1)
#define MT792x_CHIP_CAP_MLO_EVT_EN BIT(2)
#define MT792x_CHIP_CAP_WF_RF_PIN_CTRL_EVT_EN BIT(3)
#define MT792x_CHIP_CAP_MLO_EN BIT(8)
#define MT792x_CHIP_CAP_MLO_EML_EN BIT(9)

/* NOTE: used to map mt76_rates. idx may change if firmware expands table */
#define MT792x_BASIC_RATES_TBL	11