wifi: mt76: mt7996: remove unnecessary key->cipher check for BIP frames
authorMichael-CY Lee <michael-cy.lee@mediatek.com>
Tue, 11 Mar 2025 10:36:40 +0000 (11:36 +0100)
committerFelix Fietkau <nbd@nbd.name>
Wed, 19 Mar 2025 13:47:04 +0000 (14:47 +0100)
The cipher type check is redundant, and there is no need to dereference the
key struct here.

Signed-off-by: Michael-CY Lee <michael-cy.lee@mediatek.com>
Link: https://patch.msgid.link/20250311103646.43346-3-nbd@nbd.name
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt7996/mac.c

index 33a8049d3356f21e2a29a72335ddaec7f923d229..162d1552602ea64b67470c1e3711a3d09814cdf7 100644 (file)
@@ -773,8 +773,7 @@ mt7996_mac_write_txwi_80211(struct mt7996_dev *dev, __le32 *txwi,
            info->flags & IEEE80211_TX_CTL_USE_MINRATE)
                val |= MT_TXD1_FIXED_RATE;
 
-       if (key && multicast && ieee80211_is_robust_mgmt_frame(skb) &&
-           key->cipher == WLAN_CIPHER_SUITE_AES_CMAC) {
+       if (key && multicast && ieee80211_is_robust_mgmt_frame(skb)) {
                val |= MT_TXD1_BIP;
                txwi[3] &= ~cpu_to_le32(MT_TXD3_PROTECT_FRAME);
        }