Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2383964lqp; Sun, 24 Mar 2024 17:02:38 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVZ7CMbB+gKKt9NvFSyekbqZwOSuxo3XSAIQcj/OMEBlVTvv13O0zIDot7UiLSFe08r1Yvlq/xH25LMWlcN/9/c8xIo8sHynRsZTg7HzA== X-Google-Smtp-Source: AGHT+IGS5XlsLGYuxaDvv63iiotmYnm/H3V6fOvFxFHJYvy276i3hRfwYH0w+2hNSr92TIhfxTAO X-Received: by 2002:a05:6a21:329a:b0:1a3:3260:7555 with SMTP id yt26-20020a056a21329a00b001a332607555mr5556190pzb.11.1711324958516; Sun, 24 Mar 2024 17:02:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711324958; cv=pass; d=google.com; s=arc-20160816; b=an6MBM88UGMvoTCjkqrmxzgmjQ2V5sYEnHPDTMdNmMQ/sVeQzIdaSRjBPe9cP9Io8i nYvgf1AOS1AK+jnKkwAMVSe0wUTfAbWyP9OegOtr0C/JxJJhlRzofAo/pQgZ12iwG9Ym 1pUVISM0OnlZ2nxORG7/+5HRVxwYx+4VsL0rVusbLdAcRPnmagFC0tJHBPiTt6nAyYNv TG4LchnTfQii3PeLPlOA2gIWcppB2e/AErtaUZGf0ed6OgYWTCExidJwNwkivb8ZYCWP hwj6h/7tz2spjGWUjNz5W44vM1Oo6UOskRRPIXvupndRW475iAgsnFfB0SnL7BKrUlwq x+8g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=G6K0IIb87YQkB6xATZKdIGenUL46OhqqqIblpX7PJEc=; fh=t2RbNP99dZ5LTGBwG+uUzFRqJO1HX3ssXVXZXq+ItZo=; b=ouoKvDMhW3MPEfRYDp4bzSutWVoE/6VWSj8IS6R+IOBzUX9D+/5a9lBNCTwpMfRM2j 5GtQUSLsPGQ1UJt00LDPOyRjseI+am39U70rQg8qiOlukZi7vO3kh9DR8BQqKFsxViXf 3I/W9CDu5lGILsE5BsVI5H2YOO0pg1C/8z353+qybFBPZlBRlT6Q8aY9TSnBO0hiKBxx GulOMzbsRWvXadvedEvbCMIfNXGiCgKbabbtf5CWiBAmTsI2w7kPK2xVcyKgY1CmS8gq o36AgOUQHj46PtEIe+f82BwuueWlrRjOOhBN0tXiP13zrrjZ4/KCDUQAHV7uo1xVLXX8 FN2g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ru6Pmuwf; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113142-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113142-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id z5-20020a17090a980500b0029acb9d5bffsi6352798pjo.189.2024.03.24.17.02.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Mar 2024 17:02:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-113142-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ru6Pmuwf; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113142-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113142-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 96FFB2838DA for ; Sun, 24 Mar 2024 23:29:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7CFD916F281; Sun, 24 Mar 2024 22:39:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ru6Pmuwf" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 6DEAD13C3D2; Sun, 24 Mar 2024 22:39:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711319949; cv=none; b=rwMXYVNyI5vTag/Dgp5uXEK2SIDkWyOYSpAXCUksuHSXJq8/mda0T0HDYiOlgfQOfOmZpsbqqXRD/3HBcqziv+2AsJjwKJmwIEPdLXrM+0cxUHGiWezJmFL1cxb5HKeocdIz+YL1PPJf3m+GLzezu+Q+2Yg7kwMhk8LObOE1htI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711319949; c=relaxed/simple; bh=NexbagmyqgKdVb4XpfNijJu/lL6hIr1kSEOaWacCw/0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=dC/pxSCgYUt53U4hxY7QCJR1ADU391oAAmbgjpn7dKNO++LFlZHZ+qXlq/B/fqtL8d77kbQmt2HC8C/uX1G8cU29W0kPetsixT6YU0srHgFPx1d+3kfqb0ffutz/5Bg1PX03sqBmO4Zq6BnNWDV5YSpjc4URhBodk2SAN5Zla0E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ru6Pmuwf; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id A9B76C433A6; Sun, 24 Mar 2024 22:39:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711319949; bh=NexbagmyqgKdVb4XpfNijJu/lL6hIr1kSEOaWacCw/0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ru6Pmuwfdko1BREqzTAb0r8/TcwrvDjxQkaaj0stU6H47USgjIj+NGj9kgCm/5K6n Bl7EhL7R/9ga3iiCZtFek/z9QGjlTACU52G5RIZ4Hw11lROGwpLDudvW3IJZv/hCgx ZPz+4mnbeW68ngn9Leg40m8WbHWhnBLdTF03R0RWjSPp01f6NgRbRhRdkEaqQQcIIH tqaersiiXPEYgLUHaQSdUQWwWhWsOb+bjmT+5lO83TG2Y0hiPUbkK1XDOeNOh8xImv LVH7ZJ4qmts84DUA+u209CjXRWWFzXlHyYjEQ1Mjbr/2uIbaRAMkYEa/utoXpc9yab VD0WfXFV/imjA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Ming Yen Hsieh , Felix Fietkau , Sasha Levin Subject: [PATCH 6.8 255/715] wifi: mt76: fix the issue of missing txpwr settings from ch153 to ch177 Date: Sun, 24 Mar 2024 18:27:14 -0400 Message-ID: <20240324223455.1342824-256-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324223455.1342824-1-sashal@kernel.org> References: <20240324223455.1342824-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Ming Yen Hsieh [ Upstream commit e9a46175a79fbc591c48d433020444b8fa2750ee ] 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 Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin --- 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 ea7ffa16a4b12..ae19174b46ee5 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c @@ -2101,7 +2101,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.43.0