mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 12:25:00 -04:00
qcacld-3.0: Fix to halve tx power received from TPE IE
AP advertises TPE IE Tx power as 8-bit unsigned int. STA needs to convert it into an 8-bit 2s complement signed integer in the range –64 dBm to 63 dBm with a 0.5 dB step. Thus, halve the tx power received from AP's TPE IE. Change-Id: Ibd3227a2f11f230b164af3c65a65f5e61879e25d CRs-Fixed: 3313617
This commit is contained in:
parent
544a2da64f
commit
561efdbc5c
1 changed files with 9 additions and 2 deletions
|
|
@ -2033,7 +2033,7 @@ void lim_calculate_tpc(struct mac_context *mac,
|
|||
qdf_freq_t oper_freq, start_freq = 0;
|
||||
struct ch_params ch_params;
|
||||
struct vdev_mlme_obj *mlme_obj;
|
||||
uint8_t tpe_power;
|
||||
int8_t tpe_power;
|
||||
bool skip_tpe = false;
|
||||
|
||||
mlme_obj = wlan_vdev_mlme_get_cmpt_obj(session->vdev);
|
||||
|
|
@ -2156,7 +2156,14 @@ void lim_calculate_tpc(struct mac_context *mac,
|
|||
tpe_power = mlme_obj->reg_tpc_obj.eirp_power;
|
||||
else
|
||||
tpe_power = mlme_obj->reg_tpc_obj.tpe[i];
|
||||
max_tx_power = QDF_MIN(max_tx_power, (int8_t)tpe_power);
|
||||
/**
|
||||
* AP advertises TPE IE tx power as 8-bit unsigned int.
|
||||
* STA needs to convert it into an 8-bit 2s complement
|
||||
* signed integer in the range –64 dBm to 63 dBm with a
|
||||
* 0.5 dB step
|
||||
*/
|
||||
tpe_power /= 2;
|
||||
max_tx_power = QDF_MIN(max_tx_power, tpe_power);
|
||||
pe_debug("TPE: %d", tpe_power);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue