Browse Source

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
Padma, Santhosh Kumar 8 years ago
parent
commit
ae6ae24d50
1 changed files with 3 additions and 1 deletions
  1. 3 1
      core/mac/src/pe/lim/lim_p2p.c

+ 3 - 1
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;