wifi: ath12k: fix radar detection in 160 MHz
authorManish Dharanenthiran <quic_mdharane@quicinc.com>
Tue, 5 Sep 2023 13:29:41 +0000 (16:29 +0300)
committerKalle Valo <quic_kvalo@quicinc.com>
Wed, 20 Sep 2023 13:14:41 +0000 (16:14 +0300)
commit3f53624f74f4ccd645adfdb9a6b9f1cd97ec5623
treeb8c93b714ad3afbd5a7a272eb57c39144bbe7728
parent8b8b990fe495e9be057249e1651b59b5ebacf2ef
wifi: ath12k: fix radar detection in 160 MHz

Radar detection fails in the secondary 80 MHz when the
the AP's primary 80 MHz is in non-DFS region in 160 MHz.

This is due to WMI channel flag WMI_CHAN_INFO_DFS_FREQ2 is not set
properly in case of the primary 80 MHz is in non-DFS region.
HALPHY detects the radar pulses in the secondary 80 MHz only when
WMI_CHAN_INFO_DFS_FREQ2 is set.

Fix this issue by setting WMI channel flag WMI_CHAN_INFO_DFS_FREQ2
based on the radar_enabled flag from the channel context.

Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1

Signed-off-by: Manish Dharanenthiran <quic_mdharane@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20230802085852.19821-3-quic_mdharane@quicinc.com
drivers/net/wireless/ath/ath12k/mac.c