From 8e652c0e589da9c0f3fa8b91ef9f8fd661bb16e2 Mon Sep 17 00:00:00 2001 From: Srinivas Dasari Date: Wed, 22 Apr 2020 17:58:33 +0530 Subject: [PATCH] qcacld-3.0: Remove NDP_END_ALL request from serialization queue Currently NDP_END_ALL request is posted to serialization queue but not removed even after getting response from firmware. The timer expires after 4 seconds and the message is gets dequeued as part of timer handler. Dequeue the request from queue after getting NDP_HOST_UPDATE from firmware to avoid blocking the northbound APIs for this 4 seconds. Change-Id: Ie8045f2460f7ac27732d4070ed79e5a61aab0bd2 CRs-Fixed: 2662869 --- components/nan/core/src/nan_main.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/components/nan/core/src/nan_main.c b/components/nan/core/src/nan_main.c index 817a966a231b..ac60edf7f01a 100644 --- a/components/nan/core/src/nan_main.c +++ b/components/nan/core/src/nan_main.c @@ -957,16 +957,19 @@ static QDF_STATUS nan_handle_schedule_update( } /** - * nan_handle_host_update: Updates Host about NAN Datapath status, called by - * NAN modules's Datapath event handler. + * nan_handle_host_update() - Updates Host about NAN Datapath status + * @evt: Event data received from firmware + * @vdev: pointer to vdev * * Return: status of operation */ -static QDF_STATUS nan_handle_host_update(struct nan_datapath_host_event *evt) +static QDF_STATUS nan_handle_host_update(struct nan_datapath_host_event *evt, + struct wlan_objmgr_vdev **vdev) { struct wlan_objmgr_psoc *psoc; struct nan_psoc_priv_obj *psoc_nan_obj; + *vdev = evt->vdev; psoc = wlan_vdev_get_psoc(evt->vdev); if (!psoc) { nan_err("psoc is NULL"); @@ -1074,7 +1077,9 @@ QDF_STATUS nan_datapath_event_handler(struct scheduler_msg *pe_msg) nan_handle_schedule_update(pe_msg->bodyptr); break; case NDP_HOST_UPDATE: - nan_handle_host_update(pe_msg->bodyptr); + nan_handle_host_update(pe_msg->bodyptr, &cmd.vdev); + cmd.cmd_type = WLAN_SER_CMD_NDP_END_ALL_REQ; + wlan_serialization_remove_cmd(&cmd); break; default: nan_alert("Unhandled NDP event: %d", pe_msg->type);