3f7f05e9acc3b00db5234a929a4ecd3846bea295
[openwrt/openwrt.git] /
1 From 5e44b181bec8e2fe3826033360fc1a42bb432191 Mon Sep 17 00:00:00 2001
2 From: Sriram R <quic_srirrama@quicinc.com>
3 Date: Tue, 4 Mar 2025 15:23:15 +0530
4 Subject: [PATCH 2/2] wifi: ath12k: Pass correct values of center freq1 and
5 center freq2 for 320 MHz
6
7 Currently, for 320 MHz bandwidth, center frequency1 and
8 center frequency2 are not passed correctly to the firmware.
9 Set center frequency1 as the center frequency of the
10 primary 160 MHz channel segment and center frequency2 as the center
11 frequency of the 320 MHz channel and pass the values
12 to the firmware.
13
14 Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1
15
16 Signed-off-by: Sriram R <quic_srirrama@quicinc.com>
17 Signed-off-by: Suraj P Kizhakkethil <quic_surapk@quicinc.com>
18 Reviewed-by: Aditya Kumar Singh <aditya.kumar.singh@oss.qualcomm.com>
19 Link: https://patch.msgid.link/20250304095315.3050325-3-quic_surapk@quicinc.com
20 Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
21 ---
22 drivers/net/wireless/ath/ath12k/wmi.c | 10 +++++++++-
23 1 file changed, 9 insertions(+), 1 deletion(-)
24
25 --- a/drivers/net/wireless/ath/ath12k/wmi.c
26 +++ b/drivers/net/wireless/ath/ath12k/wmi.c
27 @@ -1006,7 +1006,15 @@ static void ath12k_wmi_put_wmi_channel(s
28
29 chan->mhz = cpu_to_le32(arg->freq);
30 chan->band_center_freq1 = cpu_to_le32(center_freq1);
31 - if (arg->mode == MODE_11BE_EHT160) {
32 + if (arg->mode == MODE_11BE_EHT320) {
33 + if (arg->freq > center_freq1)
34 + chan->band_center_freq1 = cpu_to_le32(center_freq1 + 80);
35 + else
36 + chan->band_center_freq1 = cpu_to_le32(center_freq1 - 80);
37 +
38 + chan->band_center_freq2 = cpu_to_le32(center_freq1);
39 +
40 + } else if (arg->mode == MODE_11BE_EHT160) {
41 if (arg->freq > center_freq1)
42 chan->band_center_freq1 = cpu_to_le32(center_freq1 + 40);
43 else