Revert "qcacmn: Remove NDP_HOST_UPDATE processing"

This reverts commit f5f76bb000.

Change-Id: Id93549d8d8d2607c97f0b800e3377bb632490882
CRs-Fixed: 3523829
This commit is contained in:
Rahul Gusain
2023-06-08 12:03:13 +05:30
committed by Rahul Choudhary
parent a013c998bd
commit cd42d68e8d
4 changed files with 48 additions and 0 deletions

View File

@@ -193,4 +193,14 @@ QDF_STATUS wmi_extract_nan_event_rsp(wmi_unified_t wmi_handle, void *evt_buf,
struct nan_event_params *temp_evt_params, struct nan_event_params *temp_evt_params,
uint8_t **nan_msg_buf); uint8_t **nan_msg_buf);
/**
* wmi_extract_ndp_host_event - api to extract ndp event from event buffer
* @wmi_handle: wmi handle
* @data: event buffer
* @evt: event buffer to populate
*
* Return: status of operation
*/
QDF_STATUS wmi_extract_ndp_host_event(wmi_unified_t wmi_handle, uint8_t *data,
struct nan_datapath_host_event *evt);
#endif /* _WMI_UNIFIED_NAN_API_H_ */ #endif /* _WMI_UNIFIED_NAN_API_H_ */

View File

@@ -2471,6 +2471,8 @@ QDF_STATUS (*extract_ndp_end_ind)(wmi_unified_t wmi_handle,
uint8_t *data, struct nan_datapath_end_indication_event **ind); uint8_t *data, struct nan_datapath_end_indication_event **ind);
QDF_STATUS (*extract_ndp_sch_update)(wmi_unified_t wmi_handle, QDF_STATUS (*extract_ndp_sch_update)(wmi_unified_t wmi_handle,
uint8_t *data, struct nan_datapath_sch_update_event *ind); uint8_t *data, struct nan_datapath_sch_update_event *ind);
QDF_STATUS (*extract_ndp_host_event)(wmi_unified_t wmi_handle, uint8_t *data,
struct nan_datapath_host_event *evt);
#endif /* WLAN_FEATURE_NAN */ #endif /* WLAN_FEATURE_NAN */
QDF_STATUS (*send_obss_detection_cfg_cmd)(wmi_unified_t wmi_handle, QDF_STATUS (*send_obss_detection_cfg_cmd)(wmi_unified_t wmi_handle,

View File

@@ -179,3 +179,13 @@ QDF_STATUS wmi_extract_ndp_sch_update(wmi_unified_t wmi_handle, uint8_t *data,
return QDF_STATUS_E_FAILURE; return QDF_STATUS_E_FAILURE;
} }
QDF_STATUS wmi_extract_ndp_host_event(wmi_unified_t wmi_handle, uint8_t *data,
struct nan_datapath_host_event *evt)
{
if (wmi_handle->ops->extract_ndp_host_event)
return wmi_handle->ops->extract_ndp_host_event(wmi_handle,
data, evt);
return QDF_STATUS_E_FAILURE;
}

View File

@@ -655,6 +655,31 @@ static QDF_STATUS nan_ndp_end_req_tlv(wmi_unified_t wmi_handle,
return status; return status;
} }
static QDF_STATUS
extract_ndp_host_event_tlv(wmi_unified_t wmi_handle, uint8_t *data,
struct nan_datapath_host_event *evt)
{
WMI_NDP_EVENTID_param_tlvs *event;
wmi_ndp_event_param *fixed_params;
event = (WMI_NDP_EVENTID_param_tlvs *)data;
fixed_params = event->fixed_param;
evt->vdev =
wlan_objmgr_get_vdev_by_id_from_psoc(wmi_handle->soc->wmi_psoc,
fixed_params->vdev_id,
WLAN_NAN_ID);
if (!evt->vdev) {
wmi_err("vdev is null");
return QDF_STATUS_E_INVAL;
}
evt->ndp_termination_in_progress =
fixed_params->ndp_termination_in_progress ? true : false;
return QDF_STATUS_SUCCESS;
}
static QDF_STATUS extract_ndp_initiator_rsp_tlv(wmi_unified_t wmi_handle, static QDF_STATUS extract_ndp_initiator_rsp_tlv(wmi_unified_t wmi_handle,
uint8_t *data, struct nan_datapath_initiator_rsp *rsp) uint8_t *data, struct nan_datapath_initiator_rsp *rsp)
{ {
@@ -1226,4 +1251,5 @@ void wmi_nan_attach_tlv(wmi_unified_t wmi_handle)
ops->extract_ndp_end_rsp = extract_ndp_end_rsp_tlv; ops->extract_ndp_end_rsp = extract_ndp_end_rsp_tlv;
ops->extract_ndp_end_ind = extract_ndp_end_ind_tlv; ops->extract_ndp_end_ind = extract_ndp_end_ind_tlv;
ops->extract_ndp_sch_update = extract_ndp_sch_update_tlv; ops->extract_ndp_sch_update = extract_ndp_sch_update_tlv;
ops->extract_ndp_host_event = extract_ndp_host_event_tlv;
} }