wifi: ath12k: refactor ath12k_reg_build_regd()
authorBaochen Qiang <quic_bqiang@quicinc.com>
Fri, 18 Apr 2025 02:55:36 +0000 (10:55 +0800)
committerJeff Johnson <jeff.johnson@oss.qualcomm.com>
Fri, 16 May 2025 19:38:52 +0000 (12:38 -0700)
commitc96bce15c568fdb8edd29b35aeb0f20c2524108c
treeea962bbef51500fbf6eac9979144c3b40fdb38d0
parent9e8e55c5832d4f905d7ca306f976669d523e9ff2
wifi: ath12k: refactor ath12k_reg_build_regd()

Currently we pass intersect flag to tell ath12k_reg_build_regd() whether
regulatory rulse are intersected. This flag is determined in
ath12k_reg_handle_chan_list() and has no other users.

Move related logic into ath12k_reg_build_regd() to make code clear. Also
relocate ath12k_reg_is_world_alpha() to avoid forward declaration, and
refine it for code simplicity.

Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3

Signed-off-by: Baochen Qiang <quic_bqiang@quicinc.com>
Reviewed-by: Vasanthakumar Thiagarajan <vasanthakumar.thiagarajan@oss.qualcomm.com>
Link: https://patch.msgid.link/20250418-ath12k-6g-lp-vlp-v1-3-c869c86cad60@quicinc.com
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
drivers/net/wireless/ath/ath12k/reg.c
drivers/net/wireless/ath/ath12k/reg.h