Skip to content

Commit

Permalink
wifi: mt76: mt7996: set IEEE80211_KEY_FLAG_GENERATE_MMIE for other ci…
Browse files Browse the repository at this point in the history
…phers

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>
  • Loading branch information
Michael-CY Lee authored and frank-w committed Aug 26, 2024
1 parent e625a38 commit d643ffa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/net/wireless/mediatek/mt76/mt7996/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -364,14 +364,14 @@ static int mt7996_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
case WLAN_CIPHER_SUITE_SMS4:
break;
case WLAN_CIPHER_SUITE_AES_CMAC:
wcid_keyidx = &wcid->hw_key_idx2;
key->flags |= IEEE80211_KEY_FLAG_GENERATE_MMIE;
fallthrough;
case WLAN_CIPHER_SUITE_BIP_CMAC_256:
case WLAN_CIPHER_SUITE_BIP_GMAC_128:
case WLAN_CIPHER_SUITE_BIP_GMAC_256:
if (key->keyidx == 6 || key->keyidx == 7)
if (key->keyidx == 6 || key->keyidx == 7) {
wcid_keyidx = &wcid->hw_key_idx2;
key->flags |= IEEE80211_KEY_FLAG_GENERATE_MMIE;
break;
}
fallthrough;
case WLAN_CIPHER_SUITE_WEP40:
case WLAN_CIPHER_SUITE_WEP104:
Expand Down

0 comments on commit d643ffa

Please sign in to comment.