diff options
| author | yeshwanth sriram guntuka <ysriramg@codeaurora.org> | 2017-09-01 17:56:07 +0530 |
|---|---|---|
| committer | Abhinav Kumar <abhikuma@codeaurora.org> | 2019-02-20 15:21:06 +0530 |
| commit | 03d103d83bce1f90d7a0119a00f873ff5d9d870c (patch) | |
| tree | 62632165f7b581f9cda1a80c41b11970df37d46a | |
| parent | 4b04b7261fb3793470dd12f59e4c35c2168c324e (diff) | |
qcacmn: Add config support for BTM offload
Add ini to configure BTM offload configuration
which is sent to firmware as part of RSO start
via wmi btm config cmd.
Change-Id: I69c792705b208014af8f1878f7645d957dde6c06
CRs-Fixed: 2105112
| -rw-r--r-- | wmi/inc/wmi_unified_api.h | 12 | ||||
| -rw-r--r-- | wmi/inc/wmi_unified_param.h | 11 | ||||
| -rw-r--r-- | wmi/inc/wmi_unified_priv.h | 4 | ||||
| -rw-r--r-- | wmi/src/wmi_unified_api.c | 14 | ||||
| -rw-r--r-- | wmi/src/wmi_unified_tlv.c | 39 |
5 files changed, 76 insertions, 4 deletions
diff --git a/wmi/inc/wmi_unified_api.h b/wmi/inc/wmi_unified_api.h index abf82efb19f6..14611e10ec5a 100644 --- a/wmi/inc/wmi_unified_api.h +++ b/wmi/inc/wmi_unified_api.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2018 The Linux Foundation. All rights reserved. + * Copyright (c) 2013-2019 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -1623,4 +1623,14 @@ QDF_STATUS wmi_unified_offload_11k_cmd(void *wmi_hdl, */ QDF_STATUS wmi_unified_invoke_neighbor_report_cmd(void *wmi_hdl, struct wmi_invoke_neighbor_report_params *params); + +/** + * wmi_unified_send_btm_config() - Send BTM config to fw + * @wmi_hdl: wmi handle + * @params: pointer to wmi_btm_config + * + * Return: QDF_STATUS + */ +QDF_STATUS wmi_unified_send_btm_config(void *wmi_hdl, + struct wmi_btm_config *params); #endif /* _WMI_UNIFIED_API_H_ */ diff --git a/wmi/inc/wmi_unified_param.h b/wmi/inc/wmi_unified_param.h index 4ea794073236..9d95fe8e428f 100644 --- a/wmi/inc/wmi_unified_param.h +++ b/wmi/inc/wmi_unified_param.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2018 The Linux Foundation. All rights reserved. + * Copyright (c) 2016-2019 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -7597,6 +7597,15 @@ struct wmi_mawc_roam_params { uint8_t rssi_stationary_high_adjust; uint8_t rssi_stationary_low_adjust; }; +/** + * struct wmi_btm_config - BSS Transition Management offload params + * @vdev_id: VDEV on which the parameters should be applied + * @btm_offload_config: BTM config + */ +struct wmi_btm_config { + uint8_t vdev_id; + uint32_t btm_offload_config; +}; /** * @time_offset: time offset after 11k offload command to trigger a neighbor diff --git a/wmi/inc/wmi_unified_priv.h b/wmi/inc/wmi_unified_priv.h index 8c2e2daa2aaf..5b3b9b8be017 100644 --- a/wmi/inc/wmi_unified_priv.h +++ b/wmi/inc/wmi_unified_priv.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2018 The Linux Foundation. All rights reserved. + * Copyright (c) 2013-2019 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -1250,6 +1250,8 @@ QDF_STATUS (*send_offload_11k_cmd)(wmi_unified_t wmi_handle, QDF_STATUS (*send_invoke_neighbor_report_cmd)(wmi_unified_t wmi_handle, struct wmi_invoke_neighbor_report_params *params); +QDF_STATUS (*send_btm_config)(wmi_unified_t wmi_handle, + struct wmi_btm_config *params); }; struct target_abi_version { diff --git a/wmi/src/wmi_unified_api.c b/wmi/src/wmi_unified_api.c index c2494eaf5365..44abdd757163 100644 --- a/wmi/src/wmi_unified_api.c +++ b/wmi/src/wmi_unified_api.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2018 The Linux Foundation. All rights reserved. + * Copyright (c) 2016-2019 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -6586,3 +6586,15 @@ wmi_extract_roam_scan_stats_res_evt(wmi_unified_t wmi, void *evt_buf, return QDF_STATUS_E_FAILURE; } + +QDF_STATUS wmi_unified_send_btm_config(void *wmi_hdl, + struct wmi_btm_config *params) +{ + wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; + + if (wmi_handle->ops->send_btm_config) + return wmi_handle->ops->send_btm_config(wmi_handle, + params); + + return QDF_STATUS_E_FAILURE; +} diff --git a/wmi/src/wmi_unified_tlv.c b/wmi/src/wmi_unified_tlv.c index d8320699bbc4..9699e0f333e4 100644 --- a/wmi/src/wmi_unified_tlv.c +++ b/wmi/src/wmi_unified_tlv.c @@ -15057,6 +15057,44 @@ static QDF_STATUS send_invoke_neighbor_report_cmd_tlv(wmi_unified_t wmi_handle, return status; } +/* + * send_btm_config_cmd_tlv() - Send wmi cmd for BTM config + * @wmi_handle: wmi handle + * @params: pointer to wmi_btm_config + * + * Return: QDF_STATUS + */ +static QDF_STATUS send_btm_config_cmd_tlv(wmi_unified_t wmi_handle, + struct wmi_btm_config *params) +{ + + wmi_btm_config_fixed_param *cmd; + wmi_buf_t buf; + uint32_t len; + + len = sizeof(*cmd); + buf = wmi_buf_alloc(wmi_handle, len); + if (!buf) { + qdf_print("%s:wmi_buf_alloc failed\n", __func__); + return QDF_STATUS_E_NOMEM; + } + + cmd = (wmi_btm_config_fixed_param *)wmi_buf_data(buf); + WMITLV_SET_HDR(&cmd->tlv_header, + WMITLV_TAG_STRUC_wmi_btm_config_fixed_param, + WMITLV_GET_STRUCT_TLVLEN(wmi_btm_config_fixed_param)); + cmd->vdev_id = params->vdev_id; + cmd->flags = params->btm_offload_config; + if (wmi_unified_cmd_send(wmi_handle, buf, len, + WMI_ROAM_BTM_CONFIG_CMDID)) { + WMI_LOGE("%s: failed to send WMI_ROAM_BTM_CONFIG_CMDID", + __func__); + wmi_buf_free(buf); + return QDF_STATUS_E_FAILURE; + } + return QDF_STATUS_SUCCESS; +} + struct wmi_ops tlv_ops = { .send_vdev_create_cmd = send_vdev_create_cmd_tlv, .send_vdev_delete_cmd = send_vdev_delete_cmd_tlv, @@ -15359,6 +15397,7 @@ struct wmi_ops tlv_ops = { .extract_roam_scan_stats_res_evt = extract_roam_scan_stats_res_evt_tlv, .send_offload_11k_cmd = send_offload_11k_cmd_tlv, .send_invoke_neighbor_report_cmd = send_invoke_neighbor_report_cmd_tlv, + .send_btm_config = send_btm_config_cmd_tlv, }; #ifdef WMI_TLV_AND_NON_TLV_SUPPORT |
