summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--wmi/inc/wmi_unified_api.h12
-rw-r--r--wmi/inc/wmi_unified_param.h19
-rw-r--r--wmi/inc/wmi_unified_priv.h4
-rw-r--r--wmi/src/wmi_unified_api.c14
-rw-r--r--wmi/src/wmi_unified_tlv.c44
5 files changed, 89 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..f8fefa8f2896 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,23 @@ 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
+ * @btm_solicited_timeout: Timeout value for waiting BTM request
+ * @btm_max_attempt_cnt: Maximum attempt for sending BTM query to ESS
+ * @btm_sticky_time: Stick time after roaming to new AP by BTM
+ * @btm_query_bitmask: roam trigger reasons to trigger BTM Query
+ */
+struct wmi_btm_config {
+ uint8_t vdev_id;
+ uint32_t btm_offload_config;
+ uint32_t btm_solicited_timeout;
+ uint32_t btm_max_attempt_cnt;
+ uint32_t btm_sticky_time;
+ uint32_t btm_query_bitmask;
+};
/**
* @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..346879f9865b 100644
--- a/wmi/src/wmi_unified_tlv.c
+++ b/wmi/src/wmi_unified_tlv.c
@@ -15057,6 +15057,49 @@ 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;
+ cmd->max_attempt_cnt = params->btm_max_attempt_cnt;
+ cmd->solicited_timeout_ms = params->btm_solicited_timeout;
+ cmd->stick_time_seconds = params->btm_sticky_time;
+ cmd->btm_bitmap = params->btm_query_bitmask;
+
+ 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 +15402,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