qcacld-3.0: Add QDF mem API's

Replace CDF mem API's with QDF mem API's

Change-Id: Icf247b4dc5b26f4b960dcb98e323b096c1d6076c
CRs-Fixed: 981188
diff --git a/core/wma/src/wma_power.c b/core/wma/src/wma_power.c
index 9d9a987..52276cb 100644
--- a/core/wma/src/wma_power.c
+++ b/core/wma/src/wma_power.c
@@ -48,7 +48,7 @@
 #include "cdf_nbuf.h"
 #include "qdf_types.h"
 #include "ol_txrx_api.h"
-#include "cdf_memory.h"
+#include "qdf_mem.h"
 #include "ol_txrx_types.h"
 #include "ol_txrx_peer_find.h"
 
@@ -288,7 +288,7 @@
 				   sizeof(*cmd), WMI_AP_PS_PEER_PARAM_CMDID);
 	if (err) {
 		WMA_LOGE("Failed to send set_ap_ps_param cmd");
-		cdf_mem_free(buf);
+		qdf_mem_free(buf);
 		return -EIO;
 	}
 	return 0;
@@ -428,14 +428,14 @@
 	if (!pdev) {
 		WMA_LOGE("vdev handle is invalid for %pM",
 			 tx_pwr_params->bssId.bytes);
-		cdf_mem_free(tx_pwr_params);
+		qdf_mem_free(tx_pwr_params);
 		return;
 	}
 
 	if (!(wma_handle->interfaces[vdev_id].vdev_up)) {
 		WMA_LOGE("%s: vdev id %d is not up for %pM", __func__, vdev_id,
 			 tx_pwr_params->bssId.bytes);
-		cdf_mem_free(tx_pwr_params);
+		qdf_mem_free(tx_pwr_params);
 		return;
 	}
 
@@ -471,7 +471,7 @@
 		ret = 0;
 	}
 end:
-	cdf_mem_free(tx_pwr_params);
+	qdf_mem_free(tx_pwr_params);
 	if (ret)
 		WMA_LOGE("Failed to set vdev param WMI_VDEV_PARAM_TX_PWRLIMIT");
 }
@@ -503,13 +503,13 @@
 	if (!pdev) {
 		WMA_LOGE("vdev handle is invalid for %pM",
 			 tx_pwr_params->bssId.bytes);
-		cdf_mem_free(tx_pwr_params);
+		qdf_mem_free(tx_pwr_params);
 		return;
 	}
 
 	if (!(wma_handle->interfaces[vdev_id].vdev_up)) {
 		WMA_LOGE("%s: vdev id %d is not up", __func__, vdev_id);
-		cdf_mem_free(tx_pwr_params);
+		qdf_mem_free(tx_pwr_params);
 		return;
 	}
 
@@ -535,7 +535,7 @@
 	else
 		wma_handle->interfaces[vdev_id].max_tx_power = prev_max_power;
 end:
-	cdf_mem_free(tx_pwr_params);
+	qdf_mem_free(tx_pwr_params);
 	if (ret)
 		WMA_LOGE("%s: Failed to set vdev param WMI_VDEV_PARAM_TX_PWRLIMIT",
 			__func__);
@@ -1173,7 +1173,7 @@
 	WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_STRUC, param_len);
 
 	buf_ptr += WMI_TLV_HDR_SIZE;
-	cdf_mem_copy(buf_ptr, autoTriggerparam, param_len);
+	qdf_mem_copy(buf_ptr, autoTriggerparam, param_len);
 
 	/*
 	 * Update tag and length for uapsd auto trigger params (this will take
@@ -1503,7 +1503,7 @@
 				 "but not present in swba event, "
 				 "So Reset the NoA", __func__);
 			/* TODO: Assuming p2p noa ie is last ie in the beacon */
-			cdf_mem_zero(bcn->noa_ie, (bcn->noa_sub_ie_len +
+			qdf_mem_zero(bcn->noa_ie, (bcn->noa_sub_ie_len +
 						   sizeof(struct p2p_ie)));
 			bcn->len -= (bcn->noa_sub_ie_len +
 				     sizeof(struct p2p_ie));
@@ -1521,7 +1521,7 @@
 			 "bcn->noa_sub_ie_len %u",
 			 __func__, bcn->len, bcn->noa_sub_ie_len);
 		bcn->len -= (bcn->noa_sub_ie_len + sizeof(struct p2p_ie));
-		cdf_mem_zero(bcn->noa_ie,
+		qdf_mem_zero(bcn->noa_ie,
 			     (bcn->noa_sub_ie_len + sizeof(struct p2p_ie)));
 	} else {                /* NoA is not present in previous beacon */
 		WMA_LOGD("%s: NoA not present in previous beacon, add it"
@@ -1534,7 +1534,7 @@
 	wma_add_p2p_ie(bcn->noa_ie);
 	p2p_ie = (struct p2p_ie *)bcn->noa_ie;
 	p2p_ie->p2p_len += new_noa_sub_ie_len;
-	cdf_mem_copy((bcn->noa_ie + sizeof(struct p2p_ie)), bcn->noa_sub_ie,
+	qdf_mem_copy((bcn->noa_ie + sizeof(struct p2p_ie)), bcn->noa_sub_ie,
 		     new_noa_sub_ie_len);
 
 	bcn->len += (new_noa_sub_ie_len + sizeof(struct p2p_ie));
@@ -1636,14 +1636,14 @@
 			       struct p2p_sub_element_noa *noa_ie)
 {
 	tSirP2PNoaAttr *noa_attr =
-		(tSirP2PNoaAttr *) cdf_mem_malloc(sizeof(tSirP2PNoaAttr));
+		(tSirP2PNoaAttr *) qdf_mem_malloc(sizeof(tSirP2PNoaAttr));
 	WMA_LOGD("Received update NoA event");
 	if (!noa_attr) {
 		WMA_LOGE("Failed to allocate memory for tSirP2PNoaAttr");
 		return;
 	}
 
-	cdf_mem_zero(noa_attr, sizeof(tSirP2PNoaAttr));
+	qdf_mem_zero(noa_attr, sizeof(tSirP2PNoaAttr));
 
 	noa_attr->index = noa_ie->index;
 	noa_attr->oppPsFlag = noa_ie->oppPS;
@@ -1707,7 +1707,7 @@
 
 	if (WMI_UNIFIED_NOA_ATTR_IS_MODIFIED(p2p_noa_info)) {
 
-		cdf_mem_zero(&noa_ie, sizeof(noa_ie));
+		qdf_mem_zero(&noa_ie, sizeof(noa_ie));
 		noa_ie.index =
 			(uint8_t) WMI_UNIFIED_NOA_ATTR_INDEX_GET(p2p_noa_info);
 		noa_ie.oppPS =