]> www.infradead.org Git - users/jedix/linux-maple.git/commit
wifi: ath12k: fix tx power, max reg power update to firmware
authorSathishkumar Muruganandam <quic_murugana@quicinc.com>
Mon, 9 Sep 2024 07:30:49 +0000 (13:00 +0530)
committerJeff Johnson <jeff.johnson@oss.qualcomm.com>
Wed, 8 Jan 2025 00:29:59 +0000 (16:29 -0800)
commit3540bba855b4b422e8b977d11aa8173ccb4f089d
tree8db969bb94b1a009957026c022cdf4b3ce63eebe
parent2d64da9ed5d8cee44a11ed3872dbfa6a914ee2b2
wifi: ath12k: fix tx power, max reg power update to firmware

Currently, when the vdev start WMI cmd is sent from host, vdev related
parameters such as max_reg_power, max_power, and max_antenna_gain are
multiplied by 2 before being sent to the firmware. This is incorrect
because the firmware uses 1 dBm steps for power calculations.

This leads to incorrect power values being used in the firmware and
radio, potentially causing incorrect behavior.

Fix the update of max_reg_power, max_power, and max_antenna_gain values
in the ath12k_mac_vdev_start_restart function, ensuring accurate
power settings in the firmware by sending these values as-is,
without multiplication.

Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.1.1-00214-QCAHKSWPL_SILICONZ-1
Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3

Signed-off-by: Sathishkumar Muruganandam <quic_murugana@quicinc.com>
Signed-off-by: Santhosh Ramesh <quic_santrame@quicinc.com>
Fixes: d889913205cf ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices")
Acked-by: Kalle Valo <kvalo@kernel.org>
Link: https://patch.msgid.link/20240909073049.3423035-1-quic_santrame@quicinc.com
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
drivers/net/wireless/ath/ath12k/mac.c