Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2770323pxb; Mon, 18 Oct 2021 01:11:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyGIPNBZuou9KrzccCxdQynksyj0nV4j6AFcB1zdPRsudq3UGmzcCazFd/PW05vtecHshvH X-Received: by 2002:a17:906:254b:: with SMTP id j11mr27713594ejb.513.1634544665063; Mon, 18 Oct 2021 01:11:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634544665; cv=none; d=google.com; s=arc-20160816; b=uJT3nJqeZJ0EiXIQYweNmNwLvAyuzCUTfNtFq8MNFR43mCP8PysOqloq0daPicjO29 RmUhW8ze70WrMFqmX069AClC4CaXZG6zWYjxprsbvGdYxjO/ebhEOKPALUrNiEuTM625 hhE2ilLEP1iE17gD/7tSdiLJ3GlNZTkcHAfNPFav/JZpzDNTVOVjpUVhfV77iy0wHFMh PStxnruS/Ru/qVI8IuHqn4OE8Nywf4W+KLta6AlL14/RlF2sJCWcKGpDyUHpr3Qin2Rl TVY/jf8cJiaZgPM/tFSCWh+FIpQT1bBuaTGEgPvDPZ02TVsRTesjSKBtlBSSgIUxOwAm 0Rtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=y1C6GlFzIqIOpNRW55wth0ze3Z5VZv+Qd+KEhAeWk7E=; b=FmvjjDBGFOycY3t3SzPOqgwjL2Hc4oayJVaHLttz+rZ3atsOWQVsVBz4GxMtpZ2xxg J6V1lm6Nyupdb2Jfn6SLnXcoYj632KBLHaYAlcABPkXRQUgAz6hyKk7CDAqjHzg+tAWd LccFmrV6wx4YmXmdxxp7wb2HXsViDSnj7+h78oWUVt8Bj66PS/IRp/to5hnAbbgwh/ld YBz3BZJ6oFMZ19vyGLS3rO+XANuOLMhFMC++om+y0m3IBi+qTIifFhzOYuyFsDXhdvIJ 2cMaXaqCXpWV/OZuBvPMuJBfjjX3LV+Tp8neMZ36TFqicIJiRfbizRZZwIz/nd2rE69O 8czQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d18si18480607edr.105.2021.10.18.01.10.50; Mon, 18 Oct 2021 01:11:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230525AbhJRIML (ORCPT + 64 others); Mon, 18 Oct 2021 04:12:11 -0400 Received: from mailgw01.mediatek.com ([60.244.123.138]:55388 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S231131AbhJRIMK (ORCPT ); Mon, 18 Oct 2021 04:12:10 -0400 X-UUID: da5fd4d0c752489aa5bc25de18efd080-20211018 X-UUID: da5fd4d0c752489aa5bc25de18efd080-20211018 Received: from mtkcas11.mediatek.inc [(172.21.101.40)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1310573939; Mon, 18 Oct 2021 16:09:56 +0800 Received: from mtkcas10.mediatek.inc (172.21.101.39) by mtkmbs07n2.mediatek.inc (172.21.101.141) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 18 Oct 2021 16:09:54 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas10.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 18 Oct 2021 16:09:54 +0800 From: Shayne Chen To: Felix Fietkau CC: linux-wireless , Lorenzo Bianconi , Ryder Lee , Evelyn Tsai , linux-mediatek , Shayne Chen Subject: [PATCH v3 4/4] mt76: mt7915: change max rx len limit of hw modules Date: Mon, 18 Oct 2021 16:09:41 +0800 Message-ID: <20211018080941.11443-4-shayne.chen@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20211018080941.11443-1-shayne.chen@mediatek.com> References: <20211018080941.11443-1-shayne.chen@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Update max rx len of some hw modules, which aligns out vendor SDK. In normal modes, we exchange MPDU 7991 cap with peers; however, this won't play a part in sniffer mode. To prevent packets which exceed the max MPDU size from entering specific rx path in hw, we need to set a proper limit to filter them out. Signed-off-by: Shayne Chen --- drivers/net/wireless/mediatek/mt76/mt7915/init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/init.c b/drivers/net/wireless/mediatek/mt76/mt7915/init.c index 274b30a58f05..b77647b4575e 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/init.c +++ b/drivers/net/wireless/mediatek/mt76/mt7915/init.c @@ -386,7 +386,7 @@ mt7915_mac_init_band(struct mt7915_dev *dev, u8 band) FIELD_PREP(MT_MDP_RCFR1_RX_DROPPED_MCAST, MT_MDP_TO_HIF); mt76_rmw(dev, MT_MDP_BNRCFR1(band), mask, set); - mt76_rmw_field(dev, MT_DMA_DCR0(band), MT_DMA_DCR0_MAX_RX_LEN, 1536); + mt76_rmw_field(dev, MT_DMA_DCR0(band), MT_DMA_DCR0_MAX_RX_LEN, 0x680); /* disable rx rate report by default due to hw issues */ mt76_clear(dev, MT_DMA_DCR0(band), MT_DMA_DCR0_RXD_G5_EN); } @@ -395,7 +395,7 @@ static void mt7915_mac_init(struct mt7915_dev *dev) { int i; - mt76_rmw_field(dev, MT_MDP_DCR1, MT_MDP_DCR1_MAX_RX_LEN, 1536); + mt76_rmw_field(dev, MT_MDP_DCR1, MT_MDP_DCR1_MAX_RX_LEN, 0x400); /* enable hardware de-agg */ mt76_set(dev, MT_MDP_DCR0, MT_MDP_DCR0_DAMSDU_EN); -- 2.29.2