From nobody Sat Feb 7 13:02:46 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 44865C25B0D for ; Tue, 16 Aug 2022 00:04:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1355133AbiHPAAl (ORCPT ); Mon, 15 Aug 2022 20:00:41 -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-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 en= able, bool mu) } =20 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 =3D (struct mt7915_vif *)phy->monitor_vif->drv_pr= iv; struct mt7915_mcu_tx req =3D { .total =3D 1 }; struct edca *e =3D &req.edca[0]; =20 - e->queue =3D qid; + e->queue =3D qid + mvif->mt76.wmm_idx * MT76_CONNAC_MAX_WMM_SETS; e->set =3D WMM_PARAM_SET; =20 e->aifs =3D aifs; @@ -182,7 +183,7 @@ mt7915_tm_set_wmm_qid(struct mt7915_dev *dev, u8 qid, u= 8 aifs, u8 cw_min, e->cw_max =3D cpu_to_le16(cw_max); e->txop =3D cpu_to_le16(txop); =20 - return mt7915_mcu_update_edca(dev, &req); + return mt7915_mcu_update_edca(phy->dev, &req); } =20 static int @@ -244,7 +245,7 @@ mt7915_tm_set_ipg_params(struct mt7915_phy *phy, u32 ip= g, u8 mode) =20 mt7915_tm_set_slot_time(phy, slot_time, sifs); =20 - 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); } --=20 2.35.1