Commit e814a68a authored by Felix Fietkau's avatar Felix Fietkau

mt76: mt7615: update bss_info with cipher after setting the group key

In some cases, the WA firmware needs to know if encryption is used, in order
to set the protection bit of packets
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent 5ea3d983
...@@ -365,6 +365,7 @@ static int mt7615_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, ...@@ -365,6 +365,7 @@ static int mt7615_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
struct ieee80211_key_conf *key) struct ieee80211_key_conf *key)
{ {
struct mt7615_dev *dev = mt7615_hw_dev(hw); struct mt7615_dev *dev = mt7615_hw_dev(hw);
struct mt7615_phy *phy = mt7615_hw_phy(hw);
struct mt7615_vif *mvif = (struct mt7615_vif *)vif->drv_priv; struct mt7615_vif *mvif = (struct mt7615_vif *)vif->drv_priv;
struct mt7615_sta *msta = sta ? (struct mt7615_sta *)sta->drv_priv : struct mt7615_sta *msta = sta ? (struct mt7615_sta *)sta->drv_priv :
&mvif->sta; &mvif->sta;
...@@ -403,6 +404,11 @@ static int mt7615_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, ...@@ -403,6 +404,11 @@ static int mt7615_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
mt7615_mutex_acquire(dev); mt7615_mutex_acquire(dev);
if (cmd == SET_KEY && !sta && !mvif->mt76.cipher) {
mvif->mt76.cipher = mt76_connac_mcu_get_cipher(key->cipher);
mt7615_mcu_add_bss_info(phy, vif, NULL, true);
}
if (cmd == SET_KEY) if (cmd == SET_KEY)
*wcid_keyidx = idx; *wcid_keyidx = idx;
else if (idx == *wcid_keyidx) else if (idx == *wcid_keyidx)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment