Browse Source

qcacld-3.0: Correct WMI TX status check in lim

WMI TX status follows WMI_MGMT_TX_COMP_STATUS_TYPE where 0 indicates
success: WMI_MGMT_TX_COMP_TYPE_COMPLETE_OK and failure otherwise.

Change-Id: I67bed733196a1c9650f43042881b7f37e3a81faa
CRs-Fixed: 2141363
Zhu Jianmin 7 years ago
parent
commit
5d8e3fe544

+ 3 - 1
core/mac/src/pe/lim/lim_process_tdls.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -500,6 +500,8 @@ static QDF_STATUS lim_mgmt_tdls_tx_complete(void *context,
 	pe_debug("tdls_frm_session_id: %x tx_complete: %x",
 		mac_ctx->lim.tdls_frm_session_id, tx_complete);
 
+	tx_complete =
+		(tx_complete == WMI_MGMT_TX_COMP_TYPE_COMPLETE_OK) ? 1 : 0;
 	if (NO_SESSION != mac_ctx->lim.tdls_frm_session_id) {
 		lim_send_sme_mgmt_tx_completion(mac_ctx,
 				mac_ctx->lim.tdls_frm_session_id,

+ 5 - 4
core/mac/src/pe/lim/lim_send_management_frames.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011-2017 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2018 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -1610,7 +1610,7 @@ static QDF_STATUS lim_assoc_tx_complete_cnf(void *context,
 	tpAniSirGlobal mac_ctx = (tpAniSirGlobal)context;
 
 	pe_debug("tx_complete= %d", tx_complete);
-	if (tx_complete) {
+	if (tx_complete == WMI_MGMT_TX_COMP_TYPE_COMPLETE_OK) {
 		assoc_ack_status = ACKED;
 		reason_code = eSIR_SUCCESS;
 	} else {
@@ -2108,8 +2108,9 @@ static QDF_STATUS lim_auth_tx_complete_cnf(void *context,
 	uint16_t reason_code;
 
 	pe_debug("tx_complete = %d %s", tx_complete,
-		(tx_complete ? "success":"fail"));
-	if (tx_complete) {
+		(tx_complete == WMI_MGMT_TX_COMP_TYPE_COMPLETE_OK) ?
+		 "success" : "fail");
+	if (tx_complete == WMI_MGMT_TX_COMP_TYPE_COMPLETE_OK) {
 		mac_ctx->auth_ack_status = LIM_AUTH_ACK_RCD_SUCCESS;
 		auth_ack_status = ACKED;
 		reason_code = eSIR_SUCCESS;