diff mbox series

[2/2] wifi: ath12k: Pass correct values of center freq1 and center freq2 for 320 MHz

Message ID 20250204053451.2703834-3-quic_surapk@quicinc.com (mailing list archive)
State New
Delegated to: Jeff Johnson
Headers show
Series wifi: ath12k: Pass correct channel frequency parameters | expand

Commit Message

Suraj P Kizhakkethil Feb. 4, 2025, 5:34 a.m. UTC
From: Sriram R <quic_srirrama@quicinc.com>

Currently, for 320 MHz bandwidth, center frequency1 and
center frequency2 are not passed correctly to the firmware.
Set center frequency1 as the center frequency of the
primary 160 MHz channel segment and center frequency2 as the center
frequency of the 320 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: Sriram R <quic_srirrama@quicinc.com>
Signed-off-by: Suraj P Kizhakkethil <quic_surapk@quicinc.com>
---
 drivers/net/wireless/ath/ath12k/wmi.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

Comments

Aditya Kumar Singh Feb. 4, 2025, 6:31 a.m. UTC | #1
On 2/4/25 11:04, Suraj P Kizhakkethil wrote:
> From: Sriram R <quic_srirrama@quicinc.com>
> 
> Currently, for 320 MHz bandwidth, center frequency1 and
> center frequency2 are not passed correctly to the firmware.
> Set center frequency1 as the center frequency of the
> primary 160 MHz channel segment and center frequency2 as the center
> frequency of the 320 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: Sriram R <quic_srirrama@quicinc.com>
> Signed-off-by: Suraj P Kizhakkethil <quic_surapk@quicinc.com>
> ---

Reviewed-by: Aditya Kumar Singh <aditya.kumar.singh@oss.qualcomm.com>
diff mbox series

Patch

diff --git a/drivers/net/wireless/ath/ath12k/wmi.c b/drivers/net/wireless/ath/ath12k/wmi.c
index 848a65268194..982bdfc4902f 100644
--- a/drivers/net/wireless/ath/ath12k/wmi.c
+++ b/drivers/net/wireless/ath/ath12k/wmi.c
@@ -1043,7 +1043,15 @@  static void ath12k_wmi_put_wmi_channel(struct ath12k_wmi_channel_params *chan,
 
 	chan->mhz = cpu_to_le32(arg->freq);
 	chan->band_center_freq1 = cpu_to_le32(arg->band_center_freq1);
-	if (arg->mode == MODE_11BE_EHT160) {
+	if (arg->mode == MODE_11BE_EHT320) {
+		if (arg->freq > arg->band_center_freq1)
+			chan->band_center_freq1 = cpu_to_le32(center_freq1 + 80);
+		else
+			chan->band_center_freq1 = cpu_to_le32(center_freq1 - 80);
+
+		chan->band_center_freq2 = cpu_to_le32(arg->band_center_freq1);
+
+	} else if (arg->mode == MODE_11BE_EHT160) {
 		if (arg->freq > arg->band_center_freq1)
 			chan->band_center_freq1 = cpu_to_le32(center_freq1 + 40);
 		else