wifi: ath12k: Send WMI_VDEV_SET_TPC_POWER_CMD for AP vdev
authorHariharan Basuthkar <quic_hbasuthk@quicinc.com>
Fri, 6 Jun 2025 11:23:16 +0000 (16:53 +0530)
committerJeff Johnson <jeff.johnson@oss.qualcomm.com>
Thu, 26 Jun 2025 23:10:47 +0000 (16:10 -0700)
commita44958c83e52238996a48e7d604167c9b9d0a529
treee6aff9dea8a972ca2e1c3328954ec5ca6dd8d026
parent9903c0986f782dfc511d7638b6f15fb6e8600cd3
wifi: ath12k: Send WMI_VDEV_SET_TPC_POWER_CMD for AP vdev

The power value is 6 dBm on an AP operating on the 6 GHz channel.
This is a very low value.

On 6 GHz, the target computes the EIRP based on the power values sent
in the WMI_VDEV_SET_TPC_POWER_CMD. Currently, this is being sent only
for station interfaces and not for AP interfaces.

Therefore, add AP vdev to the condition in
ath12k_mac_station_supports_tpc() and rename
ath12k_mac_station_supports_tpc() to ath12k_mac_supports_tpc().

For a AP vdev, hardcode ap_power_type as IEEE80211_REG_LPI_AP, which is
filled in the WMI_VDEV_SET_TPC_POWER_CMDID sent to the target.
Currently, LPI is the only supported AP power mode. Since there is
no method currently to set the AP power mode from user-space, the
power mode is hard-coded to LPI.

Retain the existing logic for populating the power mode for a station
vdev.

Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1

Signed-off-by: Hariharan Basuthkar <quic_hbasuthk@quicinc.com>
Reviewed-by: Vasanthakumar Thiagarajan <vasanthakumar.thiagarajan@oss.qualcomm.com>
Link: https://patch.msgid.link/20250606112316.39316-1-quic_hbasuthk@quicinc.com
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
drivers/net/wireless/ath/ath12k/mac.c