Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp2583510iog; Sun, 19 Jun 2022 23:21:54 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vBB9gvTh16v9dzU/tld4OLSx0o1K/X8Dby/M+QdPnALhTQePJ8X8YmITL1QU56uz7mTS8h X-Received: by 2002:a17:903:1210:b0:168:dc70:e9d8 with SMTP id l16-20020a170903121000b00168dc70e9d8mr22250330plh.92.1655706114031; Sun, 19 Jun 2022 23:21:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655706114; cv=none; d=google.com; s=arc-20160816; b=dptWzN8IhsgIMLvZF1Jxwz7BCsMJae0DlSdVZl+7i520VjO5DBbRqBEd5PmVjxnL36 yZV1YaeeJG5/Ok+ih5i87TffcWk53hh/6Ye44oFP0FmnDwKC/H01qEyhpArAH7FvuAmd bEJEYB0jscxyX96o5FYxIfMS0wjweV0LCp/lGTTBLajhO7pXaN3ruinAiAOo6KDu62+7 qWz5d+3AHKjSyDf/5evozEpos0z8dD5Hh2E+Xyq+hRs/NbZrI/SF2/5p3Od4E3jF0vqY o1GX/83chVVXGLPyykMuPyPObRvrDTtk7kSrTtyvbtoHh6GMnqmiBSPlajuUt6BSYqLX d6AA== 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=BhLkvxIwFsfa3F7RgNxeKt5uzuq3HveNOLuoxbMckJY=; b=AC19iQg9ErTPI05nu9dP7M4GdsKjaOFaFlTCapAzmym4wCZF4L89ham/18zROz0ita eSQF/iDCes5O30pkTWeZjwApLgCsTQSz0YBc58Yf0P/LNS01H655sjLJkZGb8K0nJm0s g136Qf+xhw4AKEu/nyCG86ElOnI0d89BglqpvQEUo4YTYv7QI3b/5L0OE8WmpHUHSqcp LOJ9h6rv9kjTwqGMFFxGpwTd1ECdp5QJAY8RrYShY5uz8T5SLnw06N6QKyl9Wk610Ifa IJrIHEMClrN7TmaKa1ClpTPnkMIiIvkB6hu2x4gFmMeBvo3J7O4YGIRD5Ppqa/v9Jf1L wYiA== 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 r129-20020a632b87000000b0040c8f64c0e5si6619280pgr.133.2022.06.19.23.21.41; Sun, 19 Jun 2022 23:21:53 -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 S238035AbiFTGR2 (ORCPT + 65 others); Mon, 20 Jun 2022 02:17:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46336 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233453AbiFTGR1 (ORCPT ); Mon, 20 Jun 2022 02:17:27 -0400 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B753BE1E for ; Sun, 19 Jun 2022 23:17:26 -0700 (PDT) X-UUID: c7dfdd99ba1c4536b42dee936b24db9d-20220620 X-CID-UNFAMILIAR: 1 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.6,REQID:bfef85a3-7225-47e7-8b01-e37553bcb07a,OB:0,LO B:0,IP:0,URL:0,TC:0,Content:-5,EDM:0,RT:0,SF:100,FILE:0,RULE:Release_Ham,A CTION:release,TS:95 X-CID-INFO: VERSION:1.1.6,REQID:bfef85a3-7225-47e7-8b01-e37553bcb07a,OB:0,LOB: 0,IP:0,URL:0,TC:0,Content:-5,EDM:0,RT:0,SF:100,FILE:0,RULE:Spam_GS981B3D,A CTION:quarantine,TS:95 X-CID-META: VersionHash:b14ad71,CLOUDID:50f8293d-9948-4b2a-a784-d8a6c1086106,C OID:9fa7ea9b19ca,Recheck:0,SF:28|16|19|48,TC:nil,Content:0,EDM:-3,IP:nil,U RL:0,File:nil,QS:nil,BEC:nil,COL:0 X-UUID: c7dfdd99ba1c4536b42dee936b24db9d-20220620 Received: from mtkcas10.mediatek.inc [(172.21.101.39)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1696154949; Mon, 20 Jun 2022 14:17:21 +0800 Received: from mtkcas10.mediatek.inc (172.21.101.39) 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; Mon, 20 Jun 2022 14:17:19 +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, 20 Jun 2022 14:17:19 +0800 From: Shayne Chen To: Felix Fietkau CC: linux-wireless , Lorenzo Bianconi , Ryder Lee , Evelyn Tsai , linux-mediatek , Shayne Chen Subject: [PATCH] mt76: mt7915: fix incorrect testmode ipg on band 1 caused by wmm_idx Date: Mon, 20 Jun 2022 14:17:17 +0800 Message-ID: <20220620061717.23216-1-shayne.chen@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 Fix the issue that the measured inter packet gap didn't fit its setting value. Fixes: c2d3b1926f30 ("mt76: mt7915: add support for ipg in testmode") Signed-off-by: Shayne Chen --- drivers/net/wireless/mediatek/mt76/mt7915/testmode.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/testmode.c b/drivers/net/wireless/mediatek/mt76/mt7915/testmode.c index 20f63644e929..2888e4e9ff72 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/testmode.c +++ b/drivers/net/wireless/mediatek/mt76/mt7915/testmode.c @@ -168,13 +168,14 @@ mt7915_tm_set_tam_arb(struct mt7915_phy *phy, bool enable, bool mu) } static int -mt7915_tm_set_wmm_qid(struct mt7915_dev *dev, u8 qid, u8 aifs, u8 cw_min, +mt7915_tm_set_wmm_qid(struct mt7915_phy *phy, u8 qid, u8 aifs, u8 cw_min, u16 cw_max, u16 txop) { + struct mt7915_vif *mvif = (struct mt7915_vif *)phy->monitor_vif->drv_priv; struct mt7915_mcu_tx req = { .total = 1 }; struct edca *e = &req.edca[0]; - e->queue = qid; + e->queue = qid + mvif->mt76.wmm_idx * MT7915_MAX_WMM_SETS; e->set = WMM_PARAM_SET; e->aifs = aifs; @@ -182,7 +183,7 @@ mt7915_tm_set_wmm_qid(struct mt7915_dev *dev, u8 qid, u8 aifs, u8 cw_min, e->cw_max = cpu_to_le16(cw_max); e->txop = cpu_to_le16(txop); - return mt7915_mcu_update_edca(dev, &req); + return mt7915_mcu_update_edca(phy->dev, &req); } static int @@ -244,7 +245,7 @@ mt7915_tm_set_ipg_params(struct mt7915_phy *phy, u32 ipg, u8 mode) mt7915_tm_set_slot_time(phy, slot_time, sifs); - return mt7915_tm_set_wmm_qid(dev, + return mt7915_tm_set_wmm_qid(phy, mt76_connac_lmac_mapping(IEEE80211_AC_BE), aifsn, cw, cw, 0); } -- 2.25.1