Add a helper that pushes only the SEC (cipher) TLV of an active BSS via BSS_INFO_UPDATE instead of re-sending the whole BSS_INFO; the firmware processes BSS_INFO TLVs independently. The MLO set_key path will use it. Signed-off-by: Emery Hsin --- .../net/wireless/mediatek/mt76/mt7925/mcu.c | 22 +++++++++++++++++++ .../net/wireless/mediatek/mt76/mt7925/mcu.h | 2 ++ 2 files changed, 24 insertions(+) diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c index 27410eb940ea..b502f93166e5 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c @@ -3391,6 +3391,28 @@ int mt7925_mcu_add_bss_info(struct mt792x_phy *phy, mlink->wcid.idx, enable); } +/* Update only the SEC (cipher) tag of an active BSS, without re-pushing the + * whole BSS_INFO. The firmware processes BSS_INFO TLVs independently, so a + * SEC-only update leaves the rest untouched. Used by the set_key path. + */ +int mt7925_mcu_add_bss_sec(struct mt792x_phy *phy, + struct ieee80211_bss_conf *link_conf) +{ + struct mt792x_bss_conf *mconf = mt792x_link_conf_to_mconf(link_conf); + struct mt792x_dev *dev = phy->dev; + struct sk_buff *skb; + + skb = __mt7925_mcu_alloc_bss_req(&dev->mt76, &mconf->mt76, + MT7925_BSS_UPDATE_MAX_SIZE); + if (IS_ERR(skb)) + return PTR_ERR(skb); + + mt7925_mcu_bss_sec_tlv(skb, link_conf); + + return mt76_mcu_skb_send_msg(&dev->mt76, skb, + MCU_UNI_CMD(BSS_INFO_UPDATE), true); +} + int mt7925_mcu_set_dbdc(struct mt76_phy *phy, bool enable) { struct mt76_dev *mdev = phy->dev; diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.h b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.h index dea93f4186ff..ae403c04e436 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.h +++ b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.h @@ -737,6 +737,8 @@ int mt7925_mcu_add_bss_info(struct mt792x_phy *phy, struct ieee80211_bss_conf *link_conf, struct ieee80211_link_sta *link_sta, int enable); +int mt7925_mcu_add_bss_sec(struct mt792x_phy *phy, + struct ieee80211_bss_conf *link_conf); int mt7925_mcu_add_bss_info_sta(struct mt792x_phy *phy, struct ieee80211_chanctx_conf *ctx, struct ieee80211_bss_conf *link_conf, -- 2.45.2