qcacld-3.0: Add QDF list API's

Replace CDF list API's with QDF list API's

Change-Id: Id7a3ec93fe6821450ef70e50649af8a4de285eeb
CRs-Fixed: 981188
diff --git a/core/mac/src/pe/lim/lim_api.c b/core/mac/src/pe/lim/lim_api.c
index 97ec092..0fcf378 100644
--- a/core/mac/src/pe/lim/lim_api.c
+++ b/core/mac/src/pe/lim/lim_api.c
@@ -607,7 +607,7 @@
 #endif
 
 	cdf_mutex_init(&pMac->lim.lim_frame_register_lock);
-	cdf_list_init(&pMac->lim.gLimMgmtFrameRegistratinQueue, 0);
+	qdf_list_create(&pMac->lim.gLimMgmtFrameRegistratinQueue, 0);
 
 	/* Initialize the configurations needed by PE */
 	if (eSIR_FAILURE == __lim_init_config(pMac)) {
@@ -657,16 +657,16 @@
 
 	if (CDF_GLOBAL_FTM_MODE != cds_get_conparam()) {
 		cdf_mutex_acquire(&pMac->lim.lim_frame_register_lock);
-		while (cdf_list_remove_front(
+		while (qdf_list_remove_front(
 			&pMac->lim.gLimMgmtFrameRegistratinQueue,
-			(cdf_list_node_t **) &pLimMgmtRegistration) ==
-			CDF_STATUS_SUCCESS) {
+			(qdf_list_node_t **) &pLimMgmtRegistration) ==
+			QDF_STATUS_SUCCESS) {
 			CDF_TRACE(CDF_MODULE_ID_PE, CDF_TRACE_LEVEL_INFO,
 			FL("Fixing leak! Deallocating pLimMgmtRegistration node"));
 			cdf_mem_free(pLimMgmtRegistration);
 		}
 		cdf_mutex_release(&pMac->lim.lim_frame_register_lock);
-		cdf_list_destroy(&pMac->lim.gLimMgmtFrameRegistratinQueue);
+		qdf_list_destroy(&pMac->lim.gLimMgmtFrameRegistratinQueue);
 	}
 
 	lim_cleanup_mlm(pMac);
diff --git a/core/mac/src/pe/lim/lim_process_message_queue.c b/core/mac/src/pe/lim/lim_process_message_queue.c
index a8a0d8b..11bca80 100644
--- a/core/mac/src/pe/lim/lim_process_message_queue.c
+++ b/core/mac/src/pe/lim/lim_process_message_queue.c
@@ -514,7 +514,7 @@
 	/* checking for global SME state... */
 	uint8_t *pRxPacketInfo;
 	lim_get_b_dfrom_rx_packet(pMac, pMsg->bodyptr,
-				  (uint32_t * *) &pRxPacketInfo);
+				  (uint32_t **) &pRxPacketInfo);
 
 	/* This function should not be called if beacon is received in scan state. */
 	/* So not doing any checks for the global state. */
@@ -644,7 +644,7 @@
 	uint16_t frm_len;
 	uint8_t type, sub_type;
 	bool match = false;
-	CDF_STATUS cdf_status;
+	QDF_STATUS qdf_status;
 
 	hdr = WMA_GET_RX_MAC_HEADER(buff_desc);
 	fc = hdr->fc;
@@ -653,8 +653,8 @@
 	frm_len = WMA_GET_RX_PAYLOAD_LEN(buff_desc);
 
 	cdf_mutex_acquire(&mac_ctx->lim.lim_frame_register_lock);
-	cdf_list_peek_front(&mac_ctx->lim.gLimMgmtFrameRegistratinQueue,
-			    (cdf_list_node_t **) &mgmt_frame);
+	qdf_list_peek_front(&mac_ctx->lim.gLimMgmtFrameRegistratinQueue,
+			    (qdf_list_node_t **) &mgmt_frame);
 	cdf_mutex_release(&mac_ctx->lim.lim_frame_register_lock);
 
 	while (mgmt_frame != NULL) {
@@ -684,11 +684,11 @@
 		}
 
 		cdf_mutex_acquire(&mac_ctx->lim.lim_frame_register_lock);
-		cdf_status =
-			cdf_list_peek_next(
+		qdf_status =
+			qdf_list_peek_next(
 			&mac_ctx->lim.gLimMgmtFrameRegistratinQueue,
-			(cdf_list_node_t *) mgmt_frame,
-			(cdf_list_node_t **) &next_frm);
+			(qdf_list_node_t *) mgmt_frame,
+			(qdf_list_node_t **) &next_frm);
 		cdf_mutex_release(&mac_ctx->lim.lim_frame_register_lock);
 		mgmt_frame = next_frm;
 		next_frm = NULL;
@@ -750,7 +750,7 @@
 
 	*pDeferMsg = false;
 	lim_get_b_dfrom_rx_packet(pMac, limMsg->bodyptr,
-				  (uint32_t * *) &pRxPacketInfo);
+				  (uint32_t **) &pRxPacketInfo);
 
 	pHdr = WMA_GET_RX_MAC_HEADER(pRxPacketInfo);
 	isFrmFt = WMA_GET_RX_FT_DONE(pRxPacketInfo);
@@ -810,9 +810,9 @@
 		goto end;
 	}
 	/* Added For BT-AMP Support */
