qcacmn: Add support for obss spatial reuse default threshold

Add support to send default offsets to firmware.

Change-Id: I5d566fbd5eb074e7aac94f793c5431734c2e0922
CRs-Fixed: 2345173
This commit is contained in:
Arif Hussain
2018-10-17 18:48:29 -07:00
committed by nshrivas
parent e7110f00cf
commit 4d4c8941b7
2 changed files with 62 additions and 0 deletions

View File

@@ -4460,6 +4460,19 @@ wmi_unified_send_obss_spatial_reuse_set_cmd(void *wmi_hdl,
return QDF_STATUS_E_FAILURE;
}
QDF_STATUS
wmi_unified_send_obss_spatial_reuse_set_def_thresh_cmd(void *wmi_hdl,
struct wmi_host_obss_spatial_reuse_set_def_thresh *thresh)
{
wmi_unified_t wmi = (wmi_unified_t)wmi_hdl;
if (wmi->ops->send_obss_spatial_reuse_set_def_thresh)
return wmi->ops->send_obss_spatial_reuse_set_def_thresh(wmi,
thresh);
return QDF_STATUS_E_FAILURE;
}
#endif
QDF_STATUS wmi_convert_pdev_id_host_to_target(void *wmi_hdl,

View File

@@ -7502,6 +7502,53 @@ send_addba_clearresponse_cmd_tlv(wmi_unified_t wmi_handle,
}
#ifdef OBSS_PD
/**
* send_obss_spatial_reuse_set_def_thresh_cmd_tlv - send obss spatial reuse set
* def thresh to fw
* @wmi_handle: wmi handle
* @thresh: pointer to obss_spatial_reuse_def_thresh
*
* Return: QDF_STATUS_SUCCESS for success or error code
*/
static
QDF_STATUS send_obss_spatial_reuse_set_def_thresh_cmd_tlv(
wmi_unified_t wmi_handle,
struct wmi_host_obss_spatial_reuse_set_def_thresh
*thresh)
{
wmi_buf_t buf;
wmi_obss_spatial_reuse_set_def_obss_thresh_cmd_fixed_param *cmd;
QDF_STATUS ret;
uint32_t cmd_len;
uint32_t tlv_len;
cmd_len = sizeof(*cmd);
buf = wmi_buf_alloc(wmi_handle, cmd_len);
if (!buf)
return QDF_STATUS_E_NOMEM;
cmd = (wmi_obss_spatial_reuse_set_def_obss_thresh_cmd_fixed_param *)
wmi_buf_data(buf);
tlv_len = WMITLV_GET_STRUCT_TLVLEN(
wmi_obss_spatial_reuse_set_def_obss_thresh_cmd_fixed_param);
WMITLV_SET_HDR(&cmd->tlv_header,
WMITLV_TAG_STRUC_wmi_obss_spatial_reuse_set_def_obss_thresh_cmd_fixed_param,
tlv_len);
cmd->obss_min = thresh->obss_min;
cmd->obss_max = thresh->obss_max;
cmd->vdev_type = thresh->vdev_type;
ret = wmi_unified_cmd_send(wmi_handle, buf, cmd_len,
WMI_PDEV_OBSS_PD_SPATIAL_REUSE_SET_DEF_OBSS_THRESH_CMDID);
if (QDF_IS_STATUS_ERROR(ret))
wmi_buf_free(buf);
return ret;
}
/**
* send_obss_spatial_reuse_set_cmd_tlv - send obss spatial reuse set cmd to fw
* @wmi_handle: wmi handle
@@ -11188,6 +11235,8 @@ struct wmi_ops tlv_ops = {
.extract_roam_scan_stats_res_evt = extract_roam_scan_stats_res_evt_tlv,
#ifdef OBSS_PD
.send_obss_spatial_reuse_set = send_obss_spatial_reuse_set_cmd_tlv,
.send_obss_spatial_reuse_set_def_thresh =
send_obss_spatial_reuse_set_def_thresh_cmd_tlv,
#endif
.extract_offload_bcn_tx_status_evt = extract_offload_bcn_tx_status_evt,
.extract_ctl_failsafe_check_ev_param =