wifi: mt76: mt7996: Add mt7996_sta_link to mt7996_mcu_add_bss_info signature

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>
This commit is contained in:
Lorenzo Bianconi
2025-03-12 12:13:52 +01:00
committed by Felix Fietkau
parent aa99241833
commit c9710b5476
3 changed files with 13 additions and 8 deletions

View File

@@ -195,7 +195,8 @@ mt7996_set_hw_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
if (cmd == SET_KEY && !sta && !mlink->mt76.cipher) {
mlink->mt76.cipher = mt76_connac_mcu_get_cipher(key->cipher);
mt7996_mcu_add_bss_info(phy, vif, &vif->bss_conf, &mlink->mt76, true);
mt7996_mcu_add_bss_info(phy, vif, &vif->bss_conf, &mlink->mt76,
&mlink->msta_link, true);
}
if (cmd == SET_KEY) {
@@ -288,7 +289,7 @@ int mt7996_vif_link_add(struct mt76_phy *mphy, struct ieee80211_vif *vif,
mt7996_init_bitrate_mask(vif, link);
mt7996_mcu_add_bss_info(phy, vif, link_conf, mlink, true);
mt7996_mcu_add_bss_info(phy, vif, link_conf, mlink, msta_link, true);
/* defer the first STA_REC of BMC entry to BSS_CHANGED_BSSID for STA
* interface, since firmware only records BSSID when the entry is new
*/
@@ -314,7 +315,7 @@ void mt7996_vif_link_remove(struct mt76_phy *mphy, struct ieee80211_vif *vif,
mt7996_mcu_add_sta(dev, link_conf, NULL, link, NULL,
CONN_STATE_DISCONNECT, false);
mt7996_mcu_add_bss_info(phy, vif, link_conf, mlink, false);
mt7996_mcu_add_bss_info(phy, vif, link_conf, mlink, msta_link, false);
mt7996_mcu_add_dev_info(phy, vif, link_conf, mlink, false);
@@ -704,7 +705,8 @@ mt7996_vif_cfg_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
continue;
mt7996_mcu_add_bss_info(link->phy, vif, link_conf,
&link->mt76, true);
&link->mt76, &link->msta_link,
true);
mt7996_mcu_add_sta(dev, link_conf, NULL, link, NULL,
CONN_STATE_PORT_SECURE,
!!(changed & BSS_CHANGED_BSSID));
@@ -740,7 +742,8 @@ mt7996_link_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
*/
if ((changed & BSS_CHANGED_BSSID && !is_zero_ether_addr(info->bssid)) ||
(changed & BSS_CHANGED_BEACON_ENABLED && info->enable_beacon)) {
mt7996_mcu_add_bss_info(phy, vif, info, &link->mt76, true);
mt7996_mcu_add_bss_info(phy, vif, info, &link->mt76,
&link->msta_link, true);
mt7996_mcu_add_sta(dev, info, NULL, link, NULL,
CONN_STATE_PORT_SECURE,
!!(changed & BSS_CHANGED_BSSID));

View File

@@ -1064,7 +1064,8 @@ __mt7996_mcu_alloc_bss_req(struct mt76_dev *dev, struct mt76_vif_link *mvif, int
int mt7996_mcu_add_bss_info(struct mt7996_phy *phy, struct ieee80211_vif *vif,
struct ieee80211_bss_conf *link_conf,
struct mt76_vif_link *mlink, int enable)
struct mt76_vif_link *mlink,
struct mt7996_sta_link *msta_link, int enable)
{
struct mt7996_dev *dev = phy->dev;
struct sk_buff *skb;
@@ -1081,7 +1082,7 @@ int mt7996_mcu_add_bss_info(struct mt7996_phy *phy, struct ieee80211_vif *vif,
/* bss_basic must be first */
mt7996_mcu_bss_basic_tlv(skb, vif, link_conf, mlink, phy->mt76,
mlink->wcid->idx, enable);
msta_link->wcid.idx, enable);
mt7996_mcu_bss_sec_tlv(skb, mlink);
if (vif->type == NL80211_IFTYPE_MONITOR)

View File

@@ -571,7 +571,8 @@ int mt7996_mcu_add_dev_info(struct mt7996_phy *phy, struct ieee80211_vif *vif,
struct mt76_vif_link *mlink, bool enable);
int mt7996_mcu_add_bss_info(struct mt7996_phy *phy, struct ieee80211_vif *vif,
struct ieee80211_bss_conf *link_conf,
struct mt76_vif_link *mlink, int enable);
struct mt76_vif_link *mlink,
struct mt7996_sta_link *msta_link, int enable);
int mt7996_mcu_add_sta(struct mt7996_dev *dev,
struct ieee80211_bss_conf *link_conf,
struct ieee80211_link_sta *link_sta,