From mboxrd@z Thu Jan 1 00:00:00 1970 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 E4F0D223DD0; Mon, 23 Jun 2025 22:12:39 +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=1750716760; cv=none; b=Ieesn9Fwc4RVu35g6v+QOSIww6RPTw78mlyfvpuObD2mGiBBCgJKqaZegUJaw21XPdqtz5ncz9hxlBUegrxBc1Jv3OGqwsYecjVdyUoBho16IJ264+UGqkErHma/J/yLDx1lesNek+fpkuvdp2n8MnD0DDD6f+NSHbDGOF058ME= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750716760; c=relaxed/simple; bh=kD3+dMd/xyihxO4zFJNYuRAaBUG2XdoxEQt8op7J4og=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=I+Y81maX3mBjTDHP1nxihh62KIcKWbIcregSTVqBzRKh7WXEru9Clu4Z36nxCt8tgHO7k87+zF1NhhYsXb08LeXuG3kfs0pHOYzUVKxQb4xYJJ0y+PWKrOLGmwtkXGwEGeIvQXTDyIPrHyu+An6CeypwUJ38wmotdR5tKWd+xps= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=0pDp9Myp; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="0pDp9Myp" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3FB1CC4CEF2; Mon, 23 Jun 2025 22:12:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1750716759; bh=kD3+dMd/xyihxO4zFJNYuRAaBUG2XdoxEQt8op7J4og=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0pDp9Myp/LuKDfCmKVzrBxyQm2o41WoGuICE2MJBSqtYuoHprl4R0ZrwmiOSEyrg+ abdSJyoWL3+EEl0O28iq8VIa4FfOrvwlXsqlWJmeTyjY8mBaveg4nLwnPAgq86fzC4 hsTrv19uKqW90hjsRWTcfvneGuKfSy4FopWLKaCo= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Suraj P Kizhakkethil , Aditya Kumar Singh , Jeff Johnson , Sasha Levin Subject: [PATCH 6.12 280/414] wifi: ath12k: Pass correct values of center freq1 and center freq2 for 160 MHz Date: Mon, 23 Jun 2025 15:06:57 +0200 Message-ID: <20250623130649.020853645@linuxfoundation.org> X-Mailer: git-send-email 2.50.0 In-Reply-To: <20250623130642.015559452@linuxfoundation.org> References: <20250623130642.015559452@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Suraj P Kizhakkethil [ Upstream commit b1b01e46a3db5ad44d1e4691ba37c1e0832cd5cf ] Currently, for 160 MHz bandwidth, center frequency1 and center frequency2 are not passed correctly to the firmware. Set center frequency1 as the center frequency of the primary 80 MHz channel segment and center frequency2 as the center frequency of the 160 MHz channel and pass the values to the firmware. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Signed-off-by: Suraj P Kizhakkethil Reviewed-by: Aditya Kumar Singh Link: https://patch.msgid.link/20250304095315.3050325-2-quic_surapk@quicinc.com Signed-off-by: Jeff Johnson Signed-off-by: Sasha Levin --- drivers/net/wireless/ath/ath12k/wmi.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/ath/ath12k/wmi.c b/drivers/net/wireless/ath/ath12k/wmi.c index c38d3493c6911..5c2130f77dac6 100644 --- a/drivers/net/wireless/ath/ath12k/wmi.c +++ b/drivers/net/wireless/ath/ath12k/wmi.c @@ -980,14 +980,24 @@ int ath12k_wmi_vdev_down(struct ath12k *ar, u8 vdev_id) static void ath12k_wmi_put_wmi_channel(struct ath12k_wmi_channel_params *chan, struct wmi_vdev_start_req_arg *arg) { + u32 center_freq1 = arg->band_center_freq1; + memset(chan, 0, sizeof(*chan)); chan->mhz = cpu_to_le32(arg->freq); - chan->band_center_freq1 = cpu_to_le32(arg->band_center_freq1); - if (arg->mode == MODE_11AC_VHT80_80) + chan->band_center_freq1 = cpu_to_le32(center_freq1); + if (arg->mode == MODE_11BE_EHT160) { + if (arg->freq > center_freq1) + chan->band_center_freq1 = cpu_to_le32(center_freq1 + 40); + else + chan->band_center_freq1 = cpu_to_le32(center_freq1 - 40); + + chan->band_center_freq2 = cpu_to_le32(center_freq1); + } else if (arg->mode == MODE_11BE_EHT80_80) { chan->band_center_freq2 = cpu_to_le32(arg->band_center_freq2); - else + } else { chan->band_center_freq2 = 0; + } chan->info |= le32_encode_bits(arg->mode, WMI_CHAN_INFO_MODE); if (arg->passive) -- 2.39.5