qcacld-3.0: Set sta max tx power a valid value instead of zero

For MDM platform, user space don't call ll_stats_get every 3
seconds for station mode, and txpower value will not update.
If we use iw dev to get max tx power value, the value is 0,
and sync with firmware logic, host driver need set valid value
in cmd WMI_VDEV_START_REQUEST_CMDID.

Change-Id: I4a200b3dc517cfc73e90850becd223f7b4a940fb
CRs-Fixed: 3497587
This commit is contained in:
Chunquan Luo
2023-05-30 18:55:13 -07:00
committed by Rahul Choudhary
parent aebe1d8c95
commit 252ca098c3
2 changed files with 21 additions and 2 deletions

View File

@@ -116,7 +116,7 @@ static void tgt_mc_cp_stats_extract_tx_power(struct wlan_objmgr_psoc *psoc,
struct stats_event *ev,
bool is_station_stats)
{
int32_t max_pwr;
int32_t max_pwr = 0;
uint8_t pdev_id;
QDF_STATUS status;
struct wlan_objmgr_pdev *pdev;
@@ -172,7 +172,11 @@ static void tgt_mc_cp_stats_extract_tx_power(struct wlan_objmgr_psoc *psoc,
pdev_mc_stats->max_pwr != ev->pdev_stats[pdev_id].max_pwr)
wlan_son_deliver_tx_power(vdev,
ev->pdev_stats[pdev_id].max_pwr);
max_pwr = pdev_mc_stats->max_pwr = ev->pdev_stats[pdev_id].max_pwr;
if (policy_mgr_mode_get_macid_by_vdev_id(psoc, last_req.vdev_id) ==
ev->mac_seq_num)
max_pwr = pdev_mc_stats->max_pwr =
ev->pdev_stats[pdev_id].max_pwr;
wlan_cp_stats_pdev_obj_unlock(pdev_cp_stats_priv);
if (is_station_stats)
goto end;