[PATCH ath-next 2/3] wifi: ath12k: Fix frequency range in driver

Vasanthakumar Thiagarajan vasanthakumar.thiagarajan at oss.qualcomm.com
Tue Apr 15 21:09:50 PDT 2025



On 4/8/2025 9:51 AM, Rajat Soni wrote:
> From: Aditya Kumar Singh <aditya.kumar.singh at oss.qualcomm.com>
> 
> During the initial WMI exchange, the firmware updates the
> hardware-supported start and end frequencies in the
> ath12k_wmi_hal_reg_capabilities_ext_arg structure. These frequencies,
> being hardware-supported, may not always align with the current
> regulatory operating frequencies. When operating as multiple grouped
> hardwares under a single wiphy, the driver advertises these values
> directly to the upper layer in the per-radio frequency range,
> which can be misleading.
> 
> Sample output snippet from iw phyX info command -
> 
> [..]
> Supported wiphy radios:
>            * Idx 0:
>                    Frequency Range: 2312 MHz - 2732 MHz
> 		 [..]
> 
>            * Idx 1:
>                    Frequency Range: 5150 MHz - 5330 MHz
> 		 [..]
> [..]
> 
> The frequency range displayed above is incorrect because the driver
> directly advertises the hardware-supported values to the upper layer.
> 
> The driver is aware of the current operating regulatory rules, and
> hence it can use this information to determine the final operating
> start and end frequencies.
> 
> To resolve this issue, add support to store the start and end
> frequencies received during the regulatory update event.
> Then, intersect these with the hardware-supported start and
> end frequencies, and finally, advertise the intersected values to the
> upper layer.
> 
> Sample output snippet from iw phyX info command after the fix -
> 
> [..]
> Supported wiphy radios:
>            * Idx 0:
>                    Frequency Range: 2402 MHz - 2472 MHz
> 		 [..]
> 
>            * Idx 1:
>                    Frequency Range: 5170 MHz - 5330 MHz
> 		 [..]
> [..]
> 
> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1
> Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3
> 
> Signed-off-by: Aditya Kumar Singh <aditya.kumar.singh at oss.qualcomm.com>
> Co-developed-by: Rajat Soni <quic_rajson at quicinc.com>
> Signed-off-by: Rajat Soni <quic_rajson at quicinc.com>
> ---
>   drivers/net/wireless/ath/ath12k/core.h |  9 ++++++
>   drivers/net/wireless/ath/ath12k/mac.c  | 39 ++++++++++++++++++--------
>   drivers/net/wireless/ath/ath12k/reg.c  | 13 +++++++++
>   3 files changed, 49 insertions(+), 12 deletions(-)
> 

You may need to rebase the series

Applying: wifi: ath12k: Add helper function ath12k_mac_update_freq_range()
Applying: wifi: ath12k: Fix frequency range in driver
error: patch failed: drivers/net/wireless/ath/ath12k/core.h:1122
error: drivers/net/wireless/ath/ath12k/core.h: patch does not apply
Patch failed at 0002 wifi: ath12k: Fix frequency range in driver



More information about the ath12k mailing list