From 491ae1e5f744a38d067272f7e7f7bd5ef4d809bc Mon Sep 17 00:00:00 2001 From: Srinivas Dasari Date: Sun, 29 Mar 2020 11:30:49 +0530 Subject: [PATCH] qcacld-3.0: Unblock wait for NDP_END indcation if req is a failure When host driver sends NDP_END request to firmware, driver starts a wait-for-complete and waits for the NDP_END confirm event. It unblocks the wait upon getting successful NDP_END event from firmware. But firmware sends response with a failure status if the NDP is already gone and it doesn't send NDP_END event. NDP_END requester waits till the timeout(2 seconds) happens for the NDP_END confirm event from firmware in this case. Unblock the wait-for-complete in this case also to avoid the unnecessary wait. Change-Id: I779248455b07cd934ceaf2c23e79f3943aff5e41 CRs-Fixed: 2651663 --- components/nan/core/src/nan_main.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/components/nan/core/src/nan_main.c b/components/nan/core/src/nan_main.c index 326b6ead44..4da4438353 100644 --- a/components/nan/core/src/nan_main.c +++ b/components/nan/core/src/nan_main.c @@ -731,6 +731,7 @@ static QDF_STATUS nan_handle_ndp_end_rsp( { struct wlan_objmgr_psoc *psoc; struct nan_psoc_priv_obj *psoc_nan_obj; + struct osif_request *request; *vdev = rsp->vdev; psoc = wlan_vdev_get_psoc(rsp->vdev); @@ -745,6 +746,14 @@ static QDF_STATUS nan_handle_ndp_end_rsp( return QDF_STATUS_E_NULL_VALUE; } + /* Unblock the wait here if NDP_END request is a failure */ + if (rsp->status != 0) { + request = osif_request_get(psoc_nan_obj->request_context); + if (request) { + osif_request_complete(request); + osif_request_put(request); + } + } psoc_nan_obj->cb_obj.os_if_ndp_event_handler(psoc, rsp->vdev, NDP_END_RSP, rsp);