Message ID | 20250204053451.2703834-2-quic_surapk@quicinc.com (mailing list archive) |
---|---|
State | New |
Delegated to: | Jeff Johnson |
Headers | show |
Series | wifi: ath12k: Pass correct channel frequency parameters | expand |
On 2/4/25 11:04, Suraj P Kizhakkethil wrote: > 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<quic_surapk@quicinc.com> > --- Reviewed-by: Aditya Kumar Singh <aditya.kumar.singh@oss.qualcomm.com>
diff --git a/drivers/net/wireless/ath/ath12k/wmi.c b/drivers/net/wireless/ath/ath12k/wmi.c index f934d49acee6..848a65268194 100644 --- a/drivers/net/wireless/ath/ath12k/wmi.c +++ b/drivers/net/wireless/ath/ath12k/wmi.c @@ -1037,14 +1037,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) + if (arg->mode == MODE_11BE_EHT160) { + if (arg->freq > arg->band_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(arg->band_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)
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 <quic_surapk@quicinc.com> --- drivers/net/wireless/ath/ath12k/wmi.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-)