]> www.infradead.org Git - users/jedix/linux-maple.git/commit
wifi: ath12k: refactor ath12k_reg_chan_list_event()
authorBaochen Qiang <quic_bqiang@quicinc.com>
Fri, 18 Apr 2025 02:55:35 +0000 (10:55 +0800)
committerJeff Johnson <jeff.johnson@oss.qualcomm.com>
Fri, 16 May 2025 19:38:52 +0000 (12:38 -0700)
commit9e8e55c5832d4f905d7ca306f976669d523e9ff2
treea66fc74ec9d209e170fbac7ce0715d21a2334ad7
parentef115c265a21e3c11deee7f73bd1061775a7bf20
wifi: ath12k: refactor ath12k_reg_chan_list_event()

ath12k_reg_chan_list_event() is doing quite some work: allocate/free
reg_info, parse chan list event and store required info in reg_info,
process reg_info, build regd and queue work item for later processing
etc, which makes it hard to read.

Refactor this function:

1. extract reg_info processing and regd building into a new helper
   ath12k_reg_handle_chan_list().
2. extract reg_info free into a new helper ath12k_reg_reset_reg_info().

Note the refactor also benefit some upcoming patches where these helpers
are getting called.

Also relocate these two helpers and the existing
ath12k_reg_is_world_alpha() to reg.c to reflect what they are doing.
And update fw to firmware while relocating.

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-2-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
drivers/net/wireless/ath/ath12k/wmi.c