mt76: do not check the ccmp pn for ONLY_MONITOR frame
authorMeiChia Chiu <MeiChia.Chiu@mediatek.com>
Wed, 22 Jun 2022 08:30:34 +0000 (16:30 +0800)
committerFelix Fietkau <nbd@nbd.name>
Mon, 11 Jul 2022 11:40:02 +0000 (13:40 +0200)
if the received frame enables RX_FLAG_ONLY_MONITOR,
driver doesn't need to check the ccmp pn of this frame.

Reviewed-by: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: MeiChia Chiu <MeiChia.Chiu@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mac80211.c

index 60da999..ecf5bd9 100644 (file)
@@ -1030,6 +1030,9 @@ mt76_check_ccmp_pn(struct sk_buff *skb)
        if (!(status->flag & RX_FLAG_DECRYPTED))
                return 0;
 
+       if (status->flag & RX_FLAG_ONLY_MONITOR)
+               return 0;
+
        if (!wcid || !wcid->rx_check_pn)
                return 0;