-	if ((psessionEntry =
-		     pe_find_session_by_bssid(pMac, pHdr->bssId,
-					      &sessionId)) == NULL) {
+	psessionEntry = pe_find_session_by_bssid(pMac, pHdr->bssId,
+						 &sessionId);
+	if (psessionEntry == NULL) {
 #ifdef WLAN_FEATURE_VOWIFI_11R
 		if (fc.subType == SIR_MAC_MGMT_AUTH) {
 			lim_log(pMac, LOG1,
@@ -1269,13 +1269,13 @@
 			break;
 		}
 
-                if (WMA_GET_ROAMCANDIDATEIND(new_msg.bodyptr))
-                        lim_log(mac_ctx, LOG1, FL("roamCandidateInd %d"),
-                                WMA_GET_ROAMCANDIDATEIND(new_msg.bodyptr));
+		if (WMA_GET_ROAMCANDIDATEIND(new_msg.bodyptr))
+			lim_log(mac_ctx, LOG1, FL("roamCandidateInd %d"),
+				WMA_GET_ROAMCANDIDATEIND(new_msg.bodyptr));
 
-                if (WMA_GET_OFFLOADSCANLEARN(new_msg.bodyptr))
-                        lim_log(mac_ctx, LOG1, FL("offloadScanLearn %d"),
-                                 WMA_GET_OFFLOADSCANLEARN(new_msg.bodyptr));
+		if (WMA_GET_OFFLOADSCANLEARN(new_msg.bodyptr))
+			lim_log(mac_ctx, LOG1, FL("offloadScanLearn %d"),
+				WMA_GET_OFFLOADSCANLEARN(new_msg.bodyptr));
 
 		lim_handle80211_frames(mac_ctx, &new_msg, &defer_msg);
 
diff --git a/core/mac/src/pe/lim/lim_process_sme_req_messages.c b/core/mac/src/pe/lim/lim_process_sme_req_messages.c
index 22b735b..581b47d 100644
--- a/core/mac/src/pe/lim/lim_process_sme_req_messages.c
+++ b/core/mac/src/pe/lim/lim_process_sme_req_messages.c
@@ -1427,8 +1427,7 @@
 					scan_req->scan_id);
 			return;
 		}
-	}
-	else {
+	} else {
 		/* In all other cases return 'cached' scan results */
 		if (mac_ctx->lim.gLimRspReqd) {
 			mac_ctx->lim.gLimRspReqd = false;
@@ -4492,7 +4491,7 @@
 static void __lim_process_sme_register_mgmt_frame_req(tpAniSirGlobal mac_ctx,
 		uint32_t *msg_buf)
 {
-	CDF_STATUS cdf_status;
+	QDF_STATUS qdf_status;
 	tpSirRegisterMgmtFrame sme_req = (tpSirRegisterMgmtFrame)msg_buf;
 	struct mgmt_frm_reg_info *lim_mgmt_regn = NULL;
 	struct mgmt_frm_reg_info *next = NULL;
@@ -4504,8 +4503,8 @@
 				sme_req->matchLen);
 	/* First check whether entry exists already */
 	cdf_mutex_acquire(&mac_ctx->lim.lim_frame_register_lock);
-	cdf_list_peek_front(&mac_ctx->lim.gLimMgmtFrameRegistratinQueue,
-			    (cdf_list_node_t **) &lim_mgmt_regn);
+	qdf_list_peek_front(&mac_ctx->lim.gLimMgmtFrameRegistratinQueue,
+			    (qdf_list_node_t **) &lim_mgmt_regn);
 	cdf_mutex_release(&mac_ctx->lim.lim_frame_register_lock);
 
 	while (lim_mgmt_regn != NULL) {
@@ -4527,19 +4526,19 @@
 		}
 skip_match:
 		cdf_mutex_acquire(&mac_ctx->lim.lim_frame_register_lock);
-		cdf_status = cdf_list_peek_next(
+		qdf_status = qdf_list_peek_next(
 				&mac_ctx->lim.gLimMgmtFrameRegistratinQueue,
-				(cdf_list_node_t *)lim_mgmt_regn,
-				(cdf_list_node_t **)&next);
+				(qdf_list_node_t *)lim_mgmt_regn,
+				(qdf_list_node_t **)&next);
 		cdf_mutex_release(&mac_ctx->lim.lim_frame_register_lock);
 		lim_mgmt_regn = next;
 		next = NULL;
 	}
 	if (match) {
 		cdf_mutex_acquire(&mac_ctx->lim.lim_frame_register_lock);
-		cdf_list_remove_node(
+		qdf_list_remove_node(
 				&mac_ctx->lim.gLimMgmtFrameRegistratinQueue,
-				(cdf_list_node_t *)lim_mgmt_regn);
+				(qdf_list_node_t *)lim_mgmt_regn);
 		cdf_mutex_release(&mac_ctx->lim.lim_frame_register_lock);
 		cdf_mem_free(lim_mgmt_regn);
 	}
@@ -4562,7 +4561,7 @@
 			}
 			cdf_mutex_acquire(
 					&mac_ctx->lim.lim_frame_register_lock);
-			cdf_list_insert_front(&mac_ctx->lim.
+			qdf_list_insert_front(&mac_ctx->lim.
 					      gLimMgmtFrameRegistratinQueue,
 					      &lim_mgmt_regn->node);
 			cdf_mutex_release(