From 1ad9ff90260c71831640c4aa365c422e182a19dd Mon Sep 17 00:00:00 2001 From: Prathyusha Guduri Date: Tue, 25 Jun 2019 19:50:57 +0530 Subject: [PATCH] qcacmn: Correct tx_encap_type check In exception path correct tx_encap_type check Change-Id: I777202f593d4f37b2d51f5c4c9d6cd3e183e911a --- dp/wifi3.0/dp_tx.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dp/wifi3.0/dp_tx.c b/dp/wifi3.0/dp_tx.c index 4925a3e5c5..2024e52020 100644 --- a/dp/wifi3.0/dp_tx.c +++ b/dp/wifi3.0/dp_tx.c @@ -1881,8 +1881,9 @@ static bool dp_check_exc_metadata(struct cdp_tx_exception_metadata *tx_exc) { bool invalid_tid = (tx_exc->tid > DP_MAX_TIDS && tx_exc->tid != HTT_INVALID_TID); - bool invalid_encap_type = (tx_exc->tid > DP_MAX_TIDS && tx_exc->tid != - HTT_INVALID_TID); + bool invalid_encap_type = + (tx_exc->tx_encap_type > htt_cmn_pkt_num_types && + tx_exc->tx_encap_type != CDP_INVALID_TX_ENCAP_TYPE); bool invalid_sec_type = (tx_exc->sec_type > cdp_num_sec_types && tx_exc->sec_type != CDP_INVALID_SEC_TYPE); bool invalid_cookie = (tx_exc->is_tx_sniffer == 1 &&