From ae6ae24d5000bbebe078b9303c4e6bc8b8d28b21 Mon Sep 17 00:00:00 2001 From: "Padma, Santhosh Kumar" Date: Wed, 5 Oct 2016 19:45:07 +0530 Subject: [PATCH] qcacld-3.0: Fix mgmtFrameSessionId in lim_send_p2p_action_frame Cleanup as part of lim_p2p_action_cnf triggers only when mgmtFrameSessionId is not 0xff. If cleanup does not happen in error scenario, it can result in not clearing cfgState->buf which can lead to dropping of further action frames in __wlan_hdd_mgmt_tx. Fix this by filling mgmtFrameSessionId with proper session id. Change-Id: Icc0f5b576ff71776dc448a673b6e12defe0c514e CRs-Fixed: 1074565 --- core/mac/src/pe/lim/lim_p2p.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/mac/src/pe/lim/lim_p2p.c b/core/mac/src/pe/lim/lim_p2p.c index 9485f127d6e1..096f78a16581 100644 --- a/core/mac/src/pe/lim/lim_p2p.c +++ b/core/mac/src/pe/lim/lim_p2p.c @@ -468,6 +468,7 @@ static void lim_tx_action_frame(tpAniSirGlobal mac_ctx, * need to go at OFDM rates. And BD rate2 we configured at 6Mbps. */ tx_flag |= HAL_USE_BD_RATE2_FOR_MANAGEMENT_FRAME; + mac_ctx->lim.mgmtFrameSessionId = sme_session_id; if ((SIR_MAC_MGMT_PROBE_RSP == fc->subType) || (mb_msg->noack)) { @@ -483,7 +484,6 @@ static void lim_tx_action_frame(tpAniSirGlobal mac_ctx, true : false); mac_ctx->lim.mgmtFrameSessionId = 0xff; } else { - mac_ctx->lim.mgmtFrameSessionId = mb_msg->sessionId; qdf_status = wma_tx_frameWithTxComplete(mac_ctx, packet, (uint16_t) msg_len, @@ -550,7 +550,9 @@ void lim_send_p2p_action_frame(tpAniSirGlobal mac_ctx, if ((!mac_ctx->lim.gpLimRemainOnChanReq) && (0 != mb_msg->wait)) { lim_log(mac_ctx, LOGE, FL("RemainOnChannel is not running")); + mac_ctx->lim.mgmtFrameSessionId = mb_msg->sessionId; lim_p2p_action_cnf(mac_ctx, false); + mac_ctx->lim.mgmtFrameSessionId = 0xff; return; } sme_session_id = mb_msg->sessionId;