qcacld-3.0: Get tx power value from each mac

When user space use "iw dev" to get tx power info,
driver send WMI_REQUEST_STATS_CMDID to fw,
fw update tx power info with two events, usually we
parse the last event, and maybe get invalid value.
Filter invalid value for each event, and get valid
tx power value from the mac which the AP/STA mode work.

Change-Id: I2411bb87e03fe385759852b028819e19a055b7f3
CRs-Fixed: 3474361
This commit is contained in:
chunquan luo
2023-04-16 19:36:48 -07:00
committed by Madan Koyyalamudi
부모 8d82bbedc1
커밋 57696567aa
5개의 변경된 파일53개의 추가작업 그리고 1개의 파일을 삭제

파일 보기

@@ -2849,6 +2849,16 @@ void policy_mgr_checkn_update_hw_mode_single_mac_mode(
*/
void policy_mgr_dump_connection_status_info(struct wlan_objmgr_psoc *psoc);
/**
* policy_mgr_mode_get_macid_by_vdev_id() - get macid from vdev_id
* @psoc: PSOC object information
* @vdev_id: vdev id to get PCL
*
* Return: mac id
*/
uint32_t policy_mgr_mode_get_macid_by_vdev_id(struct wlan_objmgr_psoc *psoc,
uint32_t vdev_id);
/**
* policy_mgr_mode_specific_vdev_id() - provides the
* vdev id of the pecific mode

파일 보기

@@ -3166,6 +3166,36 @@ uint32_t policy_mgr_mode_specific_vdev_id(struct wlan_objmgr_psoc *psoc,
return vdev_id;
}
uint32_t policy_mgr_mode_get_macid_by_vdev_id(struct wlan_objmgr_psoc *psoc,
uint32_t vdev_id)
{
uint32_t conn_index = 0;
uint32_t mac_id = 0xFF;
enum policy_mgr_con_mode mode;
struct policy_mgr_psoc_priv_obj *pm_ctx;
pm_ctx = policy_mgr_get_context(psoc);
if (!pm_ctx) {
policy_mgr_err("Invalid Context");
return vdev_id;
}
mode = policy_mgr_con_mode_by_vdev_id(psoc, vdev_id);
qdf_mutex_acquire(&pm_ctx->qdf_conc_list_lock);
for (conn_index = 0; conn_index < MAX_NUMBER_OF_CONC_CONNECTIONS;
conn_index++) {
if ((pm_conc_connection_list[conn_index].mode == mode) &&
pm_conc_connection_list[conn_index].in_use &&
vdev_id == pm_conc_connection_list[conn_index].vdev_id) {
mac_id = pm_conc_connection_list[conn_index].mac;
break;
}
}
qdf_mutex_release(&pm_ctx->qdf_conc_list_lock);
return mac_id;
}
uint32_t policy_mgr_mode_specific_connection_count(
struct wlan_objmgr_psoc *psoc,
enum policy_mgr_con_mode mode,