From 8070934344a8fbc918f4353a89c539d964b5be7d Mon Sep 17 00:00:00 2001 From: Naveen Rawat Date: Wed, 5 Jul 2017 15:35:05 -0700 Subject: [PATCH] qcacld-3.0: Send correct tSirResultCodes on ROC response at LIM Function lim_send_sme_rsp expects error code of tSirResultCodes type. Convert QDF_STATUS to tSirResultCodes before sending. Change-Id: I488167a22e8199455342a1ef3a17b0470d95b5bb CRs-Fixed: 2071677 --- core/mac/src/pe/lim/lim_p2p.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/core/mac/src/pe/lim/lim_p2p.c b/core/mac/src/pe/lim/lim_p2p.c index d67980a0652a..f9419864c3c5 100644 --- a/core/mac/src/pe/lim/lim_p2p.c +++ b/core/mac/src/pe/lim/lim_p2p.c @@ -137,7 +137,9 @@ int lim_process_remain_on_chnl_req(tpAniSirGlobal pMac, uint32_t *pMsg) if (status != QDF_STATUS_SUCCESS) { /* Post the meessage to Sme */ lim_send_sme_rsp(pMac, eWNI_SME_REMAIN_ON_CHN_RSP, - status, msgbuff->sessionId, msgbuff->scan_id); + eSIR_SME_HAL_SEND_MESSAGE_FAIL, + msgbuff->sessionId, + msgbuff->scan_id); qdf_mem_free(pMac->lim.gpLimRemainOnChanReq); pMac->lim.gpLimRemainOnChanReq = NULL; } @@ -338,9 +340,16 @@ void lim_remain_on_chn_rsp(tpAniSirGlobal pMac, QDF_STATUS status, uint32_t *dat } /* Post the meessage to Sme */ - lim_send_sme_rsp(pMac, eWNI_SME_REMAIN_ON_CHN_RSP, - status, - MsgRemainonChannel->sessionId, 0); + if (QDF_IS_STATUS_SUCCESS(status)) + lim_send_sme_rsp(pMac, eWNI_SME_REMAIN_ON_CHN_RSP, + eSIR_SME_SUCCESS, + MsgRemainonChannel->sessionId, + 0); + else + lim_send_sme_rsp(pMac, eWNI_SME_REMAIN_ON_CHN_RSP, + eSIR_SME_REFUSED, + MsgRemainonChannel->sessionId, + 0); qdf_mem_free(pMac->lim.gpLimRemainOnChanReq); pMac->lim.gpLimRemainOnChanReq = NULL;