Received: by 2002:a05:7412:2a8a:b0:fc:a2b0:25d7 with SMTP id u10csp59826rdh; Tue, 6 Feb 2024 19:31:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IGiG7mJMJ/89gR2Bo83eZUKnSWtlPLbRYyJSLCq07kafQbQjnVQL+yguyaRg14oYyNxmrF2 X-Received: by 2002:a17:906:3498:b0:a38:25f0:aa35 with SMTP id g24-20020a170906349800b00a3825f0aa35mr3058300ejb.41.1707276700293; Tue, 06 Feb 2024 19:31:40 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707276700; cv=pass; d=google.com; s=arc-20160816; b=QU63QjM2YzTmeL94/MTmHynrRozRW5mkWWFCDa7LG5AYiFeC98u3cHY1oHiHWbzfzr w5d15a+Yr4Yf6FHaxysf254olcAV7cJFt/gysUmE3oVdtdm0dVSJ88+2kMDwyr/5mgD9 WVrnOvJPaNKyTUvd8hMYVdLj5uL0tAhCqpL+99SF3RiiIJHBn9zEg1E+si2smWoLL6Ra aUe+1kw9avGWv4oKh5a+xbsb93BHcs6ajfsriBRqbG48AX0Lhu1mTyJGxJ2uWmCJrb8V o4380+xlBP3jEBCf6yZsP9Peke+5OF1iDL5f5RAV4yfguwlkw8Aj5tV7svLX3TvVTcuR VtfQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:subject:cc:to:from:dkim-signature; bh=ZywQbXcavj5/ok+uU0CpXxI7ASScmFhLjYN382ZWMIE=; fh=Zhw03m1QVMfeaYI+o0LfgMouFQT/eqctJ+bCrxr6KRY=; b=GwHxIRo15awN3rmiXDbuxC75+s1eo0EA3I3IO4T7lsFeMfPaAf6jPz1/4DIEeiJmco 3InA5INnQ/eK0iyskMVPZvx6wThYWNL+LXRDDuVjNEKwN95zWmuqBgsXD/0firimQJhz LJBZnNe5uwOQjvwKzhFHQ31rHdWhwhrdYxnAD6LNaVjrnsCX4mHVDZ31lRGL20wFUe9F JQvoTBSOPmr2IDeKkCpprdgia1JwV83sSUvrSYiXTxW1eoC5LOJUS+QmdA5RkPQ68xm8 xrB0BGs1iBALio8h1zEtvgPZ+1JmJ9f4qYM5qQus4qamiNo+SdVLv8hhQoyqSQhik0Bc Dc8A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b="jqumqd/S"; arc=pass (i=1 spf=pass spfdomain=mediatek.com dkim=pass dkdomain=mediatek.com dmarc=pass fromdomain=mediatek.com); spf=pass (google.com: domain of linux-wireless+bounces-3261-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-wireless+bounces-3261-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com X-Forwarded-Encrypted: i=2; AJvYcCUkfzdmdTHgznPsxDQNV59xnIbjX6uIo+CzzxfNdss7BTGf5Gh6oKSBo1gCHvHCuBxGfjrB6Tv4nrjsBeSHr9tLRHMJXECQ9LexPS6FeQ== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id kj3-20020a170907764300b00a35ddf3a7c5si314278ejc.951.2024.02.06.19.31.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 19:31:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-3261-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b="jqumqd/S"; arc=pass (i=1 spf=pass spfdomain=mediatek.com dkim=pass dkdomain=mediatek.com dmarc=pass fromdomain=mediatek.com); spf=pass (google.com: domain of linux-wireless+bounces-3261-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-wireless+bounces-3261-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 0C0491F28308 for ; Wed, 7 Feb 2024 03:31:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E9C74FC01; Wed, 7 Feb 2024 03:31:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="jqumqd/S" X-Original-To: linux-wireless@vger.kernel.org Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 97424FC08 for ; Wed, 7 Feb 2024 03:31:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.61.82.184 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707276695; cv=none; b=qAAZ2rsFT3H/3EEmqr81tF61CO8zw9cnka6deWuKwndx4B98JePfuPCWbyB5qmsVFCX5JblMAcnMCcQ+r9ZYmBpb5piEYF3pJZHaJgxXk049SQRSeeiitCx9zlypQAV9hon8nYSydXRmYOsonMZFySyt/eYeze8UgMqxsmuv8lM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707276695; c=relaxed/simple; bh=D9JsN96WQwO7OXPEJzmGjB6U29LVnyILb+IJfa9Uyqc=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=QQtpzbtirdMJXGsN2O1TRjpvwysuAG+O++raPCqaKi7cJlJDYdTuQGItYpZUA7g9JLjE5KDiY/pRpINJn2ZhJ45EIDCgCWuwAjVwEv/6Bamg+Zk5v/lFdnrqsenPb3tOuieOz+L8RqSCIMWwMhlFhafaENfxhJr3Dcsy2jvoMdM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=mediatek.com; spf=pass smtp.mailfrom=mediatek.com; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b=jqumqd/S; arc=none smtp.client-ip=210.61.82.184 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=mediatek.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mediatek.com X-UUID: 618b5d0ac56911eea2298b7352fd921d-20240207 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:MIME-Version:Message-ID:Date:Subject:CC:To:From; bh=ZywQbXcavj5/ok+uU0CpXxI7ASScmFhLjYN382ZWMIE=; b=jqumqd/S10wS4Fy7JjBA1outoqMtHGj6X82b2olWniS591eNwch6qnu2RenJuEAUWZp5QQx+y2XtxB+98/hxozKl621ZMhCjp6kVb0PA3bi880uG4RvJzZNUnoYf3VolqfnVB9y1h5B/cuAtfLqtw4Z3jz7oleFA+eOsy4rP0kI=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.37,REQID:ef5d57c2-9e06-4718-97ff-5cd38dc47cce,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:6f543d0,CLOUDID:7fa03480-4f93-4875-95e7-8c66ea833d57,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:0,File:nil,RT: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: 618b5d0ac56911eea2298b7352fd921d-20240207 Received: from mtkmbs10n1.mediatek.inc [(172.21.101.34)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1190372159; Wed, 07 Feb 2024 11:31:29 +0800 Received: from mtkmbs13n2.mediatek.inc (172.21.101.108) by mtkmbs13n2.mediatek.inc (172.21.101.108) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Wed, 7 Feb 2024 11:31:29 +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; Wed, 7 Feb 2024 11:31:29 +0800 From: Mingyen Hsieh To: , CC: , , , , , , , , , , , , , , Ming Yen Hsieh Subject: [PATCH] wifi: mt76: fix the issue of missing txpwr settings from ch153 to ch177 Date: Wed, 7 Feb 2024 11:31:23 +0800 Message-ID: <20240207033123.26551-1-mingyen.hsieh@mediatek.com> X-Mailer: git-send-email 2.18.0 Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain From: Ming Yen Hsieh Because the number of channels to be configured is calculated using the %, and it results in 0 when there's an exact division, this leads to some channels not having their tx power configured. Fixes: 7801da338856 ("wifi: mt76: mt7921: enable set txpower for UNII-4") Signed-off-by: Ming Yen Hsieh --- drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c index 7602f979297d..34693fc3a1cc 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c @@ -2104,7 +2104,7 @@ mt76_connac_mcu_rate_txpower_band(struct mt76_phy *phy, int j, msg_len, num_ch; struct sk_buff *skb; - num_ch = i == batch_size - 1 ? n_chan % batch_len : batch_len; + num_ch = i == batch_size - 1 ? n_chan - i * batch_len : batch_len; msg_len = sizeof(tx_power_tlv) + num_ch * sizeof(sku_tlbv); skb = mt76_mcu_msg_alloc(dev, NULL, msg_len); if (!skb) { -- 2.18.0