Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1308898rda; Mon, 23 Oct 2023 08:42:36 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE8S5W//W9e2OJILPS3xTwISbcK0JfZ4NLa0wq/01ZYwy40BqaVQ2QRrokkIgHq3C3+1pDJ X-Received: by 2002:a05:6a21:47cb:b0:162:650c:76b8 with SMTP id as11-20020a056a2147cb00b00162650c76b8mr9312361pzc.45.1698075755916; Mon, 23 Oct 2023 08:42:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698075755; cv=none; d=google.com; s=arc-20160816; b=hmpJEziS0LcO7NDNAp3xVkQZBsJrAdqWjZmwGB57uzyUdSuTzoVZkqmpM9TbaxD6qK NNCEVQfxTpZVDhB4c3bU9nRmaJ/KjovyKxzXVQEflxJhFhjc1Ql9c7WxE5Mej6hWbRkC 0KaIWty3kusaesvPAX2SaI7dIGPoVEweQMHL0Cg9UwJHY8YFNrDDDGRDZCFXhB+8yF9R YWCPmyiLtJma9YQvhuAg6XMUaYitluVokOI5M4G/jgZ3Cv0TJQiVvrJVyF2ue2Vw3hes nJn0J9cg82rbG4/CWGkayIcs67P4ZdPEY0z1Jrbu9izVMbyxDBX/nig+FJVpnNc9fco9 dG4A== 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=aVWV822tjw6NsdQ6YY6gqphVoNQEF0rKLA5rYjOgxmw=; fh=tT3pVz2sFXWN1JRevyloDHRuH+o8iMm3Jb/5EQ+YNT0=; b=aDHphCMN2BoIYRjJ0EUaWG03bODxyqHvavnsz5pX0tNbJGTjlaMutJYZvcSqHo5k16 Jh+i9BrwGX6FaNqADKSJrnjjyowqosMSbP5HbCLBl+9Bucp616XOrd7iGRpdxGZrdXGn rktS86+Qj3sbqqzkj7j5rkeQOO0f2xnF6ZwrpWsE+qIlcCnx8KB0HSvwyUwdP6NEaK/z dXIDiouQpk84G/T/wPNYekwDZGn6eSpdqv/WX2oV9PRJORpy7U1hfYHVQq5kvBnRgHby 4+0+JZGJBfI4X8ovI2FNVDIqhENKXaC7kyqBVxIvhJRMYmwo6bW70LcVjBRgsGdPhA/O FUjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=DVP1Phgq; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id b26-20020a63931a000000b0056fa1ac3722si6562112pge.698.2023.10.23.08.42.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 08:42:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=DVP1Phgq; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id B53FE806503E; Mon, 23 Oct 2023 08:42:23 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231475AbjJWPmR (ORCPT + 52 others); Mon, 23 Oct 2023 11:42:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48798 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230250AbjJWPmM (ORCPT ); Mon, 23 Oct 2023 11:42:12 -0400 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A549710D for ; Mon, 23 Oct 2023 08:42:09 -0700 (PDT) X-UUID: b4ae1d9071ba11ee8051498923ad61e6-20231023 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=aVWV822tjw6NsdQ6YY6gqphVoNQEF0rKLA5rYjOgxmw=; b=DVP1Phgqi+w/9SrkR+2jKVQlaVRMQt/CsfLB0NKCImBqzslvvqt9S7MCsQzwiaakwlP88haQG8Sd9NyktLvqMUDEl8J8vbqF1Ho4spVWvKga3sXH9rk3zgneDBibSmkMtbfK6mOe0tRFJ8gWTtm3TTnebz82dHxX1fVraAVGkms=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.32,REQID:9c3cd9ae-550c-456b-9dac-8f5bfc68fe87,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:5f78ec9,CLOUDID:0eac37d7-04a0-4e50-8742-3543eab8cb8e,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:0,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0,AV:0,LES:1,SPR:NO, DKR:0,DKP:0,BRR:0,BRE:0 X-CID-BVR: 0 X-CID-BAS: 0,_,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR X-UUID: b4ae1d9071ba11ee8051498923ad61e6-20231023 Received: from mtkmbs14n1.mediatek.inc [(172.21.101.75)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1302326721; Mon, 23 Oct 2023 23:42:00 +0800 Received: from mtkmbs13n2.mediatek.inc (172.21.101.108) by mtkmbs11n2.mediatek.inc (172.21.101.187) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Mon, 23 Oct 2023 23:41:59 +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; Mon, 23 Oct 2023 23:41:59 +0800 From: Shayne Chen To: Felix Fietkau CC: linux-wireless , Lorenzo Bianconi , Ryder Lee , Evelyn Tsai , Bo Jiao , linux-mediatek , Howard Hsu , Shayne Chen Subject: [PATCH 08/11] wifi: mt76: connac: set fixed_bw bit in TX descriptor for fixed rate frames Date: Mon, 23 Oct 2023 23:38:51 +0800 Message-ID: <20231023153854.10708-8-shayne.chen@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20231023153854.10708-1-shayne.chen@mediatek.com> References: <20231023153854.10708-1-shayne.chen@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RDNS_NONE,SPF_HELO_PASS, SPF_PASS,UNPARSEABLE_RELAY autolearn=no 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 23 Oct 2023 08:42:23 -0700 (PDT) From: Howard Hsu Always set the fixed_bw bitfield for fixed rate frames to keep it being sent with specific bandwidth. Without this change, the bw of fixed rate frames will still be decided by hardware. Reported-by: Chank Chen Signed-off-by: Howard Hsu Signed-off-by: Shayne Chen --- drivers/net/wireless/mediatek/mt76/mt76_connac3_mac.h | 3 ++- drivers/net/wireless/mediatek/mt76/mt7996/mac.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt76_connac3_mac.h b/drivers/net/wireless/mediatek/mt76/mt76_connac3_mac.h index 2250252b2047..36edf1d3dfca 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76_connac3_mac.h +++ b/drivers/net/wireless/mediatek/mt76/mt76_connac3_mac.h @@ -239,7 +239,8 @@ enum tx_mgnt_type { #define MT_TXD6_TX_SRC GENMASK(31, 30) #define MT_TXD6_VTA BIT(28) -#define MT_TXD6_BW GENMASK(25, 22) +#define MT_TXD6_FIXED_BW BIT(25) +#define MT_TXD6_BW GENMASK(24, 22) #define MT_TXD6_TX_RATE GENMASK(21, 16) #define MT_TXD6_TIMESTAMP_OFS_EN BIT(15) #define MT_TXD6_TIMESTAMP_OFS_IDX GENMASK(14, 10) diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/mac.c b/drivers/net/wireless/mediatek/mt76/mt7996/mac.c index 18c7fef00fff..89e23a95ecc2 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7996/mac.c +++ b/drivers/net/wireless/mediatek/mt76/mt7996/mac.c @@ -943,7 +943,8 @@ void mt7996_mac_write_txwi(struct mt7996_dev *dev, __le32 *txwi, idx = mvif->basic_rates_idx; } - txwi[6] |= cpu_to_le32(FIELD_PREP(MT_TXD6_TX_RATE, idx)); + val = FIELD_PREP(MT_TXD6_TX_RATE, idx) | MT_TXD6_FIXED_BW; + txwi[6] |= cpu_to_le32(val); txwi[3] |= cpu_to_le32(MT_TXD3_BA_DISABLE); } } -- 2.39.2