qcacld-3.0: Resolve unknown code issues in MTRACE logs

qcacld-2.0 to qcacld-3.0 propagation

Some MTRACE logs returns 'unknown code' instead of code and data passed
to MTRACE. To resolve this unknown code issues in MTRACE logs,
add any missing MTRACE code enums in corresponding trace functions.
Both mac_trace_msg_tx() and mac_trace_msg_rx() were not handling
eWniMsgTypes enums, we don't have module Id for SME to handle
in those functions itself. So, modified mac_trace_msg_tx() to mac_trace().

Change-Id: Ia994c971178e24843f652b67336afeaec5e949ab
CRs-Fixed: 871983
(cherry picked from commit 5e12a6f7a67de546c8567341f35707da61cf00b8)
diff --git a/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c b/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c
index 7ba3738..653ff56 100644
--- a/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c
+++ b/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c
@@ -107,7 +107,8 @@
 	msg.type = msg_type;
 	msg.bodyptr = sme_rsp;
 	msg.bodyval = 0;
-	MTRACE(mac_trace_msg_tx(mac_ctx, sme_session_id, msg.type));
+	MTRACE(mac_trace(mac_ctx, TRACE_CODE_TX_SME_MSG,
+			 sme_session_id, msg.type));
 
 #ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM    /* FEATURE_WLAN_DIAG_SUPPORT */
 	switch (msg_type) {
@@ -240,7 +241,7 @@
 	msg.type = sme_join_rsp->messageType;
 	msg.bodyptr = sme_join_rsp;
 	msg.bodyval = 0;
-	MTRACE(mac_trace_msg_tx(mac_ctx, NO_SESSION, msg.type));
+	MTRACE(mac_trace(mac_ctx, TRACE_CODE_TX_SME_MSG, NO_SESSION, msg.type));
 	lim_sys_process_mmh_msg_api(mac_ctx, &msg, ePROT);
 }
 
@@ -689,10 +690,11 @@
 	mmhMsg.bodyptr = pSirSmeRsp;
 	mmhMsg.bodyval = 0;
 	if (psessionEntry == NULL) {
-		MTRACE(mac_trace_msg_tx(pMac, NO_SESSION, mmhMsg.type));
+		MTRACE(mac_trace(pMac, TRACE_CODE_TX_SME_MSG,
+				 NO_SESSION, mmhMsg.type));
 	} else {
-		MTRACE(mac_trace_msg_tx
-			       (pMac, psessionEntry->peSessionId, mmhMsg.type));
+		MTRACE(mac_trace(pMac, TRACE_CODE_TX_SME_MSG,
+				 psessionEntry->peSessionId, mmhMsg.type));
 	}
 #ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM    /* FEATURE_WLAN_DIAG_SUPPORT */
 	lim_diag_event_report(pMac, WLAN_PE_DIAG_START_BSS_RSP_EVENT,
@@ -774,7 +776,7 @@
 	mmhMsg.bodyptr = pSirSmeScanRsp;
 	mmhMsg.bodyval = 0;
 
-	MTRACE(mac_trace_msg_tx(pMac, NO_SESSION, mmhMsg.type));
+	MTRACE(mac_trace(pMac, TRACE_CODE_TX_SME_MSG, NO_SESSION, mmhMsg.type));
 #ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM    /* FEATURE_WLAN_DIAG_SUPPORT */
 	lim_diag_event_report(pMac, WLAN_PE_DIAG_SCAN_RSP_EVENT, NULL,
 			      (uint16_t) resultCode, 0);
@@ -795,7 +797,7 @@
 	mmhMsg.bodyptr = pMsg;
 	mmhMsg.bodyval = 0;
 
-	MTRACE(mac_trace_msg_tx(pMac, NO_SESSION, mmhMsg.type));
+	MTRACE(mac_trace(pMac, TRACE_CODE_TX_SME_MSG, NO_SESSION, mmhMsg.type));
 
 	lim_sys_process_mmh_msg_api(pMac, &mmhMsg, ePROT);
 }
@@ -998,7 +1000,8 @@
 	mmhMsg.bodyptr = pSirSmeDisassocInd;
 	mmhMsg.bodyval = 0;
 
-	MTRACE(mac_trace_msg_tx(pMac, psessionEntry->peSessionId, mmhMsg.type));
+	MTRACE(mac_trace(pMac, TRACE_CODE_TX_SME_MSG,
+			 psessionEntry->peSessionId, mmhMsg.type));
 #ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM    /* FEATURE_WLAN_DIAG_SUPPORT */
 	lim_diag_event_report(pMac, WLAN_PE_DIAG_DISASSOC_IND_EVENT, psessionEntry,
 			      0, (uint16_t) pStaDs->mlmStaContext.disassocReason);
@@ -1454,7 +1457,7 @@
 		break;
 	}
 
