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
This commit is contained in:

committed by
snandini

parent
a7db8ce9a1
commit
ffd0a2fa8a
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2014-2017 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2014-2018 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
|
||||
*
|
||||
@@ -429,6 +429,8 @@ struct host_event_wlan_ssr_shutdown {
|
||||
* reason unspecified
|
||||
* @HOST_STA_KICKOUT_REASON_KEEP_ALIVE: Indicate sta is disconnected
|
||||
* because of keep alive
|
||||
* @HOST_STA_KICKOUT_REASON_BTM: BTM request from AP with disassoc imminent
|
||||
* reason
|
||||
*
|
||||
* This enum contains the event subtype
|
||||
*/
|
||||
@@ -437,6 +439,7 @@ enum host_sta_kickout_events {
|
||||
HOST_STA_KICKOUT_REASON_XRETRY,
|
||||
HOST_STA_KICKOUT_REASON_UNSPECIFIED,
|
||||
HOST_STA_KICKOUT_REASON_KEEP_ALIVE,
|
||||
HOST_STA_KICKOUT_REASON_BTM,
|
||||
};
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
|
@@ -1888,4 +1888,13 @@ QDF_STATUS wmi_extract_ndp_end_ind(wmi_unified_t wmi_handle, uint8_t *data,
|
||||
struct nan_datapath_end_indication_event **ind);
|
||||
|
||||
#endif
|
||||
/**
|
||||
* 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_ */
|
||||
|
@@ -8090,6 +8090,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;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct set_arp_stats - set/reset arp stats
|
||||
|
@@ -1492,6 +1492,8 @@ QDF_STATUS (*extract_ndp_end_ind)(wmi_unified_t wmi_handle,
|
||||
uint8_t *data, struct nan_datapath_end_indication_event **ind);
|
||||
|
||||
#endif
|
||||
QDF_STATUS (*send_btm_config)(wmi_unified_t wmi_handle,
|
||||
struct wmi_btm_config *params);
|
||||
};
|
||||
|
||||
/* Forward declartion for psoc*/
|
||||
|
@@ -7221,3 +7221,14 @@ QDF_STATUS wmi_extract_ndp_end_ind(wmi_unified_t wmi_handle, uint8_t *data,
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
#endif
|
||||
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;
|
||||
}
|
||||
|
@@ -20822,6 +20822,44 @@ static QDF_STATUS extract_pdev_caldata_version_check_ev_param_tlv(
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/*
|
||||
* 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,
|
||||
@@ -21260,6 +21298,7 @@ struct wmi_ops tlv_ops = {
|
||||
.extract_ndp_end_rsp = extract_ndp_end_rsp_tlv,
|
||||
.extract_ndp_end_ind = extract_ndp_end_ind_tlv,
|
||||
#endif
|
||||
.send_btm_config = send_btm_config_cmd_tlv,
|
||||
};
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user