qca-wifi: Add support to send LCI WMI command to FW
Add support to send LCI WMI command to FW for 'wlanconfig athx rtt lci <values>' command. Change-Id: Idff672adef0ff9abd8ea033de470118c0168a2b6 CRs-Fixed: 2832182
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

parent
b6f0feb077
commit
975f602e86
@@ -780,4 +780,14 @@ QDF_STATUS wmi_unified_set_radio_tx_mode_select_cmd_send(
|
||||
*/
|
||||
QDF_STATUS wmi_unified_send_lcr_cmd(wmi_unified_t wmi_handle,
|
||||
struct wmi_wifi_pos_lcr_info *lcr_info);
|
||||
|
||||
/**
|
||||
* wmi_unified_send_lci_cmd() - Send LCI command to FW
|
||||
* @wmi_handle: WMI handle
|
||||
* @lci_info: Pointer to LCI structure
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS if success, else returns proper error code.
|
||||
*/
|
||||
QDF_STATUS wmi_unified_send_lci_cmd(wmi_unified_t wmi_handle,
|
||||
struct wifi_pos_lci_info *lci_info);
|
||||
#endif /* _WMI_UNIFIED_AP_API_H_ */
|
||||
|
@@ -625,3 +625,12 @@ QDF_STATUS wmi_unified_send_lcr_cmd(wmi_unified_t wmi_handle,
|
||||
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
QDF_STATUS wmi_unified_send_lci_cmd(wmi_unified_t wmi_handle,
|
||||
struct wifi_pos_lci_info *lci_info)
|
||||
{
|
||||
if (wmi_handle->ops->send_lci_cmd)
|
||||
return wmi_handle->ops->send_lci_cmd(wmi_handle, lci_info);
|
||||
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
@@ -2654,6 +2654,65 @@ static QDF_STATUS send_lcr_cmd_tlv(wmi_unified_t wmi_handle,
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
static QDF_STATUS send_lci_cmd_tlv(wmi_unified_t wmi_handle,
|
||||
struct wifi_pos_lci_info *lci_info)
|
||||
{
|
||||
struct wmi_rtt_oem_req_head *req_head;
|
||||
struct wmi_rtt_oem_lci_cfg_head *lci_config;
|
||||
uint8_t req_head_len = sizeof(struct wmi_rtt_oem_req_head);
|
||||
uint32_t lci_cfg_head_len = sizeof(struct wmi_rtt_oem_lci_cfg_head);
|
||||
uint8_t *buf;
|
||||
uint32_t buf_len;
|
||||
|
||||
buf_len = req_head_len + lci_cfg_head_len;
|
||||
|
||||
buf = qdf_mem_malloc(buf_len * sizeof(uint8_t));
|
||||
if (!buf)
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
|
||||
qdf_mem_zero(buf, buf_len);
|
||||
|
||||
/* Adding the wmi_rtt_oem_req_head TLV */
|
||||
req_head = (struct wmi_rtt_oem_req_head *)buf;
|
||||
WMIRTT_TLV_SET_HDR(&req_head->tlv_header,
|
||||
WMIRTT_TLV_TAG_STRUC_wmi_rtt_oem_req_head,
|
||||
sizeof(struct wmi_rtt_oem_req_head));
|
||||
req_head->sub_type = RTT_MSG_SUBTYPE_CONFIGURE_LCI;
|
||||
req_head->pdev_id = wmi_handle->ops->convert_pdev_id_host_to_target(
|
||||
wmi_handle, lci_info->pdev_id);
|
||||
WMI_RTT_REQ_ID_SET((req_head->req_id), lci_info->req_id);
|
||||
|
||||
/* Adding the wmi_rtt_oem_lci_cfg_head TLV */
|
||||
lci_config = (struct wmi_rtt_oem_lci_cfg_head *)(buf + req_head_len);
|
||||
WMIRTT_TLV_SET_HDR(&lci_config->tlv_header,
|
||||
WMIRTT_TLV_TAG_STRUC_wmi_rtt_oem_lci_cfg_head,
|
||||
sizeof(struct wmi_rtt_oem_lci_cfg_head));
|
||||
|
||||
lci_config->latitude = lci_info->latitude;
|
||||
lci_config->longitude = lci_info->longitude;
|
||||
lci_config->altitude = lci_info->altitude;
|
||||
WMI_RTT_LCI_LAT_UNC_SET(lci_config->lci_cfg_param_info,
|
||||
lci_info->latitude_unc);
|
||||
WMI_RTT_LCI_LON_UNC_SET(lci_config->lci_cfg_param_info,
|
||||
lci_info->longitude_unc);
|
||||
WMI_RTT_LCI_ALT_UNC_SET(lci_config->lci_cfg_param_info,
|
||||
lci_info->altitude_unc);
|
||||
WMI_RTT_LCI_Z_MOTION_PAT_SET(lci_config->lci_cfg_param_info,
|
||||
lci_info->motion_pattern);
|
||||
lci_config->floor = lci_info->floor;
|
||||
WMI_RTT_LCI_Z_HEIGHT_ABV_FLR_SET(lci_config->floor_param_info,
|
||||
lci_info->height_above_floor);
|
||||
WMI_RTT_LCI_Z_HEIGHT_UNC_SET(lci_config->floor_param_info,
|
||||
lci_info->height_unc);
|
||||
lci_config->usage_rules = lci_info->usage_rules;
|
||||
|
||||
if (wmi_handle->ops->send_start_oem_data_cmd)
|
||||
return wmi_handle->ops->send_start_oem_data_cmd(wmi_handle,
|
||||
buf_len, buf);
|
||||
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
void wmi_ap_attach_tlv(wmi_unified_t wmi_handle)
|
||||
{
|
||||
struct wmi_ops *ops = wmi_handle->ops;
|
||||
@@ -2726,4 +2785,5 @@ void wmi_ap_attach_tlv(wmi_unified_t wmi_handle)
|
||||
ops->multisoc_tbtt_sync_cmd = send_multisoc_tbtt_sync_cmd_tlv;
|
||||
ops->set_radio_tx_mode_select_cmd = set_radio_tx_mode_select_cmd_tlv;
|
||||
ops->send_lcr_cmd = send_lcr_cmd_tlv;
|
||||
ops->send_lci_cmd = send_lci_cmd_tlv;
|
||||
}
|
||||
|
Reference in New Issue
Block a user