Skip to content

Commit 3540bba

Browse files
Sathishkumar Muruganandamjeff-t-johnson
authored andcommitted
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 <[email protected]> Signed-off-by: Santhosh Ramesh <[email protected]> Fixes: d889913 ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices") Acked-by: Kalle Valo <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jeff Johnson <[email protected]>
1 parent 2d64da9 commit 3540bba

File tree

1 file changed

+3
-3
lines changed
  • drivers/net/wireless/ath/ath12k

1 file changed

+3
-3
lines changed

drivers/net/wireless/ath/ath12k/mac.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8725,9 +8725,9 @@ ath12k_mac_vdev_start_restart(struct ath12k_link_vif *arvif,
87258725
chandef->chan->band,
87268726
ahvif->vif->type);
87278727
arg.min_power = 0;
8728-
arg.max_power = chandef->chan->max_power * 2;
8729-
arg.max_reg_power = chandef->chan->max_reg_power * 2;
8730-
arg.max_antenna_gain = chandef->chan->max_antenna_gain * 2;
8728+
arg.max_power = chandef->chan->max_power;
8729+
arg.max_reg_power = chandef->chan->max_reg_power;
8730+
arg.max_antenna_gain = chandef->chan->max_antenna_gain;
87318731

87328732
arg.pref_tx_streams = ar->num_tx_chains;
87338733
arg.pref_rx_streams = ar->num_rx_chains;

0 commit comments

Comments
 (0)