When the first key is installed the cipher is latched and the firmware only needs the updated SEC tag, not a full BSS_INFO re-send. Use mt7925_mcu_add_bss_sec() so a key install no longer reprograms the BSS. Signed-off-by: Emery Hsin --- drivers/net/wireless/mediatek/mt76/mt7925/main.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/main.c b/drivers/net/wireless/mediatek/mt76/mt7925/main.c index a93df77da269..0bff5863e01e 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7925/main.c +++ b/drivers/net/wireless/mediatek/mt76/mt7925/main.c @@ -761,14 +761,12 @@ static int mt7925_set_link_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, struct mt792x_sta *msta = sta ? (struct mt792x_sta *)sta->drv_priv : &mvif->sta; struct ieee80211_bss_conf *link_conf; - struct ieee80211_link_sta *link_sta; int idx = key->keyidx, err = 0; struct mt792x_bss_conf *mconf; struct mt76_wcid *wcid; u8 *wcid_keyidx; link_conf = mt792x_vif_to_bss_conf(vif, link_id); - link_sta = sta ? mt792x_sta_to_link_sta(vif, sta, link_id) : NULL; mconf = mt792x_vif_to_link(mvif, link_id); wcid = &mlink->wcid; wcid_keyidx = &wcid->hw_key_idx; @@ -799,8 +797,8 @@ static int mt7925_set_link_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, struct mt792x_phy *phy = mt792x_hw_phy(hw); mconf->mt76.cipher = mt7925_mcu_get_cipher(key->cipher); - mt7925_mcu_add_bss_info(phy, mconf->mt76.ctx, link_conf, - link_sta, true); + /* only refresh the SEC (cipher) tag, not the whole BSS_INFO */ + mt7925_mcu_add_bss_sec(phy, link_conf); } if (cmd == SET_KEY) -- 2.45.2