From 24d272baff92b56fcd5832ac98eda012ccc4f0fa Mon Sep 17 00:00:00 2001 From: Will Huang Date: Fri, 7 Sep 2018 20:25:30 +0800 Subject: [PATCH] qcacld-3.0: Remove unneeded csr_nonscan_pending_ll_remove_entry() csr_nonscan_pending_ll_remove_entry() is not a correct API to remove command from non-scan pending queue, it always return false and fail to insert command to local list. The correct API to remove an entry is csr_release_command(), no need to check entry when insert to local list. Remove the wrong API csr_nonscan_pending_ll_remove_entry(). Change-Id: I6c81f5d4ae57ceb6ebf2eec0a63859d0c1f12cb1 CRs-Fixed: 2308863 --- core/sme/inc/csr_internal.h | 3 --- core/sme/src/csr/csr_api_roam.c | 8 +++----- core/sme/src/csr/csr_api_scan.c | 12 ++++-------- core/sme/src/csr/csr_util.c | 12 ------------ 4 files changed, 7 insertions(+), 28 deletions(-) diff --git a/core/sme/inc/csr_internal.h b/core/sme/inc/csr_internal.h index 49d65d392bb7..0baf10bc519a 100644 --- a/core/sme/inc/csr_internal.h +++ b/core/sme/inc/csr_internal.h @@ -1360,9 +1360,6 @@ bool csr_nonscan_pending_ll_is_list_empty( bool csr_nonscan_active_ll_remove_entry( struct sAniSirGlobal *mac_ctx, tListElem *pEntryToRemove, bool inter_locked); -bool csr_nonscan_pending_ll_remove_entry( - struct sAniSirGlobal *mac_ctx, - tListElem *pEntryToRemove, bool inter_locked); tListElem *csr_nonscan_active_ll_peek_head( struct sAniSirGlobal *mac_ctx, bool inter_locked); diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index 6ea2560c0335..012079d63baf 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -4071,11 +4071,9 @@ static void csr_roam_remove_duplicate_pending_cmd_from_list( !CSR_IS_DISCONNECT_COMMAND(dup_cmd))))) { sme_debug("RoamReason: %d", dup_cmd->u.roamCmd.roamReason); - /* Remove the roam command from the pending list */ - if (csr_nonscan_pending_ll_remove_entry(mac_ctx, - entry, LL_ACCESS_NOLOCK)) - csr_ll_insert_tail(&local_list, entry, - LL_ACCESS_NOLOCK); + /* Insert to local_list and remove later */ + csr_ll_insert_tail(&local_list, entry, + LL_ACCESS_NOLOCK); } entry = next_entry; } diff --git a/core/sme/src/csr/csr_api_scan.c b/core/sme/src/csr/csr_api_scan.c index 4737e574bf7e..a2ad3a05a9ef 100644 --- a/core/sme/src/csr/csr_api_scan.c +++ b/core/sme/src/csr/csr_api_scan.c @@ -1887,14 +1887,10 @@ QDF_STATUS csr_remove_nonscan_cmd_from_pending_list(tpAniSirGlobal pMac, if ((pCommand->command == commandType) && (pCommand->sessionId == sessionId)) { - /* Remove that entry only */ - if (csr_nonscan_pending_ll_remove_entry(pMac, - pEntryToRemove, - LL_ACCESS_NOLOCK)) { - csr_ll_insert_tail(&localList, pEntryToRemove, - LL_ACCESS_NOLOCK); - status = QDF_STATUS_SUCCESS; - } + /* Insert to localList and remove later */ + csr_ll_insert_tail(&localList, pEntryToRemove, + LL_ACCESS_NOLOCK); + status = QDF_STATUS_SUCCESS; } } csr_nonscan_pending_ll_unlock(pMac); diff --git a/core/sme/src/csr/csr_util.c b/core/sme/src/csr/csr_util.c index cf87f23300b8..598d6f46c999 100644 --- a/core/sme/src/csr/csr_util.c +++ b/core/sme/src/csr/csr_util.c @@ -541,18 +541,6 @@ bool csr_nonscan_active_ll_remove_entry(struct sAniSirGlobal *mac_ctx, return false; } -bool csr_nonscan_pending_ll_remove_entry(struct sAniSirGlobal *mac_ctx, - tListElem *entry, bool inter_locked) -{ - tListElem *head; - - head = csr_nonscan_pending_ll_next(mac_ctx, entry, inter_locked); - if (head == entry) - return true; - - return false; -} - tListElem *csr_nonscan_active_ll_remove_head(struct sAniSirGlobal *mac_ctx, bool inter_locked) {