From e6b951b7e998c7fa38e1635c5f78dd3e6a23b79a Mon Sep 17 00:00:00 2001 From: Abhishek Singh Date: Fri, 11 Oct 2019 09:14:08 +0530 Subject: [PATCH] qcacld-3.0: Add proper queue_type in cancel command request If proper queue_type is not added the serialization command is not removed from the queue. Thus the connect command is not removed from pending queue on receiving the disconnect command. This lead to HDD and SME out of sync with SME in connected state and HDD in disconnected state. Thus during stop adapter HDD doesn't try to disconnect the connected session. Thus add queue_type as active or pending while calling cancel cmd. Change-Id: I4af2c63a895065aefbb76609808a972354460cb2 CRs-Fixed: 2543246 --- core/sme/src/csr/csr_api_roam.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index 0bdbc210411d..315d21fdecad 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -19946,12 +19946,11 @@ void csr_release_command(struct mac_context *mac_ctx, tSmeCmd *sme_cmd) } qdf_mem_zero(&cmd_info, sizeof(struct wlan_serialization_queued_cmd_info)); - - sme_debug("filled cmd_id = %d", sme_cmd->cmd_id); cmd_info.cmd_id = sme_cmd->cmd_id; cmd_info.req_type = WLAN_SER_CANCEL_NON_SCAN_CMD; cmd_info.cmd_type = csr_get_cmd_type(sme_cmd); cmd_info.vdev = vdev; + sme_debug("cmd_id = %d type %d", sme_cmd->cmd_id, cmd_info.cmd_type); qdf_mem_zero(&cmd, sizeof(struct wlan_serialization_command)); cmd.cmd_id = cmd_info.cmd_id; cmd.cmd_type = cmd_info.cmd_type; @@ -19960,11 +19959,13 @@ void csr_release_command(struct mac_context *mac_ctx, tSmeCmd *sme_cmd) mac_ctx->psoc, &cmd)) { sme_debug("Releasing active cmd_id[%d] cmd_type[%d]", cmd_info.cmd_id, cmd_info.cmd_type); + cmd_info.queue_type = WLAN_SERIALIZATION_ACTIVE_QUEUE; wlan_serialization_remove_cmd(&cmd_info); } else if (wlan_serialization_is_cmd_present_in_pending_queue( mac_ctx->psoc, &cmd)) { sme_debug("Releasing pending cmd_id[%d] cmd_type[%d]", cmd_info.cmd_id, cmd_info.cmd_type); + cmd_info.queue_type = WLAN_SERIALIZATION_PENDING_QUEUE; wlan_serialization_cancel_request(&cmd_info); } else { sme_debug("can't find cmd_id[%d] cmd_type[%d]",