qcacmn: Configure MAWC NLO parameters to the firmware
Get the MAWC based NLO parameters from HDD/WMA and pass them to firmware Change-Id: I16ce12d36df7f3ccab4db32b4d7f72a0f9762795 CRs-Fixed: 2064837
This commit is contained in:

committed by
snandini

parent
f0d90c7f28
commit
34a374603c
@@ -943,6 +943,23 @@ struct pno_scan_req_params {
|
|||||||
struct probe_req_whitelist_attr ie_whitelist;
|
struct probe_req_whitelist_attr ie_whitelist;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* struct nlo_mawc_params - Motion Aided Wireless Connectivity based
|
||||||
|
* Network List Offload configuration
|
||||||
|
* @vdev_id: VDEV ID on which the configuration needs to be applied
|
||||||
|
* @enable: flag to enable or disable
|
||||||
|
* @exp_backoff_ratio: ratio of exponential backoff
|
||||||
|
* @init_scan_interval: initial scan interval(msec)
|
||||||
|
* @max_scan_interval: max scan interval(msec)
|
||||||
|
*/
|
||||||
|
struct nlo_mawc_params {
|
||||||
|
uint8_t vdev_id;
|
||||||
|
bool enable;
|
||||||
|
uint32_t exp_backoff_ratio;
|
||||||
|
uint32_t init_scan_interval;
|
||||||
|
uint32_t max_scan_interval;
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* struct pno_user_cfg - user configuration required for PNO
|
* struct pno_user_cfg - user configuration required for PNO
|
||||||
* @channel_prediction: config PNO channel prediction feature status
|
* @channel_prediction: config PNO channel prediction feature status
|
||||||
|
@@ -677,6 +677,9 @@ QDF_STATUS wmi_unified_pno_start_cmd(void *wmi_hdl,
|
|||||||
struct pno_scan_req_params *pno);
|
struct pno_scan_req_params *pno);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
QDF_STATUS wmi_unified_nlo_mawc_cmd(void *wmi_hdl,
|
||||||
|
struct nlo_mawc_params *params);
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_set_ric_req_cmd(void *wmi_hdl, void *msg,
|
QDF_STATUS wmi_unified_set_ric_req_cmd(void *wmi_hdl, void *msg,
|
||||||
uint8_t is_add_ts);
|
uint8_t is_add_ts);
|
||||||
|
|
||||||
|
@@ -460,6 +460,9 @@ QDF_STATUS (*send_pno_stop_cmd)(wmi_unified_t wmi_handle, uint8_t vdev_id);
|
|||||||
QDF_STATUS (*send_pno_start_cmd)(wmi_unified_t wmi_handle,
|
QDF_STATUS (*send_pno_start_cmd)(wmi_unified_t wmi_handle,
|
||||||
struct pno_scan_req_params *pno);
|
struct pno_scan_req_params *pno);
|
||||||
|
|
||||||
|
QDF_STATUS (*send_nlo_mawc_cmd)(wmi_unified_t wmi_handle,
|
||||||
|
struct nlo_mawc_params *params);
|
||||||
|
|
||||||
QDF_STATUS (*send_ipa_offload_control_cmd)(wmi_unified_t wmi_handle,
|
QDF_STATUS (*send_ipa_offload_control_cmd)(wmi_unified_t wmi_handle,
|
||||||
struct ipa_offload_control_params *ipa_offload);
|
struct ipa_offload_control_params *ipa_offload);
|
||||||
|
|
||||||
|
@@ -1974,6 +1974,24 @@ QDF_STATUS wmi_unified_pno_start_cmd(void *wmi_hdl,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wmi_unified_nlo_mawc_cmd() - NLO MAWC cmd configuration
|
||||||
|
* @wmi_hdl: wmi handle
|
||||||
|
* @params: Configuration parameters
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
|
||||||
|
*/
|
||||||
|
QDF_STATUS wmi_unified_nlo_mawc_cmd(void *wmi_hdl,
|
||||||
|
struct nlo_mawc_params *params)
|
||||||
|
{
|
||||||
|
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
||||||
|
|
||||||
|
if (wmi_handle->ops->send_nlo_mawc_cmd)
|
||||||
|
return wmi_handle->ops->send_nlo_mawc_cmd(wmi_handle, params);
|
||||||
|
|
||||||
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
/* wmi_unified_set_ric_req_cmd() - set ric request element
|
/* wmi_unified_set_ric_req_cmd() - set ric request element
|
||||||
* @wmi_hdl: wmi handle
|
* @wmi_hdl: wmi handle
|
||||||
* @msg: message
|
* @msg: message
|
||||||
|
@@ -7367,6 +7367,62 @@ static void wmi_set_pno_channel_prediction(uint8_t *buf_ptr,
|
|||||||
channel_prediction_cfg->full_scan_period_ms);
|
channel_prediction_cfg->full_scan_period_ms);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* send_nlo_mawc_cmd_tlv() - Send MAWC NLO configuration
|
||||||
|
* @wmi_handle: wmi handle
|
||||||
|
* @params: configuration parameters
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS
|
||||||
|
*/
|
||||||
|
static QDF_STATUS send_nlo_mawc_cmd_tlv(wmi_unified_t wmi_handle,
|
||||||
|
struct nlo_mawc_params *params)
|
||||||
|
{
|
||||||
|
wmi_buf_t buf = NULL;
|
||||||
|
QDF_STATUS status;
|
||||||
|
int len;
|
||||||
|
uint8_t *buf_ptr;
|
||||||
|
wmi_nlo_configure_mawc_cmd_fixed_param *wmi_nlo_mawc_params;
|
||||||
|
|
||||||
|
len = sizeof(*wmi_nlo_mawc_params);
|
||||||
|
buf = wmi_buf_alloc(wmi_handle, len);
|
||||||
|
if (!buf) {
|
||||||
|
WMI_LOGE("%s : wmi_buf_alloc failed", __func__);
|
||||||
|
return QDF_STATUS_E_NOMEM;
|
||||||
|
}
|
||||||
|
|
||||||
|
buf_ptr = (uint8_t *) wmi_buf_data(buf);
|
||||||
|
wmi_nlo_mawc_params =
|
||||||
|
(wmi_nlo_configure_mawc_cmd_fixed_param *) buf_ptr;
|
||||||
|
WMITLV_SET_HDR(&wmi_nlo_mawc_params->tlv_header,
|
||||||
|
WMITLV_TAG_STRUC_wmi_nlo_configure_mawc_cmd_fixed_param,
|
||||||
|
WMITLV_GET_STRUCT_TLVLEN
|
||||||
|
(wmi_nlo_configure_mawc_cmd_fixed_param));
|
||||||
|
wmi_nlo_mawc_params->vdev_id = params->vdev_id;
|
||||||
|
if (params->enable)
|
||||||
|
wmi_nlo_mawc_params->enable = 1;
|
||||||
|
else
|
||||||
|
wmi_nlo_mawc_params->enable = 0;
|
||||||
|
wmi_nlo_mawc_params->exp_backoff_ratio = params->exp_backoff_ratio;
|
||||||
|
wmi_nlo_mawc_params->init_scan_interval = params->init_scan_interval;
|
||||||
|
wmi_nlo_mawc_params->max_scan_interval = params->max_scan_interval;
|
||||||
|
|
||||||
|
status = wmi_unified_cmd_send(wmi_handle, buf,
|
||||||
|
len, WMI_NLO_CONFIGURE_MAWC_CMDID);
|
||||||
|
if (QDF_IS_STATUS_ERROR(status)) {
|
||||||
|
WMI_LOGE("WMI_NLO_CONFIGURE_MAWC_CMDID failed, Error %d",
|
||||||
|
status);
|
||||||
|
wmi_buf_free(buf);
|
||||||
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
}
|
||||||
|
WMI_LOGD(FL("MAWC NLO en=%d, vdev=%d, ratio=%d, SCAN init=%d, max=%d"),
|
||||||
|
wmi_nlo_mawc_params->enable, wmi_nlo_mawc_params->vdev_id,
|
||||||
|
wmi_nlo_mawc_params->exp_backoff_ratio,
|
||||||
|
wmi_nlo_mawc_params->init_scan_interval,
|
||||||
|
wmi_nlo_mawc_params->max_scan_interval);
|
||||||
|
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* send_pno_start_cmd_tlv() - PNO start request
|
* send_pno_start_cmd_tlv() - PNO start request
|
||||||
* @wmi_handle: wmi handle
|
* @wmi_handle: wmi handle
|
||||||
@@ -18685,6 +18741,7 @@ struct wmi_ops tlv_ops = {
|
|||||||
.send_plm_start_cmd = send_plm_start_cmd_tlv,
|
.send_plm_start_cmd = send_plm_start_cmd_tlv,
|
||||||
.send_pno_stop_cmd = send_pno_stop_cmd_tlv,
|
.send_pno_stop_cmd = send_pno_stop_cmd_tlv,
|
||||||
.send_pno_start_cmd = send_pno_start_cmd_tlv,
|
.send_pno_start_cmd = send_pno_start_cmd_tlv,
|
||||||
|
.send_nlo_mawc_cmd = send_nlo_mawc_cmd_tlv,
|
||||||
.send_set_ric_req_cmd = send_set_ric_req_cmd_tlv,
|
.send_set_ric_req_cmd = send_set_ric_req_cmd_tlv,
|
||||||
.send_process_ll_stats_clear_cmd = send_process_ll_stats_clear_cmd_tlv,
|
.send_process_ll_stats_clear_cmd = send_process_ll_stats_clear_cmd_tlv,
|
||||||
.send_process_ll_stats_set_cmd = send_process_ll_stats_set_cmd_tlv,
|
.send_process_ll_stats_set_cmd = send_process_ll_stats_set_cmd_tlv,
|
||||||
|
Reference in New Issue
Block a user