From 04476d6eb8a2b0a395ea092be59c83725a0259df Mon Sep 17 00:00:00 2001 From: gaurank kathpalia Date: Wed, 2 May 2018 12:30:52 +0530 Subject: [PATCH] qcacld-3.0: Remove dead code from wma_tx_packet In the PI wma_tx_packet, host assigns downld_comp_required to true/false according to tx_frm_download_comp_cb, is_high_latency, tx_frm_ota_comp_cb, all the three conditions to be true. Also the host checks tx_frm_download_comp_cb, and assigns tx_frm_index according to downld_comp_required, but in the else case when tx_frm_download_comp_cb is false, the check of downld_comp_required is void, as the downld_comp_required cannot be true if prior tx_frm_download_comp_cb is false, so the code in the else part which checks tx_frm_download_comp_cb and assigns tx_frm_index is dead, and in any case cannot be executed. Fix is to remove the check of downld_comp_required in the else case. Change-Id: If1a376099234d541d508f18cee075dd0f1603294 CRs-Fixed: 2233558 --- core/wma/src/wma_data.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/core/wma/src/wma_data.c b/core/wma/src/wma_data.c index e769d6ab88..007d5c4e99 100644 --- a/core/wma/src/wma_data.c +++ b/core/wma/src/wma_data.c @@ -2686,12 +2686,8 @@ QDF_STATUS wma_tx_packet(void *wma_context, void *tx_frame, uint16_t frmLen, tx_frm_index = GENERIC_NODOWLOAD_ACK_COMP_INDEX; } else { - if (downld_comp_required) - tx_frm_index = - GENERIC_DOWNLD_COMP_NOACK_COMP_INDEX; - else - tx_frm_index = - GENERIC_NODOWNLD_NOACK_COMP_INDEX; + tx_frm_index = + GENERIC_NODOWNLD_NOACK_COMP_INDEX; } }