Selaa lähdekoodia

qcacmn: Remove NDP_HOST_UPDATE processing

Firmware sends NDP_HOST_UPDATE event as an immediate response to this
request and starts cleaning peers one by one. Once an NDP session is
ended (indicating NDP_END to peer + internal cleanup), firmware sends
NDP_END_IND to host.
Currently, host driver stops the wait timer and change state from NDP
end to disconnected upon receiving the NDP_HOST_UPDATE. But firmware
might still be in the process of NDP cleanup. As the NDP_END_ALL
context is unblocked, driver may send NAN disable request to firmware.
This may cause inconsistency in firmware state machine and firmware may
drop the ongoing NDP_END request. So, peer doesn't get the NDP_END frame
in such cases.
Unblock the NDP_END_ALL-wait call only upon last NDP_END indication to
avoid such issues. This change moves the major functionality of
NDP_HOST_UPDATE processing to last NDP_END indication. Cleanup/remove
the processing of NDP_HOST_UPDATE as it's not needed anymore.

Change-Id: I00e73d211de4626484ffb2483c00adce1a7302c1
CRs-Fixed: 3512923
Rahul Gusain 2 vuotta sitten
vanhempi
sitoutus
f5f76bb000

+ 0 - 10
wmi/inc/wmi_unified_nan_api.h

@@ -193,14 +193,4 @@ QDF_STATUS wmi_extract_nan_event_rsp(wmi_unified_t wmi_handle, void *evt_buf,
 				     struct nan_event_params *temp_evt_params,
 				     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_ */

+ 0 - 2
wmi/inc/wmi_unified_priv.h

@@ -2471,8 +2471,6 @@ QDF_STATUS (*extract_ndp_end_ind)(wmi_unified_t wmi_handle,
 		uint8_t *data, struct nan_datapath_end_indication_event **ind);
 QDF_STATUS (*extract_ndp_sch_update)(wmi_unified_t wmi_handle,
 		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 */
 
 QDF_STATUS (*send_obss_detection_cfg_cmd)(wmi_unified_t wmi_handle,

+ 1 - 10
wmi/src/wmi_unified_nan_api.c

@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2013-2020 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2023 Qualcomm Innovation Center, Inc. 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
@@ -178,13 +179,3 @@ QDF_STATUS wmi_extract_ndp_sch_update(wmi_unified_t wmi_handle, uint8_t *data,
 
 	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;
-}

+ 0 - 26
wmi/src/wmi_unified_nan_tlv.c

@@ -655,31 +655,6 @@ static QDF_STATUS nan_ndp_end_req_tlv(wmi_unified_t wmi_handle,
 	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,
 			uint8_t *data, struct nan_datapath_initiator_rsp *rsp)
 {
@@ -1251,5 +1226,4 @@ void wmi_nan_attach_tlv(wmi_unified_t wmi_handle)
 	ops->extract_ndp_end_rsp = extract_ndp_end_rsp_tlv;
 	ops->extract_ndp_end_ind = extract_ndp_end_ind_tlv;
 	ops->extract_ndp_sch_update = extract_ndp_sch_update_tlv;
-	ops->extract_ndp_host_event = extract_ndp_host_event_tlv;
 }