Message ID | 20250418-ath12k-6g-lp-vlp-v1-12-c869c86cad60@quicinc.com |
---|---|
State | New |
Headers | show |
Series | wifi: ath12k: add support for 6 GHz station for various modes : LPI, SP and VLP | expand |
diff --git a/drivers/net/wireless/ath/ath12k/core.h b/drivers/net/wireless/ath/ath12k/core.h index 9f64fa00b131357c5c1b75f4eacae912f563416d..40fdc9cf3f8abbca4f60a36455e1344a1d63ddc9 100644 --- a/drivers/net/wireless/ath/ath12k/core.h +++ b/drivers/net/wireless/ath/ath12k/core.h @@ -786,6 +786,8 @@ struct ath12k { u8 ftm_msgref; struct ath12k_fw_stats fw_stats; unsigned long last_tx_power_update; + + s8 max_allowed_tx_power; }; struct ath12k_hw { diff --git a/drivers/net/wireless/ath/ath12k/wmi.c b/drivers/net/wireless/ath/ath12k/wmi.c index 385f59077050ce89aa9aab19b0ffc9af98e35549..6fa7cba35ab8f6d2420213c452a2722bed57b80a 100644 --- a/drivers/net/wireless/ath/ath12k/wmi.c +++ b/drivers/net/wireless/ath/ath12k/wmi.c @@ -6342,13 +6342,14 @@ static void ath12k_vdev_start_resp_event(struct ath12k_base *ab, struct sk_buff ar->last_wmi_vdev_start_status = 0; status = le32_to_cpu(vdev_start_resp.status); - if (WARN_ON_ONCE(status)) { ath12k_warn(ab, "vdev start resp error status %d (%s)\n", status, ath12k_wmi_vdev_resp_print(status)); ar->last_wmi_vdev_start_status = status; } + ar->max_allowed_tx_power = (s8)le32_to_cpu(vdev_start_resp.max_allowed_tx_power); + complete(&ar->vdev_setup_done); rcu_read_unlock(); diff --git a/drivers/net/wireless/ath/ath12k/wmi.h b/drivers/net/wireless/ath/ath12k/wmi.h index 5f0f9f120497c5746ae9175c3fa9e119a61ab91c..e4d383c090a60461b1af4529c6d5ef2fa4a2f2e9 100644 --- a/drivers/net/wireless/ath/ath12k/wmi.h +++ b/drivers/net/wireless/ath/ath12k/wmi.h @@ -4162,6 +4162,7 @@ struct wmi_vdev_start_resp_event { }; __le32 cfgd_tx_streams; __le32 cfgd_rx_streams; + __le32 max_allowed_tx_power; } __packed; /* VDEV start response status codes */
Save the max transmit power received in the vdev start response event from firmware. A subsequent patch will use this to calculate the final power 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> --- drivers/net/wireless/ath/ath12k/core.h | 2 ++ drivers/net/wireless/ath/ath12k/wmi.c | 3 ++- drivers/net/wireless/ath/ath12k/wmi.h | 1 + 3 files changed, 5 insertions(+), 1 deletion(-)