qcacmn: Add wmi APIs to extract OCB events data
Add APIs to extract data from wmi event buffer for tlv interface. CRs-Fixed: 2177557 Change-Id: I538c0a9ed4a1d8a4bd8845ab337b16370737ce44
This commit is contained in:
@@ -1095,160 +1095,136 @@ wmi_unified_set_sta_uapsd_auto_trig_cmd(void *wmi_hdl,
|
|||||||
return QDF_STATUS_E_FAILURE;
|
return QDF_STATUS_E_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#ifdef WLAN_FEATURE_DSRC
|
||||||
* wmi_unified_ocb_start_timing_advert() - start sending the timing advertisement
|
QDF_STATUS wmi_unified_ocb_start_timing_advert(struct wmi_unified *wmi_hdl,
|
||||||
* frames on a channel
|
|
||||||
* @wmi_handle: pointer to the wmi handle
|
|
||||||
* @timing_advert: pointer to the timing advertisement struct
|
|
||||||
*
|
|
||||||
* Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
|
|
||||||
*/
|
|
||||||
QDF_STATUS wmi_unified_ocb_start_timing_advert(void *wmi_hdl,
|
|
||||||
struct ocb_timing_advert_param *timing_advert)
|
struct ocb_timing_advert_param *timing_advert)
|
||||||
{
|
{
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
if (wmi_hdl->ops->send_ocb_start_timing_advert_cmd)
|
||||||
|
return wmi_hdl->ops->send_ocb_start_timing_advert_cmd(wmi_hdl,
|
||||||
if (wmi_handle->ops->send_ocb_start_timing_advert_cmd)
|
|
||||||
return wmi_handle->ops->send_ocb_start_timing_advert_cmd(wmi_handle,
|
|
||||||
timing_advert);
|
timing_advert);
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
return QDF_STATUS_E_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
QDF_STATUS wmi_unified_ocb_stop_timing_advert(struct wmi_unified *wmi_hdl,
|
||||||
* wmi_unified_ocb_stop_timing_advert() - stop sending the timing advertisement
|
|
||||||
* frames on a channel
|
|
||||||
* @wmi_handle: pointer to the wmi handle
|
|
||||||
* @timing_advert: pointer to the timing advertisement struct
|
|
||||||
*
|
|
||||||
* Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
|
|
||||||
*/
|
|
||||||
QDF_STATUS wmi_unified_ocb_stop_timing_advert(void *wmi_hdl,
|
|
||||||
struct ocb_timing_advert_param *timing_advert)
|
struct ocb_timing_advert_param *timing_advert)
|
||||||
{
|
{
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
if (wmi_hdl->ops->send_ocb_stop_timing_advert_cmd)
|
||||||
|
return wmi_hdl->ops->send_ocb_stop_timing_advert_cmd(wmi_hdl,
|
||||||
if (wmi_handle->ops->send_ocb_stop_timing_advert_cmd)
|
|
||||||
return wmi_handle->ops->send_ocb_stop_timing_advert_cmd(wmi_handle,
|
|
||||||
timing_advert);
|
timing_advert);
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
return QDF_STATUS_E_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
QDF_STATUS wmi_unified_ocb_set_utc_time_cmd(struct wmi_unified *wmi_hdl,
|
||||||
* wmi_unified_ocb_set_utc_time_cmd() - get ocb tsf timer val
|
|
||||||
* @wmi_handle: pointer to the wmi handle
|
|
||||||
* @vdev_id: vdev id
|
|
||||||
*
|
|
||||||
* Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
|
|
||||||
*/
|
|
||||||
QDF_STATUS wmi_unified_ocb_set_utc_time_cmd(void *wmi_hdl,
|
|
||||||
struct ocb_utc_param *utc)
|
struct ocb_utc_param *utc)
|
||||||
{
|
{
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
if (wmi_hdl->ops->send_ocb_set_utc_time_cmd)
|
||||||
|
return wmi_hdl->ops->send_ocb_set_utc_time_cmd(wmi_hdl, utc);
|
||||||
if (wmi_handle->ops->send_ocb_set_utc_time_cmd)
|
|
||||||
return wmi_handle->ops->send_ocb_set_utc_time_cmd(wmi_handle,
|
|
||||||
utc);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
return QDF_STATUS_E_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
QDF_STATUS wmi_unified_ocb_get_tsf_timer(struct wmi_unified *wmi_hdl,
|
||||||
* wmi_unified_ocb_get_tsf_timer() - get ocb tsf timer val
|
struct ocb_get_tsf_timer_param *req)
|
||||||
* @wmi_handle: pointer to the wmi handle
|
|
||||||
* @vdev_id: vdev id
|
|
||||||
*
|
|
||||||
* Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
|
|
||||||
*/
|
|
||||||
QDF_STATUS wmi_unified_ocb_get_tsf_timer(void *wmi_hdl,
|
|
||||||
uint8_t vdev_id)
|
|
||||||
{
|
{
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
if (wmi_hdl->ops->send_ocb_get_tsf_timer_cmd)
|
||||||
|
return wmi_hdl->ops->send_ocb_get_tsf_timer_cmd(wmi_hdl,
|
||||||
if (wmi_handle->ops->send_ocb_get_tsf_timer_cmd)
|
req->vdev_id);
|
||||||
return wmi_handle->ops->send_ocb_get_tsf_timer_cmd(wmi_handle,
|
|
||||||
vdev_id);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
return QDF_STATUS_E_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
QDF_STATUS wmi_unified_dcc_get_stats_cmd(struct wmi_unified *wmi_hdl,
|
||||||
* wmi_unified_dcc_get_stats_cmd() - get the DCC channel stats
|
struct ocb_dcc_get_stats_param *get_stats_param)
|
||||||
* @wmi_handle: pointer to the wmi handle
|
|
||||||
* @get_stats_param: pointer to the dcc stats
|
|
||||||
*
|
|
||||||
* Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
|
|
||||||
*/
|
|
||||||
QDF_STATUS wmi_unified_dcc_get_stats_cmd(void *wmi_hdl,
|
|
||||||
struct dcc_get_stats_param *get_stats_param)
|
|
||||||
{
|
{
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
if (wmi_hdl->ops->send_dcc_get_stats_cmd)
|
||||||
|
return wmi_hdl->ops->send_dcc_get_stats_cmd(wmi_hdl,
|
||||||
if (wmi_handle->ops->send_dcc_get_stats_cmd)
|
|
||||||
return wmi_handle->ops->send_dcc_get_stats_cmd(wmi_handle,
|
|
||||||
get_stats_param);
|
get_stats_param);
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
return QDF_STATUS_E_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
QDF_STATUS wmi_unified_dcc_clear_stats(struct wmi_unified *wmi_hdl,
|
||||||
* wmi_unified_dcc_clear_stats() - command to clear the DCC stats
|
struct ocb_dcc_clear_stats_param *clear_stats_param)
|
||||||
* @wmi_handle: pointer to the wmi handle
|
|
||||||
* @clear_stats_param: parameters to the command
|
|
||||||
*
|
|
||||||
* Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
|
|
||||||
*/
|
|
||||||
QDF_STATUS wmi_unified_dcc_clear_stats(void *wmi_hdl,
|
|
||||||
uint32_t vdev_id, uint32_t dcc_stats_bitmap)
|
|
||||||
{
|
{
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
if (wmi_hdl->ops->send_dcc_clear_stats_cmd)
|
||||||
|
return wmi_hdl->ops->send_dcc_clear_stats_cmd(wmi_hdl,
|
||||||
if (wmi_handle->ops->send_dcc_clear_stats_cmd)
|
clear_stats_param->vdev_id,
|
||||||
return wmi_handle->ops->send_dcc_clear_stats_cmd(wmi_handle,
|
clear_stats_param->dcc_stats_bitmap);
|
||||||
vdev_id, dcc_stats_bitmap);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
return QDF_STATUS_E_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
QDF_STATUS wmi_unified_dcc_update_ndl(struct wmi_unified *wmi_hdl,
|
||||||
* wmi_unified_dcc_update_ndl() - command to update the NDL data
|
struct ocb_dcc_update_ndl_param *update_ndl_param)
|
||||||
* @wmi_handle: pointer to the wmi handle
|
|
||||||
* @update_ndl_param: pointer to the request parameters
|
|
||||||
*
|
|
||||||
* Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures
|
|
||||||
*/
|
|
||||||
QDF_STATUS wmi_unified_dcc_update_ndl(void *wmi_hdl,
|
|
||||||
struct dcc_update_ndl_param *update_ndl_param)
|
|
||||||
{
|
{
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
if (wmi_hdl->ops->send_dcc_update_ndl_cmd)
|
||||||
|
return wmi_hdl->ops->send_dcc_update_ndl_cmd(wmi_hdl,
|
||||||
if (wmi_handle->ops->send_dcc_update_ndl_cmd)
|
|
||||||
return wmi_handle->ops->send_dcc_update_ndl_cmd(wmi_handle,
|
|
||||||
update_ndl_param);
|
update_ndl_param);
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
return QDF_STATUS_E_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
QDF_STATUS wmi_unified_ocb_set_config(struct wmi_unified *wmi_hdl,
|
||||||
* wmi_unified_ocb_set_config() - send the OCB config to the FW
|
struct ocb_config *config)
|
||||||
* @wmi_handle: pointer to the wmi handle
|
|
||||||
* @config: the OCB configuration
|
|
||||||
*
|
|
||||||
* Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures
|
|
||||||
*/
|
|
||||||
QDF_STATUS wmi_unified_ocb_set_config(void *wmi_hdl,
|
|
||||||
struct ocb_config_param *config, uint32_t *ch_mhz)
|
|
||||||
{
|
{
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
if (wmi_hdl->ops->send_ocb_set_config_cmd)
|
||||||
|
return wmi_hdl->ops->send_ocb_set_config_cmd(wmi_hdl,
|
||||||
if (wmi_handle->ops->send_ocb_set_config_cmd)
|
config);
|
||||||
return wmi_handle->ops->send_ocb_set_config_cmd(wmi_handle,
|
|
||||||
config, ch_mhz);
|
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
return QDF_STATUS_E_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QDF_STATUS
|
||||||
|
wmi_extract_ocb_set_channel_config_resp(struct wmi_unified *wmi_hdl,
|
||||||
|
void *evt_buf,
|
||||||
|
uint32_t *status)
|
||||||
|
{
|
||||||
|
if (wmi_hdl->ops->extract_ocb_chan_config_resp)
|
||||||
|
return wmi_hdl->ops->extract_ocb_chan_config_resp(wmi_hdl,
|
||||||
|
evt_buf,
|
||||||
|
status);
|
||||||
|
|
||||||
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
|
QDF_STATUS wmi_extract_ocb_tsf_timer(struct wmi_unified *wmi_hdl,
|
||||||
|
void *evt_buf,
|
||||||
|
struct ocb_get_tsf_timer_response *resp)
|
||||||
|
{
|
||||||
|
if (wmi_hdl->ops->extract_ocb_tsf_timer)
|
||||||
|
return wmi_hdl->ops->extract_ocb_tsf_timer(wmi_hdl,
|
||||||
|
evt_buf,
|
||||||
|
resp);
|
||||||
|
|
||||||
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
|
QDF_STATUS wmi_extract_dcc_update_ndl_resp(struct wmi_unified *wmi_hdl,
|
||||||
|
void *evt_buf, struct ocb_dcc_update_ndl_response *resp)
|
||||||
|
{
|
||||||
|
if (wmi_hdl->ops->extract_dcc_update_ndl_resp)
|
||||||
|
return wmi_hdl->ops->extract_dcc_update_ndl_resp(wmi_hdl,
|
||||||
|
evt_buf,
|
||||||
|
resp);
|
||||||
|
|
||||||
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
|
QDF_STATUS wmi_extract_dcc_stats(struct wmi_unified *wmi_hdl,
|
||||||
|
void *evt_buf,
|
||||||
|
struct ocb_dcc_get_stats_response **resp)
|
||||||
|
{
|
||||||
|
if (wmi_hdl->ops->extract_dcc_stats)
|
||||||
|
return wmi_hdl->ops->extract_dcc_stats(wmi_hdl,
|
||||||
|
evt_buf,
|
||||||
|
resp);
|
||||||
|
|
||||||
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* wmi_unified_set_enable_disable_mcc_adaptive_scheduler_cmd() - control mcc scheduler
|
* wmi_unified_set_enable_disable_mcc_adaptive_scheduler_cmd() - control mcc scheduler
|
||||||
* @wmi_handle: wmi handle
|
* @wmi_handle: wmi handle
|
||||||
|
@@ -3706,6 +3706,7 @@ static QDF_STATUS send_set_sta_uapsd_auto_trig_cmd_tlv(wmi_unified_t wmi_handle,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef WLAN_FEATURE_DSRC
|
||||||
/**
|
/**
|
||||||
* send_ocb_set_utc_time_cmd() - send the UTC time to the firmware
|
* send_ocb_set_utc_time_cmd() - send the UTC time to the firmware
|
||||||
* @wmi_handle: pointer to the wmi handle
|
* @wmi_handle: pointer to the wmi handle
|
||||||
@@ -3910,7 +3911,7 @@ static QDF_STATUS send_ocb_get_tsf_timer_cmd_tlv(wmi_unified_t wmi_handle,
|
|||||||
* Return: 0 on succes
|
* Return: 0 on succes
|
||||||
*/
|
*/
|
||||||
static QDF_STATUS send_dcc_get_stats_cmd_tlv(wmi_unified_t wmi_handle,
|
static QDF_STATUS send_dcc_get_stats_cmd_tlv(wmi_unified_t wmi_handle,
|
||||||
struct dcc_get_stats_param *get_stats_param)
|
struct ocb_dcc_get_stats_param *get_stats_param)
|
||||||
{
|
{
|
||||||
QDF_STATUS ret;
|
QDF_STATUS ret;
|
||||||
wmi_dcc_get_stats_cmd_fixed_param *cmd;
|
wmi_dcc_get_stats_cmd_fixed_param *cmd;
|
||||||
@@ -4034,7 +4035,7 @@ static QDF_STATUS send_dcc_clear_stats_cmd_tlv(wmi_unified_t wmi_handle,
|
|||||||
* Return: 0 on success
|
* Return: 0 on success
|
||||||
*/
|
*/
|
||||||
static QDF_STATUS send_dcc_update_ndl_cmd_tlv(wmi_unified_t wmi_handle,
|
static QDF_STATUS send_dcc_update_ndl_cmd_tlv(wmi_unified_t wmi_handle,
|
||||||
struct dcc_update_ndl_param *update_ndl_param)
|
struct ocb_dcc_update_ndl_param *update_ndl_param)
|
||||||
{
|
{
|
||||||
QDF_STATUS qdf_status;
|
QDF_STATUS qdf_status;
|
||||||
wmi_dcc_update_ndl_cmd_fixed_param *cmd;
|
wmi_dcc_update_ndl_cmd_fixed_param *cmd;
|
||||||
@@ -4139,7 +4140,7 @@ static QDF_STATUS send_dcc_update_ndl_cmd_tlv(wmi_unified_t wmi_handle,
|
|||||||
* Return: 0 on success
|
* Return: 0 on success
|
||||||
*/
|
*/
|
||||||
static QDF_STATUS send_ocb_set_config_cmd_tlv(wmi_unified_t wmi_handle,
|
static QDF_STATUS send_ocb_set_config_cmd_tlv(wmi_unified_t wmi_handle,
|
||||||
struct ocb_config_param *config, uint32_t *ch_mhz)
|
struct ocb_config *config)
|
||||||
{
|
{
|
||||||
QDF_STATUS ret;
|
QDF_STATUS ret;
|
||||||
wmi_ocb_set_config_cmd_fixed_param *cmd;
|
wmi_ocb_set_config_cmd_fixed_param *cmd;
|
||||||
@@ -4207,7 +4208,7 @@ static QDF_STATUS send_ocb_set_config_cmd_tlv(wmi_unified_t wmi_handle,
|
|||||||
WMITLV_SET_HDR(&cmd->tlv_header,
|
WMITLV_SET_HDR(&cmd->tlv_header,
|
||||||
WMITLV_TAG_STRUC_wmi_ocb_set_config_cmd_fixed_param,
|
WMITLV_TAG_STRUC_wmi_ocb_set_config_cmd_fixed_param,
|
||||||
WMITLV_GET_STRUCT_TLVLEN(wmi_ocb_set_config_cmd_fixed_param));
|
WMITLV_GET_STRUCT_TLVLEN(wmi_ocb_set_config_cmd_fixed_param));
|
||||||
cmd->vdev_id = config->session_id;
|
cmd->vdev_id = config->vdev_id;
|
||||||
cmd->channel_count = config->channel_count;
|
cmd->channel_count = config->channel_count;
|
||||||
cmd->schedule_size = config->schedule_size;
|
cmd->schedule_size = config->schedule_size;
|
||||||
cmd->flags = config->flags;
|
cmd->flags = config->flags;
|
||||||
@@ -4227,7 +4228,7 @@ static QDF_STATUS send_ocb_set_config_cmd_tlv(wmi_unified_t wmi_handle,
|
|||||||
chan->band_center_freq2 = 0;
|
chan->band_center_freq2 = 0;
|
||||||
chan->info = 0;
|
chan->info = 0;
|
||||||
|
|
||||||
WMI_SET_CHANNEL_MODE(chan, ch_mhz[i]);
|
WMI_SET_CHANNEL_MODE(chan, config->channels[i].ch_mode);
|
||||||
WMI_SET_CHANNEL_MAX_POWER(chan, config->channels[i].max_pwr);
|
WMI_SET_CHANNEL_MAX_POWER(chan, config->channels[i].max_pwr);
|
||||||
WMI_SET_CHANNEL_MIN_POWER(chan, config->channels[i].min_pwr);
|
WMI_SET_CHANNEL_MIN_POWER(chan, config->channels[i].min_pwr);
|
||||||
WMI_SET_CHANNEL_MAX_TX_POWER(chan, config->channels[i].max_pwr);
|
WMI_SET_CHANNEL_MAX_TX_POWER(chan, config->channels[i].max_pwr);
|
||||||
@@ -4338,6 +4339,123 @@ static QDF_STATUS send_ocb_set_config_cmd_tlv(wmi_unified_t wmi_handle,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* extract_ocb_channel_config_resp_tlv() - extract ocb channel config resp
|
||||||
|
* @wmi_handle: wmi handle
|
||||||
|
* @evt_buf: wmi event buffer
|
||||||
|
* @status: status buffer
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS_SUCCESS on success
|
||||||
|
*/
|
||||||
|
static QDF_STATUS extract_ocb_channel_config_resp_tlv(wmi_unified_t wmi_handle,
|
||||||
|
void *evt_buf,
|
||||||
|
uint32_t *status)
|
||||||
|
{
|
||||||
|
WMI_OCB_SET_CONFIG_RESP_EVENTID_param_tlvs *param_tlvs;
|
||||||
|
wmi_ocb_set_config_resp_event_fixed_param *fix_param;
|
||||||
|
|
||||||
|
param_tlvs = evt_buf;
|
||||||
|
fix_param = param_tlvs->fixed_param;
|
||||||
|
|
||||||
|
*status = fix_param->status;
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* extract_ocb_tsf_timer_tlv() - extract TSF timer from event buffer
|
||||||
|
* @wmi_handle: wmi handle
|
||||||
|
* @evt_buf: wmi event buffer
|
||||||
|
* @resp: response buffer
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS_SUCCESS on success
|
||||||
|
*/
|
||||||
|
static QDF_STATUS extract_ocb_tsf_timer_tlv(wmi_unified_t wmi_handle,
|
||||||
|
void *evt_buf, struct ocb_get_tsf_timer_response *resp)
|
||||||
|
{
|
||||||
|
WMI_OCB_GET_TSF_TIMER_RESP_EVENTID_param_tlvs *param_tlvs;
|
||||||
|
wmi_ocb_get_tsf_timer_resp_event_fixed_param *fix_param;
|
||||||
|
|
||||||
|
param_tlvs = evt_buf;
|
||||||
|
fix_param = param_tlvs->fixed_param;
|
||||||
|
resp->vdev_id = fix_param->vdev_id;
|
||||||
|
resp->timer_high = fix_param->tsf_timer_high;
|
||||||
|
resp->timer_low = fix_param->tsf_timer_low;
|
||||||
|
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* extract_ocb_ndl_resp_tlv() - extract TSF timer from event buffer
|
||||||
|
* @wmi_handle: wmi handle
|
||||||
|
* @evt_buf: wmi event buffer
|
||||||
|
* @resp: response buffer
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS_SUCCESS on success
|
||||||
|
*/
|
||||||
|
static QDF_STATUS extract_ocb_ndl_resp_tlv(wmi_unified_t wmi_handle,
|
||||||
|
void *evt_buf, struct ocb_dcc_update_ndl_response *resp)
|
||||||
|
{
|
||||||
|
WMI_DCC_UPDATE_NDL_RESP_EVENTID_param_tlvs *param_tlvs;
|
||||||
|
wmi_dcc_update_ndl_resp_event_fixed_param *fix_param;
|
||||||
|
|
||||||
|
param_tlvs = evt_buf;
|
||||||
|
fix_param = param_tlvs->fixed_param;
|
||||||
|
resp->vdev_id = fix_param->vdev_id;
|
||||||
|
resp->status = fix_param->status;
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* extract_ocb_dcc_stats_tlv() - extract DCC stats from event buffer
|
||||||
|
* @wmi_handle: wmi handle
|
||||||
|
* @evt_buf: wmi event buffer
|
||||||
|
* @resp: response buffer
|
||||||
|
*
|
||||||
|
* Since length of stats is variable, buffer for DCC stats will be allocated
|
||||||
|
* in this function. The caller must free the buffer.
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS_SUCCESS on success
|
||||||
|
*/
|
||||||
|
static QDF_STATUS extract_ocb_dcc_stats_tlv(wmi_unified_t wmi_handle,
|
||||||
|
void *evt_buf, struct ocb_dcc_get_stats_response **resp)
|
||||||
|
{
|
||||||
|
struct ocb_dcc_get_stats_response *response;
|
||||||
|
WMI_DCC_GET_STATS_RESP_EVENTID_param_tlvs *param_tlvs;
|
||||||
|
wmi_dcc_get_stats_resp_event_fixed_param *fix_param;
|
||||||
|
|
||||||
|
param_tlvs = (WMI_DCC_GET_STATS_RESP_EVENTID_param_tlvs *)evt_buf;
|
||||||
|
fix_param = param_tlvs->fixed_param;
|
||||||
|
|
||||||
|
/* Allocate and populate the response */
|
||||||
|
if (fix_param->num_channels > ((WMI_SVC_MSG_MAX_SIZE -
|
||||||
|
sizeof(*fix_param)) / sizeof(wmi_dcc_ndl_stats_per_channel))) {
|
||||||
|
WMI_LOGE("%s: too many channels:%d", __func__,
|
||||||
|
fix_param->num_channels);
|
||||||
|
QDF_ASSERT(0);
|
||||||
|
*resp = NULL;
|
||||||
|
return QDF_STATUS_E_INVAL;
|
||||||
|
}
|
||||||
|
response = qdf_mem_malloc(sizeof(*response) + fix_param->num_channels *
|
||||||
|
sizeof(wmi_dcc_ndl_stats_per_channel));
|
||||||
|
*resp = response;
|
||||||
|
if (!response)
|
||||||
|
return QDF_STATUS_E_NOMEM;
|
||||||
|
|
||||||
|
response->vdev_id = fix_param->vdev_id;
|
||||||
|
response->num_channels = fix_param->num_channels;
|
||||||
|
response->channel_stats_array_len =
|
||||||
|
fix_param->num_channels *
|
||||||
|
sizeof(wmi_dcc_ndl_stats_per_channel);
|
||||||
|
response->channel_stats_array = ((uint8_t *)response) +
|
||||||
|
sizeof(*response);
|
||||||
|
qdf_mem_copy(response->channel_stats_array,
|
||||||
|
param_tlvs->stats_per_channel_list,
|
||||||
|
response->channel_stats_array_len);
|
||||||
|
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* send_set_enable_disable_mcc_adaptive_scheduler_cmd_tlv() -enable/disable mcc scheduler
|
* send_set_enable_disable_mcc_adaptive_scheduler_cmd_tlv() -enable/disable mcc scheduler
|
||||||
* @wmi_handle: wmi handle
|
* @wmi_handle: wmi handle
|
||||||
@@ -21576,6 +21694,7 @@ struct wmi_ops tlv_ops = {
|
|||||||
#endif
|
#endif
|
||||||
.send_set_smps_params_cmd = send_set_smps_params_cmd_tlv,
|
.send_set_smps_params_cmd = send_set_smps_params_cmd_tlv,
|
||||||
.send_set_mimops_cmd = send_set_mimops_cmd_tlv,
|
.send_set_mimops_cmd = send_set_mimops_cmd_tlv,
|
||||||
|
#ifdef WLAN_FEATURE_DSRC
|
||||||
.send_ocb_set_utc_time_cmd = send_ocb_set_utc_time_cmd_tlv,
|
.send_ocb_set_utc_time_cmd = send_ocb_set_utc_time_cmd_tlv,
|
||||||
.send_ocb_get_tsf_timer_cmd = send_ocb_get_tsf_timer_cmd_tlv,
|
.send_ocb_get_tsf_timer_cmd = send_ocb_get_tsf_timer_cmd_tlv,
|
||||||
.send_dcc_clear_stats_cmd = send_dcc_clear_stats_cmd_tlv,
|
.send_dcc_clear_stats_cmd = send_dcc_clear_stats_cmd_tlv,
|
||||||
@@ -21585,6 +21704,11 @@ struct wmi_ops tlv_ops = {
|
|||||||
.send_ocb_stop_timing_advert_cmd = send_ocb_stop_timing_advert_cmd_tlv,
|
.send_ocb_stop_timing_advert_cmd = send_ocb_stop_timing_advert_cmd_tlv,
|
||||||
.send_ocb_start_timing_advert_cmd =
|
.send_ocb_start_timing_advert_cmd =
|
||||||
send_ocb_start_timing_advert_cmd_tlv,
|
send_ocb_start_timing_advert_cmd_tlv,
|
||||||
|
.extract_ocb_chan_config_resp = extract_ocb_channel_config_resp_tlv,
|
||||||
|
.extract_ocb_tsf_timer = extract_ocb_tsf_timer_tlv,
|
||||||
|
.extract_dcc_update_ndl_resp = extract_ocb_ndl_resp_tlv,
|
||||||
|
.extract_dcc_stats = extract_ocb_dcc_stats_tlv,
|
||||||
|
#endif
|
||||||
.send_set_enable_disable_mcc_adaptive_scheduler_cmd =
|
.send_set_enable_disable_mcc_adaptive_scheduler_cmd =
|
||||||
send_set_enable_disable_mcc_adaptive_scheduler_cmd_tlv,
|
send_set_enable_disable_mcc_adaptive_scheduler_cmd_tlv,
|
||||||
.send_set_mcc_channel_time_latency_cmd =
|
.send_set_mcc_channel_time_latency_cmd =
|
||||||
|
Reference in New Issue
Block a user