Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp4580583iog; Wed, 22 Jun 2022 01:32:10 -0700 (PDT) X-Google-Smtp-Source: AGRyM1ufasE0LOptb9rxZWRiyS6dgyQ6Kw6IXJlh45c3a7ExKws1xd6iOwizUygw/IOyIl7xoNrC X-Received: by 2002:a05:6402:26c3:b0:430:efd4:4edb with SMTP id x3-20020a05640226c300b00430efd44edbmr2800711edd.53.1655886729956; Wed, 22 Jun 2022 01:32:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655886729; cv=none; d=google.com; s=arc-20160816; b=RAt2Z1lEUt8zLkXv65TtxqsFF6BFtGvdvdsPX4QVPLywo+Bbd+qLcgRXiAyMSNE9zV zTkrmD5fBRvUYezeQZN2U4JN+Kc7BD0yKClZDUCSxaacFHTigyNPLqXlS1407T5815CU 5iUbrZyLqpibeiVa2o0ziKJrNaU4jSZplBqyTnIzBgTtxt7gfTUTbnrfV1dFrEdicTBR DfAuN9BSNuglCc9Vnth7MQoRGxnfVLcC+nudNBRKpEShtHuSvg+BQCvQu/zb/7ona40U t46M1/5sV3XqJObXqqAXO7Y/wlUiZ5UIV7aD9IduNqtPUhQfVySqnBn1llVFAUHzi2cZ 5JAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=8N4tYoFo2D2PQf3r99KzRzwoLejFHdbj5YlWXRCYlVY=; b=a+6XJJeD+TjTSDW2nIovnM6hSKsuecA53NBMTnUm5cFBktmkZzrG9u62vrUqhe6534 LbmHJSTcgJqhbTEXZs0xg8/3nFIg2rCEU/r6agblzV8Fhfyg72P9NErT34gFRxIVSpez PEOYJgXuyPqAvFIvQwPLnOoPT65YjKfUl7RWZe0E5HBeQ2uoli+tNGF9EKGkGNMeR4zs tgIPb8TGRzU+gcy/e6Z82hh0vy9zG0ww1zDUzyu8RW7lBlScaydUD4laxWe81ymUqOPm 1p+7cV9SpUFk69Uw5Fe9Hv+ByTSeBTZjBEkemJVhncyq2GNL68LuuMg/CfGufmTO6r2q 5+QA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ne19-20020a1709077b9300b0070ad4672a25si21247586ejc.441.2022.06.22.01.31.52; Wed, 22 Jun 2022 01:32:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353052AbiFVIaq (ORCPT + 65 others); Wed, 22 Jun 2022 04:30:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55540 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352995AbiFVIao (ORCPT ); Wed, 22 Jun 2022 04:30:44 -0400 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 969DCF0F for ; Wed, 22 Jun 2022 01:30:43 -0700 (PDT) X-UUID: 987e4142806e49e7a7d0340255425976-20220622 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.6,REQID:d6d69fcf-9b90-4563-9c2a-7e2dbeca5063,OB:0,LO B:0,IP:0,URL:0,TC:0,Content:0,EDM:0,RT:0,SF:100,FILE:0,RULE:Release_Ham,AC TION:release,TS:100 X-CID-INFO: VERSION:1.1.6,REQID:d6d69fcf-9b90-4563-9c2a-7e2dbeca5063,OB:0,LOB: 0,IP:0,URL:0,TC:0,Content:0,EDM:0,RT:0,SF:100,FILE:0,RULE:Spam_GS981B3D,AC TION:quarantine,TS:100 X-CID-META: VersionHash:b14ad71,CLOUDID:ba6bbc2d-1756-4fa3-be7f-474a6e4be921,C OID:7c5bc58fd45f,Recheck:0,SF:28|17|19|48,TC:nil,Content:0,EDM:-3,IP:nil,U RL:0,File:nil,QS:nil,BEC:nil,COL:0 X-UUID: 987e4142806e49e7a7d0340255425976-20220622 Received: from mtkmbs10n1.mediatek.inc [(172.21.101.34)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 328482080; Wed, 22 Jun 2022 16:30:37 +0800 Received: from mtkmbs07n1.mediatek.inc (172.21.101.16) by mtkmbs10n1.mediatek.inc (172.21.101.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.792.15; Wed, 22 Jun 2022 16:30:36 +0800 Received: from mtkmbs11n1.mediatek.inc (172.21.101.186) by mtkmbs07n1.mediatek.inc (172.21.101.16) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 22 Jun 2022 16:30:36 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs11n1.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.792.3 via Frontend Transport; Wed, 22 Jun 2022 16:30:36 +0800 From: MeiChia Chiu To: Felix Fietkau CC: Lorenzo Bianconi , Shayne Chen , Evelyn Tsai , Ryder Lee , , , MeiChia Chiu Subject: [PATCH] mt76: do not check the ccmp pn for ONLY_MONITOR frame Date: Wed, 22 Jun 2022 16:30:34 +0800 Message-ID: <20220622083034.22472-1-MeiChia.Chiu@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 Content-Type: text/plain X-MTK: N X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org 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 --- drivers/net/wireless/mediatek/mt76/mac80211.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/wireless/mediatek/mt76/mac80211.c b/drivers/net/wireless/mediatek/mt76/mac80211.c index 60da9995357e..ecf5bd9605db 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; -- 2.18.0