From: MeiChia Chiu Date: Wed, 22 Jun 2022 08:30:34 +0000 (+0800) Subject: mt76: do not check the ccmp pn for ONLY_MONITOR frame X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=1858e4fc89b2301e9a9e056a331cbd0902e516b5;p=linux.git mt76: do not check the ccmp pn for ONLY_MONITOR frame 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 Signed-off-by: MeiChia Chiu Signed-off-by: Felix Fietkau --- diff --git a/drivers/net/wireless/mediatek/mt76/mac80211.c b/drivers/net/wireless/mediatek/mt76/mac80211.c index 60da9995357ea..ecf5bd9605dbb 100644 --- a/drivers/net/wireless/mediatek/mt76/mac80211.c +++ b/drivers/net/wireless/mediatek/mt76/mac80211.c @@ -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;