qcacmn: Add WMI for estimated airtime calculation
Add support for sending WMI command to firmware to measure estimated airtime that a new client will get and populate the result that firmware returns in the ESP IE. Change-Id: Ic5fcb11100ecd0597ba02dfa5512e2f4ff3558c9 CRs-Fixed: 2261469
This commit is contained in:

committed by
nshrivas

parent
ab28071e57
commit
d01ccdf6eb
@@ -1588,6 +1588,10 @@ QDF_STATUS wmi_extract_mumimo_tx_count_ev_param(void *wmi_hdl, void *evt_buf,
|
|||||||
QDF_STATUS wmi_extract_peer_gid_userpos_list_ev_param(void *wmi_hdl,
|
QDF_STATUS wmi_extract_peer_gid_userpos_list_ev_param(void *wmi_hdl,
|
||||||
void *evt_buf, wmi_host_peer_gid_userpos_list_event *param);
|
void *evt_buf, wmi_host_peer_gid_userpos_list_event *param);
|
||||||
|
|
||||||
|
QDF_STATUS
|
||||||
|
wmi_extract_esp_estimate_ev_param(void *wmi_hdl, void *evt_buf,
|
||||||
|
struct esp_estimation_event *param);
|
||||||
|
|
||||||
QDF_STATUS wmi_extract_pdev_caldata_version_check_ev_param(void *wmi_hdl,
|
QDF_STATUS wmi_extract_pdev_caldata_version_check_ev_param(void *wmi_hdl,
|
||||||
void *evt_buf, wmi_host_pdev_check_cal_version_event *param);
|
void *evt_buf, wmi_host_pdev_check_cal_version_event *param);
|
||||||
|
|
||||||
|
@@ -5535,6 +5535,7 @@ typedef enum {
|
|||||||
wmi_debug_fatal_condition_eventid,
|
wmi_debug_fatal_condition_eventid,
|
||||||
#endif /* OL_ATH_SMART_LOGGING */
|
#endif /* OL_ATH_SMART_LOGGING */
|
||||||
wmi_wlan_sar2_result_event_id,
|
wmi_wlan_sar2_result_event_id,
|
||||||
|
wmi_esp_estimate_event_id,
|
||||||
wmi_events_max,
|
wmi_events_max,
|
||||||
} wmi_conv_event_id;
|
} wmi_conv_event_id;
|
||||||
|
|
||||||
@@ -5678,7 +5679,7 @@ typedef enum {
|
|||||||
wmi_pdev_param_tx_ack_timeout,
|
wmi_pdev_param_tx_ack_timeout,
|
||||||
wmi_pdev_param_soft_tx_chain_mask,
|
wmi_pdev_param_soft_tx_chain_mask,
|
||||||
wmi_pdev_param_cck_tx_enable,
|
wmi_pdev_param_cck_tx_enable,
|
||||||
|
wmi_pdev_param_esp_indication_period,
|
||||||
wmi_pdev_param_max,
|
wmi_pdev_param_max,
|
||||||
} wmi_conv_pdev_params_id;
|
} wmi_conv_pdev_params_id;
|
||||||
|
|
||||||
@@ -7738,6 +7739,16 @@ struct sar_limit_event {
|
|||||||
sar_limit_row[MAX_SAR_LIMIT_ROWS_SUPPORTED];
|
sar_limit_row[MAX_SAR_LIMIT_ROWS_SUPPORTED];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* struct esp_estimation_event - esp airtime estimation event
|
||||||
|
* @ac_airtime_percentage: Estimated Airtime
|
||||||
|
* @pdev_id: PDEV_ID of Data
|
||||||
|
*/
|
||||||
|
struct esp_estimation_event {
|
||||||
|
uint32_t ac_airtime_percentage;
|
||||||
|
uint32_t pdev_id;
|
||||||
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* struct wmi_peer_gid_userpos_list_event
|
* struct wmi_peer_gid_userpos_list_event
|
||||||
* @usr_list - User list
|
* @usr_list - User list
|
||||||
|
@@ -1216,6 +1216,10 @@ QDF_STATUS (*extract_mumimo_tx_count_ev_param)(wmi_unified_t wmi_handle,
|
|||||||
QDF_STATUS (*extract_peer_gid_userpos_list_ev_param)(wmi_unified_t wmi_handle,
|
QDF_STATUS (*extract_peer_gid_userpos_list_ev_param)(wmi_unified_t wmi_handle,
|
||||||
void *evt_buf, wmi_host_peer_gid_userpos_list_event *param);
|
void *evt_buf, wmi_host_peer_gid_userpos_list_event *param);
|
||||||
|
|
||||||
|
QDF_STATUS
|
||||||
|
(*extract_esp_estimation_ev_param)(wmi_unified_t wmi_handle, void *evt_buf,
|
||||||
|
struct esp_estimation_event *param);
|
||||||
|
|
||||||
QDF_STATUS (*extract_pdev_caldata_version_check_ev_param)(
|
QDF_STATUS (*extract_pdev_caldata_version_check_ev_param)(
|
||||||
wmi_unified_t wmi_handle,
|
wmi_unified_t wmi_handle,
|
||||||
void *evt_buf, wmi_host_pdev_check_cal_version_event *param);
|
void *evt_buf, wmi_host_pdev_check_cal_version_event *param);
|
||||||
|
@@ -5422,6 +5422,27 @@ QDF_STATUS wmi_extract_peer_gid_userpos_list_ev_param(void *wmi_hdl,
|
|||||||
return QDF_STATUS_E_FAILURE;
|
return QDF_STATUS_E_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wmi_extract_esp_estimate_ev_param() - extract air time from event
|
||||||
|
* @wmi_handle: wmi handle
|
||||||
|
* @evt_buf: pointer to event buffer
|
||||||
|
* @param: Pointer to hold esp event
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
|
||||||
|
*/
|
||||||
|
QDF_STATUS
|
||||||
|
wmi_extract_esp_estimate_ev_param(void *wmi_hdl, void *evt_buf,
|
||||||
|
struct esp_estimation_event *param)
|
||||||
|
{
|
||||||
|
wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
|
||||||
|
|
||||||
|
if (wmi_handle->ops->extract_esp_estimation_ev_param)
|
||||||
|
return wmi_handle->ops->extract_esp_estimation_ev_param(
|
||||||
|
wmi_handle, evt_buf, param);
|
||||||
|
|
||||||
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* wmi_extract_pdev_caldata_version_check_ev_param() - extract caldata
|
* wmi_extract_pdev_caldata_version_check_ev_param() - extract caldata
|
||||||
* from event
|
* from event
|
||||||
|
@@ -6566,9 +6566,30 @@ static QDF_STATUS extract_mumimo_tx_count_ev_param_non_tlv(wmi_unified_t wmi_han
|
|||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* extract_esp_estimation_ev_param_non_tlv() - extract air time from event
|
||||||
|
* @wmi_handle: wmi handle
|
||||||
|
* @evt_buf: pointer to event buffer
|
||||||
|
* @param: Pointer to hold esp event
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS_SUCCESS
|
||||||
|
*/
|
||||||
|
QDF_STATUS extract_esp_estimation_ev_param_non_tlv(
|
||||||
|
wmi_unified_t wmi_handle,
|
||||||
|
void *evt_buf,
|
||||||
|
struct esp_estimation_event *param)
|
||||||
|
{
|
||||||
|
wmi_esp_estimation_event *event = (wmi_esp_estimation_event *)evt_buf;
|
||||||
|
|
||||||
|
param->ac_airtime_percentage = event->ac_airtime_percentage;
|
||||||
|
param->pdev_id = WMI_NON_TLV_DEFAULT_PDEV_ID;
|
||||||
|
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* extract_peer_gid_userpos_list_ev_param_non_tlv() - extract gid user position
|
* extract_peer_gid_userpos_list_ev_param_non_tlv() - extract gid user position
|
||||||
* from event
|
* from event
|
||||||
* @wmi_handle: wmi handle
|
* @wmi_handle: wmi handle
|
||||||
* @param evt_buf: pointer to event buffer
|
* @param evt_buf: pointer to event buffer
|
||||||
* @param param: Pointer to hold peer user position list
|
* @param param: Pointer to hold peer user position list
|
||||||
@@ -8866,6 +8887,8 @@ struct wmi_ops non_tlv_ops = {
|
|||||||
send_dfs_average_radar_params_cmd_non_tlv,
|
send_dfs_average_radar_params_cmd_non_tlv,
|
||||||
.extract_dfs_status_from_fw = extract_dfs_status_from_fw_non_tlv,
|
.extract_dfs_status_from_fw = extract_dfs_status_from_fw_non_tlv,
|
||||||
#endif
|
#endif
|
||||||
|
.extract_esp_estimation_ev_param =
|
||||||
|
extract_esp_estimation_ev_param_non_tlv,
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -9171,6 +9194,8 @@ static void populate_non_tlv_events_id(uint32_t *event_ids)
|
|||||||
event_ids[wmi_host_dfs_status_check_event_id] =
|
event_ids[wmi_host_dfs_status_check_event_id] =
|
||||||
WMI_HOST_DFS_STATUS_CHECK_EVENTID;
|
WMI_HOST_DFS_STATUS_CHECK_EVENTID;
|
||||||
#endif
|
#endif
|
||||||
|
event_ids[wmi_esp_estimate_event_id] =
|
||||||
|
WMI_ESP_ESTIMATE_EVENTID;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -9359,6 +9384,8 @@ static void populate_pdev_param_non_tlv(uint32_t *pdev_param)
|
|||||||
pdev_param[wmi_pdev_param_tx_ack_timeout] = WMI_UNAVAILABLE_PARAM;
|
pdev_param[wmi_pdev_param_tx_ack_timeout] = WMI_UNAVAILABLE_PARAM;
|
||||||
pdev_param[wmi_pdev_param_soft_tx_chain_mask] =
|
pdev_param[wmi_pdev_param_soft_tx_chain_mask] =
|
||||||
WMI_PDEV_PARAM_SOFT_TX_CHAIN_MASK;
|
WMI_PDEV_PARAM_SOFT_TX_CHAIN_MASK;
|
||||||
|
pdev_param[wmi_pdev_param_esp_indication_period] =
|
||||||
|
WMI_PDEV_PARAM_ESP_INDICATION_PERIOD;
|
||||||
pdev_param[wmi_pdev_param_rfkill_enable] = WMI_UNAVAILABLE_PARAM;
|
pdev_param[wmi_pdev_param_rfkill_enable] = WMI_UNAVAILABLE_PARAM;
|
||||||
pdev_param[wmi_pdev_param_hw_rfkill_config] = WMI_UNAVAILABLE_PARAM;
|
pdev_param[wmi_pdev_param_hw_rfkill_config] = WMI_UNAVAILABLE_PARAM;
|
||||||
pdev_param[wmi_pdev_param_low_power_rf_enable] = WMI_UNAVAILABLE_PARAM;
|
pdev_param[wmi_pdev_param_low_power_rf_enable] = WMI_UNAVAILABLE_PARAM;
|
||||||
|
Reference in New Issue
Block a user