Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2365065rwd; Fri, 2 Jun 2023 08:26:24 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4DTBEb8rqEvTdcH5EqmAQBaN/74S5gG47nGAumxvdiOfVLopKhChVpi4wmKonBh/Z1u3f3 X-Received: by 2002:a17:903:2343:b0:1ae:1659:bfe2 with SMTP id c3-20020a170903234300b001ae1659bfe2mr324400plh.34.1685719584512; Fri, 02 Jun 2023 08:26:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685719584; cv=none; d=google.com; s=arc-20160816; b=LkMAQXhrSG9DoI5yv62mgzgQfLoR9jOqXJ6MnZbb/mxOGrSK0BOBwOf/8DkUsMw6XM GTXGDKyVv28r6MYGNUA/JvqoL0TQqux/91+03Ww7i0DynKw2RkYcqCSIuJt8CGUaRzar Vvo0DqpO1HslQBLQGpHme7IUoh1+z9cn5IbZpst256/cOXreEOeb7ch8Bl0XAwGWxrlX 0onCdOyAeZjzMqadenp/+Qs5b8PTr3Gl4/fEHKjN4SUN0GuBYY6BrO00wUINBme4kF1P dUqGJpyiR1J4vL1sW7+TLhK7m2yl+YY/yCdn1oz8xP3YrWAdAR/ZaND1zVpfh6a5w2E2 a42w== 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:dkim-signature; bh=qG3HP0JUV9054tVVRIhOQj88iRDSJNxoZI44G4aYeEw=; b=0yiaKTGQZSyv5NfnPMDneRL6mnH4Ezl4HF56dkL50Y+XqTXcj8t5ZA7CHwWraL1ddm 5pbmRifCExJRRLGzJRA/40J9JcCItuTwbceYwIDbagJEniK/sgsQWoAuItFFOMA2gsZF OrY+jjDtN1yqOiE/HGHVkPZpcj7Koissq4zEuw8n2oJOioEKH97ytWgJ5SbmVHGyz4W6 lkOst/o4bz2kQsSu+PwBvuDi/Z4UlEnKKIIs0JtakJMC24levSXhCNj20ySTTpO0ViOj leEmP4MyTDNQY9CDJXZDDoZ15mSjLy1djy11NnNaDtzvVY6WVIG/Mxt0IM3pWViken6L x6IA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b="nkc/+xqa"; 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=pass (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 c5-20020a170902d90500b001ac360597e7si1055057plz.220.2023.06.02.08.26.16; Fri, 02 Jun 2023 08:26:24 -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; dkim=pass header.i=@mediatek.com header.s=dk header.b="nkc/+xqa"; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236585AbjFBPWC (ORCPT + 64 others); Fri, 2 Jun 2023 11:22:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235502AbjFBPV6 (ORCPT ); Fri, 2 Jun 2023 11:21:58 -0400 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 461EE1B6 for ; Fri, 2 Jun 2023 08:21:57 -0700 (PDT) X-UUID: 34202b90015911ee9cb5633481061a41-20230602 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=qG3HP0JUV9054tVVRIhOQj88iRDSJNxoZI44G4aYeEw=; b=nkc/+xqaEtOTBKAtgnM/brKPUGveGKm0TU8KyBOP9peUAG24M0maMW3pZYkHQrpoYoCkqbTL+KnJzG0tyBHVKksDHA/pittUjAJulQSd8UT/lr0LPXhiVlYjwV0ZED0EDLS0XWEOIB2wtcwb88XvbSnfH7veDib7frn/H+5RpPQ=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.25,REQID:b2b431ae-e74f-4449-ba03-5cd82e416067,IP:0,U RL:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION: release,TS:0 X-CID-META: VersionHash:d5b0ae3,CLOUDID:16ef663d-7aa7-41f3-a6bd-0433bee822f3,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:11|1,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0,AV:0 X-CID-BVR: 0,NGT X-CID-BAS: 0,NGT,0,_ X-UUID: 34202b90015911ee9cb5633481061a41-20230602 Received: from mtkmbs13n2.mediatek.inc [(172.21.101.108)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1041699571; Fri, 02 Jun 2023 23:21:53 +0800 Received: from mtkmbs13n2.mediatek.inc (172.21.101.194) by mtkmbs11n1.mediatek.inc (172.21.101.185) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Fri, 2 Jun 2023 23:21:52 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs13n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Fri, 2 Jun 2023 23:21:52 +0800 From: Shayne Chen To: Felix Fietkau CC: linux-wireless , Lorenzo Bianconi , Ryder Lee , Evelyn Tsai , Bo Jiao , linux-mediatek , StanleyYP Wang , Shayne Chen Subject: [PATCH 10/12] wifi: mt76: mt7996: fix WA event ring size Date: Fri, 2 Jun 2023 23:21:06 +0800 Message-ID: <20230602152108.26860-10-shayne.chen@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20230602152108.26860-1-shayne.chen@mediatek.com> References: <20230602152108.26860-1-shayne.chen@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY,URIBL_BLOCKED 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 From: StanleyYP Wang Fix rx ring size of WA event to get rid of event loss and queue overflow problems. Fixes: 98686cd21624 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices") Signed-off-by: StanleyYP Wang Signed-off-by: Shayne Chen --- drivers/net/wireless/mediatek/mt76/mt7996/dma.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7996/mt7996.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/dma.c b/drivers/net/wireless/mediatek/mt76/mt7996/dma.c index 534143465d9b..fbedaacffbba 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7996/dma.c +++ b/drivers/net/wireless/mediatek/mt76/mt7996/dma.c @@ -293,7 +293,7 @@ int mt7996_dma_init(struct mt7996_dev *dev) /* event from WA */ ret = mt76_queue_alloc(dev, &dev->mt76.q_rx[MT_RXQ_MCU_WA], MT_RXQ_ID(MT_RXQ_MCU_WA), - MT7996_RX_MCU_RING_SIZE, + MT7996_RX_MCU_RING_SIZE_WA, MT_RX_BUF_SIZE, MT_RXQ_RING_BASE(MT_RXQ_MCU_WA)); if (ret) diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/mt7996.h b/drivers/net/wireless/mediatek/mt76/mt7996/mt7996.h index 42892f06faa7..a3bd85d3df25 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7996/mt7996.h +++ b/drivers/net/wireless/mediatek/mt76/mt7996/mt7996.h @@ -26,6 +26,7 @@ #define MT7996_RX_RING_SIZE 1536 #define MT7996_RX_MCU_RING_SIZE 512 +#define MT7996_RX_MCU_RING_SIZE_WA 1024 #define MT7996_FIRMWARE_WA "mediatek/mt7996/mt7996_wa.bin" #define MT7996_FIRMWARE_WM "mediatek/mt7996/mt7996_wm.bin" -- 2.39.2