qcacld-3.0: Block NDP_END_ALL req till last NDP_END is received
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: I19d3e40700c1c0501b9c809820262472bf9bdba4 CRs-Fixed: 3512847
This commit is contained in:

committed by
Rahul Choudhary

parent
9df82708b2
commit
54c2fe240a
@@ -956,7 +956,6 @@ QDF_STATUS
|
||||
ucfg_nan_disable_ndi(struct wlan_objmgr_psoc *psoc, uint32_t ndi_vdev_id)
|
||||
{
|
||||
enum nan_datapath_state curr_ndi_state;
|
||||
struct nan_datapath_host_event *event;
|
||||
struct nan_vdev_priv_obj *ndi_vdev_priv;
|
||||
struct nan_datapath_end_all_ndps req = {0};
|
||||
struct wlan_objmgr_vdev *ndi_vdev;
|
||||
@@ -964,7 +963,7 @@ ucfg_nan_disable_ndi(struct wlan_objmgr_psoc *psoc, uint32_t ndi_vdev_id)
|
||||
QDF_STATUS status;
|
||||
int err;
|
||||
static const struct osif_request_params params = {
|
||||
.priv_size = sizeof(struct nan_datapath_host_event),
|
||||
.priv_size = 0,
|
||||
.timeout_ms = 1000,
|
||||
};
|
||||
|
||||
@@ -1010,7 +1009,6 @@ ucfg_nan_disable_ndi(struct wlan_objmgr_psoc *psoc, uint32_t ndi_vdev_id)
|
||||
|
||||
if (QDF_IS_STATUS_ERROR(status)) {
|
||||
nan_err("Unable to disable NDP's on NDI");
|
||||
wlan_objmgr_vdev_release_ref(ndi_vdev, WLAN_NAN_ID);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
@@ -1023,18 +1021,7 @@ ucfg_nan_disable_ndi(struct wlan_objmgr_psoc *psoc, uint32_t ndi_vdev_id)
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
event = osif_request_priv(request);
|
||||
if (!event->ndp_termination_in_progress) {
|
||||
nan_err("Failed to terminate NDP's on NDI");
|
||||
status = QDF_STATUS_E_FAILURE;
|
||||
} else {
|
||||
/*
|
||||
* Host can assume NDP delete is successful and
|
||||
* remove policy mgr entry
|
||||
*/
|
||||
policy_mgr_decr_session_set_pcl(psoc, QDF_NDI_MODE,
|
||||
ndi_vdev_id);
|
||||
}
|
||||
policy_mgr_decr_session_set_pcl(psoc, QDF_NDI_MODE, ndi_vdev_id);
|
||||
|
||||
cleanup:
|
||||
/* Restore original NDI state in case of failure */
|
||||
@@ -1043,6 +1030,8 @@ cleanup:
|
||||
else
|
||||
ucfg_nan_set_ndi_state(ndi_vdev, curr_ndi_state);
|
||||
|
||||
wlan_objmgr_vdev_release_ref(ndi_vdev, WLAN_NAN_ID);
|
||||
|
||||
if (request)
|
||||
osif_request_put(request);
|
||||
|
||||
|
Reference in New Issue
Block a user