On 4/18/2025 8:25 AM, Baochen Qiang wrote:
Currently for 6 GHz reg rules from WMI_REG_CHAN_LIST_CC_EXT_EVENTID event, host chooses low power indoor type rule regardless of interface type or AP's power type, which is not correct. This series change to choose proper rule based on interface type and AP's power type. When connecting to a 6 GHz AP, currently host sends power settings to firmware over WMI_PDEV_PARAM_TXPOWER_LIMIT2G/WMI_PDEV_PARAM_TXPOWER_LIMIT5G commands. Actually there is a new command WMI_VDEV_SET_TPC_POWER_CMDID with which host can send more detailed parameter than with those two. So add support for this interface. Before above changes, some fix and refactor are done to do some preparation for following patches. Signed-off-by: Baochen Qiang <quic_bqiang@xxxxxxxxxxx> --- --- Baochen Qiang (15): wifi: ath12k: fix a possible dead lock caused by ab->base_lock wifi: ath12k: refactor ath12k_reg_chan_list_event() wifi: ath12k: refactor ath12k_reg_build_regd() wifi: ath12k: add support to select 6 GHz regulatory type wifi: ath12k: move reg info handling outside wifi: ath12k: store reg info for later use wifi: ath12k: determine interface mode in _op_add_interface() wifi: ath12k: update regulatory rules when interface added wifi: ath12k: update regulatory rules when connection established wifi: ath12k: save power spectral density(PSD) of regulatory rule wifi: ath12k: add parse of transmit power envelope element wifi: ath12k: save max transmit power in vdev start response event from firmware wifi: ath12k: fill parameters for vdev set TPC power WMI command wifi: ath12k: add handler for WMI_VDEV_SET_TPC_POWER_CMDID wifi: ath12k: use WMI_VDEV_SET_TPC_POWER_CMDID when EXT_TPC_REG_SUPPORT for 6 GHz drivers/net/wireless/ath/ath12k/core.h | 6 + drivers/net/wireless/ath/ath12k/mac.c | 527 ++++++++++++++++++++++++++++++--- drivers/net/wireless/ath/ath12k/mac.h | 43 +++ drivers/net/wireless/ath/ath12k/reg.c | 209 +++++++++++-- drivers/net/wireless/ath/ath12k/reg.h | 18 +- drivers/net/wireless/ath/ath12k/wmi.c | 198 +++++++------ drivers/net/wireless/ath/ath12k/wmi.h | 62 ++++ 7 files changed, 905 insertions(+), 158 deletions(-)
Reviewed-by: Vasanthakumar Thiagarajan <vasanthakumar.thiagarajan@xxxxxxxxxxxxxxxx>