Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3088262rwb; Mon, 15 Aug 2022 17:50:34 -0700 (PDT) X-Google-Smtp-Source: AA6agR72EmG1fJTRA/D2x0xmHdHTTs5R4YeFMDD2unb0L4pMdFqHkkjsoI5RJLVh6xgO0ukP1wWC X-Received: by 2002:a17:906:9749:b0:730:c005:5d59 with SMTP id o9-20020a170906974900b00730c0055d59mr11790400ejy.419.1660611034235; Mon, 15 Aug 2022 17:50:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660611034; cv=none; d=google.com; s=arc-20160816; b=RleOfSmcsiyxasV2jwTjgB2cXXNYJCJ3KHspbNItpDGSZnJWAJZcDltlEBq+Ngipbu y4fh2M2mOJUdYu4A/jQu0QwhjYAOOJPfK3o8ZL8Uu26cHa8Ttln2u4JuvJX83RDo5ylM ZY35U4Ao7cud4U29MeS04Ld69IdxE5qlfEtduRI114oqUj6x10r60TbqjHriZ+JrmPEW kE+rldX9hl6gSGj5awoXrF2hVeYPRc6Od2wIe61ka+z3BrJdOxzim8UY9PqKBvLaIa5y PpJe8pX4iyD+rounKOgHjhBBJoZdE1NgRjEKUsQcikFHLD+F0eUof4wYdtH2PSqKovCm aK7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=MXL2xv2OymkTVmIo0lihDjoFrgaLWbDiwpZK3OZOCds=; b=VFozJlF5rMD50+DC+hELVvM/0U6xp+Yl2luyQW4GRYPUsc1gZt7rDkgYkR0eHVu+FX iWhiaNhIXgr+EQ9uynpoxisNn+QVa4FcxZQVTmAEUef5bKYtGv8llmrxJeN7KmCSVEoS gQAeS46e1gpF0JQbo9Jgvkk+gO7dGRZx75F0LbOZkNmJKE6uPVQfB8QEqmWPNAYbKkVa cgKU5SaGRoxQdxQQ365pZNzDjtSrInkUgM2Qh+AFzQqQ7CzN2+atf7UoAwmGx+z3UDOW bSKt/uQuEhgvRFGSvMjlInfhICgW1yTN7cnI7dsgfx4FlyzRUm4zlkoZWo3bkoXMoKJf LYvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="1wTJL//c"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hd14-20020a170907968e00b00702d8b7438csi9668697ejc.326.2022.08.15.17.50.08; Mon, 15 Aug 2022 17:50:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@linuxfoundation.org header.s=korg header.b="1wTJL//c"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354773AbiHPAAk (ORCPT + 99 others); Mon, 15 Aug 2022 20:00:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53320 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355931AbiHOXxV (ORCPT ); Mon, 15 Aug 2022 19:53:21 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC847C694E; Mon, 15 Aug 2022 13:17:43 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 2E1F9B81180; Mon, 15 Aug 2022 20:17:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 71315C433C1; Mon, 15 Aug 2022 20:17:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660594660; bh=AdxVgbtTJsF2IQ+9ibzYx6Y6HoJF5R+Vmz7gu23cD4c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1wTJL//cRbnAISOk6P6LyfjMtlYKsmIr+sOFREp/vT9uZaHDZIaJ4f7AanMxkClI+ 4blXENUvXj2lijXWjk1sO29PBK06FjOinF/a8UcoNkfw7VgCDRhxbc4z+Bd9Gc57FQ yk88q8cvpLz51w+NkhRHCmpnH5cNMSigEunqLJXI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Shayne Chen , Felix Fietkau , Sasha Levin Subject: [PATCH 5.19 0485/1157] mt76: mt7915: fix incorrect testmode ipg on band 1 caused by wmm_idx Date: Mon, 15 Aug 2022 19:57:21 +0200 Message-Id: <20220815180459.017553126@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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-kernel@vger.kernel.org From: Shayne Chen [ Upstream commit 6e744cfeee02c2d8676eb55d5b3720808812f41f ] 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 Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin --- 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..0f5c1e5bffe1 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 * MT76_CONNAC_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.35.1