wifi: ath12k: Pass correct values of center freq1 and center freq2 for 320 MHz
authorSriram R <quic_srirrama@quicinc.com>
Tue, 4 Mar 2025 09:53:15 +0000 (15:23 +0530)
committerJeff Johnson <jeff.johnson@oss.qualcomm.com>
Mon, 17 Mar 2025 17:24:00 +0000 (10:24 -0700)
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>
Link: https://patch.msgid.link/20250304095315.3050325-3-quic_surapk@quicinc.com
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
drivers/net/wireless/ath/ath12k/wmi.c

index bed8c24aef204b6405c65970f080da8cfcbe8a67..d6068ae10421b2236853a0ed1a754f23e1a0f84c 100644 (file)
@@ -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(center_freq1);
-       if (arg->mode == MODE_11BE_EHT160) {
+       if (arg->mode == MODE_11BE_EHT320) {
+               if (arg->freq > 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(center_freq1);
+
+       } else if (arg->mode == MODE_11BE_EHT160) {
                if (arg->freq > center_freq1)
                        chan->band_center_freq1 = cpu_to_le32(center_freq1 + 40);
                else