Skip to content

Commit dcd21b2

Browse files
Michael-CY Leenbd168
authored andcommitted
wifi: mt76: mt7996: set IEEE80211_KEY_FLAG_GENERATE_MMIE for other ciphers
When beacon protection is enabled, FW checks MMIE tag & length in the beacon for every cipher mode. To pass the check, driver needs to set the key flag IEEE80211_KEY_GENERATE_MMIE to let mac80211 generate and initialize MMIE. Signed-off-by: Michael-CY Lee <michael-cy.lee@mediatek.com> Signed-off-by: Shayne Chen <shayne.chen@mediatek.com> Link: https://patch.msgid.link/20240816094635.2391-11-shayne.chen@mediatek.com Signed-off-by: Felix Fietkau <nbd@nbd.name>
1 parent 5353679 commit dcd21b2

File tree

1 file changed

+4
-4
lines changed
  • drivers/net/wireless/mediatek/mt76/mt7996

1 file changed

+4
-4
lines changed

drivers/net/wireless/mediatek/mt76/mt7996/main.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -364,14 +364,14 @@ static int mt7996_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
364364
case WLAN_CIPHER_SUITE_SMS4:
365365
break;
366366
case WLAN_CIPHER_SUITE_AES_CMAC:
367-
wcid_keyidx = &wcid->hw_key_idx2;
368-
key->flags |= IEEE80211_KEY_FLAG_GENERATE_MMIE;
369-
fallthrough;
370367
case WLAN_CIPHER_SUITE_BIP_CMAC_256:
371368
case WLAN_CIPHER_SUITE_BIP_GMAC_128:
372369
case WLAN_CIPHER_SUITE_BIP_GMAC_256:
373-
if (key->keyidx == 6 || key->keyidx == 7)
370+
if (key->keyidx == 6 || key->keyidx == 7) {
371+
wcid_keyidx = &wcid->hw_key_idx2;
372+
key->flags |= IEEE80211_KEY_FLAG_GENERATE_MMIE;
374373
break;
374+
}
375375
fallthrough;
376376
case WLAN_CIPHER_SUITE_WEP40:
377377
case WLAN_CIPHER_SUITE_WEP104:

0 commit comments

Comments
 (0)