blob: 41149e48f1dec43a4e417e1b87f2681f4c9fc474 [file] [log] [blame]
From d3a089aa2c46bd58ab415c909e7232c0bffce74e Mon Sep 17 00:00:00 2001
From: MeiChia Chiu <meichia.chiu@mediatek.com>
Date: Mon, 20 Jun 2022 17:42:19 +0800
Subject: [PATCH] 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.
Signed-off-by: MeiChia Chiu <MeiChia.Chiu@mediatek.com>
Change-Id: I85abba5b66ef3b58739069e04830980384f805d1
---
mac80211.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/mac80211.c b/mac80211.c
index 5515e16..35329c7 100644
--- a/mac80211.c
+++ b/mac80211.c
@@ -1028,6 +1028,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;
--
2.36.1