-	MTRACE(mac_trace_msg_tx(mac_ctx, session_id, msg.type));
+	MTRACE(mac_trace(mac_ctx, TRACE_CODE_TX_SME_MSG, session_id, msg.type));
 	if (eSIR_SUCCESS != lim_sys_process_mmh_msg_api(mac_ctx, &msg, ePROT)) {
 		qdf_mem_free(wm_status_change_ntf);
 		lim_log(mac_ctx, LOGP,
@@ -1523,10 +1526,11 @@
 	mmhMsg.bodyptr = pSirSmeSetContextRsp;
 	mmhMsg.bodyval = 0;
 	if (NULL == psessionEntry) {
-		MTRACE(mac_trace_msg_tx(pMac, NO_SESSION, mmhMsg.type));
+		MTRACE(mac_trace(pMac, TRACE_CODE_TX_SME_MSG,
+				 NO_SESSION, mmhMsg.type));
 	} else {
-		MTRACE(mac_trace_msg_tx
-			       (pMac, psessionEntry->peSessionId, mmhMsg.type));
+		MTRACE(mac_trace(pMac, TRACE_CODE_TX_SME_MSG,
+				 psessionEntry->peSessionId, mmhMsg.type));
 	}
 
 #ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM    /* FEATURE_WLAN_DIAG_SUPPORT */
@@ -1617,7 +1621,7 @@
 	msgQ.type = eWNI_SME_NEIGHBOR_BSS_IND;
 	msgQ.bodyptr = pNewBssInd;
 	msgQ.bodyval = 0;
-	MTRACE(mac_trace_msg_tx(pMac, NO_SESSION, msgQ.type));
+	MTRACE(mac_trace(pMac, TRACE_CODE_TX_SME_MSG, NO_SESSION, msgQ.type));
 	lim_sys_process_mmh_msg_api(pMac, &msgQ, ePROT);
 } /*** end lim_send_sme_neighbor_bss_ind() ***/
 
@@ -1661,10 +1665,11 @@
 	mmhMsg.bodyptr = rsp;
 	mmhMsg.bodyval = 0;
 	if (NULL == psessionEntry) {
-		MTRACE(mac_trace_msg_tx(pMac, NO_SESSION, mmhMsg.type));
+		MTRACE(mac_trace(pMac, TRACE_CODE_TX_SME_MSG,
+				 NO_SESSION, mmhMsg.type));
 	} else {
-		MTRACE(mac_trace_msg_tx
-			       (pMac, psessionEntry->peSessionId, mmhMsg.type));
+		MTRACE(mac_trace(pMac, TRACE_CODE_TX_SME_MSG,
+				 psessionEntry->peSessionId, mmhMsg.type));
 	}
 #ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM    /* FEATURE_WLAN_DIAG_SUPPORT */
 	lim_diag_event_report(pMac, WLAN_PE_DIAG_ADDTS_RSP_EVENT, psessionEntry, 0,
@@ -1717,10 +1722,11 @@
 	mmhMsg.bodyptr = rsp;
 	mmhMsg.bodyval = 0;
 	if (NULL == psessionEntry) {
-		MTRACE(mac_trace_msg_tx(pMac, NO_SESSION, mmhMsg.type));
+		MTRACE(mac_trace(pMac, TRACE_CODE_TX_SME_MSG,
+				 NO_SESSION, mmhMsg.type));
 	} else {
-		MTRACE(mac_trace_msg_tx
-			       (pMac, psessionEntry->peSessionId, mmhMsg.type));
+		MTRACE(mac_trace(pMac, TRACE_CODE_TX_SME_MSG,
+				 psessionEntry->peSessionId, mmhMsg.type));
 	}
 #ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM    /* FEATURE_WLAN_DIAG_SUPPORT */
 	lim_diag_event_report(pMac, WLAN_PE_DIAG_DELTS_RSP_EVENT, psessionEntry,
@@ -1821,7 +1827,7 @@
 
 	mmhMsg.bodyptr = stats;
 	mmhMsg.bodyval = 0;
-	MTRACE(mac_trace_msg_tx(pMac, NO_SESSION, mmhMsg.type));
+	MTRACE(mac_trace(pMac, TRACE_CODE_TX_SME_MSG, NO_SESSION, mmhMsg.type));
 	lim_sys_process_mmh_msg_api(pMac, &mmhMsg, ePROT);
 
 	return;
@@ -1872,7 +1878,7 @@
 	mmhMsg.type = eWNI_SME_GET_TSM_STATS_RSP;
 	mmhMsg.bodyptr = pStats;
 	mmhMsg.bodyval = 0;
-	MTRACE(mac_trace_msg_tx(pMac, sessionId, mmhMsg.type));
+	MTRACE(mac_trace(pMac, TRACE_CODE_TX_SME_MSG, sessionId, mmhMsg.type));
 	lim_sys_process_mmh_msg_api(pMac, &mmhMsg, ePROT);
 
 	return;
@@ -1918,7 +1924,7 @@
 
 	mmhMsg.type = msgType;
 	mmhMsg.bodyptr = pNewPeerInd;
-	MTRACE(mac_trace_msg_tx(pMac, sessionId, mmhMsg.type));
+	MTRACE(mac_trace(pMac, TRACE_CODE_TX_SME_MSG, sessionId, mmhMsg.type));
 	lim_sys_process_mmh_msg_api(pMac, &mmhMsg, ePROT);
 
 }
@@ -2206,7 +2212,8 @@
 	mmhMsg.type = eWNI_SME_FT_AGGR_QOS_RSP;
 	mmhMsg.bodyptr = aggrQosRsp;
 	mmhMsg.bodyval = 0;
-	MTRACE(mac_trace_msg_tx(pMac, smesessionId, mmhMsg.type));
+	MTRACE(mac_trace(pMac, TRACE_CODE_TX_SME_MSG,
+			 smesessionId, mmhMsg.type));
 	lim_sys_process_mmh_msg_api(pMac, &mmhMsg, ePROT);
 
 	return;
@@ -2236,7 +2243,8 @@
 		       "eWNI_SME_MAX_ASSOC_EXCEEDED",
 		       MAC_ADDR_ARRAY(peerMacAddr));
 	       )
-	MTRACE(mac_trace_msg_tx(pMac, smesessionId, mmhMsg.type));
+	MTRACE(mac_trace(pMac, TRACE_CODE_TX_SME_MSG,
+			 smesessionId, mmhMsg.type));
 	lim_sys_process_mmh_msg_api(pMac, &mmhMsg, ePROT);
 
 	return;