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/bmi/src/bmi.c b/core/bmi/src/bmi.c
index ffc6966..36b44c9 100644
--- a/core/bmi/src/bmi.c
+++ b/core/bmi/src/bmi.c
@@ -77,8 +77,8 @@
 
 	if (!info->bmi_cmd_buff) {
 		info->bmi_cmd_buff =
-			cdf_os_mem_alloc_consistent(cdf_dev, MAX_BMI_CMDBUF_SZ,
-							&info->bmi_cmd_da, 0);
+			qdf_mem_alloc_consistent(cdf_dev, cdf_dev->dev, MAX_BMI_CMDBUF_SZ,
+							&info->bmi_cmd_da);
 		if (!info->bmi_cmd_buff) {
 			BMI_ERR("No Memory for BMI Command");
 			return QDF_STATUS_E_NOMEM;
@@ -87,8 +87,8 @@
 
 	if (!info->bmi_rsp_buff) {
 		info->bmi_rsp_buff =
-			cdf_os_mem_alloc_consistent(cdf_dev, MAX_BMI_CMDBUF_SZ,
-							&info->bmi_rsp_da, 0);
+			qdf_mem_alloc_consistent(cdf_dev, cdf_dev->dev, MAX_BMI_CMDBUF_SZ,
+							&info->bmi_rsp_da);
 		if (!info->bmi_rsp_buff) {
 			BMI_ERR("No Memory for BMI Response");
 			goto end;
@@ -96,7 +96,7 @@
 	}
 	return QDF_STATUS_SUCCESS;
 end:
-	cdf_os_mem_free_consistent(cdf_dev, MAX_BMI_CMDBUF_SZ,
+	qdf_mem_free_consistent(cdf_dev, MAX_BMI_CMDBUF_SZ,
 				 info->bmi_cmd_buff, info->bmi_cmd_da, 0);
 	info->bmi_cmd_buff = NULL;
 	return QDF_STATUS_E_NOMEM;
@@ -113,14 +113,14 @@
 	}
 
 	if (info->bmi_cmd_buff) {
-		cdf_os_mem_free_consistent(cdf_dev, MAX_BMI_CMDBUF_SZ,
+		qdf_mem_free_consistent(cdf_dev, MAX_BMI_CMDBUF_SZ,
 				    info->bmi_cmd_buff, info->bmi_cmd_da, 0);
 		info->bmi_cmd_buff = NULL;
 		info->bmi_cmd_da = 0;
 	}
 
 	if (info->bmi_rsp_buff) {
-		cdf_os_mem_free_consistent(cdf_dev, MAX_BMI_CMDBUF_SZ,
+		qdf_mem_free_consistent(cdf_dev, MAX_BMI_CMDBUF_SZ,
 				    info->bmi_rsp_buff, info->bmi_rsp_da, 0);
 		info->bmi_rsp_buff = NULL;
 		info->bmi_rsp_da = 0;
@@ -167,7 +167,7 @@
 	}
 	cid = BMI_GET_TARGET_INFO;
 
-	cdf_mem_copy(bmi_cmd_buff, &cid, sizeof(cid));
+	qdf_mem_copy(bmi_cmd_buff, &cid, sizeof(cid));
 	length = sizeof(struct bmi_target_info);
 
 	status = hif_exchange_bmi_msg(scn, cmd, rsp, bmi_cmd_buff, sizeof(cid),
@@ -178,7 +178,7 @@
 		return QDF_STATUS_E_FAILURE;
 	}
 
-	cdf_mem_copy(targ_info, bmi_rsp_buff, length);
+	qdf_mem_copy(targ_info, bmi_rsp_buff, length);
 	return QDF_STATUS_SUCCESS;
 }
 
@@ -243,8 +243,8 @@
 	qdf_dma_addr_t rsp = info->bmi_rsp_da;
 
 	bmi_assert(BMI_COMMAND_FITS(sizeof(cid) + sizeof(address)));
-	cdf_mem_set(bmi_cmd_buff, 0, sizeof(cid) + sizeof(address));
-	cdf_mem_set(bmi_rsp_buff, 0, sizeof(cid) + sizeof(address));
+	qdf_mem_set(bmi_cmd_buff, 0, sizeof(cid) + sizeof(address));
+	qdf_mem_set(bmi_rsp_buff, 0, sizeof(cid) + sizeof(address));
 
 	if (info->bmi_done) {
 		BMI_DBG("Command disallowed");
@@ -257,9 +257,9 @@
 	cid = BMI_READ_SOC_REGISTER;
 
 	offset = 0;
-	cdf_mem_copy(&(bmi_cmd_buff[offset]), &cid, sizeof(cid));
+	qdf_mem_copy(&(bmi_cmd_buff[offset]), &cid, sizeof(cid));
 	offset += sizeof(cid);
-	cdf_mem_copy(&(bmi_cmd_buff[offset]), &address, sizeof(address));
+	qdf_mem_copy(&(bmi_cmd_buff[offset]), &address, sizeof(address));
 	offset += sizeof(address);
 	param_len = sizeof(*param);
 	status = hif_exchange_bmi_msg(scn, cmd, rsp, bmi_cmd_buff, offset,
@@ -268,7 +268,7 @@
 		BMI_DBG("Unable to read from the device; status:%d", status);
 		return QDF_STATUS_E_FAILURE;
 	}
-	cdf_mem_copy(param, bmi_rsp_buff, sizeof(*param));
+	qdf_mem_copy(param, bmi_rsp_buff, sizeof(*param));
 
 	BMI_DBG("BMI Read SOC Register: Exit value: %d", *param);
 	return QDF_STATUS_SUCCESS;
@@ -288,7 +288,7 @@
 	qdf_dma_addr_t rsp = info->bmi_rsp_da;
 
 	bmi_assert(BMI_COMMAND_FITS(size));
-	cdf_mem_set(bmi_cmd_buff, 0, size);
+	qdf_mem_set(bmi_cmd_buff, 0, size);
 
 	if (info->bmi_done) {
 		BMI_DBG("Command disallowed");
@@ -301,11 +301,11 @@
 	cid = BMI_WRITE_SOC_REGISTER;
 
 	offset = 0;
-	cdf_mem_copy(&(bmi_cmd_buff[offset]), &cid, sizeof(cid));
+	qdf_mem_copy(&(bmi_cmd_buff[offset]), &cid, sizeof(cid));
 	offset += sizeof(cid);
-	cdf_mem_copy(&(bmi_cmd_buff[offset]), &address, sizeof(address));
+	qdf_mem_copy(&(bmi_cmd_buff[offset]), &address, sizeof(address));
 	offset += sizeof(address);
-	cdf_mem_copy(&(bmi_cmd_buff[offset]), &param, sizeof(param));
+	qdf_mem_copy(&(bmi_cmd_buff[offset]), &param, sizeof(param));
 	offset += sizeof(param);
 	status = hif_exchange_bmi_msg(scn, cmd, rsp, bmi_cmd_buff, offset,
 						NULL, NULL, 0);
@@ -333,7 +333,7 @@
 	qdf_dma_addr_t rsp = info->bmi_rsp_da;
 
 	bmi_assert(BMI_COMMAND_FITS(BMI_DATASZ_MAX + header));
-	cdf_mem_set(bmi_cmd_buff, 0, BMI_DATASZ_MAX + header);
+	qdf_mem_set(bmi_cmd_buff, 0, BMI_DATASZ_MAX + header);
 
 	if (info->bmi_done) {
 		BMI_ERR("Command disallowed");
@@ -350,11 +350,11 @@
 		txlen = (remaining < (BMI_DATASZ_MAX - header)) ?
 			remaining : (BMI_DATASZ_MAX - header);
 		offset = 0;
-		cdf_mem_copy(&(bmi_cmd_buff[offset]), &cid, sizeof(cid));
+		qdf_mem_copy(&(bmi_cmd_buff[offset]), &cid, sizeof(cid));
 		offset += sizeof(cid);
-		cdf_mem_copy(&(bmi_cmd_buff[offset]), &txlen, sizeof(txlen));
+		qdf_mem_copy(&(bmi_cmd_buff[offset]), &txlen, sizeof(txlen));
 		offset += sizeof(txlen);
-		cdf_mem_copy(&(bmi_cmd_buff[offset]),
+		qdf_mem_copy(&(bmi_cmd_buff[offset]),
 			&buffer[length - remaining], txlen);
 		offset += txlen;
 		status = hif_exchange_bmi_msg(scn, cmd, rsp,
@@ -390,7 +390,7 @@
 	qdf_dma_addr_t rsp = info->bmi_rsp_da;
 
 	bmi_assert(BMI_COMMAND_FITS(BMI_DATASZ_MAX + header));
-	cdf_mem_set(bmi_cmd_buff, 0, BMI_DATASZ_MAX + header);
+	qdf_mem_set(bmi_cmd_buff, 0, BMI_DATASZ_MAX + header);
 
 	if (info->bmi_done) {
 		BMI_ERR("Command disallowed");
@@ -416,14 +416,14 @@
 		}
 
 		offset = 0;
-		cdf_mem_copy(&(bmi_cmd_buff[offset]), &cid, sizeof(cid));
+		qdf_mem_copy(&(bmi_cmd_buff[offset]), &cid, sizeof(cid));
 		offset += sizeof(cid);
-		cdf_mem_copy(&(bmi_cmd_buff[offset]), &address,
+		qdf_mem_copy(&(bmi_cmd_buff[offset]), &address,
 						sizeof(address));
 		offset += sizeof(offset);
-		cdf_mem_copy(&(bmi_cmd_buff[offset]), &txlen, sizeof(txlen));
+		qdf_mem_copy(&(bmi_cmd_buff[offset]), &txlen, sizeof(txlen));
 		offset += sizeof(txlen);
-		cdf_mem_copy(&(bmi_cmd_buff[offset]), src, txlen);
+		qdf_mem_copy(&(bmi_cmd_buff[offset]), src, txlen);
 		offset += txlen;
 		status = hif_exchange_bmi_msg(scn, cmd, rsp,
 						bmi_cmd_buff, offset, NULL,
@@ -453,7 +453,7 @@
 	qdf_dma_addr_t rsp = info->bmi_rsp_da;
 
 	bmi_assert(BMI_COMMAND_FITS(sizeof(cid) + sizeof(address)));
-	cdf_mem_set(bmi_cmd_buff, 0, sizeof(cid) + sizeof(address));
+	qdf_mem_set(bmi_cmd_buff, 0, sizeof(cid) + sizeof(address));
 
 	if (info->bmi_done) {
 		BMI_DBG("Command disallowed");
@@ -464,9 +464,9 @@
 
 	cid = BMI_LZ_STREAM_START;
 	offset = 0;
-	cdf_mem_copy(&(bmi_cmd_buff[offset]), &cid, sizeof(cid));
+	qdf_mem_copy(&(bmi_cmd_buff[offset]), &cid, sizeof(cid));
 	offset += sizeof(cid);
-	cdf_mem_copy(&(bmi_cmd_buff[offset]), &address, sizeof(address));
+	qdf_mem_copy(&(bmi_cmd_buff[offset]), &address, sizeof(address));
 	offset += sizeof(address);
 	status = hif_exchange_bmi_msg(scn, cmd, rsp, bmi_cmd_buff, offset,
 						NULL, NULL, 0);
@@ -494,7 +494,7 @@
 
 	/* copy the last word into a zero padded buffer */
 	if (unaligned_bytes)
-		cdf_mem_copy(&last_word, &buffer[last_word_offset],
+		qdf_mem_copy(&last_word, &buffer[last_word_offset],
 						unaligned_bytes);
 
 	status = bmilz_data(buffer, last_word_offset, ol_ctx);
diff --git a/core/bmi/src/bmi_1.c b/core/bmi/src/bmi_1.c
index adcf117..df51f62 100644
--- a/core/bmi/src/bmi_1.c
+++ b/core/bmi/src/bmi_1.c
@@ -58,9 +58,9 @@
 
 	bmi_assert(BMI_COMMAND_FITS(BMI_DATASZ_MAX + sizeof(cid) +
 			sizeof(address) + sizeof(length)));
-	cdf_mem_set(bmi_cmd_buff, 0, BMI_DATASZ_MAX + sizeof(cid) +
+	qdf_mem_set(bmi_cmd_buff, 0, BMI_DATASZ_MAX + sizeof(cid) +
 			sizeof(address) + sizeof(length));
-	cdf_mem_set(bmi_rsp_buff, 0, BMI_DATASZ_MAX + sizeof(cid) +
+	qdf_mem_set(bmi_rsp_buff, 0, BMI_DATASZ_MAX + sizeof(cid) +
 			sizeof(address) + sizeof(length));
 
 	BMI_DBG("BMI Read: device: 0x%p, address: 0x%x, length: %d",
@@ -74,12 +74,12 @@
 		rxlen = (remaining < BMI_DATASZ_MAX) ?
 				remaining : BMI_DATASZ_MAX;
 		offset = 0;
-		cdf_mem_copy(&(bmi_cmd_buff[offset]), &cid, sizeof(cid));
+		qdf_mem_copy(&(bmi_cmd_buff[offset]), &cid, sizeof(cid));
 		offset += sizeof(cid);
-		cdf_mem_copy(&(bmi_cmd_buff[offset]), &address,
+		qdf_mem_copy(&(bmi_cmd_buff[offset]), &address,
 						sizeof(address));
 		offset += sizeof(address);
-		cdf_mem_copy(&(bmi_cmd_buff[offset]), &rxlen, sizeof(rxlen));
+		qdf_mem_copy(&(bmi_cmd_buff[offset]), &rxlen, sizeof(rxlen));
 		offset += sizeof(length);
 
 		/* note we reuse the same buffer to receive on */
@@ -91,11 +91,11 @@
 			return QDF_STATUS_E_FAILURE;
 		}
 		if (remaining == rxlen) {
-			cdf_mem_copy(&buffer[length - remaining + align],
+			qdf_mem_copy(&buffer[length - remaining + align],
 					bmi_rsp_buff, rxlen - align);
 			/* last align bytes are invalid */
 		} else {
-			cdf_mem_copy(&buffer[length - remaining + align],
+			qdf_mem_copy(&buffer[length - remaining + align],
 				 bmi_rsp_buff, rxlen);
 		}
 		remaining -= rxlen;
@@ -133,7 +133,7 @@
 	}
 
 	bmi_assert(BMI_COMMAND_FITS(BMI_DATASZ_MAX + header));
-	cdf_mem_set(bmi_cmd_buff, 0, BMI_DATASZ_MAX + header);
+	qdf_mem_set(bmi_cmd_buff, 0, BMI_DATASZ_MAX + header);
 
 	BMI_DBG("BMI Write Memory:device: 0x%p, address: 0x%x, length: %d",
 						scn, address, length);
@@ -155,14 +155,14 @@
 			txlen = (BMI_DATASZ_MAX - header);
 		}
 		offset = 0;
-		cdf_mem_copy(&(bmi_cmd_buff[offset]), &cid, sizeof(cid));
+		qdf_mem_copy(&(bmi_cmd_buff[offset]), &cid, sizeof(cid));
 		offset += sizeof(cid);
-		cdf_mem_copy(&(bmi_cmd_buff[offset]), &address,
+		qdf_mem_copy(&(bmi_cmd_buff[offset]), &address,
 						sizeof(address));
 		offset += sizeof(address);
-		cdf_mem_copy(&(bmi_cmd_buff[offset]), &txlen, sizeof(txlen));
+		qdf_mem_copy(&(bmi_cmd_buff[offset]), &txlen, sizeof(txlen));
 		offset += sizeof(txlen);
-		cdf_mem_copy(&(bmi_cmd_buff[offset]), src, txlen);
+		qdf_mem_copy(&(bmi_cmd_buff[offset]), src, txlen);
 		offset += txlen;
 		status = hif_exchange_bmi_msg(scn, cmd, rsp, bmi_cmd_buff,
 						offset, NULL, NULL,
@@ -207,8 +207,8 @@
 	}
 
 	bmi_assert(BMI_COMMAND_FITS(size));
-	cdf_mem_set(bmi_cmd_buff, 0, size);
-	cdf_mem_set(bmi_rsp_buff, 0, size);
+	qdf_mem_set(bmi_cmd_buff, 0, size);
+	qdf_mem_set(bmi_rsp_buff, 0, size);
 
 
 	BMI_DBG("BMI Execute: device: 0x%p, address: 0x%x, param: %d",
@@ -217,11 +217,11 @@
 	cid = BMI_EXECUTE;
 
 	offset = 0;
-	cdf_mem_copy(&(bmi_cmd_buff[offset]), &cid, sizeof(cid));
+	qdf_mem_copy(&(bmi_cmd_buff[offset]), &cid, sizeof(cid));
 	offset += sizeof(cid);
-	cdf_mem_copy(&(bmi_cmd_buff[offset]), &address, sizeof(address));
+	qdf_mem_copy(&(bmi_cmd_buff[offset]), &address, sizeof(address));
 	offset += sizeof(address);
-	cdf_mem_copy(&(bmi_cmd_buff[offset]), param, sizeof(*param));
+	qdf_mem_copy(&(bmi_cmd_buff[offset]), param, sizeof(*param));
 	offset += sizeof(*param);
 	param_len = sizeof(*param);
 	status = hif_exchange_bmi_msg(scn, cmd, rsp, bmi_cmd_buff, offset,
@@ -231,7 +231,7 @@
 		return QDF_STATUS_E_FAILURE;
 	}
 
-	cdf_mem_copy(param, bmi_rsp_buff, sizeof(*param));
+	qdf_mem_copy(param, bmi_rsp_buff, sizeof(*param));
 
 	BMI_DBG("BMI Execute: Exit (param: %d)", *param);
 	return QDF_STATUS_SUCCESS;
@@ -251,7 +251,7 @@
 	struct bmi_target_info targ_info;
 	struct hif_target_info *tgt_info = hif_get_target_info_handle(scn);
 
-	cdf_mem_zero(&targ_info, sizeof(targ_info));
+	qdf_mem_zero(&targ_info, sizeof(targ_info));
 	/* Initialize BMI */
 	status = bmi_init(ol_ctx);
 	if (status != QDF_STATUS_SUCCESS) {
@@ -323,7 +323,7 @@
 		return QDF_STATUS_NOT_INITIALIZED;
 	}
 
-	cdf_mem_copy(info->bmi_cmd_buff, &cid, sizeof(cid));
+	qdf_mem_copy(info->bmi_cmd_buff, &cid, sizeof(cid));
 
 	status = hif_exchange_bmi_msg(scn, cmd, rsp, info->bmi_cmd_buff,
 				sizeof(cid), NULL, NULL, 0);
@@ -333,14 +333,14 @@
 	}
 
 	if (info->bmi_cmd_buff) {
-		cdf_os_mem_free_consistent(cdf_dev, MAX_BMI_CMDBUF_SZ,
+		qdf_mem_free_consistent(cdf_dev, MAX_BMI_CMDBUF_SZ,
 				    info->bmi_cmd_buff, info->bmi_cmd_da, 0);
 		info->bmi_cmd_buff = NULL;
 		info->bmi_cmd_da = 0;
 	}
 
 	if (info->bmi_rsp_buff) {
-		cdf_os_mem_free_consistent(cdf_dev, MAX_BMI_CMDBUF_SZ,
+		qdf_mem_free_consistent(cdf_dev, MAX_BMI_CMDBUF_SZ,
 				    info->bmi_rsp_buff, info->bmi_rsp_da, 0);
 		info->bmi_rsp_buff = NULL;
 		info->bmi_rsp_da = 0;
diff --git a/core/bmi/src/bmi_2.c b/core/bmi/src/bmi_2.c
index e2a3c29..9c1929b 100644
--- a/core/bmi/src/bmi_2.c
+++ b/core/bmi/src/bmi_2.c
@@ -58,7 +58,7 @@
 	}
 	cid = BMI_NO_COMMAND;
 
-	cdf_mem_copy(bmi_cmd_buff, &cid, sizeof(cid));
+	qdf_mem_copy(bmi_cmd_buff, &cid, sizeof(cid));
 	length = sizeof(ret);
 
 	status = hif_exchange_bmi_msg(scn, cmd, rsp, bmi_cmd_buff, sizeof(cid),
@@ -69,7 +69,7 @@
 		return QDF_STATUS_E_FAILURE;
 	}
 
-	cdf_mem_copy(&ret, bmi_rsp_buff, length);
+	qdf_mem_copy(&ret, bmi_rsp_buff, length);
 	if (ret != 0) {
 		BMI_ERR("bmi no command response error ret 0x%x", ret);
 		return QDF_STATUS_E_FAILURE;
@@ -109,7 +109,7 @@
 
 	cid = BMI_DONE;
 
-	cdf_mem_copy(bmi_cmd_buff, &cid, sizeof(cid));
+	qdf_mem_copy(bmi_cmd_buff, &cid, sizeof(cid));
 	length = sizeof(ret);
 
 	status = hif_exchange_bmi_msg(scn, cmd, rsp, bmi_cmd_buff, sizeof(cid),
@@ -119,7 +119,7 @@
 		BMI_ERR("Failed to close BMI on target status:%d", status);
 		return QDF_STATUS_E_FAILURE;
 	}
-	cdf_mem_copy(&ret, bmi_rsp_buff, length);
+	qdf_mem_copy(&ret, bmi_rsp_buff, length);
 
 	if (ret != 0) {
 		BMI_ERR("BMI DONE response failed:%d", ret);
@@ -127,14 +127,14 @@
 	}
 
 	if (info->bmi_cmd_buff) {
-		cdf_os_mem_free_consistent(cdf_dev, MAX_BMI_CMDBUF_SZ,
+		qdf_mem_free_consistent(cdf_dev, MAX_BMI_CMDBUF_SZ,
 				    info->bmi_cmd_buff, info->bmi_cmd_da, 0);
 		info->bmi_cmd_buff = NULL;
 		info->bmi_cmd_da = 0;
 	}
 
 	if (info->bmi_rsp_buff) {
-		cdf_os_mem_free_consistent(cdf_dev, MAX_BMI_CMDBUF_SZ,
+		qdf_mem_free_consistent(cdf_dev, MAX_BMI_CMDBUF_SZ,
 				    info->bmi_rsp_buff, info->bmi_rsp_da, 0);
 		info->bmi_rsp_buff = NULL;
 		info->bmi_rsp_da = 0;
@@ -173,7 +173,7 @@
 	}
 
 	bmi_assert(BMI_COMMAND_FITS(BMI_DATASZ_MAX + header));
-	cdf_mem_set(bmi_cmd_buff, 0, BMI_DATASZ_MAX + header);
+	qdf_mem_set(bmi_cmd_buff, 0, BMI_DATASZ_MAX + header);
 
 	cid = BMI_WRITE_MEMORY;
 	rsp_len = sizeof(ret);
@@ -193,14 +193,14 @@
 			txlen = (BMI_DATASZ_MAX - header);
 		}
 		offset = 0;
-		cdf_mem_copy(&(bmi_cmd_buff[offset]), &cid, sizeof(cid));
+		qdf_mem_copy(&(bmi_cmd_buff[offset]), &cid, sizeof(cid));
 		offset += sizeof(cid);
-		cdf_mem_copy(&(bmi_cmd_buff[offset]), &address,
+		qdf_mem_copy(&(bmi_cmd_buff[offset]), &address,
 						sizeof(address));
 		offset += sizeof(address);
-		cdf_mem_copy(&(bmi_cmd_buff[offset]), &txlen, sizeof(txlen));
+		qdf_mem_copy(&(bmi_cmd_buff[offset]), &txlen, sizeof(txlen));
 		offset += sizeof(txlen);
-		cdf_mem_copy(&(bmi_cmd_buff[offset]), src, txlen);
+		qdf_mem_copy(&(bmi_cmd_buff[offset]), src, txlen);
 		offset += txlen;
 		status = hif_exchange_bmi_msg(scn, cmd, rsp, bmi_cmd_buff,
 						offset, bmi_rsp_buff, &rsp_len,
@@ -209,7 +209,7 @@
 			BMI_ERR("BMI Write Memory Failed status:%d", status);
 			return QDF_STATUS_E_FAILURE;
 		}
-		cdf_mem_copy(&ret, bmi_rsp_buff, rsp_len);
+		qdf_mem_copy(&ret, bmi_rsp_buff, rsp_len);
 		if (ret != 0) {
 			BMI_ERR("BMI Write memory response fail: %x", ret);
 			return QDF_STATUS_E_FAILURE;
@@ -248,8 +248,8 @@
 	}
 
 	bmi_assert(BMI_COMMAND_FITS(BMI_DATASZ_MAX + size));
-	cdf_mem_set(bmi_cmd_buff, 0, BMI_DATASZ_MAX + size);
-	cdf_mem_set(bmi_rsp_buff, 0, BMI_DATASZ_MAX + size);
+	qdf_mem_set(bmi_cmd_buff, 0, BMI_DATASZ_MAX + size);
+	qdf_mem_set(bmi_rsp_buff, 0, BMI_DATASZ_MAX + size);
 
 	cid = BMI_READ_MEMORY;
 	rsp_len = sizeof(ret);
@@ -259,12 +259,12 @@
 		rxlen = (remaining < BMI_DATASZ_MAX - rsp_len) ? remaining :
 						(BMI_DATASZ_MAX - rsp_len);
 		offset = 0;
-		cdf_mem_copy(&(bmi_cmd_buff[offset]), &cid, sizeof(cid));
+		qdf_mem_copy(&(bmi_cmd_buff[offset]), &cid, sizeof(cid));
 		offset += sizeof(cid);
-		cdf_mem_copy(&(bmi_cmd_buff[offset]), &address,
+		qdf_mem_copy(&(bmi_cmd_buff[offset]), &address,
 						sizeof(address));
 		offset += sizeof(address);
-		cdf_mem_copy(&(bmi_cmd_buff[offset]), &rxlen, sizeof(rxlen));
+		qdf_mem_copy(&(bmi_cmd_buff[offset]), &rxlen, sizeof(rxlen));
 		offset += sizeof(length);
 
 		total_len = rxlen + rsp_len;
@@ -281,14 +281,14 @@
 			return QDF_STATUS_E_FAILURE;
 		}
 
-		cdf_mem_copy(&ret, bmi_rsp_buff, rsp_len);
+		qdf_mem_copy(&ret, bmi_rsp_buff, rsp_len);
 
 		if (ret != 0) {
 			BMI_ERR("bmi read memory response fail %x", ret);
 			return QDF_STATUS_E_FAILURE;
 		}
 
-		cdf_mem_copy(&buffer[length - remaining],
+		qdf_mem_copy(&buffer[length - remaining],
 				(uint8_t *)bmi_rsp_buff	+ rsp_len, rxlen);
 		remaining -= rxlen; address += rxlen;
 	}
@@ -322,7 +322,7 @@
 
 	cid = BMI_EXECUTE;
 
-	cdf_mem_copy(bmi_cmd_buff, &cid, sizeof(cid));
+	qdf_mem_copy(bmi_cmd_buff, &cid, sizeof(cid));
 	length = sizeof(ret);
 
 	status = hif_exchange_bmi_msg(scn, cmd, rsp, bmi_cmd_buff, sizeof(cid),
@@ -333,7 +333,7 @@
 		return QDF_STATUS_E_FAILURE;
 	}
 
-	cdf_mem_copy(&ret, bmi_rsp_buff, length);
+	qdf_mem_copy(&ret, bmi_rsp_buff, length);
 
 	if (ret != 0) {
 		BMI_ERR("%s: ret 0x%x", __func__, ret);
@@ -371,7 +371,7 @@
 	}
 
 	bmi_assert(BMI_COMMAND_FITS(sizeof(cid) + sizeof(address)));
-	cdf_mem_set(bmi_cmd_buff, 0, sizeof(cid) + sizeof(address));
+	qdf_mem_set(bmi_cmd_buff, 0, sizeof(cid) + sizeof(address));
 
 
 	BMI_DBG("%s: Enter device: 0x%p, size %d", __func__, scn, size);
@@ -379,15 +379,15 @@
 	cid = BMI_LOAD_IMAGE;
 
 	offset = 0;
-	cdf_mem_copy(&(bmi_cmd_buff[offset]), &cid, sizeof(cid));
+	qdf_mem_copy(&(bmi_cmd_buff[offset]), &cid, sizeof(cid));
 	offset += sizeof(cid);
 	addr_l = address & 0xffffffff;
 	addr_h = 0x00;
-	cdf_mem_copy(&(bmi_cmd_buff[offset]), &addr_l, sizeof(addr_l));
+	qdf_mem_copy(&(bmi_cmd_buff[offset]), &addr_l, sizeof(addr_l));
 	offset += sizeof(addr_l);
-	cdf_mem_copy(&(bmi_cmd_buff[offset]), &addr_h, sizeof(addr_h));
+	qdf_mem_copy(&(bmi_cmd_buff[offset]), &addr_h, sizeof(addr_h));
 	offset += sizeof(addr_h);
-	cdf_mem_copy(&(bmi_cmd_buff[offset]), &size, sizeof(size));
+	qdf_mem_copy(&(bmi_cmd_buff[offset]), &size, sizeof(size));
 	offset += sizeof(size);
 	length = sizeof(ret);
 
@@ -399,7 +399,7 @@
 		return QDF_STATUS_E_FAILURE;
 	}
 
-	cdf_mem_copy(&ret, bmi_rsp_buff, length);
+	qdf_mem_copy(&ret, bmi_rsp_buff, length);
 	if (ret != 0) {
 		BMI_ERR("%s: ret 0x%x", __func__, ret);
 		return QDF_STATUS_E_FAILURE;
diff --git a/core/bmi/src/ol_fw.c b/core/bmi/src/ol_fw.c
index ccae346..42438da 100644
--- a/core/bmi/src/ol_fw.c
+++ b/core/bmi/src/ol_fw.c
@@ -97,7 +97,7 @@
 		goto end;
 	}
 
-	if (!cdf_mem_compare(hash, temp, SHA256_DIGEST_SIZE)) {
+	if (qdf_mem_cmp(hash, temp, SHA256_DIGEST_SIZE)) {
 		BMI_INFO("Download FW in non-secure mode:%d", file);
 		goto end;
 	}
@@ -109,7 +109,7 @@
 		ret = -1;
 		goto end;
 	}
-	cdf_mem_copy(fw_mem, data, fw_size);
+	qdf_mem_copy(fw_mem, data, fw_size);
 
 	ret = cnss_get_sha_hash(fw_mem, fw_size, "sha256", digest);
 
@@ -118,7 +118,7 @@
 		goto end;
 	}
 
-	if (cdf_mem_compare(hash, digest, SHA256_DIGEST_SIZE) != 0) {
+	if (qdf_mem_cmp(hash, digest, SHA256_DIGEST_SIZE) == 0) {
 		BMI_ERR("Hash Mismatch");
 		qdf_trace_hex_dump(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_FATAL,
 				   digest, SHA256_DIGEST_SIZE);
@@ -299,14 +299,14 @@
 		uint32_t board_ext_address;
 		int32_t board_ext_data_size;
 
-		temp_eeprom = cdf_mem_malloc(fw_entry_size);
+		temp_eeprom = qdf_mem_malloc(fw_entry_size);
 		if (!temp_eeprom) {
 			BMI_ERR("%s: Memory allocation failed", __func__);
 			release_firmware(fw_entry);
 			return QDF_STATUS_E_NOMEM;
 		}
 
-		cdf_mem_copy(temp_eeprom, (uint8_t *) fw_entry->data,
+		qdf_mem_copy(temp_eeprom, (uint8_t *) fw_entry->data,
 			  fw_entry_size);
 
 		switch (target_type) {
@@ -444,7 +444,7 @@
 
 end:
 	if (temp_eeprom)
-		cdf_mem_free(temp_eeprom);
+		qdf_mem_free(temp_eeprom);
 
 	if (status != EOK) {
 		BMI_ERR("%s, BMI operation failed: %d", __func__, __LINE__);
@@ -507,7 +507,7 @@
 {
 	int ret = -1;
 
-	struct ramdump_info *info = cdf_mem_malloc(sizeof(struct ramdump_info));
+	struct ramdump_info *info = qdf_mem_malloc(sizeof(struct ramdump_info));
 
 	if (!info) {
 		BMI_ERR("%s Memory for Ramdump Allocation failed", __func__);
@@ -523,7 +523,7 @@
 
 	ret = ol_target_coredump(scn, info->base, info->size);
 
-	cdf_mem_free(info);
+	qdf_mem_free(info);
 	return ret;
 }
 
@@ -1655,5 +1655,5 @@
 void ol_init_ini_config(struct ol_context *ol_ctx,
 			struct ol_config_info *cfg)
 {
-	cdf_mem_copy(&ol_ctx->cfg_info, cfg, sizeof(struct ol_config_info));
+	qdf_mem_copy(&ol_ctx->cfg_info, cfg, sizeof(struct ol_config_info));
 }
diff --git a/core/cdf/inc/cdf_memory.h b/core/cdf/inc/cdf_memory.h
deleted file mode 100644
index 8170a0f..0000000
--- a/core/cdf/inc/cdf_memory.h
+++ /dev/null
@@ -1,262 +0,0 @@
-/*
- * Copyright (c) 2014-2015 The Linux Foundation. All rights reserved.
- *
- * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
- *
- *
- * Permission to use, copy, modify, and/or distribute this software for
- * any purpose with or without fee is hereby granted, provided that the
- * above copyright notice and this permission notice appear in all
- * copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
- * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/*
- * This file was originally distributed by Qualcomm Atheros, Inc.
- * under proprietary terms before Copyright ownership was assigned
- * to the Linux Foundation.
- */
-
-#if !defined(__CDF_MEMORY_H)
-#define __CDF_MEMORY_H
-
-/**
- * DOC: cdf_memory
- *
- * Connectivity driver framework (CDF) memory management APIs
- */
-
-/* Include Files */
-#include <qdf_types.h>
-
-/**
- * struct cdf_mem_dma_page_t - Allocated dmaable page
- * @page_v_addr_start: Page start virtual address
- * @page_v_addr_end: Page end virtual address
- * @page_p_addr: Page start physical address
- */
-struct cdf_mem_dma_page_t {
-	char *page_v_addr_start;
-	char *page_v_addr_end;
-	qdf_dma_addr_t page_p_addr;
-};
-
-/**
- * struct cdf_mem_multi_page_t - multiple page allocation information storage
- * @num_element_per_page: Number of element in single page
- * @num_pages: Number of allocation needed pages
- * @dma_pages: page information storage in case of coherent memory
- * @cacheable_pages: page information storage in case of cacheable memory
- */
-struct cdf_mem_multi_page_t {
-	uint16_t num_element_per_page;
-	uint16_t num_pages;
-	struct cdf_mem_dma_page_t *dma_pages;
-	void **cacheable_pages;
-};
-
-/* Preprocessor definitions and constants */
-
-#ifdef MEMORY_DEBUG
-void cdf_mem_clean(void);
-void cdf_mem_init(void);
-void cdf_mem_exit(void);
-#else
-/**
- * cdf_mem_init() - initialize cdf memory debug functionality
- *
- * Return: none
- */
-static inline void cdf_mem_init(void)
-{
-}
-
-/**
- * cdf_mem_exit() - exit cdf memory debug functionality
- *
- * Return: none
- */
-static inline void cdf_mem_exit(void)
-{
-}
-#endif
-/* Type declarations */
-
-/* Function declarations and documenation */
-
-/**
- * cdf_mem_malloc() - allocation CDF memory
- * @size:	Number of bytes of memory to allocate.
- *
- * This function will dynamicallly allocate the specified number of bytes of
- * memory.
- *
- *
- * Return:
- *	Upon successful allocate, returns a non-NULL pointer to the allocated
- *	memory.  If this function is unable to allocate the amount of memory
- *	specified (for any reason) it returns %NULL.
- *
- */
-#ifdef MEMORY_DEBUG
-#define cdf_mem_malloc(size) cdf_mem_malloc_debug(size, __FILE__, __LINE__)
-void *cdf_mem_malloc_debug(size_t size, char *fileName, uint32_t lineNum);
-#else
-void *cdf_mem_malloc(size_t size);
-#endif
-
-/**
- *  cdf_mem_free() - free CDF memory
- *  @ptr:	Pointer to the starting address of the memory to be free'd.
- *
- *  This function will free the memory pointed to by 'ptr'.
- *
- *  Return:
- *	 Nothing
- *
- */
-void cdf_mem_free(void *ptr);
-
-/**
- * cdf_mem_set() - set (fill) memory with a specified byte value.
- * @pMemory:	Pointer to memory that will be set
- * @numBytes:	Number of bytes to be set
- * @value:	Byte set in memory
- *
- * Return:
- *    Nothing
- *
- */
-void cdf_mem_set(void *ptr, uint32_t numBytes, uint32_t value);
-
-/**
- * cdf_mem_zero() - zero out memory
- * @pMemory:	pointer to memory that will be set to zero
- * @numBytes:	number of bytes zero
- * @value:	byte set in memory
- *
- *  This function sets the memory location to all zeros, essentially clearing
- *  the memory.
- *
- * Return:
- *	Nothing
- *
- */
-void cdf_mem_zero(void *ptr, uint32_t numBytes);
-
-/**
- * cdf_mem_copy() - copy memory
- * @pDst:	Pointer to destination memory location (to copy to)
- * @pSrc:	Pointer to source memory location (to copy from)
- * @numBytes:	Number of bytes to copy.
- *
- * Copy host memory from one location to another, similar to memcpy in
- * standard C.  Note this function does not specifically handle overlapping
- * source and destination memory locations.  Calling this function with
- * overlapping source and destination memory locations will result in
- * unpredictable results.  Use cdf_mem_move() if the memory locations
- * for the source and destination are overlapping (or could be overlapping!)
- *
- * Return:
- *    Nothing
- *
- */
-void cdf_mem_copy(void *pDst, const void *pSrc, uint32_t numBytes);
-
-/**
- * cdf_mem_move() - move memory
- * @pDst:	pointer to destination memory location (to move to)
- * @pSrc:	pointer to source memory location (to move from)
- * @numBytes:	number of bytes to move.
- *
- * Move host memory from one location to another, similar to memmove in
- * standard C.  Note this function *does* handle overlapping
- * source and destination memory locations.
-
- * Return:
- *	Nothing
- */
-void cdf_mem_move(void *pDst, const void *pSrc, uint32_t numBytes);
-
-/**
- * cdf_mem_compare() - memory compare
- * @pMemory1:	pointer to one location in memory to compare.
- * @pMemory2:	pointer to second location in memory to compare.
- * @numBytes:	the number of bytes to compare.
- *
- * Function to compare two pieces of memory, similar to memcmp function
- * in standard C.
- *
- * Return:
- *	bool - returns a bool value that tells if the memory locations
- *	are equal or not equal.
- *
- */
-bool cdf_mem_compare(const void *pMemory1, const void *pMemory2,
-		     uint32_t numBytes);
-
-/**
- * cdf_mem_compare2() - memory compare
- * @pMemory1: pointer to one location in memory to compare.
- * @pMemory2:	pointer to second location in memory to compare.
- * @numBytes:	the number of bytes to compare.
- *
- * Function to compare two pieces of memory, similar to memcmp function
- * in standard C.
- * Return:
- *	 int32_t - returns a bool value that tells if the memory
- *	 locations are equal or not equal.
- *	 0 -- equal
- *	 < 0 -- *pMemory1 is less than *pMemory2
- *	 > 0 -- *pMemory1 is bigger than *pMemory2
- */
-int32_t cdf_mem_compare2(const void *pMemory1, const void *pMemory2,
-			 uint32_t numBytes);
-
-void *cdf_os_mem_alloc_consistent(qdf_device_t osdev, qdf_size_t size,
-				  qdf_dma_addr_t *paddr,
-				  qdf_dma_context_t mctx);
-void
-cdf_os_mem_free_consistent(qdf_device_t osdev,
-			   qdf_size_t size,
-			   void *vaddr,
-			   qdf_dma_addr_t paddr, qdf_dma_context_t memctx);
-
-void
-cdf_os_mem_dma_sync_single_for_device(qdf_device_t osdev,
-				      qdf_dma_addr_t bus_addr,
-				      qdf_size_t size,
-				      enum dma_data_direction direction);
-
-/**
- * cdf_str_len() - returns the length of a string
- * @str:	input string
- *
- * Return:
- *	length of string
- */
-static inline int32_t cdf_str_len(const char *str)
-{
-	return strlen(str);
-}
-
-void cdf_mem_multi_pages_alloc(qdf_device_t osdev,
-				struct cdf_mem_multi_page_t *pages,
-				size_t element_size,
-				uint16_t element_num,
-				qdf_dma_context_t memctxt,
-				bool cacheable);
-
-void cdf_mem_multi_pages_free(qdf_device_t osdev,
-				struct cdf_mem_multi_page_t *pages,
-				qdf_dma_context_t memctxt,
-				bool cacheable);
-#endif /* __CDF_MEMORY_H */
diff --git a/core/cdf/src/cdf_memory.c b/core/cdf/src/cdf_memory.c
deleted file mode 100644
index eee883e..0000000
--- a/core/cdf/src/cdf_memory.c
+++ /dev/null
@@ -1,863 +0,0 @@
-/*
- * Copyright (c) 2014-2016 The Linux Foundation. All rights reserved.
- *
- * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
- *
- *
- * Permission to use, copy, modify, and/or distribute this software for
- * any purpose with or without fee is hereby granted, provided that the
- * above copyright notice and this permission notice appear in all
- * copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
- * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/*
- * This file was originally distributed by Qualcomm Atheros, Inc.
- * under proprietary terms before Copyright ownership was assigned
- * to the Linux Foundation.
- */
-
-/**
- * DOC:  cdf_memory
- *
- * Connectivity driver framework (CDF) memory management APIs
- */
-
-/* Include Files */
-#include "cdf_memory.h"
-#include "cdf_nbuf.h"
-#include "qdf_trace.h"
-#include "qdf_lock.h"
-#include "qdf_mc_timer.h"
-
-#if defined(CONFIG_CNSS)
-#include <net/cnss.h>
-#endif
-
-#ifdef CONFIG_WCNSS_MEM_PRE_ALLOC
-#include <net/cnss_prealloc.h>
-#endif
-
-#ifdef MEMORY_DEBUG
-#include <qdf_list.h>
-#include <linux/stacktrace.h>
-
-qdf_list_t cdf_mem_list;
-qdf_spinlock_t cdf_mem_list_lock;
-
-static uint8_t WLAN_MEM_HEADER[] = { 0x61, 0x62, 0x63, 0x64, 0x65, 0x66,
-					0x67, 0x68 };
-static uint8_t WLAN_MEM_TAIL[] = { 0x80, 0x81, 0x82, 0x83, 0x84, 0x85,
-					0x86, 0x87 };
-
-#define CDF_MEM_MAX_STACK_TRACE 16
-
-struct s_cdf_mem_struct {
-	qdf_list_node_t pNode;
-	char *fileName;
-	unsigned int lineNum;
-	unsigned int size;
-#ifdef WLAN_OPEN_SOURCE
-	unsigned long stack_trace[CDF_MEM_MAX_STACK_TRACE];
-	struct stack_trace trace;
-#endif
-	uint8_t header[8];
-};
-#endif
-
-/* Preprocessor Definitions and Constants */
-#define CDF_GET_MEMORY_TIME_THRESHOLD 3000
-
-/* Type Declarations */
-
-/* Data definitions */
-
-/* External Function implementation */
-#ifdef MEMORY_DEBUG
-#ifdef WLAN_OPEN_SOURCE
-/**
- * cdf_mem_save_stack_trace() - Save stack trace of the caller
- * @mem_struct: Pointer to the memory structure where to save the stack trace
- *
- * Return: None
- */
-static inline void cdf_mem_save_stack_trace(struct s_cdf_mem_struct *mem_struct)
-{
-	struct stack_trace *trace = &mem_struct->trace;
-
-	trace->nr_entries = 0;
-	trace->max_entries = CDF_MEM_MAX_STACK_TRACE;
-	trace->entries = mem_struct->stack_trace;
-	trace->skip = 2;
-
-	save_stack_trace(trace);
-}
-
-/**
- * cdf_mem_print_stack_trace() - Print saved stack trace
- * @mem_struct: Pointer to the memory structure which has the saved stack trace
- *              to be printed
- *
- * Return: None
- */
-static inline void cdf_mem_print_stack_trace(struct s_cdf_mem_struct
-					     *mem_struct)
-{
-	QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_FATAL,
-		  "Call stack for the source of leaked memory:");
-
-	print_stack_trace(&mem_struct->trace, 1);
-}
-#else
-static inline void cdf_mem_save_stack_trace(struct s_cdf_mem_struct *mem_struct)
-{
-
-}
-static inline void cdf_mem_print_stack_trace(struct s_cdf_mem_struct
-					     *mem_struct)
-{
-
-}
-#endif
-
-/**
- * cdf_mem_init() - initialize cdf memory debug functionality
- *
- * Return: none
- */
-void cdf_mem_init(void)
-{
-	/* Initalizing the list with maximum size of 60000 */
-	qdf_list_create(&cdf_mem_list, 60000);
-	qdf_spinlock_create(&cdf_mem_list_lock);
-	cdf_net_buf_debug_init();
-	return;
-}
-
-/**
- * cdf_mem_clean() - display memory leak debug info and free leaked pointers
- *
- * Return: none
- */
-void cdf_mem_clean(void)
-{
-	uint32_t listSize;
-	listSize = qdf_list_size(&cdf_mem_list);
-
-	cdf_net_buf_debug_clean();
-
-	if (listSize) {
-		qdf_list_node_t *pNode;
-		QDF_STATUS qdf_status;
-
-		struct s_cdf_mem_struct *memStruct;
-		char *prev_mleak_file = "";
-		unsigned int prev_mleak_lineNum = 0;
-		unsigned int prev_mleak_sz = 0;
-		unsigned int mleak_cnt = 0;
-
-		QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
-			  "%s: List is not Empty. listSize %d ",
-			  __func__, (int)listSize);
-
-		do {
-			qdf_spin_lock(&cdf_mem_list_lock);
-			qdf_status =
-				qdf_list_remove_front(&cdf_mem_list, &pNode);
-			qdf_spin_unlock(&cdf_mem_list_lock);
-			if (QDF_STATUS_SUCCESS == qdf_status) {
-				memStruct = (struct s_cdf_mem_struct *)pNode;
-				/* Take care to log only once multiple memory
-				   leaks from the same place */
-				if (strcmp(prev_mleak_file, memStruct->fileName)
-				    || (prev_mleak_lineNum !=
-					memStruct->lineNum)
-				    || (prev_mleak_sz != memStruct->size)) {
-					if (mleak_cnt != 0) {
-						QDF_TRACE(QDF_MODULE_ID_QDF,
-							  QDF_TRACE_LEVEL_FATAL,
-							  "%d Time Memory Leak@ File %s, @Line %d, size %d",
-							  mleak_cnt,
-							  prev_mleak_file,
-							  prev_mleak_lineNum,
-							  prev_mleak_sz);
-					}
-					prev_mleak_file = memStruct->fileName;
-					prev_mleak_lineNum = memStruct->lineNum;
-					prev_mleak_sz = memStruct->size;
-					mleak_cnt = 0;
-				}
-				mleak_cnt++;
-				cdf_mem_print_stack_trace(memStruct);
-				kfree((void *)memStruct);
-			}
-		} while (qdf_status == QDF_STATUS_SUCCESS);
-
-		/* Print last memory leak from the module */
-		if (mleak_cnt) {
-			QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_FATAL,
-				  "%d Time memory Leak@ File %s, @Line %d, size %d",
-				  mleak_cnt, prev_mleak_file,
-				  prev_mleak_lineNum, prev_mleak_sz);
-		}
-#ifdef CONFIG_HALT_KMEMLEAK
-		BUG_ON(0);
-#endif
-	}
-}
-
-/**
- * cdf_mem_exit() - exit cdf memory debug functionality
- *
- * Return: none
- */
-void cdf_mem_exit(void)
-{
-	cdf_net_buf_debug_exit();
-	cdf_mem_clean();
-	qdf_list_destroy(&cdf_mem_list);
-}
-
-/**
- * cdf_mem_malloc_debug() - debug version of CDF memory allocation API
- * @size: Number of bytes of memory to allocate.
- * @fileName: File name from which memory allocation is called
- * @lineNum: Line number from which memory allocation is called
- *
- * This function will dynamicallly allocate the specified number of bytes of
- * memory and ad it in cdf tracking list to check against memory leaks and
- * corruptions
- *
- *
- * Return:
- *      Upon successful allocate, returns a non-NULL pointer to the allocated
- *      memory.  If this function is unable to allocate the amount of memory
- *      specified (for any reason) it returns %NULL.
- *
- */
-void *cdf_mem_malloc_debug(size_t size, char *fileName, uint32_t lineNum)
-{
-	struct s_cdf_mem_struct *memStruct;
-	void *memPtr = NULL;
-	uint32_t new_size;
-	int flags = GFP_KERNEL;
-	unsigned long  time_before_kzalloc;
-
-	if (size > (1024 * 1024) || size == 0) {
-		QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
-			  "%s: called with invalid arg; passed in %zu !!!",
-			  __func__, size);
-		return NULL;
-	}
-
-#if defined(CONFIG_CNSS) && defined(CONFIG_WCNSS_MEM_PRE_ALLOC)
-	if (size > WCNSS_PRE_ALLOC_GET_THRESHOLD) {
-		void *pmem;
-		pmem = wcnss_prealloc_get(size);
-		if (NULL != pmem) {
-			memset(pmem, 0, size);
-			return pmem;
-		}
-	}
-#endif
-
-	if (in_interrupt() || irqs_disabled() || in_atomic())
-		flags = GFP_ATOMIC;
-
-	new_size = size + sizeof(struct s_cdf_mem_struct) + 8;
-	time_before_kzalloc = qdf_mc_timer_get_system_time();
-	memStruct = (struct s_cdf_mem_struct *)kzalloc(new_size, flags);
-	/**
-	 * If time taken by kmalloc is greater than
-	 * CDF_GET_MEMORY_TIME_THRESHOLD msec
-	 */
-	if (qdf_mc_timer_get_system_time() - time_before_kzalloc >=
-					  CDF_GET_MEMORY_TIME_THRESHOLD)
-		QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
-			 "%s: kzalloc took %lu msec for size %zu called from %pS at line %d",
-			 __func__,
-			 qdf_mc_timer_get_system_time() - time_before_kzalloc,
-			 size, (void *)_RET_IP_, lineNum);
-
-	if (memStruct != NULL) {
-		QDF_STATUS qdf_status;
-
-		memStruct->fileName = fileName;
-		memStruct->lineNum = lineNum;
-		memStruct->size = size;
-		cdf_mem_save_stack_trace(memStruct);
-
-		cdf_mem_copy(&memStruct->header[0],
-			     &WLAN_MEM_HEADER[0], sizeof(WLAN_MEM_HEADER));
-
-		cdf_mem_copy((uint8_t *) (memStruct + 1) + size,
-			     &WLAN_MEM_TAIL[0], sizeof(WLAN_MEM_TAIL));
-
-		qdf_spin_lock_irqsave(&cdf_mem_list_lock);
-		qdf_status = qdf_list_insert_front(&cdf_mem_list,
-						   &memStruct->pNode);
-		qdf_spin_unlock_irqrestore(&cdf_mem_list_lock);
-		if (QDF_STATUS_SUCCESS != qdf_status) {
-			QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
-				  "%s: Unable to insert node into List qdf_status %d",
-				  __func__, qdf_status);
-		}
-
-		memPtr = (void *)(memStruct + 1);
-	}
-	return memPtr;
-}
-
-/**
- *  cdf_mem_free() - debug version of CDF memory free API
- *  @ptr: Pointer to the starting address of the memory to be free'd.
- *
- *  This function will free the memory pointed to by 'ptr'. It also checks
- *  is memory is corrupted or getting double freed and panic.
- *
- *  Return:
- *       Nothing
- */
-void cdf_mem_free(void *ptr)
-{
-	if (ptr != NULL) {
-		QDF_STATUS qdf_status;
-		struct s_cdf_mem_struct *memStruct =
-			((struct s_cdf_mem_struct *)ptr) - 1;
-
-#if defined(CONFIG_CNSS) && defined(CONFIG_WCNSS_MEM_PRE_ALLOC)
-		if (wcnss_prealloc_put(ptr))
-			return;
-#endif
-
-		qdf_spin_lock_irqsave(&cdf_mem_list_lock);
-		qdf_status =
-			qdf_list_remove_node(&cdf_mem_list, &memStruct->pNode);
-		qdf_spin_unlock_irqrestore(&cdf_mem_list_lock);
-
-		if (QDF_STATUS_SUCCESS == qdf_status) {
-			if (0 == cdf_mem_compare(memStruct->header,
-						 &WLAN_MEM_HEADER[0],
-						 sizeof(WLAN_MEM_HEADER))) {
-				QDF_TRACE(QDF_MODULE_ID_QDF,
-					  QDF_TRACE_LEVEL_FATAL,
-					  "Memory Header is corrupted. MemInfo: Filename %s, LineNum %d",
-					  memStruct->fileName,
-					  (int)memStruct->lineNum);
-				QDF_BUG(0);
-			}
-			if (0 ==
-			    cdf_mem_compare((uint8_t *) ptr + memStruct->size,
-					    &WLAN_MEM_TAIL[0],
-					    sizeof(WLAN_MEM_TAIL))) {
-				QDF_TRACE(QDF_MODULE_ID_QDF,
-					  QDF_TRACE_LEVEL_FATAL,
-					  "Memory Trailer is corrupted. MemInfo: Filename %s, LineNum %d",
-					  memStruct->fileName,
-					  (int)memStruct->lineNum);
-				QDF_BUG(0);
-			}
-			kfree((void *)memStruct);
-		} else {
-			QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_FATAL,
-				  "%s: Unallocated memory (double free?)",
-				  __func__);
-			QDF_BUG(0);
-		}
-	}
-}
-#else
-/**
- * cdf_mem_malloc() - allocation CDF memory
- * @size: Number of bytes of memory to allocate.
- *
- * This function will dynamicallly allocate the specified number of bytes of
- * memory.
- *
- *
- * Return:
- *	Upon successful allocate, returns a non-NULL pointer to the allocated
- *	memory.  If this function is unable to allocate the amount of memory
- *	specified (for any reason) it returns %NULL.
- *
- */
-void *cdf_mem_malloc(size_t size)
-{
-	int flags = GFP_KERNEL;
-	void *memPtr = NULL;
-	unsigned long  time_before_kzalloc;
-
-	if (size > (1024 * 1024) || size == 0) {
-		QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
-			  "%s: called with invalid arg; passed in %zu !!",
-			  __func__, size);
-		return NULL;
-	}
-
-#if defined(CONFIG_CNSS) && defined(CONFIG_WCNSS_MEM_PRE_ALLOC)
-	if (size > WCNSS_PRE_ALLOC_GET_THRESHOLD) {
-		void *pmem;
-		pmem = wcnss_prealloc_get(size);
-		if (NULL != pmem) {
-			memset(pmem, 0, size);
-			return pmem;
-		}
-	}
-#endif
-
-	if (in_interrupt() || irqs_disabled() || in_atomic())
-		flags = GFP_ATOMIC;
-	time_before_kzalloc = qdf_mc_timer_get_system_time();
-	memPtr = kzalloc(size, flags);
-	/**
-	 * If time taken by kmalloc is greater than
-	 * CDF_GET_MEMORY_TIME_THRESHOLD msec
-	 */
-	if (qdf_mc_timer_get_system_time() - time_before_kzalloc >=
-					   CDF_GET_MEMORY_TIME_THRESHOLD)
-		QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
-			 "%s: kzalloc took %lu msec for size %zu called from %pS",
-			 __func__,
-			 qdf_mc_timer_get_system_time() - time_before_kzalloc,
-			 size, (void *)_RET_IP_);
-	return memPtr;
-}
-
-/**
- * cdf_mem_free() - free CDF memory
- * @ptr: Pointer to the starting address of the memory to be free'd.
- *
- * This function will free the memory pointed to by 'ptr'.
- *
- * Return:
- *	Nothing
- *
- */
-void cdf_mem_free(void *ptr)
-{
-	if (ptr == NULL)
-		return;
-
-#if defined(CONFIG_CNSS) && defined(CONFIG_WCNSS_MEM_PRE_ALLOC)
-	if (wcnss_prealloc_put(ptr))
-		return;
-#endif
-
-	kfree(ptr);
-}
-#endif
-
-/**
- * cdf_mem_multi_pages_alloc() - allocate large size of kernel memory
- * @osdev:		OS device handle pointer
- * @pages:		Multi page information storage
- * @element_size:	Each element size
- * @element_num:	Total number of elements should be allocated
- * @memctxt:		Memory context
- * @cacheable:		Coherent memory or cacheable memory
- *
- * This function will allocate large size of memory over multiple pages.
- * Large size of contiguous memory allocation will fail frequentely, then
- * instead of allocate large memory by one shot, allocate through multiple, non
- * contiguous memory and combine pages when actual usage
- *
- * Return: None
- */
-void cdf_mem_multi_pages_alloc(qdf_device_t osdev,
-				struct cdf_mem_multi_page_t *pages,
-				size_t element_size,
-				uint16_t element_num,
-				qdf_dma_context_t memctxt,
-				bool cacheable)
-{
-	uint16_t page_idx;
-	struct cdf_mem_dma_page_t *dma_pages;
-	void **cacheable_pages = NULL;
-	uint16_t i;
-
-	QDF_BUG(PAGE_SIZE >= element_size);
-
-	pages->num_element_per_page = PAGE_SIZE / element_size;
-	if (!pages->num_element_per_page) {
-		qdf_print("Invalid page %d or element size %d",
-			(int)PAGE_SIZE, (int)element_size);
-		goto out_fail;
-	}
-
-	pages->num_pages = element_num / pages->num_element_per_page;
-	if (element_num % pages->num_element_per_page)
-		pages->num_pages++;
-
-	if (cacheable) {
-		/* Pages information storage */
-		pages->cacheable_pages = cdf_mem_malloc(
-			pages->num_pages * sizeof(pages->cacheable_pages));
-		if (!pages->cacheable_pages) {
-			qdf_print("Cacheable page storage alloc fail");
-			goto out_fail;
-		}
-
-		cacheable_pages = pages->cacheable_pages;
-		for (page_idx = 0; page_idx < pages->num_pages; page_idx++) {
-			cacheable_pages[page_idx] = cdf_mem_malloc(PAGE_SIZE);
-			if (!cacheable_pages[page_idx]) {
-				qdf_print("cacheable page alloc fail, pi %d",
-					page_idx);
-				goto page_alloc_fail;
-			}
-		}
-		pages->dma_pages = NULL;
-	} else {
-		pages->dma_pages = cdf_mem_malloc(
-			pages->num_pages * sizeof(struct cdf_mem_dma_page_t));
-		if (!pages->dma_pages) {
-			qdf_print("dmaable page storage alloc fail");
-			goto out_fail;
-		}
-
-		dma_pages = pages->dma_pages;
-		for (page_idx = 0; page_idx < pages->num_pages; page_idx++) {
-			dma_pages->page_v_addr_start =
-				cdf_os_mem_alloc_consistent(osdev, PAGE_SIZE,
-					&dma_pages->page_p_addr, memctxt);
-			if (!dma_pages->page_v_addr_start) {
-				qdf_print("dmaable page alloc fail pi %d",
-					page_idx);
-				goto page_alloc_fail;
-			}
-			dma_pages->page_v_addr_end =
-				dma_pages->page_v_addr_start + PAGE_SIZE;
-			dma_pages++;
-		}
-		pages->cacheable_pages = NULL;
-	}
-	return;
-
-page_alloc_fail:
-	if (cacheable) {
-		for (i = 0; i < page_idx; i++)
-			cdf_mem_free(pages->cacheable_pages[i]);
-		cdf_mem_free(pages->cacheable_pages);
-	} else {
-		dma_pages = pages->dma_pages;
-		for (i = 0; i < page_idx; i++) {
-			cdf_os_mem_free_consistent(osdev, PAGE_SIZE,
-				dma_pages->page_v_addr_start,
-				dma_pages->page_p_addr, memctxt);
-			dma_pages++;
-		}
-		cdf_mem_free(pages->dma_pages);
-	}
-
-out_fail:
-	pages->cacheable_pages = NULL;
-	pages->dma_pages = NULL;
-	pages->num_pages = 0;
-	return;
-}
-
-/**
- * cdf_mem_multi_pages_free() - free large size of kernel memory
- * @osdev:	OS device handle pointer
- * @pages:	Multi page information storage
- * @memctxt:	Memory context
- * @cacheable:	Coherent memory or cacheable memory
- *
- * This function will free large size of memory over multiple pages.
- *
- * Return: None
- */
-void cdf_mem_multi_pages_free(qdf_device_t osdev,
-				struct cdf_mem_multi_page_t *pages,
-				qdf_dma_context_t memctxt,
-				bool cacheable)
-{
-	unsigned int page_idx;
-	struct cdf_mem_dma_page_t *dma_pages;
-
-	if (cacheable) {
-		for (page_idx = 0; page_idx < pages->num_pages; page_idx++)
-			cdf_mem_free(pages->cacheable_pages[page_idx]);
-		cdf_mem_free(pages->cacheable_pages);
-	} else {
-		dma_pages = pages->dma_pages;
-		for (page_idx = 0; page_idx < pages->num_pages; page_idx++) {
-			cdf_os_mem_free_consistent(osdev, PAGE_SIZE,
-				dma_pages->page_v_addr_start,
-				dma_pages->page_p_addr, memctxt);
-			dma_pages++;
-		}
-		cdf_mem_free(pages->dma_pages);
-	}
-
-	pages->cacheable_pages = NULL;
-	pages->dma_pages = NULL;
-	pages->num_pages = 0;
-	return;
-}
-
-
-/**
- * cdf_mem_set() - set (fill) memory with a specified byte value.
- * @pMemory:    Pointer to memory that will be set
- * @numBytes:   Number of bytes to be set
- * @value:      Byte set in memory
- *
- * Return:
- *    Nothing
- *
- */
-void cdf_mem_set(void *ptr, uint32_t numBytes, uint32_t value)
-{
-	if (ptr == NULL) {
-		QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
-			  "%s called with NULL parameter ptr", __func__);
-		return;
-	}
-	memset(ptr, value, numBytes);
-}
-
-/**
- * cdf_mem_zero() - zero out memory
- * @pMemory:    pointer to memory that will be set to zero
- * @numBytes:   number of bytes zero
- * @value:      byte set in memory
- *
- *  This function sets the memory location to all zeros, essentially clearing
- *  the memory.
- *
- * Return:
- *      Nothing
- *
- */
-void cdf_mem_zero(void *ptr, uint32_t numBytes)
-{
-	if (0 == numBytes) {
-		/* special case where ptr can be NULL */
-		return;
-	}
-
-	if (ptr == NULL) {
-		QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
-			  "%s called with NULL parameter ptr", __func__);
-		return;
-	}
-	memset(ptr, 0, numBytes);
-}
-
-/**
- * cdf_mem_copy() - copy memory
- * @pDst:       Pointer to destination memory location (to copy to)
- * @pSrc:       Pointer to source memory location (to copy from)
- * @numBytes:   Number of bytes to copy.
- *
- * Copy host memory from one location to another, similar to memcpy in
- * standard C.  Note this function does not specifically handle overlapping
- * source and destination memory locations.  Calling this function with
- * overlapping source and destination memory locations will result in
- * unpredictable results.  Use cdf_mem_move() if the memory locations
- * for the source and destination are overlapping (or could be overlapping!)
- *
- * Return:
- *    Nothing
- *
- */
-void cdf_mem_copy(void *pDst, const void *pSrc, uint32_t numBytes)
-{
-	if (0 == numBytes) {
-		/* special case where pDst or pSrc can be NULL */
-		return;
-	}
-
-	if ((pDst == NULL) || (pSrc == NULL)) {
-		QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
-			  "%s called with NULL parameter, source:%p destination:%p",
-			  __func__, pSrc, pDst);
-		QDF_ASSERT(0);
-		return;
-	}
-	memcpy(pDst, pSrc, numBytes);
-}
-
-/**
- * cdf_mem_move() - move memory
- * @pDst:       pointer to destination memory location (to move to)
- * @pSrc:       pointer to source memory location (to move from)
- * @numBytes:   number of bytes to move.
- *
- * Move host memory from one location to another, similar to memmove in
- * standard C.  Note this function *does* handle overlapping
- * source and destination memory locations.
-
- * Return:
- *      Nothing
- */
-void cdf_mem_move(void *pDst, const void *pSrc, uint32_t numBytes)
-{
-	if (0 == numBytes) {
-		/* special case where pDst or pSrc can be NULL */
-		return;
-	}
-
-	if ((pDst == NULL) || (pSrc == NULL)) {
-		QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
-			  "%s called with NULL parameter, source:%p destination:%p",
-			  __func__, pSrc, pDst);
-		QDF_ASSERT(0);
-		return;
-	}
-	memmove(pDst, pSrc, numBytes);
-}
-
-/**
- * cdf_mem_compare() - memory compare
- * @pMemory1:   pointer to one location in memory to compare.
- * @pMemory2:   pointer to second location in memory to compare.
- * @numBytes:   the number of bytes to compare.
- *
- * Function to compare two pieces of memory, similar to memcmp function
- * in standard C.
- *
- * Return:
- *      bool - returns a bool value that tells if the memory locations
- *      are equal or not equal.
- *
- */
-bool cdf_mem_compare(const void *pMemory1, const void *pMemory2,
-		     uint32_t numBytes)
-{
-	if (0 == numBytes) {
-		/* special case where pMemory1 or pMemory2 can be NULL */
-		return true;
-	}
-
-	if ((pMemory1 == NULL) || (pMemory2 == NULL)) {
-		QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
-			  "%s called with NULL parameter, p1:%p p2:%p",
-			  __func__, pMemory1, pMemory2);
-		QDF_ASSERT(0);
-		return false;
-	}
-	return memcmp(pMemory1, pMemory2, numBytes) ? false : true;
-}
-
-/**
- * cdf_mem_compare2() - memory compare
- * @pMemory1: pointer to one location in memory to compare.
- * @pMemory2:   pointer to second location in memory to compare.
- * @numBytes:   the number of bytes to compare.
- *
- * Function to compare two pieces of memory, similar to memcmp function
- * in standard C.
- * Return:
- *       int32_t - returns a bool value that tells if the memory
- *       locations are equal or not equal.
- *       0 -- equal
- *       < 0 -- *pMemory1 is less than *pMemory2
- *       > 0 -- *pMemory1 is bigger than *pMemory2
- */
-int32_t cdf_mem_compare2(const void *pMemory1, const void *pMemory2,
-			 uint32_t numBytes)
-{
-	return (int32_t) memcmp(pMemory1, pMemory2, numBytes);
-}
-
-/**
- * cdf_os_mem_alloc_consistent() - allocates consistent cdf memory
- * @osdev: OS device handle
- * @size: Size to be allocated
- * @paddr: Physical address
- * @mctx: Pointer to DMA context
- *
- * Return: pointer of allocated memory or null if memory alloc fails
- */
-inline void *cdf_os_mem_alloc_consistent(qdf_device_t osdev, qdf_size_t size,
-					 qdf_dma_addr_t *paddr,
-					 qdf_dma_context_t memctx)
-{
-#if defined(A_SIMOS_DEVHOST)
-	static int first = 1;
-	void *vaddr;
-
-	if (first) {
-		first = 0;
-		pr_err("Warning: bypassing %s\n", __func__);
-	}
-	vaddr = cdf_mem_malloc(size);
-	*paddr = ((qdf_dma_addr_t) vaddr);
-	return vaddr;
-#else
-	int flags = GFP_KERNEL;
-	void *alloc_mem = NULL;
-
-	if (in_interrupt() || irqs_disabled() || in_atomic())
-		flags = GFP_ATOMIC;
-
-	alloc_mem = dma_alloc_coherent(osdev->dev, size, paddr, flags);
-	if (alloc_mem == NULL)
-		pr_err("%s Warning: unable to alloc consistent memory of size %zu!\n",
-			__func__, size);
-	return alloc_mem;
-#endif
-}
-
-/**
- * cdf_os_mem_free_consistent() - free consistent cdf memory
- * @osdev: OS device handle
- * @size: Size to be allocated
- * @paddr: Physical address
- * @mctx: Pointer to DMA context
- *
- * Return: none
- */
-inline void
-cdf_os_mem_free_consistent(qdf_device_t osdev,
-			   qdf_size_t size,
-			   void *vaddr,
-			   qdf_dma_addr_t paddr, qdf_dma_context_t memctx)
-{
-#if defined(A_SIMOS_DEVHOST)
-	static int first = 1;
-
-	if (first) {
-		first = 0;
-		pr_err("Warning: bypassing %s\n", __func__);
-	}
-	cdf_mem_free(vaddr);
-	return;
-#else
-	dma_free_coherent(osdev->dev, size, vaddr, paddr);
-#endif
-}
-
-
-/**
- * cdf_os_mem_dma_sync_single_for_device() - assign memory to device
- * @osdev: OS device handle
- * @bus_addr: dma address to give to the device
- * @size: Size of the memory block
- * @direction: direction data will be dma'ed
- *
- * Assgin memory to the remote device.
- * The cache lines are flushed to ram or invalidated as needed.
- *
- * Return: none
- */
-
-inline void
-cdf_os_mem_dma_sync_single_for_device(qdf_device_t osdev,
-				      qdf_dma_addr_t bus_addr,
-				      qdf_size_t size,
-				      enum dma_data_direction direction)
-{
-	dma_sync_single_for_device(osdev->dev, bus_addr,  size, direction);
-}
-
diff --git a/core/cdf/src/cdf_nbuf.c b/core/cdf/src/cdf_nbuf.c
index 10e55dc..2968d9d 100644
--- a/core/cdf/src/cdf_nbuf.c
+++ b/core/cdf/src/cdf_nbuf.c
@@ -42,7 +42,7 @@
 #endif /* FEATURE_TSO */
 #include <qdf_types.h>
 #include <cdf_nbuf.h>
-#include <cdf_memory.h>
+#include <qdf_mem.h>
 #include <qdf_trace.h>
 #include <qdf_status.h>
 #include <qdf_lock.h>
@@ -443,17 +443,17 @@
 		return;
 	}
 
-	cdf_mem_zero(string_buf, NBUF_PKT_TRAC_MAX_STRING);
-	cdf_mem_copy(string_buf, event_string, cdf_str_len(event_string));
+	qdf_mem_zero(string_buf, NBUF_PKT_TRAC_MAX_STRING);
+	qdf_mem_copy(string_buf, event_string, cdf_str_len(event_string));
 	if (NBUF_PKT_TRAC_TYPE_EAPOL & cdf_nbuf_trace_get_proto_type(buf)) {
-		cdf_mem_copy(string_buf + cdf_str_len(event_string),
+		qdf_mem_copy(string_buf + cdf_str_len(event_string),
 			     "EPL", NBUF_PKT_TRAC_PROTO_STRING);
 	} else if (NBUF_PKT_TRAC_TYPE_DHCP & cdf_nbuf_trace_get_proto_type(buf)) {
-		cdf_mem_copy(string_buf + cdf_str_len(event_string),
+		qdf_mem_copy(string_buf + cdf_str_len(event_string),
 			     "DHC", NBUF_PKT_TRAC_PROTO_STRING);
 	} else if (NBUF_PKT_TRAC_TYPE_MGMT_ACTION &
 		   cdf_nbuf_trace_get_proto_type(buf)) {
-		cdf_mem_copy(string_buf + cdf_str_len(event_string),
+		qdf_mem_copy(string_buf + cdf_str_len(event_string),
 			     "MACT", NBUF_PKT_TRAC_PROTO_STRING);
 	}
 
@@ -567,7 +567,7 @@
 		while (p_node) {
 			p_prev = p_node;
 			p_node = p_node->p_next;
-			cdf_mem_free(p_prev);
+			qdf_mem_free(p_prev);
 		}
 	}
 
@@ -638,7 +638,7 @@
 		QDF_ASSERT(0);
 		goto done;
 	} else {
-		p_node = (CDF_NBUF_TRACK *) cdf_mem_malloc(sizeof(*p_node));
+		p_node = (CDF_NBUF_TRACK *) qdf_mem_malloc(sizeof(*p_node));
 		if (p_node) {
 			p_node->net_buf = net_buf;
 			p_node->file_name = file_name;
@@ -687,7 +687,7 @@
 	/* Found at head of the table */
 	if (p_head->net_buf == net_buf) {
 		gp_cdf_net_buf_track_tbl[i] = p_node->p_next;
-		cdf_mem_free((void *)p_node);
+		qdf_mem_free((void *)p_node);
 		found = true;
 		goto done;
 	}
@@ -698,7 +698,7 @@
 		p_node = p_node->p_next;
 		if ((NULL != p_node) && (p_node->net_buf == net_buf)) {
 			p_prev->p_next = p_node->p_next;
-			cdf_mem_free((void *)p_node);
+			qdf_mem_free((void *)p_node);
 			found = true;
 			break;
 		}
diff --git a/core/cds/inc/cds_api.h b/core/cds/inc/cds_api.h
index 5349e9f..ee11462 100644
--- a/core/cds/inc/cds_api.h
+++ b/core/cds/inc/cds_api.h
@@ -36,7 +36,7 @@
 
 #include <qdf_types.h>
 #include <qdf_status.h>
-#include <cdf_memory.h>
+#include <qdf_mem.h>
 #include <qdf_list.h>
 #include <qdf_trace.h>
 #include <qdf_event.h>
diff --git a/core/cds/inc/cds_crypto.h b/core/cds/inc/cds_crypto.h
index b0a4087..4355ce2 100644
--- a/core/cds/inc/cds_crypto.h
+++ b/core/cds/inc/cds_crypto.h
@@ -36,7 +36,7 @@
 
 #include <qdf_types.h>
 #include <qdf_status.h>
-#include <cdf_memory.h>
+#include <qdf_mem.h>
 #include <qdf_list.h>
 #include <qdf_trace.h>
 #include <qdf_event.h>
diff --git a/core/cds/src/cds_api.c b/core/cds/src/cds_api.c
index f7e4424..b63acbe 100644
--- a/core/cds/src/cds_api.c
+++ b/core/cds/src/cds_api.c
@@ -90,12 +90,12 @@
 v_CONTEXT_t cds_init(void)
 {
 	qdf_mc_timer_manager_init();
-	cdf_mem_init();
+	qdf_mem_init();
 
 	gp_cds_context = &g_cds_context;
 
 	gp_cds_context->qdf_ctx = &g_qdf_ctx;
-	cdf_mem_zero(&g_qdf_ctx, sizeof(g_qdf_ctx));
+	qdf_mem_zero(&g_qdf_ctx, sizeof(g_qdf_ctx));
 
 	qdf_trace_spin_lock_init();
 
@@ -122,10 +122,10 @@
 	gp_cds_context->qdf_ctx = NULL;
 	gp_cds_context = NULL;
 
-	cdf_mem_zero(&g_cds_context, sizeof(g_cds_context));
+	qdf_mem_zero(&g_cds_context, sizeof(g_cds_context));
 
 	qdf_mc_timer_manager_exit();
-	cdf_mem_exit();
+	qdf_mem_exit();
 
 	return;
 }
@@ -292,7 +292,7 @@
 	*/
 
 	/*Open the WMA module */
-	cdf_mem_set(&mac_openParms, sizeof(mac_openParms), 0);
+	qdf_mem_set(&mac_openParms, sizeof(mac_openParms), 0);
 	/* UMA is supported in hardware for performing the
 	** frame translation 802.11 <-> 802.3
 	*/
@@ -630,7 +630,7 @@
 		  "%s: wma correctly started", __func__);
 
 	/* Start the MAC */
-	cdf_mem_zero(&halStartParams,
+	qdf_mem_zero(&halStartParams,
 		     sizeof(tHalMacStartParameters));
 
 	/* Start the MAC */
@@ -1103,7 +1103,7 @@
 
 	/* Dynamically allocate the context for module */
 
-	*ppModuleContext = cdf_mem_malloc(size);
+	*ppModuleContext = qdf_mem_malloc(size);
 
 	if (*ppModuleContext == NULL) {
 		QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
@@ -1114,7 +1114,7 @@
 	}
 
 	if (moduleID == QDF_MODULE_ID_TLSHIM)
-		cdf_mem_zero(*ppModuleContext, size);
+		qdf_mem_zero(*ppModuleContext, size);
 
 	*pGpModContext = *ppModuleContext;
 
@@ -1236,7 +1236,7 @@
 	}
 
 	if (pModuleContext != NULL)
-		cdf_mem_free(pModuleContext);
+		qdf_mem_free(pModuleContext);
 
 	*pGpModContext = NULL;
 
@@ -1332,7 +1332,7 @@
 	atomic_set(&cds_wrapper_empty_count, 0);
 
 	/* Copy the message now */
-	cdf_mem_copy((void *)pMsgWrapper->pVosMsg,
+	qdf_mem_copy((void *)pMsgWrapper->pVosMsg,
 		     (void *)pMsg, sizeof(cds_msg_t));
 
 	cds_mq_put(pTargetMq, pMsgWrapper);
diff --git a/core/cds/src/cds_concurrency.c b/core/cds/src/cds_concurrency.c
index 65d96ef..5423e0e 100644
--- a/core/cds/src/cds_concurrency.c
+++ b/core/cds/src/cds_concurrency.c
@@ -3877,7 +3877,7 @@
 	cds_debug("Initializing the policy manager");
 
 	/* init conc_connection_list */
-	cdf_mem_zero(conc_connection_list, sizeof(conc_connection_list));
+	qdf_mem_zero(conc_connection_list, sizeof(conc_connection_list));
 
 	if (!QDF_IS_STATUS_SUCCESS(qdf_mutex_create(
 					&cds_ctx->cdf_conc_list_lock))) {
@@ -4189,7 +4189,7 @@
 	}
 
 	/* clean up the entry */
-	cdf_mem_zero(&conc_connection_list[next_conn_index - 1],
+	qdf_mem_zero(&conc_connection_list[next_conn_index - 1],
 		sizeof(*conc_connection_list));
 	return QDF_STATUS_SUCCESS;
 }
@@ -4305,9 +4305,9 @@
 				     sizeof(unsafe_channel_list));
 
 	if (unsafe_channel_count) {
-		cdf_mem_copy(current_channel_list, pcl_channels,
+		qdf_mem_copy(current_channel_list, pcl_channels,
 			current_channel_count);
-		cdf_mem_zero(pcl_channels,
+		qdf_mem_zero(pcl_channels,
 			sizeof(*pcl_channels)*current_channel_count);
 
 		for (i = 0; i < current_channel_count; i++) {
@@ -4414,13 +4414,13 @@
 	num_channels = 0;
 	switch (pcl) {
 	case CDS_24G:
-		cdf_mem_copy(pcl_channels, channel_list_24,
+		qdf_mem_copy(pcl_channels, channel_list_24,
 			chan_index_24);
 		*len = chan_index_24;
 		status = QDF_STATUS_SUCCESS;
 		break;
 	case CDS_5G:
-		cdf_mem_copy(pcl_channels, channel_list_5,
+		qdf_mem_copy(pcl_channels, channel_list_5,
 			chan_index_5);
 		*len = chan_index_5;
 		status = QDF_STATUS_SUCCESS;
@@ -4429,7 +4429,7 @@
 	case CDS_MCC_CH:
 		cds_get_connection_channels(
 			channel_list, &num_channels, 0);
-		cdf_mem_copy(pcl_channels, channel_list, num_channels);
+		qdf_mem_copy(pcl_channels, channel_list, num_channels);
 		*len = num_channels;
 		status = QDF_STATUS_SUCCESS;
 		break;
@@ -4437,9 +4437,9 @@
 	case CDS_MCC_CH_24G:
 		cds_get_connection_channels(
 			channel_list, &num_channels, 0);
-		cdf_mem_copy(pcl_channels, channel_list, num_channels);
+		qdf_mem_copy(pcl_channels, channel_list, num_channels);
 		*len = num_channels;
-		cdf_mem_copy(&pcl_channels[num_channels],
+		qdf_mem_copy(&pcl_channels[num_channels],
 			channel_list_24, chan_index_24);
 		*len += chan_index_24;
 		status = QDF_STATUS_SUCCESS;
@@ -4448,34 +4448,34 @@
 	case CDS_MCC_CH_5G:
 		cds_get_connection_channels(
 			channel_list, &num_channels, 0);
-		cdf_mem_copy(pcl_channels, channel_list,
+		qdf_mem_copy(pcl_channels, channel_list,
 			num_channels);
 		*len = num_channels;
-		cdf_mem_copy(&pcl_channels[num_channels],
+		qdf_mem_copy(&pcl_channels[num_channels],
 			channel_list_5, chan_index_5);
 		*len += chan_index_5;
 		status = QDF_STATUS_SUCCESS;
 		break;
 	case CDS_24G_SCC_CH:
 	case CDS_24G_MCC_CH:
-		cdf_mem_copy(pcl_channels, channel_list_24,
+		qdf_mem_copy(pcl_channels, channel_list_24,
 			chan_index_24);
 		*len = chan_index_24;
 		cds_get_connection_channels(
 			channel_list, &num_channels, 0);
-		cdf_mem_copy(&pcl_channels[chan_index_24],
+		qdf_mem_copy(&pcl_channels[chan_index_24],
 			channel_list, num_channels);
 		*len += num_channels;
 		status = QDF_STATUS_SUCCESS;
 		break;
 	case CDS_5G_SCC_CH:
 	case CDS_5G_MCC_CH:
-		cdf_mem_copy(pcl_channels, channel_list_5,
+		qdf_mem_copy(pcl_channels, channel_list_5,
 			chan_index_5);
 		*len = chan_index_5;
 		cds_get_connection_channels(
 			channel_list, &num_channels, 0);
-		cdf_mem_copy(&pcl_channels[chan_index_5],
+		qdf_mem_copy(&pcl_channels[chan_index_5],
 			channel_list, num_channels);
 		*len += num_channels;
 		status = QDF_STATUS_SUCCESS;
@@ -4483,7 +4483,7 @@
 	case CDS_SCC_ON_24_SCC_ON_5:
 		cds_get_connection_channels(
 			channel_list, &num_channels, 1);
-		cdf_mem_copy(pcl_channels, channel_list,
+		qdf_mem_copy(pcl_channels, channel_list,
 			num_channels);
 		*len = num_channels;
 		status = QDF_STATUS_SUCCESS;
@@ -4491,16 +4491,16 @@
 	case CDS_SCC_ON_5_SCC_ON_24:
 		cds_get_connection_channels(
 			channel_list, &num_channels, 2);
-		cdf_mem_copy(pcl_channels, channel_list, num_channels);
+		qdf_mem_copy(pcl_channels, channel_list, num_channels);
 		*len = num_channels;
 		status = QDF_STATUS_SUCCESS;
 		break;
 	case CDS_SCC_ON_24_SCC_ON_5_24G:
 		cds_get_connection_channels(
 			channel_list, &num_channels, 1);
-		cdf_mem_copy(pcl_channels, channel_list, num_channels);
+		qdf_mem_copy(pcl_channels, channel_list, num_channels);
 		*len = num_channels;
-		cdf_mem_copy(&pcl_channels[num_channels],
+		qdf_mem_copy(&pcl_channels[num_channels],
 			channel_list_24, chan_index_24);
 		*len += chan_index_24;
 		status = QDF_STATUS_SUCCESS;
@@ -4508,9 +4508,9 @@
 	case CDS_SCC_ON_24_SCC_ON_5_5G:
 		cds_get_connection_channels(
 			channel_list, &num_channels, 1);
-		cdf_mem_copy(pcl_channels, channel_list, num_channels);
+		qdf_mem_copy(pcl_channels, channel_list, num_channels);
 		*len = num_channels;
-		cdf_mem_copy(&pcl_channels[num_channels],
+		qdf_mem_copy(&pcl_channels[num_channels],
 			channel_list_5, chan_index_5);
 		*len += chan_index_5;
 		status = QDF_STATUS_SUCCESS;
@@ -4518,9 +4518,9 @@
 	case CDS_SCC_ON_5_SCC_ON_24_24G:
 		cds_get_connection_channels(
 			channel_list, &num_channels, 2);
-		cdf_mem_copy(pcl_channels, channel_list, num_channels);
+		qdf_mem_copy(pcl_channels, channel_list, num_channels);
 		*len = num_channels;
-		cdf_mem_copy(&pcl_channels[num_channels],
+		qdf_mem_copy(&pcl_channels[num_channels],
 			channel_list_24, chan_index_24);
 		*len += chan_index_24;
 		status = QDF_STATUS_SUCCESS;
@@ -4528,9 +4528,9 @@
 	case CDS_SCC_ON_5_SCC_ON_24_5G:
 		cds_get_connection_channels(
 			channel_list, &num_channels, 2);
-		cdf_mem_copy(pcl_channels, channel_list, num_channels);
+		qdf_mem_copy(pcl_channels, channel_list, num_channels);
 		*len = num_channels;
-		cdf_mem_copy(&pcl_channels[num_channels],
+		qdf_mem_copy(&pcl_channels[num_channels],
 			channel_list_5, chan_index_5);
 		*len += chan_index_5;
 		status = QDF_STATUS_SUCCESS;
@@ -6336,7 +6336,7 @@
 						p2pgo_channel_num,
 						IEEE80211_BAND_5GHZ);
 			}
-			cdf_mem_zero(&hdd_avoid_freq_list,
+			qdf_mem_zero(&hdd_avoid_freq_list,
 					sizeof(hdd_avoid_freq_list));
 			hdd_avoid_freq_list.avoidFreqRangeCount = 1;
 			hdd_avoid_freq_list.avoidFreqRange[0].startFreq = freq;
@@ -6620,7 +6620,7 @@
 	}
 
 	/* generate vendor specific event */
-	cdf_mem_zero((void *)&hdd_avoid_freq_list, sizeof(tHddAvoidFreqList));
+	qdf_mem_zero((void *)&hdd_avoid_freq_list, sizeof(tHddAvoidFreqList));
 	hdd_avoid_freq_list.avoidFreqRange[0].startFreq =
 		cds_chan_to_freq(pHostapdAdapter->sessionCtx.ap.
 				operatingChannel);
diff --git a/core/cds/src/cds_mq.c b/core/cds/src/cds_mq.c
index f622f39..95b30cf 100644
--- a/core/cds/src/cds_mq.c
+++ b/core/cds/src/cds_mq.c
@@ -209,7 +209,7 @@
 		}
 	}
 
-	cdf_mem_free(pBuf);
+	qdf_mem_free(pBuf);
 
 	return cdf_ret_status;
 }
diff --git a/core/cds/src/cds_packet.c b/core/cds/src/cds_packet.c
index bd47645..b0f6fdc 100644
--- a/core/cds/src/cds_packet.c
+++ b/core/cds/src/cds_packet.c
@@ -44,7 +44,7 @@
 #include <qdf_trace.h>
 #include <wlan_hdd_main.h>
 #include "cdf_nbuf.h"
-#include "cdf_memory.h"
+#include "qdf_mem.h"
 
 #define TX_PKT_MIN_HEADROOM          (64)
 
@@ -89,7 +89,7 @@
 	packet->pkt_buf = NULL;
 
 	/* Free up the Rx packet */
-	cdf_mem_free(packet);
+	qdf_mem_free(packet);
 
 	return QDF_STATUS_SUCCESS;
 }
@@ -197,9 +197,9 @@
 	slot = trace_buffer_order % CDS_PKT_TRAC_MAX_TRACE_BUF;
 	trace_buffer[slot].order = trace_buffer_order;
 	trace_buffer[slot].event_time = qdf_mc_timer_get_system_time();
-	cdf_mem_zero(trace_buffer[slot].event_string,
+	qdf_mem_zero(trace_buffer[slot].event_string,
 		     sizeof(trace_buffer[slot].event_string));
-	cdf_mem_copy(trace_buffer[slot].event_string,
+	qdf_mem_copy(trace_buffer[slot].event_string,
 		     event_string,
 		     (CDS_PKT_TRAC_MAX_STRING_LEN < strlen(event_string)) ?
 		     CDS_PKT_TRAC_MAX_STRING_LEN : strlen(event_string));
@@ -260,7 +260,7 @@
 	qdf_spinlock_create(&trace_buffer_lock);
 	trace_buffer_order = 0;
 
-	trace_buffer = cdf_mem_malloc(CDS_PKT_TRAC_MAX_TRACE_BUF *
+	trace_buffer = qdf_mem_malloc(CDS_PKT_TRAC_MAX_TRACE_BUF *
 				      sizeof(cds_pkt_proto_trace_t));
 
 	/* Register callback function to NBUF
@@ -277,7 +277,7 @@
 {
 	QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
 		  "%s %d", __func__, __LINE__);
-	cdf_mem_free(trace_buffer);
+	qdf_mem_free(trace_buffer);
 	qdf_spinlock_destroy(&trace_buffer_lock);
 
 	return;
diff --git a/core/cds/src/cds_regdomain.c b/core/cds/src/cds_regdomain.c
index 78dd456..c75d61f 100644
--- a/core/cds/src/cds_regdomain.c
+++ b/core/cds/src/cds_regdomain.c
@@ -641,11 +641,11 @@
 	regdm_op_class_map_t *class;
 	uint16_t i;
 
-	if (true == cdf_mem_compare(country, "US", 2))
+	if (true != qdf_mem_cmp(country, "US", 2))
 		class = us_op_class;
-	else if (true == cdf_mem_compare(country, "EU", 2))
+	else if (true != qdf_mem_cmp(country, "EU", 2))
 		class = euro_op_class;
-	else if (true == cdf_mem_compare(country, "JP", 2))
+	else if (true != qdf_mem_cmp(country, "JP", 2))
 		class = japan_op_class;
 	else
 		class = global_op_class;
@@ -675,11 +675,11 @@
 	regdm_op_class_map_t *class = NULL;
 	uint16_t i = 0;
 
-	if (true == cdf_mem_compare(country, "US", 2)) {
+	if (true != qdf_mem_cmp(country, "US", 2)) {
 		class = us_op_class;
-	} else if (true == cdf_mem_compare(country, "EU", 2)) {
+	} else if (true != qdf_mem_cmp(country, "EU", 2)) {
 		class = euro_op_class;
-	} else if (true == cdf_mem_compare(country, "JP", 2)) {
+	} else if (true != qdf_mem_cmp(country, "JP", 2)) {
 		class = japan_op_class;
 	} else {
 		class = global_op_class;
diff --git a/core/cds/src/cds_sched.c b/core/cds/src/cds_sched.c
index bf65868..0d23648 100644
--- a/core/cds/src/cds_sched.c
+++ b/core/cds/src/cds_sched.c
@@ -205,7 +205,7 @@
 			  __func__);
 		return QDF_STATUS_E_INVAL;
 	}
-	cdf_mem_zero(pSchedContext, sizeof(cds_sched_context));
+	qdf_mem_zero(pSchedContext, sizeof(cds_sched_context));
 	pSchedContext->pVContext = p_cds_context;
 	vStatus = cds_sched_init_mqs(pSchedContext);
 	if (!QDF_IS_STATUS_SUCCESS(vStatus)) {
@@ -604,7 +604,7 @@
 			typeof(*pkt), list);
 		list_del(&pkt->list);
 		spin_unlock_bh(&pSchedContext->cds_ol_rx_pkt_freeq_lock);
-		cdf_mem_free(pkt);
+		qdf_mem_free(pkt);
 		spin_lock_bh(&pSchedContext->cds_ol_rx_pkt_freeq_lock);
 	}
 	spin_unlock_bh(&pSchedContext->cds_ol_rx_pkt_freeq_lock);
@@ -625,7 +625,7 @@
 	int i;
 
 	for (i = 0; i < CDS_MAX_OL_RX_PKT; i++) {
-		pkt = cdf_mem_malloc(sizeof(*pkt));
+		pkt = qdf_mem_malloc(sizeof(*pkt));
 		if (!pkt) {
 			QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
 				  "%s Vos packet allocation for ol rx thread failed",
@@ -646,7 +646,7 @@
 				 list) {
 		list_del(&pkt->list);
 		spin_unlock_bh(&pSchedContext->cds_ol_rx_pkt_freeq_lock);
-		cdf_mem_free(pkt);
+		qdf_mem_free(pkt);
 		spin_lock_bh(&pSchedContext->cds_ol_rx_pkt_freeq_lock);
 	}
 	spin_unlock_bh(&pSchedContext->cds_ol_rx_pkt_freeq_lock);
@@ -1060,7 +1060,7 @@
 				  "%s: Freeing MC WMA MSG message type %d",
 				  __func__, pMsgWrapper->pVosMsg->type);
 			if (pMsgWrapper->pVosMsg->bodyptr) {
-				cdf_mem_free((void *)pMsgWrapper->
+				qdf_mem_free((void *)pMsgWrapper->
 					     pVosMsg->bodyptr);
 			}
 
diff --git a/core/cds/src/cds_utils.c b/core/cds/src/cds_utils.c
index a68c0d2..49b7962 100644
--- a/core/cds/src/cds_utils.c
+++ b/core/cds/src/cds_utils.c
@@ -51,7 +51,7 @@
 
 #include "qdf_trace.h"
 #include "cds_utils.h"
-#include "cdf_memory.h"
+#include "qdf_mem.h"
 #include "cds_crypto.h"
 
 #include <linux/err.h>
@@ -298,7 +298,7 @@
 	if (ipn) {
 		value = (0xffffffffffff) & (*((uint64_t *) ipn));
 		value = value + 1;
-		cdf_mem_copy(ipn, &value, IEEE80211_MMIE_IPNLEN);
+		qdf_mem_copy(ipn, &value, IEEE80211_MMIE_IPNLEN);
 	}
 }
 
@@ -377,9 +377,9 @@
 	 * In case of error, revert back to original IPN
 	 * to do that copy the original IPN into previous_ipn
 	 */
-	cdf_mem_copy(&previous_ipn[0], ipn, IEEE80211_MMIE_IPNLEN);
+	qdf_mem_copy(&previous_ipn[0], ipn, IEEE80211_MMIE_IPNLEN);
 	cds_increase_seq(ipn);
-	cdf_mem_copy(mmie->sequence_number, ipn, IEEE80211_MMIE_IPNLEN);
+	qdf_mem_copy(mmie->sequence_number, ipn, IEEE80211_MMIE_IPNLEN);
 
 	/*
 	 * Calculate MIC and then copy
@@ -412,11 +412,11 @@
 	aad[1] = wh->i_fc[1] & ~(IEEE80211_FC1_RETRY | IEEE80211_FC1_PWR_MGT |
 				 IEEE80211_FC1_MORE_DATA);
 	/* A1 || A2 || A3 */
-	cdf_mem_copy(aad + 2, wh->i_addr_all, 3 * IEEE80211_ADDR_LEN);
+	qdf_mem_copy(aad + 2, wh->i_addr_all, 3 * IEEE80211_ADDR_LEN);
 
 	/* MIC = AES-128-CMAC(IGTK, AAD || Management Frame Body || MMIE, 64) */
 	nBytes = AAD_LEN + (frmLen - sizeof(struct ieee80211_frame));
-	input = (uint8_t *) cdf_mem_malloc(nBytes);
+	input = (uint8_t *) qdf_mem_malloc(nBytes);
 	if (NULL == input) {
 		QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
 			  "%s: Memory allocation failed", __func__);
@@ -428,26 +428,26 @@
 	 * Copy the AAD, Management frame body, and
 	 * MMIE with 8 bit MIC zeroed out
 	 */
-	cdf_mem_zero(input, nBytes);
-	cdf_mem_copy(input, aad, AAD_LEN);
+	qdf_mem_zero(input, nBytes);
+	qdf_mem_copy(input, aad, AAD_LEN);
 	/* Copy Management Frame Body and MMIE without MIC */
-	cdf_mem_copy(input + AAD_LEN,
+	qdf_mem_copy(input + AAD_LEN,
 		     (uint8_t *) (efrm -
 				  (frmLen - sizeof(struct ieee80211_frame))),
 		     nBytes - AAD_LEN - CMAC_TLEN);
 
 	cds_cmac_calc_mic(tfm, input, nBytes, mic);
-	cdf_mem_free(input);
+	qdf_mem_free(input);
 
 	QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_INFO_HIGH,
 		  "CMAC(T)= %02X %02X %02X %02X %02X %02X %02X %02X",
 		  mic[0], mic[1], mic[2], mic[3],
 		  mic[4], mic[5], mic[6], mic[7]);
-	cdf_mem_copy(mmie->mic, mic, IEEE80211_MMIE_MICLEN);
+	qdf_mem_copy(mmie->mic, mic, IEEE80211_MMIE_MICLEN);
 
 err_tfm:
 	if (ret) {
-		cdf_mem_copy(ipn, previous_ipn, IEEE80211_MMIE_IPNLEN);
+		qdf_mem_copy(ipn, previous_ipn, IEEE80211_MMIE_IPNLEN);
 	}
 
 	if (tfm)
@@ -485,7 +485,7 @@
 
 	/* Validate IPN */
 	rx_ipn = mmie->sequence_number;
-	if (OS_MEMCMP(rx_ipn, ipn, CMAC_IPN_LEN) <= 0) {
+	if (OS_MEMCMP(rx_ipn, ipn, CMAC_IPN_LEN) != 0) {
 		/* Replay error */
 		QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
 			  "Replay error mmie ipn %02X %02X %02X %02X %02X %02X"
@@ -522,11 +522,11 @@
 	aad[1] = wh->i_fc[1] & ~(IEEE80211_FC1_RETRY | IEEE80211_FC1_PWR_MGT |
 				 IEEE80211_FC1_MORE_DATA);
 	/* A1 || A2 || A3 */
-	cdf_mem_copy(aad + 2, wh->i_addr_all, 3 * IEEE80211_ADDR_LEN);
+	qdf_mem_copy(aad + 2, wh->i_addr_all, 3 * IEEE80211_ADDR_LEN);
 
 	/* MIC = AES-128-CMAC(IGTK, AAD || Management Frame Body || MMIE, 64) */
 	nBytes = AAD_LEN + (efrm - (uint8_t *) (wh + 1));
-	input = (uint8_t *) cdf_mem_malloc(nBytes);
+	input = (uint8_t *) qdf_mem_malloc(nBytes);
 	if (NULL == input) {
 		QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
 			  "Memory allocation failed");
@@ -535,20 +535,20 @@
 	}
 
 	/* Copy the AAD, MMIE with 8 bit MIC zeroed out */
-	cdf_mem_zero(input, nBytes);
-	cdf_mem_copy(input, aad, AAD_LEN);
-	cdf_mem_copy(input + AAD_LEN, (uint8_t *) (wh + 1),
+	qdf_mem_zero(input, nBytes);
+	qdf_mem_copy(input, aad, AAD_LEN);
+	qdf_mem_copy(input + AAD_LEN, (uint8_t *) (wh + 1),
 		     nBytes - AAD_LEN - CMAC_TLEN);
 
 	cds_cmac_calc_mic(tfm, input, nBytes, mic);
-	cdf_mem_free(input);
+	qdf_mem_free(input);
 
 	QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
 		  "CMAC(T)= %02X %02X %02X %02X %02X %02X %02X %02X",
 		  mic[0], mic[1], mic[2], mic[3],
 		  mic[4], mic[5], mic[6], mic[7]);
 
-	if (OS_MEMCMP(mic, mmie->mic, CMAC_TLEN) != 0) {
+	if (OS_MEMCMP(mic, mmie->mic, CMAC_TLEN) == 0) {
 		/* MMIE MIC mismatch */
 		QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
 			  "BC/MC MGMT frame MMIE MIC check Failed"
@@ -562,7 +562,7 @@
 	}
 
 	/* Update IPN */
-	cdf_mem_copy(ipn, rx_ipn, CMAC_IPN_LEN);
+	qdf_mem_copy(ipn, rx_ipn, CMAC_IPN_LEN);
 
 err_tfm:
 	if (tfm)
diff --git a/core/dp/htt/htt.c b/core/dp/htt/htt.c
index c4d4195..ea8a933 100644
--- a/core/dp/htt/htt.c
+++ b/core/dp/htt/htt.c
@@ -34,7 +34,7 @@
  *  connecting the HTT service with HTC; and deleting a HTT instance.
  */
 
-#include <cdf_memory.h>         /* cdf_mem_malloc */
+#include <qdf_mem.h>         /* qdf_mem_malloc */
 #include <qdf_types.h>          /* qdf_device_t, qdf_print */
 
 #include <htt.h>                /* htt_tx_msdu_desc_t */
@@ -76,7 +76,7 @@
 	HTT_TX_MUTEX_RELEASE(&pdev->htt_tx_mutex);
 
 	if (pkt == NULL)
-		pkt = cdf_mem_malloc(sizeof(*pkt));
+		pkt = qdf_mem_malloc(sizeof(*pkt));
 
 	return &pkt->u.pkt;     /* not actually a dereference */
 }
@@ -97,7 +97,7 @@
 	pkt = pdev->htt_htc_pkt_freelist;
 	while (pkt) {
 		next = pkt->u.next;
-		cdf_mem_free(pkt);
+		qdf_mem_free(pkt);
 		pkt = next;
 	}
 	pdev->htt_htc_pkt_freelist = NULL;
@@ -129,7 +129,7 @@
 		netbuf = (cdf_nbuf_t) (pkt->u.pkt.htc_pkt.pNetBufContext);
 		cdf_nbuf_unmap(pdev->osdev, netbuf, QDF_DMA_TO_DEVICE);
 		cdf_nbuf_free(netbuf);
-		cdf_mem_free(pkt);
+		qdf_mem_free(pkt);
 		pkt = next;
 	}
 	pdev->htt_htc_pkt_misclist = NULL;
@@ -152,7 +152,7 @@
 {
 	struct htt_pdev_t *pdev;
 
-	pdev = cdf_mem_malloc(sizeof(*pdev));
+	pdev = qdf_mem_malloc(sizeof(*pdev));
 	if (!pdev)
 		goto fail1;
 
@@ -161,7 +161,7 @@
 	pdev->txrx_pdev = txrx_pdev;
 	pdev->htc_pdev = htc_pdev;
 
-	cdf_mem_set(&pdev->stats, sizeof(pdev->stats), 0);
+	qdf_mem_set(&pdev->stats, sizeof(pdev->stats), 0);
 	pdev->htt_htc_pkt_freelist = NULL;
 #ifdef ATH_11AC_TXCOMPACT
 	pdev->htt_htc_pkt_misclist = NULL;
@@ -200,7 +200,7 @@
 	return pdev;
 
 fail2:
-	cdf_mem_free(pdev);
+	qdf_mem_free(pdev);
 
 fail1:
 	return NULL;
@@ -235,7 +235,7 @@
 	/* pre-allocate some HTC_PACKET objects */
 	for (i = 0; i < HTT_HTC_PKT_POOL_INIT_SIZE; i++) {
 		struct htt_htc_pkt_union *pkt;
-		pkt = cdf_mem_malloc(sizeof(*pkt));
+		pkt = qdf_mem_malloc(sizeof(*pkt));
 		if (!pkt)
 			break;
 		htt_htc_pkt_free(pdev, &pkt->u.pkt);
@@ -362,7 +362,7 @@
  */
 void htt_pdev_free(htt_pdev_handle pdev)
 {
-	cdf_mem_free(pdev);
+	qdf_mem_free(pdev);
 }
 
 void htt_detach_target(htt_pdev_handle pdev)
@@ -397,8 +397,8 @@
 	HTC_SERVICE_CONNECT_RESP response;
 	A_STATUS status;
 
-	cdf_mem_set(&connect, sizeof(connect), 0);
-	cdf_mem_set(&response, sizeof(response), 0);
+	qdf_mem_set(&connect, sizeof(connect), 0);
+	qdf_mem_set(&response, sizeof(response), 0);
 
 	connect.pMetaData = NULL;
 	connect.MetaDataLength = 0;
diff --git a/core/dp/htt/htt_fw_stats.c b/core/dp/htt/htt_fw_stats.c
index da6324a..eb86320 100644
--- a/core/dp/htt/htt_fw_stats.c
+++ b/core/dp/htt/htt_fw_stats.c
@@ -33,7 +33,7 @@
 #include <htc_api.h>            /* HTC_PACKET */
 #include <htt.h>                /* HTT_T2H_MSG_TYPE, etc. */
 #include <cdf_nbuf.h>           /* cdf_nbuf_t */
-#include <cdf_memory.h>         /* cdf_mem_set */
+#include <qdf_mem.h>         /* qdf_mem_set */
 #include <ol_fw_tx_dbg.h>       /* ol_fw_tx_dbg_ppdu_base */
 
 #include <ol_htt_rx_api.h>
@@ -724,8 +724,8 @@
 	char acked_str[HTT_FW_STATS_MAX_BLOCK_ACK_WINDOW + 1];
 	int i, j, word;
 
-	cdf_mem_set(queued_str, HTT_FW_STATS_MAX_BLOCK_ACK_WINDOW, '0');
-	cdf_mem_set(acked_str, HTT_FW_STATS_MAX_BLOCK_ACK_WINDOW, '-');
+	qdf_mem_set(queued_str, HTT_FW_STATS_MAX_BLOCK_ACK_WINDOW, '0');
+	qdf_mem_set(acked_str, HTT_FW_STATS_MAX_BLOCK_ACK_WINDOW, '-');
 	i = 0;
 	for (word = 0; word < 2; word++) {
 		uint32_t queued = *(queued_ptr + word);
diff --git a/core/dp/htt/htt_h2t.c b/core/dp/htt/htt_h2t.c
index 568dc2e..bb8e714 100644
--- a/core/dp/htt/htt_h2t.c
+++ b/core/dp/htt/htt_h2t.c
@@ -42,7 +42,7 @@
  *      from the host to the target.
  */
 
-#include <cdf_memory.h>         /* cdf_mem_copy */
+#include <qdf_mem.h>         /* qdf_mem_copy */
 #include <cdf_nbuf.h>           /* cdf_nbuf_map_single */
 #include <htc_api.h>            /* HTC_PACKET */
 #include <htc.h>                /* HTC_HDR_ALIGNMENT_PADDING */
diff --git a/core/dp/htt/htt_internal.h b/core/dp/htt/htt_internal.h
index 5055a6c..8b1cb4c 100644
--- a/core/dp/htt/htt_internal.h
+++ b/core/dp/htt/htt_internal.h
@@ -532,7 +532,7 @@
 static inline
 void htt_rx_dbg_rxbuf_init(struct htt_pdev_t *pdev)
 {
-	pdev->rx_buff_list = cdf_mem_malloc(
+	pdev->rx_buff_list = qdf_mem_malloc(
 				 HTT_RX_RING_BUFF_DBG_LIST *
 				 sizeof(struct rx_buf_debug));
 	if (!pdev->rx_buff_list) {
@@ -598,7 +598,7 @@
 void htt_rx_dbg_rxbuf_deinit(struct htt_pdev_t *pdev)
 {
 	if (pdev->rx_buff_list)
-		cdf_mem_free(pdev->rx_buff_list);
+		qdf_mem_free(pdev->rx_buff_list);
 }
 #else
 static inline
diff --git a/core/dp/htt/htt_rx.c b/core/dp/htt/htt_rx.c
index 1ccc9aa..eb532ce 100644
--- a/core/dp/htt/htt_rx.c
+++ b/core/dp/htt/htt_rx.c
@@ -39,7 +39,7 @@
  *      rx ring (applies to LL only).
  */
 
-#include <cdf_memory.h>         /* cdf_mem_malloc,free, etc. */
+#include <qdf_mem.h>         /* qdf_mem_malloc,free, etc. */
 #include <qdf_types.h>          /* qdf_print, bool */
 #include <cdf_nbuf.h>           /* cdf_nbuf_t, etc. */
 #include <qdf_timer.h>		/* qdf_timer_free */
@@ -140,13 +140,13 @@
 			list_iter = list_iter->next;
 
 			if (!hash_entry->fromlist)
-				cdf_mem_free(hash_entry);
+				qdf_mem_free(hash_entry);
 		}
 
-		cdf_mem_free(pdev->rx_ring.hash_table[i].entries);
+		qdf_mem_free(pdev->rx_ring.hash_table[i].entries);
 
 	}
-	cdf_mem_free(pdev->rx_ring.hash_table);
+	qdf_mem_free(pdev->rx_ring.hash_table);
 	pdev->rx_ring.hash_table = NULL;
 }
 
@@ -346,7 +346,7 @@
 	qdf_timer_free(&pdev->rx_ring.refill_retry_timer);
 
 	if (pdev->cfg.is_full_reorder_offload) {
-		cdf_os_mem_free_consistent(pdev->osdev,
+		qdf_mem_free_consistent(pdev->osdev,
 					   sizeof(uint32_t),
 					   pdev->rx_ring.target_idx.vaddr,
 					   pdev->rx_ring.target_idx.paddr,
@@ -375,10 +375,10 @@
 			sw_rd_idx++;
 			sw_rd_idx &= pdev->rx_ring.size_mask;
 		}
-		cdf_mem_free(pdev->rx_ring.buf.netbufs_ring);
+		qdf_mem_free(pdev->rx_ring.buf.netbufs_ring);
 	}
 
-	cdf_os_mem_free_consistent(pdev->osdev,
+	qdf_mem_free_consistent(pdev->osdev,
 				   sizeof(uint32_t),
 				   pdev->rx_ring.alloc_idx.vaddr,
 				   pdev->rx_ring.alloc_idx.paddr,
@@ -386,7 +386,7 @@
 							    alloc_idx),
 							   memctx));
 
-	cdf_os_mem_free_consistent(pdev->osdev,
+	qdf_mem_free_consistent(pdev->osdev,
 				   pdev->rx_ring.size * sizeof(qdf_dma_addr_t),
 				   pdev->rx_ring.buf.paddrs_ring,
 				   pdev->rx_ring.base_paddr,
@@ -1559,7 +1559,7 @@
 	dest = cdf_nbuf_put_tail(prev_buf, wifi_hdr_len);
 	if (!dest)
 		goto mpdu_stitch_fail;
-	cdf_mem_copy(dest, hdr_desc, wifi_hdr_len);
+	qdf_mem_copy(dest, hdr_desc, wifi_hdr_len);
 	hdr_desc += wifi_hdr_len;
 
 	/* NOTE - This padding is present only in the RAW header status - not
@@ -1602,7 +1602,7 @@
 		/* Copy this buffers MSDU related status into the prev buffer */
 		dest = cdf_nbuf_put_tail(prev_buf, msdu_llc_len + amsdu_pad);
 		dest += amsdu_pad;
-		cdf_mem_copy(dest, hdr_desc, msdu_llc_len);
+		qdf_mem_copy(dest, hdr_desc, msdu_llc_len);
 
 		/* Push the MSDU buffer beyond the decap header */
 		cdf_nbuf_pull_head(msdu, decap_hdr_pull_bytes);
@@ -1967,7 +1967,7 @@
 
 		htt_list_remove(pdev->rx_ring.hash_table[i].freepool.next);
 	} else {
-		hash_element = cdf_mem_malloc(sizeof(struct htt_rx_hash_entry));
+		hash_element = qdf_mem_malloc(sizeof(struct htt_rx_hash_entry));
 		if (qdf_unlikely(NULL == hash_element)) {
 			HTT_ASSERT_ALWAYS(0);
 			return 1;
@@ -2022,7 +2022,7 @@
 						  freepool,
 						  &hash_entry->listnode);
 			else
-				cdf_mem_free(hash_entry);
+				qdf_mem_free(hash_entry);
 
 			htt_rx_dbg_rxbuf_reset(pdev, netbuf);
 			break;
@@ -2052,7 +2052,7 @@
 	HTT_ASSERT2(CDF_IS_PWR2(RX_NUM_HASH_BUCKETS));
 
 	pdev->rx_ring.hash_table =
-		cdf_mem_malloc(RX_NUM_HASH_BUCKETS *
+		qdf_mem_malloc(RX_NUM_HASH_BUCKETS *
 			       sizeof(struct htt_rx_hash_bucket));
 
 	if (NULL == pdev->rx_ring.hash_table) {
@@ -2071,7 +2071,7 @@
 
 		/* pre-allocate a pool of entries for this bucket */
 		pdev->rx_ring.hash_table[i].entries =
-			cdf_mem_malloc(RX_ENTRIES_SIZE *
+			qdf_mem_malloc(RX_ENTRIES_SIZE *
 				       sizeof(struct htt_rx_hash_entry));
 
 		if (NULL == pdev->rx_ring.hash_table[i].entries) {
@@ -2079,10 +2079,10 @@
 				(int)i);
 			while (i) {
 				i--;
-				cdf_mem_free(pdev->rx_ring.hash_table[i].
+				qdf_mem_free(pdev->rx_ring.hash_table[i].
 					     entries);
 			}
-			cdf_mem_free(pdev->rx_ring.hash_table);
+			qdf_mem_free(pdev->rx_ring.hash_table);
 			pdev->rx_ring.hash_table = NULL;
 			return 1;
 		}
@@ -2151,12 +2151,9 @@
 
 		/* allocate the target index */
 		pdev->rx_ring.target_idx.vaddr =
-			 cdf_os_mem_alloc_consistent(pdev->osdev,
+			 qdf_mem_alloc_consistent(pdev->osdev, pdev->osdev->dev,
 				 sizeof(uint32_t),
-				 &paddr,
-				 qdf_get_dma_mem_context(
-					(&pdev->rx_ring.target_idx),
-					 memctx));
+				 &paddr);
 
 		if (!pdev->rx_ring.target_idx.vaddr)
 			goto fail1;
@@ -2165,7 +2162,7 @@
 		*pdev->rx_ring.target_idx.vaddr = 0;
 	} else {
 		pdev->rx_ring.buf.netbufs_ring =
-			cdf_mem_malloc(pdev->rx_ring.size * sizeof(cdf_nbuf_t));
+			qdf_mem_malloc(pdev->rx_ring.size * sizeof(cdf_nbuf_t));
 		if (!pdev->rx_ring.buf.netbufs_ring)
 			goto fail1;
 
@@ -2174,25 +2171,18 @@
 	}
 
 	pdev->rx_ring.buf.paddrs_ring =
-		cdf_os_mem_alloc_consistent(
-			pdev->osdev,
+		qdf_mem_alloc_consistent(
+			pdev->osdev, pdev->osdev->dev,
 			 pdev->rx_ring.size * ring_elem_size,
-			 &paddr,
-			 qdf_get_dma_mem_context(
-				(&pdev->rx_ring.buf),
-				 memctx));
+			 &paddr);
 	if (!pdev->rx_ring.buf.paddrs_ring)
 		goto fail2;
 
 	pdev->rx_ring.base_paddr = paddr;
 	pdev->rx_ring.alloc_idx.vaddr =
-		 cdf_os_mem_alloc_consistent(
-			pdev->osdev,
-			 sizeof(uint32_t),
-			 &paddr,
-			 qdf_get_dma_mem_context(
-				(&pdev->rx_ring.alloc_idx),
-				 memctx));
+		 qdf_mem_alloc_consistent(
+			pdev->osdev, pdev->osdev->dev,
+			 sizeof(uint32_t), &paddr);
 
 	if (!pdev->rx_ring.alloc_idx.vaddr)
 		goto fail3;
@@ -2257,7 +2247,7 @@
 	return 0;               /* success */
 
 fail3:
-	cdf_os_mem_free_consistent(pdev->osdev,
+	qdf_mem_free_consistent(pdev->osdev,
 				   pdev->rx_ring.size * sizeof(qdf_dma_addr_t),
 				   pdev->rx_ring.buf.paddrs_ring,
 				   pdev->rx_ring.base_paddr,
@@ -2266,7 +2256,7 @@
 
 fail2:
 	if (pdev->cfg.is_full_reorder_offload) {
-		cdf_os_mem_free_consistent(pdev->osdev,
+		qdf_mem_free_consistent(pdev->osdev,
 					   sizeof(uint32_t),
 					   pdev->rx_ring.target_idx.vaddr,
 					   pdev->rx_ring.target_idx.paddr,
@@ -2276,7 +2266,7 @@
 								   memctx));
 		htt_rx_hash_deinit(pdev);
 	} else {
-		cdf_mem_free(pdev->rx_ring.buf.netbufs_ring);
+		qdf_mem_free(pdev->rx_ring.buf.netbufs_ring);
 	}
 
 fail1:
@@ -2301,14 +2291,11 @@
 	 *   2bytes: VDEV ID
 	 *   2bytes: length */
 	pdev->ipa_uc_rx_rsc.rx2_ind_ring_base.vaddr =
-		cdf_os_mem_alloc_consistent(
-			pdev->osdev,
+		qdf_mem_alloc_consistent(
+			pdev->osdev, pdev->osdev->dev,
 			rx_ind_ring_elements *
 			sizeof(struct ipa_uc_rx_ring_elem_t),
-			&pdev->ipa_uc_rx_rsc.rx2_ind_ring_base.paddr,
-			qdf_get_dma_mem_context((&pdev->ipa_uc_rx_rsc.
-						 rx2_ind_ring_base),
-						memctx));
+			&pdev->ipa_uc_rx_rsc.rx2_ind_ring_base.paddr);
 	if (!pdev->ipa_uc_rx_rsc.rx2_ind_ring_base.vaddr) {
 		qdf_print("%s: RX IND RING alloc fail", __func__);
 		return -ENOBUFS;
@@ -2317,21 +2304,17 @@
 	/* RX indication ring size, by bytes */
 	pdev->ipa_uc_rx_rsc.rx2_ind_ring_size =
 		rx_ind_ring_elements * sizeof(struct ipa_uc_rx_ring_elem_t);
-	cdf_mem_zero(pdev->ipa_uc_rx_rsc.rx2_ind_ring_base.vaddr,
+	qdf_mem_zero(pdev->ipa_uc_rx_rsc.rx2_ind_ring_base.vaddr,
 		pdev->ipa_uc_rx_rsc.rx2_ind_ring_size);
 
 	/* Allocate RX process done index */
 	pdev->ipa_uc_rx_rsc.rx2_ipa_prc_done_idx.vaddr =
-		cdf_os_mem_alloc_consistent(
-			pdev->osdev,
-			4,
-			&pdev->ipa_uc_rx_rsc.rx2_ipa_prc_done_idx.paddr,
-			qdf_get_dma_mem_context((&pdev->ipa_uc_rx_rsc.
-						 rx_ipa_prc_done_idx),
-						memctx));
+		qdf_mem_alloc_consistent(
+			pdev->osdev, pdev->osdev->dev, 4,
+			&pdev->ipa_uc_rx_rsc.rx2_ipa_prc_done_idx.paddr);
 	if (!pdev->ipa_uc_rx_rsc.rx2_ipa_prc_done_idx.vaddr) {
 		qdf_print("%s: RX PROC DONE IND alloc fail", __func__);
-		cdf_os_mem_free_consistent(
+		qdf_mem_free_consistent(
 			pdev->osdev,
 			pdev->ipa_uc_rx_rsc.rx2_ind_ring_size,
 			pdev->ipa_uc_rx_rsc.rx2_ind_ring_base.vaddr,
@@ -2341,7 +2324,7 @@
 						memctx));
 		return -ENOBUFS;
 	}
-	cdf_mem_zero(pdev->ipa_uc_rx_rsc.rx2_ipa_prc_done_idx.vaddr, 4);
+	qdf_mem_zero(pdev->ipa_uc_rx_rsc.rx2_ipa_prc_done_idx.vaddr, 4);
 	return 0;
 }
 #else
@@ -2369,14 +2352,12 @@
 	 *   2bytes: VDEV ID
 	 *   2bytes: length */
 	pdev->ipa_uc_rx_rsc.rx_ind_ring_base.vaddr =
-		cdf_os_mem_alloc_consistent(
+		qdf_mem_alloc_consistent(
 			pdev->osdev,
+			pdev->osdev->dev,
 			rx_ind_ring_elements *
 			sizeof(struct ipa_uc_rx_ring_elem_t),
-			&pdev->ipa_uc_rx_rsc.rx_ind_ring_base.paddr,
-			qdf_get_dma_mem_context((&pdev->ipa_uc_rx_rsc.
-						 rx_ind_ring_base),
-						memctx));
+			&pdev->ipa_uc_rx_rsc.rx_ind_ring_base.paddr);
 	if (!pdev->ipa_uc_rx_rsc.rx_ind_ring_base.vaddr) {
 		qdf_print("%s: RX IND RING alloc fail", __func__);
 		return -ENOBUFS;
@@ -2385,21 +2366,17 @@
 	/* RX indication ring size, by bytes */
 	pdev->ipa_uc_rx_rsc.rx_ind_ring_size =
 		rx_ind_ring_elements * sizeof(struct ipa_uc_rx_ring_elem_t);
-	cdf_mem_zero(pdev->ipa_uc_rx_rsc.rx_ind_ring_base.vaddr,
+	qdf_mem_zero(pdev->ipa_uc_rx_rsc.rx_ind_ring_base.vaddr,
 		pdev->ipa_uc_rx_rsc.rx_ind_ring_size);
 
 	/* Allocate RX process done index */
 	pdev->ipa_uc_rx_rsc.rx_ipa_prc_done_idx.vaddr =
-		cdf_os_mem_alloc_consistent(
-			pdev->osdev,
-			4,
-			&pdev->ipa_uc_rx_rsc.rx_ipa_prc_done_idx.paddr,
-			qdf_get_dma_mem_context((&pdev->ipa_uc_rx_rsc.
-						 rx_ipa_prc_done_idx),
-						memctx));
+		qdf_mem_alloc_consistent(
+			pdev->osdev, pdev->osdev->dev, 4,
+			&pdev->ipa_uc_rx_rsc.rx_ipa_prc_done_idx.paddr);
 	if (!pdev->ipa_uc_rx_rsc.rx_ipa_prc_done_idx.vaddr) {
 		qdf_print("%s: RX PROC DONE IND alloc fail", __func__);
-		cdf_os_mem_free_consistent(
+		qdf_mem_free_consistent(
 			pdev->osdev,
 			pdev->ipa_uc_rx_rsc.rx_ind_ring_size,
 			pdev->ipa_uc_rx_rsc.rx_ind_ring_base.vaddr,
@@ -2409,7 +2386,7 @@
 						memctx));
 		return -ENOBUFS;
 	}
-	cdf_mem_zero(pdev->ipa_uc_rx_rsc.rx_ipa_prc_done_idx.vaddr, 4);
+	qdf_mem_zero(pdev->ipa_uc_rx_rsc.rx_ipa_prc_done_idx.vaddr, 4);
 
 	ret = htt_rx_ipa_uc_alloc_wdi2_rsc(pdev, rx_ind_ring_elements);
 	return ret;
@@ -2425,7 +2402,7 @@
 void htt_rx_ipa_uc_free_wdi2_rsc(struct htt_pdev_t *pdev)
 {
 	if (pdev->ipa_uc_rx_rsc.rx2_ind_ring_base.vaddr) {
-		cdf_os_mem_free_consistent(
+		qdf_mem_free_consistent(
 			pdev->osdev,
 			pdev->ipa_uc_rx_rsc.rx2_ind_ring_size,
 			pdev->ipa_uc_rx_rsc.rx2_ind_ring_base.vaddr,
@@ -2436,7 +2413,7 @@
 	}
 
 	if (pdev->ipa_uc_rx_rsc.rx2_ipa_prc_done_idx.vaddr) {
-		cdf_os_mem_free_consistent(
+		qdf_mem_free_consistent(
 			pdev->osdev,
 			4,
 			pdev->ipa_uc_rx_rsc.
@@ -2457,7 +2434,7 @@
 int htt_rx_ipa_uc_detach(struct htt_pdev_t *pdev)
 {
 	if (pdev->ipa_uc_rx_rsc.rx_ind_ring_base.vaddr) {
-		cdf_os_mem_free_consistent(
+		qdf_mem_free_consistent(
 			pdev->osdev,
 			pdev->ipa_uc_rx_rsc.rx_ind_ring_size,
 			pdev->ipa_uc_rx_rsc.rx_ind_ring_base.vaddr,
@@ -2468,7 +2445,7 @@
 	}
 
 	if (pdev->ipa_uc_rx_rsc.rx_ipa_prc_done_idx.vaddr) {
-		cdf_os_mem_free_consistent(
+		qdf_mem_free_consistent(
 			pdev->osdev,
 			4,
 			pdev->ipa_uc_rx_rsc.
diff --git a/core/dp/htt/htt_t2h.c b/core/dp/htt/htt_t2h.c
index 18855b9..6cf12e9 100644
--- a/core/dp/htt/htt_t2h.c
+++ b/core/dp/htt/htt_t2h.c
@@ -370,14 +370,14 @@
 		len = HTT_WDI_IPA_OP_RESPONSE_RSP_LEN_GET(*msg_word);
 
 		op_msg_buffer =
-			cdf_mem_malloc(sizeof
+			qdf_mem_malloc(sizeof
 				       (struct htt_wdi_ipa_op_response_t) +
 				       len);
 		if (!op_msg_buffer) {
 			qdf_print("OPCODE messsage buffer alloc fail");
 			break;
 		}
-		cdf_mem_copy(op_msg_buffer,
+		qdf_mem_copy(op_msg_buffer,
 			     msg_start_ptr,
 			     sizeof(struct htt_wdi_ipa_op_response_t) +
 			     len);
@@ -445,15 +445,15 @@
 			err_info.u.mic_err.key_id =
 				HTT_RX_OFLD_PKT_ERR_MIC_ERR_KEYID_GET
 				(*(msg_word + 1));
-			cdf_mem_copy(err_info.u.mic_err.da,
+			qdf_mem_copy(err_info.u.mic_err.da,
 				 (uint8_t *)(msg_word + 2),
 				 OL_TXRX_MAC_ADDR_LEN);
-			cdf_mem_copy(err_info.u.mic_err.sa,
+			qdf_mem_copy(err_info.u.mic_err.sa,
 				 (uint8_t *)(msg_word + 4),
 				 OL_TXRX_MAC_ADDR_LEN);
-			cdf_mem_copy(&err_info.u.mic_err.pn,
+			qdf_mem_copy(&err_info.u.mic_err.pn,
 				 (uint8_t *)(msg_word + 6), 6);
-			cdf_mem_copy(err_info.u.mic_err.ta,
+			qdf_mem_copy(err_info.u.mic_err.ta,
 				 peer->mac_addr.raw, OL_TXRX_MAC_ADDR_LEN);
 
 			wma_indicate_err(OL_RX_ERR_TKIP_MIC, &err_info);
diff --git a/core/dp/htt/htt_tx.c b/core/dp/htt/htt_tx.c
index 640d028..d53caf9 100644
--- a/core/dp/htt/htt_tx.c
+++ b/core/dp/htt/htt_tx.c
@@ -38,7 +38,7 @@
  */
 #include <osdep.h>              /* uint32_t, offsetof, etc. */
 #include <qdf_types.h>          /* qdf_dma_addr_t */
-#include <cdf_memory.h>         /* cdf_os_mem_alloc_consistent et al */
+#include <qdf_mem.h>         /* qdf_mem_alloc_consistent et al */
 #include <cdf_nbuf.h>           /* cdf_nbuf_t, etc. */
 #include <qdf_time.h>           /* qdf_mdelay */
 
@@ -134,7 +134,7 @@
 {
 	unsigned int target_page;
 	unsigned int offset;
-	struct cdf_mem_dma_page_t *dma_page;
+	struct qdf_mem_dma_page_t *dma_page;
 
 	target_page = index / pdev->frag_descs.desc_pages.num_element_per_page;
 	offset = index % pdev->frag_descs.desc_pages.num_element_per_page;
@@ -158,7 +158,7 @@
 	uint16_t desc_pool_elems)
 {
 	pdev->frag_descs.pool_elems = desc_pool_elems;
-	cdf_mem_multi_pages_alloc(pdev->osdev, &pdev->frag_descs.desc_pages,
+	qdf_mem_multi_pages_alloc(pdev->osdev, &pdev->frag_descs.desc_pages,
 		pdev->frag_descs.size, desc_pool_elems,
 		qdf_get_dma_mem_context((&pdev->frag_descs), memctx), false);
 	if ((0 == pdev->frag_descs.desc_pages.num_pages) ||
@@ -180,7 +180,7 @@
  */
 static void htt_tx_frag_desc_detach(struct htt_pdev_t *pdev)
 {
-	cdf_mem_multi_pages_free(pdev->osdev, &pdev->frag_descs.desc_pages,
+	qdf_mem_multi_pages_free(pdev->osdev, &pdev->frag_descs.desc_pages,
 		qdf_get_dma_mem_context((&pdev->frag_descs), memctx), false);
 }
 
@@ -200,7 +200,7 @@
 {
 	uint16_t frag_page_index;
 	uint16_t frag_elem_index;
-	struct cdf_mem_dma_page_t *dma_page;
+	struct qdf_mem_dma_page_t *dma_page;
 
 	/** Index should never be 0, since its used by the hardware
 	    to terminate the link. */
@@ -313,7 +313,7 @@
 {
 	int i, i_int, pool_size;
 	uint32_t **p;
-	struct cdf_mem_dma_page_t *page_info;
+	struct qdf_mem_dma_page_t *page_info;
 	uint32_t num_link = 0;
 	uint16_t num_page, num_desc_per_page;
 
@@ -328,7 +328,7 @@
 	pdev->tx_descs.pool_elems = desc_pool_elems;
 	pdev->tx_descs.alloc_cnt = 0;
 	pool_size = pdev->tx_descs.pool_elems * pdev->tx_descs.size;
-	cdf_mem_multi_pages_alloc(pdev->osdev, &pdev->tx_descs.desc_pages,
+	qdf_mem_multi_pages_alloc(pdev->osdev, &pdev->tx_descs.desc_pages,
 		pdev->tx_descs.size, pdev->tx_descs.pool_elems,
 		qdf_get_dma_mem_context((&pdev->tx_descs), memctx), false);
 	if ((0 == pdev->tx_descs.desc_pages.num_pages) ||
@@ -381,7 +381,7 @@
 	return 0;
 
 free_htt_desc:
-	cdf_mem_multi_pages_free(pdev->osdev, &pdev->tx_descs.desc_pages,
+	qdf_mem_multi_pages_free(pdev->osdev, &pdev->tx_descs.desc_pages,
 		qdf_get_dma_mem_context((&pdev->tx_descs), memctx), false);
 out_fail:
 	return -ENOBUFS;
@@ -395,7 +395,7 @@
 	}
 
 	htt_tx_frag_desc_detach(pdev);
-	cdf_mem_multi_pages_free(pdev->osdev, &pdev->tx_descs.desc_pages,
+	qdf_mem_multi_pages_free(pdev->osdev, &pdev->tx_descs.desc_pages,
 		qdf_get_dma_mem_context((&pdev->tx_descs), memctx), false);
 }
 
@@ -411,7 +411,7 @@
 				char *target_vaddr)
 {
 	uint16_t i;
-	struct cdf_mem_dma_page_t *page_info = NULL;
+	struct qdf_mem_dma_page_t *page_info = NULL;
 	uint64_t offset;
 
 	for (i = 0; i < pdev->tx_descs.desc_pages.num_pages; i++) {
@@ -885,7 +885,7 @@
 		}
 
 		/* Init buffer */
-		cdf_mem_zero(cdf_nbuf_data(buffer_vaddr), uc_tx_buf_sz);
+		qdf_mem_zero(cdf_nbuf_data(buffer_vaddr), uc_tx_buf_sz);
 		header_ptr = (uint32_t *) cdf_nbuf_data(buffer_vaddr);
 
 		/* HTT control header */
@@ -945,7 +945,7 @@
 		}
 
 		/* Init buffer */
-		cdf_mem_zero(cdf_nbuf_data(buffer_vaddr), uc_tx_buf_sz);
+		qdf_mem_zero(cdf_nbuf_data(buffer_vaddr), uc_tx_buf_sz);
 		header_ptr = (uint32_t *) cdf_nbuf_data(buffer_vaddr);
 
 		/* HTT control header */
@@ -1010,13 +1010,9 @@
 
 	/* Allocate CE Write Index WORD */
 	pdev->ipa_uc_tx_rsc.tx_ce_idx.vaddr =
-		cdf_os_mem_alloc_consistent(
-			pdev->osdev,
-			4,
-			&pdev->ipa_uc_tx_rsc.tx_ce_idx.paddr,
-			qdf_get_dma_mem_context(
-				(&pdev->ipa_uc_tx_rsc.tx_ce_idx),
-				memctx));
+		qdf_mem_alloc_consistent(
+			pdev->osdev, pdev->osdev->dev,
+			4, &pdev->ipa_uc_tx_rsc.tx_ce_idx.paddr);
 	if (!pdev->ipa_uc_tx_rsc.tx_ce_idx.vaddr) {
 		qdf_print("%s: CE Write Index WORD alloc fail", __func__);
 		return -ENOBUFS;
@@ -1025,31 +1021,28 @@
 	/* Allocate TX COMP Ring */
 	tx_comp_ring_size = uc_tx_buf_cnt * sizeof(cdf_nbuf_t);
 	pdev->ipa_uc_tx_rsc.tx_comp_base.vaddr =
-		cdf_os_mem_alloc_consistent(
-			pdev->osdev,
+		qdf_mem_alloc_consistent(
+			pdev->osdev, pdev->osdev->dev,
 			tx_comp_ring_size,
-			&pdev->ipa_uc_tx_rsc.tx_comp_base.paddr,
-			qdf_get_dma_mem_context((&pdev->ipa_uc_tx_rsc.
-						 tx_comp_base),
-						memctx));
+			&pdev->ipa_uc_tx_rsc.tx_comp_base.paddr);
 	if (!pdev->ipa_uc_tx_rsc.tx_comp_base.vaddr) {
 		qdf_print("%s: TX COMP ring alloc fail", __func__);
 		return_code = -ENOBUFS;
 		goto free_tx_ce_idx;
 	}
 
-	cdf_mem_zero(pdev->ipa_uc_tx_rsc.tx_comp_base.vaddr, tx_comp_ring_size);
+	qdf_mem_zero(pdev->ipa_uc_tx_rsc.tx_comp_base.vaddr, tx_comp_ring_size);
 
 	/* Allocate TX BUF vAddress Storage */
 	pdev->ipa_uc_tx_rsc.tx_buf_pool_vaddr_strg =
-		(cdf_nbuf_t *) cdf_mem_malloc(uc_tx_buf_cnt *
+		(cdf_nbuf_t *) qdf_mem_malloc(uc_tx_buf_cnt *
 					      sizeof(cdf_nbuf_t));
 	if (!pdev->ipa_uc_tx_rsc.tx_buf_pool_vaddr_strg) {
 		qdf_print("%s: TX BUF POOL vaddr storage alloc fail", __func__);
 		return_code = -ENOBUFS;
 		goto free_tx_comp_base;
 	}
-	cdf_mem_zero(pdev->ipa_uc_tx_rsc.tx_buf_pool_vaddr_strg,
+	qdf_mem_zero(pdev->ipa_uc_tx_rsc.tx_buf_pool_vaddr_strg,
 		     uc_tx_buf_cnt * sizeof(cdf_nbuf_t));
 
 	pdev->ipa_uc_tx_rsc.alloc_tx_buf_cnt = htt_tx_ipa_uc_wdi_tx_buf_alloc(
@@ -1059,7 +1052,7 @@
 	return 0;
 
 free_tx_comp_base:
-	cdf_os_mem_free_consistent(pdev->osdev,
+	qdf_mem_free_consistent(pdev->osdev,
 				   tx_comp_ring_size,
 				   pdev->ipa_uc_tx_rsc.tx_comp_base.vaddr,
 				   pdev->ipa_uc_tx_rsc.tx_comp_base.paddr,
@@ -1068,7 +1061,7 @@
 							    tx_comp_base),
 							   memctx));
 free_tx_ce_idx:
-	cdf_os_mem_free_consistent(pdev->osdev,
+	qdf_mem_free_consistent(pdev->osdev,
 				   4,
 				   pdev->ipa_uc_tx_rsc.tx_ce_idx.vaddr,
 				   pdev->ipa_uc_tx_rsc.tx_ce_idx.paddr,
@@ -1084,7 +1077,7 @@
 	uint16_t idx;
 
 	if (pdev->ipa_uc_tx_rsc.tx_ce_idx.vaddr) {
-		cdf_os_mem_free_consistent(
+		qdf_mem_free_consistent(
 			pdev->osdev,
 			4,
 			pdev->ipa_uc_tx_rsc.tx_ce_idx.vaddr,
@@ -1095,7 +1088,7 @@
 	}
 
 	if (pdev->ipa_uc_tx_rsc.tx_comp_base.vaddr) {
-		cdf_os_mem_free_consistent(
+		qdf_mem_free_consistent(
 			pdev->osdev,
 			ol_cfg_ipa_uc_tx_max_buf_cnt(pdev->ctrl_pdev) * sizeof(cdf_nbuf_t),
 			pdev->ipa_uc_tx_rsc.tx_comp_base.vaddr,
@@ -1118,7 +1111,7 @@
 	}
 
 	/* Free storage */
-	cdf_mem_free(pdev->ipa_uc_tx_rsc.tx_buf_pool_vaddr_strg);
+	qdf_mem_free(pdev->ipa_uc_tx_rsc.tx_buf_pool_vaddr_strg);
 
 	return 0;
 }
diff --git a/core/dp/htt/htt_types.h b/core/dp/htt/htt_types.h
index cb337da..671200c 100644
--- a/core/dp/htt/htt_types.h
+++ b/core/dp/htt/htt_types.h
@@ -355,7 +355,7 @@
 		int size;       /* of each HTT tx desc */
 		uint16_t pool_elems;
 		uint16_t alloc_cnt;
-		struct cdf_mem_multi_page_t desc_pages;
+		struct qdf_mem_multi_page_t desc_pages;
 		uint32_t *freelist;
 		qdf_dma_mem_context(memctx);
 	} tx_descs;
@@ -363,7 +363,7 @@
 	struct {
 		int size; /* of each Fragment/MSDU-Ext descriptor */
 		int pool_elems;
-		struct cdf_mem_multi_page_t desc_pages;
+		struct qdf_mem_multi_page_t desc_pages;
 		qdf_dma_mem_context(memctx);
 	} frag_descs;
 #endif /* defined(HELIUMPLUS_PADDR64) */
diff --git a/core/dp/ol/inc/ol_htt_tx_api.h b/core/dp/ol/inc/ol_htt_tx_api.h
index e0f63e5..e2497f3 100644
--- a/core/dp/ol/inc/ol_htt_tx_api.h
+++ b/core/dp/ol/inc/ol_htt_tx_api.h
@@ -660,7 +660,7 @@
 		local_desc_ext.is_dsrc = (is_dsrc != 0);
 
 		cdf_nbuf_push_head(msdu, sizeof(local_desc_ext));
-		cdf_mem_copy(cdf_nbuf_data(msdu), &local_desc_ext,
+		qdf_mem_copy(cdf_nbuf_data(msdu), &local_desc_ext,
 				sizeof(local_desc_ext));
 	}
 
diff --git a/core/dp/ol/inc/ol_txrx_ctrl_api.h b/core/dp/ol/inc/ol_txrx_ctrl_api.h
index 60c9f91..b08c5dd 100644
--- a/core/dp/ol/inc/ol_txrx_ctrl_api.h
+++ b/core/dp/ol/inc/ol_txrx_ctrl_api.h
@@ -1045,7 +1045,7 @@
 {
 	/* no-op version if QCA_COMPUTE_TX_DELAY is not set */
 	qdf_assert(bin_values);
-	cdf_mem_zero(bin_values,
+	qdf_mem_zero(bin_values,
 		     QCA_TX_DELAY_HIST_REPORT_BINS * sizeof(*bin_values));
 }
 #endif
diff --git a/core/dp/txrx/ol_cfg.c b/core/dp/txrx/ol_cfg.c
index 29e4c1b..44e5f24 100644
--- a/core/dp/txrx/ol_cfg.c
+++ b/core/dp/txrx/ol_cfg.c
@@ -80,7 +80,7 @@
 {
 	struct txrx_pdev_cfg_t *cfg_ctx;
 
-	cfg_ctx = cdf_mem_malloc(sizeof(*cfg_ctx));
+	cfg_ctx = qdf_mem_malloc(sizeof(*cfg_ctx));
 	if (!cfg_ctx) {
 		printk(KERN_ERR "cfg ctx allocation failed\n");
 		return NULL;
diff --git a/core/dp/txrx/ol_rx.c b/core/dp/txrx/ol_rx.c
index 5b86ca9..263341c 100644
--- a/core/dp/txrx/ol_rx.c
+++ b/core/dp/txrx/ol_rx.c
@@ -130,10 +130,10 @@
 		return;
 
 	/* ignore frames for non-existent bssids */
-	cdf_mem_copy(a1, wh->i_addr1, IEEE80211_ADDR_LEN);
+	qdf_mem_copy(a1, wh->i_addr1, IEEE80211_ADDR_LEN);
 	TAILQ_FOREACH(vdev, &pdev->vdev_list, vdev_list_elem) {
-		if (cdf_mem_compare(a1, vdev->mac_addr.raw, IEEE80211_ADDR_LEN)
-		    == 0) {
+		if (qdf_mem_cmp(a1, vdev->mac_addr.raw, IEEE80211_ADDR_LEN)
+		    != 0) {
 			break;
 		}
 	}
@@ -618,12 +618,12 @@
 	peer->security[sec_index].sec_type = sec_type;
 	/* michael key only valid for TKIP
 	   but for simplicity, copy it anyway */
-	cdf_mem_copy(&peer->security[sec_index].michael_key[0],
+	qdf_mem_copy(&peer->security[sec_index].michael_key[0],
 		     michael_key,
 		     sizeof(peer->security[sec_index].michael_key));
 
 	if (sec_type != htt_sec_type_wapi) {
-		cdf_mem_set(peer->tids_last_pn_valid,
+		qdf_mem_set(peer->tids_last_pn_valid,
 			    OL_TXRX_NUM_EXT_TIDS, 0x00);
 	} else if (sec_index == txrx_sec_mcast || peer->tids_last_pn_valid[0]) {
 		for (i = 0; i < OL_TXRX_NUM_EXT_TIDS; i++) {
@@ -632,7 +632,7 @@
 			 * since WAPI PN has to be started with predefined value
 			 */
 			peer->tids_last_pn_valid[i] = 1;
-			cdf_mem_copy((uint8_t *) &peer->tids_last_pn[i],
+			qdf_mem_copy((uint8_t *) &peer->tids_last_pn[i],
 				     (uint8_t *) rx_pn,
 				     sizeof(union htt_rx_pn_t));
 			peer->tids_last_pn[i].pn128[1] =
@@ -662,9 +662,9 @@
 	uint8_t fc1;
 
 	wh = (struct ieee80211_frame *)cdf_nbuf_data(msdu);
-	cdf_mem_copy(a1, wh->i_addr1, IEEE80211_ADDR_LEN);
-	cdf_mem_copy(a2, wh->i_addr2, IEEE80211_ADDR_LEN);
-	cdf_mem_copy(a3, wh->i_addr3, IEEE80211_ADDR_LEN);
+	qdf_mem_copy(a1, wh->i_addr1, IEEE80211_ADDR_LEN);
+	qdf_mem_copy(a2, wh->i_addr2, IEEE80211_ADDR_LEN);
+	qdf_mem_copy(a3, wh->i_addr3, IEEE80211_ADDR_LEN);
 	fc1 = wh->i_fc[1] & IEEE80211_FC1_DIR_MASK;
 	/* Native Wifi header is 80211 non-QoS header */
 	hdrsize = sizeof(struct ieee80211_frame);
@@ -682,16 +682,16 @@
 	eth_hdr = (struct ether_header *)(cdf_nbuf_data(msdu));
 	switch (fc1) {
 	case IEEE80211_FC1_DIR_NODS:
-		cdf_mem_copy(eth_hdr->ether_dhost, a1, IEEE80211_ADDR_LEN);
-		cdf_mem_copy(eth_hdr->ether_shost, a2, IEEE80211_ADDR_LEN);
+		qdf_mem_copy(eth_hdr->ether_dhost, a1, IEEE80211_ADDR_LEN);
+		qdf_mem_copy(eth_hdr->ether_shost, a2, IEEE80211_ADDR_LEN);
 		break;
 	case IEEE80211_FC1_DIR_TODS:
-		cdf_mem_copy(eth_hdr->ether_dhost, a3, IEEE80211_ADDR_LEN);
-		cdf_mem_copy(eth_hdr->ether_shost, a2, IEEE80211_ADDR_LEN);
+		qdf_mem_copy(eth_hdr->ether_dhost, a3, IEEE80211_ADDR_LEN);
+		qdf_mem_copy(eth_hdr->ether_shost, a2, IEEE80211_ADDR_LEN);
 		break;
 	case IEEE80211_FC1_DIR_FROMDS:
-		cdf_mem_copy(eth_hdr->ether_dhost, a1, IEEE80211_ADDR_LEN);
-		cdf_mem_copy(eth_hdr->ether_shost, a3, IEEE80211_ADDR_LEN);
+		qdf_mem_copy(eth_hdr->ether_dhost, a1, IEEE80211_ADDR_LEN);
+		qdf_mem_copy(eth_hdr->ether_shost, a3, IEEE80211_ADDR_LEN);
 		break;
 	case IEEE80211_FC1_DIR_DSTODS:
 		break;
@@ -973,7 +973,7 @@
 	bool filter = false;
 #ifdef QCA_SUPPORT_SW_TXRX_ENCAP
 	struct ol_rx_decap_info_t info;
-	cdf_mem_set(&info, sizeof(info), 0);
+	qdf_mem_set(&info, sizeof(info), 0);
 #endif
 
 	msdu = msdu_list;
@@ -1070,7 +1070,7 @@
 						peer->last_pkt_center_freq;
 					rx_header.rssi_cmb =
 						peer->last_pkt_rssi_cmb;
-					cdf_mem_copy(rx_header.rssi,
+					qdf_mem_copy(rx_header.rssi,
 							peer->last_pkt_rssi,
 							sizeof(rx_header.rssi));
 					if (peer->last_pkt_legacy_rate_sel ==
@@ -1119,7 +1119,7 @@
 
 					cdf_nbuf_push_head(msdu,
 						sizeof(rx_header));
-					cdf_mem_copy(cdf_nbuf_data(msdu),
+					qdf_mem_copy(cdf_nbuf_data(msdu),
 						&rx_header, sizeof(rx_header));
 
 					/* Construct the ethernet header with
@@ -1130,7 +1130,7 @@
 						ETHERTYPE_OCB_RX);
 					cdf_nbuf_push_head(msdu,
 							   sizeof(eth_header));
-					cdf_mem_copy(cdf_nbuf_data(msdu),
+					qdf_mem_copy(cdf_nbuf_data(msdu),
 							&eth_header,
 							 sizeof(eth_header));
 				}
diff --git a/core/dp/txrx/ol_rx_defrag.c b/core/dp/txrx/ol_rx_defrag.c
index 8c05c60..58f5b90 100644
--- a/core/dp/txrx/ol_rx_defrag.c
+++ b/core/dp/txrx/ol_rx_defrag.c
@@ -65,16 +65,16 @@
 #include <ieee80211.h>
 #include <qdf_util.h>
 #include <athdefs.h>
-#include <cdf_memory.h>
+#include <qdf_mem.h>
 #include <ol_rx_defrag.h>
 #include <enet.h>
 #include <qdf_time.h>           /* qdf_system_time */
 
 #define DEFRAG_IEEE80211_ADDR_EQ(a1, a2) \
-	(cdf_mem_compare(a1, a2, IEEE80211_ADDR_LEN) == 0)
+	(qdf_mem_cmp(a1, a2, IEEE80211_ADDR_LEN) != 0)
 
 #define DEFRAG_IEEE80211_ADDR_COPY(dst, src) \
-	cdf_mem_copy(dst, src, IEEE80211_ADDR_LEN)
+	qdf_mem_copy(dst, src, IEEE80211_ADDR_LEN)
 
 #define DEFRAG_IEEE80211_QOS_HAS_SEQ(wh) \
 	(((wh)->i_fc[0] & \
@@ -562,7 +562,7 @@
 		return;
 
 	if (tkip_demic) {
-		cdf_mem_copy(key,
+		qdf_mem_copy(key,
 			     peer->security[index].michael_key,
 			     sizeof(peer->security[index].michael_key));
 		if (!ol_rx_frag_tkip_demic(pdev, key, msdu, hdr_space)) {
@@ -608,7 +608,7 @@
 	if (!(ivp[IEEE80211_WEP_IVLEN] & IEEE80211_WEP_EXTIV))
 		return OL_RX_DEFRAG_ERR;
 
-	cdf_mem_move(origHdr + f_tkip.ic_header, origHdr, hdrlen);
+	qdf_mem_move(origHdr + f_tkip.ic_header, origHdr, hdrlen);
 	cdf_nbuf_pull_head(msdu, f_tkip.ic_header);
 	cdf_nbuf_trim_tail(msdu, f_tkip.ic_trailer);
 	return OL_RX_DEFRAG_OK;
@@ -630,7 +630,7 @@
 			       &rx_desc_old_position,
 			       &ind_old_position, &rx_desc_len);
 	origHdr = (uint8_t *) (cdf_nbuf_data(msdu) + rx_desc_len);
-	cdf_mem_move(origHdr + f_wep.ic_header, origHdr, hdrlen);
+	qdf_mem_move(origHdr + f_wep.ic_header, origHdr, hdrlen);
 	cdf_nbuf_pull_head(msdu, f_wep.ic_header);
 	cdf_nbuf_trim_tail(msdu, f_wep.ic_trailer);
 	return OL_RX_DEFRAG_OK;
@@ -665,7 +665,7 @@
 
 	ol_rx_defrag_copydata(msdu, pktlen - f_tkip.ic_miclen + rx_desc_len,
 			      f_tkip.ic_miclen, (caddr_t) mic0);
-	if (cdf_mem_compare(mic, mic0, f_tkip.ic_miclen))
+	if (!qdf_mem_cmp(mic, mic0, f_tkip.ic_miclen))
 		return OL_RX_DEFRAG_ERR;
 
 	cdf_nbuf_trim_tail(msdu, f_tkip.ic_miclen);
@@ -694,7 +694,7 @@
 	if (!(ivp[IEEE80211_WEP_IVLEN] & IEEE80211_WEP_EXTIV))
 		return OL_RX_DEFRAG_ERR;
 
-	cdf_mem_move(origHdr + f_ccmp.ic_header, origHdr, hdrlen);
+	qdf_mem_move(origHdr + f_ccmp.ic_header, origHdr, hdrlen);
 	cdf_nbuf_pull_head(nbuf, f_ccmp.ic_header);
 
 	return OL_RX_DEFRAG_OK;
@@ -973,9 +973,9 @@
 			       &ind_old_position, &rx_desc_len);
 
 	wh_ptr = (struct ieee80211_frame *)(cdf_nbuf_data(msdu) + rx_desc_len);
-	cdf_mem_copy(&wh, wh_ptr, sizeof(wh));
+	qdf_mem_copy(&wh, wh_ptr, sizeof(wh));
 	hdrsize = sizeof(struct ieee80211_frame);
-	cdf_mem_copy(&llchdr, ((uint8_t *) (cdf_nbuf_data(msdu) +
+	qdf_mem_copy(&llchdr, ((uint8_t *) (cdf_nbuf_data(msdu) +
 					    rx_desc_len)) + hdrsize,
 		     sizeof(struct llc_snap_hdr_t));
 
@@ -989,25 +989,25 @@
 	eth_hdr = (struct ethernet_hdr_t *)(cdf_nbuf_data(msdu));
 	switch (wh.i_fc[1] & IEEE80211_FC1_DIR_MASK) {
 	case IEEE80211_FC1_DIR_NODS:
-		cdf_mem_copy(eth_hdr->dest_addr, wh.i_addr1,
+		qdf_mem_copy(eth_hdr->dest_addr, wh.i_addr1,
 			     IEEE80211_ADDR_LEN);
-		cdf_mem_copy(eth_hdr->src_addr, wh.i_addr2, IEEE80211_ADDR_LEN);
+		qdf_mem_copy(eth_hdr->src_addr, wh.i_addr2, IEEE80211_ADDR_LEN);
 		break;
 	case IEEE80211_FC1_DIR_TODS:
-		cdf_mem_copy(eth_hdr->dest_addr, wh.i_addr3,
+		qdf_mem_copy(eth_hdr->dest_addr, wh.i_addr3,
 			     IEEE80211_ADDR_LEN);
-		cdf_mem_copy(eth_hdr->src_addr, wh.i_addr2, IEEE80211_ADDR_LEN);
+		qdf_mem_copy(eth_hdr->src_addr, wh.i_addr2, IEEE80211_ADDR_LEN);
 		break;
 	case IEEE80211_FC1_DIR_FROMDS:
-		cdf_mem_copy(eth_hdr->dest_addr, wh.i_addr1,
+		qdf_mem_copy(eth_hdr->dest_addr, wh.i_addr1,
 			     IEEE80211_ADDR_LEN);
-		cdf_mem_copy(eth_hdr->src_addr, wh.i_addr3, IEEE80211_ADDR_LEN);
+		qdf_mem_copy(eth_hdr->src_addr, wh.i_addr3, IEEE80211_ADDR_LEN);
 		break;
 	case IEEE80211_FC1_DIR_DSTODS:
 		break;
 	}
 
-	cdf_mem_copy(eth_hdr->ethertype, llchdr.ethertype,
+	qdf_mem_copy(eth_hdr->ethertype, llchdr.ethertype,
 		     sizeof(llchdr.ethertype));
 }
 
@@ -1038,7 +1038,7 @@
 
 		/* remove QoS filed from header */
 		hdrlen -= qoslen;
-		cdf_mem_move((uint8_t *) wh + qoslen, wh, hdrlen);
+		qdf_mem_move((uint8_t *) wh + qoslen, wh, hdrlen);
 		wh = (struct ieee80211_frame *)cdf_nbuf_pull_head(nbuf,
 								  rx_desc_len +
 								  qoslen);
diff --git a/core/dp/txrx/ol_rx_defrag.h b/core/dp/txrx/ol_rx_defrag.h
index d046762..6ed90da 100644
--- a/core/dp/txrx/ol_rx_defrag.h
+++ b/core/dp/txrx/ol_rx_defrag.h
@@ -32,7 +32,7 @@
 #include <cds_ieee80211_common.h>
 #include <qdf_util.h>
 #include <qdf_types.h>
-#include <cdf_memory.h>
+#include <qdf_mem.h>
 #include <ol_txrx_internal.h>
 #include <ol_txrx_dbg.h>
 
diff --git a/core/dp/txrx/ol_rx_fwd.c b/core/dp/txrx/ol_rx_fwd.c
index 9e52c07..f85df9d 100644
--- a/core/dp/txrx/ol_rx_fwd.c
+++ b/core/dp/txrx/ol_rx_fwd.c
@@ -27,7 +27,7 @@
 
 /* standard header files */
 #include <cdf_nbuf.h>           /* cdf_nbuf_map */
-#include <cdf_memory.h>         /* cdf_mem_compare */
+#include <qdf_mem.h>         /* qdf_mem_cmp */
 
 /* external header files */
 #include <ol_cfg.h>                 /* wlan_op_mode_ap, etc. */
@@ -75,9 +75,9 @@
 	if (type != IEEE80211_FC0_TYPE_DATA ||
 	    subtype != 0x0 ||
 	    ((tods != 1) || (fromds != 0)) ||
-	    (cdf_mem_compare
+	    (qdf_mem_cmp
 		     (mac_header->i_addr3, vdev->mac_addr.raw,
-		     IEEE80211_ADDR_LEN) == 0)) {
+		     IEEE80211_ADDR_LEN) != 0)) {
 #ifdef DEBUG_HOST_RC
 		TXRX_PRINT(TXRX_PRINT_LEVEL_INFO1,
 			   "Exit: %s | Unnecessary to adjust mac header\n",
diff --git a/core/dp/txrx/ol_rx_pn.c b/core/dp/txrx/ol_rx_pn.c
index 1d5a4ac..4da66ef 100644
--- a/core/dp/txrx/ol_rx_pn.c
+++ b/core/dp/txrx/ol_rx_pn.c
@@ -261,7 +261,7 @@
 	pdev->rx_pn_trace.cnt = 0;
 	pdev->rx_pn_trace.mask = num_elems - 1;
 	pdev->rx_pn_trace.data =
-		cdf_mem_malloc(sizeof(*pdev->rx_pn_trace.data) * num_elems);
+		qdf_mem_malloc(sizeof(*pdev->rx_pn_trace.data) * num_elems);
 	if (!pdev->rx_pn_trace.data)
 		return A_NO_MEMORY;
 	return A_OK;
@@ -269,7 +269,7 @@
 
 void ol_rx_pn_trace_detach(ol_txrx_pdev_handle pdev)
 {
-	cdf_mem_free(pdev->rx_pn_trace.data);
+	qdf_mem_free(pdev->rx_pn_trace.data);
 }
 
 void
diff --git a/core/dp/txrx/ol_rx_reorder.c b/core/dp/txrx/ol_rx_reorder.c
index 7c3a817..42fd4fb 100644
--- a/core/dp/txrx/ol_rx_reorder.c
+++ b/core/dp/txrx/ol_rx_reorder.c
@@ -28,7 +28,7 @@
 /*=== header file includes ===*/
 /* generic utilities */
 #include <cdf_nbuf.h>           /* cdf_nbuf_t, etc. */
-#include <cdf_memory.h>         /* cdf_mem_malloc */
+#include <qdf_mem.h>         /* qdf_mem_malloc */
 
 #include <ieee80211.h>          /* IEEE80211_SEQ_MAX */
 
@@ -492,9 +492,9 @@
 	round_pwr2_win_sz = OL_RX_REORDER_ROUND_PWR2(win_sz);
 	array_size =
 		round_pwr2_win_sz * sizeof(struct ol_rx_reorder_array_elem_t);
-	rx_reorder->array = cdf_mem_malloc(array_size);
+	rx_reorder->array = qdf_mem_malloc(array_size);
 	TXRX_ASSERT1(rx_reorder->array);
-	cdf_mem_set(rx_reorder->array, array_size, 0x0);
+	qdf_mem_set(rx_reorder->array, array_size, 0x0);
 
 	rx_reorder->win_sz_mask = round_pwr2_win_sz - 1;
 	rx_reorder->num_mpdus = 0;
@@ -529,7 +529,7 @@
 	if (rx_reorder->array != &rx_reorder->base) {
 		TXRX_PRINT(TXRX_PRINT_LEVEL_INFO1,
 			   "%s, delete reorder array, tid:%d\n", __func__, tid);
-		cdf_mem_free(rx_reorder->array);
+		qdf_mem_free(rx_reorder->array);
 	}
 
 	/* set up the TID with default parameters (ARQ window size = 1) */
@@ -733,7 +733,7 @@
 	pdev->rx_reorder_trace.idx = 0;
 	pdev->rx_reorder_trace.cnt = 0;
 	pdev->rx_reorder_trace.mask = num_elems - 1;
-	pdev->rx_reorder_trace.data = cdf_mem_malloc(
+	pdev->rx_reorder_trace.data = qdf_mem_malloc(
 		sizeof(*pdev->rx_reorder_trace.data) * num_elems);
 	if (!pdev->rx_reorder_trace.data)
 		return A_NO_MEMORY;
@@ -746,7 +746,7 @@
 
 void ol_rx_reorder_trace_detach(ol_txrx_pdev_handle pdev)
 {
-	cdf_mem_free(pdev->rx_reorder_trace.data);
+	qdf_mem_free(pdev->rx_reorder_trace.data);
 }
 
 void
diff --git a/core/dp/txrx/ol_tx.c b/core/dp/txrx/ol_tx.c
index d50bc45..6ac608a 100644
--- a/core/dp/txrx/ol_tx.c
+++ b/core/dp/txrx/ol_tx.c
@@ -1149,7 +1149,7 @@
 
 	if (tx_ctrl_hdr->version == OCB_HEADER_VERSION) {
 		if (tx_ctrl)
-			cdf_mem_copy(tx_ctrl, tx_ctrl_hdr,
+			qdf_mem_copy(tx_ctrl, tx_ctrl_hdr,
 				sizeof(*tx_ctrl_hdr));
 	} else {
 		/* The TX control header is invalid. */
@@ -1367,11 +1367,11 @@
 	int i;
 	struct cdf_tso_seg_elem_t *c_element;
 
-	c_element = cdf_mem_malloc(sizeof(struct cdf_tso_seg_elem_t));
+	c_element = qdf_mem_malloc(sizeof(struct cdf_tso_seg_elem_t));
 	pdev->tso_seg_pool.freelist = c_element;
 	for (i = 0; i < (num_seg - 1); i++) {
 		c_element->next =
-			cdf_mem_malloc(sizeof(struct cdf_tso_seg_elem_t));
+			qdf_mem_malloc(sizeof(struct cdf_tso_seg_elem_t));
 		c_element = c_element->next;
 		c_element->next = NULL;
 	}
@@ -1389,7 +1389,7 @@
 	c_element = pdev->tso_seg_pool.freelist;
 	for (i = 0; i < pdev->tso_seg_pool.pool_size; i++) {
 		temp = c_element->next;
-		cdf_mem_free(c_element);
+		qdf_mem_free(c_element);
 		c_element = temp;
 		if (!c_element)
 			break;
diff --git a/core/dp/txrx/ol_tx_send.c b/core/dp/txrx/ol_tx_send.c
index 918917a..ae2d77a 100644
--- a/core/dp/txrx/ol_tx_send.c
+++ b/core/dp/txrx/ol_tx_send.c
@@ -958,7 +958,7 @@
 		pdev->tx_delay.cats[cat].avg_start_time_ticks = now_ticks;
 		index = 1 - index;
 		pdev->tx_delay.cats[cat].in_progress_idx = index;
-		cdf_mem_zero(&pdev->tx_delay.cats[cat].copies[index],
+		qdf_mem_zero(&pdev->tx_delay.cats[cat].copies[index],
 			     sizeof(pdev->tx_delay.cats[cat].copies[index]));
 	}
 
diff --git a/core/dp/txrx/ol_txrx.c b/core/dp/txrx/ol_txrx.c
index 1472cbc..208548f 100644
--- a/core/dp/txrx/ol_txrx.c
+++ b/core/dp/txrx/ol_txrx.c
@@ -28,7 +28,7 @@
 /*=== includes ===*/
 /* header files for OS primitives */
 #include <osdep.h>              /* uint32_t, etc. */
-#include <cdf_memory.h>         /* cdf_mem_malloc,free */
+#include <qdf_mem.h>         /* qdf_mem_malloc,free */
 #include <qdf_types.h>          /* qdf_device_t, qdf_print */
 #include <qdf_lock.h>           /* cdf_spinlock */
 #include <qdf_atomic.h>         /* qdf_atomic_read */
@@ -404,10 +404,10 @@
 	struct ol_txrx_pdev_t *pdev;
 	int i;
 
-	pdev = cdf_mem_malloc(sizeof(*pdev));
+	pdev = qdf_mem_malloc(sizeof(*pdev));
 	if (!pdev)
 		goto fail0;
-	cdf_mem_zero(pdev, sizeof(*pdev));
+	qdf_mem_zero(pdev, sizeof(*pdev));
 
 	pdev->cfg.default_tx_comp_req = !ol_cfg_tx_free_at_download(ctrl_pdev);
 
@@ -437,7 +437,7 @@
 	ol_txrx_peer_find_detach(pdev);
 
 fail1:
-	cdf_mem_free(pdev);
+	qdf_mem_free(pdev);
 
 fail0:
 	return NULL;
@@ -551,7 +551,7 @@
 
 	/* Calculate single element reserved size power of 2 */
 	pdev->tx_desc.desc_reserved_size = qdf_get_pwr2(desc_element_size);
-	cdf_mem_multi_pages_alloc(pdev->osdev, &pdev->tx_desc.desc_pages,
+	qdf_mem_multi_pages_alloc(pdev->osdev, &pdev->tx_desc.desc_pages,
 		pdev->tx_desc.desc_reserved_size, desc_pool_size, 0, true);
 	if ((0 == pdev->tx_desc.desc_pages.num_pages) ||
 		(NULL == pdev->tx_desc.desc_pages.cacheable_pages)) {
@@ -826,7 +826,7 @@
 	/*
 	 * Initialize rx PN check characteristics for different security types.
 	 */
-	cdf_mem_set(&pdev->rx_pn[0], sizeof(pdev->rx_pn), 0);
+	qdf_mem_set(&pdev->rx_pn[0], sizeof(pdev->rx_pn), 0);
 
 	/* TKIP: 48-bit TSC, CCMP: 48-bit PN */
 	pdev->rx_pn[htt_sec_type_tkip].len =
@@ -870,7 +870,7 @@
 		ol_tx_cfg_max_tx_queue_depth_ll(pdev->ctrl_pdev);
 
 #ifdef QCA_COMPUTE_TX_DELAY
-	cdf_mem_zero(&pdev->tx_delay, sizeof(pdev->tx_delay));
+	qdf_mem_zero(&pdev->tx_delay, sizeof(pdev->tx_delay));
 	qdf_spinlock_create(&pdev->tx_delay.mutex);
 
 	/* initialize compute interval with 5 seconds (ESE default) */
@@ -940,7 +940,7 @@
 		htt_tx_desc_free(pdev->htt_pdev,
 			(ol_tx_desc_find(pdev, i))->htt_tx_desc);
 
-	cdf_mem_multi_pages_free(pdev->osdev,
+	qdf_mem_multi_pages_free(pdev->osdev,
 		&pdev->tx_desc.desc_pages, 0, true);
 
 page_alloc_fail:
@@ -1032,7 +1032,7 @@
 		htt_tx_desc_free(pdev->htt_pdev, htt_tx_desc);
 	}
 
-	cdf_mem_multi_pages_free(pdev->osdev,
+	qdf_mem_multi_pages_free(pdev->osdev,
 		&pdev->tx_desc.desc_pages, 0, true);
 	pdev->tx_desc.freelist = NULL;
 
@@ -1079,7 +1079,7 @@
 	TXRX_ASSERT2(pdev);
 	TXRX_ASSERT2(vdev_mac_addr);
 
-	vdev = cdf_mem_malloc(sizeof(*vdev));
+	vdev = qdf_mem_malloc(sizeof(*vdev));
 	if (!vdev)
 		return NULL;    /* failure */
 
@@ -1093,7 +1093,7 @@
 	vdev->drop_unenc = 1;
 	vdev->num_filters = 0;
 
-	cdf_mem_copy(&vdev->mac_addr.raw[0], vdev_mac_addr,
+	qdf_mem_copy(&vdev->mac_addr.raw[0], vdev_mac_addr,
 		     OL_TXRX_MAC_ADDR_LEN);
 
 	TAILQ_INIT(&vdev->peer_list);
@@ -1166,7 +1166,7 @@
 ol_txrx_set_privacy_filters(ol_txrx_vdev_handle vdev,
 			    void *filters, uint32_t num)
 {
-	cdf_mem_copy(vdev->privacy_filters, filters,
+	qdf_mem_copy(vdev->privacy_filters, filters,
 		     num * sizeof(struct privacy_exemption));
 	vdev->num_filters = num;
 }
@@ -1247,7 +1247,7 @@
 	 * they will be freed once the target sends a tx completion
 	 * message for them.
 	 */
-	cdf_mem_free(vdev);
+	qdf_mem_free(vdev);
 	if (callback)
 		callback(context);
 }
@@ -1294,7 +1294,7 @@
 			if (ret != QDF_STATUS_SUCCESS)
 				cdf_nbuf_free(cache_buf->buf);
 		}
-		cdf_mem_free(cache_buf);
+		qdf_mem_free(cache_buf);
 		qdf_spin_lock_bh(&peer->bufq_lock);
 		cache_buf = list_entry((&peer->cached_bufq)->next,
 				typeof(*cache_buf), list);
@@ -1355,14 +1355,14 @@
 		}
 	}
 
-	peer = cdf_mem_malloc(sizeof(*peer));
+	peer = qdf_mem_malloc(sizeof(*peer));
 	if (!peer)
 		return NULL;    /* failure */
-	cdf_mem_zero(peer, sizeof(*peer));
+	qdf_mem_zero(peer, sizeof(*peer));
 
 	/* store provided params */
 	peer->vdev = vdev;
-	cdf_mem_copy(&peer->mac_addr.raw[0], peer_mac_addr,
+	qdf_mem_copy(&peer->mac_addr.raw[0], peer_mac_addr,
 		     OL_TXRX_MAC_ADDR_LEN);
 
 	INIT_LIST_HEAD(&peer->cached_bufq);
@@ -1411,10 +1411,9 @@
 	/*
 	 * For every peer MAp message search and set if bss_peer
 	 */
-	differs =
-		cdf_mem_compare(peer->mac_addr.raw, vdev->mac_addr.raw,
+	differs = qdf_mem_cmp(peer->mac_addr.raw, vdev->mac_addr.raw,
 				OL_TXRX_MAC_ADDR_LEN);
-	if (!differs)
+	if (differs)
 		peer->bss_peer = 1;
 
 	/*
@@ -1763,7 +1762,7 @@
 					   vdev->mac_addr.raw[4],
 					   vdev->mac_addr.raw[5]);
 				/* all peers are gone, go ahead and delete it */
-				cdf_mem_free(vdev);
+				qdf_mem_free(vdev);
 				if (vdev_delete_cb)
 					vdev_delete_cb(vdev_delete_context);
 			} else {
@@ -1787,13 +1786,13 @@
 				TXRX_PRINT(TXRX_PRINT_LEVEL_INFO1,
 					   "%s, delete reorder arr, tid:%d\n",
 					   __func__, i);
-				cdf_mem_free(peer->tids_rx_reorder[i].array);
+				qdf_mem_free(peer->tids_rx_reorder[i].array);
 				ol_rx_reorder_init(&peer->tids_rx_reorder[i],
 						   (uint8_t) i);
 			}
 		}
 
-		cdf_mem_free(peer);
+		qdf_mem_free(peer);
 	} else {
 		qdf_spin_unlock_bh(&pdev->peer_ref_mutex);
 	}
@@ -2034,7 +2033,7 @@
 	 * Allocate a non-transient stats request object.
 	 * (The one provided as an argument is likely allocated on the stack.)
 	 */
-	non_volatile_req = cdf_mem_malloc(sizeof(*non_volatile_req));
+	non_volatile_req = qdf_mem_malloc(sizeof(*non_volatile_req));
 	if (!non_volatile_req)
 		return A_NO_MEMORY;
 
@@ -2051,7 +2050,7 @@
 				  req->stats_type_reset_mask,
 				  HTT_H2T_STATS_REQ_CFG_STAT_TYPE_INVALID, 0,
 				  cookie)) {
-		cdf_mem_free(non_volatile_req);
+		qdf_mem_free(non_volatile_req);
 		return A_ERROR;
 	}
 
@@ -2060,7 +2059,7 @@
 			;
 
 	if (response_expected == false)
-		cdf_mem_free(non_volatile_req);
+		qdf_mem_free(non_volatile_req);
 
 	return A_OK;
 }
@@ -2105,7 +2104,7 @@
 					if (req->base.copy.byte_limit < lmt)
 						lmt = req->base.copy.byte_limit;
 					buf = req->base.copy.buf + req->offset;
-					cdf_mem_copy(buf, stats_data, lmt);
+					qdf_mem_copy(buf, stats_data, lmt);
 				}
 				break;
 			case HTT_DBG_STATS_RX_REORDER:
@@ -2117,7 +2116,7 @@
 					if (req->base.copy.byte_limit < lmt)
 						lmt = req->base.copy.byte_limit;
 					buf = req->base.copy.buf + req->offset;
-					cdf_mem_copy(buf, stats_data, lmt);
+					qdf_mem_copy(buf, stats_data, lmt);
 				}
 				break;
 			case HTT_DBG_STATS_RX_RATE_INFO:
@@ -2129,7 +2128,7 @@
 					if (req->base.copy.byte_limit < lmt)
 						lmt = req->base.copy.byte_limit;
 					buf = req->base.copy.buf + req->offset;
-					cdf_mem_copy(buf, stats_data, lmt);
+					qdf_mem_copy(buf, stats_data, lmt);
 				}
 				break;
 
@@ -2142,7 +2141,7 @@
 					if (req->base.copy.byte_limit < lmt)
 						lmt = req->base.copy.byte_limit;
 					buf = req->base.copy.buf + req->offset;
-					cdf_mem_copy(buf, stats_data, lmt);
+					qdf_mem_copy(buf, stats_data, lmt);
 				}
 				break;
 
@@ -2161,7 +2160,7 @@
 						limit = req->base.copy.byte_limit;
 					}
 					buf = req->base.copy.buf + req->offset;
-					cdf_mem_copy(buf, stats_data, limit);
+					qdf_mem_copy(buf, stats_data, limit);
 				}
 				break;
 
@@ -2174,7 +2173,7 @@
 					if (req->base.copy.byte_limit < limit)
 						limit = req->base.copy.byte_limit;
 					buf = req->base.copy.buf + req->offset;
-					cdf_mem_copy(buf, stats_data, limit);
+					qdf_mem_copy(buf, stats_data, limit);
 				}
 				break;
 
@@ -2187,7 +2186,7 @@
 					if (req->base.copy.byte_limit < limit)
 						limit = req->base.copy.byte_limit;
 					buf = req->base.copy.buf + req->offset;
-					cdf_mem_copy(buf, stats_data, limit);
+					qdf_mem_copy(buf, stats_data, limit);
 				}
 				break;
 
@@ -2200,7 +2199,7 @@
 					if (req->base.copy.byte_limit < limit)
 						limit = req->base.copy.byte_limit;
 					buf = req->base.copy.buf + req->offset;
-					cdf_mem_copy(buf, stats_data, limit);
+					qdf_mem_copy(buf, stats_data, limit);
 				}
 				break;
 
@@ -2215,7 +2214,7 @@
 					if (req->base.copy.byte_limit < limit)
 						limit = req->base.copy.byte_limit;
 					buf = req->base.copy.buf + req->offset;
-					cdf_mem_copy(buf, stats_data, limit);
+					qdf_mem_copy(buf, stats_data, limit);
 				}
 				break;
 
@@ -2231,7 +2230,7 @@
 						limit =
 						req->base.copy.byte_limit;
 					buf = req->base.copy.buf + req->offset;
-					cdf_mem_copy(buf, stats_data, limit);
+					qdf_mem_copy(buf, stats_data, limit);
 				}
 				break;
 
@@ -2251,7 +2250,7 @@
 	if (!more) {
 		if (req->base.wait.blocking)
 			qdf_semaphore_release(req->base.wait.sem_ptr);
-		cdf_mem_free(req);
+		qdf_mem_free(req);
 	}
 }
 
@@ -2511,7 +2510,7 @@
 
 void ol_txrx_stats_clear(ol_txrx_pdev_handle pdev)
 {
-	cdf_mem_zero(&pdev->stats, sizeof(pdev->stats));
+	qdf_mem_zero(&pdev->stats, sizeof(pdev->stats));
 }
 
 #if defined(ENABLE_TXRX_PROT_ANALYZE)
@@ -2539,7 +2538,7 @@
 {
 	qdf_assert(pdev && peer && stats);
 	qdf_spin_lock_bh(&pdev->peer_stat_mutex);
-	cdf_mem_copy(stats, &peer->stats, sizeof(*stats));
+	qdf_mem_copy(stats, &peer->stats, sizeof(*stats));
 	qdf_spin_unlock_bh(&pdev->peer_stat_mutex);
 	return A_OK;
 }
@@ -2834,7 +2833,7 @@
 	if (qdf_unlikely(!pdev)) {
 		QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_ERROR,
 			      "%s: Invalid context", __func__);
-		cdf_mem_free(rxpkt);
+		qdf_mem_free(rxpkt);
 		return;
 	}
 
@@ -2843,7 +2842,7 @@
 	} else {
 		QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_ERROR,
 			      "%s: ipa_uc_op_cb NULL", __func__);
-		cdf_mem_free(rxpkt);
+		qdf_mem_free(rxpkt);
 	}
 }
 
@@ -2885,7 +2884,7 @@
 	} else {
 		QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_ERROR,
 		    "%s: IPA callback function is not registered", __func__);
-		cdf_mem_free(op_msg);
+		qdf_mem_free(op_msg);
 		return;
 	}
 }
@@ -3071,7 +3070,7 @@
 		buf = rx_buf_list;
 		while (buf) {
 			next_buf = cdf_nbuf_queue_next(buf);
-			cache_buf = cdf_mem_malloc(sizeof(*cache_buf));
+			cache_buf = qdf_mem_malloc(sizeof(*cache_buf));
 			if (!cache_buf) {
 				TXRX_PRINT(TXRX_PRINT_LEVEL_ERR,
 					"Failed to allocate buf to cache the rx frames");
diff --git a/core/dp/txrx/ol_txrx_encap.c b/core/dp/txrx/ol_txrx_encap.c
index a7471da..8deddeb 100644
--- a/core/dp/txrx/ol_txrx_encap.c
+++ b/core/dp/txrx/ol_txrx_encap.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012-2015 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2016 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -54,7 +54,7 @@
 		if (cdf_nbuf_len(msdu) < hdsize) {			\
 			return A_ERROR;					\
 		}							\
-		cdf_mem_copy(localbuf, wh, hdsize);			\
+		qdf_mem_copy(localbuf, wh, hdsize);			\
 		wh = (struct ieee80211_frame *)localbuf;		\
 	} while (0)
 
@@ -73,7 +73,7 @@
 	if (cdf_nbuf_len(msdu) < *hdsize)
 		return A_ERROR;
 
-	cdf_mem_copy(localbuf, wh, *hdsize);
+	qdf_mem_copy(localbuf, wh, *hdsize);
 	return A_OK;
 }
 
@@ -123,7 +123,7 @@
 		/*add ht control field if needed */
 
 		/* copy new hd to bd */
-		cdf_mem_copy((void *)
+		qdf_mem_copy((void *)
 			     htt_tx_desc_mpdu_header(tx_desc->htt_tx_desc,
 						     new_hdsize), localbuf,
 			     new_hdsize);
@@ -147,7 +147,7 @@
 			wh = (struct ieee80211_frame *)
 			     htt_tx_desc_mpdu_header(tx_desc->htt_tx_desc,
 						     hdsize);
-			cdf_mem_copy((void *)wh, localbuf, hdsize);
+			qdf_mem_copy((void *)wh, localbuf, hdsize);
 			cdf_nbuf_pull_head(msdu, hdsize);
 			tx_msdu_info->htt.info.l3_hdr_offset = hdsize;
 			tx_desc->orig_l2_hdr_bytes = hdsize;
@@ -193,34 +193,34 @@
 	switch (vdev->opmode) {
 	case wlan_op_mode_ap:
 		/* DA , BSSID , SA */
-		cdf_mem_copy(wh->i_addr1, eth_hdr->dest_addr,
+		qdf_mem_copy(wh->i_addr1, eth_hdr->dest_addr,
 			     IEEE80211_ADDR_LEN);
-		cdf_mem_copy(wh->i_addr2, &vdev->mac_addr.raw,
+		qdf_mem_copy(wh->i_addr2, &vdev->mac_addr.raw,
 			     IEEE80211_ADDR_LEN);
-		cdf_mem_copy(wh->i_addr3, eth_hdr->src_addr,
+		qdf_mem_copy(wh->i_addr3, eth_hdr->src_addr,
 			     IEEE80211_ADDR_LEN);
 		wh->i_fc[1] = IEEE80211_FC1_DIR_FROMDS;
 		new_hdsize = sizeof(struct ieee80211_frame);
 		break;
 	case wlan_op_mode_ibss:
 		/* DA, SA, BSSID */
-		cdf_mem_copy(wh->i_addr1, eth_hdr->dest_addr,
+		qdf_mem_copy(wh->i_addr1, eth_hdr->dest_addr,
 			     IEEE80211_ADDR_LEN);
-		cdf_mem_copy(wh->i_addr2, eth_hdr->src_addr,
+		qdf_mem_copy(wh->i_addr2, eth_hdr->src_addr,
 			     IEEE80211_ADDR_LEN);
 		/* need to check the bssid behaviour for IBSS vdev */
-		cdf_mem_copy(wh->i_addr3, &vdev->mac_addr.raw,
+		qdf_mem_copy(wh->i_addr3, &vdev->mac_addr.raw,
 			     IEEE80211_ADDR_LEN);
 		wh->i_fc[1] = IEEE80211_FC1_DIR_NODS;
 		new_hdsize = sizeof(struct ieee80211_frame);
 		break;
 	case wlan_op_mode_sta:
 		/* BSSID, SA , DA */
-		cdf_mem_copy(wh->i_addr1, &peer->mac_addr.raw,
+		qdf_mem_copy(wh->i_addr1, &peer->mac_addr.raw,
 			     IEEE80211_ADDR_LEN);
-		cdf_mem_copy(wh->i_addr2, eth_hdr->src_addr,
+		qdf_mem_copy(wh->i_addr2, eth_hdr->src_addr,
 			     IEEE80211_ADDR_LEN);
-		cdf_mem_copy(wh->i_addr3, eth_hdr->dest_addr,
+		qdf_mem_copy(wh->i_addr3, eth_hdr->dest_addr,
 			     IEEE80211_ADDR_LEN);
 		wh->i_fc[1] = IEEE80211_FC1_DIR_TODS;
 		new_hdsize = sizeof(struct ieee80211_frame);
@@ -256,7 +256,7 @@
 		ether_type =
 			(eth_hdr->ethertype[0] << 8) | (eth_hdr->ethertype[1]);
 		if (ether_type >= IEEE8023_MAX_LEN) {
-			cdf_mem_copy(llc_hdr,
+			qdf_mem_copy(llc_hdr,
 				     ethernet_II_llc_snap_header_prefix,
 				     sizeof
 				     (ethernet_II_llc_snap_header_prefix));
@@ -273,7 +273,7 @@
 			  do we need to move to BD pdu? */
 		}
 	}
-	cdf_mem_copy((void *)
+	qdf_mem_copy((void *)
 		     htt_tx_desc_mpdu_header(tx_desc->htt_tx_desc,
 					     new_l2_hdsize), localbuf,
 		     new_hdsize);
@@ -325,33 +325,33 @@
 	wh = (struct ieee80211_frame_addr4 *)cdf_nbuf_push_head(msdu, hdsize);
 	TXRX_ASSERT2(wh != NULL);
 	TXRX_ASSERT2(hdsize <= info->hdr_len);
-	cdf_mem_copy((uint8_t *) wh, info->hdr, hdsize);
+	qdf_mem_copy((uint8_t *) wh, info->hdr, hdsize);
 
 	/* amsdu subfrm handling if ethr_hdr is not NULL  */
 	if (ethr_hdr != NULL) {
 		switch (wh->i_fc[1] & IEEE80211_FC1_DIR_MASK) {
 		case IEEE80211_FC1_DIR_NODS:
-			cdf_mem_copy(wh->i_addr1, ethr_hdr->dest_addr,
+			qdf_mem_copy(wh->i_addr1, ethr_hdr->dest_addr,
 				     ETHERNET_ADDR_LEN);
-			cdf_mem_copy(wh->i_addr2, ethr_hdr->src_addr,
+			qdf_mem_copy(wh->i_addr2, ethr_hdr->src_addr,
 				     ETHERNET_ADDR_LEN);
 			break;
 		case IEEE80211_FC1_DIR_TODS:
-			cdf_mem_copy(wh->i_addr2, ethr_hdr->src_addr,
+			qdf_mem_copy(wh->i_addr2, ethr_hdr->src_addr,
 				     ETHERNET_ADDR_LEN);
-			cdf_mem_copy(wh->i_addr3, ethr_hdr->dest_addr,
+			qdf_mem_copy(wh->i_addr3, ethr_hdr->dest_addr,
 				     ETHERNET_ADDR_LEN);
 			break;
 		case IEEE80211_FC1_DIR_FROMDS:
-			cdf_mem_copy(wh->i_addr1, ethr_hdr->dest_addr,
+			qdf_mem_copy(wh->i_addr1, ethr_hdr->dest_addr,
 				     ETHERNET_ADDR_LEN);
-			cdf_mem_copy(wh->i_addr3, ethr_hdr->src_addr,
+			qdf_mem_copy(wh->i_addr3, ethr_hdr->src_addr,
 				     ETHERNET_ADDR_LEN);
 			break;
 		case IEEE80211_FC1_DIR_DSTODS:
-			cdf_mem_copy(wh->i_addr3, ethr_hdr->dest_addr,
+			qdf_mem_copy(wh->i_addr3, ethr_hdr->dest_addr,
 				     ETHERNET_ADDR_LEN);
-			cdf_mem_copy(wh->i_addr4, ethr_hdr->src_addr,
+			qdf_mem_copy(wh->i_addr4, ethr_hdr->src_addr,
 				     ETHERNET_ADDR_LEN);
 			break;
 		}
@@ -414,27 +414,27 @@
 		ethr_hdr = (struct ethernet_hdr_t *)local_buf;
 		switch (wh->i_fc[1] & IEEE80211_FC1_DIR_MASK) {
 		case IEEE80211_FC1_DIR_NODS:
-			cdf_mem_copy(ethr_hdr->dest_addr, wh->i_addr1,
+			qdf_mem_copy(ethr_hdr->dest_addr, wh->i_addr1,
 				     ETHERNET_ADDR_LEN);
-			cdf_mem_copy(ethr_hdr->src_addr, wh->i_addr2,
+			qdf_mem_copy(ethr_hdr->src_addr, wh->i_addr2,
 				     ETHERNET_ADDR_LEN);
 			break;
 		case IEEE80211_FC1_DIR_TODS:
-			cdf_mem_copy(ethr_hdr->dest_addr, wh->i_addr3,
+			qdf_mem_copy(ethr_hdr->dest_addr, wh->i_addr3,
 				     ETHERNET_ADDR_LEN);
-			cdf_mem_copy(ethr_hdr->src_addr, wh->i_addr2,
+			qdf_mem_copy(ethr_hdr->src_addr, wh->i_addr2,
 				     ETHERNET_ADDR_LEN);
 			break;
 		case IEEE80211_FC1_DIR_FROMDS:
-			cdf_mem_copy(ethr_hdr->dest_addr, wh->i_addr1,
+			qdf_mem_copy(ethr_hdr->dest_addr, wh->i_addr1,
 				     ETHERNET_ADDR_LEN);
-			cdf_mem_copy(ethr_hdr->src_addr, wh->i_addr3,
+			qdf_mem_copy(ethr_hdr->src_addr, wh->i_addr3,
 				     ETHERNET_ADDR_LEN);
 			break;
 		case IEEE80211_FC1_DIR_DSTODS:
-			cdf_mem_copy(ethr_hdr->dest_addr, wh->i_addr3,
+			qdf_mem_copy(ethr_hdr->dest_addr, wh->i_addr3,
 				     ETHERNET_ADDR_LEN);
-			cdf_mem_copy(ethr_hdr->src_addr, wh->i_addr4,
+			qdf_mem_copy(ethr_hdr->src_addr, wh->i_addr4,
 				     ETHERNET_ADDR_LEN);
 			break;
 		}
@@ -451,7 +451,7 @@
 		ethr_hdr->ethertype[0] = (ether_type >> 8) & 0xff;
 		ethr_hdr->ethertype[1] = (ether_type) & 0xff;
 	}
-	cdf_mem_copy(buf, ethr_hdr, ETHERNET_HDR_LEN);
+	qdf_mem_copy(buf, ethr_hdr, ETHERNET_HDR_LEN);
 }
 
 static inline A_STATUS
@@ -466,7 +466,7 @@
 	subfrm_hdr = (uint8_t *) cdf_nbuf_data(msdu);
 	if (pdev->frame_format == wlan_frm_fmt_native_wifi) {
 		/* decap to native wifi */
-		cdf_mem_copy(ether_hdr, subfrm_hdr, ETHERNET_HDR_LEN);
+		qdf_mem_copy(ether_hdr, subfrm_hdr, ETHERNET_HDR_LEN);
 		cdf_nbuf_pull_head(msdu, ETHERNET_HDR_LEN);
 		ol_rx_decap_to_native_wifi(vdev, msdu, info, ether_hdr);
 	} else if (pdev->frame_format == wlan_frm_fmt_802_3) {
@@ -474,7 +474,7 @@
 			/* remove llc snap hdr if it's necessary according to
 			 * 802.11 table P-3
 			 */
-			cdf_mem_copy(ether_hdr, subfrm_hdr, ETHERNET_HDR_LEN);
+			qdf_mem_copy(ether_hdr, subfrm_hdr, ETHERNET_HDR_LEN);
 			cdf_nbuf_pull_head(msdu, ETHERNET_HDR_LEN);
 			ol_rx_decap_to_8023(vdev, msdu, info, ether_hdr);
 		} else {
@@ -507,7 +507,7 @@
 		if (IEEE80211_QOS_HAS_SEQ(wh)) {
 			info->hdr_len = ol_txrx_ieee80211_hdrsize(wh);
 			TXRX_ASSERT2(info->hdr_len <= sizeof(info->hdr));
-			cdf_mem_copy(info->hdr, /* use info->hdr as temp buf. */
+			qdf_mem_copy(info->hdr, /* use info->hdr as temp buf. */
 				     wh, info->hdr_len);
 			cdf_nbuf_pull_head(msdu, info->hdr_len);
 			ol_rx_decap_to_native_wifi(vdev, msdu, info, NULL);
@@ -517,7 +517,7 @@
 		if (pdev->sw_rx_llc_proc_enable) {
 			info->hdr_len = ol_txrx_ieee80211_hdrsize(wh);
 			TXRX_ASSERT2(info->hdr_len <= sizeof(info->hdr));
-			cdf_mem_copy(info->hdr, /* use info->hdr as temp buf. */
+			qdf_mem_copy(info->hdr, /* use info->hdr as temp buf. */
 				     wh, info->hdr_len);
 			cdf_nbuf_pull_head(msdu, info->hdr_len);
 			/* remove llc snap hdr if it's necessary according to
@@ -564,7 +564,7 @@
 					ol_txrx_ieee80211_hdrsize(mpdu_hdr);
 				TXRX_ASSERT2(info->hdr_len <=
 					     sizeof(info->hdr));
-				cdf_mem_copy(info->hdr, mpdu_hdr,
+				qdf_mem_copy(info->hdr, mpdu_hdr,
 					     info->hdr_len);
 				cdf_nbuf_pull_head(msdu, info->hdr_len);
 			}
diff --git a/core/dp/txrx/ol_txrx_event.c b/core/dp/txrx/ol_txrx_event.c
index 0743a00..ab85532 100644
--- a/core/dp/txrx/ol_txrx_event.c
+++ b/core/dp/txrx/ol_txrx_event.c
@@ -57,7 +57,7 @@
 		}
 		wdi_sub = next;
 	}
-	/* cdf_mem_free(wdi_sub); */
+	/* qdf_mem_free(wdi_sub); */
 }
 
 static inline void
@@ -170,7 +170,7 @@
 	if (event_cb_sub->priv.next)
 		event_cb_sub->priv.next->priv.prev = event_cb_sub->priv.prev;
 
-	/* cdf_mem_free(event_cb_sub); */
+	/* qdf_mem_free(event_cb_sub); */
 
 	return A_OK;
 }
@@ -186,7 +186,7 @@
 	}
 	/* Separate subscriber list for each event */
 	txrx_pdev->wdi_event_list = (wdi_event_subscribe **)
-				    cdf_mem_malloc(
+				    qdf_mem_malloc(
 					    sizeof(wdi_event_subscribe *) *
 					    WDI_NUM_EVENTS);
 	if (!txrx_pdev->wdi_event_list) {
@@ -221,7 +221,7 @@
 		}
 	}
 	/* txrx_pdev->wdi_event_list would be non-null */
-	cdf_mem_free(txrx_pdev->wdi_event_list);
+	qdf_mem_free(txrx_pdev->wdi_event_list);
 	return A_OK;
 }
 
diff --git a/core/dp/txrx/ol_txrx_flow_control.c b/core/dp/txrx/ol_txrx_flow_control.c
index 66f42d2..157c0d4 100644
--- a/core/dp/txrx/ol_txrx_flow_control.c
+++ b/core/dp/txrx/ol_txrx_flow_control.c
@@ -172,7 +172,7 @@
 	TAILQ_FOREACH(pool, &pdev->tx_desc.flow_pool_list,
 					 flow_pool_list_elem) {
 		qdf_spin_lock_bh(&pool->flow_pool_lock);
-		cdf_mem_copy(&tmp_pool, pool, sizeof(tmp_pool));
+		qdf_mem_copy(&tmp_pool, pool, sizeof(tmp_pool));
 		qdf_spin_unlock_bh(&pool->flow_pool_lock);
 		qdf_spin_unlock_bh(&pdev->tx_desc.flow_pool_list_lock);
 		TXRX_PRINT(TXRX_PRINT_LEVEL_ERR,
@@ -209,7 +209,7 @@
 						 __func__);
 		return;
 	}
-	cdf_mem_zero(&pdev->pool_stats, sizeof(pdev->pool_stats));
+	qdf_mem_zero(&pdev->pool_stats, sizeof(pdev->pool_stats));
 }
 
 /**
@@ -337,7 +337,7 @@
 		return NULL;
 	}
 
-	pool = cdf_mem_malloc(sizeof(*pool));
+	pool = qdf_mem_malloc(sizeof(*pool));
 	if (!pool) {
 		TXRX_PRINT(TXRX_PRINT_LEVEL_ERR,
 		   "%s: malloc failed\n", __func__);
@@ -423,7 +423,7 @@
 		qdf_spin_unlock_bh(&pool->flow_pool_lock);
 		/* Free flow_pool */
 		qdf_spinlock_destroy(&pool->flow_pool_lock);
-		cdf_mem_free(pool);
+		qdf_mem_free(pool);
 	} else { /* FLOW_POOL_INVALID case*/
 		pool->flow_pool_size -= size;
 		pool->flow_pool_id = INVALID_FLOW_ID;
diff --git a/core/dp/txrx/ol_txrx_internal.h b/core/dp/txrx/ol_txrx_internal.h
index 243e121..51d6a94 100644
--- a/core/dp/txrx/ol_txrx_internal.h
+++ b/core/dp/txrx/ol_txrx_internal.h
@@ -30,7 +30,7 @@
 
 #include <qdf_util.h>               /* qdf_assert */
 #include <cdf_nbuf.h>               /* cdf_nbuf_t */
-#include <cdf_memory.h>             /* cdf_mem_set */
+#include <qdf_mem.h>             /* qdf_mem_set */
 #include <cds_ieee80211_common.h>   /* ieee80211_frame */
 #include <ol_htt_rx_api.h>          /* htt_rx_msdu_desc_completes_mpdu, etc. */
 
@@ -197,7 +197,7 @@
 /* default conditional defs (may be undefed below) */
 
 #define TXRX_STATS_INIT(_pdev) \
-	cdf_mem_set(&((_pdev)->stats), sizeof((_pdev)->stats), 0x0)
+	qdf_mem_set(&((_pdev)->stats), sizeof((_pdev)->stats), 0x0)
 #define TXRX_STATS_ADD(_pdev, _field, _delta) {		\
 		_pdev->stats._field += _delta; }
 #define TXRX_STATS_MSDU_INCR(pdev, field, netbuf) \
@@ -495,7 +495,7 @@
 				if (frag_bytes > 0) {
 					p = cdf_nbuf_get_frag_vaddr(frm,
 								    frag_num);
-					cdf_mem_copy(&local_buf[i], p,
+					qdf_mem_copy(&local_buf[i], p,
 						     frag_bytes);
 				}
 				frag_num++;
diff --git a/core/dp/txrx/ol_txrx_peer_find.c b/core/dp/txrx/ol_txrx_peer_find.c
index ea6dee8..9646801 100644
--- a/core/dp/txrx/ol_txrx_peer_find.c
+++ b/core/dp/txrx/ol_txrx_peer_find.c
@@ -28,7 +28,7 @@
 /*=== includes ===*/
 /* header files for OS primitives */
 #include <osdep.h>              /* uint32_t, etc. */
-#include <cdf_memory.h>         /* cdf_mem_malloc, etc. */
+#include <qdf_mem.h>         /* qdf_mem_malloc, etc. */
 #include <qdf_types.h>          /* qdf_device_t, qdf_print */
 /* header files for utilities */
 #include <cds_queue.h>          /* TAILQ */
@@ -119,7 +119,7 @@
 	pdev->peer_hash.idx_bits = log2;
 	/* allocate an array of TAILQ peer object lists */
 	pdev->peer_hash.bins =
-		cdf_mem_malloc(hash_elems *
+		qdf_mem_malloc(hash_elems *
 			       sizeof(TAILQ_HEAD(anonymous_tail_q,
 						 ol_txrx_peer_t)));
 	if (!pdev->peer_hash.bins)
@@ -133,7 +133,7 @@
 
 static void ol_txrx_peer_find_hash_detach(struct ol_txrx_pdev_t *pdev)
 {
-	cdf_mem_free(pdev->peer_hash.bins);
+	qdf_mem_free(pdev->peer_hash.bins);
 }
 
 static inline unsigned
@@ -182,7 +182,7 @@
 	if (mac_addr_is_aligned) {
 		mac_addr = (union ol_txrx_align_mac_addr_t *)peer_mac_addr;
 	} else {
-		cdf_mem_copy(&local_mac_addr_aligned.raw[0],
+		qdf_mem_copy(&local_mac_addr_aligned.raw[0],
 			     peer_mac_addr, OL_TXRX_MAC_ADDR_LEN);
 		mac_addr = &local_mac_addr_aligned;
 	}
@@ -215,7 +215,7 @@
 	if (mac_addr_is_aligned) {
 		mac_addr = (union ol_txrx_align_mac_addr_t *)peer_mac_addr;
 	} else {
-		cdf_mem_copy(&local_mac_addr_aligned.raw[0],
+		qdf_mem_copy(&local_mac_addr_aligned.raw[0],
 			     peer_mac_addr, OL_TXRX_MAC_ADDR_LEN);
 		mac_addr = &local_mac_addr_aligned;
 	}
@@ -310,7 +310,7 @@
 	/* allocate the peer ID -> peer object map */
 	max_peers = ol_cfg_max_peer_id(pdev->ctrl_pdev) + 1;
 	peer_map_size = max_peers * sizeof(pdev->peer_id_to_obj_map[0]);
-	pdev->peer_id_to_obj_map = cdf_mem_malloc(peer_map_size);
+	pdev->peer_id_to_obj_map = qdf_mem_malloc(peer_map_size);
 	if (!pdev->peer_id_to_obj_map)
 		return 1;       /* failure */
 
@@ -321,14 +321,14 @@
 	 * However, it is convenient for debugging to have all elements
 	 * that are not in use set to 0.
 	 */
-	cdf_mem_set(pdev->peer_id_to_obj_map, peer_map_size, 0);
+	qdf_mem_set(pdev->peer_id_to_obj_map, peer_map_size, 0);
 
 	return 0;               /* success */
 }
 
 static void ol_txrx_peer_find_map_detach(struct ol_txrx_pdev_t *pdev)
 {
-	cdf_mem_free(pdev->peer_id_to_obj_map);
+	qdf_mem_free(pdev->peer_id_to_obj_map);
 }
 
 static inline void
diff --git a/core/dp/txrx/ol_txrx_types.h b/core/dp/txrx/ol_txrx_types.h
index f54d778..90ad86b 100644
--- a/core/dp/txrx/ol_txrx_types.h
+++ b/core/dp/txrx/ol_txrx_types.h
@@ -33,7 +33,7 @@
 #define _OL_TXRX_TYPES__H_
 
 #include <cdf_nbuf.h>           /* cdf_nbuf_t */
-#include <cdf_memory.h>
+#include <qdf_mem.h>
 #include <cds_queue.h>          /* TAILQ */
 #include <a_types.h>            /* A_UINT8 */
 #include <htt.h>                /* htt_sec_type, htt_pkt_type, etc. */
@@ -566,7 +566,7 @@
 		uint16_t desc_reserved_size;
 		uint8_t page_divider;
 		uint32_t offset_filter;
-		struct cdf_mem_multi_page_t desc_pages;
+		struct qdf_mem_multi_page_t desc_pages;
 	} tx_desc;
 
 	uint8_t is_mgmt_over_wmi_enabled;
diff --git a/core/hdd/src/wlan_hdd_assoc.c b/core/hdd/src/wlan_hdd_assoc.c
index 45f8960..72106ed 100644
--- a/core/hdd/src/wlan_hdd_assoc.c
+++ b/core/hdd/src/wlan_hdd_assoc.c
@@ -377,7 +377,7 @@
 			    pRoamInfo->u.pConnectedProfile->operationChannel;
 
 			/* Save the ssid for the connection */
-			cdf_mem_copy(&pHddStaCtx->conn_info.SSID.SSID,
+			qdf_mem_copy(&pHddStaCtx->conn_info.SSID.SSID,
 				     &pRoamInfo->u.pConnectedProfile->SSID,
 				     sizeof(tSirMacSSid));
 
@@ -489,8 +489,8 @@
 #endif
 
 #if defined(KERNEL_SUPPORT_11R_CFG80211)
-	cdf_mem_zero(ftIe, DOT11F_IE_FTINFO_MAX_LEN);
-	cdf_mem_zero(ricIe, DOT11F_IE_RICDESCRIPTOR_MAX_LEN);
+	qdf_mem_zero(ftIe, DOT11F_IE_FTINFO_MAX_LEN);
+	qdf_mem_zero(ricIe, DOT11F_IE_RICDESCRIPTOR_MAX_LEN);
 
 	sme_get_rici_es(pHddCtx->hHal, pAdapter->sessionId, (u8 *) ricIe,
 			DOT11F_IE_RICDESCRIPTOR_MAX_LEN, &ric_ies_length);
@@ -535,7 +535,7 @@
 		hddLog(LOGE, FL("kmalloc unable to allocate memory"));
 		return;
 	}
-	cdf_mem_zero(buff, IW_CUSTOM_MAX);
+	qdf_mem_zero(buff, IW_CUSTOM_MAX);
 
 	/* Sme needs to send the RIC IEs first */
 	str_len = strlcpy(buff, "RIC=", IW_CUSTOM_MAX);
@@ -551,7 +551,7 @@
 	}
 
 	/* Sme needs to provide the Auth Resp */
-	cdf_mem_zero(buff, IW_CUSTOM_MAX);
+	qdf_mem_zero(buff, IW_CUSTOM_MAX);
 	str_len = strlcpy(buff, "AUTH=", IW_CUSTOM_MAX);
 	sme_get_ft_pre_auth_response(pHddCtx->hHal, pAdapter->sessionId,
 				     (u8 *) &buff[str_len],
@@ -650,7 +650,7 @@
 		hddLog(LOGE, FL("kmalloc unable to allocate memory"));
 		return;
 	}
-	cdf_mem_zero(buff, IW_CUSTOM_MAX);
+	qdf_mem_zero(buff, IW_CUSTOM_MAX);
 
 	strLen = strlcpy(buff, "BEACONIEs=", IW_CUSTOM_MAX);
 	currentLen = strLen + 1;
@@ -662,10 +662,10 @@
 		 * into chunks of CUSTOM event max size and send it to
 		 * supplicant. Changes are done in supplicant to handle this.
 		 */
-		cdf_mem_zero(&buff[strLen + 1], IW_CUSTOM_MAX - (strLen + 1));
+		qdf_mem_zero(&buff[strLen + 1], IW_CUSTOM_MAX - (strLen + 1));
 		currentLen =
 			QDF_MIN(totalIeLen, IW_CUSTOM_MAX - (strLen + 1) - 1);
-		cdf_mem_copy(&buff[strLen + 1], pBeaconIes + currentOffset,
+		qdf_mem_copy(&buff[strLen + 1], pBeaconIes + currentOffset,
 			     currentLen);
 		currentOffset += currentLen;
 		totalIeLen -= currentLen;
@@ -893,8 +893,8 @@
 {
 	/* Remove staId, bssId and peerMacAddress */
 	pHddStaCtx->conn_info.staId[0] = 0;
-	cdf_mem_zero(&pHddStaCtx->conn_info.bssId, QDF_MAC_ADDR_SIZE);
-	cdf_mem_zero(&pHddStaCtx->conn_info.peerMacAddress[0],
+	qdf_mem_zero(&pHddStaCtx->conn_info.bssId, QDF_MAC_ADDR_SIZE);
+	qdf_mem_zero(&pHddStaCtx->conn_info.peerMacAddress[0],
 		     QDF_MAC_ADDR_SIZE);
 
 	/* Clear all security settings */
@@ -902,14 +902,14 @@
 	pHddStaCtx->conn_info.mcEncryptionType = eCSR_ENCRYPT_TYPE_NONE;
 	pHddStaCtx->conn_info.ucEncryptionType = eCSR_ENCRYPT_TYPE_NONE;
 
-	cdf_mem_zero(&pHddStaCtx->conn_info.Keys, sizeof(tCsrKeys));
-	cdf_mem_zero(&pHddStaCtx->ibss_enc_key, sizeof(tCsrRoamSetKey));
+	qdf_mem_zero(&pHddStaCtx->conn_info.Keys, sizeof(tCsrKeys));
+	qdf_mem_zero(&pHddStaCtx->ibss_enc_key, sizeof(tCsrRoamSetKey));
 
 	/* Set not-connected state */
 	pHddStaCtx->conn_info.connDot11DesiredBssType = eCSR_BSS_TYPE_ANY;
 	pHddStaCtx->conn_info.proxyARPService = 0;
 
-	cdf_mem_zero(&pHddStaCtx->conn_info.SSID, sizeof(tCsrSSIDInfo));
+	qdf_mem_zero(&pHddStaCtx->conn_info.SSID, sizeof(tCsrSSIDInfo));
 }
 
 /**
@@ -1106,7 +1106,7 @@
 			 * reset are done in hdd_connRemoveConnectInfo.
 			 */
 			pHddStaCtx->conn_info.staId[i] = 0;
-			cdf_mem_zero(&pHddStaCtx->conn_info.peerMacAddress[i],
+			qdf_mem_zero(&pHddStaCtx->conn_info.peerMacAddress[i],
 				sizeof(struct qdf_mac_addr));
 			if (sta_id < (WLAN_MAX_STA_COUNT + 3))
 				pHddCtx->sta_to_adapter[sta_id] = NULL;
@@ -1409,12 +1409,12 @@
 	/* Send the Assoc Resp, the supplicant needs this for initial Auth */
 	len = pCsrRoamInfo->nAssocRspLength - FT_ASSOC_RSP_IES_OFFSET;
 	rspRsnLength = len;
-	cdf_mem_copy(rspRsnIe, pFTAssocRsp, len);
-	cdf_mem_zero(rspRsnIe + len, IW_GENERIC_IE_MAX - len);
+	qdf_mem_copy(rspRsnIe, pFTAssocRsp, len);
+	qdf_mem_zero(rspRsnIe + len, IW_GENERIC_IE_MAX - len);
 
 	chan = ieee80211_get_channel(pAdapter->wdev.wiphy,
 				     (int)pCsrRoamInfo->pBssDesc->channelId);
-	cdf_mem_zero(&roam_profile, sizeof(tCsrRoamConnectedProfile));
+	qdf_mem_zero(&roam_profile, sizeof(tCsrRoamConnectedProfile));
 	sme_roam_get_connect_profile(hal_handle, pAdapter->sessionId,
 		&roam_profile);
 	bss = cfg80211_get_bss(pAdapter->wdev.wiphy, chan,
@@ -1433,7 +1433,7 @@
 	buf_ptr++;
 	*buf_ptr = roam_profile.SSID.length; /*len of ssid*/
 	buf_ptr++;
-	cdf_mem_copy(buf_ptr, &roam_profile.SSID.ssId[0],
+	qdf_mem_copy(buf_ptr, &roam_profile.SSID.ssId[0],
 			roam_profile.SSID.length);
 	ssid_ie_len = 2 + roam_profile.SSID.length;
 	hdd_notice("SSIDIE:");
@@ -1443,11 +1443,11 @@
 	if (final_req_ie == NULL)
 		goto done;
 	buf_ptr = final_req_ie;
-	cdf_mem_copy(buf_ptr, buf_ssid_ie, ssid_ie_len);
+	qdf_mem_copy(buf_ptr, buf_ssid_ie, ssid_ie_len);
 	buf_ptr += ssid_ie_len;
-	cdf_mem_copy(buf_ptr, reqRsnIe, reqRsnLength);
-	cdf_mem_copy(rspRsnIe, pFTAssocRsp, len);
-	cdf_mem_zero(final_req_ie + (ssid_ie_len + reqRsnLength),
+	qdf_mem_copy(buf_ptr, reqRsnIe, reqRsnLength);
+	qdf_mem_copy(rspRsnIe, pFTAssocRsp, len);
+	qdf_mem_zero(final_req_ie + (ssid_ie_len + reqRsnLength),
 		IW_GENERIC_IE_MAX - (ssid_ie_len + reqRsnLength));
 	hdd_notice("Req RSN IE:");
 	QDF_TRACE_HEX_DUMP(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_DEBUG,
@@ -1456,7 +1456,7 @@
 			final_req_ie, (ssid_ie_len + reqRsnLength),
 			rspRsnIe, rspRsnLength, GFP_KERNEL);
 
-	cdf_mem_copy(assoc_req_ies,
+	qdf_mem_copy(assoc_req_ies,
 		(u8 *)pCsrRoamInfo->pbFrames + pCsrRoamInfo->nBeaconLength,
 		pCsrRoamInfo->nAssocReqLength);
 
@@ -1665,9 +1665,9 @@
 	hdd_station_ctx_t *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(pAdapter);
 	tCsrRoamInfo roamInfo;
 	roamInfo.fAuthRequired = false;
-	cdf_mem_copy(roamInfo.bssid.bytes,
+	qdf_mem_copy(roamInfo.bssid.bytes,
 		     pHddStaCtx->roam_info.bssid, QDF_MAC_ADDR_SIZE);
-	cdf_mem_copy(roamInfo.peerMac.bytes,
+	qdf_mem_copy(roamInfo.peerMac.bytes,
 		     pHddStaCtx->roam_info.peerMac, QDF_MAC_ADDR_SIZE);
 
 	cdf_ret_status =
@@ -1983,11 +1983,11 @@
 						pRoamInfo->fAuthRequired =
 							false;
 
-						cdf_mem_copy(pHddStaCtx->
+						qdf_mem_copy(pHddStaCtx->
 							     roam_info.bssid,
 							     pRoamInfo->bssid.bytes,
 							     QDF_MAC_ADDR_SIZE);
-						cdf_mem_copy(pHddStaCtx->
+						qdf_mem_copy(pHddStaCtx->
 							     roam_info.peerMac,
 							     pRoamInfo->peerMac.bytes,
 							     QDF_MAC_ADDR_SIZE);
@@ -2161,7 +2161,7 @@
 				qdf_status, qdf_status);
 		}
 #ifdef WLAN_FEATURE_11W
-		cdf_mem_zero(&pAdapter->hdd_stats.hddPmfStats,
+		qdf_mem_zero(&pAdapter->hdd_stats.hddPmfStats,
 			     sizeof(pAdapter->hdd_stats.hddPmfStats));
 #endif
 	} else {
@@ -3074,7 +3074,7 @@
 				pHddCtx->tdlsConnInfo[staIdx].staId = 0;
 				pHddCtx->tdlsConnInfo[staIdx].
 				sessionId = 255;
-				cdf_mem_zero(&pHddCtx->
+				qdf_mem_zero(&pHddCtx->
 					     tdlsConnInfo[staIdx].
 					     peerMac,
 					     QDF_MAC_ADDR_SIZE);
@@ -3127,13 +3127,13 @@
 							    tdlsConnInfo
 							    [staIdx].
 							    staId);
-				cdf_mem_zero(&smeTdlsPeerStateParams,
+				qdf_mem_zero(&smeTdlsPeerStateParams,
 					     sizeof
 					     (smeTdlsPeerStateParams));
 				smeTdlsPeerStateParams.vdevId =
 					pHddCtx->tdlsConnInfo[staIdx].
 					sessionId;
-				cdf_mem_copy(&smeTdlsPeerStateParams.
+				qdf_mem_copy(&smeTdlsPeerStateParams.
 					     peerMacAddr,
 					     &pHddCtx->
 					     tdlsConnInfo[staIdx].
@@ -3168,7 +3168,7 @@
 				wlan_hdd_tdls_decrement_peer_count
 					(pAdapter);
 
-				cdf_mem_zero(&pHddCtx->
+				qdf_mem_zero(&pHddCtx->
 					     tdlsConnInfo[staIdx].
 					     peerMac,
 					     QDF_MAC_ADDR_SIZE);
@@ -3498,7 +3498,7 @@
 	pos += nBytes;
 	freeBytes -= nBytes;
 
-	cdf_mem_copy(pos, pRoamInfo->bssid.bytes, QDF_MAC_ADDR_SIZE);
+	qdf_mem_copy(pos, pRoamInfo->bssid.bytes, QDF_MAC_ADDR_SIZE);
 	pos += QDF_MAC_ADDR_SIZE;
 	freeBytes -= QDF_MAC_ADDR_SIZE;
 
@@ -3685,7 +3685,7 @@
 			freeBytes -= nBytes;
 
 			/* Copy total Beacon report data length */
-			cdf_mem_copy(pos, (char *)&tot_bcn_ieLen,
+			qdf_mem_copy(pos, (char *)&tot_bcn_ieLen,
 				     sizeof(tot_bcn_ieLen));
 			pos += sizeof(tot_bcn_ieLen);
 			freeBytes -= sizeof(tot_bcn_ieLen);
@@ -3767,7 +3767,7 @@
 					       bcnRepBssInfo[i +
 							     lastSent].
 					       bcnReportFields);
-				cdf_mem_copy(pos,
+				qdf_mem_copy(pos,
 					     (char *)&pRoamInfo->
 					     pEseBcnReportRsp->bcnRepBssInfo[i +
 									     lastSent].
@@ -3779,12 +3779,12 @@
 				len =
 					pRoamInfo->pEseBcnReportRsp->
 					bcnRepBssInfo[i + lastSent].ieLen;
-				cdf_mem_copy(pos, (char *)&len, sizeof(len));
+				qdf_mem_copy(pos, (char *)&len, sizeof(len));
 				pos += sizeof(len);
 				freeBytes -= sizeof(len);
 
 				/* copy IE from scan results */
-				cdf_mem_copy(pos,
+				qdf_mem_copy(pos,
 					     (char *)pRoamInfo->
 					     pEseBcnReportRsp->bcnRepBssInfo[i +
 									     lastSent].
@@ -4387,9 +4387,9 @@
 			 * For right now, I assume setASSOCIATE() has passed
 			 * in the bssid.
 			 */
-			cdf_mem_copy(PMKIDCache[i].BSSID.bytes,
+			qdf_mem_copy(PMKIDCache[i].BSSID.bytes,
 				     bssid, QDF_MAC_ADDR_SIZE);
-			cdf_mem_copy(PMKIDCache[i].PMKID,
+			qdf_mem_copy(PMKIDCache[i].PMKID,
 				     dot11RSNIE.pmkid[i], CSR_RSN_PMKID_SIZE);
 		}
 
@@ -4468,7 +4468,7 @@
 	u8 bssid[ETH_ALEN];        /* MAC address of assoc peer */
 	/* MAC address of assoc peer */
 	/* But, this routine is only called when we are NOT associated. */
-	cdf_mem_copy(bssid,
+	qdf_mem_copy(bssid,
 		     pWextState->roamProfile.BSSIDs.bssid,
 		     sizeof(bssid));
 	if (pWextState->WPARSNIE[0] == DOT11F_EID_RSN
@@ -4759,9 +4759,9 @@
 	pWextState->roamProfile.SSIDs.SSIDList->SSID.length =
 		wrqu->essid.length;
 
-	cdf_mem_zero(pWextState->roamProfile.SSIDs.SSIDList->SSID.ssId,
+	qdf_mem_zero(pWextState->roamProfile.SSIDs.SSIDList->SSID.ssId,
 		     sizeof(pWextState->roamProfile.SSIDs.SSIDList->SSID.ssId));
-	cdf_mem_copy((void *)(pWextState->roamProfile.SSIDs.SSIDList->SSID.
+	qdf_mem_copy((void *)(pWextState->roamProfile.SSIDs.SSIDList->SSID.
 			      ssId), extra, wrqu->essid.length);
 	if (IW_AUTH_WPA_VERSION_WPA == pWextState->wpaVersion
 	    || IW_AUTH_WPA_VERSION_WPA2 == pWextState->wpaVersion) {
@@ -5380,7 +5380,7 @@
 
 	pMacAddress = (uint8_t *) wrqu->ap_addr.sa_data;
 	hddLog(LOG1, FL(" " MAC_ADDRESS_STR), MAC_ADDR_ARRAY(pMacAddress));
-	cdf_mem_copy(pHddStaCtx->conn_info.bssId.bytes, pMacAddress,
+	qdf_mem_copy(pHddStaCtx->conn_info.bssId.bytes, pMacAddress,
 		     sizeof(struct qdf_mac_addr));
 	EXIT();
 
@@ -5438,7 +5438,7 @@
 
 	if (pHddStaCtx->conn_info.connState == eConnectionState_Associated ||
 	    eConnectionState_IbssConnected == pHddStaCtx->conn_info.connState) {
-		cdf_mem_copy(wrqu->ap_addr.sa_data,
+		qdf_mem_copy(wrqu->ap_addr.sa_data,
 				pHddStaCtx->conn_info.bssId.bytes,
 				QDF_MAC_ADDR_SIZE);
 	} else {
diff --git a/core/hdd/src/wlan_hdd_cfg.c b/core/hdd/src/wlan_hdd_cfg.c
index b85921b..daa65a0 100644
--- a/core/hdd/src/wlan_hdd_cfg.c
+++ b/core/hdd/src/wlan_hdd_cfg.c
@@ -3944,7 +3944,7 @@
 				break;
 		}
 		if (res == 0 && !qdf_is_macaddr_zero(&macaddr[i])) {
-			cdf_mem_copy((uint8_t *) &pHddCtx->config->
+			qdf_mem_copy((uint8_t *) &pHddCtx->config->
 				     intfMacAddr[i].bytes[0],
 				     (uint8_t *) &macaddr[i].bytes[0],
 				     QDF_MAC_ADDR_SIZE);
@@ -5319,7 +5319,7 @@
 
 	update_mac_from_string(pHddCtx, &macTable[0], i);
 
-	cdf_mem_copy(&customMacAddr,
+	qdf_mem_copy(&customMacAddr,
 		     &pHddCtx->config->intfMacAddr[0].bytes[0],
 		     sizeof(tSirMacAddr));
 	sme_set_custom_mac_addr(customMacAddr);
@@ -5370,16 +5370,16 @@
 
 	hddLog(LOG1, "%s: qcom_cfg.ini Size %zu", __func__, fw->size);
 
-	buffer = (char *)cdf_mem_malloc(fw->size);
+	buffer = (char *)qdf_mem_malloc(fw->size);
 
 	if (NULL == buffer) {
-		hddLog(QDF_TRACE_LEVEL_FATAL, FL("cdf_mem_malloc failure"));
+		hddLog(QDF_TRACE_LEVEL_FATAL, FL("qdf_mem_malloc failure"));
 		release_firmware(fw);
 		return QDF_STATUS_E_NOMEM;
 	}
 	pTemp = buffer;
 
-	cdf_mem_copy((void *)buffer, (void *)fw->data, fw->size);
+	qdf_mem_copy((void *)buffer, (void *)fw->data, fw->size);
 	size = fw->size;
 
 	while (buffer != NULL) {
@@ -5435,7 +5435,7 @@
 
 config_exit:
 	release_firmware(fw);
-	cdf_mem_free(pTemp);
+	qdf_mem_free(pTemp);
 	return qdf_status;
 }
 
@@ -6379,13 +6379,13 @@
 
 	struct hdd_config *pConfig = pHddCtx->config;
 
-	smeConfig = cdf_mem_malloc(sizeof(*smeConfig));
+	smeConfig = qdf_mem_malloc(sizeof(*smeConfig));
 	if (NULL == smeConfig) {
 		QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR,
 			  "%s: unable to allocate smeConfig", __func__);
 		return QDF_STATUS_E_NOMEM;
 	}
-	cdf_mem_zero(smeConfig, sizeof(*smeConfig));
+	qdf_mem_zero(smeConfig, sizeof(*smeConfig));
 
 	QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_INFO_HIGH,
 		  "%s bWmmIsEnabled=%d 802_11e_enabled=%d dot11Mode=%d",
@@ -6677,7 +6677,7 @@
 		       status);
 	}
 
-	cdf_mem_free(smeConfig);
+	qdf_mem_free(smeConfig);
 	return status;
 }
 
diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c
index bfa1853..67e1a37 100644
--- a/core/hdd/src/wlan_hdd_cfg80211.c
+++ b/core/hdd/src/wlan_hdd_cfg80211.c
@@ -1216,12 +1216,12 @@
 		 * func for Sec AP and realloc for Pri AP ch list size
 		 */
 		if (sap_config->acs_cfg.ch_list)
-			cdf_mem_free(sap_config->acs_cfg.ch_list);
+			qdf_mem_free(sap_config->acs_cfg.ch_list);
 
-		cdf_mem_copy(&sap_config->acs_cfg,
+		qdf_mem_copy(&sap_config->acs_cfg,
 					&con_sap_config->acs_cfg,
 					sizeof(struct sap_acs_cfg));
-		sap_config->acs_cfg.ch_list = cdf_mem_malloc(
+		sap_config->acs_cfg.ch_list = qdf_mem_malloc(
 					sizeof(uint8_t) *
 					con_sap_config->acs_cfg.ch_list_count);
 		if (!sap_config->acs_cfg.ch_list) {
@@ -1229,7 +1229,7 @@
 			return -ENOMEM;
 		}
 
-		cdf_mem_copy(sap_config->acs_cfg.ch_list,
+		qdf_mem_copy(sap_config->acs_cfg.ch_list,
 					con_sap_config->acs_cfg.ch_list,
 					con_sap_config->acs_cfg.ch_list_count);
 
@@ -1345,7 +1345,7 @@
 
 	acs_event_callback = hdd_hostapd_sap_event_cb;
 
-	cdf_mem_copy(sap_config->self_macaddr.bytes,
+	qdf_mem_copy(sap_config->self_macaddr.bytes,
 		adapter->macAddressCurrent.bytes, sizeof(struct qdf_mac_addr));
 	hddLog(LOG1, FL("ACS Started for wlan%d"), adapter->dev->ifindex);
 	status = wlansap_acs_chselect(
@@ -1429,7 +1429,7 @@
 		goto out;
 	}
 	sap_config = &adapter->sessionCtx.ap.sapConfig;
-	cdf_mem_zero(&sap_config->acs_cfg, sizeof(struct sap_acs_cfg));
+	qdf_mem_zero(&sap_config->acs_cfg, sizeof(struct sap_acs_cfg));
 
 	status = nla_parse(tb, QCA_WLAN_VENDOR_ATTR_ACS_MAX, data, data_len,
 						NULL);
@@ -1492,13 +1492,13 @@
 		sap_config->acs_cfg.ch_list_count = nla_len(
 					tb[QCA_WLAN_VENDOR_ATTR_ACS_CH_LIST]);
 		if (sap_config->acs_cfg.ch_list_count) {
-			sap_config->acs_cfg.ch_list = cdf_mem_malloc(
+			sap_config->acs_cfg.ch_list = qdf_mem_malloc(
 					sizeof(uint8_t) *
 					sap_config->acs_cfg.ch_list_count);
 			if (sap_config->acs_cfg.ch_list == NULL)
 				goto out;
 
-			cdf_mem_copy(sap_config->acs_cfg.ch_list, tmp,
+			qdf_mem_copy(sap_config->acs_cfg.ch_list, tmp,
 					sap_config->acs_cfg.ch_list_count);
 		}
 	} else if (tb[QCA_WLAN_VENDOR_ATTR_ACS_FREQ_LIST]) {
@@ -1508,7 +1508,7 @@
 			tb[QCA_WLAN_VENDOR_ATTR_ACS_FREQ_LIST]) /
 				sizeof(uint32_t);
 		if (sap_config->acs_cfg.ch_list_count) {
-			sap_config->acs_cfg.ch_list = cdf_mem_malloc(
+			sap_config->acs_cfg.ch_list = qdf_mem_malloc(
 				sap_config->acs_cfg.ch_list_count);
 			if (sap_config->acs_cfg.ch_list == NULL) {
 				hddLog(LOGE, FL("ACS config alloc fail"));
@@ -1962,9 +1962,9 @@
 		hddLog(LOGE, FL("Invalid ATTR"));
 		return -EINVAL;
 	}
-	pReqMsg = cdf_mem_malloc(sizeof(*pReqMsg));
+	pReqMsg = qdf_mem_malloc(sizeof(*pReqMsg));
 	if (!pReqMsg) {
-		hddLog(LOGE, FL("cdf_mem_malloc failed"));
+		hddLog(LOGE, FL("qdf_mem_malloc failed"));
 		return -ENOMEM;
 	}
 	if (!tb[QCA_WLAN_VENDOR_ATTR_SET_SCANNING_MAC_OUI]) {
@@ -1984,7 +1984,7 @@
 	}
 	return 0;
 fail:
-	cdf_mem_free(pReqMsg);
+	qdf_mem_free(pReqMsg);
 	return -EINVAL;
 }
 
@@ -2210,7 +2210,7 @@
 		goto fail;
 	}
 	session_id = pAdapter->sessionId;
-	cdf_mem_set(&roam_params, sizeof(roam_params), 0);
+	qdf_mem_set(&roam_params, sizeof(roam_params), 0);
 	cmd_type = nla_get_u32(tb[QCA_WLAN_VENDOR_ATTR_ROAMING_SUBCMD]);
 	if (!tb[QCA_WLAN_VENDOR_ATTR_ROAMING_REQ_ID]) {
 		hddLog(LOGE, FL("attr request id failed"));
@@ -2742,8 +2742,8 @@
 	sme_update_roam_key_mgmt_offload_enabled(hdd_ctx_ptr->hHal,
 			hdd_adapter_ptr->sessionId,
 			true);
-	cdf_mem_zero(&local_pmk, SIR_ROAM_SCAN_PSK_SIZE);
-	cdf_mem_copy(local_pmk, data, data_len);
+	qdf_mem_zero(&local_pmk, SIR_ROAM_SCAN_PSK_SIZE);
+	qdf_mem_copy(local_pmk, data, data_len);
 	sme_roam_set_psk_pmk(WLAN_HDD_GET_HAL_CTX(hdd_adapter_ptr),
 			hdd_adapter_ptr->sessionId, local_pmk, data_len);
 	return 0;
@@ -3564,7 +3564,7 @@
 		return -ENOTSUPP;
 	}
 
-	add_req = cdf_mem_malloc(sizeof(*add_req));
+	add_req = qdf_mem_malloc(sizeof(*add_req));
 	if (!add_req) {
 		hddLog(LOGE, FL("memory allocation failed"));
 		return -ENOMEM;
@@ -3633,12 +3633,12 @@
 	}
 
 	len = 0;
-	cdf_mem_copy(&add_req->ucPattern[0], dst_addr.bytes, QDF_MAC_ADDR_SIZE);
+	qdf_mem_copy(&add_req->ucPattern[0], dst_addr.bytes, QDF_MAC_ADDR_SIZE);
 	len += QDF_MAC_ADDR_SIZE;
-	cdf_mem_copy(&add_req->ucPattern[len], add_req->mac_address.bytes,
+	qdf_mem_copy(&add_req->ucPattern[len], add_req->mac_address.bytes,
 			QDF_MAC_ADDR_SIZE);
 	len += QDF_MAC_ADDR_SIZE;
-	cdf_mem_copy(&add_req->ucPattern[len], &eth_type, 2);
+	qdf_mem_copy(&add_req->ucPattern[len], &eth_type, 2);
 	len += 2;
 
 	/*
@@ -3647,7 +3647,7 @@
 	 * | 14 bytes Ethernet (802.3) header | IP header and payload |
 	 * ------------------------------------------------------------
 	 */
-	cdf_mem_copy(&add_req->ucPattern[len],
+	qdf_mem_copy(&add_req->ucPattern[len],
 			nla_data(tb[PARAM_IP_PACKET]),
 			add_req->ucPtrnSize);
 	add_req->ucPtrnSize += len;
@@ -3668,11 +3668,11 @@
 	}
 
 	EXIT();
-	cdf_mem_free(add_req);
+	qdf_mem_free(add_req);
 	return 0;
 
 fail:
-	cdf_mem_free(add_req);
+	qdf_mem_free(add_req);
 	return -EINVAL;
 }
 
@@ -3712,7 +3712,7 @@
 		return -EINVAL;
 	}
 
-	del_req = cdf_mem_malloc(sizeof(*del_req));
+	del_req = qdf_mem_malloc(sizeof(*del_req));
 	if (!del_req) {
 		hddLog(LOGE, FL("memory allocation failed"));
 		return -ENOMEM;
@@ -3732,11 +3732,11 @@
 	}
 
 	EXIT();
-	cdf_mem_free(del_req);
+	qdf_mem_free(del_req);
 	return 0;
 
 fail:
-	cdf_mem_free(del_req);
+	qdf_mem_free(del_req);
 	return -EINVAL;
 }
 
@@ -4348,7 +4348,7 @@
 		return -EINVAL;
 	}
 
-	cdf_mem_copy(peer_mac, nla_data(tb[QCA_WLAN_VENDOR_ATTR_MAC_ADDR]),
+	qdf_mem_copy(peer_mac, nla_data(tb[QCA_WLAN_VENDOR_ATTR_MAC_ADDR]),
 		     QDF_MAC_ADDR_SIZE);
 	hddLog(QDF_TRACE_LEVEL_INFO,
 	       FL("peerMac="MAC_ADDRESS_STR" for device_mode:%d"),
@@ -4359,7 +4359,7 @@
 		hdd_sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
 		if ((hdd_sta_ctx->conn_info.connState !=
 			eConnectionState_Associated) ||
-		    !cdf_mem_compare(hdd_sta_ctx->conn_info.bssId.bytes,
+		    qdf_mem_cmp(hdd_sta_ctx->conn_info.bssId.bytes,
 			peer_mac, QDF_MAC_ADDR_SIZE)) {
 			hddLog(QDF_TRACE_LEVEL_ERROR,
 			       FL("Not Associated to mac "MAC_ADDRESS_STR),
@@ -4378,7 +4378,7 @@
 			if (adapter->aStaInfo[sta_id].isUsed &&
 			    !qdf_is_macaddr_broadcast(
 				&adapter->aStaInfo[sta_id].macAddrSTA) &&
-			    cdf_mem_compare(
+			    !qdf_mem_cmp(
 				&adapter->aStaInfo[sta_id].macAddrSTA.bytes,
 				peer_mac, QDF_MAC_ADDR_SIZE))
 				break;
@@ -5675,7 +5675,7 @@
 		hdd_device_mode_to_string(pAdapter->device_mode),
 		pAdapter->device_mode);
 
-	cdf_mem_zero(&setKey, sizeof(tCsrRoamSetKey));
+	qdf_mem_zero(&setKey, sizeof(tCsrRoamSetKey));
 	setKey.keyId = key_index;       /* Store Key ID */
 	setKey.encType = eCSR_ENCRYPT_TYPE_WPI; /* SET WAPI Encryption */
 	setKey.keyDirection = eSIR_TX_RX;       /* Key Directionn both TX and RX */
@@ -5683,7 +5683,7 @@
 	if (!mac_addr || is_broadcast_ether_addr(mac_addr)) {
 		qdf_set_macaddr_broadcast(&setKey.peerMac);
 	} else {
-		cdf_mem_copy(setKey.peerMac.bytes, mac_addr, QDF_MAC_ADDR_SIZE);
+		qdf_mem_copy(setKey.peerMac.bytes, mac_addr, QDF_MAC_ADDR_SIZE);
 	}
 	setKey.keyLength = key_Len;
 	pKeyPtr = setKey.Key;
@@ -5802,13 +5802,13 @@
 	uint8_t srv_ip[IPADDR_NUM_ENTRIES];
 	uint8_t num;
 	uint32_t temp;
-	pDhcpSrvInfo = cdf_mem_malloc(sizeof(*pDhcpSrvInfo));
+	pDhcpSrvInfo = qdf_mem_malloc(sizeof(*pDhcpSrvInfo));
 	if (NULL == pDhcpSrvInfo) {
 		hddLog(QDF_TRACE_LEVEL_ERROR,
 		       "%s: could not allocate tDhcpSrvOffloadInfo!", __func__);
 		return;
 	}
-	cdf_mem_zero(pDhcpSrvInfo, sizeof(*pDhcpSrvInfo));
+	qdf_mem_zero(pDhcpSrvInfo, sizeof(*pDhcpSrvInfo));
 	pDhcpSrvInfo->vdev_id = pHostapdAdapter->sessionId;
 	pDhcpSrvInfo->dhcpSrvOffloadEnabled = true;
 	pDhcpSrvInfo->dhcpClientNum = pHddCtx->config->dhcpMaxNumClients;
@@ -5845,7 +5845,7 @@
 	hddLog(QDF_TRACE_LEVEL_INFO_HIGH,
 	       "%s: enable DHCP Server offload successfully!", __func__);
 end:
-	cdf_mem_free(pDhcpSrvInfo);
+	qdf_mem_free(pDhcpSrvInfo);
 	return;
 }
 #endif /* DHCP_SERVER_OFFLOAD */
@@ -6327,7 +6327,7 @@
 
 	pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(pAdapter);
 
-	cdf_mem_copy(STAMacAddress.bytes, mac, QDF_MAC_ADDR_SIZE);
+	qdf_mem_copy(STAMacAddress.bytes, mac, QDF_MAC_ADDR_SIZE);
 
 	if ((pAdapter->device_mode == WLAN_HDD_SOFTAP) ||
 	    (pAdapter->device_mode == WLAN_HDD_P2P_GO)) {
@@ -6442,20 +6442,20 @@
 					  __func__,
 					  StaParams.supported_channels_len);
 			}
-			cdf_mem_copy(StaParams.supported_oper_classes,
+			qdf_mem_copy(StaParams.supported_oper_classes,
 				     params->supported_oper_classes,
 				     params->supported_oper_classes_len);
 			StaParams.supported_oper_classes_len =
 				params->supported_oper_classes_len;
 
 			if (0 != params->ext_capab_len)
-				cdf_mem_copy(StaParams.extn_capability,
+				qdf_mem_copy(StaParams.extn_capability,
 					     params->ext_capab,
 					     sizeof(StaParams.extn_capability));
 
 			if (NULL != params->ht_capa) {
 				StaParams.htcap_present = 1;
-				cdf_mem_copy(&StaParams.HTCap, params->ht_capa,
+				qdf_mem_copy(&StaParams.HTCap, params->ht_capa,
 					     sizeof(tSirHTCap));
 			}
 
@@ -6477,7 +6477,7 @@
 
 			if (0 != StaParams.supported_rates_len) {
 				int i = 0;
-				cdf_mem_copy(StaParams.supported_rates,
+				qdf_mem_copy(StaParams.supported_rates,
 					     params->supported_rates,
 					     StaParams.supported_rates_len);
 				QDF_TRACE(QDF_MODULE_ID_HDD,
@@ -6494,7 +6494,7 @@
 
 			if (NULL != params->vht_capa) {
 				StaParams.vhtcap_present = 1;
-				cdf_mem_copy(&StaParams.VHTCap,
+				qdf_mem_copy(&StaParams.VHTCap,
 					     params->vht_capa,
 					     sizeof(tSirVHTCap));
 			}
@@ -6631,10 +6631,10 @@
 	       __func__, key_index, params->key_len);
 
 	/*extract key idx, key len and key */
-	cdf_mem_zero(&setKey, sizeof(tCsrRoamSetKey));
+	qdf_mem_zero(&setKey, sizeof(tCsrRoamSetKey));
 	setKey.keyId = key_index;
 	setKey.keyLength = params->key_len;
-	cdf_mem_copy(&setKey.Key[0], params->key, params->key_len);
+	qdf_mem_copy(&setKey.Key[0], params->key, params->key_len);
 
 	switch (params->cipher) {
 	case WLAN_CIPHER_SUITE_WEP40:
@@ -6650,7 +6650,7 @@
 		u8 *pKey = &setKey.Key[0];
 		setKey.encType = eCSR_ENCRYPT_TYPE_TKIP;
 
-		cdf_mem_zero(pKey, CSR_MAX_KEY_LEN);
+		qdf_mem_zero(pKey, CSR_MAX_KEY_LEN);
 
 		/*Supplicant sends the 32bytes key in this order
 
@@ -6668,13 +6668,13 @@
 		   <---16bytes---><--8bytes--><--8bytes-->
 		 */
 		/* Copy the Temporal Key 1 (TK1) */
-		cdf_mem_copy(pKey, params->key, 16);
+		qdf_mem_copy(pKey, params->key, 16);
 
 		/*Copy the rx mic first */
-		cdf_mem_copy(&pKey[16], &params->key[24], 8);
+		qdf_mem_copy(&pKey[16], &params->key[24], 8);
 
 		/*Copy the tx mic */
-		cdf_mem_copy(&pKey[24], &params->key[16], 8);
+		qdf_mem_copy(&pKey[24], &params->key[16], 8);
 
 		break;
 	}
@@ -6686,7 +6686,7 @@
 #ifdef FEATURE_WLAN_WAPI
 	case WLAN_CIPHER_SUITE_SMS4:
 	{
-		cdf_mem_zero(&setKey, sizeof(tCsrRoamSetKey));
+		qdf_mem_zero(&setKey, sizeof(tCsrRoamSetKey));
 		wlan_hdd_cfg80211_set_key_wapi(pAdapter, key_index,
 					       mac_addr, params->key,
 					       params->key_len);
@@ -6731,7 +6731,7 @@
 		QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_INFO,
 			  "%s- %d: setting pairwise key", __func__, __LINE__);
 		setKey.keyDirection = eSIR_TX_RX;
-		cdf_mem_copy(setKey.peerMac.bytes, mac_addr, QDF_MAC_ADDR_SIZE);
+		qdf_mem_copy(setKey.peerMac.bytes, mac_addr, QDF_MAC_ADDR_SIZE);
 	}
 	if ((WLAN_HDD_IBSS == pAdapter->device_mode) && !pairwise) {
 		/* if a key is already installed, block all subsequent ones */
@@ -6754,7 +6754,7 @@
 		}
 		/*Save the keys here and call sme_roam_set_key for setting
 		   the PTK after peer joins the IBSS network */
-		cdf_mem_copy(&pAdapter->sessionCtx.station.ibss_enc_key,
+		qdf_mem_copy(&pAdapter->sessionCtx.station.ibss_enc_key,
 			     &setKey, sizeof(tCsrRoamSetKey));
 
 		pAdapter->sessionCtx.station.ibss_enc_key_installed = 1;
@@ -6783,10 +6783,10 @@
 		if (pairwise ||
 			eCSR_ENCRYPT_TYPE_WEP40_STATICKEY == setKey.encType ||
 			eCSR_ENCRYPT_TYPE_WEP104_STATICKEY == setKey.encType)
-			cdf_mem_copy(&ap_ctx->wepKey[key_index], &setKey,
+			qdf_mem_copy(&ap_ctx->wepKey[key_index], &setKey,
 				     sizeof(tCsrRoamSetKey));
 		else
-			cdf_mem_copy(&ap_ctx->groupKey, &setKey,
+			qdf_mem_copy(&ap_ctx->groupKey, &setKey,
 				     sizeof(tCsrRoamSetKey));
 
 	} else if ((pAdapter->device_mode == WLAN_HDD_INFRA_STATION) ||
@@ -6812,7 +6812,7 @@
 
 		pWextState->roamProfile.Keys.defaultIndex = key_index;
 
-		cdf_mem_copy(&pWextState->roamProfile.Keys.
+		qdf_mem_copy(&pWextState->roamProfile.Keys.
 			     KeyMaterial[key_index][0], params->key,
 			     params->key_len);
 
@@ -7118,11 +7118,11 @@
 			hddLog(LOG2, FL("Default tx key index %d"), key_index);
 
 			Keys->defaultIndex = (u8) key_index;
-			cdf_mem_zero(&setKey, sizeof(tCsrRoamSetKey));
+			qdf_mem_zero(&setKey, sizeof(tCsrRoamSetKey));
 			setKey.keyId = key_index;
 			setKey.keyLength = Keys->KeyLength[key_index];
 
-			cdf_mem_copy(&setKey.Key[0],
+			qdf_mem_copy(&setKey.Key[0],
 				     &Keys->KeyMaterial[key_index][0],
 				     Keys->KeyLength[key_index]);
 
@@ -7842,36 +7842,36 @@
 
 		pRoamProfile->SSIDs.numOfSSIDs = 1;
 		pRoamProfile->SSIDs.SSIDList->SSID.length = ssid_len;
-		cdf_mem_zero(pRoamProfile->SSIDs.SSIDList->SSID.ssId,
+		qdf_mem_zero(pRoamProfile->SSIDs.SSIDList->SSID.ssId,
 			     sizeof(pRoamProfile->SSIDs.SSIDList->SSID.ssId));
-		cdf_mem_copy((void *)(pRoamProfile->SSIDs.SSIDList->SSID.ssId),
+		qdf_mem_copy((void *)(pRoamProfile->SSIDs.SSIDList->SSID.ssId),
 			     ssid, ssid_len);
 
 		if (bssid) {
 			pRoamProfile->BSSIDs.numOfBSSIDs = 1;
-			cdf_mem_copy((void *)(pRoamProfile->BSSIDs.bssid),
+			qdf_mem_copy((void *)(pRoamProfile->BSSIDs.bssid),
 				     bssid, QDF_MAC_ADDR_SIZE);
 			/* Save BSSID in seperate variable as well, as RoamProfile
 			   BSSID is getting zeroed out in the association process. And in
 			   case of join failure we should send valid BSSID to supplicant
 			 */
-			cdf_mem_copy((void *)(pWextState->req_bssId.bytes),
+			qdf_mem_copy((void *)(pWextState->req_bssId.bytes),
 					bssid, QDF_MAC_ADDR_SIZE);
 		} else if (bssid_hint) {
 			pRoamProfile->BSSIDs.numOfBSSIDs = 1;
-			cdf_mem_copy((void *)(pRoamProfile->BSSIDs.bssid),
+			qdf_mem_copy((void *)(pRoamProfile->BSSIDs.bssid),
 						bssid_hint, QDF_MAC_ADDR_SIZE);
 			/* Save BSSID in separate variable as well, as
 			   RoamProfile BSSID is getting zeroed out in the
 			   association process. And in case of join failure
 			   we should send valid BSSID to supplicant
 			 */
-			cdf_mem_copy((void *)(pWextState->req_bssId.bytes),
+			qdf_mem_copy((void *)(pWextState->req_bssId.bytes),
 					bssid_hint, QDF_MAC_ADDR_SIZE);
 			hddLog(LOGW, FL(" bssid_hint "MAC_ADDRESS_STR),
 					MAC_ADDR_ARRAY(bssid_hint));
 		} else {
-			cdf_mem_zero((void *)(pRoamProfile->BSSIDs.bssid),
+			qdf_mem_zero((void *)(pRoamProfile->BSSIDs.bssid),
 				     QDF_MAC_ADDR_SIZE);
 		}
 
@@ -8011,12 +8011,12 @@
 				return 0;
 		}
 
-		sme_config = cdf_mem_malloc(sizeof(*sme_config));
+		sme_config = qdf_mem_malloc(sizeof(*sme_config));
 		if (!sme_config) {
 			hdd_err("unable to allocate sme_config");
 			return -ENOMEM;
 		}
-		cdf_mem_zero(sme_config, sizeof(*sme_config));
+		qdf_mem_zero(sme_config, sizeof(*sme_config));
 		sme_get_config_param(pHddCtx->hHal, sme_config);
 		/* These values are not sessionized. So, any change in these SME
 		 * configs on an older or parallel interface will affect the
@@ -8028,7 +8028,7 @@
 		sme_config->csrConfig.channelBondingMode24GHz =
 			pHddCtx->config->nChannelBondingMode24GHz;
 		sme_update_config(pHddCtx->hHal, sme_config);
-		cdf_mem_free(sme_config);
+		qdf_mem_free(sme_config);
 
 		status = sme_roam_connect(WLAN_HDD_GET_HAL_CTX(pAdapter),
 					  pAdapter->sessionId, pRoamProfile,
@@ -8704,7 +8704,7 @@
 					hddLog(LOG1,
 						FL("setting default wep key, key_idx = %hu key_len %hu"),
 						key_idx, key_len);
-					cdf_mem_copy(&pWextState->roamProfile.
+					qdf_mem_copy(&pWextState->roamProfile.
 						     Keys.
 						     KeyMaterial[key_idx][0],
 						     req->key, key_len);
@@ -9224,7 +9224,7 @@
 	ENTER();
 
 	pWextState->wpaVersion = IW_AUTH_WPA_VERSION_DISABLED;
-	cdf_mem_zero(&pHddStaCtx->ibss_enc_key, sizeof(tCsrRoamSetKey));
+	qdf_mem_zero(&pHddStaCtx->ibss_enc_key, sizeof(tCsrRoamSetKey));
 	pHddStaCtx->ibss_enc_key_installed = 0;
 
 	if (params->ie_len && (NULL != params->ie)) {
@@ -9425,7 +9425,7 @@
 				FL("ccmCfgStInt failed for WNI_CFG_IBSS_AUTO_BSSID"));
 			return -EIO;
 		}
-		cdf_mem_copy(bssid.bytes, params->bssid, QDF_MAC_ADDR_SIZE);
+		qdf_mem_copy(bssid.bytes, params->bssid, QDF_MAC_ADDR_SIZE);
 	} else if (pHddCtx->config->isCoalesingInIBSSAllowed == 0) {
 		if (sme_cfg_set_int(pHddCtx->hHal, WNI_CFG_IBSS_AUTO_BSSID, 0)
 				== QDF_STATUS_E_FAILURE) {
@@ -9869,7 +9869,7 @@
 				if ((pAdapter->aStaInfo[i].isUsed) &&
 				    (!pAdapter->aStaInfo[i].
 				     isDeauthInProgress)) {
-					cdf_mem_copy(
+					qdf_mem_copy(
 						mac,
 						pAdapter->aStaInfo[i].
 							macAddrSTA.bytes,
@@ -10162,8 +10162,8 @@
 
 	halHandle = WLAN_HDD_GET_HAL_CTX(pAdapter);
 
-	cdf_mem_copy(pmk_id.BSSID.bytes, pmksa->bssid, QDF_MAC_ADDR_SIZE);
-	cdf_mem_copy(pmk_id.PMKID, pmksa->pmkid, CSR_RSN_PMKID_SIZE);
+	qdf_mem_copy(pmk_id.BSSID.bytes, pmksa->bssid, QDF_MAC_ADDR_SIZE);
+	qdf_mem_copy(pmk_id.PMKID, pmksa->pmkid, CSR_RSN_PMKID_SIZE);
 
 	/* Add to the PMKSA ID Cache in CSR */
 	result = sme_roam_set_pmkid_cache(halHandle, pAdapter->sessionId,
@@ -10675,7 +10675,7 @@
 					MAC_ADDR_ARRAY(
 						params->mac_addrs[i].addr));
 
-				cdf_mem_copy(&pConfig->accept_mac[i],
+				qdf_mem_copy(&pConfig->accept_mac[i],
 					     params->mac_addrs[i].addr,
 					     sizeof(qcmacaddr));
 			}
@@ -10688,7 +10688,7 @@
 					MAC_ADDR_ARRAY(
 						params->mac_addrs[i].addr));
 
-				cdf_mem_copy(&pConfig->deny_mac[i],
+				qdf_mem_copy(&pConfig->deny_mac[i],
 					     params->mac_addrs[i].addr,
 					     sizeof(qcmacaddr));
 			}
@@ -10853,20 +10853,20 @@
 			return -EINVAL;
 
 		hb_params =
-			(tSirLPHBReq *) cdf_mem_malloc(sizeof(tSirLPHBReq));
+			(tSirLPHBReq *) qdf_mem_malloc(sizeof(tSirLPHBReq));
 		if (NULL == hb_params) {
 			hddLog(LOGE, FL("Request Buffer Alloc Fail"));
 			return -ENOMEM;
 		}
 
-		cdf_mem_copy(hb_params, buf, buf_len);
+		qdf_mem_copy(hb_params, buf, buf_len);
 		smeStatus =
 			sme_lphb_config_req((tHalHandle) (pHddCtx->hHal),
 					    hb_params,
 					    wlan_hdd_cfg80211_lphb_ind_handler);
 		if (QDF_STATUS_SUCCESS != smeStatus) {
 			hddLog(LOGE, "LPHB Config Fail, disable");
-			cdf_mem_free(hb_params);
+			qdf_mem_free(hb_params);
 		}
 		return 0;
 	}
@@ -11016,7 +11016,7 @@
 		return status;
 	}
 
-	cdf_mem_zero(&sme_config, sizeof(tSmeConfigParams));
+	qdf_mem_zero(&sme_config, sizeof(tSmeConfigParams));
 	sme_get_config_param(pHddCtx->hHal, &sme_config);
 	switch (chandef->width) {
 	case NL80211_CHAN_WIDTH_20:
diff --git a/core/hdd/src/wlan_hdd_conc_ut.c b/core/hdd/src/wlan_hdd_conc_ut.c
index 1a9354e..8b7882e 100644
--- a/core/hdd/src/wlan_hdd_conc_ut.c
+++ b/core/hdd/src/wlan_hdd_conc_ut.c
@@ -151,7 +151,7 @@
 {
 	uint32_t idx = 0;
 	while (idx < NUMBER_OF_SCENARIO) {
-		cdf_mem_zero(&report[idx], sizeof(struct report_t));
+		qdf_mem_zero(&report[idx], sizeof(struct report_t));
 		idx++;
 	}
 	report_idx = 0;
@@ -229,12 +229,12 @@
 		MAX_ALLOWED_CHAR_IN_REPORT,
 		reason);
 	if (pcl) {
-		cdf_mem_zero(report[report_idx].pcl,
+		qdf_mem_zero(report[report_idx].pcl,
 				sizeof(report[report_idx].pcl));
 		for (i = 0; i < MAX_NUM_CHAN; i++) {
 			if (pcl[i] == 0)
 				break;
-			cdf_mem_zero(buf, sizeof(buf));
+			qdf_mem_zero(buf, sizeof(buf));
 			snprintf(buf, sizeof(buf), "%d ", pcl[i]);
 			strlcat(report[report_idx].pcl, buf,
 				sizeof(report[report_idx].pcl));
@@ -646,7 +646,7 @@
 				FL("Test failed - No. of connection is not 0"));
 			return;
 		}
-		cdf_mem_zero(pcl, sizeof(pcl));
+		qdf_mem_zero(pcl, sizeof(pcl));
 		pcl_len = 0;
 		pcl_type = get_pcl_from_first_conn_table(sub_type, system_pref);
 
@@ -717,7 +717,7 @@
 				next_sub_type++;
 				continue;
 			}
-			cdf_mem_zero(pcl, sizeof(pcl));
+			qdf_mem_zero(pcl, sizeof(pcl));
 			pcl_len = 0;
 			pcl_type = get_pcl_from_second_conn_table(second_index,
 					next_sub_type, system_pref,
@@ -830,7 +830,7 @@
 					next_sub_type++;
 					continue;
 				}
-				cdf_mem_zero(pcl, sizeof(pcl));
+				qdf_mem_zero(pcl, sizeof(pcl));
 				pcl_len = 0;
 				pcl_type =
 					get_pcl_from_third_conn_table(
diff --git a/core/hdd/src/wlan_hdd_debugfs.c b/core/hdd/src/wlan_hdd_debugfs.c
index 80a18dd..bf2239d 100644
--- a/core/hdd/src/wlan_hdd_debugfs.c
+++ b/core/hdd/src/wlan_hdd_debugfs.c
@@ -349,7 +349,7 @@
 
 	/* Get command from user */
 	if (count <= MAX_USER_COMMAND_SIZE_FRAME)
-		cmd = cdf_mem_malloc(count + 1);
+		cmd = qdf_mem_malloc(count + 1);
 	else {
 		QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR,
 			  "%s: Command length is larger than %d bytes.",
@@ -365,7 +365,7 @@
 	}
 
 	if (copy_from_user(cmd, buf, count)) {
-		cdf_mem_free(cmd);
+		qdf_mem_free(cmd);
 		return -EFAULT;
 	}
 	cmd[count] = '\0';
@@ -396,11 +396,11 @@
 	/* Delete pattern using index if duration is 0 */
 	if (!pattern_duration) {
 		delPeriodicTxPtrnParams =
-			cdf_mem_malloc(sizeof(tSirDelPeriodicTxPtrn));
+			qdf_mem_malloc(sizeof(tSirDelPeriodicTxPtrn));
 		if (!delPeriodicTxPtrnParams) {
 			QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR,
 				  FL("Memory allocation failed!"));
-			cdf_mem_free(cmd);
+			qdf_mem_free(cmd);
 			return -ENOMEM;
 		}
 		delPeriodicTxPtrnParams->ucPtrnId = pattern_idx;
@@ -416,11 +416,11 @@
 				  "%s: sme_del_periodic_tx_ptrn() failed!",
 				  __func__);
 
-			cdf_mem_free(delPeriodicTxPtrnParams);
+			qdf_mem_free(delPeriodicTxPtrnParams);
 			goto failure;
 		}
-		cdf_mem_free(cmd);
-		cdf_mem_free(delPeriodicTxPtrnParams);
+		qdf_mem_free(cmd);
+		qdf_mem_free(delPeriodicTxPtrnParams);
 		return count;
 	}
 
@@ -462,11 +462,11 @@
 		goto failure;
 	}
 
-	addPeriodicTxPtrnParams = cdf_mem_malloc(sizeof(tSirAddPeriodicTxPtrn));
+	addPeriodicTxPtrnParams = qdf_mem_malloc(sizeof(tSirAddPeriodicTxPtrn));
 	if (!addPeriodicTxPtrnParams) {
 		QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR,
 			  FL("Memory allocation failed!"));
-		cdf_mem_free(cmd);
+		qdf_mem_free(cmd);
 		return -ENOMEM;
 	}
 
@@ -493,16 +493,16 @@
 		QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR,
 			  "%s: sme_add_periodic_tx_ptrn() failed!", __func__);
 
-		cdf_mem_free(addPeriodicTxPtrnParams);
+		qdf_mem_free(addPeriodicTxPtrnParams);
 		goto failure;
 	}
-	cdf_mem_free(cmd);
-	cdf_mem_free(addPeriodicTxPtrnParams);
+	qdf_mem_free(cmd);
+	qdf_mem_free(addPeriodicTxPtrnParams);
 	EXIT();
 	return count;
 
 failure:
-	cdf_mem_free(cmd);
+	qdf_mem_free(cmd);
 	return -EINVAL;
 }
 
diff --git a/core/hdd/src/wlan_hdd_ext_scan.c b/core/hdd/src/wlan_hdd_ext_scan.c
index f95bebb..8cd8b41 100644
--- a/core/hdd/src/wlan_hdd_ext_scan.c
+++ b/core/hdd/src/wlan_hdd_ext_scan.c
@@ -1733,9 +1733,9 @@
 		return -EINVAL;
 	}
 
-	pReqMsg = cdf_mem_malloc(sizeof(*pReqMsg));
+	pReqMsg = qdf_mem_malloc(sizeof(*pReqMsg));
 	if (!pReqMsg) {
-		hddLog(LOGE, FL("cdf_mem_malloc failed"));
+		hddLog(LOGE, FL("qdf_mem_malloc failed"));
 		return -ENOMEM;
 	}
 
@@ -1778,7 +1778,7 @@
 	EXIT();
 	return ret;
 fail:
-	cdf_mem_free(pReqMsg);
+	qdf_mem_free(pReqMsg);
 	return -EINVAL;
 }
 
@@ -1867,9 +1867,9 @@
 		return -EINVAL;
 	}
 
-	pReqMsg = cdf_mem_malloc(sizeof(*pReqMsg));
+	pReqMsg = qdf_mem_malloc(sizeof(*pReqMsg));
 	if (!pReqMsg) {
-		hddLog(LOGE, FL("cdf_mem_malloc failed"));
+		hddLog(LOGE, FL("qdf_mem_malloc failed"));
 		return -ENOMEM;
 	}
 
@@ -1923,7 +1923,7 @@
 	return retval;
 
 fail:
-	cdf_mem_free(pReqMsg);
+	qdf_mem_free(pReqMsg);
 	return -EINVAL;
 }
 /*
@@ -2015,9 +2015,9 @@
 		return -EINVAL;
 	}
 
-	pReqMsg = cdf_mem_malloc(sizeof(*pReqMsg));
+	pReqMsg = qdf_mem_malloc(sizeof(*pReqMsg));
 	if (!pReqMsg) {
-		hddLog(LOGE, FL("cdf_mem_malloc failed"));
+		hddLog(LOGE, FL("qdf_mem_malloc failed"));
 		return -ENOMEM;
 	}
 
@@ -2136,7 +2136,7 @@
 	return retval;
 
 fail:
-	cdf_mem_free(pReqMsg);
+	qdf_mem_free(pReqMsg);
 	return -EINVAL;
 }
 
@@ -2212,9 +2212,9 @@
 		return -EINVAL;
 	}
 
-	pReqMsg = cdf_mem_malloc(sizeof(*pReqMsg));
+	pReqMsg = qdf_mem_malloc(sizeof(*pReqMsg));
 	if (!pReqMsg) {
-		hddLog(LOGE, FL("cdf_mem_malloc failed"));
+		hddLog(LOGE, FL("qdf_mem_malloc failed"));
 		return -ENOMEM;
 	}
 
@@ -2333,7 +2333,7 @@
 	if (!QDF_IS_STATUS_SUCCESS(status)) {
 		hddLog(LOGE,
 		       FL("sme_set_significant_change failed(err=%d)"), status);
-		cdf_mem_free(pReqMsg);
+		qdf_mem_free(pReqMsg);
 		return -EINVAL;
 	}
 
@@ -2356,7 +2356,7 @@
 	return retval;
 
 fail:
-	cdf_mem_free(pReqMsg);
+	qdf_mem_free(pReqMsg);
 	return -EINVAL;
 }
 
@@ -3159,7 +3159,7 @@
 		return -EINVAL;
 	}
 
-	pReqMsg = cdf_mem_malloc(sizeof(*pReqMsg));
+	pReqMsg = qdf_mem_malloc(sizeof(*pReqMsg));
 	if (!pReqMsg) {
 		hddLog(LOGE, FL("memory allocation failed"));
 		return -ENOMEM;
@@ -3279,7 +3279,7 @@
 	return retval;
 
 fail:
-	cdf_mem_free(pReqMsg);
+	qdf_mem_free(pReqMsg);
 	return -EINVAL;
 }
 /*
@@ -3369,9 +3369,9 @@
 		return -EINVAL;
 	}
 
-	pReqMsg = cdf_mem_malloc(sizeof(*pReqMsg));
+	pReqMsg = qdf_mem_malloc(sizeof(*pReqMsg));
 	if (!pReqMsg) {
-		hddLog(LOGE, FL("cdf_mem_malloc failed"));
+		hddLog(LOGE, FL("qdf_mem_malloc failed"));
 		return -ENOMEM;
 	}
 
@@ -3418,7 +3418,7 @@
 	return retval;
 
 fail:
-	cdf_mem_free(pReqMsg);
+	qdf_mem_free(pReqMsg);
 	return -EINVAL;
 }
 /*
@@ -3496,9 +3496,9 @@
 		return -EINVAL;
 	}
 
-	pReqMsg = cdf_mem_malloc(sizeof(*pReqMsg));
+	pReqMsg = qdf_mem_malloc(sizeof(*pReqMsg));
 	if (!pReqMsg) {
-		hddLog(LOGE, FL("cdf_mem_malloc failed"));
+		hddLog(LOGE, FL("qdf_mem_malloc failed"));
 		return -ENOMEM;
 	}
 
@@ -3547,7 +3547,7 @@
 	return retval;
 
 fail:
-	cdf_mem_free(pReqMsg);
+	qdf_mem_free(pReqMsg);
 	return -EINVAL;
 }
 
@@ -3621,9 +3621,9 @@
 		return -EINVAL;
 	}
 
-	pReqMsg = cdf_mem_malloc(sizeof(*pReqMsg));
+	pReqMsg = qdf_mem_malloc(sizeof(*pReqMsg));
 	if (!pReqMsg) {
-		hddLog(LOGE, FL("cdf_mem_malloc failed"));
+		hddLog(LOGE, FL("qdf_mem_malloc failed"));
 		return -ENOMEM;
 	}
 
@@ -3650,7 +3650,7 @@
 	if (!QDF_IS_STATUS_SUCCESS(status)) {
 		hddLog(LOGE, FL("sme_reset_significant_change failed(err=%d)"),
 			status);
-		cdf_mem_free(pReqMsg);
+		qdf_mem_free(pReqMsg);
 		return -EINVAL;
 	}
 
@@ -3673,7 +3673,7 @@
 	return retval;
 
 fail:
-	cdf_mem_free(pReqMsg);
+	qdf_mem_free(pReqMsg);
 	return -EINVAL;
 }
 
@@ -3749,7 +3749,7 @@
 		req_msg->networks[index].ssid.length = ssid_len;
 		hddLog(LOG1, FL("network ssid length %d"), ssid_len);
 		ssid = nla_data(network[QCA_WLAN_VENDOR_ATTR_PNO_SET_LIST_PARAM_EPNO_NETWORK_SSID]);
-		cdf_mem_copy(req_msg->networks[index].ssid.ssId,
+		qdf_mem_copy(req_msg->networks[index].ssid.ssId,
 				ssid, ssid_len);
 		hddLog(LOG1, FL("Ssid (%.*s)"),
 			req_msg->networks[index].ssid.length,
@@ -3845,12 +3845,12 @@
 
 	len = sizeof(*req_msg) +
 		(num_networks * sizeof(struct wifi_epno_network));
-	req_msg = cdf_mem_malloc(len);
+	req_msg = qdf_mem_malloc(len);
 	if (!req_msg) {
-		hddLog(LOGE, FL("cdf_mem_malloc failed"));
+		hddLog(LOGE, FL("qdf_mem_malloc failed"));
 		return -ENOMEM;
 	}
-	cdf_mem_zero(req_msg, len);
+	qdf_mem_zero(req_msg, len);
 	req_msg->num_networks = num_networks;
 
 	/* Parse and fetch request Id */
@@ -3875,11 +3875,11 @@
 	}
 
 	EXIT();
-	cdf_mem_free(req_msg);
+	qdf_mem_free(req_msg);
 	return 0;
 
 fail:
-	cdf_mem_free(req_msg);
+	qdf_mem_free(req_msg);
 	return -EINVAL;
 }
 
@@ -3962,7 +3962,7 @@
 			hddLog(LOGE, FL("Invalid realm size %d"), len);
 			return -EINVAL;
 		}
-		cdf_mem_copy(req_msg->networks[index].realm,
+		qdf_mem_copy(req_msg->networks[index].realm,
 				nla_data(network[QCA_WLAN_VENDOR_ATTR_PNO_PASSPOINT_NETWORK_PARAM_REALM]),
 				len);
 		hddLog(LOG1, FL("realm len %d"), len);
@@ -4048,10 +4048,10 @@
 		tb[QCA_WLAN_VENDOR_ATTR_PNO_PASSPOINT_LIST_PARAM_NUM]);
 	hddLog(LOG1, FL("num networks %u"), num_networks);
 
-	req_msg = cdf_mem_malloc(sizeof(*req_msg) +
+	req_msg = qdf_mem_malloc(sizeof(*req_msg) +
 			(num_networks * sizeof(req_msg->networks[0])));
 	if (!req_msg) {
-		hddLog(LOGE, FL("cdf_mem_malloc failed"));
+		hddLog(LOGE, FL("qdf_mem_malloc failed"));
 		return -ENOMEM;
 	}
 	req_msg->num_networks = num_networks;
@@ -4079,11 +4079,11 @@
 	}
 
 	EXIT();
-	cdf_mem_free(req_msg);
+	qdf_mem_free(req_msg);
 	return 0;
 
 fail:
-	cdf_mem_free(req_msg);
+	qdf_mem_free(req_msg);
 	return -EINVAL;
 }
 
@@ -4155,9 +4155,9 @@
 		return -EINVAL;
 	}
 
-	req_msg = cdf_mem_malloc(sizeof(*req_msg));
+	req_msg = qdf_mem_malloc(sizeof(*req_msg));
 	if (!req_msg) {
-		hddLog(LOGE, FL("cdf_mem_malloc failed"));
+		hddLog(LOGE, FL("qdf_mem_malloc failed"));
 		return -ENOMEM;
 	}
 
@@ -4181,11 +4181,11 @@
 	}
 
 	EXIT();
-	cdf_mem_free(req_msg);
+	qdf_mem_free(req_msg);
 	return 0;
 
 fail:
-	cdf_mem_free(req_msg);
+	qdf_mem_free(req_msg);
 	return -EINVAL;
 }
 
@@ -4286,9 +4286,9 @@
 		return -EINVAL;
 	}
 
-	request = cdf_mem_malloc(sizeof(*request));
+	request = qdf_mem_malloc(sizeof(*request));
 	if (!request) {
-		hddLog(LOGE, FL("cdf_mem_malloc failed"));
+		hddLog(LOGE, FL("qdf_mem_malloc failed"));
 		return -ENOMEM;
 	}
 
@@ -4390,7 +4390,7 @@
 		goto fail;
 	}
 
-	cdf_mem_free(request);
+	qdf_mem_free(request);
 
 	/* request was sent -- wait for the response */
 	rc = wait_for_completion_timeout(&context->response_event,
@@ -4411,7 +4411,7 @@
 	return retval;
 
 fail:
-	cdf_mem_free(request);
+	qdf_mem_free(request);
 	return -EINVAL;
 }
 
@@ -4506,9 +4506,9 @@
 		return -EINVAL;
 	}
 
-	request = cdf_mem_malloc(sizeof(*request));
+	request = qdf_mem_malloc(sizeof(*request));
 	if (!request) {
-		hddLog(LOGE, FL("cdf_mem_malloc failed"));
+		hddLog(LOGE, FL("qdf_mem_malloc failed"));
 		return -ENOMEM;
 	}
 
@@ -4540,7 +4540,7 @@
 		goto fail;
 	}
 
-	cdf_mem_free(request);
+	qdf_mem_free(request);
 
 	/* request was sent -- wait for the response */
 	rc = wait_for_completion_timeout(&context->response_event,
@@ -4561,7 +4561,7 @@
 	return retval;
 
 fail:
-	cdf_mem_free(request);
+	qdf_mem_free(request);
 	return -EINVAL;
 }
 
diff --git a/core/hdd/src/wlan_hdd_ftm.c b/core/hdd/src/wlan_hdd_ftm.c
index 8b33ca8..5a30293 100644
--- a/core/hdd/src/wlan_hdd_ftm.c
+++ b/core/hdd/src/wlan_hdd_ftm.c
@@ -281,7 +281,7 @@
 #endif /* QCA_WIFI_FTM */
 
 	/*Open the WMA module */
-	cdf_mem_set(&mac_openParms, sizeof(mac_openParms), 0);
+	qdf_mem_set(&mac_openParms, sizeof(mac_openParms), 0);
 	mac_openParms.driverType = eDRIVER_TYPE_MFG;
 
 	hdd_ctx = (hdd_context_t *) (gp_cds_context->pHDDContext);
@@ -1019,7 +1019,7 @@
 	struct ar6k_testmode_cmd_data *cmd_data;
 
 	cmd_data = (struct ar6k_testmode_cmd_data *)
-		   cdf_mem_malloc(sizeof(*cmd_data));
+		   qdf_mem_malloc(sizeof(*cmd_data));
 
 	if (!cmd_data) {
 		QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR,
@@ -1027,21 +1027,21 @@
 		return QDF_STATUS_E_NOMEM;
 	}
 
-	cmd_data->data = cdf_mem_malloc(len);
+	cmd_data->data = qdf_mem_malloc(len);
 
 	if (!cmd_data->data) {
 		QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR,
 			  ("Failed to allocate FTM command data buffer"));
-		cdf_mem_free(cmd_data);
+		qdf_mem_free(cmd_data);
 		return QDF_STATUS_E_NOMEM;
 	}
 
 	cmd_data->len = len;
-	cdf_mem_copy(cmd_data->data, data, len);
+	qdf_mem_copy(cmd_data->data, data, len);
 
 	if (wlan_ftm_postmsg((uint8_t *) cmd_data, sizeof(*cmd_data))) {
-		cdf_mem_free(cmd_data->data);
-		cdf_mem_free(cmd_data);
+		qdf_mem_free(cmd_data->data);
+		qdf_mem_free(cmd_data);
 		return QDF_STATUS_E_FAILURE;
 	}
 
diff --git a/core/hdd/src/wlan_hdd_green_ap.c b/core/hdd/src/wlan_hdd_green_ap.c
index 7149bb4..5fbb8e4 100644
--- a/core/hdd/src/wlan_hdd_green_ap.c
+++ b/core/hdd/src/wlan_hdd_green_ap.c
@@ -311,14 +311,14 @@
 
 	ENTER();
 
-	green_ap = cdf_mem_malloc(sizeof(*green_ap));
+	green_ap = qdf_mem_malloc(sizeof(*green_ap));
 	if (!green_ap) {
 		hdd_alert("Memory allocation for Green-AP failed!");
 		status = QDF_STATUS_E_NOMEM;
 		goto error;
 	}
 
-	cdf_mem_zero(green_ap, sizeof(*green_ap));
+	qdf_mem_zero(green_ap, sizeof(*green_ap));
 	green_ap->ps_state = GREEN_AP_PS_OFF_STATE;
 	green_ap->ps_event = 0;
 	green_ap->num_nodes = 0;
@@ -365,8 +365,8 @@
 		hdd_notice("Cannot deallocate Green-AP's timer");
 
 	/* release memory */
-	cdf_mem_zero(green_ap, sizeof(*green_ap));
-	cdf_mem_free(green_ap);
+	qdf_mem_zero(green_ap, sizeof(*green_ap));
+	qdf_mem_free(green_ap);
 	hdd_ctx->green_ap_ctx = NULL;
 
 done:
diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c
index bab97b7..b181351 100644
--- a/core/hdd/src/wlan_hdd_hostapd.c
+++ b/core/hdd/src/wlan_hdd_hostapd.c
@@ -1572,7 +1572,7 @@
 			pSapEvent->sapevt.sapPBCProbeReqEvent.
 			WPSPBCProbeReq.probeReqIELen;
 
-		cdf_mem_copy(pHddApCtx->WPSPBCProbeReq.probeReqIE,
+		qdf_mem_copy(pHddApCtx->WPSPBCProbeReq.probeReqIE,
 			     pSapEvent->sapevt.sapPBCProbeReqEvent.
 			     WPSPBCProbeReq.probeReqIE,
 			     pHddApCtx->WPSPBCProbeReq.probeReqIELen);
@@ -1608,7 +1608,7 @@
 				pAssocStasArray++;
 			}
 		}
-		cdf_mem_free(pSapEvent->sapevt.sapAssocStaListEvent.pAssocStas);        /* Release caller allocated memory here */
+		qdf_mem_free(pSapEvent->sapevt.sapAssocStaListEvent.pAssocStas);        /* Release caller allocated memory here */
 		pSapEvent->sapevt.sapAssocStaListEvent.pAssocStas = NULL;
 		return QDF_STATUS_SUCCESS;
 	case eSAP_REMAIN_CHAN_READY:
@@ -2269,7 +2269,7 @@
 #else
 	p_cds_gctx = (WLAN_HDD_GET_CTX(pHostapdAdapter))->pcds_context;
 #endif
-	cdf_mem_zero(&MacList[0], sizeof(MacList));
+	qdf_mem_zero(&MacList[0], sizeof(MacList));
 	if (QDF_STATUS_SUCCESS == wlansap_get_acl_mode(p_cds_gctx, &acl_mode)) {
 		pr_info("******** ACL MODE *********\n");
 		switch (acl_mode) {
@@ -3854,7 +3854,7 @@
 
 	WPSPBCProbeReqIEs.probeReqIELen =
 		pHddApCtx->WPSPBCProbeReq.probeReqIELen;
-	cdf_mem_copy(&WPSPBCProbeReqIEs.probeReqIE,
+	qdf_mem_copy(&WPSPBCProbeReqIEs.probeReqIE,
 		     pHddApCtx->WPSPBCProbeReq.probeReqIE,
 		     WPSPBCProbeReqIEs.probeReqIELen);
 	qdf_copy_macaddr(&WPSPBCProbeReqIEs.macaddr,
@@ -4024,13 +4024,13 @@
 	if (!ext->key_len)
 		return ret;
 
-	cdf_mem_zero(&setKey, sizeof(tCsrRoamSetKey));
+	qdf_mem_zero(&setKey, sizeof(tCsrRoamSetKey));
 
 	setKey.keyId = key_index;
 	setKey.keyLength = ext->key_len;
 
 	if (ext->key_len <= CSR_MAX_KEY_LEN) {
-		cdf_mem_copy(&setKey.Key[0], ext->key, ext->key_len);
+		qdf_mem_copy(&setKey.Key[0], ext->key, ext->key_len);
 	}
 
 	if (ext->ext_flags & IW_ENCODE_EXT_GROUP_KEY) {
@@ -4040,12 +4040,12 @@
 	} else {
 
 		setKey.keyDirection = eSIR_TX_RX;
-		cdf_mem_copy(setKey.peerMac.bytes, ext->addr.sa_data,
+		qdf_mem_copy(setKey.peerMac.bytes, ext->addr.sa_data,
 			     QDF_MAC_ADDR_SIZE);
 	}
 	if (ext->ext_flags & IW_ENCODE_EXT_SET_TX_KEY) {
 		setKey.keyDirection = eSIR_TX_DEFAULT;
-		cdf_mem_copy(setKey.peerMac.bytes, ext->addr.sa_data,
+		qdf_mem_copy(setKey.peerMac.bytes, ext->addr.sa_data,
 			     QDF_MAC_ADDR_SIZE);
 	}
 
@@ -4071,7 +4071,7 @@
 
 		setKey.encType = eCSR_ENCRYPT_TYPE_TKIP;
 
-		cdf_mem_zero(pKey, CSR_MAX_KEY_LEN);
+		qdf_mem_zero(pKey, CSR_MAX_KEY_LEN);
 
 		/*Supplicant sends the 32bytes key in this order
 
@@ -4089,13 +4089,13 @@
 		   <---16bytes---><--8bytes--><--8bytes-->
 		 */
 		/* Copy the Temporal Key 1 (TK1) */
-		cdf_mem_copy(pKey, ext->key, 16);
+		qdf_mem_copy(pKey, ext->key, 16);
 
 		/*Copy the rx mic first */
-		cdf_mem_copy(&pKey[16], &ext->key[24], 8);
+		qdf_mem_copy(&pKey[16], &ext->key[24], 8);
 
 		/*Copy the tx mic */
-		cdf_mem_copy(&pKey[24], &ext->key[16], 8);
+		qdf_mem_copy(&pKey[24], &ext->key[16], 8);
 
 	}
 	break;
@@ -4494,13 +4494,13 @@
 
 	fwps_genie = wps_genie;
 
-	pSap_WPSIe = cdf_mem_malloc(sizeof(tSap_WPSIE));
+	pSap_WPSIe = qdf_mem_malloc(sizeof(tSap_WPSIE));
 	if (NULL == pSap_WPSIe) {
 		hddLog(LOGE, "CDF unable to allocate memory");
 		kfree(fwps_genie);
 		return -ENOMEM;
 	}
-	cdf_mem_zero(pSap_WPSIe, sizeof(tSap_WPSIE));
+	qdf_mem_zero(pSap_WPSIe, sizeof(tSap_WPSIE));
 
 	hddLog(LOG1, FL("WPS IE type[0x%X] IE[0x%X], LEN[%d]"),
 		wps_genie[0], wps_genie[1], wps_genie[2]);
@@ -4511,7 +4511,7 @@
 		switch (wps_genie[0]) {
 		case DOT11F_EID_WPA:
 			if (wps_genie[1] < 2 + 4) {
-				cdf_mem_free(pSap_WPSIe);
+				qdf_mem_free(pSap_WPSIe);
 				kfree(fwps_genie);
 				return -EINVAL;
 			} else if (memcmp(&wps_genie[2],
@@ -4623,7 +4623,7 @@
 						pos += 2;
 						length = *pos << 8 | *(pos + 1);
 						pos += 2;
-						cdf_mem_copy(pSap_WPSIe->
+						qdf_mem_copy(pSap_WPSIe->
 							     sapwpsie.
 							     sapWPSBeaconIE.
 							     UUID_E, pos,
@@ -4654,7 +4654,7 @@
 						       "UNKNOWN TLV in WPS IE(%x)",
 						       (*pos << 8 |
 							*(pos + 1)));
-						cdf_mem_free(pSap_WPSIe);
+						qdf_mem_free(pSap_WPSIe);
 						kfree(fwps_genie);
 						return -EINVAL;
 					}
@@ -4667,7 +4667,7 @@
 
 		default:
 			hddLog(LOGE, FL("Set UNKNOWN IE %X"), wps_genie[0]);
-			cdf_mem_free(pSap_WPSIe);
+			qdf_mem_free(pSap_WPSIe);
 			kfree(fwps_genie);
 			return 0;
 		}
@@ -4677,7 +4677,7 @@
 		switch (wps_genie[0]) {
 		case DOT11F_EID_WPA:
 			if (wps_genie[1] < 2 + 4) {
-				cdf_mem_free(pSap_WPSIe);
+				qdf_mem_free(pSap_WPSIe);
 				kfree(fwps_genie);
 				return -EINVAL;
 			} else if (memcmp(&wps_genie[2], "\x00\x50\xf2\x04", 4)
@@ -4806,7 +4806,7 @@
 						pos += 2;
 						length = *pos << 8 | *(pos + 1);
 						pos += 2;
-						cdf_mem_copy(pSap_WPSIe->
+						qdf_mem_copy(pSap_WPSIe->
 							     sapwpsie.
 							     sapWPSProbeRspIE.
 							     UUID_E, pos,
@@ -4826,7 +4826,7 @@
 						sapWPSProbeRspIE.
 						Manufacture.num_name =
 							length;
-						cdf_mem_copy(pSap_WPSIe->
+						qdf_mem_copy(pSap_WPSIe->
 							     sapwpsie.
 							     sapWPSProbeRspIE.
 							     Manufacture.name,
@@ -4845,7 +4845,7 @@
 						pSap_WPSIe->sapwpsie.
 						sapWPSProbeRspIE.ModelName.
 						num_text = length;
-						cdf_mem_copy(pSap_WPSIe->
+						qdf_mem_copy(pSap_WPSIe->
 							     sapwpsie.
 							     sapWPSProbeRspIE.
 							     ModelName.text,
@@ -4864,7 +4864,7 @@
 						sapWPSProbeRspIE.
 						ModelNumber.num_text =
 							length;
-						cdf_mem_copy(pSap_WPSIe->
+						qdf_mem_copy(pSap_WPSIe->
 							     sapwpsie.
 							     sapWPSProbeRspIE.
 							     ModelNumber.text,
@@ -4883,7 +4883,7 @@
 						sapWPSProbeRspIE.
 						SerialNumber.num_text =
 							length;
-						cdf_mem_copy(pSap_WPSIe->
+						qdf_mem_copy(pSap_WPSIe->
 							     sapwpsie.
 							     sapWPSProbeRspIE.
 							     SerialNumber.text,
@@ -4907,7 +4907,7 @@
 						       PrimaryDeviceCategory);
 						pos += 2;
 
-						cdf_mem_copy(pSap_WPSIe->
+						qdf_mem_copy(pSap_WPSIe->
 							     sapwpsie.
 							     sapWPSProbeRspIE.
 							     PrimaryDeviceOUI,
@@ -4940,7 +4940,7 @@
 						pSap_WPSIe->sapwpsie.
 						sapWPSProbeRspIE.DeviceName.
 						num_text = length;
-						cdf_mem_copy(pSap_WPSIe->
+						qdf_mem_copy(pSap_WPSIe->
 							     sapwpsie.
 							     sapWPSProbeRspIE.
 							     DeviceName.text,
@@ -5008,7 +5008,7 @@
 #endif
 	}
 
-	cdf_mem_free(pSap_WPSIe);
+	qdf_mem_free(pSap_WPSIe);
 	kfree(fwps_genie);
 	EXIT();
 	return cdf_ret_status;
@@ -6088,8 +6088,8 @@
 		       FL("WMI_PDEV_PARAM_BURST_ENABLE set failed %d"), ret);
 	}
 	pAdapter->sessionCtx.ap.sapConfig.acs_cfg.acs_mode = false;
-	cdf_mem_free(pAdapter->sessionCtx.ap.sapConfig.acs_cfg.ch_list);
-	cdf_mem_zero(&pAdapter->sessionCtx.ap.sapConfig.acs_cfg,
+	qdf_mem_free(pAdapter->sessionCtx.ap.sapConfig.acs_cfg.ch_list);
+	qdf_mem_zero(&pAdapter->sessionCtx.ap.sapConfig.acs_cfg,
 						sizeof(struct sap_acs_cfg));
 	return status;
 
@@ -6138,7 +6138,7 @@
 		ether_setup(pWlanHostapdDev);
 
 		/* Initialize the adapter context to zeros. */
-		cdf_mem_zero(pHostapdAdapter, sizeof(hdd_adapter_t));
+		qdf_mem_zero(pHostapdAdapter, sizeof(hdd_adapter_t));
 		pHostapdAdapter->dev = pWlanHostapdDev;
 		pHostapdAdapter->pHddCtx = pHddCtx;
 		pHostapdAdapter->magic = WLAN_HDD_ADAPTER_MAGIC;
@@ -6159,9 +6159,9 @@
 		pWlanHostapdDev->mtu = HDD_DEFAULT_MTU;
 		pWlanHostapdDev->tx_queue_len = HDD_NETDEV_TX_QUEUE_LEN;
 
-		cdf_mem_copy(pWlanHostapdDev->dev_addr, (void *)macAddr,
+		qdf_mem_copy(pWlanHostapdDev->dev_addr, (void *)macAddr,
 			     sizeof(tSirMacAddr));
-		cdf_mem_copy(pHostapdAdapter->macAddressCurrent.bytes,
+		qdf_mem_copy(pHostapdAdapter->macAddressCurrent.bytes,
 			     (void *)macAddr, sizeof(tSirMacAddr));
 
 		pHostapdAdapter->offloads_configured = false;
@@ -6305,7 +6305,7 @@
 	ie = wlan_hdd_cfg80211_get_ie_ptr(beacon->tail, beacon->tail_len,
 						WLAN_EID_HT_CAPABILITY);
 	if (ie && ie[1]) {
-		cdf_mem_copy(ht_cap_ie, &ie[2], DOT11F_IE_HTCAPS_MAX_LEN);
+		qdf_mem_copy(ht_cap_ie, &ie[2], DOT11F_IE_HTCAPS_MAX_LEN);
 		dot11f_unpack_ie_ht_caps((tpAniSirGlobal)hdd_ctx->hHal,
 					ht_cap_ie, ie[1], &dot11_ht_cap_ie);
 		return dot11_ht_cap_ie.supportedChannelWidthSet;
@@ -6464,7 +6464,7 @@
 			sap_config->channel = channel;
 			sap_config->ch_params.center_freq_seg1 = channel_seg2;
 
-			cdf_mem_zero(&smeConfig, sizeof(smeConfig));
+			qdf_mem_zero(&smeConfig, sizeof(smeConfig));
 			sme_get_config_param(pHddCtx->hHal, &smeConfig);
 			switch (channel_type) {
 			case NL80211_CHAN_HT20:
@@ -6590,7 +6590,7 @@
 	if (pIe) {
 		ielen = pIe[1] + 2;
 		if ((*total_ielen + ielen) <= MAX_GENIE_LEN) {
-			cdf_mem_copy(&genie[*total_ielen], pIe, ielen);
+			qdf_mem_copy(&genie[*total_ielen], pIe, ielen);
 		} else {
 			hddLog(LOGE,
 			       "**Ie Length is too big***");
@@ -6659,7 +6659,7 @@
 				!= 0)) {
 				ielen = ptr[1] + 2;
 				if ((*total_ielen + ielen) <= MAX_GENIE_LEN) {
-					cdf_mem_copy(&genie[*total_ielen], ptr,
+					qdf_mem_copy(&genie[*total_ielen], ptr,
 						     ielen);
 					*total_ielen += ielen;
 				} else {
@@ -6712,7 +6712,7 @@
 		if (temp_ie_id == elem_id) {
 			ielen = ptr[1] + 2;
 			if ((*total_ielen + ielen) <= MAX_GENIE_LEN) {
-				cdf_mem_copy(&genie[*total_ielen], ptr, ielen);
+				qdf_mem_copy(&genie[*total_ielen], ptr, ielen);
 				*total_ielen += ielen;
 			} else {
 				hddLog(LOGE,
@@ -6856,7 +6856,7 @@
 	pConfig = &adapter->sessionCtx.ap.sapConfig;
 	beacon = adapter->sessionCtx.ap.beacon;
 
-	genie = cdf_mem_malloc(MAX_GENIE_LEN);
+	genie = qdf_mem_malloc(MAX_GENIE_LEN);
 
 	if (genie == NULL)
 		return -ENOMEM;
@@ -6898,7 +6898,7 @@
 #ifdef QCA_HT_2040_COEX
 	if (WLAN_HDD_SOFTAP == adapter->device_mode) {
 		tSmeConfigParams smeConfig;
-		cdf_mem_zero(&smeConfig, sizeof(smeConfig));
+		qdf_mem_zero(&smeConfig, sizeof(smeConfig));
 		sme_get_config_param(WLAN_HDD_GET_HAL_CTX(adapter),
 				     &smeConfig);
 		if (smeConfig.csrConfig.obssEnabled)
@@ -6979,7 +6979,7 @@
 	}
 
 done:
-	cdf_mem_free(genie);
+	qdf_mem_free(genie);
 	return ret;
 }
 
@@ -7373,7 +7373,7 @@
 						     WLAN_EID_COUNTRY);
 		if (pIe) {
 			pConfig->ieee80211d = 1;
-			cdf_mem_copy(pConfig->countryCode, &pIe[2], 3);
+			qdf_mem_copy(pConfig->countryCode, &pIe[2], 3);
 			sme_set_reg_info(hHal, pConfig->countryCode);
 			sme_apply_channel_power_info_to_fw(hHal);
 		} else {
@@ -7566,7 +7566,7 @@
 	pConfig->SSIDinfo.ssidHidden = false;
 
 	if (ssid != NULL) {
-		cdf_mem_copy(pConfig->SSIDinfo.ssid.ssId, ssid, ssid_len);
+		qdf_mem_copy(pConfig->SSIDinfo.ssid.ssId, ssid, ssid_len);
 		pConfig->SSIDinfo.ssid.length = ssid_len;
 
 		switch (hidden_ssid) {
@@ -7589,7 +7589,7 @@
 		}
 	}
 
-	cdf_mem_copy(pConfig->self_macaddr.bytes,
+	qdf_mem_copy(pConfig->self_macaddr.bytes,
 		     pHostapdAdapter->macAddressCurrent.bytes,
 		     QDF_MAC_ADDR_SIZE);
 
@@ -7633,7 +7633,7 @@
 			pConfig->num_deny_mac = MAX_ACL_MAC_ADDRESS;
 		acl_entry = (struct qc_mac_acl_entry *)(pIe + 8);
 		for (i = 0; i < pConfig->num_deny_mac; i++) {
-			cdf_mem_copy(&pConfig->deny_mac[i], acl_entry->addr,
+			qdf_mem_copy(&pConfig->deny_mac[i], acl_entry->addr,
 				     sizeof(qcmacaddr));
 			acl_entry++;
 		}
@@ -7660,14 +7660,14 @@
 			pConfig->num_accept_mac = MAX_ACL_MAC_ADDRESS;
 		acl_entry = (struct qc_mac_acl_entry *)(pIe + 8);
 		for (i = 0; i < pConfig->num_accept_mac; i++) {
-			cdf_mem_copy(&pConfig->accept_mac[i], acl_entry->addr,
+			qdf_mem_copy(&pConfig->accept_mac[i], acl_entry->addr,
 				     sizeof(qcmacaddr));
 			acl_entry++;
 		}
 	}
 
 	wlan_hdd_set_sap_hwmode(pHostapdAdapter);
-	cdf_mem_zero(&sme_config, sizeof(tSmeConfigParams));
+	qdf_mem_zero(&sme_config, sizeof(tSmeConfigParams));
 	sme_get_config_param(pHddCtx->hHal, &sme_config);
 	/* Override hostapd.conf wmm_enabled only for 11n and 11AC configs (IOT)
 	 * As per spec 11N/AC STA are QOS STA and may not connect or throughput
@@ -7941,8 +7941,8 @@
 	}
 	pAdapter->sessionCtx.ap.sapConfig.acs_cfg.acs_mode = false;
 	if (pAdapter->sessionCtx.ap.sapConfig.acs_cfg.ch_list)
-		cdf_mem_free(pAdapter->sessionCtx.ap.sapConfig.acs_cfg.ch_list);
-	cdf_mem_zero(&pAdapter->sessionCtx.ap.sapConfig.acs_cfg,
+		qdf_mem_free(pAdapter->sessionCtx.ap.sapConfig.acs_cfg.ch_list);
+	qdf_mem_zero(&pAdapter->sessionCtx.ap.sapConfig.acs_cfg,
 						sizeof(struct sap_acs_cfg));
 	hdd_hostapd_stop(dev);
 
diff --git a/core/hdd/src/wlan_hdd_ioctl.c b/core/hdd/src/wlan_hdd_ioctl.c
index 27f74c7..215f804 100644
--- a/core/hdd/src/wlan_hdd_ioctl.c
+++ b/core/hdd/src/wlan_hdd_ioctl.c
@@ -162,7 +162,7 @@
 
 	/* copy over the tsm stats */
 	adapter->tsmStats.UplinkPktQueueDly = tsm_metrics.UplinkPktQueueDly;
-	cdf_mem_copy(adapter->tsmStats.UplinkPktQueueDlyHist,
+	qdf_mem_copy(adapter->tsmStats.UplinkPktQueueDlyHist,
 		     tsm_metrics.UplinkPktQueueDlyHist,
 		     sizeof(adapter->tsmStats.UplinkPktQueueDlyHist) /
 		     sizeof(adapter->tsmStats.UplinkPktQueueDlyHist[0]));
@@ -246,7 +246,7 @@
 	if (QDF_STATUS_SUCCESS == vstatus) {
 		tsm_metrics->UplinkPktQueueDly =
 			adapter->tsmStats.UplinkPktQueueDly;
-		cdf_mem_copy(tsm_metrics->UplinkPktQueueDlyHist,
+		qdf_mem_copy(tsm_metrics->UplinkPktQueueDlyHist,
 			     adapter->tsmStats.UplinkPktQueueDlyHist,
 			     sizeof(adapter->tsmStats.UplinkPktQueueDlyHist) /
 			     sizeof(adapter->tsmStats.
@@ -472,7 +472,7 @@
 	 * For example, if N = 18, then (18 + 1)/2 = 9 bytes are enough.
 	 * If N = 19, then we need 10 bytes, hence (19 + 1)/2 = 10 bytes
 	 */
-	*pBuf = cdf_mem_malloc((*pBufLen + 1) / 2);
+	*pBuf = qdf_mem_malloc((*pBufLen + 1) / 2);
 	if (NULL == *pBuf) {
 		hddLog(LOGE, FL("cdf_mem_alloc failed"));
 		return -ENOMEM;
@@ -581,7 +581,7 @@
 
 		handoffInfo.channel = channel;
 		handoffInfo.src = REASSOC;
-		cdf_mem_copy(handoffInfo.bssid.bytes, bssid, QDF_MAC_ADDR_SIZE);
+		qdf_mem_copy(handoffInfo.bssid.bytes, bssid, QDF_MAC_ADDR_SIZE);
 		sme_handoff_request(hdd_ctx->hHal, adapter->sessionId,
 				    &handoffInfo);
 	}
@@ -757,7 +757,7 @@
 	if (pVendorSpecific->category ==
 	    SIR_MAC_ACTION_VENDOR_SPECIFIC_CATEGORY) {
 		static const uint8_t Oui[] = { 0x00, 0x00, 0xf0 };
-		if (cdf_mem_compare(pVendorSpecific->Oui, (void *)Oui, 3)) {
+		if (!qdf_mem_cmp(pVendorSpecific->Oui, (void *)Oui, 3)) {
 			/*
 			 * if the channel number is different from operating
 			 * channel then no need to send action frame
@@ -802,22 +802,22 @@
 	}
 
 	frame_len = payload_len + 24;
-	frame = cdf_mem_malloc(frame_len);
+	frame = qdf_mem_malloc(frame_len);
 	if (!frame) {
 		hddLog(LOGE, FL("memory allocation failed"));
 		ret = -ENOMEM;
 		goto exit;
 	}
-	cdf_mem_zero(frame, frame_len);
+	qdf_mem_zero(frame, frame_len);
 
 	hdr = (struct ieee80211_hdr_3addr *)frame;
 	hdr->frame_control =
 		cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_ACTION);
-	cdf_mem_copy(hdr->addr1, bssid, QDF_MAC_ADDR_SIZE);
-	cdf_mem_copy(hdr->addr2, adapter->macAddressCurrent.bytes,
+	qdf_mem_copy(hdr->addr1, bssid, QDF_MAC_ADDR_SIZE);
+	qdf_mem_copy(hdr->addr2, adapter->macAddressCurrent.bytes,
 		     QDF_MAC_ADDR_SIZE);
-	cdf_mem_copy(hdr->addr3, bssid, QDF_MAC_ADDR_SIZE);
-	cdf_mem_copy(hdr + 1, payload, payload_len);
+	qdf_mem_copy(hdr->addr3, bssid, QDF_MAC_ADDR_SIZE);
+	qdf_mem_copy(hdr + 1, payload, payload_len);
 
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0))
 	params.chan = &chan;
@@ -836,7 +836,7 @@
 			       dwell_time, frame, frame_len, 1, 1, &cookie);
 #endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0) */
 
-	cdf_mem_free(frame);
+	qdf_mem_free(frame);
 exit:
 	return ret;
 }
@@ -879,7 +879,7 @@
 	} else {
 		ret = hdd_sendactionframe(adapter, bssid, channel,
 					  dwell_time, payload_len, payload);
-		cdf_mem_free(payload);
+		qdf_mem_free(payload);
 	}
 
 	return ret;
@@ -1582,7 +1582,7 @@
 	tHalHandle hHal = WLAN_HDD_GET_HAL_CTX(adapter);
 	int rc;
 
-	cdf_mem_copy(&params, arg_params, sizeof(params));
+	qdf_mem_copy(&params, arg_params, sizeof(params));
 
 	INIT_COMPLETION(hdd_ctx->ready_to_extwow);
 
@@ -1687,7 +1687,7 @@
 	tSirAppType1Params params;
 	QDF_STATUS cdf_ret_status = QDF_STATUS_E_FAILURE;
 
-	cdf_mem_copy(&params, arg_params, sizeof(params));
+	qdf_mem_copy(&params, arg_params, sizeof(params));
 
 	cdf_ret_status = sme_configure_app_type1_params(hHal, &params);
 	if (QDF_STATUS_SUCCESS != cdf_ret_status) {
@@ -1726,9 +1726,9 @@
 	qdf_copy_macaddr(&params.wakee_mac_addr, &adapter->macAddressCurrent);
 
 	params.id_length = strlen(id);
-	cdf_mem_copy(params.identification_id, id, params.id_length);
+	qdf_mem_copy(params.identification_id, id, params.id_length);
 	params.pass_length = strlen(password);
-	cdf_mem_copy(params.password, password, params.pass_length);
+	qdf_mem_copy(params.password, password, params.pass_length);
 
 	QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_INFO,
 		  "%s: %d %pM %.8s %u %.16s %u",
@@ -1745,7 +1745,7 @@
 	tSirAppType2Params params;
 	QDF_STATUS cdf_ret_status = QDF_STATUS_E_FAILURE;
 
-	cdf_mem_copy(&params, arg_params, sizeof(params));
+	qdf_mem_copy(&params, arg_params, sizeof(params));
 
 	cdf_ret_status = sme_configure_app_type2_params(hHal, &params);
 	if (QDF_STATUS_SUCCESS != cdf_ret_status) {
@@ -1813,11 +1813,11 @@
 		return -EINVAL;
 	}
 
-	cdf_mem_copy(&params.gateway_mac.bytes, (uint8_t *) &gateway_mac,
+	qdf_mem_copy(&params.gateway_mac.bytes, (uint8_t *) &gateway_mac,
 			QDF_MAC_ADDR_SIZE);
 
 	params.rc4_key_len = strlen(rc4_key);
-	cdf_mem_copy(params.rc4_key, rc4_key, params.rc4_key_len);
+	qdf_mem_copy(params.rc4_key, rc4_key, params.rc4_key_len);
 
 	params.vdev_id = adapter->sessionId;
 	params.tcp_src_port = (params.tcp_src_port != 0) ?
@@ -1973,7 +1973,7 @@
 		return -EINVAL;
 	}
 
-	cdf_mem_zero(&smeConfig, sizeof(smeConfig));
+	qdf_mem_zero(&smeConfig, sizeof(smeConfig));
 	sme_get_config_param(hHal, &smeConfig);
 
 	if (strncmp(command, "SETDWELLTIME ACTIVE MAX", 23) == 0) {
@@ -2374,12 +2374,12 @@
 	 * For example, if N = 18, then (18 + 1) / 2 = 9 bytes are enough.
 	 * If N = 19, then we need 10 bytes, hence (19 + 1) / 2 = 10 bytes
 	 */
-	*pCckmIe = cdf_mem_malloc((*pCckmIeLen + 1) / 2);
+	*pCckmIe = qdf_mem_malloc((*pCckmIeLen + 1) / 2);
 	if (NULL == *pCckmIe) {
 		hddLog(LOGE, FL("cdf_mem_alloc failed"));
 		return -ENOMEM;
 	}
-	cdf_mem_zero(*pCckmIe, (*pCckmIeLen + 1) / 2);
+	qdf_mem_zero(*pCckmIe, (*pCckmIeLen + 1) / 2);
 	/*
 	 * the buffer received from the upper layer is character buffer,
 	 * we need to prepare the buffer taking 2 characters in to a U8 hex
@@ -4143,7 +4143,7 @@
 	struct wma_roam_invoke_cmd *fastreassoc;
 	cds_msg_t msg = {0};
 
-	fastreassoc = cdf_mem_malloc(sizeof(*fastreassoc));
+	fastreassoc = qdf_mem_malloc(sizeof(*fastreassoc));
 	if (NULL == fastreassoc) {
 		hddLog(LOGE, FL("cdf_mem_alloc failed for fastreassoc"));
 		return;
@@ -4162,7 +4162,7 @@
 	msg.bodyptr = fastreassoc;
 	if (QDF_STATUS_SUCCESS != cds_mq_post_message(QDF_MODULE_ID_WMA,
 								&msg)) {
-		cdf_mem_free(fastreassoc);
+		qdf_mem_free(fastreassoc);
 		QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR,
 		FL("Not able to post ROAM_INVOKE_CMD message to WMA"));
 	}
@@ -4217,7 +4217,7 @@
 	 * if the target bssid is same as currently associated AP,
 	 * issue reassoc to same AP
 	 */
-	if (true == cdf_mem_compare(targetApBssid,
+	if (true != qdf_mem_cmp(targetApBssid,
 				    pHddStaCtx->conn_info.bssId.bytes,
 				    QDF_MAC_ADDR_SIZE)) {
 		/* Reassoc to same AP, only supported for Open Security*/
@@ -4253,7 +4253,7 @@
 #ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
 	handoffInfo.channel = channel;
 	handoffInfo.src = FASTREASSOC;
-	cdf_mem_copy(handoffInfo.bssid, targetApBssid,
+	qdf_mem_copy(handoffInfo.bssid, targetApBssid,
 		     sizeof(tSirMacAddr));
 	sme_handoff_request(hdd_ctx->hHal, adapter->sessionId,
 			    &handoffInfo);
@@ -4275,7 +4275,7 @@
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
 	tpSirPlmReq pPlmRequest = NULL;
 
-	pPlmRequest = cdf_mem_malloc(sizeof(tSirPlmReq));
+	pPlmRequest = qdf_mem_malloc(sizeof(tSirPlmReq));
 	if (NULL == pPlmRequest) {
 		ret = -ENOMEM;
 		goto exit;
@@ -4283,7 +4283,7 @@
 
 	status = hdd_parse_plm_cmd(value, pPlmRequest);
 	if (QDF_STATUS_SUCCESS != status) {
-		cdf_mem_free(pPlmRequest);
+		qdf_mem_free(pPlmRequest);
 		pPlmRequest = NULL;
 		ret = -EINVAL;
 		goto exit;
@@ -4292,7 +4292,7 @@
 
 	status = sme_set_plm_request(hdd_ctx->hHal, pPlmRequest);
 	if (QDF_STATUS_SUCCESS != status) {
-		cdf_mem_free(pPlmRequest);
+		qdf_mem_free(pPlmRequest);
 		pPlmRequest = NULL;
 		ret = -EINVAL;
 		goto exit;
@@ -4851,7 +4851,7 @@
 			  "%s: CCKM Ie input length is more than max[%d]",
 			  __func__, DOT11F_IE_RSN_MAX_LEN);
 		if (NULL != cckmIe) {
-			cdf_mem_free(cckmIe);
+			qdf_mem_free(cckmIe);
 			cckmIe = NULL;
 		}
 		ret = -EINVAL;
@@ -4861,7 +4861,7 @@
 	sme_set_cckm_ie(hdd_ctx->hHal, adapter->sessionId,
 			cckmIe, cckmIeLen);
 	if (NULL != cckmIe) {
-		cdf_mem_free(cckmIe);
+		qdf_mem_free(cckmIe);
 		cckmIe = NULL;
 	}
 
@@ -5736,7 +5736,7 @@
 		hdd_conn_is_connected(WLAN_HDD_GET_STATION_CTX_PTR(adapter))) {
 
 
-		filter = cdf_mem_malloc(sizeof(*filter));
+		filter = qdf_mem_malloc(sizeof(*filter));
 		if (NULL == filter) {
 			hdd_err("Could not allocate Memory");
 			return -ENOMEM;
@@ -5757,7 +5757,7 @@
 		}
 		/* Set rx filter */
 		sme_8023_multicast_list(handle, adapter->sessionId, filter);
-		cdf_mem_free(filter);
+		qdf_mem_free(filter);
 	} else {
 		hdd_info("mode %d mc_cnt %d",
 			adapter->device_mode, adapter->mc_addr_list.mc_cnt);
diff --git a/core/hdd/src/wlan_hdd_ipa.c b/core/hdd/src/wlan_hdd_ipa.c
index 8ff2d3c..4458819 100644
--- a/core/hdd/src/wlan_hdd_ipa.c
+++ b/core/hdd/src/wlan_hdd_ipa.c
@@ -905,7 +905,7 @@
 	qdf_mc_timer_init(&hdd_ipa->rt_debug_fill_timer, QDF_TIMER_TYPE_SW,
 		hdd_ipa_uc_rt_debug_host_fill, (void *)hdd_ctx);
 	hdd_ipa->rt_buf_fill_index = 0;
-	cdf_mem_zero(hdd_ipa->rt_bug_buffer,
+	qdf_mem_zero(hdd_ipa->rt_bug_buffer,
 		sizeof(struct uc_rt_debug_info) *
 		HDD_IPA_UC_RT_DEBUG_BUF_COUNT);
 	hdd_ipa->ipa_tx_forward = 0;
@@ -1332,7 +1332,7 @@
 			pending_event->type,
 			pending_event->sta_id,
 			pending_event->mac_addr);
-		cdf_mem_free(pending_event);
+		qdf_mem_free(pending_event);
 		pending_event = NULL;
 		qdf_list_remove_front(&hdd_ipa->pending_event,
 			(qdf_list_node_t **)&pending_event);
@@ -1375,7 +1375,7 @@
 	status = wlan_hdd_validate_context(hdd_ctx);
 	if (0 != status) {
 		HDD_IPA_LOG(QDF_TRACE_LEVEL_ERROR, "HDD context is not valid");
-		cdf_mem_free(op_msg);
+		qdf_mem_free(op_msg);
 		return;
 	}
 
@@ -1619,7 +1619,7 @@
 		HDD_IPA_LOG(LOGE, "INVALID REASON %d",
 			    hdd_ipa->stat_req_reason);
 	}
-	cdf_mem_free(op_msg);
+	qdf_mem_free(op_msg);
 }
 
 
@@ -1652,7 +1652,7 @@
 	if (adapter->ipa_context)
 		return;
 
-	cdf_mem_zero(&ipa_offload_enable_disable,
+	qdf_mem_zero(&ipa_offload_enable_disable,
 		sizeof(ipa_offload_enable_disable));
 	ipa_offload_enable_disable.offload_type = offload_type;
 	ipa_offload_enable_disable.vdev_id = adapter->sessionId;
@@ -1746,7 +1746,7 @@
 	return;
 
 end:
-	cdf_mem_free(op_msg);
+	qdf_mem_free(op_msg);
 }
 
 /**
@@ -1785,8 +1785,8 @@
 	p_cds_contextType cds_ctx = hdd_ctx->pcds_context;
 	uint8_t i;
 
-	cdf_mem_zero(&pipe_in, sizeof(struct ipa_wdi_in_params));
-	cdf_mem_zero(&pipe_out, sizeof(struct ipa_wdi_out_params));
+	qdf_mem_zero(&pipe_in, sizeof(struct ipa_wdi_in_params));
+	qdf_mem_zero(&pipe_out, sizeof(struct ipa_wdi_out_params));
 
 	qdf_list_create(&ipa_ctxt->pending_event, 1000);
 	qdf_mutex_create(&ipa_ctxt->event_lock);
@@ -2735,7 +2735,7 @@
 
 	skb = ipa_tx_desc->skb;
 
-	cdf_mem_set(skb->cb, sizeof(skb->cb), 0);
+	qdf_mem_set(skb->cb, sizeof(skb->cb), 0);
 	cdf_nbuf_ipa_owned_set(skb);
 	/* FIXME: This is broken. No such field in cb any more:
 	   NBUF_CALLBACK_FN(skb) = hdd_ipa_nbuf_cb; */
@@ -2875,7 +2875,7 @@
 	 * progress.
 	 */
 	if (hdd_ipa->suspended) {
-		cdf_mem_set(skb->cb, sizeof(skb->cb), 0);
+		qdf_mem_set(skb->cb, sizeof(skb->cb), 0);
 		pm_tx_cb = (struct hdd_ipa_pm_tx_cb *)skb->cb;
 		pm_tx_cb->iface_context = iface_context;
 		pm_tx_cb->ipa_tx_desc = ipa_tx_desc;
@@ -3056,7 +3056,7 @@
 
 	while (--i >= 0) {
 		ipa_teardown_sys_pipe(hdd_ipa->sys_pipe[i].conn_hdl);
-		cdf_mem_zero(&hdd_ipa->sys_pipe[i],
+		qdf_mem_zero(&hdd_ipa->sys_pipe[i],
 			     sizeof(struct hdd_ipa_sys_pipe));
 	}
 
@@ -3114,7 +3114,7 @@
 
 	/* Allocate TX properties for TOS categories, 1 each for IPv4 & IPv6 */
 	tx_prop =
-		cdf_mem_malloc(sizeof(struct ipa_ioc_tx_intf_prop) * num_prop);
+		qdf_mem_malloc(sizeof(struct ipa_ioc_tx_intf_prop) * num_prop);
 	if (!tx_prop) {
 		HDD_IPA_LOG(QDF_TRACE_LEVEL_ERROR, "tx_prop allocation failed");
 		goto register_interface_fail;
@@ -3122,14 +3122,14 @@
 
 	/* Allocate RX properties, 1 each for IPv4 & IPv6 */
 	rx_prop =
-		cdf_mem_malloc(sizeof(struct ipa_ioc_rx_intf_prop) * num_prop);
+		qdf_mem_malloc(sizeof(struct ipa_ioc_rx_intf_prop) * num_prop);
 	if (!rx_prop) {
 		HDD_IPA_LOG(QDF_TRACE_LEVEL_ERROR, "rx_prop allocation failed");
 		goto register_interface_fail;
 	}
 
-	cdf_mem_zero(&tx_intf, sizeof(tx_intf));
-	cdf_mem_zero(&rx_intf, sizeof(rx_intf));
+	qdf_mem_zero(&tx_intf, sizeof(tx_intf));
+	qdf_mem_zero(&rx_intf, sizeof(rx_intf));
 
 	snprintf(ipv4_hdr_name, IPA_RESOURCE_NAME_MAX, "%s%s",
 		 ifname, HDD_IPA_IPV4_NAME_EXT);
@@ -3187,8 +3187,8 @@
 	ret = ipa_register_intf(ifname, &tx_intf, &rx_intf);
 
 register_interface_fail:
-	cdf_mem_free(tx_prop);
-	cdf_mem_free(rx_prop);
+	qdf_mem_free(tx_prop);
+	qdf_mem_free(rx_prop);
 	return ret;
 }
 
@@ -3204,7 +3204,7 @@
 	int ret = 0, len;
 	struct ipa_ioc_del_hdr *ipa_hdr;
 
-	cdf_mem_zero(&hdrlookup, sizeof(hdrlookup));
+	qdf_mem_zero(&hdrlookup, sizeof(hdrlookup));
 	strlcpy(hdrlookup.name, name, sizeof(hdrlookup.name));
 	ret = ipa_get_hdr(&hdrlookup);
 	if (ret) {
@@ -3215,7 +3215,7 @@
 
 	HDD_IPA_LOG(QDF_TRACE_LEVEL_INFO, "hdl: 0x%x", hdrlookup.hdl);
 	len = sizeof(struct ipa_ioc_del_hdr) + sizeof(struct ipa_hdr_del) * 1;
-	ipa_hdr = (struct ipa_ioc_del_hdr *)cdf_mem_malloc(len);
+	ipa_hdr = (struct ipa_ioc_del_hdr *)qdf_mem_malloc(len);
 	if (ipa_hdr == NULL) {
 		HDD_IPA_LOG(QDF_TRACE_LEVEL_ERROR, "ipa_hdr allocation failed");
 		return;
@@ -3229,7 +3229,7 @@
 		HDD_IPA_LOG(QDF_TRACE_LEVEL_ERROR, "Delete header failed: %d",
 			    ret);
 
-	cdf_mem_free(ipa_hdr);
+	qdf_mem_free(ipa_hdr);
 }
 
 /**
@@ -3257,7 +3257,7 @@
 		    ifname, mac_addr);
 
 	/* dynamically allocate the memory to add the hdrs */
-	ipa_hdr = cdf_mem_malloc(sizeof(struct ipa_ioc_add_hdr)
+	ipa_hdr = qdf_mem_malloc(sizeof(struct ipa_ioc_add_hdr)
 				 + sizeof(struct ipa_hdr_add));
 	if (!ipa_hdr) {
 		HDD_IPA_LOG(QDF_TRACE_LEVEL_ERROR,
@@ -3341,7 +3341,7 @@
 			    ipa_hdr->hdr[0].name, ipa_hdr->hdr[0].hdr_hdl);
 	}
 
-	cdf_mem_free(ipa_hdr);
+	qdf_mem_free(ipa_hdr);
 
 	return ret;
 
@@ -3351,7 +3351,7 @@
 	hdd_ipa_remove_header(ipa_hdr->hdr[0].name);
 end:
 	if (ipa_hdr)
-		cdf_mem_free(ipa_hdr);
+		qdf_mem_free(ipa_hdr);
 
 	return ret;
 }
@@ -3499,7 +3499,7 @@
 {
 	hddLog(LOG1, "msg type:%d, len:%d", type, len);
 	ghdd_ipa->stats.num_free_msg++;
-	cdf_mem_free(buff);
+	qdf_mem_free(buff);
 }
 
 /**
@@ -3540,7 +3540,7 @@
 
 	/* Send SCC/MCC Switching event to IPA */
 	meta.msg_len = sizeof(*msg);
-	msg = cdf_mem_malloc(meta.msg_len);
+	msg = qdf_mem_malloc(meta.msg_len);
 	if (msg == NULL) {
 		hddLog(LOGE, "msg allocation failed");
 		return -ENOMEM;
@@ -3555,7 +3555,7 @@
 	if (ret) {
 		hddLog(LOGE, "ipa_send_msg(Evt:%d) - fail=%d",
 			meta.msg_type,  ret);
-		cdf_mem_free(msg);
+		qdf_mem_free(msg);
 	}
 
 	return ret;
@@ -3660,7 +3660,7 @@
 				(qdf_list_node_t **)&pending_event);
 		} else {
 			pending_event =
-				(struct ipa_uc_pending_event *)cdf_mem_malloc(
+				(struct ipa_uc_pending_event *)qdf_mem_malloc(
 					sizeof(struct ipa_uc_pending_event));
 		}
 
@@ -3673,7 +3673,7 @@
 		pending_event->adapter = adapter;
 		pending_event->sta_id = sta_id;
 		pending_event->type = type;
-		cdf_mem_copy(pending_event->mac_addr,
+		qdf_mem_copy(pending_event->mac_addr,
 			mac_addr,
 			QDF_MAC_ADDR_SIZE);
 		qdf_list_insert_back(&hdd_ipa->pending_event,
@@ -3882,7 +3882,7 @@
 		meta.msg_type = type;
 		meta.msg_len = (sizeof(struct ipa_wlan_msg_ex) +
 				sizeof(struct ipa_wlan_hdr_attrib_val));
-		msg_ex = cdf_mem_malloc(meta.msg_len);
+		msg_ex = qdf_mem_malloc(meta.msg_len);
 
 		if (msg_ex == NULL) {
 			HDD_IPA_LOG(QDF_TRACE_LEVEL_ERROR,
@@ -3908,7 +3908,7 @@
 		if (ret) {
 			HDD_IPA_LOG(QDF_TRACE_LEVEL_INFO, "%s: Evt: %d : %d",
 				    msg_ex->name, meta.msg_type, ret);
-			cdf_mem_free(msg_ex);
+			qdf_mem_free(msg_ex);
 			return ret;
 		}
 		hdd_ipa->stats.num_send_msg++;
@@ -3947,7 +3947,7 @@
 	}
 
 	meta.msg_len = sizeof(struct ipa_wlan_msg);
-	msg = cdf_mem_malloc(meta.msg_len);
+	msg = qdf_mem_malloc(meta.msg_len);
 	if (msg == NULL) {
 		HDD_IPA_LOG(QDF_TRACE_LEVEL_ERROR, "msg allocation failed");
 		return -ENOMEM;
@@ -3965,7 +3965,7 @@
 	if (ret) {
 		HDD_IPA_LOG(QDF_TRACE_LEVEL_INFO, "%s: Evt: %d fail:%d",
 			    msg->name, meta.msg_type, ret);
-		cdf_mem_free(msg);
+		qdf_mem_free(msg);
 		return ret;
 	}
 
@@ -4013,7 +4013,7 @@
 	if (!hdd_ipa_is_enabled(hdd_ctx))
 		return QDF_STATUS_SUCCESS;
 
-	hdd_ipa = cdf_mem_malloc(sizeof(*hdd_ipa));
+	hdd_ipa = qdf_mem_malloc(sizeof(*hdd_ipa));
 	if (!hdd_ipa) {
 		HDD_IPA_LOG(QDF_TRACE_LEVEL_FATAL, "hdd_ipa allocation failed");
 		goto fail_return;
@@ -4074,7 +4074,7 @@
 
 	if (hdd_ipa_uc_is_enabled(hdd_ipa->hdd_ctx)) {
 		hdd_ipa_uc_rt_debug_init(hdd_ctx);
-		cdf_mem_zero(&hdd_ipa->stats, sizeof(hdd_ipa->stats));
+		qdf_mem_zero(&hdd_ipa->stats, sizeof(hdd_ipa->stats));
 		hdd_ipa->sap_num_connected_sta = 0;
 		hdd_ipa->ipa_tx_packets_diff = 0;
 		hdd_ipa->ipa_rx_packets_diff = 0;
@@ -4104,7 +4104,7 @@
 fail_setup_rm:
 	qdf_spinlock_destroy(&hdd_ipa->pm_lock);
 fail_get_resource:
-	cdf_mem_free(hdd_ipa);
+	qdf_mem_free(hdd_ipa);
 	hdd_ctx->hdd_ipa = NULL;
 	ghdd_ipa = NULL;
 fail_return:
@@ -4123,7 +4123,7 @@
 
 	while (qdf_list_remove_front(&hdd_ipa->pending_event,
 		(qdf_list_node_t **)&pending_event) == QDF_STATUS_SUCCESS) {
-		cdf_mem_free(pending_event);
+		qdf_mem_free(pending_event);
 	}
 
 	qdf_list_destroy(&hdd_ipa->pending_event);
@@ -4219,7 +4219,7 @@
 #endif
 	}
 
-	cdf_mem_free(hdd_ipa);
+	qdf_mem_free(hdd_ipa);
 	hdd_ctx->hdd_ipa = NULL;
 
 	return QDF_STATUS_SUCCESS;
diff --git a/core/hdd/src/wlan_hdd_lro.c b/core/hdd/src/wlan_hdd_lro.c
index 7cba52d..77522bd 100644
--- a/core/hdd/src/wlan_hdd_lro.c
+++ b/core/hdd/src/wlan_hdd_lro.c
@@ -261,7 +261,7 @@
 		return -EINVAL;
 	}
 
-	cdf_mem_zero((void *)entry->lro_desc, sizeof(struct net_lro_desc));
+	qdf_mem_zero((void *)entry->lro_desc, sizeof(struct net_lro_desc));
 
 	/*
 	 * lro_desc->active should be 0 and lro_desc->tcp_rcv_tsval
@@ -516,7 +516,7 @@
 	hdd_info("LRO Enabled");
 
 	hdd_lro = &adapter->lro_info;
-	cdf_mem_zero((void *)hdd_lro, sizeof(struct hdd_lro_s));
+	qdf_mem_zero((void *)hdd_lro, sizeof(struct hdd_lro_s));
 	/*
 	* Allocate all the LRO data structures at once and then carve
 	* them up as needed
@@ -526,7 +526,7 @@
 	desc_pool_sz = (LRO_DESC_POOL_SZ * sizeof(struct hdd_lro_desc_entry));
 	hash_table_sz = (sizeof(struct hdd_lro_desc_table) * LRO_DESC_TABLE_SZ);
 
-	lro_mem_ptr = cdf_mem_malloc(lro_mgr_sz + desc_arr_sz + desc_pool_sz +
+	lro_mem_ptr = qdf_mem_malloc(lro_mgr_sz + desc_arr_sz + desc_pool_sz +
 		 hash_table_sz);
 
 	if (NULL == lro_mem_ptr) {
@@ -597,7 +597,7 @@
 
 	if (adapter->lro_info.lro_mgr) {
 		hdd_lro_desc_info_deinit(&adapter->lro_info);
-		cdf_mem_free(adapter->lro_info.lro_mgr);
+		qdf_mem_free(adapter->lro_info.lro_mgr);
 		adapter->lro_info.lro_mgr = NULL;
 		adapter->lro_info.lro_desc_info.
 			lro_desc_pool.lro_desc_array = NULL;
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c
index 5117ab6..d6557cc 100644
--- a/core/hdd/src/wlan_hdd_main.c
+++ b/core/hdd/src/wlan_hdd_main.c
@@ -749,10 +749,10 @@
 	int8_t i;
 	uint8_t macaddr_b3, tmp_br3;
 
-	cdf_mem_copy(config->intfMacAddr[0].bytes, hw_macaddr.bytes,
+	qdf_mem_copy(config->intfMacAddr[0].bytes, hw_macaddr.bytes,
 		     QDF_MAC_ADDR_SIZE);
 	for (i = 1; i < QDF_MAX_CONCURRENCY_PERSONA; i++) {
-		cdf_mem_copy(config->intfMacAddr[i].bytes, hw_macaddr.bytes,
+		qdf_mem_copy(config->intfMacAddr[i].bytes, hw_macaddr.bytes,
 			     QDF_MAC_ADDR_SIZE);
 		macaddr_b3 = config->intfMacAddr[i].bytes[3];
 		tmp_br3 = ((macaddr_b3 >> 4 & INTF_MACADDR_MASK) + i) &
@@ -1870,7 +1870,7 @@
 		/* Save the pointer to the net_device in the HDD adapter */
 		adapter = (hdd_adapter_t *) netdev_priv(pWlanDev);
 
-		cdf_mem_zero(adapter, sizeof(hdd_adapter_t));
+		qdf_mem_zero(adapter, sizeof(hdd_adapter_t));
 
 		adapter->dev = pWlanDev;
 		adapter->pHddCtx = hdd_ctx;
@@ -1902,9 +1902,9 @@
 		/* Init the net_device structure */
 		strlcpy(pWlanDev->name, name, IFNAMSIZ);
 
-		cdf_mem_copy(pWlanDev->dev_addr, (void *)macAddr,
+		qdf_mem_copy(pWlanDev->dev_addr, (void *)macAddr,
 			     sizeof(tSirMacAddr));
-		cdf_mem_copy(adapter->macAddressCurrent.bytes, macAddr,
+		qdf_mem_copy(adapter->macAddressCurrent.bytes, macAddr,
 			     sizeof(tSirMacAddr));
 		pWlanDev->watchdog_timeo = HDD_TX_TIMEOUT;
 
@@ -2273,7 +2273,7 @@
 	while (NULL != adapterNode && QDF_STATUS_SUCCESS == status) {
 		adapter = adapterNode->pAdapter;
 		if (adapter
-		    && cdf_mem_compare(adapter->macAddressCurrent.bytes,
+		    && !qdf_mem_cmp(adapter->macAddressCurrent.bytes,
 				       macAddr, sizeof(tSirMacAddr))) {
 			return QDF_STATUS_E_FAILURE;
 		}
@@ -2483,7 +2483,7 @@
 	if (QDF_STATUS_SUCCESS == status) {
 		/* Add it to the hdd's session list. */
 		pHddAdapterNode =
-			cdf_mem_malloc(sizeof(hdd_adapter_list_node_t));
+			qdf_mem_malloc(sizeof(hdd_adapter_list_node_t));
 		if (NULL == pHddAdapterNode) {
 			status = QDF_STATUS_E_NOMEM;
 		} else {
@@ -2498,7 +2498,7 @@
 			adapter = NULL;
 		}
 		if (NULL != pHddAdapterNode) {
-			cdf_mem_free(pHddAdapterNode);
+			qdf_mem_free(pHddAdapterNode);
 		}
 		return NULL;
 	}
@@ -2691,7 +2691,7 @@
 		hdd_cleanup_adapter(hdd_ctx, adapterNode->pAdapter, rtnl_held);
 
 		hdd_remove_adapter(hdd_ctx, adapterNode);
-		cdf_mem_free(adapterNode);
+		qdf_mem_free(adapterNode);
 		adapterNode = NULL;
 
 		/* Adapter removed. Decrement vdev count */
@@ -2725,7 +2725,7 @@
 		if (pHddAdapterNode && QDF_STATUS_SUCCESS == status) {
 			hdd_cleanup_adapter(hdd_ctx, pHddAdapterNode->pAdapter,
 					    rtnl_held);
-			cdf_mem_free(pHddAdapterNode);
+			qdf_mem_free(pHddAdapterNode);
 		}
 	} while (NULL != pHddAdapterNode && QDF_STATUS_E_EMPTY != status);
 
@@ -3227,7 +3227,7 @@
 		adapter = adapterNode->pAdapter;
 
 		if (adapter
-		    && cdf_mem_compare(adapter->macAddressCurrent.bytes,
+		    && !qdf_mem_cmp(adapter->macAddressCurrent.bytes,
 				       macAddr, sizeof(tSirMacAddr))) {
 			return adapter;
 		}
@@ -3645,7 +3645,7 @@
 	if (QDF_GLOBAL_FTM_MODE != hdd_get_conparam())
 		hdd_logging_sock_deactivate_svc(hdd_ctx);
 
-	cdf_mem_free(hdd_ctx->config);
+	qdf_mem_free(hdd_ctx->config);
 	hdd_ctx->config = NULL;
 
 	wiphy_free(hdd_ctx->wiphy);
@@ -4394,7 +4394,7 @@
 void wlan_hdd_clear_tx_rx_histogram(hdd_context_t *hdd_ctx)
 {
 	hdd_ctx->hdd_txrx_hist_idx = 0;
-	cdf_mem_zero(hdd_ctx->hdd_txrx_hist, sizeof(hdd_ctx->hdd_txrx_hist));
+	qdf_mem_zero(hdd_ctx->hdd_txrx_hist, sizeof(hdd_ctx->hdd_txrx_hist));
 }
 
 /**
@@ -4475,9 +4475,9 @@
 	while (NULL != adapter_node && QDF_STATUS_SUCCESS == status) {
 		adapter = adapter_node->pAdapter;
 
-		cdf_mem_zero(adapter->queue_oper_stats,
+		qdf_mem_zero(adapter->queue_oper_stats,
 					sizeof(adapter->queue_oper_stats));
-		cdf_mem_zero(adapter->queue_oper_history,
+		qdf_mem_zero(adapter->queue_oper_history,
 					sizeof(adapter->queue_oper_history));
 
 		status = hdd_get_next_adapter(hdd_ctx, adapter_node, &next);
@@ -4749,7 +4749,7 @@
 	       ch_avoid_indi->avoid_range_count);
 
 	/* generate vendor specific event */
-	cdf_mem_zero((void *)&hdd_avoid_freq_list, sizeof(tHddAvoidFreqList));
+	qdf_mem_zero((void *)&hdd_avoid_freq_list, sizeof(tHddAvoidFreqList));
 	for (i = 0; i < ch_avoid_indi->avoid_range_count; i++) {
 		hdd_avoid_freq_list.avoidFreqRange[i].startFreq =
 			ch_avoid_indi->avoid_freq_range[i].start_freq;
@@ -4763,7 +4763,7 @@
 
 	/* clear existing unsafe channel cache */
 	hdd_ctxt->unsafe_channel_count = 0;
-	cdf_mem_zero(hdd_ctxt->unsafe_channel_list,
+	qdf_mem_zero(hdd_ctxt->unsafe_channel_list,
 					sizeof(hdd_ctxt->unsafe_channel_list));
 
 	for (range_loop = 0; range_loop < ch_avoid_indi->avoid_range_count;
@@ -4839,7 +4839,7 @@
 
 		/* clear existing unsafe channel cache */
 		hdd_ctxt->unsafe_channel_count = 0;
-		cdf_mem_zero(hdd_ctxt->unsafe_channel_list,
+		qdf_mem_zero(hdd_ctxt->unsafe_channel_list,
 			sizeof(hdd_ctxt->unsafe_channel_list));
 
 		return;
@@ -5092,7 +5092,7 @@
 
 	hdd_ctx->pcds_context = p_cds_context;
 
-	hdd_ctx->config = cdf_mem_malloc(sizeof(struct hdd_config));
+	hdd_ctx->config = qdf_mem_malloc(sizeof(struct hdd_config));
 	if (hdd_ctx->config == NULL) {
 		hdd_alert("Failed to alloc memory for HDD config!");
 		ret = -ENOMEM;
@@ -5181,7 +5181,7 @@
 	return hdd_ctx;
 
 err_free_config:
-	cdf_mem_free(hdd_ctx->config);
+	qdf_mem_free(hdd_ctx->config);
 
 err_free_hdd_context:
 	wiphy_free(hdd_ctx->wiphy);
@@ -5208,7 +5208,7 @@
 
 	if (hdd_ctx->config->isP2pDeviceAddrAdministrated &&
 	    !(hdd_ctx->config->intfMacAddr[0].bytes[0] & 0x02)) {
-		cdf_mem_copy(hdd_ctx->p2pDeviceAddress.bytes,
+		qdf_mem_copy(hdd_ctx->p2pDeviceAddress.bytes,
 			     hdd_ctx->config->intfMacAddr[0].bytes,
 			     sizeof(tSirMacAddr));
 
@@ -5225,7 +5225,7 @@
 			return -ENOSPC;
 		}
 
-		cdf_mem_copy(&hdd_ctx->p2pDeviceAddress.bytes[0], p2p_dev_addr,
+		qdf_mem_copy(&hdd_ctx->p2pDeviceAddress.bytes[0], p2p_dev_addr,
 			     QDF_MAC_ADDR_SIZE);
 	}
 
@@ -6819,7 +6819,7 @@
 		goto out;
 	}
 
-	pr_info("%s: qdf driver loaded\n", WLAN_MODULE_NAME);
+	pr_info("%s: qdf converged driver loaded\n", WLAN_MODULE_NAME);
 
 	return 0;
 out:
diff --git a/core/hdd/src/wlan_hdd_memdump.c b/core/hdd/src/wlan_hdd_memdump.c
index 623c0f4..49a9a4a 100644
--- a/core/hdd/src/wlan_hdd_memdump.c
+++ b/core/hdd/src/wlan_hdd_memdump.c
@@ -90,7 +90,7 @@
 
 	paddr = hdd_ctx->dump_loc_paddr;
 	mutex_lock(&hdd_ctx->memdump_lock);
-	cdf_os_mem_free_consistent(qdf_ctx,
+	qdf_mem_free_consistent(qdf_ctx,
 		FW_MEM_DUMP_SIZE, hdd_ctx->fw_dump_loc, paddr, dma_ctx);
 	hdd_ctx->fw_dump_loc = NULL;
 	hdd_ctx->memdump_in_progress = false;
@@ -234,11 +234,11 @@
 	 */
 	mutex_lock(&hdd_ctx->memdump_lock);
 	if (!hdd_ctx->fw_dump_loc) {
-		hdd_ctx->fw_dump_loc = cdf_os_mem_alloc_consistent(
-			qdf_ctx, FW_MEM_DUMP_SIZE, &paddr, dma_ctx);
+		hdd_ctx->fw_dump_loc = qdf_mem_alloc_consistent(
+			qdf_ctx, qdf_ctx->dev, FW_MEM_DUMP_SIZE, &paddr);
 		if (!hdd_ctx->fw_dump_loc) {
 			mutex_unlock(&hdd_ctx->memdump_lock);
-			hddLog(LOGE, FL("cdf_os_mem_alloc_consistent failed"));
+			hddLog(LOGE, FL("qdf_mem_alloc_consistent failed"));
 			return -ENOMEM;
 		}
 		hdd_ctx->dump_loc_paddr = paddr;
@@ -299,7 +299,7 @@
 	if (QDF_STATUS_SUCCESS != sme_status) {
 		hddLog(LOGE, FL("sme_fw_mem_dump Failed"));
 		mutex_lock(&hdd_ctx->memdump_lock);
-		cdf_os_mem_free_consistent(qdf_ctx,
+		qdf_mem_free_consistent(qdf_ctx,
 			FW_MEM_DUMP_SIZE, hdd_ctx->fw_dump_loc, paddr, dma_ctx);
 		hdd_ctx->fw_dump_loc = NULL;
 		mutex_unlock(&hdd_ctx->memdump_lock);
@@ -443,7 +443,7 @@
 	if (*pos >= FW_MEM_DUMP_SIZE) {
 		paddr = hdd_ctx->dump_loc_paddr;
 		mutex_lock(&hdd_ctx->memdump_lock);
-		cdf_os_mem_free_consistent(qdf_ctx,
+		qdf_mem_free_consistent(qdf_ctx,
 			FW_MEM_DUMP_SIZE, hdd_ctx->fw_dump_loc, paddr, dma_ctx);
 		hdd_ctx->fw_dump_loc = NULL;
 		hdd_ctx->memdump_in_progress = false;
@@ -619,7 +619,7 @@
 	mutex_lock(&hdd_ctx->memdump_lock);
 	if (hdd_ctx->fw_dump_loc) {
 		paddr = hdd_ctx->dump_loc_paddr;
-		cdf_os_mem_free_consistent(qdf_ctx,
+		qdf_mem_free_consistent(qdf_ctx,
 			FW_MEM_DUMP_SIZE, hdd_ctx->fw_dump_loc, paddr, dma_ctx);
 		hdd_ctx->fw_dump_loc = NULL;
 		hdd_ctx->memdump_in_progress = false;
diff --git a/core/hdd/src/wlan_hdd_ocb.c b/core/hdd/src/wlan_hdd_ocb.c
index 428ced7..62ff20a 100644
--- a/core/hdd/src/wlan_hdd_ocb.c
+++ b/core/hdd/src/wlan_hdd_ocb.c
@@ -308,11 +308,11 @@
 		ndl_chan_list_len +
 		ndl_active_state_list_len;
 
-	cursor = cdf_mem_malloc(len);
+	cursor = qdf_mem_malloc(len);
 	if (!cursor)
 		goto fail;
 
-	cdf_mem_zero(cursor, len);
+	qdf_mem_zero(cursor, len);
 	ret = cursor;
 	cursor += sizeof(*ret);
 
@@ -333,7 +333,7 @@
 	return ret;
 
 fail:
-	cdf_mem_free(ret);
+	qdf_mem_free(ret);
 	return NULL;
 }
 
@@ -540,11 +540,11 @@
 				rc = -EINVAL;
 				goto fail;
 			}
-			cdf_mem_copy(config->channels[
+			qdf_mem_copy(config->channels[
 				     config->channel_count].mac_address.bytes,
 				     mac_addr, sizeof(tSirMacAddr));
 			/* Save the mac address to release later */
-			cdf_mem_copy(adapter->ocb_mac_address[
+			qdf_mem_copy(adapter->ocb_mac_address[
 				     adapter->ocb_mac_addr_count].bytes,
 				     mac_addr, QDF_MAC_ADDR_SIZE);
 			adapter->ocb_mac_addr_count++;
@@ -583,7 +583,7 @@
 	rc = 0;
 
 fail:
-	cdf_mem_free(config);
+	qdf_mem_free(config);
 	return rc;
 }
 
@@ -733,12 +733,12 @@
 {
 	uint32_t i;
 
-	cdf_mem_zero(dest, channel_count * sizeof(*dest));
+	qdf_mem_zero(dest, channel_count * sizeof(*dest));
 
 	for (i = 0; i < channel_count; i++) {
 		dest[i].chan_freq = src[i].chan_freq;
 		dest[i].bandwidth = src[i].bandwidth;
-		cdf_mem_copy(dest[i].qos_params, src[i].qos_params,
+		qdf_mem_copy(dest[i].qos_params, src[i].qos_params,
 			     sizeof(dest[i].qos_params));
 		/*
 		 *  max_pwr and min_pwr are divided by 2 because
@@ -885,7 +885,7 @@
 				hddLog(LOGE, FL("Cannot obtain mac address"));
 				goto fail;
 			}
-			cdf_mem_copy(config->channels[i].mac_address.bytes,
+			qdf_mem_copy(config->channels[i].mac_address.bytes,
 				mac_addr, QDF_MAC_ADDR_SIZE);
 			/* Save the mac address to release later */
 			qdf_copy_macaddr(&adapter->ocb_mac_address[
@@ -905,13 +905,13 @@
 		hddLog(LOGE, FL("SCHEDULE_ARRAY is not the correct size"));
 		goto fail;
 	}
-	cdf_mem_copy(config->schedule, nla_data(sched_array),
+	qdf_mem_copy(config->schedule, nla_data(sched_array),
 		nla_len(sched_array));
 
 	/* Copy the NDL chan array */
 	if (ndl_chan_list_len) {
 		config->dcc_ndl_chan_list_len = ndl_chan_list_len;
-		cdf_mem_copy(config->dcc_ndl_chan_list, nla_data(ndl_chan_list),
+		qdf_mem_copy(config->dcc_ndl_chan_list, nla_data(ndl_chan_list),
 			nla_len(ndl_chan_list));
 	}
 
@@ -919,7 +919,7 @@
 	if (ndl_active_state_list_len) {
 		config->dcc_ndl_active_state_list_len =
 			ndl_active_state_list_len;
-		cdf_mem_copy(config->dcc_ndl_active_state_list,
+		qdf_mem_copy(config->dcc_ndl_active_state_list,
 			nla_data(ndl_active_state_list),
 			nla_len(ndl_active_state_list));
 	}
@@ -929,7 +929,7 @@
 		hddLog(LOGE, FL("Error while setting OCB config: %d"), rc);
 
 fail:
-	cdf_mem_free(config);
+	qdf_mem_free(config);
 	return rc;
 }
 
@@ -1026,14 +1026,14 @@
 		return -EINVAL;
 	}
 
-	utc = cdf_mem_malloc(sizeof(*utc));
+	utc = qdf_mem_malloc(sizeof(*utc));
 	if (!utc) {
-		hddLog(LOGE, FL("cdf_mem_malloc failed"));
+		hddLog(LOGE, FL("qdf_mem_malloc failed"));
 		return -ENOMEM;
 	}
 	utc->vdev_id = adapter->sessionId;
-	cdf_mem_copy(utc->utc_time, nla_data(utc_attr), SIZE_UTC_TIME);
-	cdf_mem_copy(utc->time_error, nla_data(time_error_attr),
+	qdf_mem_copy(utc->utc_time, nla_data(utc_attr), SIZE_UTC_TIME);
+	qdf_mem_copy(utc->time_error, nla_data(time_error_attr),
 		SIZE_UTC_TIME_ERROR);
 
 	if (sme_ocb_set_utc_time(hdd_ctx->hHal, utc) != QDF_STATUS_SUCCESS) {
@@ -1043,7 +1043,7 @@
 		rc = 0;
 	}
 
-	cdf_mem_free(utc);
+	qdf_mem_free(utc);
 	return rc;
 }
 
@@ -1109,12 +1109,12 @@
 		return -EINVAL;
 	}
 
-	timing_advert = cdf_mem_malloc(sizeof(*timing_advert));
+	timing_advert = qdf_mem_malloc(sizeof(*timing_advert));
 	if (!timing_advert) {
-		hddLog(LOGE, FL("cdf_mem_malloc failed"));
+		hddLog(LOGE, FL("qdf_mem_malloc failed"));
 		return -ENOMEM;
 	}
-	cdf_mem_zero(timing_advert, sizeof(*timing_advert));
+	qdf_mem_zero(timing_advert, sizeof(*timing_advert));
 	timing_advert->vdev_id = adapter->sessionId;
 
 	/* Parse the netlink message */
@@ -1161,8 +1161,8 @@
 
 fail:
 	if (timing_advert->template_value)
-		cdf_mem_free(timing_advert->template_value);
-	cdf_mem_free(timing_advert);
+		qdf_mem_free(timing_advert->template_value);
+	qdf_mem_free(timing_advert);
 	return rc;
 }
 
@@ -1229,12 +1229,12 @@
 		return -EINVAL;
 	}
 
-	timing_advert = cdf_mem_malloc(sizeof(*timing_advert));
+	timing_advert = qdf_mem_malloc(sizeof(*timing_advert));
 	if (!timing_advert) {
-		hddLog(LOGE, FL("cdf_mem_malloc failed"));
+		hddLog(LOGE, FL("qdf_mem_malloc failed"));
 		return -ENOMEM;
 	}
-	cdf_mem_zero(timing_advert, sizeof(sizeof(*timing_advert)));
+	qdf_mem_zero(timing_advert, sizeof(sizeof(*timing_advert)));
 	timing_advert->vdev_id = adapter->sessionId;
 
 	/* Parse the netlink message */
@@ -1262,7 +1262,7 @@
 	}
 
 fail:
-	cdf_mem_free(timing_advert);
+	qdf_mem_free(timing_advert);
 	return rc;
 }
 
@@ -1477,11 +1477,11 @@
 			 * request, delete it
 			 */
 			if (context->adapter->dcc_get_stats_resp) {
-				cdf_mem_free(
+				qdf_mem_free(
 				    context->adapter->dcc_get_stats_resp);
 			}
 			context->adapter->dcc_get_stats_resp =
-				cdf_mem_malloc(sizeof(
+				qdf_mem_malloc(sizeof(
 				    *context->adapter->dcc_get_stats_resp) +
 				    response->channel_stats_array_len);
 			if (context->adapter->dcc_get_stats_resp) {
@@ -1489,7 +1489,7 @@
 				*hdd_resp = *response;
 				hdd_resp->channel_stats_array =
 					(void *)hdd_resp + sizeof(*hdd_resp);
-				cdf_mem_copy(hdd_resp->channel_stats_array,
+				qdf_mem_copy(hdd_resp->channel_stats_array,
 					     response->channel_stats_array,
 					     response->channel_stats_array_len);
 				context->status = 0;
@@ -1646,7 +1646,7 @@
 end:
 	spin_lock(&hdd_context_lock);
 	context.magic = 0;
-	cdf_mem_free(adapter->dcc_get_stats_resp);
+	qdf_mem_free(adapter->dcc_get_stats_resp);
 	adapter->dcc_get_stats_resp = NULL;
 	spin_unlock(&hdd_context_lock);
 	if (nl_resp)
diff --git a/core/hdd/src/wlan_hdd_oemdata.c b/core/hdd/src/wlan_hdd_oemdata.c
index d310bb3..924ac2e 100644
--- a/core/hdd/src/wlan_hdd_oemdata.c
+++ b/core/hdd/src/wlan_hdd_oemdata.c
@@ -69,7 +69,7 @@
 		hdd_err("HDD configuration is null");
 		return -EINVAL;
 	}
-	chan_list = cdf_mem_malloc(sizeof(uint8_t) * OEM_CAP_MAX_NUM_CHANNELS);
+	chan_list = qdf_mem_malloc(sizeof(uint8_t) * OEM_CAP_MAX_NUM_CHANNELS);
 	if (NULL == chan_list) {
 		hdd_err("Memory allocation failed");
 		return -ENOMEM;
@@ -99,7 +99,7 @@
 					    &chan_list[0], &num_chan);
 	if (QDF_STATUS_SUCCESS != status) {
 		hdd_err("failed to get valid channel list, status: %d", status);
-		cdf_mem_free(chan_list);
+		qdf_mem_free(chan_list);
 		return -EINVAL;
 	}
 
@@ -107,15 +107,15 @@
 	if (num_chan > OEM_CAP_MAX_NUM_CHANNELS) {
 		hdd_err("Num of channels-%d > length-%d of chan_list",
 			num_chan, OEM_CAP_MAX_NUM_CHANNELS);
-		cdf_mem_free(chan_list);
+		qdf_mem_free(chan_list);
 		return -ENOMEM;
 	}
 
 	data_cap->num_channels = num_chan;
-	cdf_mem_copy(data_cap->channel_list, chan_list,
+	qdf_mem_copy(data_cap->channel_list, chan_list,
 		     sizeof(uint8_t) * num_chan);
 
-	cdf_mem_free(chan_list);
+	qdf_mem_free(chan_list);
 	return 0;
 }
 
@@ -344,7 +344,7 @@
 	aniHdr->length = length;
 	nlh->nlmsg_len = NLMSG_LENGTH((sizeof(tAniMsgHdr) + aniHdr->length));
 	oemData = (uint8_t *) ((char *)aniHdr + sizeof(tAniMsgHdr));
-	cdf_mem_copy(oemData, oemDataRsp, length);
+	qdf_mem_copy(oemData, oemDataRsp, length);
 
 	skb_put(skb, NLMSG_SPACE((sizeof(tAniMsgHdr) + aniHdr->length)));
 
@@ -387,16 +387,16 @@
 		return QDF_STATUS_E_FAILURE;
 	}
 
-	cdf_mem_zero(&oemDataReqConfig, sizeof(tOemDataReqConfig));
+	qdf_mem_zero(&oemDataReqConfig, sizeof(tOemDataReqConfig));
 
-	oemDataReqConfig.data = cdf_mem_malloc(oemDataLen);
+	oemDataReqConfig.data = qdf_mem_malloc(oemDataLen);
 	if (!oemDataReqConfig.data) {
 		hddLog(LOGE, FL("malloc failed for data req buffer"));
 		return QDF_STATUS_E_NOMEM;
 	}
 
 	oemDataReqConfig.data_len = oemDataLen;
-	cdf_mem_copy(oemDataReqConfig.data, oemData, oemDataLen);
+	qdf_mem_copy(oemDataReqConfig.data, oemData, oemDataLen);
 
 	QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_INFO,
 		  "%s: calling sme_oem_data_req", __func__);
@@ -406,7 +406,7 @@
 				  &oemDataReqConfig,
 				  &oemDataReqID);
 
-	cdf_mem_free(oemDataReqConfig.data);
+	qdf_mem_free(oemDataReqConfig.data);
 	oemDataReqConfig.data = NULL;
 
 	return status;
@@ -510,7 +510,7 @@
 			hddChanInfo.reg_info_1 = 0;
 			hddChanInfo.reg_info_2 = 0;
 		}
-		cdf_mem_copy(pHddChanInfo, &hddChanInfo,
+		qdf_mem_copy(pHddChanInfo, &hddChanInfo,
 			     sizeof(tHddChannelInfo));
 	}
 
@@ -575,7 +575,7 @@
 
 	/* message body will contain only status code */
 	buf = (char *)((char *)ani_hdr + sizeof(tAniMsgHdr));
-	cdf_mem_copy(buf, &error_code, ani_hdr->length);
+	qdf_mem_copy(buf, &error_code, ani_hdr->length);
 
 	skb_put(skb, NLMSG_SPACE(sizeof(tAniMsgHdr) + ani_hdr->length));
 
@@ -636,12 +636,12 @@
 	nlh->nlmsg_len = NLMSG_LENGTH((sizeof(tAniMsgHdr) + ani_hdr->length));
 
 	buf = (char *)((char *)ani_hdr + sizeof(tAniMsgHdr));
-	cdf_mem_copy(buf, &data_cap, sizeof(data_cap));
+	qdf_mem_copy(buf, &data_cap, sizeof(data_cap));
 
 	buf = (char *) buf +  sizeof(data_cap);
-	cdf_mem_zero(&oem_cap, sizeof(oem_cap));
+	qdf_mem_zero(&oem_cap, sizeof(oem_cap));
 	sme_oem_get_capability(p_hdd_ctx->hHal, &oem_cap);
-	cdf_mem_copy(buf, &oem_cap, sizeof(oem_cap));
+	qdf_mem_copy(buf, &oem_cap, sizeof(oem_cap));
 
 	skb_put(skb, NLMSG_SPACE((sizeof(tAniMsgHdr) + ani_hdr->length)));
 	hdd_info("send rsp to oem-pid:%d for get_capability",
@@ -711,7 +711,7 @@
 
 	pPeerInfo = (tPeerStatusInfo *) ((char *)aniHdr + sizeof(tAniMsgHdr));
 
-	cdf_mem_copy(pPeerInfo->peer_mac_addr, peerMac->bytes,
+	qdf_mem_copy(pPeerInfo->peer_mac_addr, peerMac->bytes,
 		     sizeof(peerMac->bytes));
 	pPeerInfo->peer_status = peerStatus;
 	pPeerInfo->vdev_id = sessionId;
diff --git a/core/hdd/src/wlan_hdd_p2p.c b/core/hdd/src/wlan_hdd_p2p.c
index 391bcde..b82eaf0 100644
--- a/core/hdd/src/wlan_hdd_p2p.c
+++ b/core/hdd/src/wlan_hdd_p2p.c
@@ -260,11 +260,11 @@
 
 	if (pRemainChanCtx->action_pkt_buff.frame_ptr != NULL
 	    && pRemainChanCtx->action_pkt_buff.frame_length != 0) {
-		cdf_mem_free(pRemainChanCtx->action_pkt_buff.frame_ptr);
+		qdf_mem_free(pRemainChanCtx->action_pkt_buff.frame_ptr);
 		pRemainChanCtx->action_pkt_buff.frame_ptr = NULL;
 		pRemainChanCtx->action_pkt_buff.frame_length = 0;
 	}
-	cdf_mem_free(pRemainChanCtx);
+	qdf_mem_free(pRemainChanCtx);
 	complete(&pAdapter->cancel_rem_on_chan_var);
 	if (QDF_STATUS_SUCCESS != status)
 		complete(&pAdapter->rem_on_chan_ready_event);
@@ -451,12 +451,12 @@
 					&roc_ctx->hdd_remain_on_chan_timer);
 			if (roc_ctx->action_pkt_buff.frame_ptr != NULL
 				&& roc_ctx->action_pkt_buff.frame_length != 0) {
-				cdf_mem_free(
+				qdf_mem_free(
 					roc_ctx->action_pkt_buff.frame_ptr);
 				roc_ctx->action_pkt_buff.frame_ptr = NULL;
 				roc_ctx->action_pkt_buff.frame_length = 0;
 			}
-			cdf_mem_free(roc_ctx);
+			qdf_mem_free(roc_ctx);
 			adapter->is_roc_inprogress = false;
 		}
 		mutex_unlock(&cfg_state->remain_on_chan_ctx_lock);
@@ -576,7 +576,7 @@
 		cfgState->remain_on_chan_ctx = NULL;
 		pAdapter->is_roc_inprogress = false;
 		mutex_unlock(&cfgState->remain_on_chan_ctx_lock);
-		cdf_mem_free(pRemainChanCtx);
+		qdf_mem_free(pRemainChanCtx);
 		return -EINVAL;
 	}
 
@@ -624,7 +624,7 @@
 			mutex_unlock(&cfgState->remain_on_chan_ctx_lock);
 			qdf_mc_timer_destroy(
 				&pRemainChanCtx->hdd_remain_on_chan_timer);
-			cdf_mem_free(pRemainChanCtx);
+			qdf_mem_free(pRemainChanCtx);
 			hdd_allow_suspend(WIFI_POWER_EVENT_WAKELOCK_ROC);
 			return -EINVAL;
 		}
@@ -660,7 +660,7 @@
 			mutex_unlock(&cfgState->remain_on_chan_ctx_lock);
 			qdf_mc_timer_destroy(
 				&pRemainChanCtx->hdd_remain_on_chan_timer);
-			cdf_mem_free(pRemainChanCtx);
+			qdf_mem_free(pRemainChanCtx);
 			hdd_allow_suspend(WIFI_POWER_EVENT_WAKELOCK_ROC);
 			return -EINVAL;
 		}
@@ -709,7 +709,7 @@
 	 * so enqueue this RoC Request and execute sequentially later.
 	 */
 
-	hdd_roc_req = cdf_mem_malloc(sizeof(*hdd_roc_req));
+	hdd_roc_req = qdf_mem_malloc(sizeof(*hdd_roc_req));
 
 	if (NULL == hdd_roc_req) {
 		hddLog(LOGP, FL("malloc failed for roc req context"));
@@ -727,7 +727,7 @@
 
 	if (QDF_STATUS_SUCCESS != status) {
 		hddLog(LOGP, FL("Not able to enqueue RoC Req context"));
-		cdf_mem_free(hdd_roc_req);
+		qdf_mem_free(hdd_roc_req);
 		return -EINVAL;
 	}
 
@@ -811,9 +811,9 @@
 				FL("dropping RoC request"));
 		wlan_hdd_indicate_roc_drop(hdd_roc_req->pAdapter,
 					   hdd_roc_req->pRemainChanCtx);
-		cdf_mem_free(hdd_roc_req->pRemainChanCtx);
+		qdf_mem_free(hdd_roc_req->pRemainChanCtx);
 	}
-	cdf_mem_free(hdd_roc_req);
+	qdf_mem_free(hdd_roc_req);
 }
 
 static int wlan_hdd_request_remain_on_channel(struct wiphy *wiphy,
@@ -849,7 +849,7 @@
 		hddLog(LOGE, FL("Connection is in progress"));
 		isBusy = true;
 	}
-	pRemainChanCtx = cdf_mem_malloc(sizeof(hdd_remain_on_chan_ctx_t));
+	pRemainChanCtx = qdf_mem_malloc(sizeof(hdd_remain_on_chan_ctx_t));
 	if (NULL == pRemainChanCtx) {
 		hddLog(QDF_TRACE_LEVEL_FATAL,
 		       "%s: Not able to allocate memory for Channel context",
@@ -857,8 +857,8 @@
 		return -ENOMEM;
 	}
 
-	cdf_mem_zero(pRemainChanCtx, sizeof(*pRemainChanCtx));
-	cdf_mem_copy(&pRemainChanCtx->chan, chan,
+	qdf_mem_zero(pRemainChanCtx, sizeof(*pRemainChanCtx));
+	qdf_mem_copy(&pRemainChanCtx->chan, chan,
 		     sizeof(struct ieee80211_channel));
 	pRemainChanCtx->duration = duration;
 	pRemainChanCtx->dev = dev;
@@ -903,14 +903,14 @@
 		if (status == -EBUSY) {
 			if (wlan_hdd_roc_request_enqueue(pAdapter,
 							 pRemainChanCtx)) {
-				cdf_mem_free(pRemainChanCtx);
+				qdf_mem_free(pRemainChanCtx);
 				return -EAGAIN;
 			}
 		}
 		return 0;
 	} else {
 		if (wlan_hdd_roc_request_enqueue(pAdapter, pRemainChanCtx)) {
-			cdf_mem_free(pRemainChanCtx);
+			qdf_mem_free(pRemainChanCtx);
 			return -EAGAIN;
 		}
 	}
@@ -1063,7 +1063,7 @@
 					 frame_length, GFP_ATOMIC);
 #endif /* LINUX_VERSION_CODE */
 
-			cdf_mem_free(pRemainChanCtx->action_pkt_buff.frame_ptr);
+			qdf_mem_free(pRemainChanCtx->action_pkt_buff.frame_ptr);
 			pRemainChanCtx->action_pkt_buff.frame_length = 0;
 			pRemainChanCtx->action_pkt_buff.freq = 0;
 			pRemainChanCtx->action_pkt_buff.frame_ptr = NULL;
@@ -1112,8 +1112,8 @@
 						      curr_roc_req);
 			qdf_spin_unlock(&pHddCtx->hdd_roc_req_q_lock);
 			if (qdf_status == QDF_STATUS_SUCCESS) {
-				cdf_mem_free(curr_roc_req->pRemainChanCtx);
-				cdf_mem_free(curr_roc_req);
+				qdf_mem_free(curr_roc_req->pRemainChanCtx);
+				qdf_mem_free(curr_roc_req);
 			}
 			return 0;
 		}
@@ -1507,13 +1507,13 @@
 send_frame:
 
 	if (!noack) {
-		cfgState->buf = cdf_mem_malloc(len);    /* buf; */
+		cfgState->buf = qdf_mem_malloc(len);    /* buf; */
 		if (cfgState->buf == NULL)
 			return -ENOMEM;
 
 		cfgState->len = len;
 
-		cdf_mem_copy(cfgState->buf, buf, len);
+		qdf_mem_copy(cfgState->buf, buf, len);
 
 		mutex_lock(&cfgState->remain_on_chan_ctx_lock);
 
@@ -1685,7 +1685,7 @@
 		cfgState->buf, cfgState->len,
 		actionSendSuccess, GFP_KERNEL);
 
-	cdf_mem_free(cfgState->buf);
+	qdf_mem_free(cfgState->buf);
 	cfgState->buf = NULL;
 
 	complete(&pAdapter->tx_action_cnf_event);
@@ -2173,7 +2173,7 @@
 			/* Public action frame */
 			if ((pbFrames[WLAN_HDD_PUBLIC_ACTION_FRAME_OFFSET + 1]
 			     == SIR_MAC_ACTION_VENDOR_SPECIFIC) &&
-			    cdf_mem_compare(&pbFrames
+			    !qdf_mem_cmp(&pbFrames
 					    [WLAN_HDD_PUBLIC_ACTION_FRAME_OFFSET
 					     + 2], SIR_MAC_P2P_OUI,
 					    SIR_MAC_P2P_OUI_SIZE)) {
@@ -2297,9 +2297,9 @@
 								pRemainChanCtx->
 								action_pkt_buff.
 								frame_ptr =
-									cdf_mem_malloc
+									qdf_mem_malloc
 										(nFrameLength);
-								cdf_mem_copy
+								qdf_mem_copy
 									(pRemainChanCtx->
 									action_pkt_buff.
 									frame_ptr,
diff --git a/core/hdd/src/wlan_hdd_power.c b/core/hdd/src/wlan_hdd_power.c
index b26c9e8..61802fa 100644
--- a/core/hdd/src/wlan_hdd_power.c
+++ b/core/hdd/src/wlan_hdd_power.c
@@ -112,7 +112,7 @@
 		     pHddStaCtx->conn_info.connState)
 		    && (GTK_OFFLOAD_ENABLE ==
 			pHddStaCtx->gtkOffloadReqParams.ulFlags)) {
-			cdf_mem_copy(&hddGtkOffloadReqParams,
+			qdf_mem_copy(&hddGtkOffloadReqParams,
 				     &pHddStaCtx->gtkOffloadReqParams,
 				     sizeof(tSirGtkOffloadParams));
 
@@ -317,7 +317,7 @@
 				switch (scope) {
 				case IPV6_ADDR_SCOPE_GLOBAL:
 				case IPV6_ADDR_SCOPE_LINKLOCAL:
-					cdf_mem_copy(&selfIPv6Addr[count],
+					qdf_mem_copy(&selfIPv6Addr[count],
 						&ifp->addr.s6_addr,
 						sizeof(ifp->addr.s6_addr));
 					selfIPv6AddrValid[count] =
@@ -335,7 +335,7 @@
 				}
 			}
 			/* read_unlock_bh(&in6_dev->lock); */
-			cdf_mem_zero(&offLoadRequest, sizeof(offLoadRequest));
+			qdf_mem_zero(&offLoadRequest, sizeof(offLoadRequest));
 			for (i = 0; i < count; i++) {
 				/* Filling up the request structure
 				 * Filling the selfIPv6Addr with solicited address
@@ -358,7 +358,7 @@
 				offLoadRequest.nsOffloadInfo.selfIPv6Addr[i][15] =
 					selfIPv6Addr[i][15];
 				offLoadRequest.nsOffloadInfo.slotIdx = i;
-				cdf_mem_copy(&offLoadRequest.nsOffloadInfo.targetIPv6Addr[i],
+				qdf_mem_copy(&offLoadRequest.nsOffloadInfo.targetIPv6Addr[i],
 					&selfIPv6Addr[i][0], SIR_MAC_IPV6_ADDR_LEN);
 
 				offLoadRequest.nsOffloadInfo.targetIPv6AddrValid[i] =
@@ -377,7 +377,7 @@
 						SIR_OFFLOAD_NS_AND_MCAST_FILTER_ENABLE;
 				}
 
-				cdf_mem_copy(&offLoadRequest.params.hostIpv6Addr,
+				qdf_mem_copy(&offLoadRequest.params.hostIpv6Addr,
 					&offLoadRequest.nsOffloadInfo.targetIPv6Addr[i],
 					SIR_MAC_IPV6_ADDR_LEN);
 
@@ -404,7 +404,7 @@
 		}
 	} else {
 		/* Disable NSOffload */
-		cdf_mem_zero((void *)&offLoadRequest, sizeof(tSirHostOffloadReq));
+		qdf_mem_zero((void *)&offLoadRequest, sizeof(tSirHostOffloadReq));
 		offLoadRequest.enableOrDisable = SIR_OFFLOAD_DISABLE;
 		offLoadRequest.offloadType =  SIR_IPV6_NS_OFFLOAD;
 
@@ -765,7 +765,7 @@
 
 		return QDF_STATUS_SUCCESS;
 	} else {
-		cdf_mem_zero((void *)&offLoadRequest,
+		qdf_mem_zero((void *)&offLoadRequest,
 			     sizeof(tSirHostOffloadReq));
 		offLoadRequest.enableOrDisable = SIR_OFFLOAD_DISABLE;
 		offLoadRequest.offloadType = SIR_IPV4_ARP_REPLY_OFFLOAD;
@@ -834,7 +834,7 @@
 {
 	QDF_STATUS cdf_ret_status = QDF_STATUS_E_FAILURE;
 	tpSirWlanSetRxpFilters wlanRxpFilterParam =
-		cdf_mem_malloc(sizeof(tSirWlanSetRxpFilters));
+		qdf_mem_malloc(sizeof(tSirWlanSetRxpFilters));
 	if (NULL == wlanRxpFilterParam) {
 		hddLog(QDF_TRACE_LEVEL_FATAL,
 		       "%s: cdf_mem_alloc failed ", __func__);
@@ -868,7 +868,7 @@
 		wlanRxpFilterParam->setMcstBcstFilter);
 
 	if (QDF_STATUS_SUCCESS != cdf_ret_status)
-		cdf_mem_free(wlanRxpFilterParam);
+		qdf_mem_free(wlanRxpFilterParam);
 }
 
 #ifdef WLAN_FEATURE_PACKET_FILTERING
@@ -903,13 +903,13 @@
 		       FL("gMCAddrListEnable is not enabled in INI"));
 		return;
 	}
-	pMulticastAddrs = cdf_mem_malloc(sizeof(tSirRcvFltMcAddrList));
+	pMulticastAddrs = qdf_mem_malloc(sizeof(tSirRcvFltMcAddrList));
 	if (NULL == pMulticastAddrs) {
 		hddLog(QDF_TRACE_LEVEL_ERROR,
 		       FL("Could not allocate Memory"));
 		return;
 	}
-	cdf_mem_zero(pMulticastAddrs, sizeof(tSirRcvFltMcAddrList));
+	qdf_mem_zero(pMulticastAddrs, sizeof(tSirRcvFltMcAddrList));
 	pMulticastAddrs->action = set;
 
 	if (set) {
@@ -964,7 +964,7 @@
 	       pMulticastAddrs->ulMulticastAddrCnt);
 
 	pAdapter->mc_addr_list.isFilterApplied = set ? true : false;
-	cdf_mem_free(pMulticastAddrs);
+	qdf_mem_free(pMulticastAddrs);
 	return;
 }
 #endif
diff --git a/core/hdd/src/wlan_hdd_scan.c b/core/hdd/src/wlan_hdd_scan.c
index b965b7a..be7d6df 100644
--- a/core/hdd/src/wlan_hdd_scan.c
+++ b/core/hdd/src/wlan_hdd_scan.c
@@ -112,7 +112,7 @@
 	struct iw_event event;
 
 	*last_event = *current_event;
-	cdf_mem_zero(&event, sizeof(struct iw_event));
+	qdf_mem_zero(&event, sizeof(struct iw_event));
 	event.cmd = cmd;
 	event.u.data.flags = 1;
 	event.u.data.length = length;
@@ -219,12 +219,12 @@
 
 	error = 0;
 	last_event = current_event;
-	cdf_mem_zero(&event, sizeof(event));
+	qdf_mem_zero(&event, sizeof(event));
 
 	/* BSSID */
 	event.cmd = SIOCGIWAP;
 	event.u.ap_addr.sa_family = ARPHRD_ETHER;
-	cdf_mem_copy(event.u.ap_addr.sa_data, descriptor->bssId,
+	qdf_mem_copy(event.u.ap_addr.sa_data, descriptor->bssId,
 		     sizeof(descriptor->bssId));
 	current_event = iwe_stream_add_event(scanInfo->info, current_event, end,
 					     &event, IW_EV_ADDR_LEN);
@@ -237,7 +237,7 @@
 	}
 
 	last_event = current_event;
-	cdf_mem_zero(&event, sizeof(struct iw_event));
+	qdf_mem_zero(&event, sizeof(struct iw_event));
 
 	/* Protocol Name */
 	event.cmd = SIOCGIWNAME;
@@ -273,7 +273,7 @@
 	}
 
 	last_event = current_event;
-	cdf_mem_zero(&event, sizeof(struct iw_event));
+	qdf_mem_zero(&event, sizeof(struct iw_event));
 
 	/*Freq */
 	event.cmd = SIOCGIWFREQ;
@@ -291,7 +291,7 @@
 	}
 
 	last_event = current_event;
-	cdf_mem_zero(&event, sizeof(struct iw_event));
+	qdf_mem_zero(&event, sizeof(struct iw_event));
 
 	/* BSS Mode */
 	event.cmd = SIOCGIWMODE;
@@ -341,7 +341,7 @@
 
 		if (pDot11SSID->present) {
 			last_event = current_event;
-			cdf_mem_zero(&event, sizeof(struct iw_event));
+			qdf_mem_zero(&event, sizeof(struct iw_event));
 
 			event.cmd = SIOCGIWESSID;
 			event.u.data.flags = 1;
@@ -369,7 +369,7 @@
 
 		last_event = current_event;
 		current_pad = current_event + IW_EV_LCP_LEN;
-		cdf_mem_zero(&event, sizeof(struct iw_event));
+		qdf_mem_zero(&event, sizeof(struct iw_event));
 
 		/*Rates */
 		event.cmd = SIOCGIWRATE;
@@ -444,7 +444,7 @@
 		}
 
 		last_event = current_event;
-		cdf_mem_zero(&event, sizeof(struct iw_event));
+		qdf_mem_zero(&event, sizeof(struct iw_event));
 
 		event.cmd = SIOCGIWENCODE;
 
@@ -467,7 +467,7 @@
 	}
 
 	last_event = current_event;
-	cdf_mem_zero(&event, sizeof(struct iw_event));
+	qdf_mem_zero(&event, sizeof(struct iw_event));
 
 	/* RSSI */
 	event.cmd = IWEVQUAL;
@@ -526,7 +526,7 @@
 	QDF_STATUS status;
 
 	ENTER();
-	hdd_scan_req = cdf_mem_malloc(sizeof(*hdd_scan_req));
+	hdd_scan_req = qdf_mem_malloc(sizeof(*hdd_scan_req));
 	if (NULL == hdd_scan_req) {
 		hddLog(LOGP, FL("malloc failed for Scan req"));
 		return -ENOMEM;
@@ -545,7 +545,7 @@
 
 	if (QDF_STATUS_SUCCESS != status) {
 		hdd_err("Failed to enqueue Scan Req");
-		cdf_mem_free(hdd_scan_req);
+		qdf_mem_free(hdd_scan_req);
 		return -EINVAL;
 	}
 	EXIT();
@@ -599,7 +599,7 @@
 				*req = hdd_scan_req->scan_request;
 				*source = hdd_scan_req->source;
 				*timestamp = hdd_scan_req->timestamp;
-				cdf_mem_free(hdd_scan_req);
+				qdf_mem_free(hdd_scan_req);
 				qdf_spin_unlock(&hdd_ctx->hdd_scan_req_q_lock);
 				hdd_info("removed Scan id: %d, req = %p",
 					scan_id, req);
@@ -734,7 +734,7 @@
 		}
 	}
 
-	cdf_mem_zero(&scanRequest, sizeof(scanRequest));
+	qdf_mem_zero(&scanRequest, sizeof(scanRequest));
 
 	if (NULL != wrqu->data.pointer) {
 		/* set scanType, active or passive */
@@ -746,7 +746,7 @@
 		}
 
 		/* set bssid using sockaddr from iw_scan_req */
-		cdf_mem_copy(scanRequest.bssid.bytes,
+		qdf_mem_copy(scanRequest.bssid.bytes,
 			     &scanReq->bssid.sa_data,
 			     QDF_MAC_ADDR_SIZE);
 
@@ -756,11 +756,11 @@
 				scanRequest.SSIDs.numOfSSIDs = 1;
 				scanRequest.SSIDs.SSIDList =
 					(tCsrSSIDInfo *)
-					cdf_mem_malloc(sizeof(tCsrSSIDInfo));
+					qdf_mem_malloc(sizeof(tCsrSSIDInfo));
 				if (scanRequest.SSIDs.SSIDList) {
 					scanRequest.SSIDs.SSIDList->SSID.
 					length = scanReq->essid_len;
-					cdf_mem_copy(scanRequest.SSIDs.
+					qdf_mem_copy(scanRequest.SSIDs.
 						     SSIDList->SSID.ssId,
 						     scanReq->essid,
 						     scanReq->essid_len);
@@ -845,7 +845,7 @@
 	pAdapter->scan_info.mScanPending = true;
 error:
 	if ((wrqu->data.flags & IW_SCAN_THIS_ESSID) && (scanReq->essid_len))
-		cdf_mem_free(scanRequest.SSIDs.SSIDList);
+		qdf_mem_free(scanRequest.SSIDs.SSIDList);
 	EXIT();
 	return status;
 }
@@ -1014,7 +1014,7 @@
 
 	if (WLAN_HDD_ADAPTER_MAGIC != adapter->magic) {
 		hdd_err("Invalid adapter magic");
-		cdf_mem_free(req);
+		qdf_mem_free(req);
 		return;
 	}
 	skb = cfg80211_vendor_event_alloc(hddctx->wiphy, NULL,
@@ -1024,7 +1024,7 @@
 
 	if (!skb) {
 		hdd_err("skb alloc failed");
-		cdf_mem_free(req);
+		qdf_mem_free(req);
 		return;
 	}
 
@@ -1069,12 +1069,12 @@
 		goto nla_put_failure;
 
 	cfg80211_vendor_event(skb, GFP_KERNEL);
-	cdf_mem_free(req);
+	qdf_mem_free(req);
 	return;
 
 nla_put_failure:
 	kfree_skb(skb);
-	cdf_mem_free(req);
+	qdf_mem_free(req);
 	return;
 }
 
@@ -1346,7 +1346,7 @@
 		return -EBUSY;
 	}
 
-	cdf_mem_zero(&scan_req, sizeof(scan_req));
+	qdf_mem_zero(&scan_req, sizeof(scan_req));
 
 	hddLog(LOG1, "scan request for ssid = %d", request->n_ssids);
 	scan_req.timestamp = qdf_mc_timer_get_system_ticks();
@@ -1366,7 +1366,7 @@
 		scan_req.SSIDs.numOfSSIDs = request->n_ssids;
 		/* Allocate num_ssid tCsrSSIDInfo structure */
 		SsidInfo = scan_req.SSIDs.SSIDList =
-			cdf_mem_malloc(request->n_ssids * sizeof(tCsrSSIDInfo));
+			qdf_mem_malloc(request->n_ssids * sizeof(tCsrSSIDInfo));
 
 		if (NULL == scan_req.SSIDs.SSIDList) {
 			hddLog(LOGE, FL("memory alloc failed SSIDInfo buffer"));
@@ -1377,7 +1377,7 @@
 		for (j = 0; j < request->n_ssids; j++, SsidInfo++) {
 			/* get the ssid length */
 			SsidInfo->SSID.length = request->ssids[j].ssid_len;
-			cdf_mem_copy(SsidInfo->SSID.ssId,
+			qdf_mem_copy(SsidInfo->SSID.ssId,
 				     &request->ssids[j].ssid[0],
 				     SsidInfo->SSID.length);
 			SsidInfo->SSID.ssId[SsidInfo->SSID.length] = '\0';
@@ -1416,7 +1416,7 @@
 	if (request->n_channels) {
 		char chList[(request->n_channels * 5) + 1];
 		int len;
-		channelList = cdf_mem_malloc(request->n_channels);
+		channelList = qdf_mem_malloc(request->n_channels);
 		if (NULL == channelList) {
 			hddLog(LOGE,
 			       FL("channelList malloc failed channelList"));
@@ -1573,10 +1573,10 @@
 
 free_mem:
 	if (scan_req.SSIDs.SSIDList)
-		cdf_mem_free(scan_req.SSIDs.SSIDList);
+		qdf_mem_free(scan_req.SSIDs.SSIDList);
 
 	if (channelList)
-		cdf_mem_free(channelList);
+		qdf_mem_free(channelList);
 
 	EXIT();
 	return status;
@@ -1759,7 +1759,7 @@
 	len = sizeof(*request) + (sizeof(*request->ssids) * n_ssid) +
 			(sizeof(*request->channels) * n_channels) + ie_len;
 
-	request = cdf_mem_malloc(len);
+	request = qdf_mem_malloc(len);
 	if (!request)
 		goto error;
 	if (n_ssid)
@@ -1864,7 +1864,7 @@
 	return ret;
 error:
 	hdd_err("Scan Request Failed");
-	cdf_mem_free(request);
+	qdf_mem_free(request);
 	return -EINVAL;
 }
 
@@ -2084,9 +2084,9 @@
 		return -ENOTSUPP;
 	}
 
-	pPnoRequest = (tpSirPNOScanReq) cdf_mem_malloc(sizeof(tSirPNOScanReq));
+	pPnoRequest = (tpSirPNOScanReq) qdf_mem_malloc(sizeof(tSirPNOScanReq));
 	if (NULL == pPnoRequest) {
-		hddLog(LOGE, FL("cdf_mem_malloc failed"));
+		hddLog(LOGE, FL("qdf_mem_malloc failed"));
 		return -ENOMEM;
 	}
 
@@ -2260,7 +2260,7 @@
 	hddLog(LOG1, FL("PNO scanRequest offloaded"));
 
 error:
-	cdf_mem_free(pPnoRequest);
+	qdf_mem_free(pPnoRequest);
 	EXIT();
 	return ret;
 }
@@ -2345,9 +2345,9 @@
 		return -EINVAL;
 	}
 
-	pPnoRequest = (tpSirPNOScanReq) cdf_mem_malloc(sizeof(tSirPNOScanReq));
+	pPnoRequest = (tpSirPNOScanReq) qdf_mem_malloc(sizeof(tSirPNOScanReq));
 	if (NULL == pPnoRequest) {
-		hddLog(LOGE, FL("cdf_mem_malloc failed"));
+		hddLog(LOGE, FL("qdf_mem_malloc failed"));
 		return -ENOMEM;
 	}
 
@@ -2368,7 +2368,7 @@
 
 	hddLog(LOG1, FL("PNO scan disabled"));
 
-	cdf_mem_free(pPnoRequest);
+	qdf_mem_free(pPnoRequest);
 
 	EXIT();
 	return ret;
diff --git a/core/hdd/src/wlan_hdd_softap_tx_rx.c b/core/hdd/src/wlan_hdd_softap_tx_rx.c
index 5404b33..a39a5dc 100644
--- a/core/hdd/src/wlan_hdd_softap_tx_rx.c
+++ b/core/hdd/src/wlan_hdd_softap_tx_rx.c
@@ -298,7 +298,7 @@
 	++pAdapter->stats.tx_packets;
 
 	/* Zero out skb's context buffer for the driver to use */
-	cdf_mem_set(skb->cb, sizeof(skb->cb), 0);
+	qdf_mem_set(skb->cb, sizeof(skb->cb), 0);
 	NBUF_CB_TX_PACKET_TRACK(skb) = NBUF_TX_PKT_DATA_TRACK;
 	NBUF_UPDATE_TX_PKT_COUNT(skb, NBUF_TX_PKT_HDD);
 
@@ -400,12 +400,12 @@
 
 	uint8_t STAId = 0;
 
-	cdf_mem_zero(&pAdapter->stats, sizeof(struct net_device_stats));
+	qdf_mem_zero(&pAdapter->stats, sizeof(struct net_device_stats));
 
 	spin_lock_init(&pAdapter->staInfo_lock);
 
 	for (STAId = 0; STAId < WLAN_MAX_STA_COUNT; STAId++) {
-		cdf_mem_zero(&pAdapter->aStaInfo[STAId],
+		qdf_mem_zero(&pAdapter->aStaInfo[STAId],
 			     sizeof(hdd_station_info_t));
 	}
 
@@ -446,7 +446,7 @@
 		return QDF_STATUS_E_FAILURE;
 	}
 
-	cdf_mem_zero(&pAdapter->aStaInfo[STAId], sizeof(hdd_station_info_t));
+	qdf_mem_zero(&pAdapter->aStaInfo[STAId], sizeof(hdd_station_info_t));
 
 	pAdapter->aStaInfo[STAId].isUsed = true;
 	pAdapter->aStaInfo[STAId].isDeauthInProgress = false;
@@ -633,7 +633,7 @@
 
 	if (pAdapter->aStaInfo[staId].isUsed) {
 		spin_lock_bh(&pAdapter->staInfo_lock);
-		cdf_mem_zero(&pAdapter->aStaInfo[staId],
+		qdf_mem_zero(&pAdapter->aStaInfo[staId],
 			     sizeof(hdd_station_info_t));
 		spin_unlock_bh(&pAdapter->staInfo_lock);
 	}
@@ -907,7 +907,7 @@
 	uint8_t i;
 
 	for (i = 0; i < WLAN_MAX_STA_COUNT; i++) {
-		if (cdf_mem_compare
+		if (!qdf_mem_cmp
 			(&pAdapter->aStaInfo[i].macAddrSTA, pMacAddress,
 			QDF_MAC_ADDR_SIZE) && pAdapter->aStaInfo[i].isUsed) {
 			*staId = i;
diff --git a/core/hdd/src/wlan_hdd_stats.c b/core/hdd/src/wlan_hdd_stats.c
index 93333ba..0ae9540 100644
--- a/core/hdd/src/wlan_hdd_stats.c
+++ b/core/hdd/src/wlan_hdd_stats.c
@@ -587,7 +587,7 @@
 			pInfo->state = WIFI_ASSOCIATED;
 			qdf_copy_macaddr(&pInfo->bssid,
 					 &pHddStaCtx->conn_info.bssId);
-			cdf_mem_copy(pInfo->ssid,
+			qdf_mem_copy(pInfo->ssid,
 				     pHddStaCtx->conn_info.SSID.SSID.ssId,
 				     pHddStaCtx->conn_info.SSID.SSID.length);
 			/*
@@ -597,10 +597,10 @@
 		}
 	}
 
-	cdf_mem_copy(pInfo->countryStr,
+	qdf_mem_copy(pInfo->countryStr,
 		     pMac->scan.countryCodeCurrent, WNI_CFG_COUNTRY_CODE_LEN);
 
-	cdf_mem_copy(pInfo->apCountryStr,
+	qdf_mem_copy(pInfo->apCountryStr,
 		     pMac->scan.countryCodeCurrent, WNI_CFG_COUNTRY_CODE_LEN);
 
 	return true;
diff --git a/core/hdd/src/wlan_hdd_tdls.c b/core/hdd/src/wlan_hdd_tdls.c
index 67e0c26..3261943 100644
--- a/core/hdd/src/wlan_hdd_tdls.c
+++ b/core/hdd/src/wlan_hdd_tdls.c
@@ -390,7 +390,7 @@
 		list_for_each_safe(pos, q, head) {
 			tmp = list_entry(pos, hddTdlsPeer_t, node);
 			list_del(pos);
-			cdf_mem_free(tmp);
+			qdf_mem_free(tmp);
 			tmp = NULL;
 		}
 	}
@@ -496,7 +496,7 @@
 			peer = list_entry(pos, hddTdlsPeer_t, node);
 			if (false == peer->isForcedPeer) {
 				list_del(pos);
-				cdf_mem_free(peer);
+				qdf_mem_free(peer);
 			} else {
 				peer->link_status = eTDLS_LINK_IDLE;
 				peer->reason = eTDLS_LINK_UNSPECIFIED;
@@ -572,7 +572,7 @@
 	 * with the memory allocations.
 	 */
 	if (NULL == pAdapter->sessionCtx.station.pHddTdlsCtx) {
-		pHddTdlsCtx = cdf_mem_malloc(sizeof(tdlsCtx_t));
+		pHddTdlsCtx = qdf_mem_malloc(sizeof(tdlsCtx_t));
 
 		if (NULL == pHddTdlsCtx) {
 			pAdapter->sessionCtx.station.pHddTdlsCtx = NULL;
@@ -581,7 +581,7 @@
 			return -ENOMEM;
 		}
 		/* initialize TDLS pAdater context */
-		cdf_mem_zero(pHddTdlsCtx, sizeof(tdlsCtx_t));
+		qdf_mem_zero(pHddTdlsCtx, sizeof(tdlsCtx_t));
 
 		qdf_mc_timer_init(&pHddTdlsCtx->peerDiscoveryTimeoutTimer,
 				  QDF_TIMER_TYPE_SW,
@@ -623,7 +623,7 @@
 	for (staIdx = 0; staIdx < pHddCtx->max_num_tdls_sta; staIdx++) {
 		pHddCtx->tdlsConnInfo[staIdx].staId = 0;
 		pHddCtx->tdlsConnInfo[staIdx].sessionId = 255;
-		cdf_mem_zero(&pHddCtx->tdlsConnInfo[staIdx].peerMac,
+		qdf_mem_zero(&pHddCtx->tdlsConnInfo[staIdx].peerMac,
 			     QDF_MAC_ADDR_SIZE);
 	}
 
@@ -677,12 +677,12 @@
 	 * which would try to acquire sme lock.
 	 */
 	mutex_unlock(&pHddCtx->tdls_lock);
-	tInfo = cdf_mem_malloc(sizeof(tdlsInfo_t));
+	tInfo = qdf_mem_malloc(sizeof(tdlsInfo_t));
 	if (NULL == tInfo) {
 		hddLog(QDF_TRACE_LEVEL_ERROR,
 		       FL("cdf_mem_alloc failed for tInfo"));
 		qdf_mc_timer_destroy(&pHddTdlsCtx->peerDiscoveryTimeoutTimer);
-		cdf_mem_free(pHddTdlsCtx);
+		qdf_mem_free(pHddTdlsCtx);
 		return -ENOMEM;
 	}
 
@@ -724,9 +724,9 @@
 
 	cdf_ret_status = sme_update_fw_tdls_state(pHddCtx->hHal, tInfo, true);
 	if (QDF_STATUS_SUCCESS != cdf_ret_status) {
-		cdf_mem_free(tInfo);
+		qdf_mem_free(tInfo);
 		qdf_mc_timer_destroy(&pHddTdlsCtx->peerDiscoveryTimeoutTimer);
-		cdf_mem_free(pHddTdlsCtx);
+		qdf_mem_free(pHddTdlsCtx);
 		return -EINVAL;
 	}
 
@@ -787,7 +787,7 @@
 	/* No need to post message during driver unlaod because MC thread is
 	   already shutdown */
 	if (!cds_is_driver_unloading()) {
-		tInfo = cdf_mem_malloc(sizeof(tdlsInfo_t));
+		tInfo = qdf_mem_malloc(sizeof(tdlsInfo_t));
 		if (NULL != tInfo) {
 			tInfo->vdev_id = pAdapter->sessionId;
 			tInfo->tdls_state = eTDLS_SUPPORT_DISABLED;
@@ -827,7 +827,7 @@
 			cdf_ret_status =
 				sme_update_fw_tdls_state(pHddCtx->hHal, tInfo, false);
 			if (QDF_STATUS_SUCCESS != cdf_ret_status) {
-				cdf_mem_free(tInfo);
+				qdf_mem_free(tInfo);
 			}
 		} else {
 			hddLog(QDF_TRACE_LEVEL_ERROR,
@@ -838,7 +838,7 @@
 	pHddTdlsCtx->magic = 0;
 	pHddTdlsCtx->pAdapter = NULL;
 
-	cdf_mem_free(pHddTdlsCtx);
+	qdf_mem_free(pHddTdlsCtx);
 	pAdapter->sessionCtx.station.pHddTdlsCtx = NULL;
 	pHddTdlsCtx = NULL;
 
@@ -897,7 +897,7 @@
 	}
 
 	/* not found, allocate and add the list */
-	peer = cdf_mem_malloc(sizeof(hddTdlsPeer_t));
+	peer = qdf_mem_malloc(sizeof(hddTdlsPeer_t));
 	if (NULL == peer) {
 		hddLog(QDF_TRACE_LEVEL_ERROR, "%s peer malloc failed!",
 		       __func__);
@@ -909,7 +909,7 @@
 	pHddTdlsCtx = WLAN_HDD_GET_TDLS_CTX_PTR(pAdapter);
 
 	if (NULL == pHddTdlsCtx) {
-		cdf_mem_free(peer);
+		qdf_mem_free(peer);
 		mutex_unlock(&pHddCtx->tdls_lock);
 		hddLog(LOG1, FL("pHddTdlsCtx is NULL"));
 		return NULL;
@@ -918,8 +918,8 @@
 	key = wlan_hdd_tdls_hash_key(mac);
 	head = &pHddTdlsCtx->peer_list[key];
 
-	cdf_mem_zero(peer, sizeof(hddTdlsPeer_t));
-	cdf_mem_copy(peer->peerMac, mac, sizeof(peer->peerMac));
+	qdf_mem_zero(peer, sizeof(hddTdlsPeer_t));
+	qdf_mem_copy(peer->peerMac, mac, sizeof(peer->peerMac));
 	peer->pHddTdlsCtx = pHddTdlsCtx;
 	peer->pref_off_chan_num = pHddCtx->config->fTDLSPrefOffChanNum;
 	peer->op_class_for_pref_off_chan =
@@ -1201,13 +1201,13 @@
 	curr_peer->isBufSta = isBufSta;
 	curr_peer->isOffChannelSupported = isOffChannelSupported;
 
-	cdf_mem_copy(curr_peer->supported_channels,
+	qdf_mem_copy(curr_peer->supported_channels,
 		     StaParams->supported_channels,
 		     StaParams->supported_channels_len);
 
 	curr_peer->supported_channels_len = StaParams->supported_channels_len;
 
-	cdf_mem_copy(curr_peer->supported_oper_classes,
+	qdf_mem_copy(curr_peer->supported_oper_classes,
 		     StaParams->supported_oper_classes,
 		     StaParams->supported_oper_classes_len);
 
@@ -1245,14 +1245,14 @@
 	tdlsLinkEstablishParams->isOffChannelSupported =
 		curr_peer->isOffChannelSupported;
 
-	cdf_mem_copy(tdlsLinkEstablishParams->supportedChannels,
+	qdf_mem_copy(tdlsLinkEstablishParams->supportedChannels,
 		     curr_peer->supported_channels,
 		     curr_peer->supported_channels_len);
 
 	tdlsLinkEstablishParams->supportedChannelsLen =
 		curr_peer->supported_channels_len;
 
-	cdf_mem_copy(tdlsLinkEstablishParams->supportedOperClasses,
+	qdf_mem_copy(tdlsLinkEstablishParams->supportedOperClasses,
 		     curr_peer->supported_oper_classes,
 		     curr_peer->supported_oper_classes_len);
 
@@ -1628,7 +1628,7 @@
 
 	wlan_hdd_tdls_set_mode(pHddCtx, req_tdls_mode, true);
 
-	tdlsParams = cdf_mem_malloc(sizeof(tdlsInfo_t));
+	tdlsParams = qdf_mem_malloc(sizeof(tdlsInfo_t));
 	if (NULL == tdlsParams) {
 		hddLog(QDF_TRACE_LEVEL_ERROR,
 		       "%s: cdf_mem_alloc failed for tdlsParams", __func__);
@@ -1667,7 +1667,7 @@
 
 	cdf_ret_status = sme_update_fw_tdls_state(pHddCtx->hHal, tdlsParams, true);
 	if (QDF_STATUS_SUCCESS != cdf_ret_status) {
-		cdf_mem_free(tdlsParams);
+		qdf_mem_free(tdlsParams);
 		return -EINVAL;
 	}
 
@@ -1724,7 +1724,7 @@
 			hdd_ctx->tdls_mode = eTDLS_SUPPORT_ENABLED;
 	}
 	mutex_unlock(&hdd_ctx->tdls_lock);
-	tdls_param = cdf_mem_malloc(sizeof(*tdls_param));
+	tdls_param = qdf_mem_malloc(sizeof(*tdls_param));
 	if (!tdls_param) {
 		hddLog(QDF_TRACE_LEVEL_ERROR,
 			FL("memory allocation failed for tdlsParams"));
@@ -1778,7 +1778,7 @@
 					       tdls_param,
 					       true);
 	if (QDF_STATUS_SUCCESS != cdf_ret_status) {
-		cdf_mem_free(tdls_param);
+		qdf_mem_free(tdls_param);
 		return;
 	}
 	return;
@@ -1859,7 +1859,7 @@
 	hdd_context_t *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 
 	sme_tdls_peer_state_params.vdevId = adapter->sessionId;
-	cdf_mem_copy(&sme_tdls_peer_state_params.peerMacAddr, mac,
+	qdf_mem_copy(&sme_tdls_peer_state_params.peerMacAddr, mac,
 		     sizeof(sme_tdls_peer_state_params.peerMacAddr));
 	sme_tdls_peer_state_params.peerState = peer_state;
 	status = sme_update_tdls_peer_state(hdd_ctx->hHal,
@@ -2436,7 +2436,7 @@
 		goto done;
 	}
 
-	cdf_mem_copy(&peer_mac, curr_peer->peerMac, sizeof(peer_mac));
+	qdf_mem_copy(&peer_mac, curr_peer->peerMac, sizeof(peer_mac));
 
 	mutex_unlock(&pHddCtx->tdls_lock);
 
@@ -3801,7 +3801,7 @@
 			}
 		}
 	}
-	cdf_mem_copy(peerMac, peer, 6);
+	qdf_mem_copy(peerMac, peer, 6);
 
 	hddLog(LOG1,
 		  "%s: " MAC_ADDRESS_STR
@@ -4272,13 +4272,13 @@
 			if (QDF_STATUS_SUCCESS == status) {
 				uint8_t i;
 
-				cdf_mem_zero(&smeTdlsPeerStateParams,
+				qdf_mem_zero(&smeTdlsPeerStateParams,
 					     sizeof
 					     (tSmeTdlsPeerStateParams));
 
 				smeTdlsPeerStateParams.vdevId =
 					pAdapter->sessionId;
-				cdf_mem_copy(&smeTdlsPeerStateParams.
+				qdf_mem_copy(&smeTdlsPeerStateParams.
 					     peerMacAddr,
 					     &pTdlsPeer->peerMac,
 					     sizeof(tSirMacAddr));
@@ -4818,7 +4818,7 @@
 	chan_switch_params.tdls_off_ch_mode = offchanmode;
 	chan_switch_params.is_responder =
 		conn_peer->is_responder;
-	cdf_mem_copy(&chan_switch_params.peer_mac_addr,
+	qdf_mem_copy(&chan_switch_params.peer_mac_addr,
 		     &conn_peer->peerMac,
 		     sizeof(tSirMacAddr));
 	hdd_log(LOG1,
diff --git a/core/hdd/src/wlan_hdd_tx_rx.c b/core/hdd/src/wlan_hdd_tx_rx.c
index 749ebdd..d176b81 100644
--- a/core/hdd/src/wlan_hdd_tx_rx.c
+++ b/core/hdd/src/wlan_hdd_tx_rx.c
@@ -475,7 +475,7 @@
 	++pAdapter->stats.tx_packets;
 
 	/* Zero out skb's context buffer for the driver to use */
-	cdf_mem_set(skb->cb, sizeof(skb->cb), 0);
+	qdf_mem_set(skb->cb, sizeof(skb->cb), 0);
 	NBUF_CB_TX_PACKET_TRACK(skb) = NBUF_TX_PKT_DATA_TRACK;
 	NBUF_UPDATE_TX_PKT_COUNT(skb, NBUF_TX_PKT_HDD);
 
@@ -531,7 +531,7 @@
 	uint8_t idx;
 
 	for (idx = 0; idx < MAX_IBSS_PEERS; idx++) {
-		if (cdf_mem_compare(&pHddStaCtx->conn_info.peerMacAddress[idx],
+		if (!qdf_mem_cmp(&pHddStaCtx->conn_info.peerMacAddress[idx],
 				    pMacAddress, QDF_MAC_ADDR_SIZE)) {
 			*staId = pHddStaCtx->conn_info.staId[idx];
 			return QDF_STATUS_SUCCESS;
@@ -802,10 +802,10 @@
 	eapol_params->event_sub_type = event_type;
 	eapol_params->eapol_rate = 0;/* As of now, zero */
 
-	cdf_mem_copy(eapol_params->dest_addr,
+	qdf_mem_copy(eapol_params->dest_addr,
 			(skb->data + HDD_EAPOL_DEST_MAC_OFFSET),
 			sizeof(eapol_params->dest_addr));
-	cdf_mem_copy(eapol_params->src_addr,
+	qdf_mem_copy(eapol_params->src_addr,
 			(skb->data + HDD_EAPOL_SRC_MAC_OFFSET),
 			sizeof(eapol_params->src_addr));
 	return 0;
@@ -828,10 +828,10 @@
 	wlan_diag_event.eapol_packet_type = eapol_params.eapol_packet_type;
 	wlan_diag_event.eapol_key_info = eapol_params.eapol_key_info;
 	wlan_diag_event.eapol_rate = eapol_params.eapol_rate;
-	cdf_mem_copy(wlan_diag_event.dest_addr,
+	qdf_mem_copy(wlan_diag_event.dest_addr,
 			eapol_params.dest_addr,
 			sizeof(wlan_diag_event.dest_addr));
-	cdf_mem_copy(wlan_diag_event.src_addr,
+	qdf_mem_copy(wlan_diag_event.src_addr,
 			eapol_params.src_addr,
 			sizeof(wlan_diag_event.src_addr));
 
diff --git a/core/hdd/src/wlan_hdd_wext.c b/core/hdd/src/wlan_hdd_wext.c
index b91a1f3..daa2cb4 100644
--- a/core/hdd/src/wlan_hdd_wext.c
+++ b/core/hdd/src/wlan_hdd_wext.c
@@ -1340,7 +1340,7 @@
 		hddLog(QDF_TRACE_LEVEL_ERROR, "%s: pAdapter is NULL", __func__);
 		return QDF_STATUS_E_FAULT;
 	}
-	linkspeed_req = cdf_mem_malloc(sizeof(*linkspeed_req));
+	linkspeed_req = qdf_mem_malloc(sizeof(*linkspeed_req));
 	if (NULL == linkspeed_req) {
 		QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR,
 			  "%s Request Buffer Alloc Fail", __func__);
@@ -1358,7 +1358,7 @@
 		hddLog(QDF_TRACE_LEVEL_ERROR,
 		       "%s: Unable to retrieve statistics for link speed",
 		       __func__);
-		cdf_mem_free(linkspeed_req);
+		qdf_mem_free(linkspeed_req);
 	} else {
 		rc = wait_for_completion_timeout
 			(&context.completion,
@@ -1471,17 +1471,17 @@
 		/* copy the stats into the cache we keep in the
 		 * adapter instance structure
 		 */
-		cdf_mem_copy(&pStatsCache->summary_stat, pSummaryStats,
+		qdf_mem_copy(&pStatsCache->summary_stat, pSummaryStats,
 			     sizeof(pStatsCache->summary_stat));
-		cdf_mem_copy(&pStatsCache->ClassA_stat, pClassAStats,
+		qdf_mem_copy(&pStatsCache->ClassA_stat, pClassAStats,
 			     sizeof(pStatsCache->ClassA_stat));
-		cdf_mem_copy(&pStatsCache->ClassB_stat, pClassBStats,
+		qdf_mem_copy(&pStatsCache->ClassB_stat, pClassBStats,
 			     sizeof(pStatsCache->ClassB_stat));
-		cdf_mem_copy(&pStatsCache->ClassC_stat, pClassCStats,
+		qdf_mem_copy(&pStatsCache->ClassC_stat, pClassCStats,
 			     sizeof(pStatsCache->ClassC_stat));
-		cdf_mem_copy(&pStatsCache->ClassD_stat, pClassDStats,
+		qdf_mem_copy(&pStatsCache->ClassD_stat, pClassDStats,
 			     sizeof(pStatsCache->ClassD_stat));
-		cdf_mem_copy(&pStatsCache->perStaStats, pPerStaStats,
+		qdf_mem_copy(&pStatsCache->perStaStats, pPerStaStats,
 			     sizeof(pStatsCache->perStaStats));
 	}
 
@@ -2645,7 +2645,7 @@
 		       __func__);
 		return -EFAULT;
 	}
-	cdf_mem_copy(extra, (void *)genIeBytes, length);
+	qdf_mem_copy(extra, (void *)genIeBytes, length);
 	wrqu->data.length = length;
 
 	hddLog(LOG1, "%s: RSN IE of %d bytes returned", __func__,
@@ -2717,7 +2717,7 @@
 	if (pRoamProfile->Keys.KeyLength[keyId] > 0) {
 		dwrq->flags |= IW_ENCODE_ENABLED;
 		dwrq->length = pRoamProfile->Keys.KeyLength[keyId];
-		cdf_mem_copy(extra, &(pRoamProfile->Keys.KeyMaterial[keyId][0]),
+		qdf_mem_copy(extra, &(pRoamProfile->Keys.KeyMaterial[keyId][0]),
 			     pRoamProfile->Keys.KeyLength[keyId]);
 
 		dwrq->flags |= (keyId + 1);
@@ -3884,7 +3884,7 @@
 		     || (eCSR_AUTH_TYPE_SHARED_KEY ==
 			 pHddStaCtx->conn_info.authType))) {
 
-			cdf_mem_copy(&pWextState->roamProfile.Keys.
+			qdf_mem_copy(&pWextState->roamProfile.Keys.
 				     KeyMaterial[keyId][0], extra, key_length);
 
 			pWextState->roamProfile.Keys.KeyLength[keyId] =
@@ -3959,7 +3959,7 @@
 	if (pRoamProfile->Keys.KeyLength[keyId] > 0) {
 		dwrq->flags |= IW_ENCODE_ENABLED;
 		dwrq->length = pRoamProfile->Keys.KeyLength[keyId];
-		cdf_mem_copy(extra, &(pRoamProfile->Keys.KeyMaterial[keyId][0]),
+		qdf_mem_copy(extra, &(pRoamProfile->Keys.KeyMaterial[keyId][0]),
 			     pRoamProfile->Keys.KeyLength[keyId]);
 	} else {
 		dwrq->flags |= IW_ENCODE_DISABLED;
@@ -4080,7 +4080,7 @@
 			    && (ext->key_len <=
 				eCSR_SECURITY_WEP_KEYSIZE_MAX_BYTES)
 			    && key_index < CSR_MAX_NUM_KEY) {
-				cdf_mem_copy(&pRoamProfile->Keys.
+				qdf_mem_copy(&pRoamProfile->Keys.
 					     KeyMaterial[key_index][0],
 					     ext->key, ext->key_len);
 				pRoamProfile->Keys.KeyLength[key_index] =
@@ -4095,13 +4095,13 @@
 		return ret;
 	}
 
-	cdf_mem_zero(&setKey, sizeof(tCsrRoamSetKey));
+	qdf_mem_zero(&setKey, sizeof(tCsrRoamSetKey));
 
 	setKey.keyId = key_index;
 	setKey.keyLength = ext->key_len;
 
 	if (ext->key_len <= CSR_MAX_KEY_LEN) {
-		cdf_mem_copy(&setKey.Key[0], ext->key, ext->key_len);
+		qdf_mem_copy(&setKey.Key[0], ext->key, ext->key_len);
 	}
 
 	if (ext->ext_flags & IW_ENCODE_EXT_GROUP_KEY) {
@@ -4111,7 +4111,7 @@
 	} else {
 
 		setKey.keyDirection = eSIR_TX_RX;
-		cdf_mem_copy(setKey.peerMac.bytes, ext->addr.sa_data,
+		qdf_mem_copy(setKey.peerMac.bytes, ext->addr.sa_data,
 			     QDF_MAC_ADDR_SIZE);
 	}
 
@@ -4135,7 +4135,7 @@
 
 		setKey.encType = eCSR_ENCRYPT_TYPE_TKIP;
 
-		cdf_mem_zero(pKey, CSR_MAX_KEY_LEN);
+		qdf_mem_zero(pKey, CSR_MAX_KEY_LEN);
 
 		/* Supplicant sends the 32bytes key in this order
 		 * |--------------|----------|----------|
@@ -4152,13 +4152,13 @@
 		 */
 
 		/* Copy the Temporal Key 1 (TK1) */
-		cdf_mem_copy(pKey, ext->key, 16);
+		qdf_mem_copy(pKey, ext->key, 16);
 
 		/* Copy the rx mic first */
-		cdf_mem_copy(&pKey[16], &ext->key[24], 8);
+		qdf_mem_copy(&pKey[16], &ext->key[24], 8);
 
 		/* Copy the tx mic */
-		cdf_mem_copy(&pKey[24], &ext->key[16], 8);
+		qdf_mem_copy(&pKey[24], &ext->key[16], 8);
 
 	}
 	break;
@@ -6247,7 +6247,7 @@
 				neighborReq.ssid.length =
 					(s_priv_data.length - 1) >
 					32 ? 32 : (s_priv_data.length - 1);
-				cdf_mem_copy(neighborReq.ssid.ssId,
+				qdf_mem_copy(neighborReq.ssid.ssId,
 					     pBuffer,
 					     neighborReq.ssid.length);
 			}
@@ -7903,7 +7903,7 @@
 			       apps_args[1]);
 			return -EINVAL;
 		}
-		unitTestArgs = cdf_mem_malloc(sizeof(*unitTestArgs));
+		unitTestArgs = qdf_mem_malloc(sizeof(*unitTestArgs));
 		if (NULL == unitTestArgs) {
 			hddLog(LOGE,
 			       FL("cdf_mem_alloc failed for unitTestArgs"));
@@ -7920,7 +7920,7 @@
 		msg.bodyptr = unitTestArgs;
 		if (QDF_STATUS_SUCCESS !=
 		    cds_mq_post_message(QDF_MODULE_ID_WMA, &msg)) {
-			cdf_mem_free(unitTestArgs);
+			qdf_mem_free(unitTestArgs);
 			QDF_TRACE(QDF_MODULE_ID_HDD,
 				  QDF_TRACE_LEVEL_ERROR,
 				  FL
diff --git a/core/hdd/src/wlan_hdd_wowl.c b/core/hdd/src/wlan_hdd_wowl.c
index 9f516fd..209e7fc 100644
--- a/core/hdd/src/wlan_hdd_wowl.c
+++ b/core/hdd/src/wlan_hdd_wowl.c
@@ -516,7 +516,7 @@
 	QDF_STATUS cdf_ret_status;
 	tHalHandle hHal = WLAN_HDD_GET_HAL_CTX(pAdapter);
 
-	cdf_mem_zero(&wowParams, sizeof(tSirSmeWowlEnterParams));
+	qdf_mem_zero(&wowParams, sizeof(tSirSmeWowlEnterParams));
 
 	wowParams.ucPatternFilteringEnable = enable_pbm;
 	wowParams.ucMagicPktEnable = enable_mp;
diff --git a/core/mac/src/cfg/cfg_api.c b/core/mac/src/cfg/cfg_api.c
index e557843..1a62f21 100644
--- a/core/mac/src/cfg/cfg_api.c
+++ b/core/mac/src/cfg/cfg_api.c
@@ -150,7 +150,7 @@
 		return eSIR_MEM_ALLOC_FAILED;
 	}
 	/* at this point pMac->cfg.gCfgSBuf starts */
-	pMac->cfg.gCfgSBuf = cdf_mem_malloc(combined_buff_size);
+	pMac->cfg.gCfgSBuf = qdf_mem_malloc(combined_buff_size);
 	if (NULL == pMac->cfg.gCfgSBuf) {
 		cfg_log(pMac, LOGE,
 			FL("Failed to allocate memory for cfg array"));
@@ -163,13 +163,13 @@
 	/* after max_i_count integers, pMac->cfg.gCfgIBufMax starts */
 	pMac->cfg.gCfgIBufMax = &pMac->cfg.gCfgIBufMin[max_i_count];
 
-	return (eSIR_SUCCESS);
+	return eSIR_SUCCESS;
 }
 
 /* ---------------------------------------------------------------------- */
 void cfg_de_init(tpAniSirGlobal pMac)
 {
-	cdf_mem_free(pMac->cfg.gCfgSBuf);
+	qdf_mem_free(pMac->cfg.gCfgSBuf);
 	pMac->cfg.gCfgIBufMin = NULL;
 	pMac->cfg.gCfgIBufMax = NULL;
 	pMac->cfg.gCfgIBuf = NULL;
@@ -599,7 +599,7 @@
 		goto error;
 	}
 
-	pCountryInfo = cdf_mem_malloc(cfgLength);
+	pCountryInfo = qdf_mem_malloc(cfgLength);
 	if (NULL == pCountryInfo) {
 		cfg_log(pMac, LOGP, FL(" failed to allocate memory"));
 		goto error;
@@ -609,7 +609,7 @@
 	 */
 	if (wlan_cfg_get_str(pMac, cfgId, pCountryInfo, &cfgLength) !=
 	    eSIR_SUCCESS) {
-		cdf_mem_free(pCountryInfo);
+		qdf_mem_free(pCountryInfo);
 		pCountryInfo = NULL;
 
 		cfg_log(pMac, LOGP,
@@ -633,7 +633,7 @@
 
 error:
 	if (NULL != pCountryInfo)
-		cdf_mem_free(pCountryInfo);
+		qdf_mem_free(pCountryInfo);
 
 	return maxTxPwr;
 }
@@ -694,7 +694,7 @@
 
 	maxTxPwr = cfg_get_dot11d_transmit_power(pMac, cfgId, cfgLength, channel);
 
-	return (maxTxPwr);
+	return maxTxPwr;
 }
 
 /* --------------------------------------------------------------------- */
diff --git a/core/mac/src/cfg/cfg_proc_msg.c b/core/mac/src/cfg/cfg_proc_msg.c
index ebc8506..4c9969b 100644
--- a/core/mac/src/cfg/cfg_proc_msg.c
+++ b/core/mac/src/cfg/cfg_proc_msg.c
@@ -1822,7 +1822,7 @@
 	index = CFG_GET_FUNC_INDX(pMsg->type);
 
 	if (index >= QDF_ARRAY_SIZE(g_cfg_func)) {
-		cdf_mem_free(pMsg);
+		qdf_mem_free(pMsg);
 		return;
 	}
 	len = pMsg->msgLen - WNI_CFG_MB_HDR_LEN;
@@ -1832,7 +1832,7 @@
 	g_cfg_func[index] (pMac, len, pParam);
 
 	/* Free up buffer */
-	cdf_mem_free(pMsg);
+	qdf_mem_free(pMsg);
 
 } /*** end cfg_process_mb_msg() ***/
 
diff --git a/core/mac/src/cfg/cfg_send_msg.c b/core/mac/src/cfg/cfg_send_msg.c
index ebad7c7..a50652c 100644
--- a/core/mac/src/cfg/cfg_send_msg.c
+++ b/core/mac/src/cfg/cfg_send_msg.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2014-2015 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012, 2014-2016 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -92,7 +92,7 @@
 		return;
 	}
 	/* Allocate message buffer */
-	pMsg = cdf_mem_malloc(msgLen);
+	pMsg = qdf_mem_malloc(msgLen);
 	if (NULL == pMsg) {
 		PELOGE(cfg_log(pMac, LOGE, FL("Memory allocation failure!"));)
 		return;
@@ -129,7 +129,7 @@
 
 	default:
 		PELOGE(cfg_log(pMac, LOGE, FL("Unknown msg %d!"), (int)msgType);)
-		cdf_mem_free(pMsg);
+		qdf_mem_free(pMsg);
 		return;
 	}
 
diff --git a/core/mac/src/dph/dph_hash_table.c b/core/mac/src/dph/dph_hash_table.c
index e1bbe39..0e592d1 100644
--- a/core/mac/src/dph/dph_hash_table.c
+++ b/core/mac/src/dph/dph_hash_table.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012-2014 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2016 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -104,7 +104,7 @@
 	for (i = 0; i < 6; i++)
 		sum += staAddr[i];
 
-	return (sum % numSta);
+	return sum % numSta;
 }
 
 /* --------------------------------------------------------------------- */
@@ -250,7 +250,7 @@
 		       (pMac, LOG1, FL("Assoc Id %d, Addr %08X"), assocId, pStaDs);
 	       )
 	/* Clear the STA node except for the next pointer (last 4 bytes) */
-	cdf_mem_set((uint8_t *) pStaDs,
+	qdf_mem_set((uint8_t *) pStaDs,
 		    sizeof(tDphHashNode) - sizeof(tpDphHashNode), 0);
 
 	/* Initialize the assocId */
@@ -261,7 +261,7 @@
 		pStaDs->staIndex = STA_INVALID_IDX;
 
 	/* Initialize STA mac address */
-	cdf_mem_copy(pStaDs->staAddr, staAddr, sizeof(tSirMacAddr));
+	qdf_mem_copy(pStaDs->staAddr, staAddr, sizeof(tSirMacAddr));
 
 	/* Initialize fragmentation threshold */
 	if (wlan_cfg_get_int(pMac, WNI_CFG_FRAGMENTATION_THRESHOLD, &val) !=
diff --git a/core/mac/src/pe/lim/lim_admit_control.c b/core/mac/src/pe/lim/lim_admit_control.c
index 7dd6fca..a0644c3 100644
--- a/core/mac/src/pe/lim/lim_admit_control.c
+++ b/core/mac/src/pe/lim/lim_admit_control.c
@@ -433,10 +433,10 @@
 	for (ctspec = 0; ctspec < LIM_NUM_TSPEC_MAX; ctspec++, pTspecList++) {
 		if ((pTspecList->inuse)
 		    &&
-		    (cdf_mem_compare
+		    (!qdf_mem_cmp
 			     (pAddr, pTspecList->staAddr, sizeof(pTspecList->staAddr)))
 		    &&
-		    (cdf_mem_compare
+		    (!qdf_mem_cmp
 			     ((uint8_t *) pTspecIE, (uint8_t *) &pTspecList->tspec,
 			     sizeof(tSirMacTspecIE)))) {
 			*ppInfo = pTspecList;
@@ -479,7 +479,7 @@
 		if ((pTspecList->inuse)
 		    && (assocId == pTspecList->assocId)
 		    &&
-		    (cdf_mem_compare
+		    (!qdf_mem_cmp
 			     ((uint8_t *) pTspecIE, (uint8_t *) &pTspecList->tspec,
 			     sizeof(tSirMacTspecIE)))) {
 			*ppInfo = pTspecList;
@@ -597,7 +597,7 @@
 	/* update the tspec info */
 	pTspecList->tspec = *pTspec;
 	pTspecList->assocId = assocId;
-	cdf_mem_copy(pTspecList->staAddr, pAddr, sizeof(pTspecList->staAddr));
+	qdf_mem_copy(pTspecList->staAddr, pAddr, sizeof(pTspecList->staAddr));
 
 	/* for edca tspec's, we are all done */
 	if (pTspec->tsinfo.traffic.accessPolicy == SIR_MAC_ACCESSPOLICY_EDCA) {
@@ -747,7 +747,7 @@
 	}
 	/* fill in a schedule if requested */
 	if (pSch != NULL) {
-		cdf_mem_set((uint8_t *) pSch, sizeof(*pSch), 0);
+		qdf_mem_set((uint8_t *) pSch, sizeof(*pSch), 0);
 		pSch->svcStartTime = pAddts->tspec.svcStartTime;
 		pSch->svcInterval = svcInterval;
 		pSch->maxSvcDuration = (uint16_t) pSch->svcInterval;    /* use SP = SI */
@@ -854,7 +854,7 @@
    -------------------------------------------------------------*/
 tSirRetStatus lim_admit_control_init(tpAniSirGlobal pMac)
 {
-	cdf_mem_set(pMac->lim.tspecInfo,
+	qdf_mem_set(pMac->lim.tspecInfo,
 		    LIM_NUM_TSPEC_MAX * sizeof(tLimTspecInfo), 0);
 	return eSIR_SUCCESS;
 }
@@ -925,16 +925,16 @@
 		return eSIR_FAILURE;
 	}
 
-	pAddTsParam = cdf_mem_malloc(sizeof(tAddTsParams));
+	pAddTsParam = qdf_mem_malloc(sizeof(tAddTsParams));
 	if (NULL == pAddTsParam) {
 		PELOGW(lim_log(pMac, LOGW, FL("AllocateMemory() failed"));)
 		return eSIR_MEM_ALLOC_FAILED;
 	}
 
-	cdf_mem_set((uint8_t *) pAddTsParam, sizeof(tAddTsParams), 0);
+	qdf_mem_set((uint8_t *) pAddTsParam, sizeof(tAddTsParams), 0);
 	pAddTsParam->staIdx = staIdx;
 	pAddTsParam->tspecIdx = tspecIdx;
-	cdf_mem_copy(&pAddTsParam->tspec, &tspecIE, sizeof(tSirMacTspecIE));
+	qdf_mem_copy(&pAddTsParam->tspec, &tspecIE, sizeof(tSirMacTspecIE));
 	pAddTsParam->sessionId = sessionId;
 	pAddTsParam->sme_session_id = psessionEntry->smeSessionId;
 
@@ -960,7 +960,7 @@
 	if (eSIR_SUCCESS != wma_post_ctrl_msg(pMac, &msg)) {
 		lim_log(pMac, LOGW, FL("wma_post_ctrl_msg() failed"));
 		SET_LIM_PROCESS_DEFD_MESGS(pMac, true);
-		cdf_mem_free(pAddTsParam);
+		qdf_mem_free(pAddTsParam);
 		return eSIR_FAILURE;
 	}
 	return eSIR_SUCCESS;
@@ -986,7 +986,7 @@
 	tpDelTsParams pDelTsParam;
 	tpPESession psessionEntry = NULL;
 
-	pDelTsParam = cdf_mem_malloc(sizeof(tDelTsParams));
+	pDelTsParam = qdf_mem_malloc(sizeof(tDelTsParams));
 	if (NULL == pDelTsParam) {
 		lim_log(pMac, LOGP, FL("AllocateMemory() failed"));
 		return eSIR_MEM_ALLOC_FAILED;
@@ -995,12 +995,12 @@
 	msg.type = WMA_DEL_TS_REQ;
 	msg.bodyptr = pDelTsParam;
 	msg.bodyval = 0;
-	cdf_mem_set((uint8_t *) pDelTsParam, sizeof(tDelTsParams), 0);
+	qdf_mem_set((uint8_t *) pDelTsParam, sizeof(tDelTsParams), 0);
 
 	/* filling message parameters. */
 	pDelTsParam->staIdx = staIdx;
 	pDelTsParam->tspecIdx = tspecIdx;
-	cdf_mem_copy(&pDelTsParam->bssId, bssId, sizeof(tSirMacAddr));
+	qdf_mem_copy(&pDelTsParam->bssId, bssId, sizeof(tSirMacAddr));
 
 	psessionEntry = pe_find_session_by_session_id(pMac, sessionId);
 	if (psessionEntry == NULL) {
@@ -1019,7 +1019,7 @@
 #ifdef WLAN_FEATURE_ROAM_OFFLOAD
 	if (pMac->roam.configParam.isRoamOffloadEnabled &&
 	    psessionEntry->is11Rconnection) {
-		cdf_mem_copy(&pDelTsParam->delTsInfo, &delts,
+		qdf_mem_copy(&pDelTsParam->delTsInfo, &delts,
 			     sizeof(tSirDeltsReqInfo));
 		pDelTsParam->setRICparams = 1;
 	}
@@ -1035,7 +1035,7 @@
 	return eSIR_SUCCESS;
 
 err:
-	cdf_mem_free(pDelTsParam);
+	qdf_mem_free(pDelTsParam);
 	return eSIR_FAILURE;
 }
 
@@ -1134,6 +1134,6 @@
 
 end:
 	if (pAddTsRspMsg != NULL)
-		cdf_mem_free(pAddTsRspMsg);
+		qdf_mem_free(pAddTsRspMsg);
 	return;
 }
diff --git a/core/mac/src/pe/lim/lim_api.c b/core/mac/src/pe/lim/lim_api.c
index 4bdfe04..4281255 100644
--- a/core/mac/src/pe/lim/lim_api.c
+++ b/core/mac/src/pe/lim/lim_api.c
@@ -94,15 +94,15 @@
 	pMac->lim.gLimRestoreCBNumScanInterval =
 		LIM_RESTORE_CB_NUM_SCAN_INTERVAL_DEFAULT;
 	pMac->lim.gLimRestoreCBCount = 0;
-	cdf_mem_set(pMac->lim.gLimLegacyBssidList,
+	qdf_mem_set(pMac->lim.gLimLegacyBssidList,
 		    sizeof(pMac->lim.gLimLegacyBssidList), 0);
 
 	/* Fill in default values */
 
 	/* abort scan is used to abort an on-going scan */
 	pMac->lim.abortScan = 0;
-	cdf_mem_set(&pMac->lim.scanChnInfo, sizeof(tLimScanChnInfo), 0);
-	cdf_mem_set(&pMac->lim.dfschannelList, sizeof(tSirDFSChannelList), 0);
+	qdf_mem_set(&pMac->lim.scanChnInfo, sizeof(tLimScanChnInfo), 0);
+	qdf_mem_set(&pMac->lim.dfschannelList, sizeof(tSirDFSChannelList), 0);
 
 /* WLAN_SUSPEND_LINK Related */
 	pMac->lim.gpLimSuspendCallback = NULL;
@@ -112,7 +112,7 @@
 
 static void __lim_init_bss_vars(tpAniSirGlobal pMac)
 {
-	cdf_mem_set((void *)pMac->lim.gpSession,
+	qdf_mem_set((void *)pMac->lim.gpSession,
 		    sizeof(*pMac->lim.gpSession) * pMac->lim.maxBssId, 0);
 
 	/* This is for testing purposes only, be default should always be off */
@@ -133,14 +133,14 @@
 	/* Heart-Beat interval value */
 	pMac->lim.gLimHeartBeatCount = 0;
 
-	cdf_mem_zero(pMac->lim.gLimHeartBeatApMac[0],
+	qdf_mem_zero(pMac->lim.gLimHeartBeatApMac[0],
 			sizeof(tSirMacAddr));
-	cdf_mem_zero(pMac->lim.gLimHeartBeatApMac[1],
+	qdf_mem_zero(pMac->lim.gLimHeartBeatApMac[1],
 			sizeof(tSirMacAddr));
 	pMac->lim.gLimHeartBeatApMacIndex = 0;
 
 	/* Statistics to keep track of no. beacons rcvd in heart beat interval */
-	cdf_mem_set(pMac->lim.gLimHeartBeatBeaconStats,
+	qdf_mem_set(pMac->lim.gLimHeartBeatBeaconStats,
 		    sizeof(pMac->lim.gLimHeartBeatBeaconStats), 0);
 
 #ifdef WLAN_DEBUG
@@ -151,7 +151,7 @@
 	pMac->lim.numLearn = 0;
 	pMac->lim.numLearnIgnore = 0;
 	pMac->lim.numSme = 0;
-	cdf_mem_set(pMac->lim.numMAC, sizeof(pMac->lim.numMAC), 0);
+	qdf_mem_set(pMac->lim.numMAC, sizeof(pMac->lim.numMAC), 0);
 	pMac->lim.gLimNumAssocReqDropInvldState = 0;
 	pMac->lim.gLimNumAssocReqDropACRejectTS = 0;
 	pMac->lim.gLimNumAssocReqDropACRejectSta = 0;
@@ -195,22 +195,22 @@
 	 * when SME_START_BSS_REQ is received.
 	 */
 
-	cdf_mem_set(&pMac->lim.gLimOverlap11gParams, sizeof(tLimProtStaParams),
+	qdf_mem_set(&pMac->lim.gLimOverlap11gParams, sizeof(tLimProtStaParams),
 		    0);
-	cdf_mem_set(&pMac->lim.gLimOverlap11aParams, sizeof(tLimProtStaParams),
+	qdf_mem_set(&pMac->lim.gLimOverlap11aParams, sizeof(tLimProtStaParams),
 		    0);
-	cdf_mem_set(&pMac->lim.gLimOverlapHt20Params, sizeof(tLimProtStaParams),
+	qdf_mem_set(&pMac->lim.gLimOverlapHt20Params, sizeof(tLimProtStaParams),
 		    0);
-	cdf_mem_set(&pMac->lim.gLimOverlapNonGfParams,
+	qdf_mem_set(&pMac->lim.gLimOverlapNonGfParams,
 		    sizeof(tLimProtStaParams), 0);
-	cdf_mem_set(&pMac->lim.gLimNoShortParams, sizeof(tLimNoShortParams), 0);
-	cdf_mem_set(&pMac->lim.gLimNoShortSlotParams,
+	qdf_mem_set(&pMac->lim.gLimNoShortParams, sizeof(tLimNoShortParams), 0);
+	qdf_mem_set(&pMac->lim.gLimNoShortSlotParams,
 		    sizeof(tLimNoShortSlotParams), 0);
 
 	pMac->lim.gLimPhyMode = 0;
 	pMac->lim.scanStartTime = 0;    /* used to measure scan time */
 
-	cdf_mem_set(pMac->lim.gLimMyMacAddr, sizeof(pMac->lim.gLimMyMacAddr),
+	qdf_mem_set(pMac->lim.gLimMyMacAddr, sizeof(pMac->lim.gLimMyMacAddr),
 		    0);
 	pMac->lim.ackPolicy = 0;
 
@@ -223,15 +223,15 @@
 
 
 	/* Deferred Queue Paramters */
-	cdf_mem_set(&pMac->lim.gLimDeferredMsgQ, sizeof(tSirAddtsReq), 0);
+	qdf_mem_set(&pMac->lim.gLimDeferredMsgQ, sizeof(tSirAddtsReq), 0);
 
 	/* addts request if any - only one can be outstanding at any time */
-	cdf_mem_set(&pMac->lim.gLimAddtsReq, sizeof(tSirAddtsReq), 0);
+	qdf_mem_set(&pMac->lim.gLimAddtsReq, sizeof(tSirAddtsReq), 0);
 	pMac->lim.gLimAddtsSent = 0;
 	pMac->lim.gLimAddtsRspTimerCount = 0;
 
 	/* protection related config cache */
-	cdf_mem_set(&pMac->lim.cfgProtection, sizeof(tCfgProtection), 0);
+	qdf_mem_set(&pMac->lim.cfgProtection, sizeof(tCfgProtection), 0);
 	pMac->lim.gLimProtectionControl = 0;
 	SET_LIM_PROCESS_DEFD_MESGS(pMac, true);
 
@@ -247,11 +247,11 @@
 	pMac->lim.pDialogueTokenHead = NULL;
 	pMac->lim.pDialogueTokenTail = NULL;
 
-	cdf_mem_set(&pMac->lim.tspecInfo,
+	qdf_mem_set(&pMac->lim.tspecInfo,
 		    sizeof(tLimTspecInfo) * LIM_NUM_TSPEC_MAX, 0);
 
 	/* admission control policy information */
-	cdf_mem_set(&pMac->lim.admitPolicyInfo, sizeof(tLimAdmitPolicyInfo), 0);
+	qdf_mem_set(&pMac->lim.admitPolicyInfo, sizeof(tLimAdmitPolicyInfo), 0);
 
 	pMac->lim.gLastBeaconDtimCount = 0;
 	pMac->lim.gLastBeaconDtimPeriod = 0;
@@ -279,9 +279,9 @@
 	/* / MAC level Pre-authentication related globals */
 	pMac->lim.gLimPreAuthChannelNumber = 0;
 	pMac->lim.gLimPreAuthType = eSIR_OPEN_SYSTEM;
-	cdf_mem_set(&pMac->lim.gLimPreAuthPeerAddr, sizeof(tSirMacAddr), 0);
+	qdf_mem_set(&pMac->lim.gLimPreAuthPeerAddr, sizeof(tSirMacAddr), 0);
 	pMac->lim.gLimNumPreAuthContexts = 0;
-	cdf_mem_set(&pMac->lim.gLimPreAuthTimerTable, sizeof(tLimPreAuthTable),
+	qdf_mem_set(&pMac->lim.gLimPreAuthTimerTable, sizeof(tLimPreAuthTable),
 		    0);
 
 	/* Placed holder to deauth reason */
@@ -296,9 +296,9 @@
 	pMac->lim.gLimDisassocFrameCredit = 0;
 
 	/* One cache for each overlap and associated case. */
-	cdf_mem_set(pMac->lim.protStaOverlapCache,
+	qdf_mem_set(pMac->lim.protStaOverlapCache,
 		    sizeof(tCacheParams) * LIM_PROT_STA_OVERLAP_CACHE_SIZE, 0);
-	cdf_mem_set(pMac->lim.protStaCache,
+	qdf_mem_set(pMac->lim.protStaCache,
 		    sizeof(tCacheParams) * LIM_PROT_STA_CACHE_SIZE, 0);
 
 	pMac->lim.pSessionEntry = NULL;
@@ -663,7 +663,7 @@
 			QDF_STATUS_SUCCESS) {
 			QDF_TRACE(QDF_MODULE_ID_PE, QDF_TRACE_LEVEL_INFO,
 			FL("Fixing leak! Deallocating pLimMgmtRegistration node"));
-			cdf_mem_free(pLimMgmtRegistration);
+			qdf_mem_free(pLimMgmtRegistration);
 		}
 		qdf_mutex_release(&pMac->lim.lim_frame_register_lock);
 		qdf_list_destroy(&pMac->lim.gLimMgmtFrameRegistratinQueue);
@@ -673,7 +673,7 @@
 
 	/* free up preAuth table */
 	if (pMac->lim.gLimPreAuthTimerTable.pTable != NULL) {
-		cdf_mem_free(pMac->lim.gLimPreAuthTimerTable.pTable);
+		qdf_mem_free(pMac->lim.gLimPreAuthTimerTable.pTable);
 		pMac->lim.gLimPreAuthTimerTable.pTable = NULL;
 		pMac->lim.gLimPreAuthTimerTable.numEntry = 0;
 	}
@@ -683,27 +683,27 @@
 	}
 
 	if (NULL != pMac->lim.pDialogueTokenTail) {
-		cdf_mem_free(pMac->lim.pDialogueTokenTail);
+		qdf_mem_free(pMac->lim.pDialogueTokenTail);
 		pMac->lim.pDialogueTokenTail = NULL;
 	}
 
 	if (pMac->lim.gpLimMlmSetKeysReq != NULL) {
-		cdf_mem_free(pMac->lim.gpLimMlmSetKeysReq);
+		qdf_mem_free(pMac->lim.gpLimMlmSetKeysReq);
 		pMac->lim.gpLimMlmSetKeysReq = NULL;
 	}
 
 	if (pMac->lim.gpLimMlmAuthReq != NULL) {
-		cdf_mem_free(pMac->lim.gpLimMlmAuthReq);
+		qdf_mem_free(pMac->lim.gpLimMlmAuthReq);
 		pMac->lim.gpLimMlmAuthReq = NULL;
 	}
 
 	if (pMac->lim.gpDefdSmeMsgForNOA != NULL) {
-		cdf_mem_free(pMac->lim.gpDefdSmeMsgForNOA);
+		qdf_mem_free(pMac->lim.gpDefdSmeMsgForNOA);
 		pMac->lim.gpDefdSmeMsgForNOA = NULL;
 	}
 
 	if (pMac->lim.gpLimMlmScanReq != NULL) {
-		cdf_mem_free(pMac->lim.gpLimMlmScanReq);
+		qdf_mem_free(pMac->lim.gpLimMlmScanReq);
 		pMac->lim.gpLimMlmScanReq = NULL;
 	}
 	/* Now, finally reset the deferred message queue pointers */
@@ -744,7 +744,7 @@
 	}
 
 	pMac->lim.limTimers.gpLimCnfWaitTimer =
-		cdf_mem_malloc(sizeof(TX_TIMER) * (pMac->lim.maxStation + 1));
+		qdf_mem_malloc(sizeof(TX_TIMER) * (pMac->lim.maxStation + 1));
 	if (NULL == pMac->lim.limTimers.gpLimCnfWaitTimer) {
 		PELOGE(lim_log(pMac, LOGE,
 			FL("gpLimCnfWaitTimer memory allocate failed!"));)
@@ -752,7 +752,7 @@
 	}
 
 	pMac->lim.gpSession =
-		cdf_mem_malloc(sizeof(tPESession) * pMac->lim.maxBssId);
+		qdf_mem_malloc(sizeof(tPESession) * pMac->lim.maxBssId);
 	if (NULL == pMac->lim.gpSession) {
 		lim_log(pMac, LOGE,
 			FL("gpSession memory allocate failed!"));
@@ -760,7 +760,7 @@
 		goto pe_open_psession_fail;
 	}
 
-	cdf_mem_set(pMac->lim.gpSession,
+	qdf_mem_set(pMac->lim.gpSession,
 		    sizeof(tPESession) * pMac->lim.maxBssId, 0);
 
 	pMac->lim.mgmtFrameSessionId = 0xff;
@@ -786,10 +786,10 @@
 	return status; /* status here will be eSIR_SUCCESS */
 
 pe_open_lock_fail:
-	cdf_mem_free(pMac->lim.gpSession);
+	qdf_mem_free(pMac->lim.gpSession);
 	pMac->lim.gpSession = NULL;
 pe_open_psession_fail:
-	cdf_mem_free(pMac->lim.limTimers.gpLimCnfWaitTimer);
+	qdf_mem_free(pMac->lim.limTimers.gpLimCnfWaitTimer);
 	pMac->lim.limTimers.gpLimCnfWaitTimer = NULL;
 
 	return status;
@@ -814,20 +814,20 @@
 			pe_delete_session(pMac, &pMac->lim.gpSession[i]);
 		}
 	}
-	cdf_mem_free(pMac->lim.limTimers.gpLimCnfWaitTimer);
+	qdf_mem_free(pMac->lim.limTimers.gpLimCnfWaitTimer);
 	pMac->lim.limTimers.gpLimCnfWaitTimer = NULL;
 
 	if (pMac->lim.gpLimMlmOemDataReq) {
 		if (pMac->lim.gpLimMlmOemDataReq->data) {
-			cdf_mem_free(
+			qdf_mem_free(
 				pMac->lim.gpLimMlmOemDataReq->data);
 			pMac->lim.gpLimMlmOemDataReq->data = NULL;
 		}
-		cdf_mem_free(pMac->lim.gpLimMlmOemDataReq);
+		qdf_mem_free(pMac->lim.gpLimMlmOemDataReq);
 		pMac->lim.gpLimMlmOemDataReq = NULL;
 	}
 
-	cdf_mem_free(pMac->lim.gpSession);
+	qdf_mem_free(pMac->lim.gpSession);
 	pMac->lim.gpSession = NULL;
 	if (!QDF_IS_STATUS_SUCCESS
 		    (qdf_mutex_destroy(&pMac->lim.lkPeGlobalLock))) {
@@ -883,7 +883,7 @@
 				cds_pkt_return_packet((cds_pkt_t *) pMsg->
 						      bodyptr);
 			} else {
-				cdf_mem_free((void *)pMsg->bodyptr);
+				qdf_mem_free((void *)pMsg->bodyptr);
 			}
 		}
 		pMsg->bodyptr = 0;
@@ -1301,7 +1301,7 @@
 {
 	int i;
 	if (!pStaParams->numSta) {
-		cdf_mem_copy(pMac->lim.protStaOverlapCache[0].addr,
+		qdf_mem_copy(pMac->lim.protStaOverlapCache[0].addr,
 			     bssId, sizeof(tSirMacAddr));
 		pMac->lim.protStaOverlapCache[0].active = true;
 
@@ -1312,7 +1312,7 @@
 
 	for (i = 0; i < LIM_PROT_STA_OVERLAP_CACHE_SIZE; i++) {
 		if (pMac->lim.protStaOverlapCache[i].active) {
-			if (cdf_mem_compare
+			if (!qdf_mem_cmp
 				    (pMac->lim.protStaOverlapCache[i].addr, bssId,
 				    sizeof(tSirMacAddr))) {
 				return;
@@ -1324,7 +1324,7 @@
 	if (i == LIM_PROT_STA_OVERLAP_CACHE_SIZE) {
 		PELOG1(lim_log(pMac, LOGW, FL("Overlap cache is full"));)
 	} else {
-		cdf_mem_copy(pMac->lim.protStaOverlapCache[i].addr,
+		qdf_mem_copy(pMac->lim.protStaOverlapCache[i].addr,
 			     bssId, sizeof(tSirMacAddr));
 		pMac->lim.protStaOverlapCache[i].active = true;
 
@@ -1415,7 +1415,7 @@
 	   4. Encyption type in the beacon does not match with self station
 	 */
 	if ((!pBeacon->capabilityInfo.ibss) ||
-	    (lim_cmp_ssid(&pBeacon->ssId, psessionEntry) != true) ||
+	    (lim_cmp_ssid(&pBeacon->ssId, psessionEntry) == true) ||
 	    (psessionEntry->currentOperChannel != pBeacon->channelNumber))
 		retCode = eSIR_LIM_IGNORE_BEACON;
 	else if (lim_ibss_enc_type_matched(pBeacon, psessionEntry) != eSIR_TRUE) {
@@ -1551,7 +1551,7 @@
 						     psessionEntry);
 	if ((false == psessionEntry->limSentCapsChangeNtf) &&
 	    (((!lim_is_null_ssid(&pBeacon->ssId)) &&
-	       (false == lim_cmp_ssid(&pBeacon->ssId, psessionEntry))) ||
+	       (false != lim_cmp_ssid(&pBeacon->ssId, psessionEntry))) ||
 	     ((SIR_MAC_GET_ESS(apNewCaps.capabilityInfo) !=
 	       SIR_MAC_GET_ESS(psessionEntry->limCurrentBssCaps)) ||
 	      (SIR_MAC_GET_PRIVACY(apNewCaps.capabilityInfo) !=
@@ -1600,7 +1600,7 @@
 		len = sizeof(tSirMacCapabilityInfo) + sizeof(tSirMacAddr) + sizeof(uint8_t) + 3 * sizeof(uint8_t) + /* reserved fields */
 		      pBeacon->ssId.length + 1;
 
-		cdf_mem_copy(apNewCaps.bssId.bytes,
+		qdf_mem_copy(apNewCaps.bssId.bytes,
 			     psessionEntry->bssId, QDF_MAC_ADDR_SIZE);
 		if (newChannel != psessionEntry->currentOperChannel) {
 			PELOGE(lim_log
@@ -1632,7 +1632,7 @@
 			return;
 		} else
 			apNewCaps.channelId = psessionEntry->currentOperChannel;
-		cdf_mem_copy((uint8_t *) &apNewCaps.ssId,
+		qdf_mem_copy((uint8_t *) &apNewCaps.ssId,
 			     (uint8_t *) &pBeacon->ssId,
 			     pBeacon->ssId.length + 1);
 
@@ -1849,7 +1849,7 @@
 		roam_offload_synch_ind_ptr->beaconProbeRespOffset;
 	mac_hdr = (tpSirMacMgmtHdr)bcn_proberesp_ptr;
 	parsed_frm_ptr =
-	(tpSirProbeRespBeacon) cdf_mem_malloc(sizeof(tSirProbeRespBeacon));
+	(tpSirProbeRespBeacon) qdf_mem_malloc(sizeof(tSirProbeRespBeacon));
 	if (NULL == parsed_frm_ptr) {
 		lim_log(pMac, LOGE, "fail to allocate memory for frame");
 		return QDF_STATUS_E_NOMEM;
@@ -1860,7 +1860,7 @@
 		QDF_TRACE(QDF_MODULE_ID_PE, QDF_TRACE_LEVEL_ERROR, "%s: very"
 		"few bytes in synchInd beacon / probe resp frame! length=%d",
 		__func__, roam_offload_synch_ind_ptr->beaconProbeRespLength);
-		cdf_mem_free(parsed_frm_ptr);
+		qdf_mem_free(parsed_frm_ptr);
 		return QDF_STATUS_E_FAILURE;
 	}
 
@@ -1878,7 +1878,7 @@
 			QDF_TRACE(QDF_MODULE_ID_PE, QDF_TRACE_LEVEL_ERROR,
 			"Parse error Beacon, length=%d",
 			roam_offload_synch_ind_ptr->beaconProbeRespLength);
-			cdf_mem_free(parsed_frm_ptr);
+			qdf_mem_free(parsed_frm_ptr);
 			return QDF_STATUS_E_FAILURE;
 		}
 	} else {
@@ -1890,7 +1890,7 @@
 			QDF_TRACE(QDF_MODULE_ID_PE, QDF_TRACE_LEVEL_ERROR,
 			"Parse error ProbeResponse, length=%d",
 			roam_offload_synch_ind_ptr->beaconProbeRespLength);
-			cdf_mem_free(parsed_frm_ptr);
+			qdf_mem_free(parsed_frm_ptr);
 			return QDF_STATUS_E_FAILURE;
 		}
 	}
@@ -1956,16 +1956,16 @@
 	bss_desc_ptr->beaconInterval = parsed_frm_ptr->beaconInterval;
 	bss_desc_ptr->timeStamp[0]   = parsed_frm_ptr->timeStamp[0];
 	bss_desc_ptr->timeStamp[1]   = parsed_frm_ptr->timeStamp[1];
-	cdf_mem_copy(&bss_desc_ptr->capabilityInfo,
+	qdf_mem_copy(&bss_desc_ptr->capabilityInfo,
 	&bcn_proberesp_ptr[SIR_MAC_HDR_LEN_3A + SIR_MAC_B_PR_CAPAB_OFFSET], 2);
-	cdf_mem_copy((uint8_t *) &bss_desc_ptr->bssId,
+	qdf_mem_copy((uint8_t *) &bss_desc_ptr->bssId,
 			(uint8_t *) mac_hdr->bssId,
 			sizeof(tSirMacAddr));
 	bss_desc_ptr->nReceivedTime =
 		(uint32_t)qdf_mc_timer_get_system_ticks();
 	if (parsed_frm_ptr->mdiePresent) {
 		bss_desc_ptr->mdiePresent = parsed_frm_ptr->mdiePresent;
-		cdf_mem_copy((uint8_t *)bss_desc_ptr->mdie,
+		qdf_mem_copy((uint8_t *)bss_desc_ptr->mdie,
 				(uint8_t *)parsed_frm_ptr->mdie,
 				SIR_MDIE_SIZE);
 	}
@@ -1977,12 +1977,12 @@
 			"chan=%d, rssi=%d", bss_desc_ptr->channelId,
 			bss_desc_ptr->rssi);
 	if (ie_len) {
-		cdf_mem_copy(&bss_desc_ptr->ieFields,
+		qdf_mem_copy(&bss_desc_ptr->ieFields,
 			bcn_proberesp_ptr +
 			(SIR_MAC_HDR_LEN_3A + SIR_MAC_B_PR_SSID_OFFSET),
 			ie_len);
 	}
-	cdf_mem_free(parsed_frm_ptr);
+	qdf_mem_free(parsed_frm_ptr);
 	return QDF_STATUS_SUCCESS;
 }
 /**
@@ -2092,13 +2092,13 @@
 		add_bss_params->txMgmtPower, ft_session_ptr);
 	mac_ctx->roam.reassocRespLen = roam_sync_ind_ptr->reassocRespLength;
 	mac_ctx->roam.pReassocResp =
-		cdf_mem_malloc(mac_ctx->roam.reassocRespLen);
+		qdf_mem_malloc(mac_ctx->roam.reassocRespLen);
 	if (NULL == mac_ctx->roam.pReassocResp) {
 		lim_log(mac_ctx, LOGE, FL("LFR3:assoc resp mem alloc failed"));
 		ft_session_ptr->bRoamSynchInProgress = false;
 		return QDF_STATUS_E_NOMEM;
 	}
-	cdf_mem_copy(mac_ctx->roam.pReassocResp,
+	qdf_mem_copy(mac_ctx->roam.pReassocResp,
 			(uint8_t *)roam_sync_ind_ptr +
 			roam_sync_ind_ptr->reassocRespOffset,
 			mac_ctx->roam.reassocRespLen);
@@ -2135,7 +2135,7 @@
 	ft_session_ptr->limSmeState = eLIM_SME_LINK_EST_STATE;
 	ft_session_ptr->bRoamSynchInProgress = false;
 	if (mac_ctx->roam.pReassocResp)
-		cdf_mem_free(mac_ctx->roam.pReassocResp);
+		qdf_mem_free(mac_ctx->roam.pReassocResp);
 	mac_ctx->roam.pReassocResp = NULL;
 	return QDF_STATUS_SUCCESS;
 }
diff --git a/core/mac/src/pe/lim/lim_assoc_utils.c b/core/mac/src/pe/lim/lim_assoc_utils.c
index 43917d0..8d720cb 100644
--- a/core/mac/src/pe/lim/lim_assoc_utils.c
+++ b/core/mac/src/pe/lim/lim_assoc_utils.c
@@ -94,9 +94,9 @@
  *
  * Return: true if SSID matched, false otherwise.
  */
-bool lim_cmp_ssid(tSirMacSSid *rx_ssid, tpPESession session_entry)
+uint32_t lim_cmp_ssid(tSirMacSSid *rx_ssid, tpPESession session_entry)
 {
-	return cdf_mem_compare(rx_ssid, &session_entry->ssId,
+	return qdf_mem_cmp(rx_ssid, &session_entry->ssId,
 				session_entry->ssId.length);
 }
 
@@ -230,7 +230,7 @@
 	tSirMacRateSet *pRateSet, basicRate;
 	uint8_t i, j, k, match;
 
-	pRateSet = cdf_mem_malloc(sizeof(tSirMacRateSet));
+	pRateSet = qdf_mem_malloc(sizeof(tSirMacRateSet));
 	if (NULL == pRateSet) {
 		lim_log(pMac, LOGP,
 			FL("call to AllocateMemory failed for RATESET"));
@@ -239,7 +239,7 @@
 	}
 
 	/* Copy operational rate set from session Entry */
-	cdf_mem_copy(pRateSet->rate, (psessionEntry->rateSet.rate),
+	qdf_mem_copy(pRateSet->rate, (psessionEntry->rateSet.rate),
 		     psessionEntry->rateSet.numRates);
 
 	pRateSet->numRates = psessionEntry->rateSet.numRates;
@@ -268,14 +268,14 @@
 
 		if (!match) {
 			/* Free up memory allocated for rateset */
-			cdf_mem_free((uint8_t *) pRateSet);
+			qdf_mem_free((uint8_t *) pRateSet);
 
 			return false;
 		}
 	}
 
 	/* Free up memory allocated for rateset */
-	cdf_mem_free((uint8_t *) pRateSet);
+	qdf_mem_free((uint8_t *) pRateSet);
 
 	return true;
 } /****** end lim_check_rx_basic_rates() ******/
@@ -401,7 +401,7 @@
 	match = 0;
 	for (i = 0; i < rx_rsn_ie.pwise_cipher_suite_count; i++) {
 		for (j = 0; j < rsn_ie->pwise_cipher_suite_count; j++) {
-			if (cdf_mem_compare(&rx_rsn_ie.pwise_cipher_suites[i],
+			if (!qdf_mem_cmp(&rx_rsn_ie.pwise_cipher_suites[i],
 				&rsn_ie->pwise_cipher_suites[j],
 				sizeof(rsn_ie->pwise_cipher_suites[j]))) {
 				match = 1;
@@ -516,7 +516,7 @@
 	match = 0;
 	for (i = 0; i < rx_wpaie.unicast_cipher_count; i++) {
 		for (j = 0; j < wpa_ie->unicast_cipher_count; j++) {
-			if (cdf_mem_compare(rx_wpaie.unicast_ciphers[i],
+			if (!qdf_mem_cmp(rx_wpaie.unicast_ciphers[i],
 					    wpa_ie->unicast_ciphers[j], 4)) {
 				match = 1;
 				break;
@@ -705,7 +705,7 @@
 		/* Free up buffer allocated for JoinReq held by */
 		/* MLM state machine */
 		if (psessionEntry->pLimMlmJoinReq) {
-			cdf_mem_free(psessionEntry->pLimMlmJoinReq);
+			qdf_mem_free(psessionEntry->pLimMlmJoinReq);
 			psessionEntry->pLimMlmJoinReq = NULL;
 		}
 
@@ -734,7 +734,7 @@
 			FL("Lim Posting DISASSOC_CNF to Sme. Trigger: %d"),
 			mlmStaContext.cleanupTrigger);
 
-		cdf_mem_copy((uint8_t *) &mlmDisassocCnf.peerMacAddr,
+		qdf_mem_copy((uint8_t *) &mlmDisassocCnf.peerMacAddr,
 			     (uint8_t *) sta_dsaddr.bytes, QDF_MAC_ADDR_SIZE);
 		mlmDisassocCnf.resultCode = statusCode;
 		mlmDisassocCnf.disassocTrigger = mlmStaContext.cleanupTrigger;
@@ -774,7 +774,7 @@
 		lim_log(pMac, LOGW,
 			FL("Lim Posting PURGE_STA_IND to Sme. Trigger: %d"),
 			mlmStaContext.cleanupTrigger);
-		cdf_mem_copy((uint8_t *) &mlmPurgeStaInd.peerMacAddr,
+		qdf_mem_copy((uint8_t *) &mlmPurgeStaInd.peerMacAddr,
 			     (uint8_t *) sta_dsaddr.bytes, QDF_MAC_ADDR_SIZE);
 		mlmPurgeStaInd.reasonCode =
 			(uint8_t) mlmStaContext.disassocReason;
@@ -824,7 +824,7 @@
 						      psessionEntry, smesessionId,
 						      smetransactionId);
 		} else {
-			cdf_mem_free(psessionEntry->pLimJoinReq);
+			qdf_mem_free(psessionEntry->pLimJoinReq);
 			psessionEntry->pLimJoinReq = NULL;
 
 			lim_log(pMac, LOG1,
@@ -906,7 +906,7 @@
 			       &mac_ctx->lim.gLimPreAuthTimerTable);
 
 		if (auth_node) {
-			cdf_mem_copy((uint8_t *) auth_node->peerMacAddr,
+			qdf_mem_copy((uint8_t *) auth_node->peerMacAddr,
 				     peer_addr, sizeof(tSirMacAddr));
 			auth_node->fTimerStarted = 0;
 			auth_node->mlmState = eLIM_MLM_AUTHENTICATED_STATE;
@@ -964,11 +964,11 @@
 		 *free the copy of association request frame.
 		 */
 		if (assoc_req_frame) {
-			cdf_mem_free(assoc_req_frame);
+			qdf_mem_free(assoc_req_frame);
 			assoc_req_frame = NULL;
 		}
 
-		cdf_mem_free(session_entry->parsedAssocReq[sta_ds->assocId]);
+		qdf_mem_free(session_entry->parsedAssocReq[sta_ds->assocId]);
 		session_entry->parsedAssocReq[sta_ds->assocId] = NULL;
 	}
 }
@@ -1002,7 +1002,7 @@
 			if (!session_entry->protStaCache[i].active)
 				continue;
 
-			if (cdf_mem_compare(session_entry->protStaCache[i].addr,
+			if (!qdf_mem_cmp(session_entry->protStaCache[i].addr,
 				sta_ds->staAddr, sizeof(tSirMacAddr))) {
 				session_entry->gLimHt20Params.numSta--;
 				session_entry->protStaCache[i].active =
@@ -1067,10 +1067,10 @@
 			session_entry->gLim11aParams.numSta, sta_ds->staAddr);
 		for (i = 0; i < LIM_PROT_STA_CACHE_SIZE; i++) {
 			if (session_entry->protStaCache[i].active &&
-				cdf_mem_compare(
+				(!qdf_mem_cmp(
 					session_entry->protStaCache[i].addr,
 					 sta_ds->staAddr,
-					sizeof(tSirMacAddr))) {
+					sizeof(tSirMacAddr)))) {
 				session_entry->protStaCache[i].active = false;
 				break;
 			}
@@ -1093,10 +1093,10 @@
 			session_entry->gLim11bParams.numSta, sta_ds->staAddr);
 		for (i = 0; i < LIM_PROT_STA_CACHE_SIZE; i++) {
 			if (session_entry->protStaCache[i].active &&
-				cdf_mem_compare(
+				(!qdf_mem_cmp(
 					session_entry->protStaCache[i].addr,
 					sta_ds->staAddr,
-					sizeof(tSirMacAddr))) {
+					sizeof(tSirMacAddr)))) {
 					session_entry->gLim11bParams.numSta--;
 					session_entry->protStaCache[i].active =
 						 false;
@@ -1123,10 +1123,10 @@
 			session_entry->gLim11bParams.numSta, sta_ds->staAddr);
 		for (i = 0; i < LIM_PROT_STA_CACHE_SIZE; i++) {
 			if (session_entry->protStaCache[i].active &&
-				cdf_mem_compare(
+				(!qdf_mem_cmp(
 					session_entry->protStaCache[i].addr,
 					sta_ds->staAddr,
-					sizeof(tSirMacAddr))) {
+					sizeof(tSirMacAddr)))) {
 				 session_entry->gLim11gParams.numSta--;
 				 session_entry->protStaCache[i].active = false;
 				 break;
@@ -1155,10 +1155,10 @@
 			session_entry->gLimNonGfParams.numSta, sta_ds->staAddr);
 		for (i = 0; i < LIM_PROT_STA_CACHE_SIZE; i++) {
 			if (session_entry->protStaCache[i].active &&
-				cdf_mem_compare(
+				(!qdf_mem_cmp(
 					session_entry->protStaCache[i].addr,
 					sta_ds->staAddr,
-					sizeof(tSirMacAddr))) {
+					sizeof(tSirMacAddr)))) {
 				session_entry->protStaCache[i].active = false;
 				break;
 			}
@@ -1195,10 +1195,10 @@
 			sta_ds->staAddr);
 		for (i = 0; i < LIM_PROT_STA_CACHE_SIZE; i++) {
 			if (session_entry->protStaCache[i].active &&
-				cdf_mem_compare(
+				(!qdf_mem_cmp(
 					session_entry->protStaCache[i].addr,
 					sta_ds->staAddr,
-					sizeof(tSirMacAddr))) {
+					sizeof(tSirMacAddr)))) {
 				session_entry->protStaCache[i].active = false;
 				break;
 			}
@@ -1239,11 +1239,11 @@
 		for (i = 0; i < LIM_PROT_STA_CACHE_SIZE; i++) {
 			if (session_entry->gLimNoShortParams.
 				staNoShortCache[i].active &&
-				cdf_mem_compare(session_entry->
+				(!qdf_mem_cmp(session_entry->
 					gLimNoShortParams.
 					staNoShortCache[i].addr,
 					sta_ds->staAddr,
-					sizeof(tSirMacAddr))) {
+					sizeof(tSirMacAddr)))) {
 				session_entry->gLimNoShortParams.
 					numNonShortPreambleSta--;
 				session_entry->gLimNoShortParams.
@@ -1259,7 +1259,7 @@
 		 * enable short preamble
 		 * reset the cache
 		 */
-		cdf_mem_set((uint8_t *) &session_entry->gLimNoShortParams,
+		qdf_mem_set((uint8_t *) &session_entry->gLimNoShortParams,
 				sizeof(tLimNoShortParams), 0);
 		if (lim_enable_short_preamble(mac_ctx, true,
 			beacon_params, session_entry) != eSIR_SUCCESS) {
@@ -1304,11 +1304,11 @@
 		for (i = 0; i < LIM_PROT_STA_CACHE_SIZE; i++) {
 			if (session_entry->gLimNoShortSlotParams.
 				staNoShortSlotCache[i].active &&
-				cdf_mem_compare(session_entry->
+				(!qdf_mem_cmp(session_entry->
 					gLimNoShortSlotParams.
 						staNoShortSlotCache[i].addr,
 					sta_ds->staAddr,
-					sizeof(tSirMacAddr))) {
+					sizeof(tSirMacAddr)))) {
 				non_short_slot_sta_count--;
 				session_entry->gLimNoShortSlotParams.
 					staNoShortSlotCache[i].active = false;
@@ -1321,7 +1321,7 @@
 			 * enable short slot time
 			 * reset the cache
 			 */
-			cdf_mem_set((uint8_t *) &session_entry->
+			qdf_mem_set((uint8_t *) &session_entry->
 				gLimNoShortSlotParams,
 				sizeof(tLimNoShortSlotParams), 0);
 			beacon_params->fShortSlotTime = true;
@@ -1337,11 +1337,11 @@
 		for (i = 0; i < LIM_PROT_STA_CACHE_SIZE; i++) {
 			if (mac_ctx->lim.gLimNoShortSlotParams.
 				staNoShortSlotCache[i].active &&
-				cdf_mem_compare(
+				(!qdf_mem_cmp(
 					mac_ctx->lim.gLimNoShortSlotParams.
 						staNoShortSlotCache[i].addr,
 					sta_ds->staAddr,
-					sizeof(tSirMacAddr))) {
+					sizeof(tSirMacAddr)))) {
 				non_short_slot_sta_count--;
 				mac_ctx->lim.gLimNoShortSlotParams.
 					staNoShortSlotCache[i].active = false;
@@ -1354,7 +1354,7 @@
 			 * enable short slot time
 			 * reset the cache
 			 */
-			cdf_mem_set(
+			qdf_mem_set(
 				(uint8_t *) &mac_ctx->lim.gLimNoShortSlotParams,
 				sizeof(tLimNoShortSlotParams), 0);
 			/*in case of AP set SHORT_SLOT_TIME to enable*/
@@ -1716,7 +1716,7 @@
 	 * put the result in pSupportedRates
 	 */
 
-	cdf_mem_set((uint8_t *) rates, sizeof(tSirSupportedRates), 0);
+	qdf_mem_set((uint8_t *) rates, sizeof(tSirSupportedRates), 0);
 	for (i = 0; i < temp_rate_set.numRates; i++) {
 		min = 0;
 		val = 0xff;
@@ -1820,7 +1820,7 @@
 
 	/* copy operational rate set from psessionEntry */
 	if (psessionEntry->rateSet.numRates <= SIR_MAC_RATESET_EID_MAX) {
-		cdf_mem_copy((uint8_t *) tempRateSet.rate,
+		qdf_mem_copy((uint8_t *) tempRateSet.rate,
 			     (uint8_t *) (psessionEntry->rateSet.rate),
 			     psessionEntry->rateSet.numRates);
 		tempRateSet.numRates = psessionEntry->rateSet.numRates;
@@ -1835,7 +1835,7 @@
 		(psessionEntry->dot11mode == WNI_CFG_DOT11_MODE_11N)) {
 		if (psessionEntry->extRateSet.numRates <=
 		    SIR_MAC_RATESET_EID_MAX) {
-			cdf_mem_copy((uint8_t *) tempRateSet2.rate,
+			qdf_mem_copy((uint8_t *) tempRateSet2.rate,
 				     (uint8_t *) (psessionEntry->extRateSet.
 						  rate),
 				     psessionEntry->extRateSet.numRates);
@@ -1868,7 +1868,7 @@
 	{
 		uint8_t aRateIndex = 0;
 		uint8_t bRateIndex = 0;
-		cdf_mem_set((uint8_t *) pRates, sizeof(tSirSupportedRates), 0);
+		qdf_mem_set((uint8_t *) pRates, sizeof(tSirSupportedRates), 0);
 		for (i = 0; i < tempRateSet.numRates; i++) {
 			min = 0;
 			val = 0xff;
@@ -2002,12 +2002,12 @@
 	lim_get_phy_mode(mac_ctx, &phy_mode, session_entry);
 
 	/* copy operational rate set from session_entry */
-	cdf_mem_copy((temp_rate_set.rate), (session_entry->rateSet.rate),
+	qdf_mem_copy((temp_rate_set.rate), (session_entry->rateSet.rate),
 		     session_entry->rateSet.numRates);
 	temp_rate_set.numRates = (uint8_t) session_entry->rateSet.numRates;
 
 	if (phy_mode == WNI_CFG_PHY_MODE_11G) {
-		cdf_mem_copy((temp_rate_set2.rate),
+		qdf_mem_copy((temp_rate_set2.rate),
 			     (session_entry->extRateSet.rate),
 			     session_entry->extRateSet.numRates);
 		temp_rate_set2.numRates =
@@ -2108,7 +2108,7 @@
 
 
 	rates = &sta_ds->supportedRates;
-	cdf_mem_set((uint8_t *) rates, sizeof(tSirSupportedRates), 0);
+	qdf_mem_set((uint8_t *) rates, sizeof(tSirSupportedRates), 0);
 	for (i = 0; (i < temp_rate_set2.numRates &&
 			 i < SIR_MAC_RATESET_EID_MAX); i++) {
 		for (j = 0; (j < temp_rate_set.numRates &&
@@ -2269,13 +2269,13 @@
 		session_entry->smeSessionId, update_entry,
 		GET_LIM_SYSTEM_ROLE(session_entry));
 
-	add_sta_params = cdf_mem_malloc(sizeof(tAddStaParams));
+	add_sta_params = qdf_mem_malloc(sizeof(tAddStaParams));
 	if (NULL == add_sta_params) {
 		lim_log(mac_ctx, LOGP,
 			FL("Unable to allocate memory during ADD_STA"));
 		return eSIR_MEM_ALLOC_FAILED;
 	}
-	cdf_mem_set((uint8_t *) add_sta_params, sizeof(tAddStaParams), 0);
+	qdf_mem_set((uint8_t *) add_sta_params, sizeof(tAddStaParams), 0);
 
 	if (LIM_IS_AP_ROLE(session_entry) || LIM_IS_IBSS_ROLE(session_entry) ||
 	    LIM_IS_BT_AMP_AP_ROLE(session_entry))
@@ -2292,11 +2292,11 @@
 		FL(MAC_ADDRESS_STR ": Subtype(Assoc/Reassoc): %d"),
 		MAC_ADDR_ARRAY(*sta_Addr), sta_ds->mlmStaContext.subType);
 
-	cdf_mem_copy((uint8_t *) add_sta_params->staMac,
+	qdf_mem_copy((uint8_t *) add_sta_params->staMac,
 		     (uint8_t *) *sta_Addr, sizeof(tSirMacAddr));
-	cdf_mem_copy((uint8_t *) add_sta_params->bssId,
+	qdf_mem_copy((uint8_t *) add_sta_params->bssId,
 		     session_entry->bssId, sizeof(tSirMacAddr));
-	cdf_mem_copy(&add_sta_params->capab_info,
+	qdf_mem_copy(&add_sta_params->capab_info,
 		     &sta_ds->mlmStaContext.capabilityInfo,
 		     sizeof(add_sta_params->capab_info));
 
@@ -2304,7 +2304,7 @@
 				      session_entry);
 
 	/* Copy legacy rates */
-	cdf_mem_copy((uint8_t *) &add_sta_params->supportedRates,
+	qdf_mem_copy((uint8_t *) &add_sta_params->supportedRates,
 		     (uint8_t *) &sta_ds->supportedRates,
 		     sizeof(tSirSupportedRates));
 
@@ -2496,7 +2496,7 @@
 
 		add_sta_params->p2pCapableSta = (p2p_ie != NULL);
 		if (assoc_req && add_sta_params->htCapable) {
-			cdf_mem_copy(&add_sta_params->ht_caps,
+			qdf_mem_copy(&add_sta_params->ht_caps,
 				     ((uint8_t *) &assoc_req->HTCaps) + 1,
 				     sizeof(add_sta_params->ht_caps));
 		}
@@ -2648,7 +2648,7 @@
 		lim_log(mac_ctx, LOGE,
 			FL("ADD_STA_REQ for aId %d failed (reason %X)"),
 			sta_ds->assocId, ret_code);
-		cdf_mem_free(add_sta_params);
+		qdf_mem_free(add_sta_params);
 	}
 
 	return ret_code;
@@ -2685,14 +2685,14 @@
 	tSirMsgQ msgQ;
 	tSirRetStatus retCode = eSIR_SUCCESS;
 
-	pDelStaParams = cdf_mem_malloc(sizeof(tDeleteStaParams));
+	pDelStaParams = qdf_mem_malloc(sizeof(tDeleteStaParams));
 	if (NULL == pDelStaParams) {
 		lim_log(pMac, LOGP,
 			FL("Unable to allocate memory during ADD_STA"));
 		return eSIR_MEM_ALLOC_FAILED;
 	}
 
-	cdf_mem_set((uint8_t *) pDelStaParams, sizeof(tDeleteStaParams), 0);
+	qdf_mem_set((uint8_t *) pDelStaParams, sizeof(tDeleteStaParams), 0);
 
 	/* */
 	/* DPH contains the STA index only for "peer" STA entries. */
@@ -2754,7 +2754,7 @@
 	pDelStaParams->smesessionId = psessionEntry->smeSessionId;
 
 	pDelStaParams->staType = pStaDs->staType;
-	cdf_mem_copy((uint8_t *) pDelStaParams->staMac,
+	qdf_mem_copy((uint8_t *) pDelStaParams->staMac,
 		     (uint8_t *) pStaDs->staAddr, sizeof(tSirMacAddr));
 
 	pDelStaParams->status = QDF_STATUS_SUCCESS;
@@ -2777,7 +2777,7 @@
 		lim_log(pMac, LOGE,
 			FL("Posting DELETE_STA_REQ to HAL failed, reason=%X"),
 			retCode);
-		cdf_mem_free(pDelStaParams);
+		qdf_mem_free(pDelStaParams);
 	}
 
 	return retCode;
@@ -2831,7 +2831,7 @@
 		lim_log(mac_ctx, LOGE,
 			FL("Posting WMA_ADD_STA_REQ to HAL failed, reason=%X"),
 			ret_code);
-		cdf_mem_free(add_sta_params);
+		qdf_mem_free(add_sta_params);
 	}
 
 	session_entry->ftPEContext.pAddStaReq = NULL;
@@ -2891,19 +2891,19 @@
 
 	sir_copy_mac_addr(staMac, psessionEntry->selfMacAddr);
 	lim_log(pMac, LOG1, FL(MAC_ADDRESS_STR ": "), MAC_ADDR_ARRAY(staMac));
-	pAddStaParams = cdf_mem_malloc(sizeof(tAddStaParams));
+	pAddStaParams = qdf_mem_malloc(sizeof(tAddStaParams));
 	if (NULL == pAddStaParams) {
 		lim_log(pMac, LOGP,
 			FL("Unable to allocate memory during ADD_STA"));
 		return eSIR_MEM_ALLOC_FAILED;
 	}
-	cdf_mem_set((uint8_t *) pAddStaParams, sizeof(tAddStaParams), 0);
+	qdf_mem_set((uint8_t *) pAddStaParams, sizeof(tAddStaParams), 0);
 
 	/* / Add STA context at MAC HW (BMU, RHP & TFP) */
-	cdf_mem_copy((uint8_t *) pAddStaParams->staMac,
+	qdf_mem_copy((uint8_t *) pAddStaParams->staMac,
 		     (uint8_t *) staMac, sizeof(tSirMacAddr));
 
-	cdf_mem_copy((uint8_t *) pAddStaParams->bssId,
+	qdf_mem_copy((uint8_t *) pAddStaParams->bssId,
 		     psessionEntry->bssId, sizeof(tSirMacAddr));
 
 	pAddStaParams->assocId = psessionEntry->limAID;
@@ -3132,7 +3132,7 @@
 		lim_log(pMac, LOGE,
 			FL("Posting WMA_ADD_STA_REQ to HAL failed, reason=%X"),
 			retCode);
-		cdf_mem_free(pAddStaParams);
+		qdf_mem_free(pAddStaParams);
 	}
 	return retCode;
 }
@@ -3257,7 +3257,7 @@
 	tpDphHashNode sta_ds;
 	tUpdateBeaconParams beacon_params;
 
-	cdf_mem_zero(&beacon_params, sizeof(tUpdateBeaconParams));
+	qdf_mem_zero(&beacon_params, sizeof(tUpdateBeaconParams));
 	beacon_params.paramChangeBitmap = 0;
 	lim_deactivate_and_change_per_sta_id_timer(mac_ctx, eLIM_CNF_WAIT_TIMER,
 		 sta_id);
@@ -3352,7 +3352,7 @@
 	uint32_t total_num_noa_desc = 0;
 	uint32_t selfStaDot11Mode = 0;
 
-	cdf_mem_copy(current_ssid.ssId,
+	qdf_mem_copy(current_ssid.ssId,
 		     session_entry->ssId.ssId, session_entry->ssId.length);
 
 	current_ssid.length = (uint8_t) session_entry->ssId.length;
@@ -3364,7 +3364,7 @@
 	if (((SIR_MAC_MGMT_FRAME == header->fc.type) &&
 		(SIR_MAC_MGMT_PROBE_RSP == header->fc.subType)) &&
 		current_ssid.length &&
-		(!cdf_mem_compare((uint8_t *) &beacon_probe_rsp->ssId,
+		(qdf_mem_cmp((uint8_t *) &beacon_probe_rsp->ssId,
 				  (uint8_t *) &current_ssid,
 				  (uint8_t) (1 + current_ssid.length)))) {
 		/*
@@ -3506,7 +3506,7 @@
 					  uint16_t ieLen,
 					  tpSirProbeRespBeacon beaconStruct)
 {
-	cdf_mem_set((uint8_t *) beaconStruct, sizeof(tSirProbeRespBeacon), 0);
+	qdf_mem_set((uint8_t *) beaconStruct, sizeof(tSirProbeRespBeacon), 0);
 
 	PELOG3(lim_log(pMac, LOG3,
 		       FL
@@ -3556,13 +3556,13 @@
 	tSirMsgQ msgQ;
 	tSirRetStatus retCode = eSIR_SUCCESS;
 
-	pDelBssParams = cdf_mem_malloc(sizeof(tDeleteBssParams));
+	pDelBssParams = qdf_mem_malloc(sizeof(tDeleteBssParams));
 	if (NULL == pDelBssParams) {
 		lim_log(pMac, LOGP,
 			FL("Unable to allocate memory during ADD_BSS"));
 		return eSIR_MEM_ALLOC_FAILED;
 	}
-	cdf_mem_set((uint8_t *) pDelBssParams, sizeof(tDeleteBssParams), 0);
+	qdf_mem_set((uint8_t *) pDelBssParams, sizeof(tDeleteBssParams), 0);
 
 	pDelBssParams->sessionId = psessionEntry->peSessionId; /* update PE session Id */
 
@@ -3588,7 +3588,7 @@
 
 	pDelBssParams->status = QDF_STATUS_SUCCESS;
 	pDelBssParams->respReqd = 1;
-	cdf_mem_copy(pDelBssParams->bssid, psessionEntry->bssId,
+	qdf_mem_copy(pDelBssParams->bssid, psessionEntry->bssId,
 		     sizeof(tSirMacAddr));
 	pDelBssParams->smesessionId = psessionEntry->smeSessionId;
 	PELOGW(lim_log
@@ -3614,7 +3614,7 @@
 		lim_log(pMac, LOGE,
 			FL("Posting DELETE_BSS_REQ to HAL failed, reason=%X"),
 			retCode);
-		cdf_mem_free(pDelBssParams);
+		qdf_mem_free(pDelBssParams);
 	}
 
 	return retCode;
@@ -3756,20 +3756,20 @@
 	tAddStaParams *sta_context;
 
 	/* Package SIR_HAL_ADD_BSS_REQ message parameters */
-	pAddBssParams = cdf_mem_malloc(sizeof(tAddBssParams));
+	pAddBssParams = qdf_mem_malloc(sizeof(tAddBssParams));
 	if (NULL == pAddBssParams) {
 		lim_log(pMac, LOGP,
 			FL("Unable to allocate memory during ADD_BSS"));
 		retCode = eSIR_MEM_ALLOC_FAILED;
 		goto returnFailure;
 	} else
-		cdf_mem_set((uint8_t *) pAddBssParams, sizeof(tAddBssParams),
+		qdf_mem_set((uint8_t *) pAddBssParams, sizeof(tAddBssParams),
 			    0);
 
-	cdf_mem_copy(pAddBssParams->bssId, bssDescription->bssId,
+	qdf_mem_copy(pAddBssParams->bssId, bssDescription->bssId,
 		     sizeof(tSirMacAddr));
 	/* Fill in tAddBssParams selfMacAddr */
-	cdf_mem_copy(pAddBssParams->selfMacAddr,
+	qdf_mem_copy(pAddBssParams->selfMacAddr,
 		     psessionEntry->selfMacAddr, sizeof(tSirMacAddr));
 
 	lim_log(pMac, LOG1,
@@ -3805,7 +3805,7 @@
 		pBeaconStruct->cfParamSet.cfpDurRemaining;
 
 	pAddBssParams->rateSet.numRates = pAssocRsp->supportedRates.numRates;
-	cdf_mem_copy(pAddBssParams->rateSet.rate,
+	qdf_mem_copy(pAddBssParams->rateSet.rate,
 		     pAssocRsp->supportedRates.rate,
 		     pAssocRsp->supportedRates.numRates);
 
@@ -3943,7 +3943,7 @@
 	/* Identifying AP as an STA */
 	pAddBssParams->staContext.staType = STA_ENTRY_OTHER;
 
-	cdf_mem_copy(pAddBssParams->staContext.bssId,
+	qdf_mem_copy(pAddBssParams->staContext.bssId,
 			bssDescription->bssId, sizeof(tSirMacAddr));
 	pAddBssParams->staContext.listenInterval =
 		bssDescription->beaconInterval;
@@ -4178,10 +4178,10 @@
 	if ((!pAddBssParams->staContext.wpa_rsn)
 			&& (psessionEntry->isOSENConnection))
 		pAddBssParams->staContext.wpa_rsn = 1;
-	cdf_mem_copy(&pAddBssParams->staContext.capab_info,
+	qdf_mem_copy(&pAddBssParams->staContext.capab_info,
 			&pAssocRsp->capabilityInfo,
 			sizeof(pAddBssParams->staContext.capab_info));
-	cdf_mem_copy(&pAddBssParams->staContext.ht_caps,
+	qdf_mem_copy(&pAddBssParams->staContext.ht_caps,
 			(uint8_t *) &pAssocRsp->HTCaps + sizeof(uint8_t),
 			sizeof(pAddBssParams->staContext.ht_caps));
 
@@ -4199,7 +4199,7 @@
 		lim_fill_supported_rates_info(pMac, pStaDs,
 				&pStaDs->supportedRates,
 				psessionEntry);
-		cdf_mem_copy((uint8_t *) &pAddBssParams->staContext.
+		qdf_mem_copy((uint8_t *) &pAddBssParams->staContext.
 				supportedRates,
 				(uint8_t *) &pStaDs->supportedRates,
 				sizeof(tSirSupportedRates));
@@ -4285,7 +4285,7 @@
 	retCode = wma_post_ctrl_msg(pMac, &msgQ);
 	if (eSIR_SUCCESS != retCode) {
 		SET_LIM_PROCESS_DEFD_MESGS(pMac, true);
-		cdf_mem_free(pAddBssParams);
+		qdf_mem_free(pAddBssParams);
 		lim_log(pMac, LOGE,
 			FL("Posting ADD_BSS_REQ to HAL failed, reason=%X"),
 			retCode);
@@ -4315,7 +4315,7 @@
 	tpSirBssDescription bssDescription =
 		&psessionEntry->pLimJoinReq->bssDescription;
 
-	pBeaconStruct = cdf_mem_malloc(sizeof(tSchBeaconStruct));
+	pBeaconStruct = qdf_mem_malloc(sizeof(tSchBeaconStruct));
 	if (NULL == pBeaconStruct) {
 		lim_log(pMac, LOGE,
 			FL("Unable to allocate memory during ADD_BSS"));
@@ -4323,7 +4323,7 @@
 	}
 
 	/* Package SIR_HAL_ADD_BSS_REQ message parameters */
-	pAddBssParams = cdf_mem_malloc(sizeof(tAddBssParams));
+	pAddBssParams = qdf_mem_malloc(sizeof(tAddBssParams));
 	if (NULL == pAddBssParams) {
 		lim_log(pMac, LOGP,
 			FL("Unable to allocate memory during ADD_BSS"));
@@ -4331,7 +4331,7 @@
 		goto returnFailure;
 	}
 
-	cdf_mem_set((uint8_t *) pAddBssParams, sizeof(tAddBssParams), 0);
+	qdf_mem_set((uint8_t *) pAddBssParams, sizeof(tAddBssParams), 0);
 
 	lim_extract_ap_capabilities(pMac, (uint8_t *) bssDescription->ieFields,
 			lim_get_ielen_from_bss_description(bssDescription),
@@ -4341,11 +4341,11 @@
 	    WNI_CFG_FORCE_POLICY_PROTECTION_DISABLE)
 		lim_decide_sta_protection_on_assoc(pMac, pBeaconStruct,
 						   psessionEntry);
-	cdf_mem_copy(pAddBssParams->bssId, bssDescription->bssId,
+	qdf_mem_copy(pAddBssParams->bssId, bssDescription->bssId,
 		     sizeof(tSirMacAddr));
 
 	/* Fill in tAddBssParams selfMacAddr */
-	cdf_mem_copy(pAddBssParams->selfMacAddr,
+	qdf_mem_copy(pAddBssParams->selfMacAddr,
 		     psessionEntry->selfMacAddr, sizeof(tSirMacAddr));
 	lim_log(pMac, LOG1,
 		FL("sessionid: %d updateEntry = %d limsystemrole = %d "),
@@ -4377,7 +4377,7 @@
 
 	pAddBssParams->rateSet.numRates =
 		pBeaconStruct->supportedRates.numRates;
-	cdf_mem_copy(pAddBssParams->rateSet.rate,
+	qdf_mem_copy(pAddBssParams->rateSet.rate,
 		     pBeaconStruct->supportedRates.rate,
 		     pBeaconStruct->supportedRates.numRates);
 
@@ -4522,7 +4522,7 @@
 	/* Identifying AP as an STA */
 	pAddBssParams->staContext.staType = STA_ENTRY_OTHER;
 
-	cdf_mem_copy(pAddBssParams->staContext.bssId,
+	qdf_mem_copy(pAddBssParams->staContext.bssId,
 			bssDescription->bssId, sizeof(tSirMacAddr));
 	pAddBssParams->staContext.listenInterval =
 		bssDescription->beaconInterval;
@@ -4805,20 +4805,20 @@
 	retCode = wma_post_ctrl_msg(pMac, &msgQ);
 	if (eSIR_SUCCESS != retCode) {
 		SET_LIM_PROCESS_DEFD_MESGS(pMac, true);
-		cdf_mem_free(pAddBssParams);
+		qdf_mem_free(pAddBssParams);
 		lim_log(pMac, LOGE,
 			FL("Posting ADD_BSS_REQ to HAL failed, reason=%X"),
 			retCode);
 		goto returnFailure;
 
 	} else {
-		cdf_mem_free(pBeaconStruct);
+		qdf_mem_free(pBeaconStruct);
 		return retCode;
 	}
 
 returnFailure:
 	/* Clean-up will be done by the caller... */
-	cdf_mem_free(pBeaconStruct);
+	qdf_mem_free(pBeaconStruct);
 	return retCode;
 }
 
@@ -4849,7 +4849,7 @@
 		return;
 	}
 	staDsAssocId = pStaDs->assocId;
-	cdf_mem_copy((uint8_t *) sta_dsaddr.bytes,
+	qdf_mem_copy((uint8_t *) sta_dsaddr.bytes,
 		     pStaDs->staAddr, QDF_MAC_ADDR_SIZE);
 
 	mlmStaContext = pStaDs->mlmStaContext;
@@ -5088,19 +5088,19 @@
 
 	length = sizeof(tSirSmeUnprotMgmtFrameInd) + frameLen;
 
-	pSirSmeMgmtFrame = cdf_mem_malloc(length);
+	pSirSmeMgmtFrame = qdf_mem_malloc(length);
 	if (NULL == pSirSmeMgmtFrame) {
 		lim_log(pMac, LOGP,
 			FL
 				("AllocateMemory failed for tSirSmeUnprotectedMgmtFrameInd"));
 		return;
 	}
-	cdf_mem_set((void *)pSirSmeMgmtFrame, length, 0);
+	qdf_mem_set((void *)pSirSmeMgmtFrame, length, 0);
 
 	pSirSmeMgmtFrame->sessionId = sessionId;
 	pSirSmeMgmtFrame->frameType = frameType;
 
-	cdf_mem_copy(pSirSmeMgmtFrame->frameBuf, frame, frameLen);
+	qdf_mem_copy(pSirSmeMgmtFrame->frameBuf, frame, frameLen);
 	pSirSmeMgmtFrame->frameLen = frameLen;
 
 	mmhMsg.type = eWNI_SME_UNPROT_MGMT_FRM_IND;
@@ -5132,13 +5132,13 @@
 	if (!pMac || !psessionEntry)
 		return;
 
-	pSirSmeTsmIeInd = cdf_mem_malloc(sizeof(tSirSmeTsmIEInd));
+	pSirSmeTsmIeInd = qdf_mem_malloc(sizeof(tSirSmeTsmIEInd));
 	if (NULL == pSirSmeTsmIeInd) {
 		lim_log(pMac, LOGP,
 			FL("AllocateMemory failed for tSirSmeTsmIEInd"));
 		return;
 	}
-	cdf_mem_set((void *)pSirSmeTsmIeInd, sizeof(tSirSmeTsmIEInd), 0);
+	qdf_mem_set((void *)pSirSmeTsmIeInd, sizeof(tSirSmeTsmIEInd), 0);
 
 	pSirSmeTsmIeInd->sessionId = psessionEntry->smeSessionId;
 	pSirSmeTsmIeInd->tsmIe.tsid = tid;
diff --git a/core/mac/src/pe/lim/lim_assoc_utils.h b/core/mac/src/pe/lim/lim_assoc_utils.h
index 8b6df1c..941513b 100644
--- a/core/mac/src/pe/lim/lim_assoc_utils.h
+++ b/core/mac/src/pe/lim/lim_assoc_utils.h
@@ -45,7 +45,7 @@
 
 #include "lim_types.h"
 
-bool lim_cmp_ssid(tSirMacSSid *, tpPESession);
+uint32_t lim_cmp_ssid(tSirMacSSid *, tpPESession);
 uint8_t lim_compare_capabilities(tpAniSirGlobal,
 				 tSirAssocReq *,
 				 tSirMacCapabilityInfo *, tpPESession);
diff --git a/core/mac/src/pe/lim/lim_ft.c b/core/mac/src/pe/lim/lim_ft.c
index 2122371..ee01162 100644
--- a/core/mac/src/pe/lim/lim_ft.c
+++ b/core/mac/src/pe/lim/lim_ft.c
@@ -61,7 +61,7 @@
 void lim_ft_open(tpAniSirGlobal pMac, tpPESession psessionEntry)
 {
 	if (psessionEntry)
-		cdf_mem_set(&psessionEntry->ftPEContext, sizeof(tftPEContext),
+		qdf_mem_set(&psessionEntry->ftPEContext, sizeof(tftPEContext),
 			    0);
 }
 
@@ -95,27 +95,27 @@
 			       psessionEntry->ftPEContext.pFTPreAuthReq);
 		if (psessionEntry->ftPEContext.pFTPreAuthReq->
 		    pbssDescription) {
-			cdf_mem_free(psessionEntry->ftPEContext.pFTPreAuthReq->
+			qdf_mem_free(psessionEntry->ftPEContext.pFTPreAuthReq->
 				     pbssDescription);
 			psessionEntry->ftPEContext.pFTPreAuthReq->
 			pbssDescription = NULL;
 		}
-		cdf_mem_free(psessionEntry->ftPEContext.pFTPreAuthReq);
+		qdf_mem_free(psessionEntry->ftPEContext.pFTPreAuthReq);
 		psessionEntry->ftPEContext.pFTPreAuthReq = NULL;
 	}
 
 	if (psessionEntry->ftPEContext.pAddBssReq) {
-		cdf_mem_free(psessionEntry->ftPEContext.pAddBssReq);
+		qdf_mem_free(psessionEntry->ftPEContext.pAddBssReq);
 		psessionEntry->ftPEContext.pAddBssReq = NULL;
 	}
 
 	if (psessionEntry->ftPEContext.pAddStaReq) {
-		cdf_mem_free(psessionEntry->ftPEContext.pAddStaReq);
+		qdf_mem_free(psessionEntry->ftPEContext.pAddStaReq);
 		psessionEntry->ftPEContext.pAddStaReq = NULL;
 	}
 
 	/* The session is being deleted, cleanup the contents */
-	cdf_mem_set(&psessionEntry->ftPEContext, sizeof(tftPEContext), 0);
+	qdf_mem_set(&psessionEntry->ftPEContext, sizeof(tftPEContext), 0);
 
 	/* Delete the session created while handling pre-auth response */
 	if (pReAssocSessionEntry) {
@@ -166,27 +166,27 @@
 		if (NULL !=
 		    psessionEntry->ftPEContext.pFTPreAuthReq->
 		    pbssDescription) {
-			cdf_mem_free(psessionEntry->ftPEContext.pFTPreAuthReq->
+			qdf_mem_free(psessionEntry->ftPEContext.pFTPreAuthReq->
 				     pbssDescription);
 			psessionEntry->ftPEContext.pFTPreAuthReq->
 			pbssDescription = NULL;
 		}
-		cdf_mem_free(psessionEntry->ftPEContext.pFTPreAuthReq);
+		qdf_mem_free(psessionEntry->ftPEContext.pFTPreAuthReq);
 		psessionEntry->ftPEContext.pFTPreAuthReq = NULL;
 	}
 
 	if (psessionEntry->ftPEContext.pAddBssReq) {
-		cdf_mem_free(psessionEntry->ftPEContext.pAddBssReq);
+		qdf_mem_free(psessionEntry->ftPEContext.pAddBssReq);
 		psessionEntry->ftPEContext.pAddBssReq = NULL;
 	}
 
 	if (psessionEntry->ftPEContext.pAddStaReq) {
-		cdf_mem_free(psessionEntry->ftPEContext.pAddStaReq);
+		qdf_mem_free(psessionEntry->ftPEContext.pAddStaReq);
 		psessionEntry->ftPEContext.pAddStaReq = NULL;
 	}
 
 	/* The session is being deleted, cleanup the contents */
-	cdf_mem_set(&psessionEntry->ftPEContext, sizeof(tftPEContext), 0);
+	qdf_mem_set(&psessionEntry->ftPEContext, sizeof(tftPEContext), 0);
 }
 
 /*
@@ -248,12 +248,12 @@
 	/* Indicate that this is the session on which preauth is being done */
 	if (session->ftPEContext.pFTPreAuthReq) {
 		if (session->ftPEContext.pFTPreAuthReq->pbssDescription) {
-			cdf_mem_free(
+			qdf_mem_free(
 			  session->ftPEContext.pFTPreAuthReq->pbssDescription);
 			session->ftPEContext.pFTPreAuthReq->pbssDescription =
 									NULL;
 		}
-		cdf_mem_free(session->ftPEContext.pFTPreAuthReq);
+		qdf_mem_free(session->ftPEContext.pFTPreAuthReq);
 		session->ftPEContext.pFTPreAuthReq = NULL;
 	}
 
@@ -392,22 +392,22 @@
 		return eSIR_FAILURE;
 	}
 
-	pBeaconStruct = cdf_mem_malloc(sizeof(tSchBeaconStruct));
+	pBeaconStruct = qdf_mem_malloc(sizeof(tSchBeaconStruct));
 	if (NULL == pBeaconStruct) {
 		lim_log(pMac, LOGE,
 			FL("Unable to allocate memory for creating ADD_BSS"));
 		return eSIR_MEM_ALLOC_FAILED;
 	}
 	/* Package SIR_HAL_ADD_BSS_REQ message parameters */
-	pAddBssParams = cdf_mem_malloc(sizeof(tAddBssParams));
+	pAddBssParams = qdf_mem_malloc(sizeof(tAddBssParams));
 	if (NULL == pAddBssParams) {
-		cdf_mem_free(pBeaconStruct);
+		qdf_mem_free(pBeaconStruct);
 		lim_log(pMac, LOGP,
 			FL("Unable to allocate memory for creating ADD_BSS"));
 		return eSIR_MEM_ALLOC_FAILED;
 	}
 
-	cdf_mem_set((uint8_t *) pAddBssParams, sizeof(tAddBssParams), 0);
+	qdf_mem_set((uint8_t *) pAddBssParams, sizeof(tAddBssParams), 0);
 
 	lim_extract_ap_capabilities(pMac, (uint8_t *) bssDescription->ieFields,
 			lim_get_ielen_from_bss_description(bssDescription),
@@ -418,11 +418,11 @@
 		lim_decide_sta_protection_on_assoc(pMac, pBeaconStruct,
 						   pftSessionEntry);
 
-	cdf_mem_copy(pAddBssParams->bssId, bssDescription->bssId,
+	qdf_mem_copy(pAddBssParams->bssId, bssDescription->bssId,
 		     sizeof(tSirMacAddr));
 
 	/* Fill in tAddBssParams selfMacAddr */
-	cdf_mem_copy(pAddBssParams->selfMacAddr, pftSessionEntry->selfMacAddr,
+	qdf_mem_copy(pAddBssParams->selfMacAddr, pftSessionEntry->selfMacAddr,
 		     sizeof(tSirMacAddr));
 
 	pAddBssParams->bssType = pftSessionEntry->bssType;
@@ -445,7 +445,7 @@
 
 	pAddBssParams->rateSet.numRates =
 		pBeaconStruct->supportedRates.numRates;
-	cdf_mem_copy(pAddBssParams->rateSet.rate,
+	qdf_mem_copy(pAddBssParams->rateSet.rate,
 		     pBeaconStruct->supportedRates.rate,
 		     pBeaconStruct->supportedRates.numRates);
 
@@ -469,10 +469,10 @@
 	if (IS_DOT11_MODE_HT(pftSessionEntry->dot11mode) &&
 	    (pBeaconStruct->HTCaps.present)) {
 		pAddBssParams->htCapable = pBeaconStruct->HTCaps.present;
-		cdf_mem_copy(&pAddBssParams->staContext.capab_info,
+		qdf_mem_copy(&pAddBssParams->staContext.capab_info,
 			     &pBeaconStruct->capabilityInfo,
 			     sizeof(pAddBssParams->staContext.capab_info));
-		cdf_mem_copy(&pAddBssParams->staContext.ht_caps,
+		qdf_mem_copy(&pAddBssParams->staContext.ht_caps,
 			     (uint8_t *) &pBeaconStruct->HTCaps +
 			     sizeof(uint8_t),
 			     sizeof(pAddBssParams->staContext.ht_caps));
@@ -584,7 +584,7 @@
 	{
 		pAddBssParams->staContext.staType = STA_ENTRY_OTHER;
 
-		cdf_mem_copy(pAddBssParams->staContext.bssId,
+		qdf_mem_copy(pAddBssParams->staContext.bssId,
 			     bssDescription->bssId, sizeof(tSirMacAddr));
 		pAddBssParams->staContext.listenInterval =
 			bssDescription->beaconInterval;
@@ -748,7 +748,7 @@
 
 	lim_log(pMac, LOG1, FL("Saving SIR_HAL_ADD_BSS_REQ for pre-auth ap..."));
 
-	cdf_mem_free(pBeaconStruct);
+	qdf_mem_free(pBeaconStruct);
 	return 0;
 }
 
@@ -769,7 +769,7 @@
 	uint32_t selfDot11Mode;
 	ePhyChanBondState cbEnabledMode;
 
-	pBeaconStruct = cdf_mem_malloc(sizeof(tSchBeaconStruct));
+	pBeaconStruct = qdf_mem_malloc(sizeof(tSchBeaconStruct));
 	if (NULL == pBeaconStruct) {
 		lim_log(pMac, LOGE,
 			FL("No memory for creating lim_fill_ft_session"));
@@ -795,18 +795,18 @@
 
 	pftSessionEntry->rateSet.numRates =
 		pBeaconStruct->supportedRates.numRates;
-	cdf_mem_copy(pftSessionEntry->rateSet.rate,
+	qdf_mem_copy(pftSessionEntry->rateSet.rate,
 		     pBeaconStruct->supportedRates.rate,
 		     pBeaconStruct->supportedRates.numRates);
 
 	pftSessionEntry->extRateSet.numRates =
 		pBeaconStruct->extendedRates.numRates;
-	cdf_mem_copy(pftSessionEntry->extRateSet.rate,
+	qdf_mem_copy(pftSessionEntry->extRateSet.rate,
 		     pBeaconStruct->extendedRates.rate,
 		     pftSessionEntry->extRateSet.numRates);
 
 	pftSessionEntry->ssId.length = pBeaconStruct->ssId.length;
-	cdf_mem_copy(pftSessionEntry->ssId.ssId, pBeaconStruct->ssId.ssId,
+	qdf_mem_copy(pftSessionEntry->ssId.ssId, pBeaconStruct->ssId.ssId,
 		     pftSessionEntry->ssId.length);
 
 	wlan_cfg_get_int(pMac, WNI_CFG_DOT11_MODE, &selfDot11Mode);
@@ -962,7 +962,7 @@
 	pftSessionEntry->limRmfEnabled = psessionEntry->limRmfEnabled;
 #endif
 
-	cdf_mem_free(pBeaconStruct);
+	qdf_mem_free(pBeaconStruct);
 }
 
 /*------------------------------------------------------------------
@@ -1059,13 +1059,13 @@
 	tSirMsgQ mmh_msg;
 	uint16_t rsp_len = sizeof(tSirFTPreAuthRsp);
 
-	ft_pre_auth_rsp = (tpSirFTPreAuthRsp) cdf_mem_malloc(rsp_len);
+	ft_pre_auth_rsp = (tpSirFTPreAuthRsp) qdf_mem_malloc(rsp_len);
 	if (NULL == ft_pre_auth_rsp) {
 		lim_log(mac_ctx, LOGE, "Failed to allocate memory");
 		QDF_ASSERT(ft_pre_auth_rsp != NULL);
 		return;
 	}
-	cdf_mem_zero(ft_pre_auth_rsp, rsp_len);
+	qdf_mem_zero(ft_pre_auth_rsp, rsp_len);
 
 	lim_log(mac_ctx, LOG1, FL("Auth Rsp = %p"), ft_pre_auth_rsp);
 	if (session) {
@@ -1073,7 +1073,7 @@
 		if (!LIM_IS_STA_ROLE(session)) {
 			lim_log(mac_ctx, LOGE,
 				FL("session is not in STA mode"));
-			cdf_mem_free(ft_pre_auth_rsp);
+			qdf_mem_free(ft_pre_auth_rsp);
 			return;
 		}
 		ft_pre_auth_rsp->smeSessionId = session->smeSessionId;
@@ -1091,7 +1091,7 @@
 	ft_pre_auth_rsp->ft_ies_length = 0;
 	if ((auth_rsp != NULL) && (auth_rsp_length < MAX_FTIE_SIZE)) {
 		/* Only 11r assoc has FT IEs */
-		cdf_mem_copy(ft_pre_auth_rsp->ft_ies,
+		qdf_mem_copy(ft_pre_auth_rsp->ft_ies,
 			     auth_rsp, auth_rsp_length);
 		ft_pre_auth_rsp->ft_ies_length = auth_rsp_length;
 	}
@@ -1154,7 +1154,7 @@
 	 */
 	psessionEntry->ftPEContext.saved_auth_rsp_length = 0;
 	if ((auth_rsp != NULL) && (auth_rsp_length < MAX_FTIE_SIZE)) {
-		cdf_mem_copy(psessionEntry->ftPEContext.saved_auth_rsp,
+		qdf_mem_copy(psessionEntry->ftPEContext.saved_auth_rsp,
 			     auth_rsp, auth_rsp_length);
 		psessionEntry->ftPEContext.saved_auth_rsp_length =
 			auth_rsp_length;
@@ -1199,7 +1199,7 @@
 			lim_log(pMac, LOGE, FL("Invalid bss type"));
 		}
 		pftSessionEntry->limPrevSmeState = pftSessionEntry->limSmeState;
-		cdf_mem_copy(&(pftSessionEntry->htConfig),
+		qdf_mem_copy(&(pftSessionEntry->htConfig),
 			     &(psessionEntry->htConfig),
 			     sizeof(psessionEntry->htConfig));
 		pftSessionEntry->limSmeState = eLIM_SME_WT_REASSOC_STATE;
@@ -1270,14 +1270,14 @@
 		lim_log(pMac, LOGE, FL("pAddBssReq is NULL"));
 		return;
 	}
-	pMlmReassocReq = cdf_mem_malloc(sizeof(tLimMlmReassocReq));
+	pMlmReassocReq = qdf_mem_malloc(sizeof(tLimMlmReassocReq));
 	if (NULL == pMlmReassocReq) {
 		lim_log(pMac, LOGE,
 			FL("call to AllocateMemory failed for mlmReassocReq"));
 		return;
 	}
 
-	cdf_mem_copy(pMlmReassocReq->peerMacAddr,
+	qdf_mem_copy(pMlmReassocReq->peerMacAddr,
 		     psessionEntry->bssId, sizeof(tSirMacAddr));
 
 	if (wlan_cfg_get_int(pMac, WNI_CFG_REASSOCIATION_FAILURE_TIMEOUT,
@@ -1289,7 +1289,7 @@
 		 */
 		lim_log(pMac, LOGE,
 			FL("could not retrieve ReassocFailureTimeout value"));
-		cdf_mem_free(pMlmReassocReq);
+		qdf_mem_free(pMlmReassocReq);
 		return;
 	}
 
@@ -1299,7 +1299,7 @@
 		 * from CFG. Log error.
 		 */
 		lim_log(pMac, LOGE, FL("could not retrieve Capabilities value"));
-		cdf_mem_free(pMlmReassocReq);
+		qdf_mem_free(pMlmReassocReq);
 		return;
 	}
 	pMlmReassocReq->capabilityInfo = caps;
@@ -1314,7 +1314,7 @@
 	    eSIR_SUCCESS) {
 		lim_log(pMac, LOGP,
 			FL("Couldn't get WNI_CFG_TELE_BCN_WAKEUP_EN"));
-		cdf_mem_free(pMlmReassocReq);
+		qdf_mem_free(pMlmReassocReq);
 		return;
 	}
 
@@ -1327,7 +1327,7 @@
 			 */
 			lim_log(pMac, LOGE,
 				FL("could not retrieve ListenInterval"));
-			cdf_mem_free(pMlmReassocReq);
+			qdf_mem_free(pMlmReassocReq);
 			return;
 		}
 	} else {
@@ -1339,14 +1339,14 @@
 			 */
 			lim_log(pMac, LOGE,
 				FL("could not retrieve ListenInterval"));
-			cdf_mem_free(pMlmReassocReq);
+			qdf_mem_free(pMlmReassocReq);
 			return;
 		}
 	}
 	if (lim_set_link_state
 		    (pMac, eSIR_LINK_PREASSOC_STATE, psessionEntry->bssId,
 		    psessionEntry->selfMacAddr, NULL, NULL) != eSIR_SUCCESS) {
-		cdf_mem_free(pMlmReassocReq);
+		qdf_mem_free(pMlmReassocReq);
 		return;
 	}
 
@@ -1365,7 +1365,7 @@
 	MTRACE(mac_trace_msg_tx(pMac, psessionEntry->peSessionId, msgQ.type));
 	retCode = wma_post_ctrl_msg(pMac, &msgQ);
 	if (eSIR_SUCCESS != retCode) {
-		cdf_mem_free(psessionEntry->ftPEContext.pAddBssReq);
+		qdf_mem_free(psessionEntry->ftPEContext.pAddBssReq);
 		lim_log(pMac, LOGE,
 			FL("Posting ADD_BSS_REQ to HAL failed, reason=%X"),
 			retCode);
@@ -1493,14 +1493,14 @@
 			&psessionEntry->ftPEContext.PreAuthKeyInfo.
 			extSetStaKeyParam;
 
-		cdf_mem_zero(pMlmSetKeysReq, sizeof(tLimMlmSetKeysReq));
+		qdf_mem_zero(pMlmSetKeysReq, sizeof(tLimMlmSetKeysReq));
 		qdf_copy_macaddr(&pMlmSetKeysReq->peer_macaddr,
 				 &pKeyInfo->bssid);
 		pMlmSetKeysReq->sessionId = psessionEntry->peSessionId;
 		pMlmSetKeysReq->smesessionId = psessionEntry->smeSessionId;
 		pMlmSetKeysReq->edType = pKeyInfo->keyMaterial.edType;
 		pMlmSetKeysReq->numKeys = pKeyInfo->keyMaterial.numKeys;
-		cdf_mem_copy((uint8_t *) &pMlmSetKeysReq->key,
+		qdf_mem_copy((uint8_t *) &pMlmSetKeysReq->key,
 			     (uint8_t *) &pKeyInfo->keyMaterial.key,
 			     sizeof(tSirKeys));
 
@@ -1523,7 +1523,7 @@
 		pAddBssParams->extSetStaKeyParamValid = 1;
 		pAddBssParams->extSetStaKeyParam.encType =
 			pKeyInfo->keyMaterial.edType;
-		cdf_mem_copy((uint8_t *) &pAddBssParams->extSetStaKeyParam.key,
+		qdf_mem_copy((uint8_t *) &pAddBssParams->extSetStaKeyParam.key,
 			     (uint8_t *) &pKeyInfo->keyMaterial.key,
 			     sizeof(tSirKeys));
 		if (eSIR_SUCCESS !=
@@ -1602,13 +1602,13 @@
 	if (!rspReqd) {
 		return;
 	}
-	rsp = cdf_mem_malloc(sizeof(tSirAggrQosRsp));
+	rsp = qdf_mem_malloc(sizeof(tSirAggrQosRsp));
 	if (NULL == rsp) {
 		lim_log(pMac, LOGP,
 			FL("AllocateMemory failed for tSirAggrQosRsp"));
 		return;
 	}
-	cdf_mem_set((uint8_t *) rsp, sizeof(*rsp), 0);
+	qdf_mem_set((uint8_t *) rsp, sizeof(*rsp), 0);
 	rsp->messageType = eWNI_SME_FT_AGGR_QOS_RSP;
 	rsp->sessionId = smesessionId;
 	rsp->length = sizeof(*rsp);
@@ -1646,7 +1646,7 @@
 			       FL("Cant find session entry for %s"), __func__);
 		       )
 		if (pAggrQosRspMsg != NULL) {
-			cdf_mem_free(pAggrQosRspMsg);
+			qdf_mem_free(pAggrQosRspMsg);
 		}
 		return;
 	}
@@ -1681,7 +1681,7 @@
 	lim_ft_send_aggr_qos_rsp(pMac, rspReqd, pAggrQosRspMsg,
 				 psessionEntry->smeSessionId);
 	if (pAggrQosRspMsg != NULL) {
-		cdf_mem_free(pAggrQosRspMsg);
+		qdf_mem_free(pAggrQosRspMsg);
 	}
 	return;
 }
@@ -1698,7 +1698,7 @@
 	uint8_t sessionId;
 	int i;
 
-	pAggrAddTsParam = cdf_mem_malloc(sizeof(tAggrAddTsParams));
+	pAggrAddTsParam = qdf_mem_malloc(sizeof(tAggrAddTsParams));
 	if (NULL == pAggrAddTsParam) {
 		PELOGE(lim_log(pMac, LOGE, FL("AllocateMemory() failed"));)
 		return eSIR_MEM_ALLOC_FAILED;
@@ -1713,14 +1713,14 @@
 			       FL("psession Entry Null for sessionId = %d"),
 			       aggrQosReq->sessionId);
 		       )
-		cdf_mem_free(pAggrAddTsParam);
+		qdf_mem_free(pAggrAddTsParam);
 		return eSIR_FAILURE;
 	}
 
 	/* Nothing to be done if the session is not in STA mode */
 	if (!LIM_IS_STA_ROLE(psessionEntry)) {
 		lim_log(pMac, LOGE, FL("psessionEntry is not in STA mode"));
-		cdf_mem_free(pAggrAddTsParam);
+		qdf_mem_free(pAggrAddTsParam);
 		return eSIR_FAILURE;
 	}
 
@@ -1731,11 +1731,11 @@
 			       FL
 				       ("Station context not found - ignoring AddTsRsp"));
 		       )
-		cdf_mem_free(pAggrAddTsParam);
+		qdf_mem_free(pAggrAddTsParam);
 		return eSIR_FAILURE;
 	}
 
-	cdf_mem_set((uint8_t *) pAggrAddTsParam, sizeof(tAggrAddTsParams), 0);
+	qdf_mem_set((uint8_t *) pAggrAddTsParam, sizeof(tAggrAddTsParams), 0);
 	pAggrAddTsParam->staIdx = psessionEntry->staId;
 	/* Fill in the sessionId specific to PE */
 	pAggrAddTsParam->sessionId = sessionId;
@@ -1815,7 +1815,7 @@
 						       ("Adding entry in lim Tspec Table failed "));
 				       )
 				pMac->lim.gLimAddtsSent = false;
-				cdf_mem_free(pAggrAddTsParam);
+				qdf_mem_free(pAggrAddTsParam);
 				return eSIR_FAILURE;
 			}
 
@@ -1845,7 +1845,7 @@
 				       (pMac, LOGW, FL("wma_post_ctrl_msg() failed"));
 			       )
 			SET_LIM_PROCESS_DEFD_MESGS(pMac, true);
-			cdf_mem_free(pAggrAddTsParam);
+			qdf_mem_free(pAggrAddTsParam);
 			return eSIR_FAILURE;
 		}
 	}
@@ -1859,7 +1859,7 @@
 		lim_ft_send_aggr_qos_rsp(pMac, true, pAggrAddTsParam,
 					 psessionEntry->smeSessionId);
 		if (pAggrAddTsParam != NULL) {
-			cdf_mem_free(pAggrAddTsParam);
+			qdf_mem_free(pAggrAddTsParam);
 		}
 	}
 #endif
@@ -1887,24 +1887,24 @@
 	tSirRetStatus rc = eSIR_SUCCESS;
 	tSirMsgQ msg;
 
-	scan_offload_req = cdf_mem_malloc(sizeof(tSirScanOffloadReq));
+	scan_offload_req = qdf_mem_malloc(sizeof(tSirScanOffloadReq));
 	if (NULL == scan_offload_req) {
 		lim_log(mac_ctx, LOGE,
 			FL("Memory allocation failed for pScanOffloadReq"));
 		return QDF_STATUS_E_NOMEM;
 	}
 
-	cdf_mem_zero(scan_offload_req, sizeof(tSirScanOffloadReq));
+	qdf_mem_zero(scan_offload_req, sizeof(tSirScanOffloadReq));
 
 	msg.type = WMA_START_SCAN_OFFLOAD_REQ;
 	msg.bodyptr = scan_offload_req;
 	msg.bodyval = 0;
 
-	cdf_mem_copy((uint8_t *) &scan_offload_req->selfMacAddr.bytes,
+	qdf_mem_copy((uint8_t *) &scan_offload_req->selfMacAddr.bytes,
 		     (uint8_t *) ft_preauth_req->self_mac_addr,
 		     sizeof(tSirMacAddr));
 
-	cdf_mem_copy((uint8_t *) &scan_offload_req->bssId.bytes,
+	qdf_mem_copy((uint8_t *) &scan_offload_req->bssId.bytes,
 		     (uint8_t *) ft_preauth_req->currbssId,
 		     sizeof(tSirMacAddr));
 	scan_offload_req->scanType = eSIR_PASSIVE_SCAN;
@@ -1932,7 +1932,7 @@
 	rc = wma_post_ctrl_msg(mac_ctx, &msg);
 	if (rc != eSIR_SUCCESS) {
 		lim_log(mac_ctx, LOGE, FL("START_SCAN_OFFLOAD failed %u"), rc);
-		cdf_mem_free(scan_offload_req);
+		qdf_mem_free(scan_offload_req);
 		return QDF_STATUS_E_FAILURE;
 	}
 
diff --git a/core/mac/src/pe/lim/lim_ibss_peer_mgmt.c b/core/mac/src/pe/lim/lim_ibss_peer_mgmt.c
index 697532d..a8c2680 100644
--- a/core/mac/src/pe/lim/lim_ibss_peer_mgmt.c
+++ b/core/mac/src/pe/lim/lim_ibss_peer_mgmt.c
@@ -68,7 +68,7 @@
 	tLimIbssPeerNode *pTempNode = pMac->lim.gLimIbssPeerList;
 
 	while (pTempNode != NULL) {
-		if (cdf_mem_compare((uint8_t *) macAddr,
+		if (!qdf_mem_cmp((uint8_t *) macAddr,
 				    (uint8_t *) &pTempNode->peerMacAddr,
 				    sizeof(tSirMacAddr)))
 			break;
@@ -115,10 +115,10 @@
 			pTemp = pTemp->next;
 		}
 		if (pTemp->beacon) {
-			cdf_mem_free(pTemp->beacon);
+			qdf_mem_free(pTemp->beacon);
 		}
 
-		cdf_mem_free(pTemp);
+		qdf_mem_free(pTemp);
 		pPrev->next = NULL;
 	} else
 #endif
@@ -158,7 +158,7 @@
 		  tpSirMacMgmtHdr pHdr,
 		  tLimIbssPeerNode *pPeer, tpPESession psessionEntry)
 {
-	cdf_mem_copy(pPeer->peerMacAddr, pHdr->sa, sizeof(tSirMacAddr));
+	qdf_mem_copy(pPeer->peerMacAddr, pHdr->sa, sizeof(tSirMacAddr));
 
 	pPeer->capabilityInfo = pBeacon->capabilityInfo;
 	pPeer->extendedRatesPresent = pBeacon->extendedRatesPresent;
@@ -174,7 +174,7 @@
 	if (IS_DOT11_MODE_HT(psessionEntry->dot11mode) &&
 	    (pBeacon->HTCaps.present)) {
 		pPeer->htCapable = pBeacon->HTCaps.present;
-		cdf_mem_copy((uint8_t *) pPeer->supportedMCSSet,
+		qdf_mem_copy((uint8_t *) pPeer->supportedMCSSet,
 			     (uint8_t *) pBeacon->HTCaps.supportedMCSSet,
 			     sizeof(pPeer->supportedMCSSet));
 		pPeer->htGreenfield = (uint8_t) pBeacon->HTCaps.greenField;
@@ -203,18 +203,18 @@
 		pPeer->vhtCapable = pBeacon->VHTCaps.present;
 
 		/* Collect VHT capabilities from beacon */
-		cdf_mem_copy((uint8_t *) &pPeer->VHTCaps,
+		qdf_mem_copy((uint8_t *) &pPeer->VHTCaps,
 			     (uint8_t *) &pBeacon->VHTCaps,
 			     sizeof(tDot11fIEVHTCaps));
 	}
 #endif
 	pPeer->erpIePresent = pBeacon->erpPresent;
 
-	cdf_mem_copy((uint8_t *) &pPeer->supportedRates,
+	qdf_mem_copy((uint8_t *) &pPeer->supportedRates,
 		     (uint8_t *) &pBeacon->supportedRates,
 		     pBeacon->supportedRates.numRates + 1);
 	if (pPeer->extendedRatesPresent)
-		cdf_mem_copy((uint8_t *) &pPeer->extendedRates,
+		qdf_mem_copy((uint8_t *) &pPeer->extendedRates,
 			     (uint8_t *) &pBeacon->extendedRates,
 			     pBeacon->extendedRates.numRates + 1);
 	else
@@ -380,9 +380,9 @@
 static void ibss_coalesce_free(tpAniSirGlobal pMac)
 {
 	if (pMac->lim.ibssInfo.pHdr != NULL)
-		cdf_mem_free(pMac->lim.ibssInfo.pHdr);
+		qdf_mem_free(pMac->lim.ibssInfo.pHdr);
 	if (pMac->lim.ibssInfo.pBeacon != NULL)
-		cdf_mem_free(pMac->lim.ibssInfo.pBeacon);
+		qdf_mem_free(pMac->lim.ibssInfo.pBeacon);
 
 	pMac->lim.ibssInfo.pHdr = NULL;
 	pMac->lim.ibssInfo.pBeacon = NULL;
@@ -398,12 +398,12 @@
 	/* get rid of any saved info */
 	ibss_coalesce_free(pMac);
 
-	pMac->lim.ibssInfo.pHdr = cdf_mem_malloc(sizeof(*pHdr));
+	pMac->lim.ibssInfo.pHdr = qdf_mem_malloc(sizeof(*pHdr));
 	if (NULL == pMac->lim.ibssInfo.pHdr) {
 		PELOGE(lim_log(pMac, LOGE, FL("ibbs-save: Failed malloc pHdr"));)
 		return;
 	}
-	pMac->lim.ibssInfo.pBeacon = cdf_mem_malloc(sizeof(*pBeacon));
+	pMac->lim.ibssInfo.pBeacon = qdf_mem_malloc(sizeof(*pBeacon));
 	if (NULL == pMac->lim.ibssInfo.pBeacon) {
 		PELOGE(lim_log
 			       (pMac, LOGE, FL("ibbs-save: Failed malloc pBeacon"));
@@ -412,8 +412,8 @@
 		return;
 	}
 
-	cdf_mem_copy(pMac->lim.ibssInfo.pHdr, pHdr, sizeof(*pHdr));
-	cdf_mem_copy(pMac->lim.ibssInfo.pBeacon, pBeacon, sizeof(*pBeacon));
+	qdf_mem_copy(pMac->lim.ibssInfo.pHdr, pHdr, sizeof(*pHdr));
+	qdf_mem_copy(pMac->lim.ibssInfo.pBeacon, pBeacon, sizeof(*pBeacon));
 }
 
 /*
@@ -502,7 +502,7 @@
 				   beacon, bcnLen, status, sessionId);
 
 	if (beacon != NULL) {
-		cdf_mem_free(beacon);
+		qdf_mem_free(beacon);
 	}
 }
 
@@ -523,7 +523,7 @@
 		return;
 	}
 
-	cdf_mem_copy(psessionEntry->bssId, pHdr->bssId, sizeof(tSirMacAddr));
+	qdf_mem_copy(psessionEntry->bssId, pHdr->bssId, sizeof(tSirMacAddr));
 
 	sir_copy_mac_addr(pHdr->bssId, psessionEntry->bssId);
 
@@ -544,7 +544,7 @@
 		psessionEntry->shortSlotTimeSupported =
 			pBeacon->capabilityInfo.shortSlotTime;
 	}
-	cdf_mem_copy((uint8_t *) &psessionEntry->pLimStartBssReq->
+	qdf_mem_copy((uint8_t *) &psessionEntry->pLimStartBssReq->
 		     operationalRateSet, (uint8_t *) &pBeacon->supportedRates,
 		     pBeacon->supportedRates.numRates);
 
@@ -575,12 +575,12 @@
 	 * even though all the nodes are capable of doing CB.
 	 * so it is decided to leave the self HT capabilties intact. This may change if some issues are found in interop.
 	 */
-	cdf_mem_set((void *)&mlmStartReq, sizeof(mlmStartReq), 0);
+	qdf_mem_set((void *)&mlmStartReq, sizeof(mlmStartReq), 0);
 
-	cdf_mem_copy(mlmStartReq.bssId, pHdr->bssId, sizeof(tSirMacAddr));
+	qdf_mem_copy(mlmStartReq.bssId, pHdr->bssId, sizeof(tSirMacAddr));
 	mlmStartReq.rateSet.numRates =
 		psessionEntry->pLimStartBssReq->operationalRateSet.numRates;
-	cdf_mem_copy(&mlmStartReq.rateSet.rate[0],
+	qdf_mem_copy(&mlmStartReq.rateSet.rate[0],
 		     &psessionEntry->pLimStartBssReq->operationalRateSet.
 		     rate[0], mlmStartReq.rateSet.numRates);
 	mlmStartReq.bssType = eSIR_IBSS_MODE;
@@ -597,7 +597,7 @@
 	mlmStartReq.cbMode = psessionEntry->pLimStartBssReq->cbMode;
 
 	/* Copy the SSID for RxP filtering based on SSID. */
-	cdf_mem_copy((uint8_t *) &mlmStartReq.ssId,
+	qdf_mem_copy((uint8_t *) &mlmStartReq.ssId,
 		     (uint8_t *) &psessionEntry->pLimStartBssReq->ssId,
 		     psessionEntry->pLimStartBssReq->ssId.length + 1);
 
@@ -663,7 +663,7 @@
 	pMac->lim.gLimNumIbssPeers = 0;
 
 	/* ibss info - params for which ibss to join while coalescing */
-	cdf_mem_set(&pMac->lim.ibssInfo, sizeof(tAniSirLimIbss), 0);
+	qdf_mem_set(&pMac->lim.ibssInfo, sizeof(tAniSirLimIbss), 0);
 } /*** end lim_ibss_init() ***/
 
 /**
@@ -729,9 +729,9 @@
 		pMac->lim.gLimIbssPeerList = pTempNode;
 
 		if (pCurrNode->beacon) {
-			cdf_mem_free(pCurrNode->beacon);
+			qdf_mem_free(pCurrNode->beacon);
 		}
-		cdf_mem_free(pCurrNode);
+		qdf_mem_free(pCurrNode);
 		if (pMac->lim.gLimNumIbssPeers > 0) /* be paranoid */
 			pMac->lim.gLimNumIbssPeers--;
 		pCurrNode = pTempNode;
@@ -838,7 +838,7 @@
 				       (pMac, pMac->lim.protStaCache[i].addr, LOG1);
 			       )
 
-			if (cdf_mem_compare(pMac->lim.protStaCache[i].addr,
+			if (!qdf_mem_cmp(pMac->lim.protStaCache[i].addr,
 					    peerMacAddr,
 					    sizeof(tSirMacAddr))) {
 				PELOG1(lim_log
@@ -862,7 +862,7 @@
 		return;
 	}
 
-	cdf_mem_copy(pMac->lim.protStaCache[i].addr,
+	qdf_mem_copy(pMac->lim.protStaCache[i].addr,
 		     peerMacAddr, sizeof(tSirMacAddr));
 
 	pMac->lim.protStaCache[i].protStaCacheType = protStaCacheType;
@@ -985,7 +985,7 @@
 	tSirMacAddr *pPeerAddr = (tSirMacAddr *) pBody;
 	tUpdateBeaconParams beaconParams;
 
-	cdf_mem_set((uint8_t *) &beaconParams, sizeof(tUpdateBeaconParams), 0);
+	qdf_mem_set((uint8_t *) &beaconParams, sizeof(tUpdateBeaconParams), 0);
 
 	if (pBody == 0) {
 		PELOGE(lim_log(pMac, LOGE, FL("Invalid IBSS AddSta"));)
@@ -1084,7 +1084,7 @@
 			       FL("IBSS: ADD_STA_RSP for unknown MAC addr "));
 		       )
 		lim_print_mac_addr(pMac, pAddStaParams->staMac, LOGE);
-		cdf_mem_free(pAddStaParams);
+		qdf_mem_free(pAddStaParams);
 		return eSIR_FAILURE;
 	}
 
@@ -1094,7 +1094,7 @@
 			       pAddStaParams->status);
 		       )
 		lim_print_mac_addr(pMac, pAddStaParams->staMac, LOGE);
-		cdf_mem_free(pAddStaParams);
+		qdf_mem_free(pAddStaParams);
 		return eSIR_FAILURE;
 	}
 
@@ -1115,7 +1115,7 @@
 			       eWNI_SME_IBSS_NEW_PEER_IND,
 			       psessionEntry->smeSessionId);
 
-	cdf_mem_free(pAddStaParams);
+	qdf_mem_free(pAddStaParams);
 
 	return eSIR_SUCCESS;
 }
@@ -1151,7 +1151,7 @@
 
 end:
 	if (pDelBss != NULL)
-		cdf_mem_free(pDelBss);
+		qdf_mem_free(pDelBss);
 }
 
 void lim_ibss_add_bss_rsp_when_coalescing(tpAniSirGlobal pMac, void *msg,
@@ -1178,10 +1178,10 @@
 	infoLen = sizeof(tSirMacAddr) + sizeof(tSirMacChanNum) +
 		  sizeof(uint8_t) + pBeacon->ssId.length + 1;
 
-	cdf_mem_set((void *)&newBssInfo, sizeof(newBssInfo), 0);
-	cdf_mem_copy(newBssInfo.bssId.bytes, pHdr->bssId, QDF_MAC_ADDR_SIZE);
+	qdf_mem_set((void *)&newBssInfo, sizeof(newBssInfo), 0);
+	qdf_mem_copy(newBssInfo.bssId.bytes, pHdr->bssId, QDF_MAC_ADDR_SIZE);
 	newBssInfo.channelNumber = (tSirMacChanNum) pAddBss->currentOperChannel;
-	cdf_mem_copy((uint8_t *) &newBssInfo.ssId,
+	qdf_mem_copy((uint8_t *) &newBssInfo.ssId,
 		     (uint8_t *) &pBeacon->ssId, pBeacon->ssId.length + 1);
 
 	PELOGW(lim_log
@@ -1274,7 +1274,7 @@
 
 end:
 	if (pDelBss != NULL)
-		cdf_mem_free(pDelBss);
+		qdf_mem_free(pDelBss);
 	/* Delete PE session once BSS is deleted */
 	if (NULL != psessionEntry) {
 		lim_send_sme_rsp(pMac, eWNI_SME_STOP_BSS_RSP, rc,
@@ -1307,7 +1307,7 @@
 		pTempNextNode = pTempNode->next;
 
 		/* Delete the STA with MAC address */
-		if (cdf_mem_compare((uint8_t *) macAddr,
+		if (!qdf_mem_cmp((uint8_t *) macAddr,
 				    (uint8_t *) &pTempNode->peerMacAddr,
 				    sizeof(tSirMacAddr))) {
 			pStaDs = dph_lookup_hash_entry(pMac, macAddr,
@@ -1339,7 +1339,7 @@
 				} else
 					pPrevNode->next = pTempNode->next;
 
-				cdf_mem_free(pTempNode);
+				qdf_mem_free(pTempNode);
 				pMac->lim.gLimNumIbssPeers--;
 
 				pTempNode = pTempNextNode;
@@ -1393,7 +1393,7 @@
 	tpDphHashNode pStaDs;
 	tUpdateBeaconParams beaconParams;
 
-	cdf_mem_set((uint8_t *) &beaconParams, sizeof(tUpdateBeaconParams), 0);
+	qdf_mem_set((uint8_t *) &beaconParams, sizeof(tUpdateBeaconParams), 0);
 
 	sir_copy_mac_addr(currentBssId, psessionEntry->bssId);
 
@@ -1403,7 +1403,7 @@
 		MAC_ADDR_ARRAY(pHdr->bssId));
 
 	/* Check for IBSS Coalescing only if Beacon is from different BSS */
-	if (!cdf_mem_compare(currentBssId, pHdr->bssId, sizeof(tSirMacAddr))
+	if (qdf_mem_cmp(currentBssId, pHdr->bssId, sizeof(tSirMacAddr))
 	    && psessionEntry->isCoalesingInIBSSAllowed) {
 		/*
 		 * If STA entry is already available in the LIM hash table, then it is
@@ -1444,7 +1444,7 @@
 		ibss_bss_delete(pMac, psessionEntry);
 		return eSIR_SUCCESS;
 	} else {
-		if (!cdf_mem_compare
+		if (qdf_mem_cmp
 			    (currentBssId, pHdr->bssId, sizeof(tSirMacAddr)))
 			return eSIR_LIM_IGNORE_BEACON;
 	}
@@ -1480,7 +1480,7 @@
 		frameLen =
 			sizeof(tLimIbssPeerNode) + ieLen - sizeof(uint32_t);
 
-		pPeerNode = cdf_mem_malloc((uint16_t) frameLen);
+		pPeerNode = qdf_mem_malloc((uint16_t) frameLen);
 		if (NULL == pPeerNode) {
 			lim_log(pMac, LOGP,
 				FL
@@ -1494,7 +1494,7 @@
 
 		ibss_peer_collect(pMac, pBeacon, pHdr, pPeerNode,
 				  psessionEntry);
-		pPeerNode->beacon = cdf_mem_malloc(ieLen);
+		pPeerNode->beacon = qdf_mem_malloc(ieLen);
 		if (NULL == pPeerNode->beacon) {
 			PELOGE(lim_log
 				       (pMac, LOGE,
@@ -1502,7 +1502,7 @@
 					       ("Unable to allocate memory to store beacon"));
 			       )
 		} else {
-			cdf_mem_copy(pPeerNode->beacon, pIEs, ieLen);
+			qdf_mem_copy(pPeerNode->beacon, pIEs, ieLen);
 			pPeerNode->beaconLen = (uint16_t) ieLen;
 		}
 		ibss_peer_add(pMac, pPeerNode);
@@ -1659,7 +1659,7 @@
 				prevnode->next = tempnode->next;
 			}
 
-			cdf_mem_free(tempnode);
+			qdf_mem_free(tempnode);
 			mac_ctx->lim.gLimNumIbssPeers--;
 
 			/* we deleted current node, so prevNode remains same. */
@@ -1753,7 +1753,7 @@
 		for (i = 0; i < LIM_PROT_STA_CACHE_SIZE; i++) {
 			if (!mac_ctx->lim.protStaCache[i].active)
 				continue;
-			if (cdf_mem_compare(mac_ctx->lim.protStaCache[i].addr,
+			if (!qdf_mem_cmp(mac_ctx->lim.protStaCache[i].addr,
 				stads->staAddr, sizeof(tSirMacAddr))) {
 				session->gLim11bParams.numSta--;
 				mac_ctx->lim.protStaCache[i].active = false;
diff --git a/core/mac/src/pe/lim/lim_link_monitoring_algo.c b/core/mac/src/pe/lim/lim_link_monitoring_algo.c
index c61e189..416edf1 100644
--- a/core/mac/src/pe/lim/lim_link_monitoring_algo.c
+++ b/core/mac/src/pe/lim/lim_link_monitoring_algo.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012-2015 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2016 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -78,7 +78,7 @@
 		msg->staId, msg->reasonCode);
 
 	if (LIM_IS_IBSS_ROLE(session_entry)) {
-		cdf_mem_free(msg);
+		qdf_mem_free(msg);
 		return;
 	}
 
@@ -89,7 +89,7 @@
 		lim_log(mac_ctx, LOGE,
 			FL("Invalid STA limSystemRole=%d"),
 			GET_LIM_SYSTEM_ROLE(session_entry));
-		cdf_mem_free(msg);
+		qdf_mem_free(msg);
 		return;
 	}
 	stads->del_sta_ctx_rssi = msg->rssi;
@@ -100,7 +100,7 @@
 	if (stads->staIndex != msg->staId) {
 		lim_log(mac_ctx, LOGE, FL("staid mismatch: %d vs %d "),
 			stads->staIndex, msg->staId);
-		cdf_mem_free(msg);
+		qdf_mem_free(msg);
 		return;
 	}
 
@@ -125,7 +125,7 @@
 			lim_log(mac_ctx, LOGE,
 				FL("Inv Del STA staId:%d, assocId:%d"),
 				msg->staId, msg->assocId);
-			cdf_mem_free(msg);
+			qdf_mem_free(msg);
 			return;
 		} else {
 			lim_send_disassoc_mgmt_frame(mac_ctx,
@@ -172,7 +172,7 @@
 					"in some transit state, Addr = "
 					MAC_ADDRESS_STR),
 					MAC_ADDR_ARRAY(msg->bssId));
-			cdf_mem_free(msg);
+			qdf_mem_free(msg);
 			return;
 		}
 
@@ -182,7 +182,7 @@
 			eLIM_LINK_MONITORING_DEAUTH;
 
 		/* Issue Deauth Indication to SME. */
-		cdf_mem_copy((uint8_t *) &mlm_deauth_ind.peerMacAddr,
+		qdf_mem_copy((uint8_t *) &mlm_deauth_ind.peerMacAddr,
 			     stads->staAddr, sizeof(tSirMacAddr));
 		mlm_deauth_ind.reasonCode =
 			(uint8_t) stads->mlmStaContext.disassocReason;
@@ -229,7 +229,7 @@
 						 &session_id);
 	if (NULL == session_entry) {
 		lim_log(mac_ctx, LOGE, FL("session does not exist"));
-		cdf_mem_free(msg);
+		qdf_mem_free(msg);
 		return;
 	}
 
@@ -251,7 +251,7 @@
 		lim_log(mac_ctx, LOGE, FL(" Unknown reason code "));
 		break;
 	}
-	cdf_mem_free(msg);
+	qdf_mem_free(msg);
 	return;
 }
 
@@ -289,7 +289,7 @@
 	sta_ds->mlmStaContext.disassocReason =
 		eSIR_MAC_DISASSOC_DUE_TO_INACTIVITY_REASON;
 	sta_ds->mlmStaContext.cleanupTrigger = eLIM_LINK_MONITORING_DISASSOC;
-	cdf_mem_copy(&mlm_disassoc_ind.peerMacAddr, sta_ds->staAddr,
+	qdf_mem_copy(&mlm_disassoc_ind.peerMacAddr, sta_ds->staAddr,
 		sizeof(tSirMacAddr));
 	mlm_disassoc_ind.reasonCode =
 		eSIR_MAC_DISASSOC_DUE_TO_INACTIVITY_REASON;
@@ -329,7 +329,8 @@
 	/* tear down the following sessionEntry */
 	tpPESession psessionEntry;
 
-	if ((psessionEntry = pe_find_session_by_session_id(pMac, sessionId)) == NULL) {
+	psessionEntry = pe_find_session_by_session_id(pMac, sessionId);
+	if (psessionEntry == NULL) {
 		lim_log(pMac, LOGP,
 			FL("Session Does not exist for given sessionID"));
 		return;
@@ -377,7 +378,7 @@
 					eLIM_MLM_WT_DEL_STA_RSP_STATE;
 
 		/* / Issue Deauth Indication to SME. */
-		cdf_mem_copy((uint8_t *) &mlmDeauthInd.peerMacAddr,
+		qdf_mem_copy((uint8_t *) &mlmDeauthInd.peerMacAddr,
 			     pStaDs->staAddr, sizeof(tSirMacAddr));
 
 	/*
@@ -397,7 +398,7 @@
 
 		lim_log(pMac, LOGE, FL("HB Failure on MAC "
 			MAC_ADDRESS_STR" Store it on Index %d"),
-			MAC_ADDR_ARRAY(pStaDs->staAddr),apCount);
+			MAC_ADDR_ARRAY(pStaDs->staAddr), apCount);
 
 		sir_copy_mac_addr(pMac->lim.gLimHeartBeatApMac[apCount],
 							pStaDs->staAddr);
@@ -488,8 +489,8 @@
 			if (curr_chan < SIR_MAX_24G_5G_CHANNEL_RANGE) {
 				lim_covert_channel_scan_type(mac_ctx, curr_chan,
 					false);
-				mac_ctx->lim.dfschannelList.timeStamp[curr_chan]
-					 = 0;
+				mac_ctx->lim.dfschannelList.
+					timeStamp[curr_chan] = 0;
 			}
 			/*
 			 * Connected on DFS channel so should not send the
diff --git a/core/mac/src/pe/lim/lim_p2p.c b/core/mac/src/pe/lim/lim_p2p.c
index 1c8b8c7..bf79d48 100644
--- a/core/mac/src/pe/lim/lim_p2p.c
+++ b/core/mac/src/pe/lim/lim_p2p.c
@@ -85,14 +85,14 @@
 	tSirMsgQ msg;
 	tSirRetStatus rc = eSIR_SUCCESS;
 
-	pScanOffloadReq = cdf_mem_malloc(sizeof(tSirScanOffloadReq));
+	pScanOffloadReq = qdf_mem_malloc(sizeof(tSirScanOffloadReq));
 	if (NULL == pScanOffloadReq) {
 		lim_log(pMac, LOGE,
 			FL("Memory allocation failed for pScanOffloadReq"));
 		return QDF_STATUS_E_NOMEM;
 	}
 
-	cdf_mem_zero(pScanOffloadReq, sizeof(tSirScanOffloadReq));
+	qdf_mem_zero(pScanOffloadReq, sizeof(tSirScanOffloadReq));
 
 	msg.type = WMA_START_SCAN_OFFLOAD_REQ;
 	msg.bodyptr = pScanOffloadReq;
@@ -121,7 +121,7 @@
 	if (rc != eSIR_SUCCESS) {
 		lim_log(pMac, LOGE, FL("wma_post_ctrl_msg() return failure %u"),
 			rc);
-		cdf_mem_free(pScanOffloadReq);
+		qdf_mem_free(pScanOffloadReq);
 		return QDF_STATUS_E_FAILURE;
 	}
 
@@ -145,7 +145,7 @@
 		/* Post the meessage to Sme */
 		lim_send_sme_rsp(pMac, eWNI_SME_REMAIN_ON_CHN_RSP,
 				 status, msgbuff->sessionId, msgbuff->scan_id);
-		cdf_mem_free(pMac->lim.gpLimRemainOnChanReq);
+		qdf_mem_free(pMac->lim.gpLimRemainOnChanReq);
 		pMac->lim.gpLimRemainOnChanReq = NULL;
 	}
 	return false;
@@ -356,7 +356,7 @@
 			status,
 			MsgRemainonChannel->sessionId, 0);
 
-	cdf_mem_free(pMac->lim.gpLimRemainOnChanReq);
+	qdf_mem_free(pMac->lim.gpLimRemainOnChanReq);
 	pMac->lim.gpLimRemainOnChanReq = NULL;
 
 	pMac->lim.gLimMlmState = pMac->lim.gLimPrevMlmState;
@@ -386,13 +386,13 @@
 
 	length = sizeof(tSirSmeMgmtFrameInd) + frameLen;
 
-	pSirSmeMgmtFrame = cdf_mem_malloc(length);
+	pSirSmeMgmtFrame = qdf_mem_malloc(length);
 	if (NULL == pSirSmeMgmtFrame) {
 		lim_log(pMac, LOGP,
 			FL("AllocateMemory failed for eWNI_SME_LISTEN_RSP"));
 		return;
 	}
-	cdf_mem_set((void *)pSirSmeMgmtFrame, length, 0);
+	qdf_mem_set((void *)pSirSmeMgmtFrame, length, 0);
 
 	pSirSmeMgmtFrame->frame_len = frameLen;
 	pSirSmeMgmtFrame->sessionId = sessionId;
@@ -400,15 +400,15 @@
 	pSirSmeMgmtFrame->rxRssi = rxRssi;
 	pSirSmeMgmtFrame->rxChan = rxChannel;
 
-	cdf_mem_zero(pSirSmeMgmtFrame->frameBuf, frameLen);
-	cdf_mem_copy(pSirSmeMgmtFrame->frameBuf, frame, frameLen);
+	qdf_mem_zero(pSirSmeMgmtFrame->frameBuf, frameLen);
+	qdf_mem_copy(pSirSmeMgmtFrame->frameBuf, frame, frameLen);
 
 	if (pMac->mgmt_frame_ind_cb)
 		pMac->mgmt_frame_ind_cb(pSirSmeMgmtFrame);
 	else
 		lim_log(pMac, LOGW,
 			FL("Management indication callback not registered!!"));
-	cdf_mem_free(pSirSmeMgmtFrame);
+	qdf_mem_free(pSirSmeMgmtFrame);
 	return;
 }
 
@@ -577,8 +577,8 @@
 		tpSirMacP2PActionFrameHdr action_hdr =
 			(tpSirMacP2PActionFrameHdr) ((uint8_t *)
 			mb_msg->data + ACTION_OFFSET);
-		if (cdf_mem_compare(action_hdr->Oui, SIR_MAC_P2P_OUI,
-			SIR_MAC_P2P_OUI_SIZE) &&
+		if ((!qdf_mem_cmp(action_hdr->Oui, SIR_MAC_P2P_OUI,
+			SIR_MAC_P2P_OUI_SIZE)) &&
 			(SIR_MAC_ACTION_P2P_SUBTYPE_PRESENCE_RSP ==
 			action_hdr->OuiSubType)) {
 
@@ -663,7 +663,7 @@
 		return;
 	}
 	/* Paranoia: */
-	cdf_mem_set(frame, msg_len, 0);
+	qdf_mem_set(frame, msg_len, 0);
 
 	/*
 	 * Add sequence number to action frames
@@ -676,14 +676,14 @@
 		/* Add 2 bytes for length and Arribute field */
 		uint32_t nBytesToCopy = ((p2p_ie + orig_len + 2) -
 			 (uint8_t *) mb_msg->data);
-		cdf_mem_copy(frame, mb_msg->data, nBytesToCopy);
-		cdf_mem_copy((frame + nBytesToCopy), noa_stream, noa_len);
-		cdf_mem_copy((frame + nBytesToCopy + noa_len),
+		qdf_mem_copy(frame, mb_msg->data, nBytesToCopy);
+		qdf_mem_copy((frame + nBytesToCopy), noa_stream, noa_len);
+		qdf_mem_copy((frame + nBytesToCopy + noa_len),
 			mb_msg->data + nBytesToCopy,
 			msg_len - nBytesToCopy - noa_len);
 
 	} else {
-		cdf_mem_copy(frame, mb_msg->data, msg_len);
+		qdf_mem_copy(frame, mb_msg->data, msg_len);
 	}
 
 #ifdef WLAN_FEATURE_11W
@@ -760,14 +760,14 @@
 
 	pNoA = (tpP2pPsConfig) pMsgBuf;
 
-	pMsgNoA = cdf_mem_malloc(sizeof(tP2pPsConfig));
+	pMsgNoA = qdf_mem_malloc(sizeof(tP2pPsConfig));
 	if (NULL == pMsgNoA) {
 		lim_log(pMac, LOGE,
 			FL("Unable to allocate memory during NoA Update"));
 		return eSIR_MEM_ALLOC_FAILED;
 	}
 
-	cdf_mem_set((uint8_t *) pMsgNoA, sizeof(tP2pPsConfig), 0);
+	qdf_mem_set((uint8_t *) pMsgNoA, sizeof(tP2pPsConfig), 0);
 	pMsgNoA->opp_ps = pNoA->opp_ps;
 	pMsgNoA->ctWindow = pNoA->ctWindow;
 	pMsgNoA->duration = pNoA->duration;
diff --git a/core/mac/src/pe/lim/lim_process_action_frame.c b/core/mac/src/pe/lim/lim_process_action_frame.c
index 09b8334..af50605 100644
--- a/core/mac/src/pe/lim/lim_process_action_frame.c
+++ b/core/mac/src/pe/lim/lim_process_action_frame.c
@@ -229,7 +229,7 @@
 	if (!session->lim11hEnable)
 		return;
 
-	chnl_switch_frame = cdf_mem_malloc(sizeof(*chnl_switch_frame));
+	chnl_switch_frame = qdf_mem_malloc(sizeof(*chnl_switch_frame));
 	if (NULL == chnl_switch_frame) {
 		lim_log(mac_ctx, LOGE, FL("AllocateMemory failed"));
 		return;
@@ -243,7 +243,7 @@
 		lim_log(mac_ctx, LOGE,
 			FL("Failed to unpack and parse (0x%08x, %d bytes)"),
 			status, frame_len);
-		cdf_mem_free(chnl_switch_frame);
+		qdf_mem_free(chnl_switch_frame);
 		return;
 	} else if (DOT11F_WARNED(status)) {
 		lim_log(mac_ctx, LOGW,
@@ -251,11 +251,11 @@
 			status, frame_len);
 	}
 
-	if (!(cdf_mem_compare((uint8_t *) &session->bssId,
-			(uint8_t *) &mac_hdr->sa, sizeof(tSirMacAddr)))) {
+	if (qdf_mem_cmp((uint8_t *) &session->bssId,
+			(uint8_t *) &mac_hdr->sa, sizeof(tSirMacAddr))) {
 		lim_log(mac_ctx, LOG1,
 			FL("Rcvd action frame not from our BSS, dropping..."));
-		cdf_mem_free(chnl_switch_frame);
+		qdf_mem_free(chnl_switch_frame);
 		return;
 	}
 	/* copy the beacon interval from session */
@@ -334,7 +334,7 @@
 		lim_log(mac_ctx, LOG1,
 			FL("Could not start channel switch"));
 
-	cdf_mem_free(chnl_switch_frame);
+	qdf_mem_free(chnl_switch_frame);
 	return;
 }
 
@@ -368,7 +368,7 @@
 	lim_log(mac_ctx, LOG1, FL("Received EXT Channel switch action frame"));
 
 	ext_channel_switch_frame =
-		 cdf_mem_malloc(sizeof(*ext_channel_switch_frame));
+		 qdf_mem_malloc(sizeof(*ext_channel_switch_frame));
 	if (NULL == ext_channel_switch_frame) {
 		lim_log(mac_ctx, LOGE, FL("AllocateMemory failed"));
 		return;
@@ -383,7 +383,7 @@
 		lim_log(mac_ctx, LOGE,
 			FL("Failed to parse CHANSW action frame (0x%08x, len %d):"),
 			status, frame_len);
-		cdf_mem_free(ext_channel_switch_frame);
+		qdf_mem_free(ext_channel_switch_frame);
 		return;
 	} else if (DOT11F_WARNED(status)) {
 
@@ -396,7 +396,7 @@
 	 ext_channel_switch_frame->ext_chan_switch_ann_action.new_channel;
 
 	/* Free ext_channel_switch_frame here as its no longer needed */
-	cdf_mem_free(ext_channel_switch_frame);
+	qdf_mem_free(ext_channel_switch_frame);
 	/*
 	 * Now, validate if channel change is required for the passed
 	 * channel and if is valid in the current regulatory domain,
@@ -417,14 +417,14 @@
 		struct sir_sme_ext_cng_chan_ind *ext_cng_chan_ind;
 		tSirMsgQ mmh_msg;
 
-		ext_cng_chan_ind = cdf_mem_malloc(sizeof(*ext_cng_chan_ind));
+		ext_cng_chan_ind = qdf_mem_malloc(sizeof(*ext_cng_chan_ind));
 		if (NULL == ext_cng_chan_ind) {
 			lim_log(mac_ctx, LOGP,
 			  FL("AllocateMemory failed for ext_cng_chan_ind"));
 			return;
 		}
 
-		cdf_mem_zero(ext_cng_chan_ind,
+		qdf_mem_zero(ext_cng_chan_ind,
 			sizeof(*ext_cng_chan_ind));
 		ext_cng_chan_ind->session_id =
 					session_entry->smeSessionId;
@@ -486,7 +486,7 @@
 		lim_log(mac_ctx, LOGW, FL("channel bonding disabled"));
 		return;
 	}
-	operating_mode_frm = cdf_mem_malloc(sizeof(*operating_mode_frm));
+	operating_mode_frm = qdf_mem_malloc(sizeof(*operating_mode_frm));
 	if (NULL == operating_mode_frm) {
 		lim_log(mac_ctx, LOGE, FL("AllocateMemory failed"));
 		return;
@@ -498,7 +498,7 @@
 		lim_log(mac_ctx, LOGE,
 			FL("Failed to unpack and parse (0x%08x, %d bytes)"),
 			status, frame_len);
-		cdf_mem_free(operating_mode_frm);
+		qdf_mem_free(operating_mode_frm);
 		return;
 	} else if (DOT11F_WARNED(status)) {
 		lim_log(mac_ctx, LOGW,
@@ -577,7 +577,7 @@
 		lim_set_nss_change(mac_ctx, session, sta_ptr->vhtSupportedRxNss,
 			sta_ptr->staIndex, mac_hdr->sa);
 	}
-	cdf_mem_free(operating_mode_frm);
+	qdf_mem_free(operating_mode_frm);
 	return;
 }
 
@@ -610,7 +610,7 @@
 	frame_len = WMA_GET_RX_PAYLOAD_LEN(rx_pkt_info);
 
 	lim_log(mac_ctx, LOG3, FL("Received GID Management action frame"));
-	gid_mgmt_frame = cdf_mem_malloc(sizeof(*gid_mgmt_frame));
+	gid_mgmt_frame = qdf_mem_malloc(sizeof(*gid_mgmt_frame));
 	if (NULL == gid_mgmt_frame) {
 		lim_log(mac_ctx, LOGE, FL("AllocateMemory failed"));
 		return;
@@ -623,7 +623,7 @@
 		lim_log(mac_ctx, LOGE,
 			FL("Fail to parse an Grp id frame (0x%08x, %d bytes):"),
 			status, frame_len);
-		cdf_mem_free(gid_mgmt_frame);
+		qdf_mem_free(gid_mgmt_frame);
 		return;
 	} else if (DOT11F_WARNED(status)) {
 		lim_log(mac_ctx, LOGW,
@@ -678,7 +678,7 @@
 	lim_check_membership_user_position(mac_ctx, session, membership,
 			usr_position, sta_ptr->staIndex);
 out:
-	cdf_mem_free(gid_mgmt_frame);
+	qdf_mem_free(gid_mgmt_frame);
 	return;
 }
 
@@ -816,7 +816,7 @@
 		lim_log(mac_ctx, LOGW, "TSM IE Present");
 		session->eseContext.tsm.tid =
 			addts.tspec.tsinfo.traffic.userPrio;
-		cdf_mem_copy(&session->eseContext.tsm.tsmInfo,
+		qdf_mem_copy(&session->eseContext.tsm.tsmInfo,
 			     &addts.tsmIE, sizeof(tSirMacESETSMIE));
 #ifdef FEATURE_WLAN_ESE_UPLOAD
 		lim_send_sme_tsm_ie_ind(mac_ctx, session, addts.tsmIE.tsid,
@@ -1188,7 +1188,7 @@
 	pBody = WMA_GET_RX_MPDU_DATA(pRxPacketInfo);
 	frameLen = WMA_GET_RX_PAYLOAD_LEN(pRxPacketInfo);
 
-	pMeasReqFrame = cdf_mem_malloc(sizeof(tSirMacMeasReqActionFrame));
+	pMeasReqFrame = qdf_mem_malloc(sizeof(tSirMacMeasReqActionFrame));
 	if (NULL == pMeasReqFrame) {
 		lim_log(pMac, LOGE,
 			FL
@@ -1239,7 +1239,7 @@
 		       (pMac, LOG1,
 		       FL("****LIM: Processing TPC Request from peer ****"));
 	       )
-	pTpcReqFrame = cdf_mem_malloc(sizeof(tSirMacTpcReqActionFrame));
+	pTpcReqFrame = qdf_mem_malloc(sizeof(tSirMacTpcReqActionFrame));
 	if (NULL == pTpcReqFrame) {
 		PELOGE(lim_log(pMac, LOGE, FL("AllocateMemory failed "));)
 		return;
@@ -1459,7 +1459,7 @@
 	pBody = WMA_GET_RX_MPDU_DATA(pRxPacketInfo);
 	frameLen = WMA_GET_RX_PAYLOAD_LEN(pRxPacketInfo);
 
-	pFrm = cdf_mem_malloc(sizeof(tDot11fNeighborReportResponse));
+	pFrm = qdf_mem_malloc(sizeof(tDot11fNeighborReportResponse));
 	if (NULL == pFrm) {
 		lim_log(pMac, LOGE,
 			FL
@@ -1468,7 +1468,7 @@
 	}
 
 	if (psessionEntry == NULL) {
-		cdf_mem_free(pFrm);
+		qdf_mem_free(pFrm);
 		return;
 	}
 
@@ -1484,7 +1484,7 @@
 		PELOG2(sir_dump_buf
 			       (pMac, SIR_DBG_MODULE_ID, LOG2, pBody, frameLen);
 		       )
-		cdf_mem_free(pFrm);
+		qdf_mem_free(pFrm);
 		return;
 	} else if (DOT11F_WARNED(nStatus)) {
 		lim_log(pMac, LOGW,
@@ -1498,7 +1498,7 @@
 	/* Call rrm function to handle the request. */
 	rrm_process_neighbor_report_response(pMac, pFrm, psessionEntry);
 
-	cdf_mem_free(pFrm);
+	qdf_mem_free(pFrm);
 }
 
 #endif
@@ -1556,7 +1556,7 @@
 	   Category       : 1 byte
 	   Action         : 1 byte
 	   Transaction ID : 2 bytes */
-	cdf_mem_copy(&transId[0], &pBody[2], 2);
+	qdf_mem_copy(&transId[0], &pBody[2], 2);
 
 	/* Send 11w SA query response action frame */
 	if (lim_send_sa_query_response_frame(pMac,
@@ -1643,7 +1643,7 @@
 	   Category       : 1 byte
 	   Action         : 1 byte
 	   Transaction ID : 2 bytes */
-	cdf_mem_copy(&transId, &pBody[2], 2);
+	qdf_mem_copy(&transId, &pBody[2], 2);
 
 	/* If SA Query is in progress with the station and the station
 	   responds then the association request that triggered the SA
@@ -1959,10 +1959,10 @@
 
 		/* Check if it is a vendor specific action frame. */
 		if (LIM_IS_STA_ROLE(session) &&
-		    (true == cdf_mem_compare(session->selfMacAddr,
+		    (true != qdf_mem_cmp(session->selfMacAddr,
 					&mac_hdr->da[0], sizeof(tSirMacAddr)))
 		    && IS_WES_MODE_ENABLED(mac_ctx)
-		    && cdf_mem_compare(vendor_specific->Oui, oui, 3)) {
+		    && !qdf_mem_cmp(vendor_specific->Oui, oui, 3)) {
 			lim_log(mac_ctx, LOGW,
 				FL("Rcvd Vendor specific frame, OUI %x %x %x"),
 				vendor_specific->Oui[0],
@@ -2006,7 +2006,7 @@
 			mac_hdr = WMA_GET_RX_MAC_HEADER(rx_pkt_info);
 			frame_len = WMA_GET_RX_PAYLOAD_LEN(rx_pkt_info);
 			/* Check if it is a P2P public action frame. */
-			if (cdf_mem_compare(pub_action->Oui, p2p_oui, 4)) {
+			if (!qdf_mem_cmp(pub_action->Oui, p2p_oui, 4)) {
 				/*
 				 * Forward to the SME to HDD to wpa_supplicant
 				 * type is ACTION
@@ -2185,7 +2185,7 @@
 			frameLen = WMA_GET_RX_PAYLOAD_LEN(pBd);
 
 			/* Check if it is a P2P public action frame. */
-			if (cdf_mem_compare(pActionHdr->Oui, P2POui, 4)) {
+			if (!qdf_mem_cmp(pActionHdr->Oui, P2POui, 4)) {
 				/* Forward to the SME to HDD to wpa_supplicant */
 				/* type is ACTION */
 				lim_send_sme_mgmt_frame_ind(pMac,
diff --git a/core/mac/src/pe/lim/lim_process_assoc_req_frame.c b/core/mac/src/pe/lim/lim_process_assoc_req_frame.c
index aa5b4eb..2754cbb 100644
--- a/core/mac/src/pe/lim/lim_process_assoc_req_frame.c
+++ b/core/mac/src/pe/lim/lim_process_assoc_req_frame.c
@@ -328,7 +328,7 @@
 
 	sir_dump_buf(pMac, SIR_LIM_MODULE_ID, LOG2, (uint8_t *) pBody, framelen);
 
-	if (cdf_mem_compare((uint8_t *) pHdr->sa, (uint8_t *) pHdr->da,
+	if (!qdf_mem_cmp((uint8_t *) pHdr->sa, (uint8_t *) pHdr->da,
 			    (uint8_t) (sizeof(tSirMacAddr)))) {
 		lim_log(pMac, LOGE,
 			FL("Rejected Assoc Req frame Since same mac as"
@@ -349,12 +349,12 @@
 		return;
 	}
 	/* Allocate memory for the Assoc Request frame */
-	pAssocReq = cdf_mem_malloc(sizeof(*pAssocReq));
+	pAssocReq = qdf_mem_malloc(sizeof(*pAssocReq));
 	if (NULL == pAssocReq) {
 		lim_log(pMac, LOGP, FL("Allocate Memory failed in assoc_req"));
 		return;
 	}
-	cdf_mem_set((void *)pAssocReq, sizeof(*pAssocReq), 0);
+	qdf_mem_set((void *)pAssocReq, sizeof(*pAssocReq), 0);
 
 	/* Parse Assoc Request frame */
 	if (subType == LIM_ASSOC)
@@ -376,7 +376,7 @@
 		goto error;
 	}
 
-	pAssocReq->assocReqFrame = cdf_mem_malloc(framelen);
+	pAssocReq->assocReqFrame = qdf_mem_malloc(framelen);
 	if (NULL == pAssocReq->assocReqFrame) {
 		lim_log(pMac, LOGE,
 			FL("Unable to allocate memory for the assoc req, "
@@ -384,7 +384,7 @@
 		goto error;
 	}
 
-	cdf_mem_copy((uint8_t *) pAssocReq->assocReqFrame,
+	qdf_mem_copy((uint8_t *) pAssocReq->assocReqFrame,
 		     (uint8_t *) pBody, framelen);
 	pAssocReq->assocReqFrameLength = framelen;
 
@@ -417,7 +417,7 @@
 
 	updateContext = false;
 
-	if (lim_cmp_ssid(&pAssocReq->ssId, psessionEntry) == false) {
+	if (lim_cmp_ssid(&pAssocReq->ssId, psessionEntry) != false) {
 		lim_log(pMac, LOGE,
 			FL("Received %s Req with unmatched ssid ( Received"
 			   " SSID: %.*s current SSID: %.*s ) from "
@@ -684,8 +684,8 @@
 	} /* End if on HT caps turned on in lim. */
 
 	/* Clear the buffers so that frame parser knows that there isn't a previously decoded IE in these buffers */
-	cdf_mem_set((uint8_t *) &Dot11fIERSN, sizeof(Dot11fIERSN), 0);
-	cdf_mem_set((uint8_t *) &Dot11fIEWPA, sizeof(Dot11fIEWPA), 0);
+	qdf_mem_set((uint8_t *) &Dot11fIERSN, sizeof(Dot11fIERSN), 0);
+	qdf_mem_set((uint8_t *) &Dot11fIEWPA, sizeof(Dot11fIEWPA), 0);
 
 	/* if additional IE is present, check if it has WscIE */
 	if (pAssocReq->addIEPresent && pAssocReq->addIE.length)
@@ -1008,8 +1008,8 @@
 #endif
 
 		/* no change in the capability so drop the frame */
-		if ((true ==
-		     cdf_mem_compare(&pStaDs->mlmStaContext.capabilityInfo,
+		if ((true !=
+		     qdf_mem_cmp(&pStaDs->mlmStaContext.capabilityInfo,
 				     &pAssocReq->capabilityInfo,
 				     sizeof(tSirMacCapabilityInfo)))
 		    && (subType == LIM_ASSOC)) {
@@ -1158,11 +1158,11 @@
 		pTempAssocReq = psessionEntry->parsedAssocReq[pStaDs->assocId];
 		if (pTempAssocReq != NULL) {
 			if (pTempAssocReq->assocReqFrame) {
-				cdf_mem_free(pTempAssocReq->assocReqFrame);
+				qdf_mem_free(pTempAssocReq->assocReqFrame);
 				pTempAssocReq->assocReqFrame = NULL;
 				pTempAssocReq->assocReqFrameLength = 0;
 			}
-			cdf_mem_free(pTempAssocReq);
+			qdf_mem_free(pTempAssocReq);
 			pTempAssocReq = NULL;
 		}
 
@@ -1598,12 +1598,12 @@
 error:
 	if (pAssocReq != NULL) {
 		if (pAssocReq->assocReqFrame) {
-			cdf_mem_free(pAssocReq->assocReqFrame);
+			qdf_mem_free(pAssocReq->assocReqFrame);
 			pAssocReq->assocReqFrame = NULL;
 			pAssocReq->assocReqFrameLength = 0;
 		}
 
-		cdf_mem_free(pAssocReq);
+		qdf_mem_free(pAssocReq);
 		/* to avoid double free */
 		if (assoc_req_copied && psessionEntry->parsedAssocReq)
 			psessionEntry->parsedAssocReq[pStaDs->assocId] = NULL;
@@ -1617,12 +1617,12 @@
 				psessionEntry->parsedAssocReq[pStaDs->assocId];
 			if (pTempAssocReq != NULL) {
 				if (pTempAssocReq->assocReqFrame) {
-					cdf_mem_free(pTempAssocReq->
+					qdf_mem_free(pTempAssocReq->
 							assocReqFrame);
 					pTempAssocReq->assocReqFrame = NULL;
 					pTempAssocReq->assocReqFrameLength = 0;
 				}
-				cdf_mem_free(pTempAssocReq);
+				qdf_mem_free(pTempAssocReq);
 				psessionEntry->
 					parsedAssocReq[pStaDs->assocId] = NULL;
 			}
@@ -1656,7 +1656,7 @@
 			assoc_req->wapi.length);
 		assoc_ind->wapiIE.wapiIEdata[0] = SIR_MAC_WAPI_EID;
 		assoc_ind->wapiIE.wapiIEdata[1] = assoc_req->wapi.length;
-		cdf_mem_copy(&assoc_ind->wapiIE.wapiIEdata[2],
+		qdf_mem_copy(&assoc_ind->wapiIE.wapiIEdata[2],
 			assoc_req->wapi.info, assoc_req->wapi.length);
 		assoc_ind->wapiIE.length =
 			2 + assoc_req->wapi.length;
@@ -1780,7 +1780,7 @@
 	if (sub_type == LIM_ASSOC || sub_type == LIM_REASSOC) {
 		temp = sizeof(tLimMlmAssocInd);
 
-		assoc_ind = cdf_mem_malloc(temp);
+		assoc_ind = qdf_mem_malloc(temp);
 		if (NULL == assoc_ind) {
 			lim_release_peer_idx(mac_ctx, sta_ds->assocId,
 				session_entry);
@@ -1788,11 +1788,11 @@
 				FL("AllocateMemory failed for assoc_ind"));
 			return;
 		}
-		cdf_mem_set(assoc_ind, temp, 0);
-		cdf_mem_copy((uint8_t *) assoc_ind->peerMacAddr,
+		qdf_mem_set(assoc_ind, temp, 0);
+		qdf_mem_copy((uint8_t *) assoc_ind->peerMacAddr,
 			(uint8_t *) sta_ds->staAddr, sizeof(tSirMacAddr));
 		assoc_ind->aid = sta_ds->assocId;
-		cdf_mem_copy((uint8_t *) &assoc_ind->ssId,
+		qdf_mem_copy((uint8_t *) &assoc_ind->ssId,
 			(uint8_t *) &(assoc_req->ssId),
 			assoc_req->ssId.length + 1);
 		assoc_ind->sessionId = session_entry->peSessionId;
@@ -1814,7 +1814,7 @@
 			assoc_ind->rsnIE.rsnIEdata[0] = SIR_MAC_RSN_EID;
 			assoc_ind->rsnIE.rsnIEdata[1] =
 				assoc_req->rsn.length;
-			cdf_mem_copy(&assoc_ind->rsnIE.rsnIEdata[2],
+			qdf_mem_copy(&assoc_ind->rsnIE.rsnIEdata[2],
 				assoc_req->rsn.info,
 				assoc_req->rsn.length);
 		}
@@ -1840,14 +1840,14 @@
 				lim_log(mac_ctx, LOGE,
 					FL("rsnIEdata index out of bounds %d"),
 					rsn_len);
-				cdf_mem_free(assoc_ind);
+				qdf_mem_free(assoc_ind);
 				return;
 			}
 			assoc_ind->rsnIE.rsnIEdata[rsn_len] =
 				SIR_MAC_WPA_EID;
 			assoc_ind->rsnIE.rsnIEdata[rsn_len + 1]
 				= assoc_req->wpa.length;
-			cdf_mem_copy(
+			qdf_mem_copy(
 				&assoc_ind->rsnIE.rsnIEdata[rsn_len + 2],
 				assoc_req->wpa.info, assoc_req->wpa.length);
 			assoc_ind->rsnIE.length += 2 + assoc_req->wpa.length;
@@ -1859,7 +1859,7 @@
 
 		assoc_ind->addIE.length = 0;
 		if (assoc_req->addIEPresent) {
-			cdf_mem_copy(&assoc_ind->addIE.addIEdata,
+			qdf_mem_copy(&assoc_ind->addIE.addIEdata,
 				assoc_req->addIE.addIEdata,
 				assoc_req->addIE.length);
 			assoc_ind->addIE.length = assoc_req->addIE.length;
@@ -1876,7 +1876,7 @@
 					SIR_MAC_HT_CAPABILITIES_EID;
 				assoc_ind->addIE.addIEdata[rsn_len + 1] =
 					DOT11F_IE_HTCAPS_MIN_LEN;
-				cdf_mem_copy(
+				qdf_mem_copy(
 					&assoc_ind->addIE.addIEdata[rsn_len+2],
 					((uint8_t *)&assoc_req->HTCaps) + 1,
 					DOT11F_IE_HTCAPS_MIN_LEN);
@@ -1932,7 +1932,7 @@
 			assoc_ind);
 		lim_post_sme_message(mac_ctx, LIM_MLM_ASSOC_IND,
 			 (uint32_t *) assoc_ind);
-		cdf_mem_free(assoc_ind);
+		qdf_mem_free(assoc_ind);
 	}
 	return;
 }
diff --git a/core/mac/src/pe/lim/lim_process_assoc_rsp_frame.c b/core/mac/src/pe/lim/lim_process_assoc_rsp_frame.c
index 876233f..510e3f2 100644
--- a/core/mac/src/pe/lim/lim_process_assoc_rsp_frame.c
+++ b/core/mac/src/pe/lim/lim_process_assoc_rsp_frame.c
@@ -335,7 +335,7 @@
 				 tpPESession psessionEntry)
 {
 	/* Update the current Bss Information */
-	cdf_mem_copy(psessionEntry->bssId,
+	qdf_mem_copy(psessionEntry->bssId,
 		     psessionEntry->limReAssocbssId, sizeof(tSirMacAddr));
 	psessionEntry->currentOperChannel = psessionEntry->limReassocChannelId;
 	psessionEntry->htSecondaryChannelOffset =
@@ -350,7 +350,7 @@
 	psessionEntry->limCurrentBssPropCap =
 		psessionEntry->limReassocBssPropCap;
 
-	cdf_mem_copy((uint8_t *) &psessionEntry->ssId,
+	qdf_mem_copy((uint8_t *) &psessionEntry->ssId,
 		     (uint8_t *) &psessionEntry->limReassocSSID,
 		     psessionEntry->limReassocSSID.length + 1);
 
@@ -379,7 +379,7 @@
 	 tpPESession session_entry, tpSirAssocRsp assoc_rsp)
 {
 	if (session_entry->ricData != NULL) {
-		cdf_mem_free(session_entry->ricData);
+		qdf_mem_free(session_entry->ricData);
 		session_entry->ricData = NULL;
 		session_entry->RICDataLen = 0;
 	}
@@ -388,13 +388,13 @@
 			assoc_rsp->num_RICData * sizeof(tDot11fIERICDataDesc);
 		if (session_entry->RICDataLen) {
 			session_entry->ricData =
-				cdf_mem_malloc(session_entry->RICDataLen);
+				qdf_mem_malloc(session_entry->RICDataLen);
 			if (NULL == session_entry->ricData) {
 				lim_log(mac_ctx, LOGE,
 					FL("No memory for RIC data"));
 				session_entry->RICDataLen = 0;
 			} else {
-				cdf_mem_copy(session_entry->ricData,
+				qdf_mem_copy(session_entry->ricData,
 					&assoc_rsp->RICData[0],
 					session_entry->RICDataLen);
 			}
@@ -428,7 +428,7 @@
 	 tpPESession session_entry, tpSirAssocRsp assoc_rsp)
 {
 	if (session_entry->tspecIes != NULL) {
-		cdf_mem_free(session_entry->tspecIes);
+		qdf_mem_free(session_entry->tspecIes);
 		session_entry->tspecIes = NULL;
 		session_entry->tspecLen = 0;
 	}
@@ -438,13 +438,13 @@
 			assoc_rsp->num_tspecs * sizeof(tDot11fIEWMMTSPEC);
 		if (session_entry->tspecLen) {
 			session_entry->tspecIes =
-				cdf_mem_malloc(session_entry->tspecLen);
+				qdf_mem_malloc(session_entry->tspecLen);
 			if (NULL == session_entry->tspecIes) {
 				lim_log(mac_ctx, LOGE,
 					FL("Tspec IE:Fail to allocate memory"));
 				session_entry->tspecLen = 0;
 			} else {
-				cdf_mem_copy(session_entry->tspecIes,
+				qdf_mem_copy(session_entry->tspecIes,
 						&assoc_rsp->TSPECInfo[0],
 						session_entry->tspecLen);
 			}
@@ -496,7 +496,7 @@
 			EDCA_AC_VO) {
 			tsm_ctx->tid =
 				assoc_rsp->TSPECInfo[cnt].user_priority;
-			cdf_mem_copy(&tsm_ctx->tsmInfo,
+			qdf_mem_copy(&tsm_ctx->tsmInfo,
 				&assoc_rsp->tsmIE, sizeof(tSirMacESETSMIE));
 #ifdef FEATURE_WLAN_ESE_UPLOAD
 			lim_send_sme_tsm_ie_ind(mac_ctx,
@@ -614,7 +614,7 @@
 		(uint) abs((int8_t) WMA_GET_RX_RSSI_NORMALIZED(rx_pkt_info)),
 		MAC_ADDR_ARRAY(hdr->sa));
 
-	beacon = cdf_mem_malloc(sizeof(tSchBeaconStruct));
+	beacon = qdf_mem_malloc(sizeof(tSchBeaconStruct));
 	if (NULL == beacon) {
 		lim_log(mac_ctx, LOGE, FL("Unable to allocate memory"));
 		return;
@@ -629,7 +629,7 @@
 		lim_log(mac_ctx, LOGE,
 			FL("Should not recieved Re/Assoc Response in role %d "),
 			GET_LIM_SYSTEM_ROLE(session_entry));
-		cdf_mem_free(beacon);
+		qdf_mem_free(beacon);
 		return;
 	}
 #ifdef WLAN_FEATURE_ROAM_OFFLOAD
@@ -667,12 +667,12 @@
 				mac_ctx->lim.retry_packet_cnt++;
 			}
 		}
-		cdf_mem_free(beacon);
+		qdf_mem_free(beacon);
 		return;
 	}
 	sir_copy_mac_addr(current_bssid, session_entry->bssId);
 	if (subtype == LIM_ASSOC) {
-		if (!cdf_mem_compare
+		if (qdf_mem_cmp
 			(hdr->sa, current_bssid, sizeof(tSirMacAddr))) {
 			/*
 			 * Received Association Response frame from an entity
@@ -683,11 +683,11 @@
 				 FL("received AssocRsp from unexpected peer "
 				MAC_ADDRESS_STR),
 				MAC_ADDR_ARRAY(hdr->sa));
-			cdf_mem_free(beacon);
+			qdf_mem_free(beacon);
 			return;
 		}
 	} else {
-		if (!cdf_mem_compare
+		if (qdf_mem_cmp
 			(hdr->sa, session_entry->limReAssocbssId,
 			sizeof(tSirMacAddr))) {
 			/*
@@ -699,16 +699,16 @@
 				FL("received ReassocRsp from unexpected peer "
 				MAC_ADDRESS_STR),
 				MAC_ADDR_ARRAY(hdr->sa));
-			cdf_mem_free(beacon);
+			qdf_mem_free(beacon);
 			return;
 		}
 	}
 
-	assoc_rsp = cdf_mem_malloc(sizeof(*assoc_rsp));
+	assoc_rsp = qdf_mem_malloc(sizeof(*assoc_rsp));
 	if (NULL == assoc_rsp) {
 		lim_log(mac_ctx, LOGP,
 			FL("Allocate Memory failed in AssocRsp"));
-		cdf_mem_free(beacon);
+		qdf_mem_free(beacon);
 		return;
 	}
 	/* Get pointer to Re/Association Response frame body */
@@ -721,18 +721,18 @@
 	/* parse Re/Association Response frame. */
 	if (sir_convert_assoc_resp_frame2_struct(mac_ctx, body,
 		frame_len, assoc_rsp) == eSIR_FAILURE) {
-		cdf_mem_free(assoc_rsp);
+		qdf_mem_free(assoc_rsp);
 		lim_log(mac_ctx, LOGE,
 			FL("Parse error Assoc resp subtype %d," "length=%d"),
 			frame_len, subtype);
-		cdf_mem_free(beacon);
+		qdf_mem_free(beacon);
 		return;
 	}
 
 	if (!assoc_rsp->suppRatesPresent) {
 		lim_log(mac_ctx, LOGE,
 		FL("assoc response does not have supported rate set"));
-		cdf_mem_copy(&assoc_rsp->supportedRates,
+		qdf_mem_copy(&assoc_rsp->supportedRates,
 			&session_entry->rateSet,
 			sizeof(tSirMacRateSet));
 	}
@@ -742,12 +742,12 @@
 		lim_log(mac_ctx, LOGW,
 			FL("session_entry->assocRsp is not NULL freeing it "
 			 "and setting NULL"));
-		cdf_mem_free(session_entry->assocRsp);
+		qdf_mem_free(session_entry->assocRsp);
 		session_entry->assocRsp = NULL;
 		session_entry->assocRspLen = 0;
 	}
 
-	session_entry->assocRsp = cdf_mem_malloc(frame_len);
+	session_entry->assocRsp = qdf_mem_malloc(frame_len);
 	if (NULL == session_entry->assocRsp) {
 		lim_log(mac_ctx, LOGE,
 			FL("Unable to allocate memory for assoc res,len=%d"),
@@ -757,7 +757,7 @@
 		 * Store the Assoc response. This is sent
 		 * to csr/hdd in join cnf response.
 		 */
-		cdf_mem_copy(session_entry->assocRsp, body, frame_len);
+		qdf_mem_copy(session_entry->assocRsp, body, frame_len);
 		session_entry->assocRspLen = frame_len;
 	}
 
@@ -771,12 +771,12 @@
 	if (assoc_rsp->FTInfo.R0KH_ID.present) {
 		roam_session->ftSmeContext.r0kh_id_len =
 			assoc_rsp->FTInfo.R0KH_ID.num_PMK_R0_ID;
-		cdf_mem_copy(roam_session->ftSmeContext.r0kh_id,
+		qdf_mem_copy(roam_session->ftSmeContext.r0kh_id,
 			assoc_rsp->FTInfo.R0KH_ID.PMK_R0_ID,
 			roam_session->ftSmeContext.r0kh_id_len);
 	} else {
 		roam_session->ftSmeContext.r0kh_id_len = 0;
-		cdf_mem_zero(roam_session->ftSmeContext.r0kh_id,
+		qdf_mem_zero(roam_session->ftSmeContext.r0kh_id,
 			SIR_ROAM_R0KH_ID_MAX_LEN);
 	}
 #endif
@@ -794,15 +794,15 @@
 		 */
 		lim_log(mac_ctx, LOGE,
 			FL("received Re/AssocRsp frame with IBSS capability"));
-		cdf_mem_free(assoc_rsp);
-		cdf_mem_free(beacon);
+		qdf_mem_free(assoc_rsp);
+		qdf_mem_free(beacon);
 		return;
 	}
 
 	if (cfg_get_capability_info(mac_ctx, &caps, session_entry)
 		!= eSIR_SUCCESS) {
-		cdf_mem_free(assoc_rsp);
-		cdf_mem_free(beacon);
+		qdf_mem_free(assoc_rsp);
+		qdf_mem_free(beacon);
 		lim_log(mac_ctx, LOGP, FL("could not retrieve Capabilities "));
 		return;
 	}
@@ -817,7 +817,7 @@
 		if ((NULL != mac_ctx->lim.pSessionEntry)
 		    && (NULL !=
 			mac_ctx->lim.pSessionEntry->pLimMlmReassocRetryReq)) {
-			cdf_mem_free(
+			qdf_mem_free(
 			mac_ctx->lim.pSessionEntry->pLimMlmReassocRetryReq);
 			mac_ctx->lim.pSessionEntry->pLimMlmReassocRetryReq =
 				NULL;
@@ -904,8 +904,8 @@
 				FL("ASSOC resp with try again event recvd. "
 				"But try again time interval IE is wrong."));
 		}
-		cdf_mem_free(beacon);
-		cdf_mem_free(assoc_rsp);
+		qdf_mem_free(beacon);
+		qdf_mem_free(assoc_rsp);
 		return;
 	}
 #endif
@@ -920,8 +920,8 @@
 			NULL) != eSIR_SUCCESS) {
 			lim_log(mac_ctx, LOGE,
 				FL("Set link state to POSTASSOC failed"));
-			cdf_mem_free(beacon);
-			cdf_mem_free(assoc_rsp);
+			qdf_mem_free(beacon);
+			qdf_mem_free(assoc_rsp);
 			return;
 		}
 	}
@@ -937,7 +937,7 @@
 		lim_update_ese_tsm(mac_ctx, session_entry, assoc_rsp);
 #endif
 		if (session_entry->pLimMlmJoinReq) {
-			cdf_mem_free(session_entry->pLimMlmJoinReq);
+			qdf_mem_free(session_entry->pLimMlmJoinReq);
 			session_entry->pLimMlmJoinReq = NULL;
 		}
 
@@ -990,7 +990,7 @@
 #ifdef WLAN_FEATURE_ROAM_OFFLOAD
 		}
 #endif
-			cdf_mem_free(beacon);
+			qdf_mem_free(beacon);
 			return;
 		}
 
@@ -1023,7 +1023,7 @@
 				goto assocReject;
 			}
 		}
-		cdf_mem_free(beacon);
+		qdf_mem_free(beacon);
 		return;
 	}
 	lim_log(mac_ctx, LOG1,
@@ -1047,8 +1047,8 @@
 		assoc_cnf.protStatusCode = eSIR_SME_SUCCESS;
 		lim_post_sme_message(mac_ctx, LIM_MLM_ASSOC_CNF,
 			(uint32_t *) &assoc_cnf);
-		cdf_mem_free(assoc_rsp);
-		cdf_mem_free(beacon);
+		qdf_mem_free(assoc_rsp);
+		qdf_mem_free(beacon);
 		return;
 	}
 	/* Delete Pre-auth context for the associated BSS */
@@ -1084,10 +1084,10 @@
 			      eSIR_SUCCESS, eSIR_SUCCESS);
 #endif
 	if (assoc_rsp->QosMapSet.present)
-		cdf_mem_copy(&session_entry->QosMapSet,
+		qdf_mem_copy(&session_entry->QosMapSet,
 			&assoc_rsp->QosMapSet, sizeof(tSirQosMapSet));
 	 else
-		cdf_mem_zero(&session_entry->QosMapSet, sizeof(tSirQosMapSet));
+		qdf_mem_zero(&session_entry->QosMapSet, sizeof(tSirQosMapSet));
 
 	lim_update_stads_ext_cap(mac_ctx, session_entry, assoc_rsp, sta_ds);
 	/* Update the BSS Entry, this entry was added during preassoc. */
@@ -1095,8 +1095,8 @@
 			beacon,
 			&session_entry->pLimJoinReq->bssDescription, true,
 			 session_entry)) {
-		cdf_mem_free(assoc_rsp);
-		cdf_mem_free(beacon);
+		qdf_mem_free(assoc_rsp);
+		qdf_mem_free(beacon);
 		return;
 	} else {
 		lim_log(mac_ctx, LOGE, FL("could not update the bss entry"));
@@ -1123,7 +1123,7 @@
 			session_entry->peSessionId,
 			session_entry->limMlmState));
 		if (session_entry->pLimMlmJoinReq) {
-			cdf_mem_free(session_entry->pLimMlmJoinReq);
+			qdf_mem_free(session_entry->pLimMlmJoinReq);
 			session_entry->pLimMlmJoinReq = NULL;
 		}
 		if (subtype == LIM_ASSOC) {
@@ -1144,7 +1144,7 @@
 			session_entry);
 	}
 
-	cdf_mem_free(beacon);
-	cdf_mem_free(assoc_rsp);
+	qdf_mem_free(beacon);
+	qdf_mem_free(assoc_rsp);
 	return;
 }
diff --git a/core/mac/src/pe/lim/lim_process_auth_frame.c b/core/mac/src/pe/lim/lim_process_auth_frame.c
index 803d0e6..41b4c9c 100644
--- a/core/mac/src/pe/lim/lim_process_auth_frame.c
+++ b/core/mac/src/pe/lim/lim_process_auth_frame.c
@@ -155,7 +155,7 @@
 			return;
 		}
 
-		cdf_mem_copy((uint8_t *) auth_node->peerMacAddr, mac_hdr->sa,
+		qdf_mem_copy((uint8_t *) auth_node->peerMacAddr, mac_hdr->sa,
 				sizeof(tSirMacAddr));
 		auth_node->mlmState = eLIM_MLM_WT_AUTH_FRAME3_STATE;
 		auth_node->authType =
@@ -206,7 +206,7 @@
 			lim_log(mac_ctx, LOGE,
 				FL("Challenge text preparation failed"));
 		challenge = auth_node->challengeText;
-		cdf_mem_copy(challenge, (uint8_t *)challenge_txt_arr,
+		qdf_mem_copy(challenge, (uint8_t *)challenge_txt_arr,
 				sizeof(challenge_txt_arr));
 		/*
 		 * Sending Authenticaton frame with challenge.
@@ -217,7 +217,7 @@
 		auth_frame->authStatusCode = eSIR_MAC_SUCCESS_STATUS;
 		auth_frame->type = SIR_MAC_CHALLENGE_TEXT_EID;
 		auth_frame->length = SIR_MAC_AUTH_CHALLENGE_LENGTH;
-		cdf_mem_copy(auth_frame->challengeText,
+		qdf_mem_copy(auth_frame->challengeText,
 				auth_node->challengeText,
 				SIR_MAC_AUTH_CHALLENGE_LENGTH);
 		lim_send_auth_mgmt_frame(mac_ctx, auth_frame,
@@ -245,7 +245,7 @@
 	}
 	lim_log(mac_ctx, LOG1, FL("Alloc new data: %p peer "), auth_node);
 	lim_print_mac_addr(mac_ctx, mac_hdr->sa, LOG1);
-	cdf_mem_copy((uint8_t *) auth_node->peerMacAddr,
+	qdf_mem_copy((uint8_t *) auth_node->peerMacAddr,
 			mac_hdr->sa, sizeof(tSirMacAddr));
 	auth_node->mlmState = eLIM_MLM_AUTHENTICATED_STATE;
 	auth_node->authType = (tAniAuthType) rx_auth_frm_body->authAlgoNumber;
@@ -290,9 +290,9 @@
 		pMlmDisassocReq =
 			mac_ctx->lim.limDisassocDeauthCnfReq.pMlmDisassocReq;
 		if (pMlmDisassocReq &&
-			cdf_mem_compare((uint8_t *) mac_hdr->sa, (uint8_t *)
+			(!qdf_mem_cmp((uint8_t *) mac_hdr->sa, (uint8_t *)
 				&pMlmDisassocReq->peer_macaddr.bytes,
-				QDF_MAC_ADDR_SIZE)) {
+				QDF_MAC_ADDR_SIZE))) {
 			lim_log(mac_ctx, LOGE,
 				FL("TODO:Ack for disassoc frame is pending Issue delsta for "
 				MAC_ADDRESS_STR),
@@ -304,9 +304,9 @@
 		pMlmDeauthReq =
 			mac_ctx->lim.limDisassocDeauthCnfReq.pMlmDeauthReq;
 		if (pMlmDeauthReq &&
-			cdf_mem_compare((uint8_t *) mac_hdr->sa, (uint8_t *)
+			(!qdf_mem_cmp((uint8_t *) mac_hdr->sa, (uint8_t *)
 				&pMlmDeauthReq->peer_macaddr.bytes,
-				QDF_MAC_ADDR_SIZE)) {
+				QDF_MAC_ADDR_SIZE))) {
 			lim_log(mac_ctx, LOGE,
 				FL("TODO:Ack for deauth frame is pending Issue delsta for "
 				MAC_ADDRESS_STR),
@@ -386,10 +386,10 @@
 						&pe_session->dph.dphHashTable);
 			if (NULL == sta_ds_ptr)
 				continue;
-			if (sta_ds_ptr->valid && cdf_mem_compare(
+			if (sta_ds_ptr->valid && (!qdf_mem_cmp(
 					(uint8_t *)&sta_ds_ptr->staAddr,
 					(uint8_t *) &(mac_hdr->sa),
-					(uint8_t) sizeof(tSirMacAddr)))
+					(uint8_t) sizeof(tSirMacAddr))))
 				break;
 			sta_ds_ptr = NULL;
 		}
@@ -523,7 +523,7 @@
 		    (rx_auth_frm_body->authStatusCode ==
 				eSIR_MAC_SUCCESS_STATUS) &&
 		    (pe_session->ftPEContext.pFTPreAuthReq != NULL) &&
-		    (cdf_mem_compare(
+		    (!qdf_mem_cmp(
 			pe_session->ftPEContext.pFTPreAuthReq->preAuthbssId,
 			mac_hdr->sa, sizeof(tSirMacAddr)))) {
 
@@ -534,7 +534,7 @@
 			pe_session->ftPEContext.saved_auth_rsp_length = 0;
 
 			if ((body_ptr != NULL) && (frame_len < MAX_FTIE_SIZE)) {
-				cdf_mem_copy(
+				qdf_mem_copy(
 					pe_session->ftPEContext.saved_auth_rsp,
 					body_ptr, frame_len);
 				pe_session->ftPEContext.saved_auth_rsp_length =
@@ -555,7 +555,7 @@
 		return;
 	}
 
-	if (!cdf_mem_compare((uint8_t *) mac_hdr->sa,
+	if (qdf_mem_cmp((uint8_t *) mac_hdr->sa,
 			(uint8_t *) &mac_ctx->lim.gpLimMlmAuthReq->peerMacAddr,
 			sizeof(tSirMacAddr))) {
 		/*
@@ -632,7 +632,7 @@
 		lim_log(mac_ctx, LOG1,
 			FL("Alloc new data: %p peer"), auth_node);
 		lim_print_mac_addr(mac_ctx, mac_hdr->sa, LOG1);
-		cdf_mem_copy((uint8_t *) auth_node->peerMacAddr,
+		qdf_mem_copy((uint8_t *) auth_node->peerMacAddr,
 				mac_ctx->lim.gpLimMlmAuthReq->peerMacAddr,
 				sizeof(tSirMacAddr));
 		auth_node->fTimerStarted = 0;
@@ -693,7 +693,7 @@
 		if (LIM_IS_AP_ROLE(pe_session)) {
 			tpSirKeys key_ptr =
 				&pe_session->WEPKeyMaterial[key_id].key[0];
-			cdf_mem_copy(defaultkey, key_ptr->key,
+			qdf_mem_copy(defaultkey, key_ptr->key,
 					key_ptr->keyLength);
 		} else if (wlan_cfg_get_str(mac_ctx,
 				(uint16_t)(WNI_CFG_WEP_DEFAULT_KEY_1 + key_id),
@@ -729,7 +729,7 @@
 			SIR_MAC_CHALLENGE_TEXT_EID;
 		((tpSirMacAuthFrameBody)plainbody)->length =
 			SIR_MAC_AUTH_CHALLENGE_LENGTH;
-		cdf_mem_copy((uint8_t *) (
+		qdf_mem_copy((uint8_t *) (
 			(tpSirMacAuthFrameBody)plainbody)->challengeText,
 			rx_auth_frm_body->challengeText,
 			SIR_MAC_AUTH_CHALLENGE_LENGTH);
@@ -864,7 +864,7 @@
 		 * Check if received challenge text is same as one sent in
 		 * Authentication frame3
 		 */
-		if (cdf_mem_compare(rx_auth_frm_body->challengeText,
+		if (!qdf_mem_cmp(rx_auth_frm_body->challengeText,
 					auth_node->challengeText,
 					SIR_MAC_AUTH_CHALLENGE_LENGTH)) {
 			/*
@@ -948,7 +948,7 @@
 		return;
 	}
 
-	if (!cdf_mem_compare((uint8_t *) mac_hdr->sa,
+	if (qdf_mem_cmp((uint8_t *) mac_hdr->sa,
 			(uint8_t *) &mac_ctx->lim.gpLimMlmAuthReq->peerMacAddr,
 			sizeof(tSirMacAddr))) {
 		/*
@@ -996,7 +996,7 @@
 		lim_log(mac_ctx, LOG1, FL("Alloc new data: %p peer "),
 			auth_node);
 		lim_print_mac_addr(mac_ctx, mac_hdr->sa, LOG1);
-		cdf_mem_copy((uint8_t *) auth_node->peerMacAddr,
+		qdf_mem_copy((uint8_t *) auth_node->peerMacAddr,
 				mac_ctx->lim.gpLimMlmAuthReq->peerMacAddr,
 				sizeof(tSirMacAddr));
 		auth_node->fTimerStarted = 0;
@@ -1262,7 +1262,7 @@
 		if (LIM_IS_AP_ROLE(pe_session)) {
 			tpSirKeys key_ptr;
 			key_ptr = &pe_session->WEPKeyMaterial[key_id].key[0];
-			cdf_mem_copy(defaultkey, key_ptr->key,
+			qdf_mem_copy(defaultkey, key_ptr->key,
 					key_ptr->keyLength);
 			val = key_ptr->keyLength;
 		} else if (wlan_cfg_get_str(mac_ctx,
@@ -1438,7 +1438,7 @@
 		 (pHdr->seqControl.fragNum)));
 
 	/* Check that its the same bssId we have for preAuth */
-	if (!cdf_mem_compare
+	if (qdf_mem_cmp
 		    (psessionEntry->ftPEContext.pFTPreAuthReq->preAuthbssId,
 		    pHdr->bssId, sizeof(tSirMacAddr))) {
 		lim_log(pMac, LOGE, FL("Error: Same bssid as preauth BSSID"));
diff --git a/core/mac/src/pe/lim/lim_process_beacon_frame.c b/core/mac/src/pe/lim/lim_process_beacon_frame.c
index 6d80751..114e563 100644
--- a/core/mac/src/pe/lim/lim_process_beacon_frame.c
+++ b/core/mac/src/pe/lim/lim_process_beacon_frame.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011-2015 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2016 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -83,7 +83,7 @@
 		lim_print_mac_addr(mac_ctx, mac_hdr->sa, LOG2);
 
 	/* Expect Beacon in any state as Scan is independent of LIM state */
-	bcn_ptr = cdf_mem_malloc(sizeof(*bcn_ptr));
+	bcn_ptr = qdf_mem_malloc(sizeof(*bcn_ptr));
 	if (NULL == bcn_ptr) {
 		lim_log(mac_ctx, LOGE,
 			FL("Unable to allocate memory"));
@@ -102,7 +102,7 @@
 			session->limMlmState);
 		lim_print_mlm_state(mac_ctx, LOGW,
 			session->limMlmState);
-		cdf_mem_free(bcn_ptr);
+		qdf_mem_free(bcn_ptr);
 		return;
 	}
 	/*
@@ -113,7 +113,7 @@
 	if ((!session->lastBeaconDtimPeriod) &&
 	    (sir_compare_mac_addr(session->bssId,
 				bcn_ptr->bssid))) {
-		cdf_mem_copy((uint8_t *)&session->lastBeaconTimeStamp,
+		qdf_mem_copy((uint8_t *)&session->lastBeaconTimeStamp,
 			(uint8_t *) bcn_ptr->timeStamp,
 			sizeof(uint64_t));
 		session->lastBeaconDtimCount =
@@ -148,12 +148,12 @@
 	} else if (session->limMlmState ==
 			eLIM_MLM_WT_JOIN_BEACON_STATE) {
 		if (session->beacon != NULL) {
-			cdf_mem_free(session->beacon);
+			qdf_mem_free(session->beacon);
 			session->beacon = NULL;
 			session->bcnLen = 0;
 		}
 		session->bcnLen = WMA_GET_RX_PAYLOAD_LEN(rx_pkt_info);
-		session->beacon = cdf_mem_malloc(session->bcnLen);
+		session->beacon = qdf_mem_malloc(session->bcnLen);
 		if (NULL == session->beacon) {
 			lim_log(mac_ctx, LOGE,
 				FL("fail to alloc mem to store bcn"));
@@ -162,14 +162,14 @@
 			 * Store the Beacon/ProbeRsp. This is sent to
 			 * csr/hdd in join cnf response.
 			 */
-			cdf_mem_copy(session->beacon,
+			qdf_mem_copy(session->beacon,
 				WMA_GET_RX_MPDU_DATA(rx_pkt_info),
 				session->bcnLen);
 		}
 		lim_check_and_announce_join_success(mac_ctx, bcn_ptr,
 				mac_hdr, session);
 	}
-	cdf_mem_free(bcn_ptr);
+	qdf_mem_free(bcn_ptr);
 	return;
 }
 
@@ -204,7 +204,7 @@
 	if ((pMac->lim.gLimMlmState == eLIM_MLM_WT_PROBE_RESP_STATE) ||
 	    (pMac->lim.gLimMlmState == eLIM_MLM_PASSIVE_SCAN_STATE) ||
 	    (pMac->lim.gLimMlmState == eLIM_MLM_LEARN_STATE)) {
-		pBeacon = cdf_mem_malloc(sizeof(tSchBeaconStruct));
+		pBeacon = qdf_mem_malloc(sizeof(tSchBeaconStruct));
 		if (NULL == pBeacon) {
 			lim_log(pMac, LOGE,
 				FL
@@ -221,7 +221,7 @@
 					("Received invalid Beacon in global MLM state %X"),
 				pMac->lim.gLimMlmState);
 			lim_print_mlm_state(pMac, LOGW, pMac->lim.gLimMlmState);
-			cdf_mem_free(pBeacon);
+			qdf_mem_free(pBeacon);
 			return;
 		}
 
@@ -236,7 +236,7 @@
 						 &pMac->lim.dfschannelList);
 		} else if (pMac->lim.gLimMlmState == eLIM_MLM_LEARN_STATE) {
 		} /* end of eLIM_MLM_LEARN_STATE) */
-		cdf_mem_free(pBeacon);
+		qdf_mem_free(pBeacon);
 	} /* end of (eLIM_MLM_WT_PROBE_RESP_STATE) || (eLIM_MLM_PASSIVE_SCAN_STATE) */
 	else {
 		lim_log(pMac, LOG1, FL("Rcvd Beacon in unexpected MLM state %s (%d)"),
diff --git a/core/mac/src/pe/lim/lim_process_cfg_updates.c b/core/mac/src/pe/lim/lim_process_cfg_updates.c
index ae1cf2a..ece95d4 100644
--- a/core/mac/src/pe/lim/lim_process_cfg_updates.c
+++ b/core/mac/src/pe/lim/lim_process_cfg_updates.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012-2015 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2016 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -78,7 +78,7 @@
 	if (pesessionEntry != NULL && LIM_IS_AP_ROLE(pesessionEntry)) {
 		if (pesessionEntry->gLimProtectionControl ==
 		    WNI_CFG_FORCE_POLICY_PROTECTION_DISABLE)
-			cdf_mem_set((void *)&pesessionEntry->cfgProtection,
+			qdf_mem_set((void *)&pesessionEntry->cfgProtection,
 				    sizeof(tCfgProtection), 0);
 		else {
 			lim_log(pMac, LOG1,
@@ -112,7 +112,7 @@
 
 		if (pMac->lim.gLimProtectionControl ==
 		    WNI_CFG_FORCE_POLICY_PROTECTION_DISABLE)
-			cdf_mem_set((void *)&pMac->lim.cfgProtection,
+			qdf_mem_set((void *)&pMac->lim.cfgProtection,
 				    sizeof(tCfgProtection), 0);
 		else {
 			pMac->lim.cfgProtection.fromlla =
diff --git a/core/mac/src/pe/lim/lim_process_deauth_frame.c b/core/mac/src/pe/lim/lim_process_deauth_frame.c
index 2cca55d..ba26a69 100644
--- a/core/mac/src/pe/lim/lim_process_deauth_frame.c
+++ b/core/mac/src/pe/lim/lim_process_deauth_frame.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011-2014 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2016 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -373,7 +373,7 @@
 				psessionEntry->limMlmState, reasonCode,
 				MAC_ADDR_ARRAY(pHdr->sa));
 			/* / Issue Deauth Indication to SME. */
-			cdf_mem_copy((uint8_t *) &mlmDeauthInd.peerMacAddr,
+			qdf_mem_copy((uint8_t *) &mlmDeauthInd.peerMacAddr,
 				     pHdr->sa, sizeof(tSirMacAddr));
 			mlmDeauthInd.reasonCode = reasonCode;
 
@@ -403,7 +403,7 @@
 				lim_delete_pre_auth_node(pMac, pHdr->sa);
 
 			if (psessionEntry->pLimMlmJoinReq) {
-				cdf_mem_free(psessionEntry->pLimMlmJoinReq);
+				qdf_mem_free(psessionEntry->pLimMlmJoinReq);
 				psessionEntry->pLimMlmJoinReq = NULL;
 			}
 
@@ -548,7 +548,7 @@
 	pStaDs->mlmStaContext.cleanupTrigger = eLIM_PEER_ENTITY_DEAUTH;
 
 	/* / Issue Deauth Indication to SME. */
-	cdf_mem_copy((uint8_t *) &mlmDeauthInd.peerMacAddr,
+	qdf_mem_copy((uint8_t *) &mlmDeauthInd.peerMacAddr,
 		     pStaDs->staAddr, sizeof(tSirMacAddr));
 	mlmDeauthInd.reasonCode =
 		(uint8_t) pStaDs->mlmStaContext.disassocReason;
@@ -570,7 +570,7 @@
 			lim_delete_pre_auth_node(pMac, pHdr->sa);
 
 		if (psessionEntry->limAssocResponseData) {
-			cdf_mem_free(psessionEntry->limAssocResponseData);
+			qdf_mem_free(psessionEntry->limAssocResponseData);
 			psessionEntry->limAssocResponseData = NULL;
 		}
 
diff --git a/core/mac/src/pe/lim/lim_process_disassoc_frame.c b/core/mac/src/pe/lim/lim_process_disassoc_frame.c
index 70a9a8d..699b02c 100644
--- a/core/mac/src/pe/lim/lim_process_disassoc_frame.c
+++ b/core/mac/src/pe/lim/lim_process_disassoc_frame.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011-2015 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2016 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -360,7 +360,7 @@
 	pStaDs->mlmStaContext.disassocReason = (tSirMacReasonCodes) reasonCode;
 
 	/* Issue Disassoc Indication to SME. */
-	cdf_mem_copy((uint8_t *) &mlmDisassocInd.peerMacAddr,
+	qdf_mem_copy((uint8_t *) &mlmDisassocInd.peerMacAddr,
 		     (uint8_t *) pStaDs->staAddr, sizeof(tSirMacAddr));
 	mlmDisassocInd.reasonCode =
 		(uint8_t) pStaDs->mlmStaContext.disassocReason;
@@ -383,7 +383,7 @@
 		       )
 
 		if (psessionEntry->limAssocResponseData) {
-			cdf_mem_free(psessionEntry->limAssocResponseData);
+			qdf_mem_free(psessionEntry->limAssocResponseData);
 			psessionEntry->limAssocResponseData = NULL;
 		}
 
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 7cd2a9d..0e71547 100644
--- a/core/mac/src/pe/lim/lim_process_message_queue.c
+++ b/core/mac/src/pe/lim/lim_process_message_queue.c
@@ -67,7 +67,7 @@
 
 #include "qdf_types.h"
 #include "cds_packet.h"
-#include "cdf_memory.h"
+#include "qdf_mem.h"
 
 void lim_log_session_states(tpAniSirGlobal pMac);
 static void lim_process_normal_hdd_msg(tpAniSirGlobal mac_ctx,
@@ -101,7 +101,7 @@
 
 	len = sizeof(*param);
 
-	param = cdf_mem_malloc(len);
+	param = qdf_mem_malloc(len);
 	if (!param) {
 		lim_log(mac, LOGE, FL("Fail to allocate memory"));
 		/* Memory allocation for param failed.
@@ -155,7 +155,7 @@
 
 	len = sizeof(*param);
 
-	param = cdf_mem_malloc(len);
+	param = qdf_mem_malloc(len);
 	if (!param) {
 		lim_log(mac, LOGE, FL("Fail to allocate memory"));
 		/* Memory allocation for param failed.
@@ -218,7 +218,7 @@
 
 	len = sizeof(*param);
 
-	param = cdf_mem_malloc(len);
+	param = qdf_mem_malloc(len);
 	if (!param) {
 		lim_log(mac, LOGE, FL("Fail to allocate memory"));
 		return;
@@ -345,14 +345,14 @@
 	len = sizeof(*result) + (num_results * sizeof(tSirWifiScanResult)) +
 		ie_len;
 
-	result = cdf_mem_malloc(len);
+	result = qdf_mem_malloc(len);
 	if (NULL == result) {
 		lim_log(pmac, LOGE, FL("Memory allocation failed"));
 		return;
 	}
 	hdr = WMA_GET_RX_MAC_HEADER(rx_pkt_info);
 	body = WMA_GET_RX_MPDU_DATA(rx_pkt_info);
-	cdf_mem_zero(result, sizeof(*result) + ie_len);
+	qdf_mem_zero(result, sizeof(*result) + ie_len);
 
 	/* Received frame does not have request id, hence set 0 */
 	result->request_id = 0;
@@ -369,14 +369,14 @@
 		result->ap[i].rtt = 0;
 		result->ap[i].rtt_sd = 0;
 		result->ap[i].ieLength = ie_len;
-		cdf_mem_copy((uint8_t *) &result->ap[i].ssid[0],
+		qdf_mem_copy((uint8_t *) &result->ap[i].ssid[0],
 			(uint8_t *) frame->ssId.ssId, frame->ssId.length);
 		result->ap[i].ssid[frame->ssId.length] = '\0';
-		cdf_mem_copy((uint8_t *) &result->ap[i].bssid,
+		qdf_mem_copy((uint8_t *) &result->ap[i].bssid,
 				(uint8_t *) hdr->bssId,
 				sizeof(tSirMacAddr));
 		/* Copy IE fields */
-		cdf_mem_copy((uint8_t *) &result->ap[i].ieData,
+		qdf_mem_copy((uint8_t *) &result->ap[i].ieData,
 				body + SIR_MAC_B_PR_SSID_OFFSET, ie_len);
 	}
 
@@ -398,14 +398,14 @@
 	tSirMsgQ                     mmh_msg;
 	tpSirMacMgmtHdr              hdr;
 
-	result = cdf_mem_malloc(sizeof(*result) + ie_len);
+	result = qdf_mem_malloc(sizeof(*result) + ie_len);
 	if (NULL == result) {
 		lim_log(pmac, LOGE, FL("Memory allocation failed"));
 		return;
 	}
 	hdr = WMA_GET_RX_MAC_HEADER(rx_pkt_info);
 	body = WMA_GET_RX_MPDU_DATA(rx_pkt_info);
-	cdf_mem_zero(result, sizeof(*result) + ie_len);
+	qdf_mem_zero(result, sizeof(*result) + ie_len);
 
 	/* Received frame does not have request id, hence set 0 */
 	result->requestId = 0;
@@ -421,14 +421,14 @@
 	result->ap.rtt_sd = 0;
 	result->ap.ieLength = ie_len;
 
-	cdf_mem_copy((uint8_t *) &result->ap.ssid[0],
+	qdf_mem_copy((uint8_t *) &result->ap.ssid[0],
 			(uint8_t *) frame->ssId.ssId, frame->ssId.length);
 	result->ap.ssid[frame->ssId.length] = '\0';
-	cdf_mem_copy((uint8_t *) &result->ap.bssid.bytes,
+	qdf_mem_copy((uint8_t *) &result->ap.bssid.bytes,
 			(uint8_t *) hdr->bssId,
 			QDF_MAC_ADDR_SIZE);
 	/* Copy IE fields */
-	cdf_mem_copy((uint8_t *) &result->ap.ieData,
+	qdf_mem_copy((uint8_t *) &result->ap.ieData,
 			body + SIR_MAC_B_PR_SSID_OFFSET, ie_len);
 
 	mmh_msg.type = msg_type;
@@ -454,7 +454,7 @@
 		return;
 	}
 
-	frame = cdf_mem_malloc(sizeof(*frame));
+	frame = qdf_mem_malloc(sizeof(*frame));
 	if (NULL == frame) {
 		lim_log(pmac, LOGE, FL("Memory allocation failed"));
 		return;
@@ -471,13 +471,13 @@
 		status = sir_convert_probe_frame2_struct(pmac, body,
 							frm_len, frame);
 	} else {
-		cdf_mem_free(frame);
+		qdf_mem_free(frame);
 		return;
 	}
 
 	if (status != eSIR_SUCCESS) {
 		lim_log(pmac, LOGE, FL("Frame parsing failed"));
-		cdf_mem_free(frame);
+		qdf_mem_free(frame);
 		return;
 	}
 
@@ -491,7 +491,7 @@
 					(frm_len - SIR_MAC_B_PR_SSID_OFFSET),
 					eWNI_SME_EPNO_NETWORK_FOUND_IND);
 
-	cdf_mem_free(frame);
+	qdf_mem_free(frame);
 }
 #endif
 
@@ -675,8 +675,8 @@
 				break;
 			}
 			if (mgmt_frame->matchLen <= frm_len &&
-				cdf_mem_compare(mgmt_frame->matchData, body,
-				mgmt_frame->matchLen)) {
+				(!qdf_mem_cmp(mgmt_frame->matchData, body,
+				mgmt_frame->matchLen))) {
 				/* found match! */
 				match = true;
 				break;
@@ -1027,7 +1027,7 @@
 	tSirRetStatus rc = eSIR_SUCCESS;
 	tAbortScanParams *pAbortScanParams;
 
-	pAbortScanParams = cdf_mem_malloc(sizeof(tAbortScanParams));
+	pAbortScanParams = qdf_mem_malloc(sizeof(tAbortScanParams));
 	if (NULL == pAbortScanParams) {
 		lim_log(pMac, LOGP,
 			FL("Memory allocation failed for AbortScanParams"));
@@ -1044,7 +1044,7 @@
 	rc = wma_post_ctrl_msg(pMac, &msg);
 	if (rc != eSIR_SUCCESS) {
 		lim_log(pMac, LOGE, FL("wma_post_ctrl_msg() return failure"));
-		cdf_mem_free(pAbortScanParams);
+		qdf_mem_free(pAbortScanParams);
 		return QDF_STATUS_E_FAILURE;
 	}
 
@@ -1120,7 +1120,7 @@
 	}
 
 	if (NULL != pMac->lim.gpLimMlmOemDataReq) {
-		cdf_mem_free(pMac->lim.gpLimMlmOemDataReq);
+		qdf_mem_free(pMac->lim.gpLimMlmOemDataReq);
 		pMac->lim.gpLimMlmOemDataReq = NULL;
 	}
 	/* "Failure" status doesn't mean that Oem Data Rsp did not happen */
@@ -1188,7 +1188,7 @@
 #endif
 	tSirMbMsgP2p *p2p_msg = NULL;
 	if (ANI_DRIVER_TYPE(mac_ctx) == eDRIVER_TYPE_MFG) {
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		msg->bodyptr = NULL;
 		return;
 	}
@@ -1256,7 +1256,7 @@
 			QDF_ASSERT(0);
 			break;
 		}
-		cdf_mem_copy((uint8_t *) &new_msg,
+		qdf_mem_copy((uint8_t *) &new_msg,
 			(uint8_t *) msg, sizeof(tSirMsgQ));
 		body_ptr = (cds_pkt_t *) new_msg.bodyptr;
 		cds_pkt_get_packet_length(body_ptr, &pkt_len);
@@ -1323,7 +1323,7 @@
 			scan_id = req_msg->scan_id;
 			lim_process_abort_scan_ind(mac_ctx, session_id,
 				scan_id, USER_SCAN_REQUESTOR_ID);
-			cdf_mem_free((void *)msg->bodyptr);
+			qdf_mem_free((void *)msg->bodyptr);
 			msg->bodyptr = NULL;
 		}
 		break;
@@ -1373,20 +1373,20 @@
 
 	case eWNI_PMC_SMPS_STATE_IND:
 		if (msg->bodyptr) {
-			cdf_mem_free(msg->bodyptr);
+			qdf_mem_free(msg->bodyptr);
 			msg->bodyptr = NULL;
 		}
 		break;
 	case eWNI_SME_SEND_ACTION_FRAME_IND:
 		lim_send_p2p_action_frame(mac_ctx, msg);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		msg->bodyptr = NULL;
 		break;
 	case eWNI_SME_ABORT_REMAIN_ON_CHAN_IND:
 		p2p_msg = (tSirMbMsgP2p *) msg->bodyptr;
 		lim_process_abort_scan_ind(mac_ctx, p2p_msg->sessionId,
 			p2p_msg->scan_id, ROC_SCAN_REQUESTOR_ID);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		msg->bodyptr = NULL;
 		break;
 	case SIR_HAL_P2P_NOA_START_IND:
@@ -1405,7 +1405,7 @@
 				(session_entry->pePersona == QDF_P2P_GO_MODE)) {
 				/* Save P2P NOA start attribute for Go persona*/
 				p2p_go_exists = 1;
-				cdf_mem_copy(&session_entry->p2pGoPsNoaStartInd,
+				qdf_mem_copy(&session_entry->p2pGoPsNoaStartInd,
 					msg->bodyptr, sizeof(tSirP2PNoaStart));
 				qdf_status =
 					session_entry->p2pGoPsNoaStartInd.status;
@@ -1426,7 +1426,7 @@
 		/* We received the NOA start indication. Now we can send down
 		 * the SME request which requires off-channel operation */
 		lim_process_regd_defd_sme_req_after_noa_start(mac_ctx);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		msg->bodyptr = NULL;
 		break;
 #ifdef FEATURE_WLAN_TDLS
@@ -1437,7 +1437,7 @@
 		if (session_entry == NULL) {
 				lim_log(mac_ctx, LOG1,
 					FL("No session exist for given bssId"));
-				cdf_mem_free(msg->bodyptr);
+				qdf_mem_free(msg->bodyptr);
 				msg->bodyptr = NULL;
 				return;
 			}
@@ -1446,7 +1446,7 @@
 			if (sta_ds == NULL) {
 				lim_log(mac_ctx, LOG1,
 					FL("No sta_ds exist for given staId"));
-				cdf_mem_free(msg->bodyptr);
+				qdf_mem_free(msg->bodyptr);
 				msg->bodyptr = NULL;
 				return;
 			}
@@ -1458,7 +1458,7 @@
 				lim_send_sme_tdls_del_sta_ind(mac_ctx, sta_ds,
 					session_entry, tdls_ind->reasonCode);
 			}
-			cdf_mem_free(msg->bodyptr);
+			qdf_mem_free(msg->bodyptr);
 			msg->bodyptr = NULL;
 		break;
 #endif
@@ -1471,7 +1471,7 @@
 			if ((session_entry != NULL) && (session_entry->valid)
 				&& (session_entry->pePersona ==
 				QDF_P2P_GO_MODE)) { /* Save P2P attr for Go */
-					cdf_mem_copy(
+					qdf_mem_copy(
 						&session_entry->p2pGoPsUpdate,
 						msg->bodyptr,
 						sizeof(tSirP2PNoaAttr));
@@ -1493,12 +1493,12 @@
 					break;
 			}
 		}
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		msg->bodyptr = NULL;
 		break;
 	case WMA_MISSED_BEACON_IND:
 		lim_ps_offload_handle_missed_beacon_ind(mac_ctx, msg);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		msg->bodyptr = NULL;
 		break;
 	case SIR_LIM_ADDTS_RSP_TIMEOUT:
@@ -1634,7 +1634,7 @@
 		break;
 	case WMA_SET_MIMOPS_RSP:
 	case WMA_SET_TX_POWER_RSP:
-		cdf_mem_free((void *)msg->bodyptr);
+		qdf_mem_free((void *)msg->bodyptr);
 		msg->bodyptr = NULL;
 		break;
 	case WMA_SET_MAX_TX_POWER_RSP:
@@ -1642,7 +1642,7 @@
 		rrm_set_max_tx_power_rsp(mac_ctx, msg);
 #endif
 		if (msg->bodyptr != NULL) {
-			cdf_mem_free((void *)msg->bodyptr);
+			qdf_mem_free((void *)msg->bodyptr);
 			msg->bodyptr = NULL;
 		}
 		break;
@@ -1652,7 +1652,7 @@
 		/* message from HAL indicating addr2 mismatch interrupt occurred
 		 * msg->bodyptr contains only pointer to 48-bit addr2 field
 		 */
-		cdf_mem_free((void *)(msg->bodyptr));
+		qdf_mem_free((void *)(msg->bodyptr));
 		msg->bodyptr = NULL;
 		break;
 #ifdef WLAN_FEATURE_VOWIFI_11R
@@ -1677,7 +1677,7 @@
 			link_state_param->callback(mac_ctx,
 				link_state_param->callbackArg,
 				link_state_param->status);
-		cdf_mem_free((void *)(msg->bodyptr));
+		qdf_mem_free((void *)(msg->bodyptr));
 		msg->bodyptr = NULL;
 		break;
 	case eWNI_SME_SET_BCN_FILTER_REQ:
@@ -1688,7 +1688,7 @@
 			 eSIR_SUCCESS))
 			lim_log(mac_ctx, LOGE,
 				FL("Failied to send Beacon Filter Info "));
-		cdf_mem_free((void *)(msg->bodyptr));
+		qdf_mem_free((void *)(msg->bodyptr));
 		msg->bodyptr = NULL;
 		break;
 #ifdef FEATURE_WLAN_TDLS
@@ -1711,7 +1711,7 @@
 				session_entry->smeSessionId, NULL, NULL,
 				tdls_link_params->status);
 		}
-		cdf_mem_free((void *)(msg->bodyptr));
+		qdf_mem_free((void *)(msg->bodyptr));
 		msg->bodyptr = NULL;
 		break;
 #endif
@@ -1720,7 +1720,7 @@
 		break;
 	case WMA_IBSS_PEER_INACTIVITY_IND:
 		lim_process_ibss_peer_inactivity(mac_ctx, msg->bodyptr);
-		cdf_mem_free((void *)(msg->bodyptr));
+		qdf_mem_free((void *)(msg->bodyptr));
 		msg->bodyptr = NULL;
 		break;
 	case WMA_DFS_RADAR_IND:
@@ -1731,7 +1731,7 @@
 	case WMA_DFS_BEACON_TX_SUCCESS_IND:
 		lim_process_beacon_tx_success_ind(mac_ctx, msg->type,
 				(void *)msg->bodyptr);
-		cdf_mem_free((void *)msg->bodyptr);
+		qdf_mem_free((void *)msg->bodyptr);
 		msg->bodyptr = NULL;
 		break;
 	case WMA_DISASSOC_TX_COMP:
@@ -1742,7 +1742,7 @@
 		break;
 #ifdef FEATURE_AP_MCC_CH_AVOIDANCE
 	case WMA_UPDATE_Q2Q_IE_IND:
-		cdf_mem_zero(&beacon_params, sizeof(tUpdateBeaconParams));
+		qdf_mem_zero(&beacon_params, sizeof(tUpdateBeaconParams));
 		beacon_params.paramChangeBitmap = 0;
 		for (i = 0; i < mac_ctx->lim.maxBssId; i++) {
 			vdev_id = ((uint8_t *)msg->bodyptr)[i];
@@ -1778,65 +1778,65 @@
 					session_entry);
 			}
 		}
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		msg->bodyptr = NULL;
 		break;
 #endif /* FEATURE_AP_MCC_CH_AVOIDANCE */
 	case eWNI_SME_NSS_UPDATE_REQ:
 	case eWNI_SME_DFS_BEACON_CHAN_SW_IE_REQ:
 		lim_process_sme_req_messages(mac_ctx, msg);
-		cdf_mem_free((void *)msg->bodyptr);
+		qdf_mem_free((void *)msg->bodyptr);
 		msg->bodyptr = NULL;
 		break;
 	case eWNI_SME_CHANNEL_CHANGE_REQ:
 		lim_process_sme_req_messages(mac_ctx, msg);
-		cdf_mem_free((void *)msg->bodyptr);
+		qdf_mem_free((void *)msg->bodyptr);
 		msg->bodyptr = NULL;
 		break;
 	case eWNI_SME_START_BEACON_REQ:
 		lim_process_sme_req_messages(mac_ctx, msg);
-		cdf_mem_free((void *)msg->bodyptr);
+		qdf_mem_free((void *)msg->bodyptr);
 		msg->bodyptr = NULL;
 		break;
 	case eWNI_SME_UPDATE_ADDITIONAL_IES:
 		lim_process_sme_req_messages(mac_ctx, msg);
-		cdf_mem_free((void *)msg->bodyptr);
+		qdf_mem_free((void *)msg->bodyptr);
 		msg->bodyptr = NULL;
 		break;
 	case eWNI_SME_MODIFY_ADDITIONAL_IES:
 		lim_process_sme_req_messages(mac_ctx, msg);
-		cdf_mem_free((void *)msg->bodyptr);
+		qdf_mem_free((void *)msg->bodyptr);
 		msg->bodyptr = NULL;
 		break;
 #ifdef QCA_HT_2040_COEX
 	case eWNI_SME_SET_HT_2040_MODE:
 		lim_process_sme_req_messages(mac_ctx, msg);
-		cdf_mem_free((void *)msg->bodyptr);
+		qdf_mem_free((void *)msg->bodyptr);
 		msg->bodyptr = NULL;
 		break;
 #endif
 	case SIR_HAL_SOC_SET_HW_MODE_RESP:
 		lim_process_set_hw_mode_resp(mac_ctx, msg->bodyptr);
-		cdf_mem_free((void *)msg->bodyptr);
+		qdf_mem_free((void *)msg->bodyptr);
 		msg->bodyptr = NULL;
 		break;
 	case SIR_HAL_SOC_HW_MODE_TRANS_IND:
 		lim_process_hw_mode_trans_ind(mac_ctx, msg->bodyptr);
-		cdf_mem_free((void *)msg->bodyptr);
+		qdf_mem_free((void *)msg->bodyptr);
 		msg->bodyptr = NULL;
 		break;
 	case SIR_HAL_SOC_DUAL_MAC_CFG_RESP:
 		lim_process_dual_mac_cfg_resp(mac_ctx, msg->bodyptr);
-		cdf_mem_free((void *)msg->bodyptr);
+		qdf_mem_free((void *)msg->bodyptr);
 		msg->bodyptr = NULL;
 		break;
 	case eWNI_SME_SET_IE_REQ:
 		lim_process_sme_req_messages(mac_ctx, msg);
-		cdf_mem_free((void *)msg->bodyptr);
+		qdf_mem_free((void *)msg->bodyptr);
 		msg->bodyptr = NULL;
 		break;
 	default:
-		cdf_mem_free((void *)msg->bodyptr);
+		qdf_mem_free((void *)msg->bodyptr);
 		msg->bodyptr = NULL;
 		/* Unwanted messages */
 		/* Log error */
@@ -1882,7 +1882,7 @@
 	size = pMac->lim.gLimDeferredMsgQ.size;
 	if (size > 0) {
 		while ((readMsg = lim_read_deferred_msg_q(pMac)) != NULL) {
-			cdf_mem_copy((uint8_t *) &limMsg,
+			qdf_mem_copy((uint8_t *) &limMsg,
 				     (uint8_t *) readMsg, sizeof(tSirMsgQ));
 			size--;
 			lim_process_messages(pMac, &limMsg);
@@ -1949,7 +1949,7 @@
 #endif
 			lim_log_session_states(mac_ctx);
 			/* Release body */
-			cdf_mem_free(msg->bodyptr);
+			qdf_mem_free(msg->bodyptr);
 			msg->bodyptr = NULL;
 		}
 	} else {
@@ -1968,7 +1968,7 @@
 			 * Release body. limProcessSmeReqMessage consumed the
 			 * buffer. We can free it.
 			 */
-			cdf_mem_free(msg->bodyptr);
+			qdf_mem_free(msg->bodyptr);
 			msg->bodyptr = NULL;
 		}
 	}
diff --git a/core/mac/src/pe/lim/lim_process_mlm_req_messages.c b/core/mac/src/pe/lim/lim_process_mlm_req_messages.c
index 8b1e0d2..32b862b 100644
--- a/core/mac/src/pe/lim/lim_process_mlm_req_messages.c
+++ b/core/mac/src/pe/lim/lim_process_mlm_req_messages.c
@@ -373,7 +373,7 @@
 		goto error;
 	}
 
-	start_oem_data_req = cdf_mem_malloc(sizeof(*start_oem_data_req));
+	start_oem_data_req = qdf_mem_malloc(sizeof(*start_oem_data_req));
 	if (NULL == start_oem_data_req) {
 		lim_log(mac_ctx, LOGE, FL
 			("Could not allocate memory for start_oem_data_req"));
@@ -381,10 +381,10 @@
 	}
 
 	start_oem_data_req->data =
-		cdf_mem_malloc(mac_ctx->lim.gpLimMlmOemDataReq->data_len);
+		qdf_mem_malloc(mac_ctx->lim.gpLimMlmOemDataReq->data_len);
 	if (!start_oem_data_req->data) {
 		lim_log(mac_ctx, LOGE, FL("memory allocation failed"));
-		cdf_mem_free(start_oem_data_req);
+		qdf_mem_free(start_oem_data_req);
 		goto error;
 	}
 
@@ -394,7 +394,7 @@
 
 	start_oem_data_req->data_len =
 			mac_ctx->lim.gpLimMlmOemDataReq->data_len;
-	cdf_mem_copy(start_oem_data_req->data,
+	qdf_mem_copy(start_oem_data_req->data,
 		     mac_ctx->lim.gpLimMlmOemDataReq->data,
 		     mac_ctx->lim.gpLimMlmOemDataReq->data_len);
 
@@ -411,8 +411,8 @@
 		return;
 
 	SET_LIM_PROCESS_DEFD_MESGS(mac_ctx, true);
-	cdf_mem_free(start_oem_data_req->data);
-	cdf_mem_free(start_oem_data_req);
+	qdf_mem_free(start_oem_data_req->data);
+	qdf_mem_free(start_oem_data_req);
 	lim_log(mac_ctx, LOGE,
 		FL("OEM_DATA: posting WMA_START_OEM_DATA_REQ to HAL failed"));
 
@@ -421,7 +421,7 @@
 	MTRACE(mac_trace(mac_ctx, TRACE_CODE_MLM_STATE, NO_SESSION,
 		       mac_ctx->lim.gLimMlmState));
 
-	mlm_oem_data_rsp = cdf_mem_malloc(sizeof(tLimMlmOemDataRsp));
+	mlm_oem_data_rsp = qdf_mem_malloc(sizeof(tLimMlmOemDataRsp));
 	if (NULL == mlm_oem_data_rsp) {
 		lim_log(mac_ctx->hHdd, LOGP, FL
 			("memory allocation for mlm_oem_data_rsp"));
@@ -431,11 +431,11 @@
 
 	if (NULL != mac_ctx->lim.gpLimMlmOemDataReq) {
 		if (NULL != mac_ctx->lim.gpLimMlmOemDataReq->data) {
-			cdf_mem_free(
+			qdf_mem_free(
 				mac_ctx->lim.gpLimMlmOemDataReq->data);
 			mac_ctx->lim.gpLimMlmOemDataReq->data = NULL;
 		}
-		cdf_mem_free(mac_ctx->lim.gpLimMlmOemDataReq);
+		qdf_mem_free(mac_ctx->lim.gpLimMlmOemDataReq);
 		mac_ctx->lim.gpLimMlmOemDataReq = NULL;
 	}
 
@@ -467,8 +467,8 @@
 	wlan_cfg_get_int(mac_ctx, WNI_CFG_DOT11_MODE, &self_dot11mode);
 	sta_param->staType = STA_ENTRY_SELF; /* Identifying self */
 
-	cdf_mem_copy(sta_param->bssId, bssid, sizeof(tSirMacAddr));
-	cdf_mem_copy(sta_param->staMac, session_entry->selfMacAddr,
+	qdf_mem_copy(sta_param->bssId, bssid, sizeof(tSirMacAddr));
+	qdf_mem_copy(sta_param->staMac, session_entry->selfMacAddr,
 		     sizeof(tSirMacAddr));
 
 	/* Configuration related parameters to be changed to support BT-AMP */
@@ -594,7 +594,7 @@
 	uint32_t retcode;
 
 	/* Package WMA_ADD_BSS_REQ message parameters */
-	addbss_param = cdf_mem_malloc(sizeof(tAddBssParams));
+	addbss_param = qdf_mem_malloc(sizeof(tAddBssParams));
 	if (NULL == addbss_param) {
 		lim_log(mac_ctx, LOGE,
 			FL("Unable to allocate memory during ADD_BSS"));
@@ -602,13 +602,13 @@
 		return eSIR_MEM_ALLOC_FAILED;
 	}
 
-	cdf_mem_set(addbss_param, sizeof(tAddBssParams), 0);
+	qdf_mem_set(addbss_param, sizeof(tAddBssParams), 0);
 	/* Fill in tAddBssParams members */
-	cdf_mem_copy(addbss_param->bssId, mlm_start_req->bssId,
+	qdf_mem_copy(addbss_param->bssId, mlm_start_req->bssId,
 		     sizeof(tSirMacAddr));
 
 	/* Fill in tAddBssParams selfMacAddr */
-	cdf_mem_copy(addbss_param->selfMacAddr,
+	qdf_mem_copy(addbss_param->selfMacAddr,
 		     session->selfMacAddr, sizeof(tSirMacAddr));
 
 	addbss_param->bssType = mlm_start_req->bssType;
@@ -633,7 +633,7 @@
 		mlm_start_req->cfParamSet.cfpDurRemaining;
 
 	addbss_param->rateSet.numRates = mlm_start_req->rateSet.numRates;
-	cdf_mem_copy(addbss_param->rateSet.rate, mlm_start_req->rateSet.rate,
+	qdf_mem_copy(addbss_param->rateSet.rate, mlm_start_req->rateSet.rate,
 		     mlm_start_req->rateSet.numRates);
 
 	addbss_param->nwType = mlm_start_req->nwType;
@@ -657,7 +657,7 @@
 	addbss_param->sessionId = mlm_start_req->sessionId;
 
 	/* Send the SSID to HAL to enable SSID matching for IBSS */
-	cdf_mem_copy(&(addbss_param->ssId.ssId),
+	qdf_mem_copy(&(addbss_param->ssId.ssId),
 		     mlm_start_req->ssId.ssId, mlm_start_req->ssId.length);
 	addbss_param->ssId.length = mlm_start_req->ssId.length;
 	addbss_param->bHiddenSSIDEn = mlm_start_req->ssidHidden;
@@ -708,7 +708,7 @@
 		lim_log(mac_ctx, LOGE,
 			FL("Posting ADD_BSS_REQ to HAL failed, reason=%X"),
 			retcode);
-		cdf_mem_free(addbss_param);
+		qdf_mem_free(addbss_param);
 		return eSIR_SME_HAL_SEND_MESSAGE_FAIL;
 	}
 
@@ -773,7 +773,7 @@
 	mlm_start_cnf.sessionId = mlm_start_req->sessionId;
 
 	/* Free up buffer allocated for LimMlmScanReq */
-	cdf_mem_free(msg_buf);
+	qdf_mem_free(msg_buf);
 
 	/*
 	 * Respond immediately to LIM, only if MLME has not been
@@ -814,12 +814,12 @@
 		 */
 		if (mac_ctx->lim.gpLimMlmOemDataReq) {
 			if (mac_ctx->lim.gpLimMlmOemDataReq->data) {
-				cdf_mem_free(
+				qdf_mem_free(
 				 mac_ctx->lim.gpLimMlmOemDataReq->data);
 				mac_ctx->lim.gpLimMlmOemDataReq->data =
 				 NULL;
 			}
-			cdf_mem_free(mac_ctx->lim.gpLimMlmOemDataReq);
+			qdf_mem_free(mac_ctx->lim.gpLimMlmOemDataReq);
 			mac_ctx->lim.gpLimMlmOemDataReq = NULL;
 		}
 
@@ -838,15 +838,15 @@
 		lim_print_mlm_state(mac_ctx, LOGW, mac_ctx->lim.gLimMlmState);
 
 		/* Free up buffer allocated */
-		cdf_mem_free(msg_buf);
+		qdf_mem_free(msg_buf);
 
 		/* Return Meas confirm with INVALID_PARAMETERS */
-		mlm_oem_data_rsp = cdf_mem_malloc(sizeof(tLimMlmOemDataRsp));
+		mlm_oem_data_rsp = qdf_mem_malloc(sizeof(tLimMlmOemDataRsp));
 		if (mlm_oem_data_rsp != NULL) {
 			mlm_oem_data_rsp->target_rsp = false;
 			lim_post_sme_message(mac_ctx, LIM_MLM_OEM_DATA_CNF,
 					     (uint32_t *) mlm_oem_data_rsp);
-			cdf_mem_free(mlm_oem_data_rsp);
+			qdf_mem_free(mlm_oem_data_rsp);
 		} else {
 			lim_log(mac_ctx, LOGP, FL
 			    ("Could not allocate memory for mlm_oem_data_rsp"));
@@ -1087,7 +1087,7 @@
 	}
 
 error:
-	cdf_mem_free(msg);
+	qdf_mem_free(msg);
 	if (session != NULL)
 		session->pLimMlmJoinReq = NULL;
 	mlmjoin_cnf.resultCode = eSIR_SME_RESOURCES_UNAVAILABLE;
@@ -1171,7 +1171,7 @@
 	      ((stads != NULL) &&
 	       (mac_ctx->lim.gpLimMlmAuthReq->authType ==
 			stads->mlmStaContext.authType)) &&
-	       (cdf_mem_compare(mac_ctx->lim.gpLimMlmAuthReq->peerMacAddr,
+	       (!qdf_mem_cmp(mac_ctx->lim.gpLimMlmAuthReq->peerMacAddr,
 			curr_bssid, sizeof(tSirMacAddr)))) ||
 	      ((preauth_node != NULL) &&
 	       (preauth_node->authType ==
@@ -1303,14 +1303,14 @@
 	}
 	return;
 end:
-	cdf_mem_copy((uint8_t *) &mlm_auth_cnf.peerMacAddr,
+	qdf_mem_copy((uint8_t *) &mlm_auth_cnf.peerMacAddr,
 		     (uint8_t *) &mac_ctx->lim.gpLimMlmAuthReq->peerMacAddr,
 		     sizeof(tSirMacAddr));
 
 	mlm_auth_cnf.authType = mac_ctx->lim.gpLimMlmAuthReq->authType;
 	mlm_auth_cnf.sessionId = session_id;
 
-	cdf_mem_free(mac_ctx->lim.gpLimMlmAuthReq);
+	qdf_mem_free(mac_ctx->lim.gpLimMlmAuthReq);
 	mac_ctx->lim.gpLimMlmAuthReq = NULL;
 	lim_log(mac_ctx, LOG1, "SessionId:%d LimPostSme LIM_MLM_AUTH_CNF ",
 		session_id);
@@ -1349,7 +1349,7 @@
 		lim_log(mac_ctx, LOGP,
 			FL("SessionId:%d Session Does not exist"),
 			mlm_assoc_req->sessionId);
-		cdf_mem_free(mlm_assoc_req);
+		qdf_mem_free(mlm_assoc_req);
 		return;
 	}
 
@@ -1359,7 +1359,7 @@
 	    !LIM_IS_BT_AMP_AP_ROLE(session_entry)) &&
 		(session_entry->limMlmState == eLIM_MLM_AUTHENTICATED_STATE ||
 		 session_entry->limMlmState == eLIM_MLM_JOINED_STATE) &&
-		(cdf_mem_compare(mlm_assoc_req->peerMacAddr,
+		(!qdf_mem_cmp(mlm_assoc_req->peerMacAddr,
 		 curr_bssId, sizeof(tSirMacAddr))))) {
 		/*
 		 * Received Association request either in invalid state
@@ -1435,7 +1435,7 @@
 	/* Update PE session Id */
 	mlm_assoc_cnf.sessionId = mlm_assoc_req->sessionId;
 	/* Free up buffer allocated for assocReq */
-	cdf_mem_free(mlm_assoc_req);
+	qdf_mem_free(mlm_assoc_req);
 	lim_post_sme_message(mac_ctx, LIM_MLM_ASSOC_CNF,
 			     (uint32_t *) &mlm_assoc_cnf);
 }
@@ -1471,7 +1471,7 @@
 		lim_log(mac_ctx, LOGE,
 			FL("Session Does not exist for given sessionId %d"),
 			reassoc_req->sessionId);
-		cdf_mem_free(reassoc_req);
+		qdf_mem_free(reassoc_req);
 		return;
 	}
 
@@ -1501,7 +1501,7 @@
 	}
 
 	if (session->pLimMlmReassocReq)
-		cdf_mem_free(session->pLimMlmReassocReq);
+		qdf_mem_free(session->pLimMlmReassocReq);
 
 	/*
 	 * Hold Re-Assoc request as part of Session, knock-out mac_ctx
@@ -1512,9 +1512,9 @@
 	/* See if we have pre-auth context with new AP */
 	auth_node = lim_search_pre_auth_list(mac_ctx, session->limReAssocbssId);
 
-	if (!auth_node && (!cdf_mem_compare(reassoc_req->peerMacAddr,
+	if (!auth_node && qdf_mem_cmp(reassoc_req->peerMacAddr,
 					    session->bssId,
-					    sizeof(tSirMacAddr)))) {
+					    sizeof(tSirMacAddr))) {
 		/*
 		 * Either pre-auth context does not exist AND
 		 * we are not reassociating with currently
@@ -1559,7 +1559,7 @@
 	/* Update PE sessio Id */
 	reassoc_cnf.sessionId = reassoc_req->sessionId;
 	/* Free up buffer allocated for reassocReq */
-	cdf_mem_free(reassoc_req);
+	qdf_mem_free(reassoc_req);
 	session->pLimReAssocReq = NULL;
 	lim_post_sme_message(mac_ctx, LIM_MLM_REASSOC_CNF,
 			     (uint32_t *) &reassoc_cnf);
@@ -1613,7 +1613,7 @@
 		session->limMlmState,
 		MAC_ADDR_ARRAY(mlm_disassocreq->peer_macaddr.bytes));
 
-	cdf_mem_copy(curr_bssid.bytes, session->bssId, QDF_MAC_ADDR_SIZE);
+	qdf_mem_copy(curr_bssid.bytes, session->bssId, QDF_MAC_ADDR_SIZE);
 
 	switch (GET_LIM_SYSTEM_ROLE(session)) {
 	case eLIM_STA_ROLE:
@@ -1630,7 +1630,7 @@
 			 * disassociation
 			 */
 			sme_disassoc_rsp =
-				cdf_mem_malloc(sizeof(tSirSmeDisassocRsp));
+				qdf_mem_malloc(sizeof(tSirSmeDisassocRsp));
 			if (NULL == sme_disassoc_rsp) {
 				lim_log(mac_ctx, LOGP,
 					FL("memory allocation failed for disassoc rsp"));
@@ -1751,13 +1751,13 @@
 			goto end;
 		}
 		/* Free up buffer allocated for mlmDisassocReq */
-		cdf_mem_free(mlm_disassocreq);
+		qdf_mem_free(mlm_disassocreq);
 	}
 
 	return;
 
 end:
-	cdf_mem_copy((uint8_t *) &mlm_disassoccnf.peerMacAddr,
+	qdf_mem_copy((uint8_t *) &mlm_disassoccnf.peerMacAddr,
 		     (uint8_t *) mlm_disassocreq->peer_macaddr.bytes,
 		     QDF_MAC_ADDR_SIZE);
 	mlm_disassoccnf.aid = mlm_disassocreq->aid;
@@ -1767,7 +1767,7 @@
 	mlm_disassoccnf.sessionId = mlm_disassocreq->sessionId;
 
 	/* Free up buffer allocated for mlmDisassocReq */
-	cdf_mem_free(mlm_disassocreq);
+	qdf_mem_free(mlm_disassocreq);
 
 	lim_post_sme_message(mac_ctx, LIM_MLM_DISASSOC_CNF,
 			     (uint32_t *) &mlm_disassoccnf);
@@ -1792,10 +1792,10 @@
 
 	disassoc_req = mac_ctx->lim.limDisassocDeauthCnfReq.pMlmDisassocReq;
 	deauth_req = mac_ctx->lim.limDisassocDeauthCnfReq.pMlmDeauthReq;
-	if ((disassoc_req && (cdf_mem_compare((uint8_t *) sta_mac,
+	if ((disassoc_req && (!qdf_mem_cmp((uint8_t *) sta_mac,
 			      (uint8_t *) &disassoc_req->peer_macaddr.bytes,
 			       QDF_MAC_ADDR_SIZE))) ||
-	    (deauth_req && (cdf_mem_compare((uint8_t *) sta_mac,
+	    (deauth_req && (!qdf_mem_cmp((uint8_t *) sta_mac,
 			      (uint8_t *) &deauth_req->peer_macaddr.bytes,
 			       QDF_MAC_ADDR_SIZE)))) {
 		PELOG1(lim_log(mac_ctx, LOG1,
@@ -1826,7 +1826,7 @@
 	tLimMlmDeauthReq *mlm_deauth_req;
 	mlm_disassoc_req = mac_ctx->lim.limDisassocDeauthCnfReq.pMlmDisassocReq;
 	if (mlm_disassoc_req &&
-	    (cdf_mem_compare((uint8_t *) sta_mac,
+	    (!qdf_mem_cmp((uint8_t *) sta_mac,
 			     (uint8_t *) &mlm_disassoc_req->peer_macaddr.bytes,
 			     QDF_MAC_ADDR_SIZE))) {
 		if (clean_rx_path) {
@@ -1837,7 +1837,7 @@
 				lim_deactivate_and_change_timer(mac_ctx,
 						eLIM_DISASSOC_ACK_TIMER);
 			}
-			cdf_mem_free(mlm_disassoc_req);
+			qdf_mem_free(mlm_disassoc_req);
 			mac_ctx->lim.limDisassocDeauthCnfReq.pMlmDisassocReq =
 				NULL;
 		}
@@ -1845,7 +1845,7 @@
 
 	mlm_deauth_req = mac_ctx->lim.limDisassocDeauthCnfReq.pMlmDeauthReq;
 	if (mlm_deauth_req &&
-	    (cdf_mem_compare((uint8_t *) sta_mac,
+	    (!qdf_mem_cmp((uint8_t *) sta_mac,
 			     (uint8_t *) &mlm_deauth_req->peer_macaddr.bytes,
 			     QDF_MAC_ADDR_SIZE))) {
 		if (clean_rx_path) {
@@ -1856,7 +1856,7 @@
 				lim_deactivate_and_change_timer(mac_ctx,
 						eLIM_DEAUTH_ACK_TIMER);
 			}
-			cdf_mem_free(mlm_deauth_req);
+			qdf_mem_free(mlm_deauth_req);
 			mac_ctx->lim.limDisassocDeauthCnfReq.pMlmDeauthReq =
 				NULL;
 		}
@@ -1947,7 +1947,7 @@
 		lim_log(mac_ctx, LOGE,
 			FL("session does not exist for given sessionId %d"),
 			mlm_deauth_req->sessionId);
-		cdf_mem_free(mlm_deauth_req);
+		qdf_mem_free(mlm_deauth_req);
 		return;
 	}
 	lim_log(mac_ctx, LOG1, FL("Process Deauth Req on sessionID %d Systemrole %d"
@@ -1972,7 +1972,7 @@
 		case eLIM_MLM_AUTHENTICATED_STATE:
 		case eLIM_MLM_WT_ASSOC_RSP_STATE:
 		case eLIM_MLM_LINK_ESTABLISHED_STATE:
-			if (!cdf_mem_compare(mlm_deauth_req->peer_macaddr.bytes,
+			if (qdf_mem_cmp(mlm_deauth_req->peer_macaddr.bytes,
 					curr_bssId, QDF_MAC_ADDR_SIZE)) {
 				lim_log(mac_ctx, LOGE,
 					FL("received MLM_DEAUTH_REQ with invalid BSS id "
@@ -1986,7 +1986,7 @@
 				 * deauthentication
 				 */
 				sme_deauth_rsp =
-				    cdf_mem_malloc(sizeof(tSirSmeDeauthRsp));
+				    qdf_mem_malloc(sizeof(tSirSmeDeauthRsp));
 				if (NULL == sme_deauth_rsp) {
 					lim_log(mac_ctx, LOGP,
 						FL("memory allocation failed for deauth rsp"));
@@ -2009,7 +2009,7 @@
 						mlm_deauth_req->sessionId;
 				sme_deauth_rsp->transactionId = 0;
 
-				cdf_mem_copy(sme_deauth_rsp->peer_macaddr.bytes,
+				qdf_mem_copy(sme_deauth_rsp->peer_macaddr.bytes,
 					     mlm_deauth_req->peer_macaddr.bytes,
 					     QDF_MAC_ADDR_SIZE);
 
@@ -2154,7 +2154,7 @@
 	mlm_deauth_cnf.sessionId = mlm_deauth_req->sessionId;
 
 	/* Free up buffer allocated for mlmDeauthReq */
-	cdf_mem_free(mlm_deauth_req);
+	qdf_mem_free(mlm_deauth_req);
 	lim_post_sme_message(mac_ctx,
 			     LIM_MLM_DEAUTH_CNF, (uint32_t *) &mlm_deauth_cnf);
 }
@@ -2261,7 +2261,7 @@
 		mlm_set_keys_req->aid, mlm_set_keys_req->edType,
 		mlm_set_keys_req->numKeys);
 	lim_print_mac_addr(mac_ctx, mlm_set_keys_req->peer_macaddr.bytes, LOGW);
-	cdf_mem_copy(curr_bssid.bytes, session->bssId, QDF_MAC_ADDR_SIZE);
+	qdf_mem_copy(curr_bssid.bytes, session->bssId, QDF_MAC_ADDR_SIZE);
 
 	switch (GET_LIM_SYSTEM_ROLE(session)) {
 	case eLIM_STA_ROLE:
@@ -2535,7 +2535,7 @@
 		mlm_join_cnf.sessionId = session->peSessionId;
 		/* Freeup buffer allocated to join request */
 		if (session->pLimMlmJoinReq) {
-			cdf_mem_free(session->pLimMlmJoinReq);
+			qdf_mem_free(session->pLimMlmJoinReq);
 			session->pLimMlmJoinReq = NULL;
 		}
 		lim_post_sme_message(mac_ctx, LIM_MLM_JOIN_CNF,
@@ -2578,7 +2578,7 @@
 	if ((true ==
 	    tx_timer_running(&mac_ctx->lim.limTimers.gLimJoinFailureTimer))
 		&& (session->limMlmState == eLIM_MLM_WT_JOIN_BEACON_STATE)) {
-		cdf_mem_copy(ssid.ssId, session->ssId.ssId,
+		qdf_mem_copy(ssid.ssId, session->ssId.ssId,
 			     session->ssId.length);
 		ssid.length = session->ssId.length;
 		lim_send_probe_req_mgmt_frame(mac_ctx, &ssid,
@@ -2803,7 +2803,7 @@
 		 * MLM state machine
 		 */
 		if (session->pLimMlmJoinReq) {
-			cdf_mem_free(session->pLimMlmJoinReq);
+			qdf_mem_free(session->pLimMlmJoinReq);
 			session->pLimMlmJoinReq = NULL;
 		}
 		/* To remove the preauth node in case of fail to associate */
@@ -2870,7 +2870,7 @@
 	lim_restore_pre_scan_state(mac_ctx);
 	/* Free up mac_ctx->lim.gLimMlmScanReq */
 	if (NULL != mac_ctx->lim.gpLimMlmScanReq) {
-		cdf_mem_free(mac_ctx->lim.gpLimMlmScanReq);
+		qdf_mem_free(mac_ctx->lim.gpLimMlmScanReq);
 		mac_ctx->lim.gpLimMlmScanReq = NULL;
 	}
 
diff --git a/core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c b/core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c
index 9ec47dc..ed6875c 100644
--- a/core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c
+++ b/core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c
@@ -405,7 +405,7 @@
 		return;
 	}
 
-	assoc_req = cdf_mem_malloc(sizeof(tLimMlmAssocReq));
+	assoc_req = qdf_mem_malloc(sizeof(tLimMlmAssocReq));
 	if (NULL == assoc_req) {
 		lim_log(mac_ctx, LOGP,
 			FL("call to AllocateMemory failed for mlmAssocReq"));
@@ -626,21 +626,21 @@
 		 */
 		auth_mode = eSIR_SHARED_KEY;
 		/* Trigger MAC based Authentication */
-		auth_req = cdf_mem_malloc(sizeof(tLimMlmAuthReq));
+		auth_req = qdf_mem_malloc(sizeof(tLimMlmAuthReq));
 		if (NULL == auth_req) {
 			/* Log error */
 			lim_log(mac_ctx, LOGP,
 				FL("mlmAuthReq :Memory alloc failed "));
 			return;
 		}
-		cdf_mem_set((uint8_t *) auth_req,
+		qdf_mem_set((uint8_t *) auth_req,
 			sizeof(tLimMlmAuthReq), 0);
 		if (session_entry->limSmeState ==
 			eLIM_SME_WT_AUTH_STATE) {
 			sir_copy_mac_addr(auth_req->peerMacAddr,
 				session_entry->bssId);
 		} else {
-			cdf_mem_copy((uint8_t *)&auth_req->peerMacAddr,
+			qdf_mem_copy((uint8_t *)&auth_req->peerMacAddr,
 			(uint8_t *)&mac_ctx->lim.gLimPreAuthPeerAddr,
 			sizeof(tSirMacAddr));
 		}
@@ -815,7 +815,7 @@
 		return;
 	}
 	if (session->pLimReAssocReq) {
-		cdf_mem_free(session->pLimReAssocReq);
+		qdf_mem_free(session->pLimReAssocReq);
 		session->pLimReAssocReq = NULL;
 	}
 
@@ -828,12 +828,12 @@
 		lim_log(mac_ctx, LOG1, FL("Freeing pFTPreAuthReq= %p"),
 			session->ftPEContext.pFTPreAuthReq);
 		if (session->ftPEContext.pFTPreAuthReq->pbssDescription) {
-			cdf_mem_free(
+			qdf_mem_free(
 			  session->ftPEContext.pFTPreAuthReq->pbssDescription);
 			session->ftPEContext.pFTPreAuthReq->pbssDescription =
 									NULL;
 		}
-		cdf_mem_free(session->ftPEContext.pFTPreAuthReq);
+		qdf_mem_free(session->ftPEContext.pFTPreAuthReq);
 		session->ftPEContext.pFTPreAuthReq = NULL;
 		session->ftPEContext.ftPreAuthSession = false;
 	}
@@ -921,32 +921,32 @@
 	sme_assoc_ind->beaconLength = session_entry->bcnLen;
 
 	/* Fill in peerMacAddr */
-	cdf_mem_copy(sme_assoc_ind->peerMacAddr, assoc_ind->peerMacAddr,
+	qdf_mem_copy(sme_assoc_ind->peerMacAddr, assoc_ind->peerMacAddr,
 		sizeof(tSirMacAddr));
 
 	/* Fill in aid */
 	sme_assoc_ind->aid = assoc_ind->aid;
 	/* Fill in bssId */
-	cdf_mem_copy(sme_assoc_ind->bssId, session_entry->bssId,
+	qdf_mem_copy(sme_assoc_ind->bssId, session_entry->bssId,
 		sizeof(tSirMacAddr));
 	/* Fill in authType */
 	sme_assoc_ind->authType = assoc_ind->authType;
 	/* Fill in ssId */
-	cdf_mem_copy((uint8_t *) &sme_assoc_ind->ssId,
+	qdf_mem_copy((uint8_t *) &sme_assoc_ind->ssId,
 		(uint8_t *) &(assoc_ind->ssId), assoc_ind->ssId.length + 1);
 	sme_assoc_ind->rsnIE.length = assoc_ind->rsnIE.length;
-	cdf_mem_copy((uint8_t *) &sme_assoc_ind->rsnIE.rsnIEdata,
+	qdf_mem_copy((uint8_t *) &sme_assoc_ind->rsnIE.rsnIEdata,
 		(uint8_t *) &(assoc_ind->rsnIE.rsnIEdata),
 		assoc_ind->rsnIE.length);
 
 #ifdef FEATURE_WLAN_WAPI
 	sme_assoc_ind->wapiIE.length = assoc_ind->wapiIE.length;
-	cdf_mem_copy((uint8_t *) &sme_assoc_ind->wapiIE.wapiIEdata,
+	qdf_mem_copy((uint8_t *) &sme_assoc_ind->wapiIE.wapiIEdata,
 		(uint8_t *) &(assoc_ind->wapiIE.wapiIEdata),
 		assoc_ind->wapiIE.length);
 #endif
 	sme_assoc_ind->addIE.length = assoc_ind->addIE.length;
-	cdf_mem_copy((uint8_t *) &sme_assoc_ind->addIE.addIEdata,
+	qdf_mem_copy((uint8_t *) &sme_assoc_ind->addIE.addIEdata,
 		(uint8_t *) &(assoc_ind->addIE.addIEdata),
 		assoc_ind->addIE.length);
 
@@ -959,12 +959,12 @@
 			assoc_ind->powerCap.maxTxPower;
 		sme_assoc_ind->supportedChannels.numChnl =
 			assoc_ind->supportedChannels.numChnl;
-		cdf_mem_copy((uint8_t *) &sme_assoc_ind->supportedChannels.
+		qdf_mem_copy((uint8_t *) &sme_assoc_ind->supportedChannels.
 			channelList,
 			(uint8_t *) &(assoc_ind->supportedChannels.channelList),
 			assoc_ind->supportedChannels.numChnl);
 	}
-	cdf_mem_copy(&sme_assoc_ind->chan_info, &assoc_ind->chan_info,
+	qdf_mem_copy(&sme_assoc_ind->chan_info, &assoc_ind->chan_info,
 		sizeof(tSirSmeChanInfo));
 	/* Fill in WmmInfo */
 	sme_assoc_ind->wmmEnabledSta = assoc_ind->WmmStaInfoPresent;
@@ -1009,7 +1009,7 @@
 	}
 	/* / Inform Host of STA association */
 	len = sizeof(tSirSmeAssocInd);
-	pSirSmeAssocInd = cdf_mem_malloc(len);
+	pSirSmeAssocInd = qdf_mem_malloc(len);
 	if (NULL == pSirSmeAssocInd) {
 		/* Log error */
 		lim_log(pMac, LOGP,
@@ -1032,7 +1032,7 @@
 			FL
 				("MLM AssocInd: Station context no longer valid (aid %d)"),
 			((tpLimMlmAssocInd) pMsgBuf)->aid);
-		cdf_mem_free(pSirSmeAssocInd);
+		qdf_mem_free(pSirSmeAssocInd);
 
 		return;
 	}
@@ -1553,13 +1553,13 @@
 					 &session_entry->dph.dphHashTable);
 				goto error;
 			}
-			cdf_mem_free(session_entry->pLimJoinReq);
+			qdf_mem_free(session_entry->pLimJoinReq);
 			session_entry->pLimJoinReq = NULL;
 			return;
 		}
 	}
 error:
-	cdf_mem_free(session_entry->pLimJoinReq);
+	qdf_mem_free(session_entry->pLimJoinReq);
 	session_entry->pLimJoinReq = NULL;
 	/* Delete teh session if JOIN failure occurred. */
 	if (result_code != eSIR_SME_SUCCESS) {
@@ -1825,7 +1825,7 @@
 	}
 end:
 	if (NULL != msg->bodyptr) {
-		cdf_mem_free(add_sta_params);
+		qdf_mem_free(add_sta_params);
 		msg->bodyptr = NULL;
 	}
 	/* Updating PE session Id */
@@ -1921,7 +1921,7 @@
 	}
 end:
 	if (0 != limMsgQ->bodyptr) {
-		cdf_mem_free(pDelBssParams);
+		qdf_mem_free(pDelBssParams);
 		limMsgQ->bodyptr = NULL;
 	}
 	if (pStaDs == NULL)
@@ -1956,7 +1956,7 @@
 	if (psessionEntry == NULL) {
 		lim_log(pMac, LOGE, FL("Session entry passed is NULL"));
 		if (pDelBss != NULL) {
-			cdf_mem_free(pDelBss);
+			qdf_mem_free(pDelBss);
 			limMsgQ->bodyptr = NULL;
 		}
 		return;
@@ -2006,7 +2006,7 @@
 	pe_delete_session(pMac, psessionEntry);
 
 	if (pDelBss != NULL) {
-		cdf_mem_free(pDelBss);
+		qdf_mem_free(pDelBss);
 		limMsgQ->bodyptr = NULL;
 	}
 }
@@ -2046,7 +2046,7 @@
 	if (NULL == session_entry) {
 		lim_log(mac_ctx, LOGP,
 			FL("Session Doesn't exist"));
-		cdf_mem_free(del_sta_params);
+		qdf_mem_free(del_sta_params);
 		msg->bodyptr = NULL;
 		return;
 	}
@@ -2079,7 +2079,7 @@
 			FL("DPH Entry for STA %X missing."),
 			pDelStaParams->assocId);
 		statusCode = eSIR_SME_REFUSED;
-		cdf_mem_free(pDelStaParams);
+		qdf_mem_free(pDelStaParams);
 		limMsgQ->bodyptr = NULL;
 
 		return;
@@ -2110,7 +2110,7 @@
 		lim_print_mac_addr(pMac, pStaDs->staAddr, LOG1);
 		if (eLIM_MLM_WT_ASSOC_DEL_STA_RSP_STATE ==
 		    pStaDs->mlmStaContext.mlmState) {
-			cdf_mem_free(pDelStaParams);
+			qdf_mem_free(pDelStaParams);
 			limMsgQ->bodyptr = NULL;
 			if (lim_add_sta(pMac, pStaDs, false, psessionEntry) !=
 			    eSIR_SUCCESS) {
@@ -2160,7 +2160,7 @@
 		statusCode = eSIR_SME_REFUSED;
 	}
 end:
-	cdf_mem_free(pDelStaParams);
+	qdf_mem_free(pDelStaParams);
 	limMsgQ->bodyptr = NULL;
 	if (eLIM_MLM_WT_ASSOC_DEL_STA_RSP_STATE !=
 	    pStaDs->mlmStaContext.mlmState) {
@@ -2210,7 +2210,7 @@
 	 * calling limDelBSS.
 	 */
 	if (0 != limMsgQ->bodyptr) {
-		cdf_mem_free(pDelStaParams);
+		qdf_mem_free(pDelStaParams);
 		limMsgQ->bodyptr = NULL;
 	}
 	/* Proceed to do DelBSS even if DelSta resulted in failure */
@@ -2219,7 +2219,7 @@
 	return;
 end:
 	if (0 != limMsgQ->bodyptr) {
-		cdf_mem_free(pDelStaParams);
+		qdf_mem_free(pDelStaParams);
 		limMsgQ->bodyptr = NULL;
 	}
 	return;
@@ -2292,7 +2292,7 @@
 	/* fall though to reclaim the original Add STA Response message */
 end:
 	if (0 != limMsgQ->bodyptr) {
-		cdf_mem_free(pAddStaParams);
+		qdf_mem_free(pAddStaParams);
 		limMsgQ->bodyptr = NULL;
 	}
 	return;
@@ -2350,7 +2350,7 @@
 			       FL("session does not exist for given sessionId"));
 		       )
 		if (NULL != pAddBssParams) {
-			cdf_mem_free(pAddBssParams);
+			qdf_mem_free(pAddBssParams);
 			limMsgQ->bodyptr = NULL;
 		}
 		return;
@@ -2440,7 +2440,7 @@
 	lim_post_sme_message(pMac, LIM_MLM_START_CNF, (uint32_t *) &mlmStartCnf);
 end:
 	if (0 != limMsgQ->bodyptr) {
-		cdf_mem_free(pAddBssParams);
+		qdf_mem_free(pAddBssParams);
 		limMsgQ->bodyptr = NULL;
 	}
 }
@@ -2539,7 +2539,7 @@
 	lim_post_sme_message(pMac, LIM_MLM_START_CNF, (uint32_t *) &mlmStartCnf);
 end:
 	if (0 != limMsgQ->bodyptr) {
-		cdf_mem_free(pAddBssParams);
+		qdf_mem_free(pAddBssParams);
 		limMsgQ->bodyptr = NULL;
 	}
 }
@@ -2603,7 +2603,7 @@
 			authMode = cfgAuthType;
 
 		/* Trigger MAC based Authentication */
-		pMlmAuthReq = cdf_mem_malloc(sizeof(tLimMlmAuthReq));
+		pMlmAuthReq = qdf_mem_malloc(sizeof(tLimMlmAuthReq));
 		if (NULL == pMlmAuthReq) {
 			lim_log(mac_ctx, LOGP,
 				FL("Allocate Memory failed for mlmAuthReq"));
@@ -2733,14 +2733,14 @@
 	if (NULL == pMac->lim.pSessionEntry->pLimMlmReassocRetryReq) {
 		/* Take a copy of reassoc request for retrying */
 		pMac->lim.pSessionEntry->pLimMlmReassocRetryReq =
-			cdf_mem_malloc(sizeof(tLimMlmReassocReq));
+			qdf_mem_malloc(sizeof(tLimMlmReassocReq));
 		if (NULL ==
 		    pMac->lim.pSessionEntry->pLimMlmReassocRetryReq)
 			goto end;
-		cdf_mem_set(pMac->lim.pSessionEntry->
+		qdf_mem_set(pMac->lim.pSessionEntry->
 			    pLimMlmReassocRetryReq,
 			    sizeof(tLimMlmReassocReq), 0);
-		cdf_mem_copy(pMac->lim.pSessionEntry->
+		qdf_mem_copy(pMac->lim.pSessionEntry->
 			     pLimMlmReassocRetryReq,
 			     psessionEntry->pLimMlmReassocReq,
 			     sizeof(tLimMlmReassocReq));
@@ -2779,20 +2779,20 @@
 	rrm_cache_mgmt_tx_power(pMac, pAddBssParams->txMgmtPower, psessionEntry);
 #endif
 
-	pAddStaParams = cdf_mem_malloc(sizeof(tAddStaParams));
+	pAddStaParams = qdf_mem_malloc(sizeof(tAddStaParams));
 	if (NULL == pAddStaParams) {
 		lim_log(pMac, LOGP,
 			FL("Unable to allocate memory during ADD_STA"));
 		goto end;
 	}
-	cdf_mem_set((uint8_t *) pAddStaParams, sizeof(tAddStaParams), 0);
+	qdf_mem_set((uint8_t *) pAddStaParams, sizeof(tAddStaParams), 0);
 
 	/* / Add STA context at MAC HW (BMU, RHP & TFP) */
-	cdf_mem_copy((uint8_t *) pAddStaParams->staMac,
+	qdf_mem_copy((uint8_t *) pAddStaParams->staMac,
 		     (uint8_t *) psessionEntry->selfMacAddr,
 		     sizeof(tSirMacAddr));
 
-	cdf_mem_copy((uint8_t *) pAddStaParams->bssId,
+	qdf_mem_copy((uint8_t *) pAddStaParams->bssId,
 		     psessionEntry->bssId, sizeof(tSirMacAddr));
 
 	pAddStaParams->staType = STA_ENTRY_SELF;
@@ -2870,7 +2870,7 @@
 	psessionEntry->ftPEContext.pAddStaReq = pAddStaParams;
 
 	if (pAddBssParams != NULL) {
-		cdf_mem_free(pAddBssParams);
+		qdf_mem_free(pAddBssParams);
 		pAddBssParams = NULL;
 		limMsgQ->bodyptr = NULL;
 	}
@@ -2888,12 +2888,12 @@
 	/* Free up buffer allocated for reassocReq */
 	if (psessionEntry != NULL)
 		if (psessionEntry->pLimMlmReassocReq != NULL) {
-			cdf_mem_free(psessionEntry->pLimMlmReassocReq);
+			qdf_mem_free(psessionEntry->pLimMlmReassocReq);
 			psessionEntry->pLimMlmReassocReq = NULL;
 		}
 
 	if (pAddBssParams != NULL) {
-		cdf_mem_free(pAddBssParams);
+		qdf_mem_free(pAddBssParams);
 		pAddBssParams = NULL;
 		limMsgQ->bodyptr = NULL;
 	}
@@ -3075,7 +3075,7 @@
 	}
 end:
 	if (0 != msg->bodyptr) {
-		cdf_mem_free(add_bss_params);
+		qdf_mem_free(add_bss_params);
 		msg->bodyptr = NULL;
 	}
 }
@@ -3129,7 +3129,7 @@
 		lim_log(mac_ctx, LOGE, FL("SessionId:%d Session Doesn't exist"),
 			add_bss_param->sessionId);
 		if (NULL != add_bss_param) {
-			cdf_mem_free(add_bss_param);
+			qdf_mem_free(add_bss_param);
 			msg->bodyptr = NULL;
 		}
 		return;
@@ -3154,7 +3154,7 @@
 				mlm_start_cnf.resultCode =
 					eSIR_SME_BSS_ALREADY_STARTED_OR_JOINED;
 				if (0 != msg->bodyptr) {
-					cdf_mem_free(add_bss_param);
+					qdf_mem_free(add_bss_param);
 					msg->bodyptr = NULL;
 				}
 				lim_post_sme_message(mac_ctx, LIM_MLM_START_CNF,
@@ -3223,7 +3223,7 @@
 	tpPESession session_entry;
 
 	SET_LIM_PROCESS_DEFD_MESGS(mac_ctx, true);
-	cdf_mem_set((void *)&mlm_set_key_cnf, sizeof(tLimMlmSetKeysCnf), 0);
+	qdf_mem_set((void *)&mlm_set_key_cnf, sizeof(tLimMlmSetKeysCnf), 0);
 	if (NULL == msg->bodyptr) {
 		PELOGE(lim_log(mac_ctx, LOGE, FL("msg bodyptr is NULL"));)
 		return;
@@ -3233,7 +3233,7 @@
 	if (session_entry == NULL) {
 		PELOGE(lim_log(mac_ctx, LOGE,
 			FL("session does not exist for given session_id"));)
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		msg->bodyptr = NULL;
 		return;
 	}
@@ -3249,7 +3249,7 @@
 			(uint16_t)(((tpSetStaKeyParams) msg->bodyptr)->status);
 	}
 
-	cdf_mem_free(msg->bodyptr);
+	qdf_mem_free(msg->bodyptr);
 	msg->bodyptr = NULL;
 	/* Restore MLME state */
 	session_entry->limMlmState = session_entry->limPrevMlmState;
@@ -3266,7 +3266,7 @@
 			 * Free the buffer cached for the global
 			 * mac_ctx->lim.gpLimMlmSetKeysReq
 			 */
-			cdf_mem_free(mac_ctx->lim.gpLimMlmSetKeysReq);
+			qdf_mem_free(mac_ctx->lim.gpLimMlmSetKeysReq);
 			mac_ctx->lim.gpLimMlmSetKeysReq = NULL;
 		}
 		mlm_set_key_cnf.sessionId = session_id;
@@ -3296,7 +3296,7 @@
 	tpLimMlmSetKeysReq set_key_req;
 
 	SET_LIM_PROCESS_DEFD_MESGS(mac_ctx, true);
-	cdf_mem_set((void *)&set_key_cnf, sizeof(tLimMlmSetKeysCnf), 0);
+	qdf_mem_set((void *)&set_key_cnf, sizeof(tLimMlmSetKeysCnf), 0);
 	if (NULL == msg->bodyptr) {
 		PELOGE(lim_log(mac_ctx, LOGE, FL("msg bodyptr is null"));)
 		return;
@@ -3307,7 +3307,7 @@
 		PELOGE(lim_log(mac_ctx, LOGE,
 			FL("session does not exist for given sessionId [%d]"),
 			session_id);)
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		msg->bodyptr = NULL;
 		return;
 	}
@@ -3334,7 +3334,7 @@
 		set_key_cnf.resultCode = result_status;
 	}
 
-	cdf_mem_free(msg->bodyptr);
+	qdf_mem_free(msg->bodyptr);
 	msg->bodyptr = NULL;
 	/* Restore MLME state */
 	session_entry->limMlmState = session_entry->limPrevMlmState;
@@ -3354,7 +3354,7 @@
 		 * Free the buffer cached for the
 		 * global mac_ctx->lim.gpLimMlmSetKeysReq
 		 */
-		cdf_mem_free(mac_ctx->lim.gpLimMlmSetKeysReq);
+		qdf_mem_free(mac_ctx->lim.gpLimMlmSetKeysReq);
 		mac_ctx->lim.gpLimMlmSetKeysReq = NULL;
 	}
 	lim_post_sme_message(mac_ctx, LIM_MLM_SETKEYS_CNF,
@@ -3426,7 +3426,7 @@
 	if (pMlmReassocReq != NULL) {
 		/* Update PE session Id */
 		mlmReassocCnf.sessionId = pMlmReassocReq->sessionId;
-		cdf_mem_free(pMlmReassocReq);
+		qdf_mem_free(pMlmReassocReq);
 		psessionEntry->pLimMlmReassocReq = NULL;
 	} else {
 		mlmReassocCnf.sessionId = 0;
@@ -3509,7 +3509,7 @@
 
 		for (apCount = 0; apCount < 2; apCount++) {
 
-			if (cdf_mem_compare(session_entry->pLimMlmJoinReq->bssDescription.bssId,
+			if (!qdf_mem_cmp(session_entry->pLimMlmJoinReq->bssDescription.bssId,
 				mac_ctx->lim.gLimHeartBeatApMac[apCount], sizeof(tSirMacAddr))) {
 
 				lim_log(mac_ctx, LOGE, FL("Index %d Sessionid: %d Send deauth on "
@@ -3522,7 +3522,7 @@
 					session_entry->pLimMlmJoinReq->bssDescription.bssId,
 					session_entry, false);
 
-				cdf_mem_zero(mac_ctx->lim.gLimHeartBeatApMac[apCount],
+				qdf_mem_zero(mac_ctx->lim.gLimHeartBeatApMac[apCount],
 					sizeof(tSirMacAddr));
 				break;
 			}
@@ -3530,7 +3530,7 @@
 	}
 
 	/* Wait for Beacon to announce join success */
-	cdf_mem_copy(ssId.ssId,
+	qdf_mem_copy(ssId.ssId,
 		session_entry->ssId.ssId, session_entry->ssId.length);
 	ssId.length = session_entry->ssId.length;
 
@@ -3586,11 +3586,11 @@
 error:
 	if (NULL != session_entry) {
 		if (session_entry->pLimMlmJoinReq) {
-			cdf_mem_free(session_entry->pLimMlmJoinReq);
+			qdf_mem_free(session_entry->pLimMlmJoinReq);
 			session_entry->pLimMlmJoinReq = NULL;
 		}
 		if (session_entry->pLimJoinReq) {
-			cdf_mem_free(session_entry->pLimJoinReq);
+			qdf_mem_free(session_entry->pLimJoinReq);
 			session_entry->pLimJoinReq = NULL;
 		}
 		join_cnf.sessionId = session_entry->peSessionId;
@@ -3698,7 +3698,7 @@
 	default:
 		break;
 	}
-	cdf_mem_free(body);
+	qdf_mem_free(body);
 }
 
 /**
@@ -3736,7 +3736,7 @@
 		tpDphHashNode pStaDs;
 		tSirRetStatus retStatus = eSIR_SUCCESS;
 		tpSchBeaconStruct beacon_struct;
-		beacon_struct = cdf_mem_malloc(sizeof(tSchBeaconStruct));
+		beacon_struct = qdf_mem_malloc(sizeof(tSchBeaconStruct));
 		if (NULL == beacon_struct) {
 			lim_log(pMac, LOGE, FL("beaconStruct alloc failed"));
 			mlmReassocCnf.resultCode =
@@ -3767,7 +3767,7 @@
 			mlmReassocCnf.resultCode =
 				eSIR_SME_RESOURCES_UNAVAILABLE;
 			mlmReassocCnf.protStatusCode = eSIR_SME_SUCCESS;
-			cdf_mem_free(beacon_struct);
+			qdf_mem_free(beacon_struct);
 			goto error;
 		}
 		/*
@@ -3812,13 +3812,13 @@
 				eSIR_SME_RESOURCES_UNAVAILABLE;
 			mlmReassocCnf.protStatusCode =
 				eSIR_MAC_UNSPEC_FAILURE_STATUS;
-			cdf_mem_free(assocRsp);
+			qdf_mem_free(assocRsp);
 			pMac->lim.gLimAssocResponseData = NULL;
-			cdf_mem_free(beacon_struct);
+			qdf_mem_free(beacon_struct);
 			goto error;
 		}
-		cdf_mem_free(assocRsp);
-		cdf_mem_free(beacon_struct);
+		qdf_mem_free(assocRsp);
+		qdf_mem_free(beacon_struct);
 		psessionEntry->limAssocResponseData = NULL;
 	}
 	break;
@@ -3907,7 +3907,7 @@
 	lim_post_sme_message(pMac, LIM_MLM_START_CNF, (uint32_t *) &mlmStartCnf);
 end:
 	if (0 != limMsgQ->bodyptr) {
-		cdf_mem_free(pAddBssParams);
+		qdf_mem_free(pAddBssParams);
 		limMsgQ->bodyptr = NULL;
 	}
 }
@@ -3946,7 +3946,7 @@
 		tSirRetStatus retStatus = eSIR_SUCCESS;
 		tSchBeaconStruct *pBeaconStruct;
 		pBeaconStruct =
-			cdf_mem_malloc(sizeof(tSchBeaconStruct));
+			qdf_mem_malloc(sizeof(tSchBeaconStruct));
 		if (NULL == pBeaconStruct) {
 			lim_log(pMac, LOGE,
 				FL
@@ -3970,7 +3970,7 @@
 			mlmReassocCnf.resultCode =
 				eSIR_SME_RESOURCES_UNAVAILABLE;
 			mlmReassocCnf.protStatusCode = eSIR_SME_SUCCESS;
-			cdf_mem_free(pBeaconStruct);
+			qdf_mem_free(pBeaconStruct);
 			goto Error;
 		}
 		/** While Processing the ReAssoc Response Frame the ReAssocRsp Frame
@@ -4021,14 +4021,14 @@
 				eSIR_SME_RESOURCES_UNAVAILABLE;
 			mlmReassocCnf.protStatusCode =
 				eSIR_MAC_UNSPEC_FAILURE_STATUS;
-			cdf_mem_free(assocRsp);
+			qdf_mem_free(assocRsp);
 			pMac->lim.gLimAssocResponseData = NULL;
-			cdf_mem_free(pBeaconStruct);
+			qdf_mem_free(pBeaconStruct);
 			goto Error;
 		}
-		cdf_mem_free(assocRsp);
+		qdf_mem_free(assocRsp);
 		psessionEntry->limAssocResponseData = NULL;
-		cdf_mem_free(pBeaconStruct);
+		qdf_mem_free(pBeaconStruct);
 	}
 	break;
 	case eLIM_SME_WT_REASSOC_LINK_FAIL_STATE: {
@@ -4086,7 +4086,7 @@
 		       )
 		return;
 	}
-	pBeaconGenParams = cdf_mem_malloc(sizeof(*pBeaconGenParams));
+	pBeaconGenParams = qdf_mem_malloc(sizeof(*pBeaconGenParams));
 	if (NULL == pBeaconGenParams) {
 		PELOGE(lim_log(pMac, LOGP,
 			       FL
@@ -4094,8 +4094,8 @@
 		       )
 		return;
 	}
-	cdf_mem_set(pBeaconGenParams, sizeof(*pBeaconGenParams), 0);
-	cdf_mem_copy((void *)pBeaconGenParams->bssId,
+	qdf_mem_set(pBeaconGenParams, sizeof(*pBeaconGenParams), 0);
+	qdf_mem_copy((void *)pBeaconGenParams->bssId,
 		     (void *)psessionEntry->bssId, QDF_MAC_ADDR_SIZE);
 	limMsg.bodyptr = pBeaconGenParams;
 	sch_process_pre_beacon_ind(pMac, &limMsg);
@@ -4167,7 +4167,7 @@
 					 QDF_STATUS_SUCCESS,
 					 pScanEvent->sessionId,
 					 pScanEvent->scanId);
-			cdf_mem_free(pMac->lim.gpLimRemainOnChanReq);
+			qdf_mem_free(pMac->lim.gpLimRemainOnChanReq);
 			pMac->lim.gpLimRemainOnChanReq = NULL;
 			/*
 			 * If remain on channel timer expired and action frame
@@ -4216,5 +4216,5 @@
 			  "Received unhandled scan event %u",
 			  pScanEvent->event);
 	}
-	cdf_mem_free(buf);
+	qdf_mem_free(buf);
 }
diff --git a/core/mac/src/pe/lim/lim_process_probe_req_frame.c b/core/mac/src/pe/lim/lim_process_probe_req_frame.c
index 0a75bd4..91b887d 100644
--- a/core/mac/src/pe/lim/lim_process_probe_req_frame.c
+++ b/core/mac/src/pe/lim/lim_process_probe_req_frame.c
@@ -82,7 +82,7 @@
 	cur_time = (uint32_t) (qdf_mc_timer_get_system_ticks() /
 						QDF_TICKS_PER_SECOND);
 	qdf_zero_macaddr(&addr);
-	cdf_mem_set((uint8_t *) uuid_e, SIR_WPS_UUID_LEN, 0);
+	qdf_mem_set((uint8_t *) uuid_e, SIR_WPS_UUID_LEN, 0);
 	for (pbc = session->pAPWPSPBCSession; pbc; pbc = pbc->next) {
 		if (cur_time > pbc->timestamp + SIR_WPS_PBC_WALK_TIME)
 			break;
@@ -90,7 +90,7 @@
 		if (count > 1)
 			break;
 		qdf_copy_macaddr(&addr, &pbc->addr);
-		cdf_mem_copy((uint8_t *) uuid_e, (uint8_t *) pbc->uuid_e,
+		qdf_mem_copy((uint8_t *) uuid_e, (uint8_t *) pbc->uuid_e,
 				SIR_WPS_UUID_LEN);
 	}
 	if (count > 1)
@@ -140,7 +140,7 @@
 			       SIR_WPS_UUID_LEN);
 		       )
 
-		cdf_mem_free(prev);
+		qdf_mem_free(prev);
 	}
 }
 
@@ -163,7 +163,7 @@
 			prev->next = pbc->next;
 			if (pbc == session_entry->pAPWPSPBCSession)
 				session_entry->pAPWPSPBCSession = pbc->next;
-			cdf_mem_free(pbc);
+			qdf_mem_free(pbc);
 			return;
 		}
 		prev = pbc;
@@ -220,11 +220,11 @@
 	pbc = psessionEntry->pAPWPSPBCSession;
 
 	while (pbc) {
-		if (cdf_mem_compare
+		if ((!qdf_mem_cmp
 			    ((uint8_t *) pbc->addr.bytes, (uint8_t *) addr,
-			    QDF_MAC_ADDR_SIZE)
-		    && cdf_mem_compare((uint8_t *) pbc->uuid_e,
-				       (uint8_t *) uuid_e, SIR_WPS_UUID_LEN)) {
+			    QDF_MAC_ADDR_SIZE))
+		    && (!qdf_mem_cmp((uint8_t *) pbc->uuid_e,
+				       (uint8_t *) uuid_e, SIR_WPS_UUID_LEN))) {
 			if (prev)
 				prev->next = pbc->next;
 			else
@@ -236,18 +236,18 @@
 	}
 
 	if (!pbc) {
-		pbc = cdf_mem_malloc(sizeof(tSirWPSPBCSession));
+		pbc = qdf_mem_malloc(sizeof(tSirWPSPBCSession));
 		if (NULL == pbc) {
 			PELOGE(lim_log
 				       (pMac, LOGE, FL("memory allocate failed!"));
 			       )
 			return;
 		}
-		cdf_mem_copy((uint8_t *) pbc->addr.bytes, (uint8_t *) addr,
+		qdf_mem_copy((uint8_t *) pbc->addr.bytes, (uint8_t *) addr,
 			     QDF_MAC_ADDR_SIZE);
 
 		if (uuid_e)
-			cdf_mem_copy((uint8_t *) pbc->uuid_e,
+			qdf_mem_copy((uint8_t *) pbc->uuid_e,
 				     (uint8_t *) uuid_e, SIR_WPS_UUID_LEN);
 	}
 
@@ -451,7 +451,7 @@
 		}
 		ssid.length = session->ssId.length;
 		/* Copy the SSID from sessio entry to local variable */
-		cdf_mem_copy(ssid.ssId, session->ssId.ssId,
+		qdf_mem_copy(ssid.ssId, session->ssId.ssId,
 				session->ssId.length);
 
 		/*
@@ -462,7 +462,7 @@
 			if (!ssid.length)
 				goto multipleSSIDcheck;
 
-			if (cdf_mem_compare((uint8_t *) &ssid,
+			if (!qdf_mem_cmp((uint8_t *) &ssid,
 						(uint8_t *) &(probe_req.ssId),
 						(uint8_t) (ssid.length + 1))) {
 				lim_send_probe_rsp_mgmt_frame(mac_ctx,
@@ -476,7 +476,7 @@
 					QDF_P2P_GO_MODE) {
 				uint8_t direct_ssid[7] = "DIRECT-";
 				uint8_t direct_ssid_len = 7;
-				if (cdf_mem_compare((uint8_t *) &direct_ssid,
+				if (!qdf_mem_cmp((uint8_t *) &direct_ssid,
 					(uint8_t *) &(probe_req.ssId.ssId),
 					(uint8_t) (direct_ssid_len))) {
 					lim_send_probe_rsp_mgmt_frame(mac_ctx,
@@ -651,7 +651,7 @@
 	tSirSmeProbeReqInd *pSirSmeProbeReqInd;
 	tSirMsgQ msgQ;
 
-	pSirSmeProbeReqInd = cdf_mem_malloc(sizeof(tSirSmeProbeReqInd));
+	pSirSmeProbeReqInd = qdf_mem_malloc(sizeof(tSirSmeProbeReqInd));
 	if (NULL == pSirSmeProbeReqInd) {
 		/* Log error */
 		lim_log(pMac, LOGP,
@@ -668,15 +668,15 @@
 	pSirSmeProbeReqInd->length = sizeof(tSirSmeProbeReq);
 	pSirSmeProbeReqInd->sessionId = psessionEntry->smeSessionId;
 
-	cdf_mem_copy(pSirSmeProbeReqInd->bssid.bytes, psessionEntry->bssId,
+	qdf_mem_copy(pSirSmeProbeReqInd->bssid.bytes, psessionEntry->bssId,
 		     QDF_MAC_ADDR_SIZE);
-	cdf_mem_copy(pSirSmeProbeReqInd->WPSPBCProbeReq.peer_macaddr.bytes,
+	qdf_mem_copy(pSirSmeProbeReqInd->WPSPBCProbeReq.peer_macaddr.bytes,
 		     peerMacAddr, QDF_MAC_ADDR_SIZE);
 
 	MTRACE(mac_trace_msg_tx(pMac, psessionEntry->peSessionId, msgQ.type));
 	pSirSmeProbeReqInd->WPSPBCProbeReq.probeReqIELen =
 		(uint16_t) ProbeReqIELen;
-	cdf_mem_copy(pSirSmeProbeReqInd->WPSPBCProbeReq.probeReqIE, pProbeReqIE,
+	qdf_mem_copy(pSirSmeProbeReqInd->WPSPBCProbeReq.probeReqIE, pProbeReqIE,
 		     ProbeReqIELen);
 
 	if (lim_sys_process_mmh_msg_api(pMac, &msgQ, ePROT) != eSIR_SUCCESS) {
diff --git a/core/mac/src/pe/lim/lim_process_probe_rsp_frame.c b/core/mac/src/pe/lim/lim_process_probe_rsp_frame.c
index 195e223..87783a0 100644
--- a/core/mac/src/pe/lim/lim_process_probe_rsp_frame.c
+++ b/core/mac/src/pe/lim/lim_process_probe_rsp_frame.c
@@ -97,7 +97,7 @@
 	lim_log(mac_ctx, LOG1, "SessionId:%d ProbeRsp Frame is received",
 		session_entry->peSessionId);
 
-	probe_rsp = cdf_mem_malloc(sizeof(tSirProbeRespBeacon));
+	probe_rsp = qdf_mem_malloc(sizeof(tSirProbeRespBeacon));
 	if (NULL == probe_rsp) {
 		lim_log(mac_ctx, LOGE,
 			FL
@@ -120,7 +120,7 @@
 		eSIR_SUCCESS) {
 		lim_log(mac_ctx, LOG1,
 			FL("Parse error ProbeResponse, length=%d"), frame_len);
-		cdf_mem_free(probe_rsp);
+		qdf_mem_free(probe_rsp);
 		return;
 	}
 
@@ -138,7 +138,7 @@
 		!probe_rsp->ssidPresent) {
 		lim_log(mac_ctx, LOG1,
 			FL("Parse error ProbeResponse, length=%d"), frame_len);
-		cdf_mem_free(probe_rsp);
+		qdf_mem_free(probe_rsp);
 		return;
 	}
 	lim_check_and_add_bss_description(mac_ctx, probe_rsp,
@@ -159,14 +159,14 @@
 		 * Hence store it in same buffer.
 		 */
 		if (session_entry->beacon != NULL) {
-			cdf_mem_free(session_entry->beacon);
+			qdf_mem_free(session_entry->beacon);
 			session_entry->beacon = NULL;
 			session_entry->bcnLen = 0;
 		}
 		session_entry->bcnLen =
 			WMA_GET_RX_PAYLOAD_LEN(rx_Packet_info);
 			session_entry->beacon =
-			cdf_mem_malloc(session_entry->bcnLen);
+			qdf_mem_malloc(session_entry->bcnLen);
 		if (NULL == session_entry->beacon) {
 			lim_log(mac_ctx, LOGE,
 				FL("No Memory to store beacon"));
@@ -175,7 +175,7 @@
 			 * Store the Beacon/ProbeRsp.
 			 * This is sent to csr/hdd in join cnf response.
 			 */
-			cdf_mem_copy(session_entry->beacon,
+			qdf_mem_copy(session_entry->beacon,
 				     WMA_GET_RX_MPDU_DATA
 					     (rx_Packet_info),
 				     session_entry->bcnLen);
@@ -193,9 +193,9 @@
 		 * heart beat threshold
 		 */
 		sir_copy_mac_addr(current_bssid, session_entry->bssId);
-		if (!cdf_mem_compare(current_bssid, header->bssId,
+		if (qdf_mem_cmp(current_bssid, header->bssId,
 				sizeof(tSirMacAddr))) {
-			cdf_mem_free(probe_rsp);
+			qdf_mem_free(probe_rsp);
 			return;
 		}
 		if (!LIM_IS_CONNECTION_ACTIVE(session_entry)) {
@@ -294,7 +294,7 @@
 			lim_handle_ibss_coalescing(mac_ctx, probe_rsp,
 					rx_Packet_info, session_entry);
 	}
-	cdf_mem_free(probe_rsp);
+	qdf_mem_free(probe_rsp);
 
 	/* Ignore Probe Response frame in all other states */
 	return;
@@ -318,7 +318,7 @@
 	tpSirMacMgmtHdr header;
 	tSirProbeRespBeacon *probe_rsp;
 
-	probe_rsp = cdf_mem_malloc(sizeof(tSirProbeRespBeacon));
+	probe_rsp = qdf_mem_malloc(sizeof(tSirProbeRespBeacon));
 	if (NULL == probe_rsp) {
 		lim_log(mac_ctx, LOGE,
 			FL("Unable to allocate memory"));
@@ -340,7 +340,7 @@
 								eSIR_SUCCESS) {
 		lim_log(mac_ctx, LOG1,
 			FL("Parse error ProbeResponse, length=%d"), frame_len);
-		cdf_mem_free(probe_rsp);
+		qdf_mem_free(probe_rsp);
 		return;
 	}
 
@@ -360,12 +360,12 @@
 		lim_log(mac_ctx, LOG1,
 			FL("Parse error ProbeResponse, length=%d\n"),
 			frame_len);
-		cdf_mem_free(probe_rsp);
+		qdf_mem_free(probe_rsp);
 		return;
 	}
 	lim_log(mac_ctx, LOG2, FL("Save this probe rsp in LFR cache"));
 	lim_check_and_add_bss_description(mac_ctx, probe_rsp,
 		  rx_packet_info, false, true);
-	cdf_mem_free(probe_rsp);
+	qdf_mem_free(probe_rsp);
 	return;
 }
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 99b5795..d71fa97 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
@@ -148,16 +148,16 @@
 
 	len = sizeof(*req_msg);
 
-	req_msg = cdf_mem_malloc(len);
+	req_msg = qdf_mem_malloc(len);
 	if (!req_msg) {
-		lim_log(mac, LOGE, FL("cdf_mem_malloc failed"));
+		lim_log(mac, LOGE, FL("qdf_mem_malloc failed"));
 		/* Free the active command list
 		 * Probably the malloc is going to fail there as well?!
 		 */
 		return QDF_STATUS_E_NOMEM;
 	}
 
-	cdf_mem_zero(req_msg, len);
+	qdf_mem_zero(req_msg, len);
 
 	req_msg->hw_mode_index = buf->set_hw.hw_mode_index;
 	req_msg->reason = buf->set_hw.reason;
@@ -172,12 +172,12 @@
 		lim_log(mac, LOGE,
 			FL("vos_mq_post_message failed!(err=%d)"),
 			status);
-		cdf_mem_free(req_msg);
+		qdf_mem_free(req_msg);
 		goto fail;
 	}
 	return status;
 fail:
-	param = cdf_mem_malloc(sizeof(*param));
+	param = qdf_mem_malloc(sizeof(*param));
 	if (!param) {
 		lim_log(mac, LOGE, FL("HW mode resp failed"));
 		return QDF_STATUS_E_FAILURE;
@@ -221,7 +221,7 @@
 
 	len = sizeof(*req_msg);
 
-	req_msg = cdf_mem_malloc(len);
+	req_msg = qdf_mem_malloc(len);
 	if (!req_msg) {
 		lim_log(mac, LOGE, FL("vos_mem_malloc failed"));
 		/* Free the active command list
@@ -230,7 +230,7 @@
 		return QDF_STATUS_E_NOMEM;
 	}
 
-	cdf_mem_zero(req_msg, len);
+	qdf_mem_zero(req_msg, len);
 
 	req_msg->scan_config = buf->set_dual_mac.scan_config;
 	req_msg->fw_mode_config = buf->set_dual_mac.fw_mode_config;
@@ -247,12 +247,12 @@
 		lim_log(mac, LOGE,
 				FL("vos_mq_post_message failed!(err=%d)"),
 				status);
-		cdf_mem_free(req_msg);
+		qdf_mem_free(req_msg);
 		goto fail;
 	}
 	return status;
 fail:
-	param = cdf_mem_malloc(sizeof(*param));
+	param = qdf_mem_malloc(sizeof(*param));
 	if (!param) {
 		lim_log(mac, LOGE, FL("Dual mac config resp failed"));
 		return QDF_STATUS_E_FAILURE;
@@ -592,7 +592,7 @@
 	    (mac_ctx->lim.gLimSmeState == eLIM_SME_IDLE_STATE)) {
 		size = sizeof(tSirSmeStartBssReq);
 
-		sme_start_bss_req = cdf_mem_malloc(size);
+		sme_start_bss_req = qdf_mem_malloc(size);
 		if (NULL == sme_start_bss_req) {
 			lim_log(mac_ctx, LOGE,
 				FL("Allocate Memory fail for LimStartBssReq"));
@@ -601,8 +601,8 @@
 			goto end;
 		}
 
-		cdf_mem_set((void *)sme_start_bss_req, size, 0);
-		cdf_mem_copy(sme_start_bss_req, msg_buf,
+		qdf_mem_set((void *)sme_start_bss_req, size, 0);
+		qdf_mem_copy(sme_start_bss_req, msg_buf,
 			sizeof(tSirSmeStartBssReq));
 		if (!lim_is_sme_start_bss_req_valid(mac_ctx,
 					sme_start_bss_req)) {
@@ -669,7 +669,7 @@
 
 		session->transactionId = sme_start_bss_req->transactionId;
 
-		cdf_mem_copy(&(session->htConfig),
+		qdf_mem_copy(&(session->htConfig),
 			     &(sme_start_bss_req->htConfig),
 			     sizeof(session->htConfig));
 
@@ -677,7 +677,7 @@
 				  sme_start_bss_req->self_macaddr.bytes);
 
 		/* Copy SSID to session table */
-		cdf_mem_copy((uint8_t *) &session->ssId,
+		qdf_mem_copy((uint8_t *) &session->ssId,
 			     (uint8_t *) &sme_start_bss_req->ssId,
 			     (sme_start_bss_req->ssId.length + 1));
 
@@ -729,10 +729,10 @@
 			session->limRmfEnabled);
 #endif
 
-		cdf_mem_copy((void *)&session->rateSet,
+		qdf_mem_copy((void *)&session->rateSet,
 			     (void *)&sme_start_bss_req->operationalRateSet,
 			     sizeof(tSirMacRateSet));
-		cdf_mem_copy((void *)&session->extRateSet,
+		qdf_mem_copy((void *)&session->extRateSet,
 			     (void *)&sme_start_bss_req->extendedRateSet,
 			     sizeof(tSirMacRateSet));
 
@@ -788,7 +788,7 @@
 		if ((sme_start_bss_req->bssType == eSIR_BTAMP_AP_MODE) ||
 		    (sme_start_bss_req->bssType == eSIR_INFRA_AP_MODE)) {
 			session->parsedAssocReq =
-				cdf_mem_malloc(session->dph.dphHashTable.
+				qdf_mem_malloc(session->dph.dphHashTable.
 					       size * sizeof(tpSirAssocReq));
 			if (NULL == session->parsedAssocReq) {
 				lim_log(mac_ctx, LOGW,
@@ -796,7 +796,7 @@
 				ret_code = eSIR_SME_RESOURCES_UNAVAILABLE;
 				goto free;
 			}
-			cdf_mem_set(session->parsedAssocReq,
+			qdf_mem_set(session->parsedAssocReq,
 				(session->dph.dphHashTable.size *
 				sizeof(tpSirAssocReq)), 0);
 		}
@@ -878,14 +878,14 @@
 			 * bit7       bit6    bit5   bit4 bit3   bit2  bit1 bit0
 			 * reserved reserved   RIFS   Lsig n-GF   ht20  11g  11b
 			 */
-			cdf_mem_copy((void *)&session->cfgProtection,
+			qdf_mem_copy((void *)&session->cfgProtection,
 				     (void *)&sme_start_bss_req->ht_capab,
 				     sizeof(uint16_t));
 			/* Initialize WPS PBC session link list */
 			session->pAPWPSPBCSession = NULL;
 		}
 		/* Prepare and Issue LIM_MLM_START_REQ to MLM */
-		mlm_start_req = cdf_mem_malloc(sizeof(tLimMlmStartReq));
+		mlm_start_req = qdf_mem_malloc(sizeof(tLimMlmStartReq));
 		if (NULL == mlm_start_req) {
 			lim_log(mac_ctx, LOGP,
 				FL("Allocate Memory failed for mlmStartReq"));
@@ -893,10 +893,10 @@
 			goto free;
 		}
 
-		cdf_mem_set((void *)mlm_start_req, sizeof(tLimMlmStartReq), 0);
+		qdf_mem_set((void *)mlm_start_req, sizeof(tLimMlmStartReq), 0);
 
 		/* Copy SSID to the MLM start structure */
-		cdf_mem_copy((uint8_t *) &mlm_start_req->ssId,
+		qdf_mem_copy((uint8_t *) &mlm_start_req->ssId,
 			     (uint8_t *) &sme_start_bss_req->ssId,
 			     sme_start_bss_req->ssId.length + 1);
 		mlm_start_req->ssidHidden = sme_start_bss_req->ssidHidden;
@@ -999,7 +999,7 @@
 		 * as rateSet is now included in the
 		 * session entry and MLM has session context.
 		 */
-		cdf_mem_copy((void *)&mlm_start_req->rateSet,
+		qdf_mem_copy((void *)&mlm_start_req->rateSet,
 			     (void *)&session->rateSet,
 			     sizeof(tSirMacRateSet));
 
@@ -1078,8 +1078,8 @@
 		(session->pLimStartBssReq == sme_start_bss_req)) {
 		session->pLimStartBssReq = NULL;
 	}
-	cdf_mem_free(sme_start_bss_req);
-	cdf_mem_free(mlm_start_req);
+	qdf_mem_free(sme_start_bss_req);
+	qdf_mem_free(mlm_start_req);
 
 end:
 	if (sme_start_bss_req != NULL) {
@@ -1147,7 +1147,7 @@
 	random[0] = tx_time_get();
 	random[0] |= (random[0] << 15);
 	random[1] = random[0] >> 1;
-	cdf_mem_copy(data, (uint8_t *) random, sizeof(tSirMacAddr));
+	qdf_mem_copy(data, (uint8_t *) random, sizeof(tSirMacAddr));
 }
 
 static QDF_STATUS lim_send_hal_start_scan_offload_req(tpAniSirGlobal pMac,
@@ -1219,14 +1219,14 @@
 	}
 #endif /* WLAN_FEATURE_11AC */
 
-	pScanOffloadReq = cdf_mem_malloc(len);
+	pScanOffloadReq = qdf_mem_malloc(len);
 	if (NULL == pScanOffloadReq) {
 		lim_log(pMac, LOGE,
 			FL("AllocateMemory failed for pScanOffloadReq"));
 		return QDF_STATUS_E_NOMEM;
 	}
 
-	cdf_mem_set((uint8_t *) pScanOffloadReq, len, 0);
+	qdf_mem_set((uint8_t *) pScanOffloadReq, len, 0);
 
 	msg.type = WMA_START_SCAN_OFFLOAD_REQ;
 	msg.bodyptr = pScanOffloadReq;
@@ -1238,14 +1238,14 @@
 		lim_log(pMac, LOGE,
 			FL("Invalid value (%d) for numSsid"),
 			SIR_SCAN_MAX_NUM_SSID);
-		cdf_mem_free(pScanOffloadReq);
+		qdf_mem_free(pScanOffloadReq);
 		return QDF_STATUS_E_FAILURE;
 	}
 
 	pScanOffloadReq->numSsid = pScanReq->numSsid;
 	for (i = 0; i < pScanOffloadReq->numSsid; i++) {
 		pScanOffloadReq->ssId[i].length = pScanReq->ssId[i].length;
-		cdf_mem_copy((uint8_t *) pScanOffloadReq->ssId[i].ssId,
+		qdf_mem_copy((uint8_t *) pScanOffloadReq->ssId[i].ssId,
 			     (uint8_t *) pScanReq->ssId[i].ssId,
 			     pScanOffloadReq->ssId[i].length);
 	}
@@ -1281,7 +1281,7 @@
 	pScanOffloadReq->uIEFieldLen = pScanReq->uIEFieldLen;
 	pScanOffloadReq->uIEFieldOffset = len - addn_ie_len -
 						pScanOffloadReq->uIEFieldLen;
-	cdf_mem_copy((uint8_t *) pScanOffloadReq +
+	qdf_mem_copy((uint8_t *) pScanOffloadReq +
 		     pScanOffloadReq->uIEFieldOffset,
 		     (uint8_t *) pScanReq + pScanReq->uIEFieldOffset,
 		     pScanReq->uIEFieldLen);
@@ -1292,7 +1292,7 @@
 		ht_cap_ie = (uint8_t *) pScanOffloadReq +
 					pScanOffloadReq->uIEFieldOffset +
 					pScanOffloadReq->uIEFieldLen;
-		cdf_mem_set(ht_cap_ie, ht_cap_len, 0);
+		qdf_mem_set(ht_cap_ie, ht_cap_len, 0);
 		*ht_cap_ie = SIR_MAC_HT_CAPABILITIES_EID;
 		*(ht_cap_ie + 1) =  ht_cap_len - 2;
 		lim_set_ht_caps(pMac, NULL, ht_cap_ie, ht_cap_len);
@@ -1306,7 +1306,7 @@
 		vht_cap_ie = (uint8_t *) pScanOffloadReq +
 					 pScanOffloadReq->uIEFieldOffset +
 					 pScanOffloadReq->uIEFieldLen;
-		cdf_mem_set(vht_cap_ie, vht_cap_len, 0);
+		qdf_mem_set(vht_cap_ie, vht_cap_len, 0);
 		*vht_cap_ie = SIR_MAC_VHT_CAPABILITIES_EID;
 		*(vht_cap_ie + 1) =  vht_cap_len - 2;
 		lim_set_vht_caps(pMac, NULL, vht_cap_ie, vht_cap_len);
@@ -1317,7 +1317,7 @@
 	rc = wma_post_ctrl_msg(pMac, &msg);
 	if (rc != eSIR_SUCCESS) {
 		lim_log(pMac, LOGE, FL("wma_post_ctrl_msg() return failure"));
-		cdf_mem_free(pScanOffloadReq);
+		qdf_mem_free(pScanOffloadReq);
 		return QDF_STATUS_E_FAILURE;
 	}
 
@@ -1448,26 +1448,26 @@
 	pOemDataReq = (tpSirOemDataReq) pMsgBuf;
 
 	/* post the lim mlm message now */
-	pMlmOemDataReq = cdf_mem_malloc(sizeof(*pMlmOemDataReq));
+	pMlmOemDataReq = qdf_mem_malloc(sizeof(*pMlmOemDataReq));
 	if (NULL == pMlmOemDataReq) {
 		lim_log(pMac, LOGP,
 			FL("AllocateMemory failed for mlmOemDataReq"));
 		return;
 	}
-	pMlmOemDataReq->data = cdf_mem_malloc(pOemDataReq->data_len);
+	pMlmOemDataReq->data = qdf_mem_malloc(pOemDataReq->data_len);
 	if (!pMlmOemDataReq->data) {
 		lim_log(pMac, LOGP, FL("memory allocation failed"));
-		cdf_mem_free(pMlmOemDataReq);
+		qdf_mem_free(pMlmOemDataReq);
 		return;
 	}
 
 	qdf_copy_macaddr(&pMlmOemDataReq->selfMacAddr,
 			 &pOemDataReq->selfMacAddr);
 	pMlmOemDataReq->data_len = pOemDataReq->data_len;
-	cdf_mem_copy(pMlmOemDataReq->data, pOemDataReq->data,
+	qdf_mem_copy(pMlmOemDataReq->data, pOemDataReq->data,
 		     pOemDataReq->data_len);
 	/* buffer from SME copied, free it now */
-	cdf_mem_free(pOemDataReq->data);
+	qdf_mem_free(pOemDataReq->data);
 	/* Issue LIM_MLM_OEM_DATA_REQ to MLM */
 	lim_post_mlm_message(pMac, LIM_MLM_OEM_DATA_REQ,
 			     (uint32_t *) pMlmOemDataReq);
@@ -1497,7 +1497,7 @@
  */
 static void __lim_process_clear_dfs_channel_list(tpAniSirGlobal pMac, tpSirMsgQ pMsg)
 {
-	cdf_mem_set(&pMac->lim.dfschannelList, sizeof(tSirDFSChannelList), 0);
+	qdf_mem_set(&pMac->lim.dfschannelList, sizeof(tSirDFSChannelList), 0);
 }
 
 /**
@@ -1548,15 +1548,15 @@
 		n_size = __lim_get_sme_join_req_size_for_alloc((uint8_t *)
 				msg_buf);
 
-		sme_join_req = cdf_mem_malloc(n_size);
+		sme_join_req = qdf_mem_malloc(n_size);
 		if (NULL == sme_join_req) {
 			lim_log(mac_ctx, LOGP,
 				FL("AllocateMemory failed for sme_join_req"));
 			ret_code = eSIR_SME_RESOURCES_UNAVAILABLE;
 			return;
 		}
-		(void)cdf_mem_set((void *)sme_join_req, n_size, 0);
-		(void)cdf_mem_copy((void *)sme_join_req, (void *)msg_buf,
+		(void)qdf_mem_set((void *)sme_join_req, n_size, 0);
+		(void)qdf_mem_copy((void *)sme_join_req, (void *)msg_buf,
 			n_size);
 
 		if (!lim_is_sme_join_req_valid(mac_ctx, sme_join_req)) {
@@ -1652,7 +1652,7 @@
 		session->beaconParams.beaconInterval =
 			bss_desc.beaconInterval;
 
-		cdf_mem_copy(&(session->htConfig), &(sme_join_req->htConfig),
+		qdf_mem_copy(&(session->htConfig), &(sme_join_req->htConfig),
 			sizeof(session->htConfig));
 
 		/* Copying of bssId is already done, while creating session */
@@ -1791,7 +1791,7 @@
 
 		/* Copy the SSID from smejoinreq to session entry  */
 		session->ssId.length = sme_join_req->ssId.length;
-		cdf_mem_copy(session->ssId.ssId, sme_join_req->ssId.ssId,
+		qdf_mem_copy(session->ssId.ssId, sme_join_req->ssId.ssId,
 			session->ssId.length);
 
 		/*
@@ -1830,22 +1830,22 @@
 		}
 
 		if (sme_join_req->addIEScan.length)
-			cdf_mem_copy(&session->pLimJoinReq->addIEScan,
+			qdf_mem_copy(&session->pLimJoinReq->addIEScan,
 				&sme_join_req->addIEScan, sizeof(tSirAddie));
 
 		if (sme_join_req->addIEAssoc.length)
-			cdf_mem_copy(&session->pLimJoinReq->addIEAssoc,
+			qdf_mem_copy(&session->pLimJoinReq->addIEAssoc,
 				&sme_join_req->addIEAssoc, sizeof(tSirAddie));
 
 		val = sizeof(tLimMlmJoinReq) +
 			session->pLimJoinReq->bssDescription.length + 2;
-		mlm_join_req = cdf_mem_malloc(val);
+		mlm_join_req = qdf_mem_malloc(val);
 		if (NULL == mlm_join_req) {
 			lim_log(mac_ctx, LOGP,
 				FL("AllocateMemory failed for mlmJoinReq"));
 			return;
 		}
-		(void)cdf_mem_set((void *)mlm_join_req, val, 0);
+		(void)qdf_mem_set((void *)mlm_join_req, val, 0);
 
 		/* PE SessionId is stored as a part of JoinReq */
 		mlm_join_req->sessionId = session->peSessionId;
@@ -1861,17 +1861,17 @@
 		}
 
 		/* copy operational rate from session */
-		cdf_mem_copy((void *)&session->rateSet,
+		qdf_mem_copy((void *)&session->rateSet,
 			(void *)&sme_join_req->operationalRateSet,
 			sizeof(tSirMacRateSet));
-		cdf_mem_copy((void *)&session->extRateSet,
+		qdf_mem_copy((void *)&session->extRateSet,
 			(void *)&sme_join_req->extendedRateSet,
 			sizeof(tSirMacRateSet));
 		/*
 		 * this may not be needed anymore now, as rateSet is now
 		 * included in the session entry and MLM has session context.
 		 */
-		cdf_mem_copy((void *)&mlm_join_req->operationalRateSet,
+		qdf_mem_copy((void *)&mlm_join_req->operationalRateSet,
 			(void *)&session->rateSet,
 			sizeof(tSirMacRateSet));
 
@@ -1880,7 +1880,7 @@
 		mlm_join_req->bssDescription.length =
 			session->pLimJoinReq->bssDescription.length;
 
-		cdf_mem_copy((uint8_t *) &mlm_join_req->bssDescription.bssId,
+		qdf_mem_copy((uint8_t *) &mlm_join_req->bssDescription.bssId,
 			(uint8_t *)
 			&session->pLimJoinReq->bssDescription.bssId,
 			session->pLimJoinReq->bssDescription.length + 2);
@@ -2002,7 +2002,7 @@
 	sme_transaction_id = sme_join_req->transactionId;
 
 	if (sme_join_req) {
-		cdf_mem_free(sme_join_req);
+		qdf_mem_free(sme_join_req);
 		sme_join_req = NULL;
 		if (NULL != session)
 			session->pLimJoinReq = NULL;
@@ -2070,7 +2070,7 @@
 	lim_log(mac_ctx, LOG3, FL("Received REASSOC_REQ"));
 
 	size = __lim_get_sme_join_req_size_for_alloc((uint8_t *)msg_buf);
-	reassoc_req = cdf_mem_malloc(size);
+	reassoc_req = qdf_mem_malloc(size);
 	if (NULL == reassoc_req) {
 		lim_log(mac_ctx, LOGP,
 			FL("call to AllocateMemory failed for reassoc_req"));
@@ -2078,8 +2078,8 @@
 		ret_code = eSIR_SME_RESOURCES_UNAVAILABLE;
 		goto end;
 	}
-	(void)cdf_mem_set((void *)reassoc_req, size, 0);
-	(void)cdf_mem_copy((void *)reassoc_req, (void *)msg_buf, size);
+	(void)qdf_mem_set((void *)reassoc_req, size, 0);
+	(void)qdf_mem_copy((void *)reassoc_req, (void *)msg_buf, size);
 
 	if (!lim_is_sme_join_req_valid(mac_ctx,
 				(tpSirSmeJoinReq)reassoc_req)) {
@@ -2132,7 +2132,7 @@
 					session_entry->peSessionId);
 
 			/* Make sure its our preauth bssid */
-			if (!cdf_mem_compare(reassoc_req->bssDescription.bssId,
+			if (qdf_mem_cmp(reassoc_req->bssDescription.bssId,
 					     session_entry->limReAssocbssId,
 					     6)) {
 				lim_print_mac_addr(mac_ctx,
@@ -2160,7 +2160,7 @@
 		goto end;
 	}
 
-	cdf_mem_copy(session_entry->limReAssocbssId,
+	qdf_mem_copy(session_entry->limReAssocbssId,
 		     session_entry->pLimReAssocReq->bssDescription.bssId,
 		     sizeof(tSirMacAddr));
 
@@ -2197,7 +2197,7 @@
 #endif
 	/* Copy the SSID from session entry to local variable */
 	session_entry->limReassocSSID.length = reassoc_req->ssId.length;
-	cdf_mem_copy(session_entry->limReassocSSID.ssId,
+	qdf_mem_copy(session_entry->limReassocSSID.ssId,
 		     reassoc_req->ssId.ssId,
 		     session_entry->limReassocSSID.length);
 	if (session_entry->gLimCurrentBssUapsd) {
@@ -2208,7 +2208,7 @@
 			session_entry->gUapsdPerAcBitmask);
 	}
 
-	mlm_reassoc_req = cdf_mem_malloc(sizeof(tLimMlmReassocReq));
+	mlm_reassoc_req = qdf_mem_malloc(sizeof(tLimMlmReassocReq));
 	if (NULL == mlm_reassoc_req) {
 		lim_log(mac_ctx, LOGP,
 			FL("call to AllocateMemory failed for mlmReassocReq"));
@@ -2217,7 +2217,7 @@
 		goto end;
 	}
 
-	cdf_mem_copy(mlm_reassoc_req->peerMacAddr,
+	qdf_mem_copy(mlm_reassoc_req->peerMacAddr,
 		     session_entry->limReAssocbssId, sizeof(tSirMacAddr));
 
 	if (wlan_cfg_get_int(mac_ctx, WNI_CFG_REASSOCIATION_FAILURE_TIMEOUT,
@@ -2299,7 +2299,7 @@
 	return;
 end:
 	if (reassoc_req) {
-		cdf_mem_free(reassoc_req);
+		qdf_mem_free(reassoc_req);
 		if (session_entry)
 			session_entry->pLimReAssocReq = NULL;
 	}
@@ -2365,7 +2365,7 @@
 		return;
 	}
 
-	cdf_mem_copy(&smeDisassocReq, pMsgBuf, sizeof(tSirSmeDisassocReq));
+	qdf_mem_copy(&smeDisassocReq, pMsgBuf, sizeof(tSirSmeDisassocReq));
 	smesessionId = smeDisassocReq.sessionId;
 	smetransactionId = smeDisassocReq.transactionId;
 	if (!lim_is_sme_disassoc_req_valid(pMac,
@@ -2529,7 +2529,7 @@
 				" : %d, reasonCode : %d"),
 			disassocTrigger, reasonCode);
 
-	pMlmDisassocReq = cdf_mem_malloc(sizeof(tLimMlmDisassocReq));
+	pMlmDisassocReq = qdf_mem_malloc(sizeof(tLimMlmDisassocReq));
 	if (NULL == pMlmDisassocReq) {
 		/* Log error */
 		lim_log(pMac, LOGP,
@@ -2588,7 +2588,7 @@
 
 	PELOG1(lim_log(pMac, LOG1, FL("received DISASSOC_CNF message"));)
 
-	cdf_mem_copy(&smeDisassocCnf, pMsgBuf,
+	qdf_mem_copy(&smeDisassocCnf, pMsgBuf,
 			sizeof(struct sSirSmeDisassocCnf));
 
 	psessionEntry = pe_find_session_by_bssid(pMac,
@@ -2709,7 +2709,7 @@
 
 	lim_log(mac_ctx, LOG1, FL("received DEAUTH_REQ message"));
 
-	cdf_mem_copy(&sme_deauth_req, msg_buf, sizeof(tSirSmeDeauthReq));
+	qdf_mem_copy(&sme_deauth_req, msg_buf, sizeof(tSirSmeDeauthReq));
 	sme_session_id = sme_deauth_req.sessionId;
 	sme_transaction_id = sme_deauth_req.transactionId;
 
@@ -2861,7 +2861,7 @@
 	}
 
 	/* Trigger Deauthentication frame to peer MAC entity */
-	mlm_deauth_req = cdf_mem_malloc(sizeof(tLimMlmDeauthReq));
+	mlm_deauth_req = qdf_mem_malloc(sizeof(tLimMlmDeauthReq));
 	if (NULL == mlm_deauth_req) {
 		lim_log(mac_ctx, LOGP,
 			FL("call to AllocateMemory failed for mlmDeauthReq"));
@@ -2922,13 +2922,13 @@
 		return;
 	}
 
-	set_context_req = cdf_mem_malloc(sizeof(struct sSirSmeSetContextReq));
+	set_context_req = qdf_mem_malloc(sizeof(struct sSirSmeSetContextReq));
 	if (NULL == set_context_req) {
 		lim_log(mac_ctx, LOGP, FL(
 			"call to AllocateMemory failed for set_context_req"));
 		return;
 	}
-	cdf_mem_copy(set_context_req, msg_buf,
+	qdf_mem_copy(set_context_req, msg_buf,
 			sizeof(struct sSirSmeSetContextReq));
 	sme_session_id = set_context_req->sessionId;
 	sme_transaction_id = set_context_req->transactionId;
@@ -2975,7 +2975,7 @@
 	    LIM_IS_BT_AMP_AP_ROLE(session_entry)) &&
 	    (session_entry->limSmeState == eLIM_SME_NORMAL_STATE))) {
 		/* Trigger MLM_SETKEYS_REQ */
-		mlm_set_key_req = cdf_mem_malloc(sizeof(tLimMlmSetKeysReq));
+		mlm_set_key_req = qdf_mem_malloc(sizeof(tLimMlmSetKeysReq));
 		if (NULL == mlm_set_key_req) {
 			lim_log(mac_ctx, LOGP, FL(
 					"mem alloc failed for mlmSetKeysReq"));
@@ -2993,7 +2993,7 @@
 		qdf_copy_macaddr(&mlm_set_key_req->peer_macaddr,
 				 &set_context_req->peer_macaddr);
 
-		cdf_mem_copy((uint8_t *) &mlm_set_key_req->key,
+		qdf_mem_copy((uint8_t *) &mlm_set_key_req->key,
 			     (uint8_t *) &set_context_req->keyMaterial.key,
 			     sizeof(tSirKeys) *
 			     (mlm_set_key_req->numKeys ? mlm_set_key_req->
@@ -3012,7 +3012,7 @@
 				uint8_t key_id;
 				key_id =
 					set_context_req->keyMaterial.key[0].keyId;
-				cdf_mem_copy((uint8_t *)
+				qdf_mem_copy((uint8_t *)
 					&session_entry->WEPKeyMaterial[key_id],
 					(uint8_t *) &set_context_req->keyMaterial,
 					sizeof(tSirKeyMaterial));
@@ -3020,7 +3020,7 @@
 				uint32_t i;
 				for (i = 0; i < SIR_MAC_MAX_NUM_OF_DEFAULT_KEYS;
 				     i++) {
-					cdf_mem_copy((uint8_t *)
+					qdf_mem_copy((uint8_t *)
 						&mlm_set_key_req->key[i],
 						(uint8_t *)session_entry->WEPKeyMaterial[i].key,
 						sizeof(tSirKeys));
@@ -3043,7 +3043,7 @@
 				sme_transaction_id);
 	}
 end:
-	cdf_mem_free(set_context_req);
+	qdf_mem_free(set_context_req);
 	return;
 }
 
@@ -3077,7 +3077,7 @@
 		return;
 	}
 
-	cdf_mem_copy(&get_assoc_stas_req, msg_buf,
+	qdf_mem_copy(&get_assoc_stas_req, msg_buf,
 				sizeof(struct sSirSmeGetAssocSTAsReq));
 	/*
 	 * Get Associated stations from PE.
@@ -3112,13 +3112,13 @@
 		if (NULL == sta_ds)
 			continue;
 		if (sta_ds->valid) {
-			cdf_mem_copy((uint8_t *) &assoc_sta_tmp->staMac,
+			qdf_mem_copy((uint8_t *) &assoc_sta_tmp->staMac,
 					(uint8_t *) &sta_ds->staAddr,
 					 QDF_MAC_ADDR_SIZE);
 			assoc_sta_tmp->assocId = (uint8_t) sta_ds->assocId;
 			assoc_sta_tmp->staId = (uint8_t) sta_ds->staIndex;
 
-			cdf_mem_copy((uint8_t *)&assoc_sta_tmp->supportedRates,
+			qdf_mem_copy((uint8_t *)&assoc_sta_tmp->supportedRates,
 				     (uint8_t *)&sta_ds->supportedRates,
 				     sizeof(tSirSupportedRates));
 			assoc_sta_tmp->ShortGI40Mhz = sta_ds->htShortGI40Mhz;
@@ -3184,7 +3184,7 @@
 	sap_get_wpspbc_event = &sap_event.sapevt.sapGetWPSPBCSessionEvent;
 	sap_get_wpspbc_event->status = QDF_STATUS_E_FAULT;
 
-	cdf_mem_copy(&get_wps_pbc_sessions_req, msg_buf,
+	qdf_mem_copy(&get_wps_pbc_sessions_req, msg_buf,
 			sizeof(struct sSirSmeGetWPSPBCSessionsReq));
 	/*
 	 * Get Associated stations from PE
@@ -3274,7 +3274,7 @@
 	tpPESession psessionEntry;
 	uint8_t sessionId;      /* PE sessionId */
 
-	cdf_mem_copy(&tkipCntrMeasReq, pMsgBuf,
+	qdf_mem_copy(&tkipCntrMeasReq, pMsgBuf,
 			sizeof(struct sSirSmeTkipCntrMeasReq));
 
 	psessionEntry = pe_find_session_by_bssid(pMac,
@@ -3304,7 +3304,7 @@
 	uint8_t i = 0;
 	tpDphHashNode pStaDs = NULL;
 
-	cdf_mem_copy(&stopBssReq, pMsgBuf, sizeof(tSirSmeStopBssReq));
+	qdf_mem_copy(&stopBssReq, pMsgBuf, sizeof(tSirSmeStopBssReq));
 	smesessionId = stopBssReq.sessionId;
 	smetransactionId = stopBssReq.transactionId;
 
@@ -3386,15 +3386,15 @@
 	}
 
 	/* Free the buffer allocated in START_BSS_REQ */
-	cdf_mem_free(psessionEntry->addIeParams.probeRespData_buff);
+	qdf_mem_free(psessionEntry->addIeParams.probeRespData_buff);
 	psessionEntry->addIeParams.probeRespDataLen = 0;
 	psessionEntry->addIeParams.probeRespData_buff = NULL;
 
-	cdf_mem_free(psessionEntry->addIeParams.assocRespData_buff);
+	qdf_mem_free(psessionEntry->addIeParams.assocRespData_buff);
 	psessionEntry->addIeParams.assocRespDataLen = 0;
 	psessionEntry->addIeParams.assocRespData_buff = NULL;
 
-	cdf_mem_free(psessionEntry->addIeParams.probeRespBCNData_buff);
+	qdf_mem_free(psessionEntry->addIeParams.probeRespBCNData_buff);
 	psessionEntry->addIeParams.probeRespBCNDataLen = 0;
 	psessionEntry->addIeParams.probeRespBCNData_buff = NULL;
 
@@ -3506,7 +3506,7 @@
 		goto end;
 	}
 
-	cdf_mem_copy(&assoc_cnf, msg_buf, sizeof(struct sSirSmeAssocCnf));
+	qdf_mem_copy(&assoc_cnf, msg_buf, sizeof(struct sSirSmeAssocCnf));
 	if (!__lim_is_sme_assoc_cnf_valid(&assoc_cnf)) {
 		lim_log(mac_ctx, LOGE,
 			FL("Received invalid SME_RE(ASSOC)_CNF message "));
@@ -3552,7 +3552,7 @@
 				session_entry);
 		goto end;
 	}
-	if (!cdf_mem_compare((uint8_t *)sta_ds->staAddr,
+	if (qdf_mem_cmp((uint8_t *)sta_ds->staAddr,
 				(uint8_t *) assoc_cnf.peer_macaddr.bytes,
 				QDF_MAC_ADDR_SIZE)) {
 		lim_log(mac_ctx, LOG1, FL(
@@ -3623,10 +3623,10 @@
 		assoc_req = (tpSirAssocReq)
 			session_entry->parsedAssocReq[sta_ds->assocId];
 		if (assoc_req->assocReqFrame) {
-			cdf_mem_free(assoc_req->assocReqFrame);
+			qdf_mem_free(assoc_req->assocReqFrame);
 			assoc_req->assocReqFrame = NULL;
 		}
-		cdf_mem_free(session_entry->parsedAssocReq[sta_ds->assocId]);
+		qdf_mem_free(session_entry->parsedAssocReq[sta_ds->assocId]);
 		session_entry->parsedAssocReq[sta_ds->assocId] = NULL;
 	}
 }
@@ -3757,7 +3757,7 @@
 
 	/* save the addts request */
 	pMac->lim.gLimAddtsSent = true;
-	cdf_mem_copy((uint8_t *) &pMac->lim.gLimAddtsReq,
+	qdf_mem_copy((uint8_t *) &pMac->lim.gLimAddtsReq,
 		     (uint8_t *) pSirAddts, sizeof(tSirAddtsReq));
 
 	/* ship out the message now */
@@ -3980,7 +3980,7 @@
 	MTRACE(mac_trace_msg_tx(pMac, NO_SESSION, msgQ.type));
 
 	if (eSIR_SUCCESS != (wma_post_ctrl_msg(pMac, &msgQ))) {
-		cdf_mem_free(pMsgBuf);
+		qdf_mem_free(pMsgBuf);
 		pMsgBuf = NULL;
 		lim_log(pMac, LOGP, "Unable to forward request");
 		return;
@@ -4011,7 +4011,7 @@
 	MTRACE(mac_trace_msg_tx(pMac, NO_SESSION, msgQ.type));
 
 	if (eSIR_SUCCESS != (wma_post_ctrl_msg(pMac, &msgQ))) {
-		cdf_mem_free(pMsgBuf);
+		qdf_mem_free(pMsgBuf);
 		pMsgBuf = NULL;
 		lim_log(pMac, LOGP, "Unable to forward request");
 		return;
@@ -4033,14 +4033,14 @@
 		return;
 	}
 
-	pUpdateAPWPSIEsReq = cdf_mem_malloc(sizeof(tSirUpdateAPWPSIEsReq));
+	pUpdateAPWPSIEsReq = qdf_mem_malloc(sizeof(tSirUpdateAPWPSIEsReq));
 	if (NULL == pUpdateAPWPSIEsReq) {
 		lim_log(pMac, LOGP,
 			FL
 				("call to AllocateMemory failed for pUpdateAPWPSIEsReq"));
 		return;
 	}
-	cdf_mem_copy(pUpdateAPWPSIEsReq, pMsgBuf,
+	qdf_mem_copy(pUpdateAPWPSIEsReq, pMsgBuf,
 			sizeof(struct sSirUpdateAPWPSIEsReq));
 
 	psessionEntry = pe_find_session_by_bssid(pMac,
@@ -4052,14 +4052,14 @@
 		goto end;
 	}
 
-	cdf_mem_copy(&psessionEntry->APWPSIEs, &pUpdateAPWPSIEsReq->APWPSIEs,
+	qdf_mem_copy(&psessionEntry->APWPSIEs, &pUpdateAPWPSIEsReq->APWPSIEs,
 		     sizeof(tSirAPWPSIEs));
 
 	sch_set_fixed_beacon_fields(pMac, psessionEntry);
 	lim_send_beacon_ind(pMac, psessionEntry);
 
 end:
-	cdf_mem_free(pUpdateAPWPSIEsReq);
+	qdf_mem_free(pUpdateAPWPSIEsReq);
 	return;
 }
 
@@ -4080,7 +4080,7 @@
 	}
 
 	pHalHiddenSsidVdevRestart =
-		cdf_mem_malloc(sizeof(tHalHiddenSsidVdevRestart));
+		qdf_mem_malloc(sizeof(tHalHiddenSsidVdevRestart));
 	if (NULL == pHalHiddenSsidVdevRestart) {
 		PELOGE(lim_log
 			       (pMac, LOGE, "%s:%d: Unable to allocate memory",
@@ -4102,7 +4102,7 @@
 			       (pMac, LOGE, "%s:%d: wma_post_ctrl_msg() failed", __func__,
 			       __LINE__);
 		       )
-		cdf_mem_free(pHalHiddenSsidVdevRestart);
+		qdf_mem_free(pHalHiddenSsidVdevRestart);
 	}
 }
 
@@ -4153,14 +4153,14 @@
 		return;
 	}
 
-	pUpdateAPWPARSNIEsReq = cdf_mem_malloc(sizeof(tSirUpdateAPWPSIEsReq));
+	pUpdateAPWPARSNIEsReq = qdf_mem_malloc(sizeof(tSirUpdateAPWPSIEsReq));
 	if (NULL == pUpdateAPWPARSNIEsReq) {
 		lim_log(pMac, LOGP,
 			FL
 				("call to AllocateMemory failed for pUpdateAPWPARSNIEsReq"));
 		return;
 	}
-	cdf_mem_copy(pUpdateAPWPARSNIEsReq, pMsgBuf,
+	qdf_mem_copy(pUpdateAPWPARSNIEsReq, pMsgBuf,
 			sizeof(struct sSirUpdateAPWPARSNIEsReq));
 
 	psessionEntry = pe_find_session_by_bssid(pMac,
@@ -4172,7 +4172,7 @@
 		goto end;
 	}
 
-	cdf_mem_copy(&psessionEntry->pLimStartBssReq->rsnIE,
+	qdf_mem_copy(&psessionEntry->pLimStartBssReq->rsnIE,
 		     &pUpdateAPWPARSNIEsReq->APWPARSNIEs, sizeof(tSirRSNie));
 
 	lim_set_rs_nie_wp_aiefrom_sme_start_bss_req_message(pMac,
@@ -4187,7 +4187,7 @@
 	lim_send_beacon_ind(pMac, psessionEntry);
 
 end:
-	cdf_mem_free(pUpdateAPWPARSNIEsReq);
+	qdf_mem_free(pUpdateAPWPARSNIEsReq);
 	return;
 } /*** end __lim_process_sme_set_wparsni_es(tpAniSirGlobal pMac, uint32_t *pMsgBuf) ***/
 
@@ -4210,7 +4210,7 @@
 		return;
 	}
 
-	cdf_mem_zero(&beaconParams, sizeof(tUpdateBeaconParams));
+	qdf_mem_zero(&beaconParams, sizeof(tUpdateBeaconParams));
 	pChangeBIParams = (tpSirChangeBIParams) pMsgBuf;
 
 	psessionEntry = pe_find_session_by_bssid(pMac,
@@ -4330,7 +4330,7 @@
 			continue;
 
 		if (pStaDs->valid && pStaDs->htSupportedChannelWidthSet) {
-			pHtOpMode = cdf_mem_malloc(sizeof(tUpdateVHTOpMode));
+			pHtOpMode = qdf_mem_malloc(sizeof(tUpdateVHTOpMode));
 			if (NULL == pHtOpMode) {
 				lim_log(pMac, LOGE,
 					FL
@@ -4343,7 +4343,7 @@
 				 PHY_SINGLE_CHANNEL_CENTERED) ?
 				eHT_CHANNEL_WIDTH_20MHZ : eHT_CHANNEL_WIDTH_40MHZ;
 			pHtOpMode->staId = staId;
-			cdf_mem_copy(pHtOpMode->peer_mac, &pStaDs->staAddr,
+			qdf_mem_copy(pHtOpMode->peer_mac, &pStaDs->staAddr,
 				     sizeof(tSirMacAddr));
 			pHtOpMode->smesessionId = sessionId;
 
@@ -4356,7 +4356,7 @@
 					FL
 						("%s: Not able to post WMA_UPDATE_OP_MODE message to WMA"),
 					__func__);
-				cdf_mem_free(pHtOpMode);
+				qdf_mem_free(pHtOpMode);
 				return;
 			}
 			lim_log(pMac, LOG1,
@@ -4439,7 +4439,7 @@
 		return eSIR_FAILURE;
 	}
 
-	pMaxTxParams = cdf_mem_malloc(sizeof(tMaxTxPowerParams));
+	pMaxTxParams = qdf_mem_malloc(sizeof(tMaxTxPowerParams));
 	if (NULL == pMaxTxParams) {
 		lim_log(pMac, LOGP,
 			FL("Unable to allocate memory for pMaxTxParams "));
@@ -4455,9 +4455,9 @@
 		return eSIR_FAILURE;
 	}
 	pMaxTxParams->power = txPower;
-	cdf_mem_copy(pMaxTxParams->bssId.bytes, pSessionEntry->bssId,
+	qdf_mem_copy(pMaxTxParams->bssId.bytes, pSessionEntry->bssId,
 		     QDF_MAC_ADDR_SIZE);
-	cdf_mem_copy(pMaxTxParams->selfStaMacAddr.bytes,
+	qdf_mem_copy(pMaxTxParams->selfStaMacAddr.bytes,
 			pSessionEntry->selfMacAddr,
 			QDF_MAC_ADDR_SIZE);
 
@@ -4471,7 +4471,7 @@
 	retCode = wma_post_ctrl_msg(pMac, &msgQ);
 	if (eSIR_SUCCESS != retCode) {
 		lim_log(pMac, LOGE, FL("wma_post_ctrl_msg() failed"));
-		cdf_mem_free(pMaxTxParams);
+		qdf_mem_free(pMaxTxParams);
 	}
 	return retCode;
 }
@@ -4512,7 +4512,7 @@
 			goto skip_match;
 		if (sme_req->matchLen) {
 			if ((lim_mgmt_regn->matchLen == sme_req->matchLen) &&
-				(cdf_mem_compare(lim_mgmt_regn->matchData,
+				(!qdf_mem_cmp(lim_mgmt_regn->matchData,
 					sme_req->matchData,
 					lim_mgmt_regn->matchLen))) {
 					/* found match! */
@@ -4540,22 +4540,22 @@
 				&mac_ctx->lim.gLimMgmtFrameRegistratinQueue,
 				(qdf_list_node_t *)lim_mgmt_regn);
 		qdf_mutex_release(&mac_ctx->lim.lim_frame_register_lock);
-		cdf_mem_free(lim_mgmt_regn);
+		qdf_mem_free(lim_mgmt_regn);
 	}
 
 	if (sme_req->registerFrame) {
 		lim_mgmt_regn =
-			cdf_mem_malloc(sizeof(struct mgmt_frm_reg_info) +
+			qdf_mem_malloc(sizeof(struct mgmt_frm_reg_info) +
 					sme_req->matchLen);
 		if (lim_mgmt_regn != NULL) {
-			cdf_mem_set((void *)lim_mgmt_regn,
+			qdf_mem_set((void *)lim_mgmt_regn,
 				    sizeof(struct mgmt_frm_reg_info) +
 				    sme_req->matchLen, 0);
 			lim_mgmt_regn->frameType = sme_req->frameType;
 			lim_mgmt_regn->matchLen = sme_req->matchLen;
 			lim_mgmt_regn->sessionId = sme_req->sessionId;
 			if (sme_req->matchLen) {
-				cdf_mem_copy(lim_mgmt_regn->matchData,
+				qdf_mem_copy(lim_mgmt_regn->matchData,
 					     sme_req->matchData,
 					     sme_req->matchLen);
 			}
@@ -4578,7 +4578,7 @@
 	pMac->lim.gDeferMsgTypeForNOA = 0;
 	if (pMac->lim.gpDefdSmeMsgForNOA != NULL) {
 		/* __lim_process_sme_scan_req consumed the buffer. We can free it. */
-		cdf_mem_free(pMac->lim.gpDefdSmeMsgForNOA);
+		qdf_mem_free(pMac->lim.gpDefdSmeMsgForNOA);
 		pMac->lim.gpDefdSmeMsgForNOA = NULL;
 	}
 }
@@ -4938,7 +4938,7 @@
 		lim_process_ext_change_channel(pMac, pMsgBuf);
 		break;
 	default:
-		cdf_mem_free((void *)pMsg->bodyptr);
+		qdf_mem_free((void *)pMsg->bodyptr);
 		pMsg->bodyptr = NULL;
 		break;
 	} /* switch (msgType) */
@@ -5096,10 +5096,10 @@
 
 	session_entry->lim11hEnable = val;
 	session_entry->dot11mode = ch_change_req->dot11mode;
-	cdf_mem_copy(&session_entry->rateSet,
+	qdf_mem_copy(&session_entry->rateSet,
 			&ch_change_req->operational_rateset,
 			sizeof(session_entry->rateSet));
-	cdf_mem_copy(&session_entry->extRateSet,
+	qdf_mem_copy(&session_entry->extRateSet,
 			&ch_change_req->extended_rateset,
 			sizeof(session_entry->extRateSet));
 	lim_set_channel(mac_ctx, ch_change_req->targetChannel,
@@ -5139,14 +5139,14 @@
 	if (srcDataLen > 0 && pSrcData_buff != NULL) {
 		*pDstDataLen = srcDataLen;
 
-		*pDstData_buff = cdf_mem_malloc(*pDstDataLen);
+		*pDstData_buff = qdf_mem_malloc(*pDstDataLen);
 
 		if (NULL == *pDstData_buff) {
 			lim_log(pMac, LOGE,
 				FL("AllocateMemory failed for pDstData_buff"));
 			return;
 		}
-		cdf_mem_copy(*pDstData_buff, pSrcData_buff, *pDstDataLen);
+		qdf_mem_copy(*pDstData_buff, pSrcData_buff, *pDstDataLen);
 	} else {
 		*pDstData_buff = NULL;
 		*pDstDataLen = 0;
@@ -5190,9 +5190,9 @@
 	if (srcDataLen > *pDstDataLen) {
 		*pDstDataLen = srcDataLen;
 		/* free old buffer */
-		cdf_mem_free(*pDstData_buff);
+		qdf_mem_free(*pDstData_buff);
 		/* allocate a new */
-		*pDstData_buff = cdf_mem_malloc(*pDstDataLen);
+		*pDstData_buff = qdf_mem_malloc(*pDstDataLen);
 
 		if (NULL == *pDstData_buff) {
 			lim_log(pMac, LOGE, FL("Memory allocation failed."));
@@ -5204,7 +5204,7 @@
 	/* copy the content of buffer into dst buffer
 	 */
 	*pDstDataLen = srcDataLen;
-	cdf_mem_copy(*pDstData_buff, pSrcData_buff, *pDstDataLen);
+	qdf_mem_copy(*pDstData_buff, pSrcData_buff, *pDstDataLen);
 
 }
 
@@ -5283,7 +5283,7 @@
 		break;
 	}
 end:
-	cdf_mem_free(modify_add_ies->modifyIE.pIEBuffer);
+	qdf_mem_free(modify_add_ies->modifyIE.pIEBuffer);
 	modify_add_ies->modifyIE.pIEBuffer = NULL;
 }
 
@@ -5328,17 +5328,17 @@
 	if (0 == update_ie->ieBufferlength) {
 		switch (update_add_ies->updateType) {
 		case eUPDATE_IE_PROBE_RESP:
-			cdf_mem_free(addn_ie->probeRespData_buff);
+			qdf_mem_free(addn_ie->probeRespData_buff);
 			addn_ie->probeRespData_buff = NULL;
 			addn_ie->probeRespDataLen = 0;
 			break;
 		case eUPDATE_IE_ASSOC_RESP:
-			cdf_mem_free(addn_ie->assocRespData_buff);
+			qdf_mem_free(addn_ie->assocRespData_buff);
 			addn_ie->assocRespData_buff = NULL;
 			addn_ie->assocRespDataLen = 0;
 			break;
 		case eUPDATE_IE_PROBE_BCN:
-			cdf_mem_free(addn_ie->probeRespBCNData_buff);
+			qdf_mem_free(addn_ie->probeRespBCNData_buff);
 			addn_ie->probeRespBCNData_buff = NULL;
 			addn_ie->probeRespBCNDataLen = 0;
 
@@ -5360,20 +5360,20 @@
 			 */
 			new_length = update_ie->ieBufferlength +
 				addn_ie->probeRespDataLen;
-			new_ptr = cdf_mem_malloc(new_length);
+			new_ptr = qdf_mem_malloc(new_length);
 			if (NULL == new_ptr) {
 				lim_log(mac_ctx, LOGE, FL(
 						"Memory allocation failed."));
 				goto end;
 			}
 			/* append buffer to end of local buffers */
-			cdf_mem_copy(new_ptr, addn_ie->probeRespData_buff,
+			qdf_mem_copy(new_ptr, addn_ie->probeRespData_buff,
 					addn_ie->probeRespDataLen);
-			cdf_mem_copy(&new_ptr[addn_ie->probeRespDataLen],
+			qdf_mem_copy(&new_ptr[addn_ie->probeRespDataLen],
 				     update_ie->pAdditionIEBuffer,
 				     update_ie->ieBufferlength);
 			/* free old memory */
-			cdf_mem_free(addn_ie->probeRespData_buff);
+			qdf_mem_free(addn_ie->probeRespData_buff);
 			/* adjust length accordingly */
 			addn_ie->probeRespDataLen = new_length;
 			/* save refernece of local buffer in PE session */
@@ -5409,7 +5409,7 @@
 		break;
 	}
 end:
-	cdf_mem_free(update_ie->pAdditionIEBuffer);
+	qdf_mem_free(update_ie->pAdditionIEBuffer);
 	update_ie->pAdditionIEBuffer = NULL;
 }
 
diff --git a/core/mac/src/pe/lim/lim_process_tdls.c b/core/mac/src/pe/lim/lim_process_tdls.c
index c4653be..26abe4d 100644
--- a/core/mac/src/pe/lim/lim_process_tdls.c
+++ b/core/mac/src/pe/lim/lim_process_tdls.c
@@ -277,12 +277,12 @@
 	pMacHdr->fc.powerMgmt = 0;
 	pMacHdr->fc.wep = (psessionEntry->encryptType == eSIR_ED_NONE) ? 0 : 1;
 
-	cdf_mem_copy((uint8_t *) pMacHdr->addr1,
+	qdf_mem_copy((uint8_t *) pMacHdr->addr1,
 		     (uint8_t *) addr1, sizeof(tSirMacAddr));
-	cdf_mem_copy((uint8_t *) pMacHdr->addr2,
+	qdf_mem_copy((uint8_t *) pMacHdr->addr2,
 		     (uint8_t *) staMac, sizeof(tSirMacAddr));
 
-	cdf_mem_copy((uint8_t *) pMacHdr->addr3,
+	qdf_mem_copy((uint8_t *) pMacHdr->addr3,
 		     (uint8_t *) (addr3), sizeof(tSirMacAddr));
 
 	lim_log(pMac, LOG1,
@@ -305,7 +305,7 @@
 	/*
 	 * Now form RFC1042 header
 	 */
-	cdf_mem_copy((uint8_t *) (pFrame + header_offset),
+	qdf_mem_copy((uint8_t *) (pFrame + header_offset),
 		     (uint8_t *) eth_890d_header, sizeof(eth_890d_header));
 
 	header_offset += sizeof(eth_890d_header);
@@ -372,7 +372,7 @@
 	 * and then hand it off to 'dot11f_pack_probe_request' (for
 	 * serialization).  We start by zero-initializing the structure:
 	 */
-	cdf_mem_set((uint8_t *) &tdlsDisReq, sizeof(tDot11fTDLSDisReq), 0);
+	qdf_mem_set((uint8_t *) &tdlsDisReq, sizeof(tDot11fTDLSDisReq), 0);
 
 	/*
 	 * setup Fixed fields,
@@ -449,7 +449,7 @@
 	}
 
 	/* zero out the memory */
-	cdf_mem_set(pFrame, nBytes, 0);
+	qdf_mem_set(pFrame, nBytes, 0);
 
 	/*
 	 * IE formation, memory allocation is completed, Now form TDLS discovery
@@ -496,7 +496,7 @@
 
 		/* padding zero if more than 5 bytes are required */
 		if (padLen > MIN_VENDOR_SPECIFIC_IE_SIZE)
-			cdf_mem_set(pFrame + header_offset + nPayload +
+			qdf_mem_set(pFrame + header_offset + nPayload +
 				    MIN_VENDOR_SPECIFIC_IE_SIZE,
 				    padLen - MIN_VENDOR_SPECIFIC_IE_SIZE, 0);
 	}
@@ -626,7 +626,7 @@
 	 * and then hand it off to 'dot11f_pack_probe_request' (for
 	 * serialization).  We start by zero-initializing the structure:
 	 */
-	cdf_mem_set((uint8_t *) &tdlsDisRsp, sizeof(tDot11fTDLSDisRsp), 0);
+	qdf_mem_set((uint8_t *) &tdlsDisRsp, sizeof(tDot11fTDLSDisRsp), 0);
 
 	/*
 	 * setup Fixed fields,
@@ -729,7 +729,7 @@
 	}
 
 	/* zero out the memory */
-	cdf_mem_set(pFrame, nBytes, 0);
+	qdf_mem_set(pFrame, nBytes, 0);
 
 	/*
 	 * IE formation, memory allocation is completed, Now form TDLS discovery
@@ -772,7 +772,7 @@
 	if (0 != addIeLen) {
 		lim_log(pMac, LOG1,
 			FL("Copy Additional Ie Len = %d"), addIeLen);
-		cdf_mem_copy(pFrame + sizeof(tSirMacMgmtHdr) + nPayload, addIe,
+		qdf_mem_copy(pFrame + sizeof(tSirMacMgmtHdr) + nPayload, addIe,
 			     addIeLen);
 	}
 	lim_log(pMac, LOG1,
@@ -883,7 +883,7 @@
 	 */
 	smeSessionId = psessionEntry->smeSessionId;
 
-	cdf_mem_set((uint8_t *) &tdlsSetupReq, sizeof(tDot11fTDLSSetupReq), 0);
+	qdf_mem_set((uint8_t *) &tdlsSetupReq, sizeof(tDot11fTDLSSetupReq), 0);
 	tdlsSetupReq.Category.category = SIR_MAC_ACTION_TDLS;
 	tdlsSetupReq.Action.action = SIR_MAC_TDLS_SETUP_REQ;
 	tdlsSetupReq.DialogToken.token = dialog;
@@ -1051,7 +1051,7 @@
 	}
 
 	/* zero out the memory */
-	cdf_mem_set(pFrame, nBytes, 0);
+	qdf_mem_set(pFrame, nBytes, 0);
 
 	/*
 	 * IE formation, memory allocation is completed, Now form TDLS discovery
@@ -1098,7 +1098,7 @@
 	if (addIeLen != 0) {
 		lim_log(pMac, LOG1, FL("Copy Additional Ie Len = %d"),
 		       addIeLen);
-		cdf_mem_copy(pFrame + header_offset + nPayload, addIe,
+		qdf_mem_copy(pFrame + header_offset + nPayload, addIe,
 			     addIeLen);
 	}
 
@@ -1164,7 +1164,7 @@
 	 * and then hand it off to 'dot11f_pack_probe_request' (for
 	 * serialization).  We start by zero-initializing the structure:
 	 */
-	cdf_mem_set((uint8_t *) &teardown, sizeof(tDot11fTDLSTeardown), 0);
+	qdf_mem_set((uint8_t *) &teardown, sizeof(tDot11fTDLSTeardown), 0);
 	teardown.Category.category = SIR_MAC_ACTION_TDLS;
 	teardown.Action.action = SIR_MAC_TDLS_TEARDOWN;
 	teardown.Reason.code = reason;
@@ -1236,7 +1236,7 @@
 	}
 
 	/* zero out the memory */
-	cdf_mem_set(pFrame, nBytes, 0);
+	qdf_mem_set(pFrame, nBytes, 0);
 
 	/*
 	 * IE formation, memory allocation is completed, Now form TDLS discovery
@@ -1277,7 +1277,7 @@
 	if (addIeLen != 0) {
 		lim_log(pMac, LOGW,
 			FL("Copy Additional Ie Len = %d"), addIeLen);
-		cdf_mem_copy(pFrame + header_offset + nPayload, addIe,
+		qdf_mem_copy(pFrame + header_offset + nPayload, addIe,
 			     addIeLen);
 	}
 #ifndef NO_PAD_TDLS_MIN_8023_SIZE
@@ -1297,7 +1297,7 @@
 
 		/* padding zero if more than 5 bytes are required */
 		if (padLen > MIN_VENDOR_SPECIFIC_IE_SIZE)
-			cdf_mem_set(pFrame + header_offset + nPayload +
+			qdf_mem_set(pFrame + header_offset + nPayload +
 				    addIeLen + MIN_VENDOR_SPECIFIC_IE_SIZE,
 				    padLen - MIN_VENDOR_SPECIFIC_IE_SIZE, 0);
 	}
@@ -1370,7 +1370,7 @@
 	 * and then hand it off to 'dot11f_pack_probe_request' (for
 	 * serialization).  We start by zero-initializing the structure:
 	 */
-	cdf_mem_set((uint8_t *) &tdlsSetupRsp, sizeof(tDot11fTDLSSetupRsp), 0);
+	qdf_mem_set((uint8_t *) &tdlsSetupRsp, sizeof(tDot11fTDLSSetupRsp), 0);
 
 	/*
 	 * setup Fixed fields,
@@ -1533,7 +1533,7 @@
 	}
 
 	/* zero out the memory */
-	cdf_mem_set(pFrame, nBytes, 0);
+	qdf_mem_set(pFrame, nBytes, 0);
 
 	/*
 	 * IE formation, memory allocation is completed, Now form TDLS discovery
@@ -1578,7 +1578,7 @@
 	/* follow the order. This should be ok, but we should consider changing this */
 	/* if there is any IOT issue. */
 	if (addIeLen != 0) {
-		cdf_mem_copy(pFrame + header_offset + nPayload, addIe,
+		qdf_mem_copy(pFrame + header_offset + nPayload, addIe,
 			     addIeLen);
 	}
 
@@ -1640,7 +1640,7 @@
 	 */
 	smeSessionId = psessionEntry->smeSessionId;
 
-	cdf_mem_set((uint8_t *) &tdlsSetupCnf, sizeof(tDot11fTDLSSetupCnf), 0);
+	qdf_mem_set((uint8_t *) &tdlsSetupCnf, sizeof(tDot11fTDLSSetupCnf), 0);
 
 	/*
 	 * setup Fixed fields,
@@ -1740,7 +1740,7 @@
 	}
 
 	/* zero out the memory */
-	cdf_mem_set(pFrame, nBytes, 0);
+	qdf_mem_set(pFrame, nBytes, 0);
 
 	/*
 	 * IE formation, memory allocation is completed, Now form TDLS discovery
@@ -1776,7 +1776,7 @@
 	/* follow the order. This should be ok, but we should consider changing this */
 	/* if there is any IOT issue. */
 	if (addIeLen != 0) {
-		cdf_mem_copy(pFrame + header_offset + nPayload, addIe,
+		qdf_mem_copy(pFrame + header_offset + nPayload, addIe,
 			     addIeLen);
 	}
 #ifndef NO_PAD_TDLS_MIN_8023_SIZE
@@ -1796,7 +1796,7 @@
 
 		/* padding zero if more than 5 bytes are required */
 		if (padLen > MIN_VENDOR_SPECIFIC_IE_SIZE)
-			cdf_mem_set(pFrame + header_offset + nPayload +
+			qdf_mem_set(pFrame + header_offset + nPayload +
 				    addIeLen + MIN_VENDOR_SPECIFIC_IE_SIZE,
 				    padLen - MIN_VENDOR_SPECIFIC_IE_SIZE, 0);
 	}
@@ -1913,7 +1913,7 @@
 
 	lim_log(pMac, LOG1, FL("AMPDU Param: %x"), nCfgValue);
 
-	cdf_mem_copy(pDot11f->supportedMCSSet, pTdlsAddStaReq->htCap.suppMcsSet,
+	qdf_mem_copy(pDot11f->supportedMCSSet, pTdlsAddStaReq->htCap.suppMcsSet,
 		     SIZE_OF_SUPPORTED_MCS_SET);
 
 	nCfgValue = pTdlsAddStaReq->htCap.extendedHtCapInfo;
@@ -2157,7 +2157,7 @@
 	temp_rate_set.numRates = supp_rates_len;
 
 	rates = &stads->supportedRates;
-	cdf_mem_set((uint8_t *) rates, sizeof(tSirSupportedRates), 0);
+	qdf_mem_set((uint8_t *) rates, sizeof(tSirSupportedRates), 0);
 
 	for (i = 0; i < temp_rate_set2.numRates; i++) {
 		for (j = 0; j < temp_rate_set.numRates; j++) {
@@ -2480,7 +2480,7 @@
 	tSirTdlsAddStaRsp *addStaRsp = NULL;
 	mmhMsg.type = eWNI_SME_TDLS_ADD_STA_RSP;
 
-	addStaRsp = cdf_mem_malloc(sizeof(tSirTdlsAddStaRsp));
+	addStaRsp = qdf_mem_malloc(sizeof(tSirTdlsAddStaRsp));
 	if (NULL == addStaRsp) {
 		lim_log(pMac, LOGE, FL("Failed to allocate memory"));
 		return QDF_STATUS_E_NOMEM;
@@ -2494,7 +2494,7 @@
 		addStaRsp->bcastSig = pStaDs->ucBcastSig;
 	}
 	if (peerMac) {
-		cdf_mem_copy(addStaRsp->peermac.bytes,
+		qdf_mem_copy(addStaRsp->peermac.bytes,
 			     (uint8_t *) peerMac, QDF_MAC_ADDR_SIZE);
 	}
 	if (updateSta)
@@ -2554,7 +2554,7 @@
 					       pAddStaParams->staMac,
 					       pAddStaParams->updateSta, pStaDs,
 					       status);
-	cdf_mem_free(pAddStaParams);
+	qdf_mem_free(pAddStaParams);
 	return status;
 }
 
@@ -2677,13 +2677,13 @@
 				       (respStaAddr = linkIden->RespStaAddr))
 	: ((respStaAddr = linkIden->InitStaAddr),
 	   (initStaAddr = linkIden->RespStaAddr));
-	cdf_mem_copy((uint8_t *) linkIden->bssid,
+	qdf_mem_copy((uint8_t *) linkIden->bssid,
 		     (uint8_t *) psessionEntry->bssId, QDF_MAC_ADDR_SIZE);
 
-	cdf_mem_copy((uint8_t *) initStaAddr,
+	qdf_mem_copy((uint8_t *) initStaAddr,
 		     psessionEntry->selfMacAddr, QDF_MAC_ADDR_SIZE);
 
-	cdf_mem_copy((uint8_t *) respStaAddr, (uint8_t *) peer_mac.bytes,
+	qdf_mem_copy((uint8_t *) respStaAddr, (uint8_t *) peer_mac.bytes,
 		     QDF_MAC_ADDR_SIZE);
 
 	linkIden->present = 1;
@@ -2855,7 +2855,7 @@
 	tSirTdlsLinkEstablishReqRsp *pTdlsLinkEstablishReqRsp = NULL;
 
 	pTdlsLinkEstablishReqRsp =
-		cdf_mem_malloc(sizeof(tSirTdlsLinkEstablishReqRsp));
+		qdf_mem_malloc(sizeof(tSirTdlsLinkEstablishReqRsp));
 	if (NULL == pTdlsLinkEstablishReqRsp) {
 		lim_log(pMac, LOGE, FL("Failed to allocate memory"));
 		return;
@@ -2885,7 +2885,7 @@
 	tSirTdlsDelStaRsp *pDelSta = NULL;
 	mmhMsg.type = eWNI_SME_TDLS_DEL_STA_RSP;
 
-	pDelSta = cdf_mem_malloc(sizeof(tSirTdlsDelStaRsp));
+	pDelSta = qdf_mem_malloc(sizeof(tSirTdlsDelStaRsp));
 	if (NULL == pDelSta) {
 		lim_log(pMac, LOGE, FL("Failed to allocate memory"));
 		return QDF_STATUS_E_NOMEM;
@@ -3145,14 +3145,14 @@
 		lim_log(mac_ctx, LOGE, FL("stads is NULL"));
 		goto lim_tdls_link_establish_error;
 	}
-	tdls_req_params = cdf_mem_malloc(sizeof(tTdlsLinkEstablishParams));
+	tdls_req_params = qdf_mem_malloc(sizeof(tTdlsLinkEstablishParams));
 	if (NULL == tdls_req_params) {
 		lim_log(mac_ctx, LOGE,
 			FL("Unable to allocate memory TDLS Link Establish Request"));
 		return eSIR_MEM_ALLOC_FAILED;
 	}
 
-	cdf_mem_set((uint8_t *) tdls_req_params,
+	qdf_mem_set((uint8_t *) tdls_req_params,
 		    sizeof(tTdlsLinkEstablishParams), 0);
 
 	tdls_req_params->staIdx = stads->staIndex;
@@ -3195,7 +3195,7 @@
 		&tdls_req_params->validChannelsLen);
 
 send_tdls_establish_request:
-	cdf_mem_copy(tdls_req_params->validOperClasses,
+	qdf_mem_copy(tdls_req_params->validOperClasses,
 		     tdls_req->supportedOperClasses,
 		     tdls_req->supportedOperClassesLen);
 	tdls_req_params->validOperClassesLen =
diff --git a/core/mac/src/pe/lim/lim_prop_exts_utils.c b/core/mac/src/pe/lim/lim_prop_exts_utils.c
index ac882ae..7f96633 100644
--- a/core/mac/src/pe/lim/lim_prop_exts_utils.c
+++ b/core/mac/src/pe/lim/lim_prop_exts_utils.c
@@ -87,13 +87,13 @@
 	tSirRetStatus cfg_set_status = eSIR_FAILURE;
 	tSirRetStatus cfg_get_status = eSIR_FAILURE;
 
-	beacon_struct = cdf_mem_malloc(sizeof(tSirProbeRespBeacon));
+	beacon_struct = qdf_mem_malloc(sizeof(tSirProbeRespBeacon));
 	if (NULL == beacon_struct) {
 		lim_log(mac_ctx, LOGE, FL("Unable to allocate memory"));
 		return;
 	}
 
-	cdf_mem_set((uint8_t *) beacon_struct, sizeof(tSirProbeRespBeacon), 0);
+	qdf_mem_set((uint8_t *) beacon_struct, sizeof(tSirProbeRespBeacon), 0);
 	*qos_cap = 0;
 	*prop_cap = 0;
 	*uapsd = 0;
@@ -239,7 +239,7 @@
 		if (beacon_struct->countryInfoPresent)
 			session->country_info_present = true;
 	}
-	cdf_mem_free(beacon_struct);
+	qdf_mem_free(beacon_struct);
 	return;
 } /****** end lim_extract_ap_capability() ******/
 
diff --git a/core/mac/src/pe/lim/lim_scan_result_utils.c b/core/mac/src/pe/lim/lim_scan_result_utils.c
index 2bc0f20..e8a6813 100644
--- a/core/mac/src/pe/lim/lim_scan_result_utils.c
+++ b/core/mac/src/pe/lim/lim_scan_result_utils.c
@@ -123,7 +123,7 @@
 					- sizeof(pBssDescr->length) + ieLen);
 
 	/* Copy BSS Id */
-	cdf_mem_copy((uint8_t *) &pBssDescr->bssId,
+	qdf_mem_copy((uint8_t *) &pBssDescr->bssId,
 		     (uint8_t *) pHdr->bssId, sizeof(tSirMacAddr));
 
 	/* Copy Timestamp, Beacon Interval and Capability Info */
@@ -227,7 +227,7 @@
 	}
 #endif
 	/* Copy IE fields */
-	cdf_mem_copy((uint8_t *) &pBssDescr->ieFields,
+	qdf_mem_copy((uint8_t *) &pBssDescr->ieFields,
 		     pBody + SIR_MAC_B_PR_SSID_OFFSET, ieLen);
 
 	/*set channel number in beacon in case it is not present */
@@ -269,7 +269,7 @@
 	uint8_t i = 0;
 
 	for (i = 0; i < pMac->lim.gpLimMlmScanReq->numSsid; i++) {
-		if (true == cdf_mem_compare((uint8_t *) ssId,
+		if (true != qdf_mem_cmp((uint8_t *) ssId,
 					    (uint8_t *) &pMac->lim.
 					    gpLimMlmScanReq->ssId[i],
 					    (uint8_t) (pMac->lim.
@@ -317,7 +317,7 @@
 	hdr = WMA_GET_RX_MPDUHEADER3A((uint8_t *) rx_packet_info);
 
 	/*  Check For Null BSSID and Skip in case of P2P */
-	if (cdf_mem_compare(bssid_zero, &hdr->addr3, 6))
+	if (!qdf_mem_cmp(bssid_zero, &hdr->addr3, 6))
 		return;
 
 	/*
@@ -388,12 +388,12 @@
 
 	/* IEs will be overlap ieFields field. Adjust the length accordingly */
 	frame_len = sizeof(*bssdescr) + ie_len - sizeof(bssdescr->ieFields[1]);
-	bssdescr = (tSirBssDescription *) cdf_mem_malloc(frame_len);
+	bssdescr = (tSirBssDescription *) qdf_mem_malloc(frame_len);
 
 	if (NULL == bssdescr) {
 		/* Log error */
 		lim_log(mac_ctx, LOGE,
-			FL("cdf_mem_malloc(length=%d) failed"), frame_len);
+			FL("qdf_mem_malloc(length=%d) failed"), frame_len);
 		return;
 	}
 	/* In scan state, store scan result. */
@@ -422,7 +422,7 @@
 		status = QDF_STATUS_E_INVAL;
 	}
 last:
-	cdf_mem_free(bssdescr);
+	qdf_mem_free(bssdescr);
 	return;
 }
 
diff --git a/core/mac/src/pe/lim/lim_security_utils.c b/core/mac/src/pe/lim/lim_security_utils.c
index 1da7814..2283bf7 100644
--- a/core/mac/src/pe/lim/lim_security_utils.c
+++ b/core/mac/src/pe/lim/lim_security_utils.c
@@ -238,7 +238,7 @@
 	struct tLimPreAuthNode *pTempNode = pMac->lim.pLimPreAuthList;
 
 	while (pTempNode != NULL) {
-		if (cdf_mem_compare((uint8_t *) macAddr,
+		if (!qdf_mem_cmp((uint8_t *) macAddr,
 				    (uint8_t *) &pTempNode->peerMacAddr,
 				    sizeof(tSirMacAddr)))
 			break;
@@ -388,7 +388,7 @@
 	if (pTempNode == NULL)
 		return;
 
-	if (cdf_mem_compare((uint8_t *) macAddr,
+	if (!qdf_mem_cmp((uint8_t *) macAddr,
 			    (uint8_t *) &pTempNode->peerMacAddr,
 			    sizeof(tSirMacAddr))) {
 		/* First node to be deleted */
@@ -414,7 +414,7 @@
 	pTempNode = pTempNode->next;
 
 	while (pTempNode != NULL) {
-		if (cdf_mem_compare((uint8_t *) macAddr,
+		if (!qdf_mem_cmp((uint8_t *) macAddr,
 				    (uint8_t *) &pTempNode->peerMacAddr,
 				    sizeof(tSirMacAddr))) {
 			/* Found node to be deleted */
@@ -481,7 +481,7 @@
 			      resultCode, protStatusCode);
 #endif
 
-	cdf_mem_copy((uint8_t *) &mlmAuthCnf.peerMacAddr,
+	qdf_mem_copy((uint8_t *) &mlmAuthCnf.peerMacAddr,
 		     (uint8_t *) &pMac->lim.gpLimMlmAuthReq->peerMacAddr,
 		     sizeof(tSirMacAddr));
 	mlmAuthCnf.authType = pMac->lim.gpLimMlmAuthReq->authType;
@@ -493,7 +493,7 @@
 
 	/* / Free up buffer allocated */
 	/* / for pMac->lim.gLimMlmAuthReq */
-	cdf_mem_free(pMac->lim.gpLimMlmAuthReq);
+	qdf_mem_free(pMac->lim.gpLimMlmAuthReq);
 	pMac->lim.gpLimMlmAuthReq = NULL;
 
 	sessionEntry->limMlmState = sessionEntry->limPrevMlmState;
@@ -548,12 +548,12 @@
 	keyLength += 3;
 
 	/* Bytes 3-7 of seed is key */
-	cdf_mem_copy((uint8_t *) &seed[3], pKey, keyLength - 3);
+	qdf_mem_copy((uint8_t *) &seed[3], pKey, keyLength - 3);
 
 	/* Compute CRC-32 and place them in last 4 bytes of plain text */
 	lim_compute_crc32(icv, pPlainText, sizeof(tSirMacAuthFrameBody));
 
-	cdf_mem_copy(pPlainText + sizeof(tSirMacAuthFrameBody),
+	qdf_mem_copy(pPlainText + sizeof(tSirMacAuthFrameBody),
 		     icv, SIR_MAC_WEP_ICV_LENGTH);
 
 	/* Run RC4 on plain text with the seed */
@@ -732,10 +732,10 @@
 	keyLength += 3;
 
 	/* Bytes 0-2 of seed is received IV */
-	cdf_mem_copy((uint8_t *) seed, pEncrBody, SIR_MAC_WEP_IV_LENGTH - 1);
+	qdf_mem_copy((uint8_t *) seed, pEncrBody, SIR_MAC_WEP_IV_LENGTH - 1);
 
 	/* Bytes 3-7 of seed is key */
-	cdf_mem_copy((uint8_t *) &seed[3], pKey, keyLength - 3);
+	qdf_mem_copy((uint8_t *) &seed[3], pKey, keyLength - 3);
 
 	/* Run RC4 on encrypted text with the seed */
 	lim_rc4(pPlainBody,
@@ -778,7 +778,7 @@
 			 &pMlmSetKeysReq->peer_macaddr);
 
 	/* Free up buffer allocated for mlmSetKeysReq */
-	cdf_mem_free(pMlmSetKeysReq);
+	qdf_mem_free(pMlmSetKeysReq);
 	pMac->lim.gpLimMlmSetKeysReq = NULL;
 
 	lim_post_sme_message(pMac,
@@ -827,7 +827,7 @@
 	}
 	/* Package WMA_SET_BSSKEY_REQ message parameters */
 
-	pSetBssKeyParams = cdf_mem_malloc(sizeof(tSetBssKeyParams));
+	pSetBssKeyParams = qdf_mem_malloc(sizeof(tSetBssKeyParams));
 	if (NULL == pSetBssKeyParams) {
 		lim_log(pMac, LOGE,
 			FL("Unable to allocate memory during SET_BSSKEY"));
@@ -836,7 +836,7 @@
 		mlmSetKeysCnf.resultCode = eSIR_SME_RESOURCES_UNAVAILABLE;
 		goto end;
 	} else
-		cdf_mem_set((void *)pSetBssKeyParams,
+		qdf_mem_set((void *)pSetBssKeyParams,
 			    sizeof(tSetBssKeyParams), 0);
 
 	/* Update the WMA_SET_BSSKEY_REQ parameters */
@@ -861,14 +861,14 @@
 		/* IF the key id is non-zero and encryption type is WEP, Send all the 4
 		 * keys to HAL with filling the key at right index in pSetBssKeyParams->key. */
 		pSetBssKeyParams->numKeys = SIR_MAC_MAX_NUM_OF_DEFAULT_KEYS;
-		cdf_mem_copy((uint8_t *) &pSetBssKeyParams->
+		qdf_mem_copy((uint8_t *) &pSetBssKeyParams->
 			     key[pMlmSetKeysReq->key[0].keyId],
 			     (uint8_t *) &pMlmSetKeysReq->key[0],
 			     sizeof(pMlmSetKeysReq->key[0]));
 
 	} else {
 		pSetBssKeyParams->numKeys = pMlmSetKeysReq->numKeys;
-		cdf_mem_copy((uint8_t *) &pSetBssKeyParams->key,
+		qdf_mem_copy((uint8_t *) &pSetBssKeyParams->key,
 			     (uint8_t *) &pMlmSetKeysReq->key,
 			     sizeof(tSirKeys) * pMlmSetKeysReq->numKeys);
 	}
@@ -931,13 +931,13 @@
 	uint32_t val = 0;
 
 	/* Package WMA_SET_STAKEY_REQ message parameters */
-	pSetStaKeyParams = cdf_mem_malloc(sizeof(tSetStaKeyParams));
+	pSetStaKeyParams = qdf_mem_malloc(sizeof(tSetStaKeyParams));
 	if (NULL == pSetStaKeyParams) {
 		lim_log(pMac, LOGP,
 			FL("Unable to allocate memory during SET_BSSKEY"));
 		return;
 	} else
-		cdf_mem_set((void *)pSetStaKeyParams, sizeof(tSetStaKeyParams),
+		qdf_mem_set((void *)pSetStaKeyParams, sizeof(tSetStaKeyParams),
 			    0);
 
 	/* Update the WMA_SET_STAKEY_REQ parameters */
@@ -1002,7 +1002,7 @@
 			uint32_t i;
 
 			for (i = 0; i < SIR_MAC_MAX_NUM_OF_DEFAULT_KEYS; i++) {
-				cdf_mem_copy((uint8_t *) &pSetStaKeyParams->
+				qdf_mem_copy((uint8_t *) &pSetStaKeyParams->
 					     key[i],
 					     (uint8_t *) &pMlmSetKeysReq->
 					     key[i], sizeof(tSirKeys));
@@ -1018,7 +1018,7 @@
 			/*This case the keys are coming from upper layer so need to fill the
 			 * key at the default wep key index and send to the HAL */
 			if (defWEPIdx < SIR_MAC_MAX_NUM_OF_DEFAULT_KEYS) {
-				cdf_mem_copy((uint8_t *) &pSetStaKeyParams->
+				qdf_mem_copy((uint8_t *) &pSetStaKeyParams->
 					     key[defWEPIdx],
 					     (uint8_t *) &pMlmSetKeysReq->
 					     key[0],
@@ -1028,7 +1028,7 @@
 			} else {
 				lim_log(pMac, LOGE, FL("Wrong Key Index %d"),
 					defWEPIdx);
-				cdf_mem_free(pSetStaKeyParams);
+				qdf_mem_free(pSetStaKeyParams);
 				return;
 			}
 		}
@@ -1039,7 +1039,7 @@
 	case eSIR_ED_WPI:
 #endif
 		{
-			cdf_mem_copy((uint8_t *) &pSetStaKeyParams->key,
+			qdf_mem_copy((uint8_t *) &pSetStaKeyParams->key,
 				     (uint8_t *) &pMlmSetKeysReq->key[0],
 				     sizeof(tSirKeys));
 		}
diff --git a/core/mac/src/pe/lim/lim_send_management_frames.c b/core/mac/src/pe/lim/lim_send_management_frames.c
index bc12d9a..5222050 100644
--- a/core/mac/src/pe/lim/lim_send_management_frames.c
+++ b/core/mac/src/pe/lim/lim_send_management_frames.c
@@ -163,14 +163,14 @@
 	mac_hdr->fc.subType = sub_type;
 
 	/* Prepare Address 1 */
-	cdf_mem_copy((uint8_t *) mac_hdr->da,
+	qdf_mem_copy((uint8_t *) mac_hdr->da,
 		     (uint8_t *) peer_addr, sizeof(tSirMacAddr));
 
 	/* Prepare Address 2 */
 	sir_copy_mac_addr(mac_hdr->sa, self_mac_addr);
 
 	/* Prepare Address 3 */
-	cdf_mem_copy((uint8_t *) mac_hdr->bssId,
+	qdf_mem_copy((uint8_t *) mac_hdr->bssId,
 		     (uint8_t *) peer_addr, sizeof(tSirMacAddr));
 
 	/* Prepare sequence number */
@@ -255,7 +255,7 @@
 	/* The scheme here is to fill out a 'tDot11fProbeRequest' structure */
 	/* and then hand it off to 'dot11f_pack_probe_request' (for */
 	/* serialization).  We start by zero-initializing the structure: */
-	cdf_mem_set((uint8_t *) &pr, sizeof(pr), 0);
+	qdf_mem_set((uint8_t *) &pr, sizeof(pr), 0);
 
 	/* & delegating to assorted helpers: */
 	populate_dot11f_ssid(mac_ctx, ssid, &pr.SSID);
@@ -380,7 +380,7 @@
 		return eSIR_MEM_ALLOC_FAILED;
 	}
 	/* Paranoia: */
-	cdf_mem_set(frame, bytes, 0);
+	qdf_mem_set(frame, bytes, 0);
 
 	/* Next, we fill out the buffer descriptor: */
 	lim_populate_mac_header(mac_ctx, frame, SIR_MAC_MGMT_FRAME,
@@ -400,7 +400,7 @@
 	}
 	/* Append any AddIE if present. */
 	if (addn_ielen) {
-		cdf_mem_copy(frame + sizeof(tSirMacMgmtHdr) + payload,
+		qdf_mem_copy(frame + sizeof(tSirMacMgmtHdr) + payload,
 			     additional_ie, addn_ielen);
 		payload += addn_ielen;
 	}
@@ -456,7 +456,7 @@
 			return eSIR_FAILURE;
 		}
 
-		tempbuf = cdf_mem_malloc(left);
+		tempbuf = qdf_mem_malloc(left);
 		if (NULL == tempbuf) {
 			PELOGE(lim_log(pMac, LOGE,
 				       FL
@@ -474,23 +474,23 @@
 					FL
 						("****Invalid IEs eid = %d elem_len=%d left=%d*****"),
 					elem_id, elem_len, left);
-				cdf_mem_free(tempbuf);
+				qdf_mem_free(tempbuf);
 				return eSIR_FAILURE;
 			}
 			if (!((SIR_MAC_EID_VENDOR == elem_id) &&
 			      (memcmp
 				       (&ptr[2], SIR_MAC_P2P_OUI,
 				       SIR_MAC_P2P_OUI_SIZE) == 0))) {
-				cdf_mem_copy(tempbuf + tempLen, &ptr[0],
+				qdf_mem_copy(tempbuf + tempLen, &ptr[0],
 					     elem_len + 2);
 				tempLen += (elem_len + 2);
 			}
 			left -= elem_len;
 			ptr += (elem_len + 2);
 		}
-		cdf_mem_copy(addIE, tempbuf, tempLen);
+		qdf_mem_copy(addIE, tempbuf, tempLen);
 		*addnIELen = tempLen;
-		cdf_mem_free(tempbuf);
+		qdf_mem_free(tempbuf);
 	}
 	return eSIR_SUCCESS;
 }
@@ -561,20 +561,20 @@
 		return;
 	}
 	sme_sessionid = pe_session->smeSessionId;
-	frm = cdf_mem_malloc(sizeof(tDot11fProbeResponse));
+	frm = qdf_mem_malloc(sizeof(tDot11fProbeResponse));
 	if (NULL == frm) {
 		lim_log(mac_ctx, LOGE,
 			FL("Unable to allocate memory"));
 		return;
 	}
 
-	cdf_mem_zero(&extracted_ext_cap, sizeof(extracted_ext_cap));
+	qdf_mem_zero(&extracted_ext_cap, sizeof(extracted_ext_cap));
 
 	/*
 	 * Fill out 'frm', after which we'll just hand the struct off to
 	 * 'dot11f_pack_probe_response'.
 	 */
-	cdf_mem_set((uint8_t *) frm, sizeof(tDot11fProbeResponse), 0);
+	qdf_mem_set((uint8_t *) frm, sizeof(tDot11fProbeResponse), 0);
 
 	/*
 	 * Timestamp to be updated by TFP, below.
@@ -720,7 +720,7 @@
 
 	if (addn_ie_present) {
 
-		add_ie = cdf_mem_malloc(
+		add_ie = qdf_mem_malloc(
 				pe_session->addIeParams.probeRespDataLen);
 		if (NULL == add_ie) {
 			lim_log(mac_ctx, LOGE,
@@ -728,7 +728,7 @@
 			goto err_ret;
 		}
 
-		cdf_mem_copy(add_ie,
+		qdf_mem_copy(add_ie,
 			     pe_session->addIeParams.probeRespData_buff,
 			     pe_session->addIeParams.probeRespDataLen);
 		addn_ie_len = pe_session->addIeParams.probeRespDataLen;
@@ -775,7 +775,7 @@
 		goto err_ret;
 	}
 	/* Paranoia: */
-	cdf_mem_set(frame, bytes, 0);
+	qdf_mem_set(frame, bytes, 0);
 
 	/* Next, we fill out the buffer descriptor: */
 	lim_populate_mac_header(mac_ctx, frame, SIR_MAC_MGMT_FRAME,
@@ -812,13 +812,13 @@
 	mac_ctx->sys.probeRespond++;
 
 	if (mac_ctx->lim.gpLimRemainOnChanReq)
-		cdf_mem_copy(frame + sizeof(tSirMacMgmtHdr) + payload,
+		qdf_mem_copy(frame + sizeof(tSirMacMgmtHdr) + payload,
 			     mac_ctx->lim.gpLimRemainOnChanReq->probeRspIe,
 			     (mac_ctx->lim.gpLimRemainOnChanReq->length -
 			      sizeof(tSirRemainOnChnReq)));
 
 	if (addn_ie_present)
-		cdf_mem_copy(frame + sizeof(tSirMacMgmtHdr) + payload,
+		qdf_mem_copy(frame + sizeof(tSirMacMgmtHdr) + payload,
 			     &add_ie[0], addn_ie_len);
 
 	if (noalen != 0) {
@@ -829,7 +829,7 @@
 				total_noalen);
 			goto err_ret;
 		} else {
-			cdf_mem_copy(&frame[bytes - (total_noalen)],
+			qdf_mem_copy(&frame[bytes - (total_noalen)],
 				     &noa_ie[0], total_noalen);
 		}
 	}
@@ -853,16 +853,16 @@
 		lim_log(mac_ctx, LOGE, FL("Could not send Probe Response."));
 
 	if (add_ie != NULL)
-		cdf_mem_free(add_ie);
+		qdf_mem_free(add_ie);
 
-	cdf_mem_free(frm);
+	qdf_mem_free(frm);
 	return;
 
 err_ret:
 	if (add_ie != NULL)
-		cdf_mem_free(add_ie);
+		qdf_mem_free(add_ie);
 	if (frm != NULL)
-		cdf_mem_free(frm);
+		qdf_mem_free(frm);
 	if (packet != NULL)
 		cds_packet_free((void *)packet);
 	return;
@@ -895,7 +895,7 @@
 	smeSessionId = psessionEntry->smeSessionId;
 
 	if (!pAddTS->wmeTspecPresent) {
-		cdf_mem_set((uint8_t *) &AddTSReq, sizeof(AddTSReq), 0);
+		qdf_mem_set((uint8_t *) &AddTSReq, sizeof(AddTSReq), 0);
 
 		AddTSReq.Action.action = SIR_MAC_QOS_ADD_TS_REQ;
 		AddTSReq.DialogToken.token = pAddTS->dialogToken;
@@ -952,7 +952,7 @@
 				   " (0x%08x)."), nStatus);
 		}
 	} else {
-		cdf_mem_set((uint8_t *) &WMMAddTSReq, sizeof(WMMAddTSReq), 0);
+		qdf_mem_set((uint8_t *) &WMMAddTSReq, sizeof(WMMAddTSReq), 0);
 
 		WMMAddTSReq.Action.action = SIR_MAC_QOS_ADD_TS_REQ;
 		WMMAddTSReq.DialogToken.token = pAddTS->dialogToken;
@@ -1005,7 +1005,7 @@
 		return;
 	}
 	/* Paranoia: */
-	cdf_mem_set(pFrame, nBytes, 0);
+	qdf_mem_set(pFrame, nBytes, 0);
 
 	/* Next, we fill out the buffer descriptor: */
 	lim_populate_mac_header(pMac, pFrame, SIR_MAC_MGMT_FRAME,
@@ -1136,7 +1136,7 @@
 
 	sme_session = pe_session->smeSessionId;
 
-	cdf_mem_set((uint8_t *) &frm, sizeof(frm), 0);
+	qdf_mem_set((uint8_t *) &frm, sizeof(frm), 0);
 
 	limGetQosMode(pe_session, &qos_mode);
 	limGetWmeMode(pe_session, &wme_mode);
@@ -1257,7 +1257,7 @@
 #endif
 	}
 
-	cdf_mem_set((uint8_t *) &beacon_params, sizeof(beacon_params), 0);
+	qdf_mem_set((uint8_t *) &beacon_params, sizeof(beacon_params), 0);
 
 	if (LIM_IS_AP_ROLE(pe_session) &&
 		(pe_session->gLimProtectionControl !=
@@ -1305,11 +1305,11 @@
 		/* Nonzero length indicates Assoc rsp IE available */
 		if (addn_ie_len <= WNI_CFG_ASSOC_RSP_ADDNIE_DATA_LEN
 		    && (bytes + addn_ie_len) <= SIR_MAX_PACKET_SIZE) {
-			cdf_mem_copy(add_ie,
+			qdf_mem_copy(add_ie,
 				pe_session->addIeParams.assocRespData_buff,
 				pe_session->addIeParams.assocRespDataLen);
 
-			cdf_mem_set((uint8_t *) &extracted_ext_cap,
+			qdf_mem_set((uint8_t *) &extracted_ext_cap,
 				    sizeof(extracted_ext_cap), 0);
 
 			stripoff_len = addn_ie_len;
@@ -1337,7 +1337,7 @@
 		return;
 	}
 	/* Paranoia: */
-	cdf_mem_set(frame, bytes, 0);
+	qdf_mem_set(frame, bytes, 0);
 
 	/* Next, we fill out the buffer descriptor: */
 	lim_populate_mac_header(mac_ctx, frame, SIR_MAC_MGMT_FRAME,
@@ -1379,7 +1379,7 @@
 	lim_print_mac_addr(mac_ctx, mac_hdr->da, LOG1);
 
 	if (addn_ie_len && addn_ie_len <= WNI_CFG_ASSOC_RSP_ADDNIE_DATA_LEN)
-		cdf_mem_copy(frame + sizeof(tSirMacMgmtHdr) + payload,
+		qdf_mem_copy(frame + sizeof(tSirMacMgmtHdr) + payload,
 			     &add_ie[0], addn_ie_len);
 
 	if ((SIR_BAND_5_GHZ ==
@@ -1438,7 +1438,7 @@
 	smeSessionId = psessionEntry->smeSessionId;
 
 	if (!wmmTspecPresent) {
-		cdf_mem_set((uint8_t *) &DelTS, sizeof(DelTS), 0);
+		qdf_mem_set((uint8_t *) &DelTS, sizeof(DelTS), 0);
 
 		DelTS.Category.category = SIR_MAC_ACTION_QOS_MGMT;
 		DelTS.Action.action = SIR_MAC_QOS_DEL_TS_REQ;
@@ -1458,7 +1458,7 @@
 				   " (0x%08x)."), nStatus);
 		}
 	} else {
-		cdf_mem_set((uint8_t *) &WMMDelTS, sizeof(WMMDelTS), 0);
+		qdf_mem_set((uint8_t *) &WMMDelTS, sizeof(WMMDelTS), 0);
 
 		WMMDelTS.Category.category = SIR_MAC_ACTION_WME;
 		WMMDelTS.Action.action = SIR_MAC_QOS_DEL_TS_REQ;
@@ -1492,7 +1492,7 @@
 		return;
 	}
 	/* Paranoia: */
-	cdf_mem_set(pFrame, nBytes, 0);
+	qdf_mem_set(pFrame, nBytes, 0);
 
 	/* Next, we fill out the buffer descriptor: */
 	lim_populate_mac_header(pMac, pFrame, SIR_MAC_MGMT_FRAME,
@@ -1621,16 +1621,16 @@
 	add_ie_len = pe_session->pLimJoinReq->addIEAssoc.length;
 	add_ie = pe_session->pLimJoinReq->addIEAssoc.addIEdata;
 
-	frm = cdf_mem_malloc(sizeof(tDot11fAssocRequest));
+	frm = qdf_mem_malloc(sizeof(tDot11fAssocRequest));
 	if (NULL == frm) {
 		lim_log(mac_ctx, LOGE, FL("Unable to allocate memory"));
 		return;
 	}
 
-	cdf_mem_set((uint8_t *) frm, sizeof(tDot11fAssocRequest), 0);
+	qdf_mem_set((uint8_t *) frm, sizeof(tDot11fAssocRequest), 0);
 
 	if (add_ie_len) {
-		cdf_mem_set((uint8_t *) &extr_ext_cap, sizeof(tDot11fIEExtCap),
+		qdf_mem_set((uint8_t *) &extr_ext_cap, sizeof(tDot11fIEExtCap),
 			    0);
 		sir_status = lim_strip_extcap_update_struct(mac_ctx,
 					add_ie, &add_ie_len, &extr_ext_cap);
@@ -1881,11 +1881,11 @@
 		lim_post_sme_message(mac_ctx, LIM_MLM_ASSOC_CNF,
 			(uint32_t *) &assoc_cnf);
 
-		cdf_mem_free(frm);
+		qdf_mem_free(frm);
 		return;
 	}
 	/* Paranoia: */
-	cdf_mem_set(frame, bytes, 0);
+	qdf_mem_set(frame, bytes, 0);
 
 	/* Next, we fill out the buffer descriptor: */
 	lim_populate_mac_header(mac_ctx, frame, SIR_MAC_MGMT_FRAME,
@@ -1901,7 +1901,7 @@
 		lim_log(mac_ctx, LOGE,
 			FL("Assoc request pack failure (0x%08x)"), status);
 		cds_packet_free((void *)packet);
-		cdf_mem_free(frm);
+		qdf_mem_free(frm);
 		return;
 	} else if (DOT11F_WARNED(status)) {
 		lim_log(mac_ctx, LOGW,
@@ -1911,18 +1911,18 @@
 	lim_log(mac_ctx, LOG1,
 		FL("*** Sending Association Request length %d to "), bytes);
 	if (pe_session->assocReq != NULL) {
-		cdf_mem_free(pe_session->assocReq);
+		qdf_mem_free(pe_session->assocReq);
 		pe_session->assocReq = NULL;
 		pe_session->assocReqLen = 0;
 	}
 
 	if (add_ie_len) {
-		cdf_mem_copy(frame + sizeof(tSirMacMgmtHdr) + payload,
+		qdf_mem_copy(frame + sizeof(tSirMacMgmtHdr) + payload,
 			     add_ie, add_ie_len);
 		payload += add_ie_len;
 	}
 
-	pe_session->assocReq = cdf_mem_malloc(payload);
+	pe_session->assocReq = qdf_mem_malloc(payload);
 	if (NULL == pe_session->assocReq) {
 		lim_log(mac_ctx, LOGE, FL("Unable to allocate memory"));
 	} else {
@@ -1930,7 +1930,7 @@
 		 * Store the Assoc request. This is sent to csr/hdd in
 		 * join cnf response.
 		 */
-		cdf_mem_copy(pe_session->assocReq,
+		qdf_mem_copy(pe_session->assocReq,
 			     frame + sizeof(tSirMacMgmtHdr), payload);
 		pe_session->assocReqLen = payload;
 	}
@@ -1965,13 +1965,13 @@
 			FL("Failed to send Association Request (%X)!"),
 			qdf_status);
 		/* Pkt will be freed up by the callback */
-		cdf_mem_free(frm);
+		qdf_mem_free(frm);
 		return;
 	}
 	/* Free up buffer allocated for mlm_assoc_req */
-	cdf_mem_free(mlm_assoc_req);
+	qdf_mem_free(mlm_assoc_req);
 	mlm_assoc_req = NULL;
-	cdf_mem_free(frm);
+	qdf_mem_free(frm);
 	return;
 }
 
@@ -2029,7 +2029,7 @@
 	lim_log(mac_ctx, LOG1,
 		FL("called in state (%d)."), pe_session->limMlmState);
 
-	cdf_mem_set((uint8_t *) &frm, sizeof(frm), 0);
+	qdf_mem_set((uint8_t *) &frm, sizeof(frm), 0);
 
 	caps = mlm_reassoc_req->capabilityInfo;
 #if defined(FEATURE_WLAN_WAPI)
@@ -2053,7 +2053,7 @@
 	 * The previous ap bssid is stored in the FT Session
 	 * while creating the PE FT Session for reassociation.
 	 */
-	cdf_mem_copy((uint8_t *)frm.CurrentAPAddress.mac,
+	qdf_mem_copy((uint8_t *)frm.CurrentAPAddress.mac,
 			pe_session->prev_ap_bssid, sizeof(tSirMacAddr));
 
 	populate_dot11f_ssid2(mac_ctx, &frm.SSID);
@@ -2286,7 +2286,7 @@
 		goto end;
 	}
 	/* Paranoia: */
-	cdf_mem_set(frame, bytes + ft_ies_length, 0);
+	qdf_mem_set(frame, bytes + ft_ies_length, 0);
 
 	lim_print_mac_addr(mac_ctx, pe_session->limReAssocbssId, LOG1);
 	/* Next, we fill out the buffer descriptor: */
@@ -2312,18 +2312,18 @@
 		       bytes, payload);
 
 	if (pe_session->assocReq != NULL) {
-		cdf_mem_free(pe_session->assocReq);
+		qdf_mem_free(pe_session->assocReq);
 		pe_session->assocReq = NULL;
 		pe_session->assocReqLen = 0;
 	}
 
 	if (add_ie_len) {
-		cdf_mem_copy(frame + sizeof(tSirMacMgmtHdr) + payload,
+		qdf_mem_copy(frame + sizeof(tSirMacMgmtHdr) + payload,
 			     add_ie, add_ie_len);
 		payload += add_ie_len;
 	}
 
-	pe_session->assocReq = cdf_mem_malloc(payload);
+	pe_session->assocReq = qdf_mem_malloc(payload);
 	if (NULL == pe_session->assocReq) {
 		lim_log(mac_ctx, LOGE, FL("Failed to alloc memory"));
 	} else {
@@ -2331,7 +2331,7 @@
 		 * Store the Assoc request. This is sent to csr/hdd in
 		 * join cnf response.
 		 */
-		cdf_mem_copy(pe_session->assocReq,
+		qdf_mem_copy(pe_session->assocReq,
 			     frame + sizeof(tSirMacMgmtHdr), payload);
 		pe_session->assocReqLen = payload;
 	}
@@ -2356,12 +2356,12 @@
 	}
 
 	if (NULL != pe_session->assocReq) {
-		cdf_mem_free(pe_session->assocReq);
+		qdf_mem_free(pe_session->assocReq);
 		pe_session->assocReq = NULL;
 		pe_session->assocReqLen = 0;
 	}
 	if (ft_ies_length) {
-		pe_session->assocReq = cdf_mem_malloc(ft_ies_length);
+		pe_session->assocReq = qdf_mem_malloc(ft_ies_length);
 		if (NULL == pe_session->assocReq) {
 			lim_log(mac_ctx,
 				LOGE, FL("Failed to alloc memory for FT IEs"));
@@ -2371,7 +2371,7 @@
 			 * Store the FT IEs. This is sent to csr/hdd in
 			 * join cnf response.
 			 */
-			cdf_mem_copy(pe_session->assocReq,
+			qdf_mem_copy(pe_session->assocReq,
 				ft_sme_context->reassoc_ft_ies, ft_ies_length);
 			pe_session->assocReqLen = ft_ies_length;
 		}
@@ -2401,7 +2401,7 @@
 
 end:
 	/* Free up buffer allocated for mlmAssocReq */
-	cdf_mem_free(mlm_reassoc_req);
+	qdf_mem_free(mlm_reassoc_req);
 	pe_session->pLimMlmReassocReq = NULL;
 
 }
@@ -2413,11 +2413,11 @@
 	tLimMlmReassocCnf mlmReassocCnf;        /* keep sme */
 	tLimMlmReassocReq *pTmpMlmReassocReq = NULL;
 	if (NULL == pTmpMlmReassocReq) {
-		pTmpMlmReassocReq = cdf_mem_malloc(sizeof(tLimMlmReassocReq));
+		pTmpMlmReassocReq = qdf_mem_malloc(sizeof(tLimMlmReassocReq));
 		if (NULL == pTmpMlmReassocReq)
 			goto end;
-		cdf_mem_set(pTmpMlmReassocReq, sizeof(tLimMlmReassocReq), 0);
-		cdf_mem_copy(pTmpMlmReassocReq, pMlmReassocReq,
+		qdf_mem_set(pTmpMlmReassocReq, sizeof(tLimMlmReassocReq), 0);
+		qdf_mem_copy(pTmpMlmReassocReq, pMlmReassocReq,
 			     sizeof(tLimMlmReassocReq));
 	}
 	/* Prepare and send Reassociation request frame */
@@ -2447,11 +2447,11 @@
 end:
 	/* Free up buffer allocated for reassocReq */
 	if (pMlmReassocReq != NULL) {
-		cdf_mem_free(pMlmReassocReq);
+		qdf_mem_free(pMlmReassocReq);
 		pMlmReassocReq = NULL;
 	}
 	if (pTmpMlmReassocReq != NULL) {
-		cdf_mem_free(pTmpMlmReassocReq);
+		qdf_mem_free(pTmpMlmReassocReq);
 		pTmpMlmReassocReq = NULL;
 	}
 	mlmReassocCnf.resultCode = eSIR_SME_FT_REASSOC_FAILURE;
@@ -2500,7 +2500,7 @@
 	nAddIELen = psessionEntry->pLimReAssocReq->addIEAssoc.length;
 	pAddIE = psessionEntry->pLimReAssocReq->addIEAssoc.addIEdata;
 
-	cdf_mem_set((uint8_t *) &frm, sizeof(frm), 0);
+	qdf_mem_set((uint8_t *) &frm, sizeof(frm), 0);
 
 	caps = pMlmReassocReq->capabilityInfo;
 #if defined(FEATURE_WLAN_WAPI)
@@ -2517,7 +2517,7 @@
 
 	frm.ListenInterval.interval = pMlmReassocReq->listenInterval;
 
-	cdf_mem_copy((uint8_t *) frm.CurrentAPAddress.mac,
+	qdf_mem_copy((uint8_t *) frm.CurrentAPAddress.mac,
 		     (uint8_t *) psessionEntry->bssId, 6);
 
 	populate_dot11f_ssid2(pMac, &frm.SSID);
@@ -2654,7 +2654,7 @@
 		goto end;
 	}
 	/* Paranoia: */
-	cdf_mem_set(pFrame, nBytes, 0);
+	qdf_mem_set(pFrame, nBytes, 0);
 
 	/* Next, we fill out the buffer descriptor: */
 	lim_populate_mac_header(pMac, pFrame, SIR_MAC_MGMT_FRAME,
@@ -2684,23 +2684,23 @@
 	       )
 
 	if (psessionEntry->assocReq != NULL) {
-		cdf_mem_free(psessionEntry->assocReq);
+		qdf_mem_free(psessionEntry->assocReq);
 		psessionEntry->assocReq = NULL;
 		psessionEntry->assocReqLen = 0;
 	}
 
 	if (nAddIELen) {
-		cdf_mem_copy(pFrame + sizeof(tSirMacMgmtHdr) + nPayload,
+		qdf_mem_copy(pFrame + sizeof(tSirMacMgmtHdr) + nPayload,
 			     pAddIE, nAddIELen);
 		nPayload += nAddIELen;
 	}
 
-	psessionEntry->assocReq = cdf_mem_malloc(nPayload);
+	psessionEntry->assocReq = qdf_mem_malloc(nPayload);
 	if (NULL == psessionEntry->assocReq) {
 		lim_log(pMac, LOGE, FL("Unable to allocate mem for assoc req"));
 	} else {
 		/* Store the Assoc request. This is sent to csr/hdd in join cnf response. */
-		cdf_mem_copy(psessionEntry->assocReq,
+		qdf_mem_copy(psessionEntry->assocReq,
 			     pFrame + sizeof(tSirMacMgmtHdr), nPayload);
 		psessionEntry->assocReqLen = nPayload;
 	}
@@ -2739,7 +2739,7 @@
 
 end:
 	/* Free up buffer allocated for mlmAssocReq */
-	cdf_mem_free(pMlmReassocReq);
+	qdf_mem_free(pMlmReassocReq);
 	psessionEntry->pLimMlmReassocReq = NULL;
 
 } /* lim_send_reassoc_req_mgmt_frame */
@@ -2910,7 +2910,7 @@
 		return;
 	}
 
-	cdf_mem_zero(frame, frame_len);
+	qdf_mem_zero(frame, frame_len);
 
 	/* Prepare BD */
 	lim_populate_mac_header(mac_ctx, frame, SIR_MAC_MGMT_FRAME,
@@ -2921,7 +2921,7 @@
 	/* Prepare BSSId */
 	if (LIM_IS_AP_ROLE(session) ||
 	    LIM_IS_BT_AMP_AP_ROLE(session))
-		cdf_mem_copy((uint8_t *) mac_hdr->bssId,
+		qdf_mem_copy((uint8_t *) mac_hdr->bssId,
 			     (uint8_t *) session->bssId,
 			     sizeof(tSirMacAddr));
 
@@ -2929,7 +2929,7 @@
 	body = frame + sizeof(tSirMacMgmtHdr);
 
 	if (wep_bit == LIM_WEP_IN_FC) {
-		cdf_mem_copy(body, (uint8_t *) auth_frame, body_len);
+		qdf_mem_copy(body, (uint8_t *) auth_frame, body_len);
 
 		lim_log(mac_ctx, LOG1,
 			FL("*** Sending Auth seq# 3 status %d (%d) to"
@@ -2957,7 +2957,7 @@
 		if (body_len <= (sizeof(auth_frame->type) +
 				sizeof(auth_frame->length) +
 				sizeof(auth_frame->challengeText)))
-			cdf_mem_copy(body, (uint8_t *) &auth_frame->type,
+			qdf_mem_copy(body, (uint8_t *) &auth_frame->type,
 				     body_len);
 
 #if defined WLAN_FEATURE_VOWIFI_11R
@@ -2967,7 +2967,7 @@
 		     (session->ftPEContext.pFTPreAuthReq != NULL)) {
 
 			if (ft_ies_length > 0) {
-				cdf_mem_copy(body,
+				qdf_mem_copy(body,
 					session->ftPEContext.
 						pFTPreAuthReq->ft_ies,
 					ft_ies_length);
@@ -2983,7 +2983,7 @@
 				body++;
 				*body = SIR_MDIE_SIZE;
 				body++;
-				cdf_mem_copy(body,
+				qdf_mem_copy(body,
 					&session->ftPEContext.pFTPreAuthReq->
 						pbssDescription->mdie[0],
 					SIR_MDIE_SIZE);
@@ -3106,7 +3106,7 @@
 	}
 #endif
 		/* / Free up buffer allocated for mlmDeauthReq */
-		cdf_mem_free(pMlmDeauthReq);
+		qdf_mem_free(pMlmDeauthReq);
 		pMac->lim.limDisassocDeauthCnfReq.pMlmDeauthReq = NULL;
 	}
 	return QDF_STATUS_SUCCESS;
@@ -3119,7 +3119,7 @@
 
 	/* Free up buffer allocated */
 	/* for mlmDeauthReq */
-	cdf_mem_free(pMlmDeauthReq);
+	qdf_mem_free(pMlmDeauthReq);
 
 	lim_post_sme_message(pMac,
 			     LIM_MLM_DEAUTH_CNF, (uint32_t *) &mlmDeauthCnf);
@@ -3213,14 +3213,14 @@
 		}
 #endif
 		/* Free up buffer allocated for mlmDisassocReq */
-		cdf_mem_free(disassoc_req);
+		qdf_mem_free(disassoc_req);
 		mac_ctx->lim.limDisassocDeauthCnfReq.pMlmDisassocReq = NULL;
 		return QDF_STATUS_SUCCESS;
 	} else {
 		return QDF_STATUS_SUCCESS;
 	}
 end:
-	cdf_mem_copy((uint8_t *) &disassoc_cnf.peerMacAddr,
+	qdf_mem_copy((uint8_t *) &disassoc_cnf.peerMacAddr,
 		     (uint8_t *) disassoc_req->peer_macaddr.bytes,
 		     QDF_MAC_ADDR_SIZE);
 	disassoc_cnf.aid = disassoc_req->aid;
@@ -3231,7 +3231,7 @@
 
 	if (disassoc_req != NULL) {
 		/* / Free up buffer allocated for mlmDisassocReq */
-		cdf_mem_free(disassoc_req);
+		qdf_mem_free(disassoc_req);
 		mac_ctx->lim.limDisassocDeauthCnfReq.pMlmDisassocReq = NULL;
 	}
 
@@ -3300,7 +3300,7 @@
 	}
 	smeSessionId = psessionEntry->smeSessionId;
 
-	cdf_mem_set((uint8_t *) &frm, sizeof(frm), 0);
+	qdf_mem_set((uint8_t *) &frm, sizeof(frm), 0);
 
 	frm.Reason.code = nReason;
 
@@ -3327,7 +3327,7 @@
 		return;
 	}
 	/* Paranoia: */
-	cdf_mem_set(pFrame, nBytes, 0);
+	qdf_mem_set(pFrame, nBytes, 0);
 
 	/* Next, we fill out the buffer descriptor: */
 	lim_populate_mac_header(pMac, pFrame, SIR_MAC_MGMT_FRAME,
@@ -3479,7 +3479,7 @@
 	}
 	smeSessionId = psessionEntry->smeSessionId;
 
-	cdf_mem_set((uint8_t *) &frm, sizeof(frm), 0);
+	qdf_mem_set((uint8_t *) &frm, sizeof(frm), 0);
 
 	frm.Reason.code = nReason;
 
@@ -3506,7 +3506,7 @@
 		return;
 	}
 	/* Paranoia: */
-	cdf_mem_set(pFrame, nBytes, 0);
+	qdf_mem_set(pFrame, nBytes, 0);
 
 	/* Next, we fill out the buffer descriptor: */
 	lim_populate_mac_header(pMac, pFrame, SIR_MAC_MGMT_FRAME,
@@ -3660,7 +3660,7 @@
 	void *pPacket;
 	QDF_STATUS qdf_status;
 
-	cdf_mem_set((uint8_t *) &frm, sizeof(frm), 0);
+	qdf_mem_set((uint8_t *) &frm, sizeof(frm), 0);
 
 	frm.Category.category = SIR_MAC_ACTION_SPECTRUM_MGMT;
 	frm.Action.action = SIR_MAC_ACTION_MEASURE_REPORT_ID;
@@ -3717,14 +3717,14 @@
 		return eSIR_FAILURE;
 	}
 	/* Paranoia: */
-	cdf_mem_set(pFrame, nBytes, 0);
+	qdf_mem_set(pFrame, nBytes, 0);
 
 	/* Next, we fill out the buffer descriptor: */
 	lim_populate_mac_header(pMac, pFrame, SIR_MAC_MGMT_FRAME,
 		SIR_MAC_MGMT_ACTION, peer);
 	pMacHdr = (tpSirMacMgmtHdr) pFrame;
 
-	cdf_mem_copy(pMacHdr->bssId, psessionEntry->bssId, sizeof(tSirMacAddr));
+	qdf_mem_copy(pMacHdr->bssId, psessionEntry->bssId, sizeof(tSirMacAddr));
 
 #ifdef WLAN_FEATURE_11W
 	lim_set_protected_bit(pMac, psessionEntry, peer, pMacHdr);
@@ -3790,7 +3790,7 @@
 	void *pPacket;
 	QDF_STATUS qdf_status;
 
-	cdf_mem_set((uint8_t *) &frm, sizeof(frm), 0);
+	qdf_mem_set((uint8_t *) &frm, sizeof(frm), 0);
 
 	frm.Category.category = SIR_MAC_ACTION_SPECTRUM_MGMT;
 	frm.Action.action = SIR_MAC_ACTION_TPC_REQUEST_ID;
@@ -3821,14 +3821,14 @@
 		return;
 	}
 	/* Paranoia: */
-	cdf_mem_set(pFrame, nBytes, 0);
+	qdf_mem_set(pFrame, nBytes, 0);
 
 	/* Next, we fill out the buffer descriptor: */
 	lim_populate_mac_header(pMac, pFrame, SIR_MAC_MGMT_FRAME,
 		SIR_MAC_MGMT_ACTION, peer);
 	pMacHdr = (tpSirMacMgmtHdr) pFrame;
 
-	cdf_mem_copy(pMacHdr->bssId, psessionEntry->bssId, sizeof(tSirMacAddr));
+	qdf_mem_copy(pMacHdr->bssId, psessionEntry->bssId, sizeof(tSirMacAddr));
 
 #ifdef WLAN_FEATURE_11W
 	lim_set_protected_bit(pMac, psessionEntry, peer, pMacHdr);
@@ -3893,7 +3893,7 @@
 	void *pPacket;
 	QDF_STATUS qdf_status;
 
-	cdf_mem_set((uint8_t *) &frm, sizeof(frm), 0);
+	qdf_mem_set((uint8_t *) &frm, sizeof(frm), 0);
 
 	frm.Category.category = SIR_MAC_ACTION_SPECTRUM_MGMT;
 	frm.Action.action = SIR_MAC_ACTION_TPC_REPORT_ID;
@@ -3927,7 +3927,7 @@
 		return eSIR_FAILURE;
 	}
 	/* Paranoia: */
-	cdf_mem_set(pFrame, nBytes, 0);
+	qdf_mem_set(pFrame, nBytes, 0);
 
 	/* Next, we fill out the buffer descriptor: */
 	lim_populate_mac_header(pMac, pFrame, SIR_MAC_MGMT_FRAME,
@@ -3935,7 +3935,7 @@
 
 	pMacHdr = (tpSirMacMgmtHdr) pFrame;
 
-	cdf_mem_copy(pMacHdr->bssId, psessionEntry->bssId, sizeof(tSirMacAddr));
+	qdf_mem_copy(pMacHdr->bssId, psessionEntry->bssId, sizeof(tSirMacAddr));
 
 #ifdef WLAN_FEATURE_11W
 	lim_set_protected_bit(pMac, psessionEntry, peer, pMacHdr);
@@ -4021,7 +4021,7 @@
 	}
 	smeSessionId = psessionEntry->smeSessionId;
 
-	cdf_mem_set((uint8_t *) &frm, sizeof(frm), 0);
+	qdf_mem_set((uint8_t *) &frm, sizeof(frm), 0);
 
 	frm.Category.category = SIR_MAC_ACTION_SPECTRUM_MGMT;
 	frm.Action.action = SIR_MAC_ACTION_CHANNEL_SWITCH_ID;
@@ -4054,14 +4054,14 @@
 		return eSIR_FAILURE;
 	}
 	/* Paranoia: */
-	cdf_mem_set(pFrame, nBytes, 0);
+	qdf_mem_set(pFrame, nBytes, 0);
 
 	/* Next, we fill out the buffer descriptor: */
 	lim_populate_mac_header(pMac, pFrame, SIR_MAC_MGMT_FRAME,
 		SIR_MAC_MGMT_ACTION, peer,
 		psessionEntry->selfMacAddr);
 	pMacHdr = (tpSirMacMgmtHdr) pFrame;
-	cdf_mem_copy((uint8_t *) pMacHdr->bssId,
+	qdf_mem_copy((uint8_t *) pMacHdr->bssId,
 		     (uint8_t *) psessionEntry->bssId, sizeof(tSirMacAddr));
 
 #ifdef WLAN_FEATURE_11W
@@ -4146,7 +4146,7 @@
 
 	sme_session_id = session_entry->smeSessionId;
 
-	cdf_mem_set(&frm, sizeof(frm), 0);
+	qdf_mem_set(&frm, sizeof(frm), 0);
 
 	frm.Category.category     = SIR_MAC_ACTION_PUBLIC_USAGE;
 	frm.Action.action         = SIR_MAC_ACTION_EXT_CHANNEL_SWITCH_ID;
@@ -4184,13 +4184,13 @@
 	}
 
 	/* Paranoia*/
-	cdf_mem_set(frame, num_bytes, 0);
+	qdf_mem_set(frame, num_bytes, 0);
 
 	/* Next, we fill out the buffer descriptor */
 	lim_populate_mac_header(mac_ctx, frame, SIR_MAC_MGMT_FRAME,
 		SIR_MAC_MGMT_ACTION, peer, session_entry->selfMacAddr);
 	mac_hdr = (tpSirMacMgmtHdr) frame;
-	cdf_mem_copy((uint8_t *) mac_hdr->bssId,
+	qdf_mem_copy((uint8_t *) mac_hdr->bssId,
 				   (uint8_t *) session_entry->bssId,
 				   sizeof(tSirMacAddr));
 
@@ -4264,7 +4264,7 @@
 	}
 	smeSessionId = psessionEntry->smeSessionId;
 
-	cdf_mem_set((uint8_t *) &frm, sizeof(frm), 0);
+	qdf_mem_set((uint8_t *) &frm, sizeof(frm), 0);
 
 	frm.Category.category = SIR_MAC_ACTION_VHT;
 	frm.Action.action = SIR_MAC_VHT_OPMODE_NOTIFICATION;
@@ -4297,7 +4297,7 @@
 		return eSIR_FAILURE;
 	}
 	/* Paranoia: */
-	cdf_mem_set(pFrame, nBytes, 0);
+	qdf_mem_set(pFrame, nBytes, 0);
 
 	/* Next, we fill out the buffer descriptor: */
 	if (psessionEntry->pePersona == QDF_SAP_MODE)
@@ -4309,7 +4309,7 @@
 			SIR_MAC_MGMT_ACTION, psessionEntry->bssId,
 			psessionEntry->selfMacAddr);
 	pMacHdr = (tpSirMacMgmtHdr) pFrame;
-	cdf_mem_copy((uint8_t *) pMacHdr->bssId,
+	qdf_mem_copy((uint8_t *) pMacHdr->bssId,
 		     (uint8_t *) psessionEntry->bssId, sizeof(tSirMacAddr));
 	nStatus = dot11f_pack_operating_mode(pMac, &frm, pFrame +
 					     sizeof(tSirMacMgmtHdr),
@@ -4393,7 +4393,7 @@
 		return eSIR_FAILURE;
 	}
 	smeSessionId = psessionEntry->smeSessionId;
-	cdf_mem_set((uint8_t *) &frm, sizeof(frm), 0);
+	qdf_mem_set((uint8_t *) &frm, sizeof(frm), 0);
 
 	frm.Category.category = SIR_MAC_ACTION_RRM;
 	frm.Action.action = SIR_MAC_RRM_NEIGHBOR_REQ;
@@ -4429,7 +4429,7 @@
 		return eSIR_FAILURE;
 	}
 	/* Paranoia: */
-	cdf_mem_set(pFrame, nBytes, 0);
+	qdf_mem_set(pFrame, nBytes, 0);
 
 	/* Copy necessary info to BD */
 	lim_populate_mac_header(pMac, pFrame, SIR_MAC_MGMT_FRAME,
@@ -4543,7 +4543,7 @@
 		return eSIR_FAILURE;
 	}
 
-	cdf_mem_set((uint8_t *) &frm, sizeof(frm), 0);
+	qdf_mem_set((uint8_t *) &frm, sizeof(frm), 0);
 
 	frm.Category.category = SIR_MAC_ACTION_RRM;
 	frm.Action.action = SIR_MAC_RRM_LINK_MEASUREMENT_RPT;
@@ -4588,7 +4588,7 @@
 		return eSIR_FAILURE;
 	}
 	/* Paranoia: */
-	cdf_mem_set(pFrame, nBytes, 0);
+	qdf_mem_set(pFrame, nBytes, 0);
 
 	/* Copy necessary info to BD */
 	lim_populate_mac_header(pMac, pFrame, SIR_MAC_MGMT_FRAME,
@@ -4701,7 +4701,7 @@
 	uint8_t smeSessionId = 0;
 
 	tDot11fRadioMeasurementReport *frm =
-		cdf_mem_malloc(sizeof(tDot11fRadioMeasurementReport));
+		qdf_mem_malloc(sizeof(tDot11fRadioMeasurementReport));
 	if (!frm) {
 		lim_log(pMac, LOGE,
 			FL
@@ -4713,10 +4713,10 @@
 		lim_log(pMac, LOGE,
 			FL
 				("(psession == NULL) in Request to send Beacon Report action frame"));
-		cdf_mem_free(frm);
+		qdf_mem_free(frm);
 		return eSIR_FAILURE;
 	}
-	cdf_mem_set((uint8_t *) frm, sizeof(*frm), 0);
+	qdf_mem_set((uint8_t *) frm, sizeof(*frm), 0);
 
 	frm->Category.category = SIR_MAC_ACTION_RRM;
 	frm->Action.action = SIR_MAC_RRM_RADIO_MEASURE_RPT;
@@ -4761,7 +4761,7 @@
 			nStatus);
 		/* We'll fall back on the worst case scenario: */
 		nPayload = sizeof(tDot11fLinkMeasurementReport);
-		cdf_mem_free(frm);
+		qdf_mem_free(frm);
 		return eSIR_FAILURE;
 	} else if (DOT11F_WARNED(nStatus)) {
 		lim_log(pMac, LOGW, FL("There were warnings while calculating "
@@ -4778,11 +4778,11 @@
 		lim_log(pMac, LOGP,
 			FL("Failed to allocate %d bytes for a Radio Measure "
 			   "Report."), nBytes);
-		cdf_mem_free(frm);
+		qdf_mem_free(frm);
 		return eSIR_FAILURE;
 	}
 	/* Paranoia: */
-	cdf_mem_set(pFrame, nBytes, 0);
+	qdf_mem_set(pFrame, nBytes, 0);
 
 	/* Copy necessary info to BD */
 	lim_populate_mac_header(pMac, pFrame, SIR_MAC_MGMT_FRAME,
@@ -4846,15 +4846,15 @@
 		       )
 		statusCode = eSIR_FAILURE;
 		/* Pkt will be freed up by the callback */
-		cdf_mem_free(frm);
+		qdf_mem_free(frm);
 		return statusCode;
 	} else {
-		cdf_mem_free(frm);
+		qdf_mem_free(frm);
 		return eSIR_SUCCESS;
 	}
 
 returnAfterError:
-	cdf_mem_free(frm);
+	qdf_mem_free(frm);
 	cds_packet_free((void *)pPacket);
 	return statusCode;
 }
@@ -4895,14 +4895,14 @@
 	uint8_t txFlag = 0;
 	uint8_t smeSessionId = 0;
 
-	cdf_mem_set((uint8_t *) &frm, sizeof(frm), 0);
+	qdf_mem_set((uint8_t *) &frm, sizeof(frm), 0);
 	frm.Category.category = SIR_MAC_ACTION_SA_QUERY;
 	/* 11w action  field is :
 	   action: 0 --> SA Query Request action frame
 	   action: 1 --> SA Query Response action frame */
 	frm.Action.action = SIR_MAC_SA_QUERY_REQ;
 	/* 11w SA Query Request transId */
-	cdf_mem_copy(&frm.TransactionId.transId[0], &transId[0], 2);
+	qdf_mem_copy(&frm.TransactionId.transId[0], &transId[0], 2);
 
 	nStatus = dot11f_get_packed_sa_query_req_size(pMac, &frm, &nPayload);
 	if (DOT11F_FAILED(nStatus)) {
@@ -4927,7 +4927,7 @@
 		return eSIR_FAILURE;
 	}
 	/* Paranoia: */
-	cdf_mem_set(pFrame, nBytes, 0);
+	qdf_mem_set(pFrame, nBytes, 0);
 
 	/* Copy necessary info to BD */
 	lim_populate_mac_header(pMac, pFrame, SIR_MAC_MGMT_FRAME,
@@ -5036,7 +5036,7 @@
 
 	smeSessionId = psessionEntry->smeSessionId;
 
-	cdf_mem_set((uint8_t *) &frm, sizeof(frm), 0);
+	qdf_mem_set((uint8_t *) &frm, sizeof(frm), 0);
 	frm.Category.category = SIR_MAC_ACTION_SA_QUERY;
 	/*11w action  field is :
 	   action: 0 --> SA query request action frame
@@ -5044,7 +5044,7 @@
 	frm.Action.action = SIR_MAC_SA_QUERY_RSP;
 	/*11w SA query response transId is same as
 	   SA query request transId */
-	cdf_mem_copy(&frm.TransactionId.transId[0], &transId[0], 2);
+	qdf_mem_copy(&frm.TransactionId.transId[0], &transId[0], 2);
 
 	nStatus = dot11f_get_packed_sa_query_rsp_size(pMac, &frm, &nPayload);
 	if (DOT11F_FAILED(nStatus)) {
@@ -5069,7 +5069,7 @@
 		return eSIR_FAILURE;
 	}
 	/* Paranoia: */
-	cdf_mem_set(pFrame, nBytes, 0);
+	qdf_mem_set(pFrame, nBytes, 0);
 
 	/* Copy necessary info to BD */
 	lim_populate_mac_header(pMac, pFrame, SIR_MAC_MGMT_FRAME,
diff --git a/core/mac/src/pe/lim/lim_send_messages.c b/core/mac/src/pe/lim/lim_send_messages.c
index 05ad92f..ad53515 100644
--- a/core/mac/src/pe/lim/lim_send_messages.c
+++ b/core/mac/src/pe/lim/lim_send_messages.c
@@ -99,14 +99,14 @@
 	tSirRetStatus retCode = eSIR_SUCCESS;
 	tSirMsgQ msgQ;
 
-	pCFParams = cdf_mem_malloc(sizeof(tUpdateCFParams));
+	pCFParams = qdf_mem_malloc(sizeof(tUpdateCFParams));
 	if (NULL == pCFParams) {
 		lim_log(pMac, LOGP,
 			FL("Unable to allocate memory during Update CF Params"));
 		retCode = eSIR_MEM_ALLOC_FAILED;
 		goto returnFailure;
 	}
-	cdf_mem_set((uint8_t *) pCFParams, sizeof(tUpdateCFParams), 0);
+	qdf_mem_set((uint8_t *) pCFParams, sizeof(tUpdateCFParams), 0);
 	pCFParams->cfpCount = cfpCount;
 	pCFParams->cfpPeriod = cfpPeriod;
 	pCFParams->bssIdx = bssIdx;
@@ -119,7 +119,7 @@
 	MTRACE(mac_trace_msg_tx(pMac, NO_SESSION, msgQ.type));
 	retCode = wma_post_ctrl_msg(pMac, &msgQ);
 	if (eSIR_SUCCESS != retCode) {
-		cdf_mem_free(pCFParams);
+		qdf_mem_free(pCFParams);
 		lim_log(pMac, LOGP,
 			FL("Posting WMA_UPDATE_CF_IND failed, reason=%X"),
 			retCode);
@@ -148,13 +148,13 @@
 	tSirRetStatus retCode = eSIR_SUCCESS;
 	tSirMsgQ msgQ;
 
-	pBcnParams = cdf_mem_malloc(sizeof(*pBcnParams));
+	pBcnParams = qdf_mem_malloc(sizeof(*pBcnParams));
 	if (NULL == pBcnParams) {
 		lim_log(pMac, LOGP,
 			FL("Unable to allocate memory during Update Beacon Params"));
 		return eSIR_MEM_ALLOC_FAILED;
 	}
-	cdf_mem_copy((uint8_t *) pBcnParams, pUpdatedBcnParams,
+	qdf_mem_copy((uint8_t *) pBcnParams, pUpdatedBcnParams,
 		     sizeof(*pBcnParams));
 	msgQ.type = WMA_UPDATE_BEACON_IND;
 	msgQ.reserved = 0;
@@ -164,7 +164,7 @@
 	       FL("Sending WMA_UPDATE_BEACON_IND, paramChangeBitmap in hex = %x"),
 	       pUpdatedBcnParams->paramChangeBitmap);)
 	if (NULL == psessionEntry) {
-		cdf_mem_free(pBcnParams);
+		qdf_mem_free(pBcnParams);
 		MTRACE(mac_trace_msg_tx(pMac, NO_SESSION, msgQ.type));
 		return eSIR_FAILURE;
 	} else {
@@ -175,7 +175,7 @@
 	pBcnParams->smeSessionId = psessionEntry->smeSessionId;
 	retCode = wma_post_ctrl_msg(pMac, &msgQ);
 	if (eSIR_SUCCESS != retCode) {
-		cdf_mem_free(pBcnParams);
+		qdf_mem_free(pBcnParams);
 		lim_log(pMac, LOGP,
 			FL("Posting WMA_UPDATE_BEACON_IND, reason=%X"),
 			retCode);
@@ -235,25 +235,25 @@
 				peSessionId);
 		return eSIR_FAILURE;
 	}
-	pChnlParams = cdf_mem_malloc(sizeof(tSwitchChannelParams));
+	pChnlParams = qdf_mem_malloc(sizeof(tSwitchChannelParams));
 	if (NULL == pChnlParams) {
 		lim_log(pMac, LOGP, FL(
 			"Unable to allocate memory for Switch Ch Params"));
 		return eSIR_MEM_ALLOC_FAILED;
 	}
-	cdf_mem_set((uint8_t *) pChnlParams, sizeof(tSwitchChannelParams), 0);
+	qdf_mem_set((uint8_t *) pChnlParams, sizeof(tSwitchChannelParams), 0);
 	pChnlParams->channelNumber = chnlNumber;
 	pChnlParams->ch_center_freq_seg0 = ch_center_freq_seg0;
 	pChnlParams->ch_center_freq_seg1 = ch_center_freq_seg1;
 	pChnlParams->ch_width = ch_width;
-	cdf_mem_copy(pChnlParams->selfStaMacAddr, pSessionEntry->selfMacAddr,
+	qdf_mem_copy(pChnlParams->selfStaMacAddr, pSessionEntry->selfMacAddr,
 		     sizeof(tSirMacAddr));
 #if defined WLAN_FEATURE_VOWIFI
 	pChnlParams->maxTxPower = maxTxPower;
 #else
 	pChnlParams->localPowerConstraint = localPwrConstraint;
 #endif
-	cdf_mem_copy(pChnlParams->bssId, pSessionEntry->bssId,
+	qdf_mem_copy(pChnlParams->bssId, pSessionEntry->bssId,
 		     sizeof(tSirMacAddr));
 	pChnlParams->peSessionId = peSessionId;
 	pChnlParams->vhtCapable = pSessionEntry->vhtCapability;
@@ -291,7 +291,7 @@
 #endif
 	MTRACE(mac_trace_msg_tx(pMac, peSessionId, msgQ.type));
 	if (eSIR_SUCCESS != wma_post_ctrl_msg(pMac, &msgQ)) {
-		cdf_mem_free(pChnlParams);
+		qdf_mem_free(pChnlParams);
 		lim_log(pMac, LOGP, FL(
 			"Posting  CH_SWITCH_REQ to WMA failed"));
 		return eSIR_FAILURE;
@@ -329,7 +329,7 @@
 	tSirMsgQ msgQ;
 	uint8_t i;
 
-	pEdcaParams = cdf_mem_malloc(sizeof(tEdcaParams));
+	pEdcaParams = qdf_mem_malloc(sizeof(tEdcaParams));
 	if (NULL == pEdcaParams) {
 		lim_log(pMac, LOGP,
 			FL("Unable to allocate memory during Update EDCA Params"));
@@ -359,7 +359,7 @@
 	MTRACE(mac_trace_msg_tx(pMac, NO_SESSION, msgQ.type));
 	retCode = wma_post_ctrl_msg(pMac, &msgQ);
 	if (eSIR_SUCCESS != retCode) {
-		cdf_mem_free(pEdcaParams);
+		qdf_mem_free(pEdcaParams);
 		lim_log(pMac, LOGP,
 			FL("Posting WMA_UPDATE_EDCA_PROFILE_IND failed, reason=%X"),
 			retCode);
@@ -493,7 +493,7 @@
 	tSirRetStatus retCode;
 	tpLinkStateParams pLinkStateParams = NULL;
 	/* Allocate memory. */
-	pLinkStateParams = cdf_mem_malloc(sizeof(tLinkStateParams));
+	pLinkStateParams = qdf_mem_malloc(sizeof(tLinkStateParams));
 	if (NULL == pLinkStateParams) {
 		lim_log(pMac, LOGP,
 			FL
@@ -501,7 +501,7 @@
 		retCode = eSIR_MEM_ALLOC_FAILED;
 		return retCode;
 	}
-	cdf_mem_set((uint8_t *) pLinkStateParams, sizeof(tLinkStateParams), 0);
+	qdf_mem_set((uint8_t *) pLinkStateParams, sizeof(tLinkStateParams), 0);
 	pLinkStateParams->state = state;
 	pLinkStateParams->callback = callback;
 	pLinkStateParams->callbackArg = callbackArg;
@@ -519,7 +519,7 @@
 
 	retCode = (uint32_t) wma_post_ctrl_msg(pMac, &msgQ);
 	if (retCode != eSIR_SUCCESS) {
-		cdf_mem_free(pLinkStateParams);
+		qdf_mem_free(pLinkStateParams);
 		lim_log(pMac, LOGP,
 			FL("Posting link state %d failed, reason = %x "), state,
 			retCode);
@@ -537,7 +537,7 @@
 	tSirRetStatus retCode;
 	tpLinkStateParams pLinkStateParams = NULL;
 	/* Allocate memory. */
-	pLinkStateParams = cdf_mem_malloc(sizeof(tLinkStateParams));
+	pLinkStateParams = qdf_mem_malloc(sizeof(tLinkStateParams));
 	if (NULL == pLinkStateParams) {
 		lim_log(pMac, LOGP,
 			FL
@@ -545,7 +545,7 @@
 		retCode = eSIR_MEM_ALLOC_FAILED;
 		return retCode;
 	}
-	cdf_mem_set((uint8_t *) pLinkStateParams, sizeof(tLinkStateParams), 0);
+	qdf_mem_set((uint8_t *) pLinkStateParams, sizeof(tLinkStateParams), 0);
 	pLinkStateParams->state = state;
 	/* Copy Mac address */
 	sir_copy_mac_addr(pLinkStateParams->bssid, bssId);
@@ -566,7 +566,7 @@
 
 	retCode = (uint32_t) wma_post_ctrl_msg(pMac, &msgQ);
 	if (retCode != eSIR_SUCCESS) {
-		cdf_mem_free(pLinkStateParams);
+		qdf_mem_free(pLinkStateParams);
 		lim_log(pMac, LOGP,
 			FL("Posting link state %d failed, reason = %x "), state,
 			retCode);
@@ -598,14 +598,14 @@
 		return retCode;
 	}
 	msgSize = sizeof(tBeaconFilterMsg) + sizeof(beacon_filter_table);
-	pBeaconFilterMsg = cdf_mem_malloc(msgSize);
+	pBeaconFilterMsg = qdf_mem_malloc(msgSize);
 	if (NULL == pBeaconFilterMsg) {
 		lim_log(pMac, LOGP,
 			FL("Fail to allocate memory for beaconFiilterMsg "));
 		retCode = eSIR_MEM_ALLOC_FAILED;
 		return retCode;
 	}
-	cdf_mem_set((uint8_t *) pBeaconFilterMsg, msgSize, 0);
+	qdf_mem_set((uint8_t *) pBeaconFilterMsg, msgSize, 0);
 	/* Fill in capability Info and mask */
 	/* Don't send this message if no active Infra session is found. */
 	pBeaconFilterMsg->capabilityInfo = psessionEntry->limCurrentBssCaps;
@@ -638,7 +638,7 @@
 	MTRACE(mac_trace_msg_tx(pMac, psessionEntry->peSessionId, msgQ.type));
 	retCode = wma_post_ctrl_msg(pMac, &msgQ);
 	if (eSIR_SUCCESS != retCode) {
-		cdf_mem_free(pBeaconFilterMsg);
+		qdf_mem_free(pBeaconFilterMsg);
 		lim_log(pMac, LOGP,
 			FL("Posting WMA_BEACON_FILTER_IND failed, reason=%X"),
 			retCode);
@@ -656,13 +656,13 @@
 	tSirRetStatus retCode = eSIR_SUCCESS;
 	tSirMsgQ msgQ;
 
-	pVhtOpMode = cdf_mem_malloc(sizeof(tUpdateVHTOpMode));
+	pVhtOpMode = qdf_mem_malloc(sizeof(tUpdateVHTOpMode));
 	if (NULL == pVhtOpMode) {
 		lim_log(pMac, LOGP,
 			FL("Unable to allocate memory during Update Op Mode"));
 		return eSIR_MEM_ALLOC_FAILED;
 	}
-	cdf_mem_copy((uint8_t *) pVhtOpMode, pTempParam,
+	qdf_mem_copy((uint8_t *) pVhtOpMode, pTempParam,
 		     sizeof(tUpdateVHTOpMode));
 	msgQ.type = WMA_UPDATE_OP_MODE;
 	msgQ.reserved = 0;
@@ -679,7 +679,7 @@
 					msgQ.type));
 	retCode = wma_post_ctrl_msg(pMac, &msgQ);
 	if (eSIR_SUCCESS != retCode) {
-		cdf_mem_free(pVhtOpMode);
+		qdf_mem_free(pVhtOpMode);
 		lim_log(pMac, LOGP,
 			FL("Posting WMA_UPDATE_OP_MODE failed, reason=%X"),
 			retCode);
@@ -696,13 +696,13 @@
 	tSirRetStatus retCode = eSIR_SUCCESS;
 	tSirMsgQ msgQ;
 
-	pRxNss = cdf_mem_malloc(sizeof(tUpdateRxNss));
+	pRxNss = qdf_mem_malloc(sizeof(tUpdateRxNss));
 	if (NULL == pRxNss) {
 		lim_log(pMac, LOGP,
 			FL("Unable to allocate memory during Update Rx Nss"));
 		return eSIR_MEM_ALLOC_FAILED;
 	}
-	cdf_mem_copy((uint8_t *) pRxNss, pTempParam, sizeof(tUpdateRxNss));
+	qdf_mem_copy((uint8_t *) pRxNss, pTempParam, sizeof(tUpdateRxNss));
 	msgQ.type = WMA_UPDATE_RX_NSS;
 	msgQ.reserved = 0;
 	msgQ.bodyptr = pRxNss;
@@ -716,7 +716,7 @@
 					msgQ.type));
 	retCode = wma_post_ctrl_msg(pMac, &msgQ);
 	if (eSIR_SUCCESS != retCode) {
-		cdf_mem_free(pRxNss);
+		qdf_mem_free(pRxNss);
 		lim_log(pMac, LOGP,
 			FL("Posting WMA_UPDATE_RX_NSS failed, reason=%X"),
 			retCode);
@@ -733,13 +733,13 @@
 	tSirRetStatus retCode = eSIR_SUCCESS;
 	tSirMsgQ msgQ;
 
-	pMembership = cdf_mem_malloc(sizeof(tUpdateMembership));
+	pMembership = qdf_mem_malloc(sizeof(tUpdateMembership));
 	if (NULL == pMembership) {
 		lim_log(pMac, LOGP,
 			FL("Unable to allocate memory during Update Membership Mode"));
 		return eSIR_MEM_ALLOC_FAILED;
 	}
-	cdf_mem_copy((uint8_t *) pMembership, pTempParam,
+	qdf_mem_copy((uint8_t *) pMembership, pTempParam,
 		     sizeof(tUpdateMembership));
 
 	msgQ.type = WMA_UPDATE_MEMBERSHIP;
@@ -755,7 +755,7 @@
 					msgQ.type));
 	retCode = wma_post_ctrl_msg(pMac, &msgQ);
 	if (eSIR_SUCCESS != retCode) {
-		cdf_mem_free(pMembership);
+		qdf_mem_free(pMembership);
 		lim_log(pMac, LOGP,
 			FL("Posting WMA_UPDATE_MEMBERSHIP failed, reason=%X"),
 			retCode);
@@ -772,13 +772,13 @@
 	tSirRetStatus retCode = eSIR_SUCCESS;
 	tSirMsgQ msgQ;
 
-	pUserPos = cdf_mem_malloc(sizeof(tUpdateUserPos));
+	pUserPos = qdf_mem_malloc(sizeof(tUpdateUserPos));
 	if (NULL == pUserPos) {
 		lim_log(pMac, LOGP,
 			FL("Unable to allocate memory during Update User Position"));
 		return eSIR_MEM_ALLOC_FAILED;
 	}
-	cdf_mem_copy((uint8_t *) pUserPos, pTempParam, sizeof(tUpdateUserPos));
+	qdf_mem_copy((uint8_t *) pUserPos, pTempParam, sizeof(tUpdateUserPos));
 
 	msgQ.type = WMA_UPDATE_USERPOS;
 	msgQ.reserved = 0;
@@ -793,7 +793,7 @@
 					msgQ.type));
 	retCode = wma_post_ctrl_msg(pMac, &msgQ);
 	if (eSIR_SUCCESS != retCode) {
-		cdf_mem_free(pUserPos);
+		qdf_mem_free(pUserPos);
 		lim_log(pMac, LOGP,
 			FL("Posting WMA_UPDATE_USERPOS failed, reason=%X"),
 			retCode);
@@ -825,7 +825,7 @@
 	tSirWlanExcludeUnencryptParam *pExcludeUnencryptParam;
 
 	pExcludeUnencryptParam =
-		cdf_mem_malloc(sizeof(tSirWlanExcludeUnencryptParam));
+		qdf_mem_malloc(sizeof(tSirWlanExcludeUnencryptParam));
 	if (NULL == pExcludeUnencryptParam) {
 		lim_log(pMac, LOGP,
 			FL("Unable to allocate memory during lim_send_exclude_unencrypt_ind"));
@@ -833,7 +833,7 @@
 	}
 
 	pExcludeUnencryptParam->excludeUnencrypt = excludeUnenc;
-	cdf_mem_copy(pExcludeUnencryptParam->bssid.bytes, psessionEntry->bssId,
+	qdf_mem_copy(pExcludeUnencryptParam->bssid.bytes, psessionEntry->bssId,
 			QDF_MAC_ADDR_SIZE);
 
 	msgQ.type = WMA_EXCLUDE_UNENCRYPTED_IND;
@@ -844,7 +844,7 @@
 	MTRACE(mac_trace_msg_tx(pMac, psessionEntry->peSessionId, msgQ.type));
 	retCode = wma_post_ctrl_msg(pMac, &msgQ);
 	if (eSIR_SUCCESS != retCode) {
-		cdf_mem_free(pExcludeUnencryptParam);
+		qdf_mem_free(pExcludeUnencryptParam);
 		lim_log(pMac, LOGP,
 			FL("Posting WMA_EXCLUDE_UNENCRYPTED_IND failed, reason=%X"),
 			retCode);
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 4924801..358016a 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
@@ -88,7 +88,7 @@
 	lim_log(mac_ctx, LOG1, FL("Sending message %s with reasonCode %s"),
 		lim_msg_str(msg_type), lim_result_code_str(result_code));
 
-	sme_rsp = cdf_mem_malloc(sizeof(tSirSmeRsp));
+	sme_rsp = qdf_mem_malloc(sizeof(tSirSmeRsp));
 	if (NULL == sme_rsp) {
 		/* Buffer not available. Log error */
 		QDF_TRACE(QDF_MODULE_ID_PE, LOGP,
@@ -147,7 +147,7 @@
 		lim_msg_str(msg_type), lim_result_code_str(result_code),
 		scan_id);
 
-	sme_rsp = cdf_mem_malloc(sizeof(struct sir_roc_rsp));
+	sme_rsp = qdf_mem_malloc(sizeof(struct sir_roc_rsp));
 	if (NULL == sme_rsp) {
 		QDF_TRACE(QDF_MODULE_ID_PE, LOGP,
 			FL("call to AllocateMemory failed for eWNI_SME_*_RSP"));
@@ -266,10 +266,10 @@
 	if (result_code == eSIR_SME_SUCCESS) {
 		if (session_entry->beacon != NULL) {
 			sme_join_rsp->beaconLength = session_entry->bcnLen;
-			cdf_mem_copy(sme_join_rsp->frames,
+			qdf_mem_copy(sme_join_rsp->frames,
 				session_entry->beacon,
 				sme_join_rsp->beaconLength);
-			cdf_mem_free(session_entry->beacon);
+			qdf_mem_free(session_entry->beacon);
 			session_entry->beacon = NULL;
 			session_entry->bcnLen = 0;
 			lim_log(mac_ctx, LOG1, FL("Beacon=%d"),
@@ -278,11 +278,11 @@
 		if (session_entry->assocReq != NULL) {
 			sme_join_rsp->assocReqLength =
 				session_entry->assocReqLen;
-			cdf_mem_copy(sme_join_rsp->frames +
+			qdf_mem_copy(sme_join_rsp->frames +
 				sme_join_rsp->beaconLength,
 				session_entry->assocReq,
 				sme_join_rsp->assocReqLength);
-			cdf_mem_free(session_entry->assocReq);
+			qdf_mem_free(session_entry->assocReq);
 			session_entry->assocReq = NULL;
 			session_entry->assocReqLen = 0;
 			lim_log(mac_ctx,
@@ -292,12 +292,12 @@
 		if (session_entry->assocRsp != NULL) {
 			sme_join_rsp->assocRspLength =
 				session_entry->assocRspLen;
-			cdf_mem_copy(sme_join_rsp->frames +
+			qdf_mem_copy(sme_join_rsp->frames +
 				sme_join_rsp->beaconLength +
 				sme_join_rsp->assocReqLength,
 				session_entry->assocRsp,
 				sme_join_rsp->assocRspLength);
-			cdf_mem_free(session_entry->assocRsp);
+			qdf_mem_free(session_entry->assocRsp);
 			session_entry->assocRsp = NULL;
 			session_entry->assocRspLen = 0;
 		}
@@ -305,13 +305,13 @@
 		if (session_entry->ricData != NULL) {
 			sme_join_rsp->parsedRicRspLen =
 				session_entry->RICDataLen;
-			cdf_mem_copy(sme_join_rsp->frames +
+			qdf_mem_copy(sme_join_rsp->frames +
 				sme_join_rsp->beaconLength +
 				sme_join_rsp->assocReqLength +
 				sme_join_rsp->assocRspLength,
 				session_entry->ricData,
 				sme_join_rsp->parsedRicRspLen);
-			cdf_mem_free(session_entry->ricData);
+			qdf_mem_free(session_entry->ricData);
 			session_entry->ricData = NULL;
 			session_entry->RICDataLen = 0;
 			lim_log(mac_ctx, LOG1, FL("RicLength=%d"),
@@ -322,14 +322,14 @@
 		if (session_entry->tspecIes != NULL) {
 			sme_join_rsp->tspecIeLen =
 				session_entry->tspecLen;
-			cdf_mem_copy(sme_join_rsp->frames +
+			qdf_mem_copy(sme_join_rsp->frames +
 				sme_join_rsp->beaconLength +
 				sme_join_rsp->assocReqLength +
 				sme_join_rsp->assocRspLength +
 				sme_join_rsp->parsedRicRspLen,
 				session_entry->tspecIes,
 				sme_join_rsp->tspecIeLen);
-			cdf_mem_free(session_entry->tspecIes);
+			qdf_mem_free(session_entry->tspecIes);
 			session_entry->tspecIes = NULL;
 			session_entry->tspecLen = 0;
 			lim_log(mac_ctx, LOG1, FL("ESE-TspecLen=%d"),
@@ -365,30 +365,30 @@
 #endif
 	} else {
 		if (session_entry->beacon != NULL) {
-			cdf_mem_free(session_entry->beacon);
+			qdf_mem_free(session_entry->beacon);
 			session_entry->beacon = NULL;
 			session_entry->bcnLen = 0;
 		}
 		if (session_entry->assocReq != NULL) {
-			cdf_mem_free(session_entry->assocReq);
+			qdf_mem_free(session_entry->assocReq);
 			session_entry->assocReq = NULL;
 			session_entry->assocReqLen = 0;
 		}
 		if (session_entry->assocRsp != NULL) {
-			cdf_mem_free(session_entry->assocRsp);
+			qdf_mem_free(session_entry->assocRsp);
 			session_entry->assocRsp = NULL;
 			session_entry->assocRspLen = 0;
 		}
 #ifdef WLAN_FEATURE_VOWIFI_11R
 		if (session_entry->ricData != NULL) {
-			cdf_mem_free(session_entry->ricData);
+			qdf_mem_free(session_entry->ricData);
 			session_entry->ricData = NULL;
 			session_entry->RICDataLen = 0;
 		}
 #endif
 #ifdef FEATURE_WLAN_ESE
 		if (session_entry->tspecIes != NULL) {
-			cdf_mem_free(session_entry->tspecIes);
+			qdf_mem_free(session_entry->tspecIes);
 			session_entry->tspecIes = NULL;
 			session_entry->tspecLen = 0;
 		}
@@ -436,14 +436,14 @@
 
 	if (session_entry == NULL) {
 		rsp_len = sizeof(tSirSmeJoinRsp);
-		sme_join_rsp = cdf_mem_malloc(rsp_len);
+		sme_join_rsp = qdf_mem_malloc(rsp_len);
 		if (NULL == sme_join_rsp) {
 			lim_log(mac_ctx, LOGP,
 				FL("Mem Alloc fail - JOIN/REASSOC_RSP"));
 			return;
 		}
 
-		cdf_mem_set((uint8_t *) sme_join_rsp, rsp_len, 0);
+		qdf_mem_set((uint8_t *) sme_join_rsp, rsp_len, 0);
 		sme_join_rsp->beaconLength = 0;
 		sme_join_rsp->assocReqLength = 0;
 		sme_join_rsp->assocRspLength = 0;
@@ -457,13 +457,13 @@
 			session_entry->tspecLen +
 #endif
 			sizeof(tSirSmeJoinRsp) - sizeof(uint8_t);
-		sme_join_rsp = cdf_mem_malloc(rsp_len);
+		sme_join_rsp = qdf_mem_malloc(rsp_len);
 		if (NULL == sme_join_rsp) {
 			lim_log(mac_ctx, LOGP,
 				FL("MemAlloc fail - JOIN/REASSOC_RSP"));
 			return;
 		}
-		cdf_mem_set((uint8_t *) sme_join_rsp, rsp_len, 0);
+		qdf_mem_set((uint8_t *) sme_join_rsp, rsp_len, 0);
 		if (result_code == eSIR_SME_SUCCESS) {
 			sta_ds = dph_get_hash_entry(mac_ctx,
 				DPH_STA_HASH_INDEX_PEER,
@@ -562,7 +562,7 @@
 	size = sizeof(tSirSmeStartBssRsp);
 
 	if (psessionEntry == NULL) {
-		pSirSmeRsp = cdf_mem_malloc(size);
+		pSirSmeRsp = qdf_mem_malloc(size);
 		if (NULL == pSirSmeRsp) {
 			/* / Buffer not available. Log error */
 			lim_log(pMac, LOGP,
@@ -570,7 +570,7 @@
 					("call to AllocateMemory failed for eWNI_SME_START_BSS_RSP"));
 			return;
 		}
-		cdf_mem_set((uint8_t *) pSirSmeRsp, size, 0);
+		qdf_mem_set((uint8_t *) pSirSmeRsp, size, 0);
 
 	} else {
 		/* subtract size of beaconLength + Mac Hdr + Fixed Fields before SSID */
@@ -580,7 +580,7 @@
 		/* calculate the memory size to allocate */
 		size += ieLen;
 
-		pSirSmeRsp = cdf_mem_malloc(size);
+		pSirSmeRsp = qdf_mem_malloc(size);
 		if (NULL == pSirSmeRsp) {
 			/* / Buffer not available. Log error */
 			lim_log(pMac, LOGP,
@@ -589,7 +589,7 @@
 
 			return;
 		}
-		cdf_mem_set((uint8_t *) pSirSmeRsp, size, 0);
+		qdf_mem_set((uint8_t *) pSirSmeRsp, size, 0);
 		size = sizeof(tSirSmeStartBssRsp);
 		if (resultCode == eSIR_SME_SUCCESS) {
 
@@ -618,12 +618,12 @@
 				psessionEntry->currentOperChannel;
 
 			curLen = psessionEntry->schBeaconOffsetBegin - ieOffset;
-			cdf_mem_copy((uint8_t *) &pSirSmeRsp->bssDescription.
+			qdf_mem_copy((uint8_t *) &pSirSmeRsp->bssDescription.
 				     ieFields,
 				     psessionEntry->pSchBeaconFrameBegin +
 				     ieOffset, (uint32_t) curLen);
 
-			cdf_mem_copy(((uint8_t *) &pSirSmeRsp->bssDescription.
+			qdf_mem_copy(((uint8_t *) &pSirSmeRsp->bssDescription.
 				      ieFields) + curLen,
 				     psessionEntry->pSchBeaconFrameEnd,
 				     (uint32_t) psessionEntry->
@@ -747,13 +747,13 @@
 	lim_log(pMac, LOG1, FL("send SME_SCAN_RSP (reasonCode %s)."),
 		lim_result_code_str(resultCode));
 
-	pSirSmeScanRsp = cdf_mem_malloc(sizeof(tSirSmeScanRsp));
+	pSirSmeScanRsp = qdf_mem_malloc(sizeof(tSirSmeScanRsp));
 	if (NULL == pSirSmeScanRsp) {
 		lim_log(pMac, LOGP,
 			FL("AllocateMemory failed for eWNI_SME_SCAN_RSP"));
 		return;
 	}
-	cdf_mem_set((void *)pSirSmeScanRsp, sizeof(tSirSmeScanRsp), 0);
+	qdf_mem_set((void *)pSirSmeScanRsp, sizeof(tSirSmeScanRsp), 0);
 
 	pSirSmeScanRsp->messageType = eWNI_SME_SCAN_RSP;
 	pSirSmeScanRsp->statusCode = resultCode;
@@ -820,7 +820,7 @@
 	msgLength = sizeof(tSirOemDataRsp);
 
 	/* now allocate memory for the char buffer */
-	pSirSmeOemDataRsp = cdf_mem_malloc(msgLength);
+	pSirSmeOemDataRsp = qdf_mem_malloc(msgLength);
 	if (NULL == pSirSmeOemDataRsp) {
 		lim_log(pMac, LOGP,
 			FL
@@ -836,11 +836,11 @@
 	pSirSmeOemDataRsp->messageType = eWNI_SME_OEM_DATA_RSP;
 #endif
 	pSirSmeOemDataRsp->target_rsp = pMlmOemDataRsp->target_rsp;
-	cdf_mem_copy(pSirSmeOemDataRsp->oemDataRsp, pMlmOemDataRsp->oemDataRsp,
+	qdf_mem_copy(pSirSmeOemDataRsp->oemDataRsp, pMlmOemDataRsp->oemDataRsp,
 		     OEM_DATA_RSP_SIZE);
 
 	/* Now free the memory from MLM Rsp Message */
-	cdf_mem_free(pMlmOemDataRsp);
+	qdf_mem_free(pMlmOemDataRsp);
 
 	mmhMsg.type = eWNI_SME_OEM_DATA_RSP;
 	mmhMsg.bodyptr = pSirSmeOemDataRsp;
@@ -928,7 +928,7 @@
 		 * host triggered disassociation
 		 */
 
-		pSirSmeDisassocRsp = cdf_mem_malloc(sizeof(tSirSmeDisassocRsp));
+		pSirSmeDisassocRsp = qdf_mem_malloc(sizeof(tSirSmeDisassocRsp));
 		if (NULL == pSirSmeDisassocRsp) {
 			/* Log error */
 			lim_log(pMac, LOGP, FL("Memory allocation failed"));
@@ -954,7 +954,7 @@
 		pBuf += sizeof(tSirResultCodes);
 
 		/* peerMacAddr */
-		cdf_mem_copy(pBuf, peerMacAddr, sizeof(tSirMacAddr));
+		qdf_mem_copy(pBuf, peerMacAddr, sizeof(tSirMacAddr));
 		pBuf += sizeof(tSirMacAddr);
 
 		/* Clear Station Stats */
@@ -974,7 +974,7 @@
 		 * frame reception from peer entity or due to
 		 * loss of link with peer entity.
 		 */
-		pSirSmeDisassocInd = cdf_mem_malloc(sizeof(tSirSmeDisassocInd));
+		pSirSmeDisassocInd = qdf_mem_malloc(sizeof(tSirSmeDisassocInd));
 		if (NULL == pSirSmeDisassocInd) {
 			/* Log error */
 			lim_log(pMac, LOGP, FL("Memory allocation failed"));
@@ -996,10 +996,10 @@
 		lim_copy_u32(pBuf, reasonCode);
 		pBuf += sizeof(tSirResultCodes);
 
-		cdf_mem_copy(pBuf, psessionEntry->bssId, sizeof(tSirMacAddr));
+		qdf_mem_copy(pBuf, psessionEntry->bssId, sizeof(tSirMacAddr));
 		pBuf += sizeof(tSirMacAddr);
 
-		cdf_mem_copy(pBuf, peerMacAddr, sizeof(tSirMacAddr));
+		qdf_mem_copy(pBuf, peerMacAddr, sizeof(tSirMacAddr));
 
 #ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM    /* FEATURE_WLAN_DIAG_SUPPORT */
 		lim_diag_event_report(pMac, WLAN_PE_DIAG_DISASSOC_IND_EVENT,
@@ -1042,7 +1042,7 @@
 	tSirMsgQ mmhMsg;
 	tSirSmeDisassocInd *pSirSmeDisassocInd;
 
-	pSirSmeDisassocInd = cdf_mem_malloc(sizeof(tSirSmeDisassocInd));
+	pSirSmeDisassocInd = qdf_mem_malloc(sizeof(tSirSmeDisassocInd));
 	if (NULL == pSirSmeDisassocInd) {
 		lim_log(pMac, LOGP,
 			FL("AllocateMemory failed for eWNI_SME_DISASSOC_IND"));
@@ -1057,10 +1057,10 @@
 	pSirSmeDisassocInd->statusCode = pStaDs->mlmStaContext.disassocReason;
 	pSirSmeDisassocInd->reasonCode = pStaDs->mlmStaContext.disassocReason;
 
-	cdf_mem_copy(pSirSmeDisassocInd->bssid.bytes, psessionEntry->bssId,
+	qdf_mem_copy(pSirSmeDisassocInd->bssid.bytes, psessionEntry->bssId,
 		     QDF_MAC_ADDR_SIZE);
 
-	cdf_mem_copy(pSirSmeDisassocInd->peer_macaddr.bytes, pStaDs->staAddr,
+	qdf_mem_copy(pSirSmeDisassocInd->peer_macaddr.bytes, pStaDs->staAddr,
 		     QDF_MAC_ADDR_SIZE);
 
 	pSirSmeDisassocInd->staId = pStaDs->staIndex;
@@ -1098,7 +1098,7 @@
 	tSirMsgQ mmhMsg;
 	tSirSmeDeauthInd *pSirSmeDeauthInd;
 
-	pSirSmeDeauthInd = cdf_mem_malloc(sizeof(tSirSmeDeauthInd));
+	pSirSmeDeauthInd = qdf_mem_malloc(sizeof(tSirSmeDeauthInd));
 	if (NULL == pSirSmeDeauthInd) {
 		lim_log(pMac, LOGP,
 			FL("AllocateMemory failed for eWNI_SME_DEAUTH_IND "));
@@ -1119,10 +1119,10 @@
 			(tSirResultCodes) pStaDs->mlmStaContext.disassocReason;
 	}
 	/* BSSID */
-	cdf_mem_copy(pSirSmeDeauthInd->bssid.bytes, psessionEntry->bssId,
+	qdf_mem_copy(pSirSmeDeauthInd->bssid.bytes, psessionEntry->bssId,
 		     QDF_MAC_ADDR_SIZE);
 	/* peerMacAddr */
-	cdf_mem_copy(pSirSmeDeauthInd->peer_macaddr.bytes, pStaDs->staAddr,
+	qdf_mem_copy(pSirSmeDeauthInd->peer_macaddr.bytes, pStaDs->staAddr,
 		     QDF_MAC_ADDR_SIZE);
 	pSirSmeDeauthInd->reasonCode = pStaDs->mlmStaContext.disassocReason;
 
@@ -1172,7 +1172,7 @@
 	tSirMsgQ mmhMsg;
 	tSirTdlsDelStaInd *pSirTdlsDelStaInd;
 
-	pSirTdlsDelStaInd = cdf_mem_malloc(sizeof(tSirTdlsDelStaInd));
+	pSirTdlsDelStaInd = qdf_mem_malloc(sizeof(tSirTdlsDelStaInd));
 	if (NULL == pSirTdlsDelStaInd) {
 		lim_log(pMac, LOGP,
 			FL
@@ -1187,7 +1187,7 @@
 	pSirTdlsDelStaInd->sessionId = psessionEntry->smeSessionId;
 
 	/* peerMacAddr */
-	cdf_mem_copy(pSirTdlsDelStaInd->peermac.bytes, pStaDs->staAddr,
+	qdf_mem_copy(pSirTdlsDelStaInd->peermac.bytes, pStaDs->staAddr,
 		     QDF_MAC_ADDR_SIZE);
 
 	/* staId */
@@ -1229,7 +1229,7 @@
 	tSirMsgQ mmhMsg;
 	tSirTdlsDelAllPeerInd *pSirTdlsDelAllPeerInd;
 
-	pSirTdlsDelAllPeerInd = cdf_mem_malloc(sizeof(tSirTdlsDelAllPeerInd));
+	pSirTdlsDelAllPeerInd = qdf_mem_malloc(sizeof(tSirTdlsDelAllPeerInd));
 	if (NULL == pSirTdlsDelAllPeerInd) {
 		lim_log(pMac, LOGP,
 			FL
@@ -1278,7 +1278,7 @@
 	tSirMgmtTxCompletionInd *pSirMgmtTxCompletionInd;
 
 	pSirMgmtTxCompletionInd =
-		cdf_mem_malloc(sizeof(tSirMgmtTxCompletionInd));
+		qdf_mem_malloc(sizeof(tSirMgmtTxCompletionInd));
 	if (NULL == pSirMgmtTxCompletionInd) {
 		lim_log(pMac, LOGP,
 			FL
@@ -1377,7 +1377,7 @@
 		 * Deauthentication response to host triggered
 		 * deauthentication.
 		 */
-		pSirSmeDeauthRsp = cdf_mem_malloc(sizeof(tSirSmeDeauthRsp));
+		pSirSmeDeauthRsp = qdf_mem_malloc(sizeof(tSirSmeDeauthRsp));
 		if (NULL == pSirSmeDeauthRsp) {
 			/* Log error */
 			lim_log(pMac, LOGP,
@@ -1396,7 +1396,7 @@
 		pSirSmeDeauthRsp->transactionId = smetransactionId;
 
 		pBuf = (uint8_t *) pSirSmeDeauthRsp->peer_macaddr.bytes;
-		cdf_mem_copy(pBuf, peerMacAddr, sizeof(tSirMacAddr));
+		qdf_mem_copy(pBuf, peerMacAddr, sizeof(tSirMacAddr));
 
 #ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM    /* FEATURE_WLAN_DIAG_SUPPORT */
 		lim_diag_event_report(pMac, WLAN_PE_DIAG_DEAUTH_RSP_EVENT,
@@ -1412,7 +1412,7 @@
 		 * frame reception from peer entity or due to
 		 * loss of link with peer entity.
 		 */
-		pSirSmeDeauthInd = cdf_mem_malloc(sizeof(tSirSmeDeauthInd));
+		pSirSmeDeauthInd = qdf_mem_malloc(sizeof(tSirSmeDeauthInd));
 		if (NULL == pSirSmeDeauthInd) {
 			/* Log error */
 			lim_log(pMac, LOGP,
@@ -1441,11 +1441,11 @@
 		pBuf += sizeof(tSirResultCodes);
 
 		/* bssId */
-		cdf_mem_copy(pBuf, psessionEntry->bssId, sizeof(tSirMacAddr));
+		qdf_mem_copy(pBuf, psessionEntry->bssId, sizeof(tSirMacAddr));
 		pBuf += sizeof(tSirMacAddr);
 
 		/* peerMacAddr */
-		cdf_mem_copy(pSirSmeDeauthInd->peer_macaddr.bytes, peerMacAddr,
+		qdf_mem_copy(pSirSmeDeauthInd->peer_macaddr.bytes, peerMacAddr,
 			     QDF_MAC_ADDR_SIZE);
 
 #ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM    /* FEATURE_WLAN_DIAG_SUPPORT */
@@ -1490,7 +1490,7 @@
 	tSirMsgQ msg;
 	tSirSmeWmStatusChangeNtf *wm_status_change_ntf;
 
-	wm_status_change_ntf = cdf_mem_malloc(sizeof(tSirSmeWmStatusChangeNtf));
+	wm_status_change_ntf = qdf_mem_malloc(sizeof(tSirSmeWmStatusChangeNtf));
 	if (NULL == wm_status_change_ntf) {
 		lim_log(mac_ctx, LOGE,
 			FL("Mem Alloc failed - eWNI_SME_WM_STATUS_CHANGE_NTF"));
@@ -1512,7 +1512,7 @@
 		wm_status_change_ntf->sessionId = session_id;
 		if (sizeof(wm_status_change_ntf->statusChangeInfo) >=
 			info_len) {
-			cdf_mem_copy(
+			qdf_mem_copy(
 			    (uint8_t *) &wm_status_change_ntf->statusChangeInfo,
 			    (uint8_t *) status_change_info, info_len);
 		}
@@ -1524,7 +1524,7 @@
 
 	MTRACE(mac_trace_msg_tx(mac_ctx, session_id, msg.type));
 	if (eSIR_SUCCESS != lim_sys_process_mmh_msg_api(mac_ctx, &msg, ePROT)) {
-		cdf_mem_free(wm_status_change_ntf);
+		qdf_mem_free(wm_status_change_ntf);
 		lim_log(mac_ctx, LOGP,
 			FL("lim_sys_process_mmh_msg_api failed"));
 	}
@@ -1567,7 +1567,7 @@
 	tSirMsgQ mmhMsg;
 	tSirSmeSetContextRsp *pSirSmeSetContextRsp;
 
-	pSirSmeSetContextRsp = cdf_mem_malloc(sizeof(tSirSmeSetContextRsp));
+	pSirSmeSetContextRsp = qdf_mem_malloc(sizeof(tSirSmeSetContextRsp));
 	if (NULL == pSirSmeSetContextRsp) {
 		/* Log error */
 		lim_log(pMac, LOGP,
@@ -1664,7 +1664,7 @@
 	 */
 	val = pBssDescr->bssDescription.length + sizeof(uint16_t) +
 		sizeof(uint32_t) + sizeof(uint8_t);
-	pNewBssInd = cdf_mem_malloc(val);
+	pNewBssInd = qdf_mem_malloc(val);
 	if (NULL == pNewBssInd) {
 		/* Log error */
 		lim_log(pMac, LOGP,
@@ -1678,7 +1678,7 @@
 	pNewBssInd->length = (uint16_t) val;
 	pNewBssInd->sessionId = 0;
 
-	cdf_mem_copy((uint8_t *) pNewBssInd->bssDescription,
+	qdf_mem_copy((uint8_t *) pNewBssInd->bssDescription,
 		     (uint8_t *) &pBssDescr->bssDescription,
 		     pBssDescr->bssDescription.length + sizeof(uint16_t));
 
@@ -1710,13 +1710,13 @@
 	if (!rspReqd)
 		return;
 
-	rsp = cdf_mem_malloc(sizeof(tSirAddtsRsp));
+	rsp = qdf_mem_malloc(sizeof(tSirAddtsRsp));
 	if (NULL == rsp) {
 		lim_log(pMac, LOGP, FL("AllocateMemory failed for ADDTS_RSP"));
 		return;
 	}
 
-	cdf_mem_set((uint8_t *) rsp, sizeof(*rsp), 0);
+	qdf_mem_set((uint8_t *) rsp, sizeof(*rsp), 0);
 	rsp->messageType = eWNI_SME_ADDTS_RSP;
 	rsp->rc = status;
 	rsp->rsp.status = (enum eSirMacStatusCodes)status;
@@ -1758,19 +1758,19 @@
 	if (!delts->rspReqd)
 		return;
 
-	rsp = cdf_mem_malloc(sizeof(tSirDeltsRsp));
+	rsp = qdf_mem_malloc(sizeof(tSirDeltsRsp));
 	if (NULL == rsp) {
 		/* Log error */
 		lim_log(pMac, LOGP, FL("AllocateMemory failed for DELTS_RSP"));
 		return;
 	}
-	cdf_mem_set((uint8_t *) rsp, sizeof(*rsp), 0);
+	qdf_mem_set((uint8_t *) rsp, sizeof(*rsp), 0);
 
 	if (psessionEntry != NULL) {
 
 		rsp->aid = delts->aid;
 		qdf_copy_macaddr(&rsp->macaddr, &delts->macaddr);
-		cdf_mem_copy((uint8_t *) &rsp->rsp, (uint8_t *) &delts->req,
+		qdf_mem_copy((uint8_t *) &rsp->rsp, (uint8_t *) &delts->req,
 			     sizeof(tSirDeltsReqInfo));
 	}
 
@@ -1808,18 +1808,18 @@
 	lim_log(pMac, LOGW, "SendSmeDeltsInd (aid %d, tsid %d, up %d)",
 		aid, delts->tsinfo.traffic.tsid, delts->tsinfo.traffic.userPrio);
 
-	rsp = cdf_mem_malloc(sizeof(tSirDeltsRsp));
+	rsp = qdf_mem_malloc(sizeof(tSirDeltsRsp));
 	if (NULL == rsp) {
 		/* Log error */
 		lim_log(pMac, LOGP, FL("AllocateMemory failed for DELTS_IND"));
 		return;
 	}
-	cdf_mem_set((uint8_t *) rsp, sizeof(*rsp), 0);
+	qdf_mem_set((uint8_t *) rsp, sizeof(*rsp), 0);
 
 	rsp->messageType = eWNI_SME_DELTS_IND;
 	rsp->rc = eSIR_SUCCESS;
 	rsp->aid = aid;
-	cdf_mem_copy((uint8_t *) &rsp->rsp, (uint8_t *) delts, sizeof(*delts));
+	qdf_mem_copy((uint8_t *) &rsp->rsp, (uint8_t *) delts, sizeof(*delts));
 
 	/* Update SME  session Id and SME transaction Id */
 
@@ -1964,16 +1964,16 @@
 	tSirMsgQ mmhMsg;
 	tSmeIbssPeerInd *pNewPeerInd;
 
-	pNewPeerInd = cdf_mem_malloc(sizeof(tSmeIbssPeerInd) + beaconLen);
+	pNewPeerInd = qdf_mem_malloc(sizeof(tSmeIbssPeerInd) + beaconLen);
 	if (NULL == pNewPeerInd) {
 		PELOGE(lim_log(pMac, LOGE, FL("Failed to allocate memory"));)
 		return;
 	}
 
-	cdf_mem_set((void *)pNewPeerInd, (sizeof(tSmeIbssPeerInd) + beaconLen),
+	qdf_mem_set((void *)pNewPeerInd, (sizeof(tSmeIbssPeerInd) + beaconLen),
 		    0);
 
-	cdf_mem_copy((uint8_t *) pNewPeerInd->peer_addr.bytes,
+	qdf_mem_copy((uint8_t *) pNewPeerInd->peer_addr.bytes,
 		     peerMacAddr, QDF_MAC_ADDR_SIZE);
 	pNewPeerInd->staId = staIndex;
 	pNewPeerInd->ucastSig = ucastIdx;
@@ -1983,7 +1983,7 @@
 	pNewPeerInd->sessionId = sessionId;
 
 	if (beacon != NULL) {
-		cdf_mem_copy((void *)((uint8_t *) pNewPeerInd +
+		qdf_mem_copy((void *)((uint8_t *) pNewPeerInd +
 				      sizeof(tSmeIbssPeerInd)), (void *)beacon,
 			     beaconLen);
 	}
@@ -2181,17 +2181,17 @@
 			session_entry->gLimChannelSwitch.ch_width);
 
 		lim_prepare_for11h_channel_switch(mac_ctx, session_entry);
-		csa_offload_ind = cdf_mem_malloc(sizeof(tSmeCsaOffloadInd));
+		csa_offload_ind = qdf_mem_malloc(sizeof(tSmeCsaOffloadInd));
 		if (NULL == csa_offload_ind) {
 			lim_log(mac_ctx, LOGE,
 				FL("memalloc fail eWNI_SME_CSA_OFFLOAD_EVENT"));
 			goto err;
 		}
 
-		cdf_mem_set(csa_offload_ind, sizeof(tSmeCsaOffloadInd), 0);
+		qdf_mem_set(csa_offload_ind, sizeof(tSmeCsaOffloadInd), 0);
 		csa_offload_ind->mesgType = eWNI_SME_CSA_OFFLOAD_EVENT;
 		csa_offload_ind->mesgLen = sizeof(tSmeCsaOffloadInd);
-		cdf_mem_copy(csa_offload_ind->bssid.bytes, session_entry->bssId,
+		qdf_mem_copy(csa_offload_ind->bssid.bytes, session_entry->bssId,
 				QDF_MAC_ADDR_SIZE);
 		mmh_msg.type = eWNI_SME_CSA_OFFLOAD_EVENT;
 		mmh_msg.bodyptr = csa_offload_ind;
@@ -2209,7 +2209,7 @@
 	}
 
 err:
-	cdf_mem_free(csa_params);
+	qdf_mem_free(csa_params);
 }
 
 /*--------------------------------------------------------------------------
@@ -2278,13 +2278,13 @@
 	tSirMsgQ mmhMsg;
 	tSmeMaxAssocInd *pSmeMaxAssocInd;
 
-	pSmeMaxAssocInd = cdf_mem_malloc(sizeof(tSmeMaxAssocInd));
+	pSmeMaxAssocInd = qdf_mem_malloc(sizeof(tSmeMaxAssocInd));
 	if (NULL == pSmeMaxAssocInd) {
 		PELOGE(lim_log(pMac, LOGE, FL("Failed to allocate memory"));)
 		return;
 	}
-	cdf_mem_set((void *)pSmeMaxAssocInd, sizeof(tSmeMaxAssocInd), 0);
-	cdf_mem_copy((uint8_t *) pSmeMaxAssocInd->peer_mac.bytes,
+	qdf_mem_set((void *)pSmeMaxAssocInd, sizeof(tSmeMaxAssocInd), 0);
+	qdf_mem_copy((uint8_t *) pSmeMaxAssocInd->peer_mac.bytes,
 		     (uint8_t *) peerMacAddr, QDF_MAC_ADDR_SIZE);
 	pSmeMaxAssocInd->mesgType = eWNI_SME_MAX_ASSOC_EXCEEDED;
 	pSmeMaxAssocInd->mesgLen = sizeof(tSmeMaxAssocInd);
@@ -2375,17 +2375,17 @@
 	uint8_t channelId;
 
 	pSmeSwithChnlParams = (tSwitchChannelParams *)
-			      cdf_mem_malloc(sizeof(tSwitchChannelParams));
+			      qdf_mem_malloc(sizeof(tSwitchChannelParams));
 	if (NULL == pSmeSwithChnlParams) {
 		lim_log(pMac, LOGP,
 			FL("AllocateMemory failed for pSmeSwithChnlParams\n"));
 		return;
 	}
 
-	cdf_mem_set((void *)pSmeSwithChnlParams,
+	qdf_mem_set((void *)pSmeSwithChnlParams,
 		    sizeof(tSwitchChannelParams), 0);
 
-	cdf_mem_copy(pSmeSwithChnlParams, pChnlParams,
+	qdf_mem_copy(pSmeSwithChnlParams, pChnlParams,
 		     sizeof(tSwitchChannelParams));
 
 	channelId = pSmeSwithChnlParams->channelNumber;
@@ -2476,7 +2476,7 @@
 			psessionEntry->dfsIncludeChanWrapperIe = false;
 
 			pChanSwTxResponse = (tSirSmeCSAIeTxCompleteRsp *)
-					    cdf_mem_malloc(length);
+					    qdf_mem_malloc(length);
 
 			if (NULL == pChanSwTxResponse) {
 				lim_log(pMac, LOGP,
@@ -2485,7 +2485,7 @@
 				return;
 			}
 
-			cdf_mem_set((void *)pChanSwTxResponse, length, 0);
+			qdf_mem_set((void *)pChanSwTxResponse, length, 0);
 			pChanSwTxResponse->sessionId =
 				psessionEntry->smeSessionId;
 			pChanSwTxResponse->chanSwIeTxStatus =
@@ -2503,14 +2503,14 @@
 		/* Done with nss update, send response back to SME */
 		psessionEntry->gLimOperatingMode.present = 0;
 		beacon_tx_comp_rsp_ptr = (struct sir_beacon_tx_complete_rsp *)
-				cdf_mem_malloc(sizeof(*beacon_tx_comp_rsp_ptr));
+				qdf_mem_malloc(sizeof(*beacon_tx_comp_rsp_ptr));
 		if (NULL == beacon_tx_comp_rsp_ptr) {
 			lim_log(pMac, LOGP,
 				FL
 				("AllocateMemory failed for beacon_tx_comp_rsp_ptr"));
 			return;
 		}
-		cdf_mem_set((void *)beacon_tx_comp_rsp_ptr,
+		qdf_mem_set((void *)beacon_tx_comp_rsp_ptr,
 					sizeof(*beacon_tx_comp_rsp_ptr), 0);
 		beacon_tx_comp_rsp_ptr->session_id =
 			psessionEntry->smeSessionId;
diff --git a/core/mac/src/pe/lim/lim_session.c b/core/mac/src/pe/lim/lim_session.c
index c2e5dc0..7d85ec1 100644
--- a/core/mac/src/pe/lim/lim_session.c
+++ b/core/mac/src/pe/lim/lim_session.c
@@ -74,19 +74,19 @@
 	psessionEntry->beaconParams.gHTObssMode = 0;
 
 	/* Number of legacy STAs associated */
-	cdf_mem_set((void *)&psessionEntry->gLim11bParams,
+	qdf_mem_set((void *)&psessionEntry->gLim11bParams,
 		    sizeof(tLimProtStaParams), 0);
-	cdf_mem_set((void *)&psessionEntry->gLim11aParams,
+	qdf_mem_set((void *)&psessionEntry->gLim11aParams,
 		    sizeof(tLimProtStaParams), 0);
-	cdf_mem_set((void *)&psessionEntry->gLim11gParams,
+	qdf_mem_set((void *)&psessionEntry->gLim11gParams,
 		    sizeof(tLimProtStaParams), 0);
-	cdf_mem_set((void *)&psessionEntry->gLimNonGfParams,
+	qdf_mem_set((void *)&psessionEntry->gLimNonGfParams,
 		    sizeof(tLimProtStaParams), 0);
-	cdf_mem_set((void *)&psessionEntry->gLimHt20Params,
+	qdf_mem_set((void *)&psessionEntry->gLimHt20Params,
 		    sizeof(tLimProtStaParams), 0);
-	cdf_mem_set((void *)&psessionEntry->gLimLsigTxopParams,
+	qdf_mem_set((void *)&psessionEntry->gLimLsigTxopParams,
 		    sizeof(tLimProtStaParams), 0);
-	cdf_mem_set((void *)&psessionEntry->gLimOlbcParams,
+	qdf_mem_set((void *)&psessionEntry->gLimOlbcParams,
 		    sizeof(tLimProtStaParams), 0);
 }
 
@@ -133,34 +133,34 @@
 		  pe_session_entry->old_protection_state,
 		  current_protection_state);
 
-	cdf_mem_zero(&pe_session_entry->gLimOverlap11gParams,
+	qdf_mem_zero(&pe_session_entry->gLimOverlap11gParams,
 		     sizeof(pe_session_entry->gLimOverlap11gParams));
-	cdf_mem_zero(&pe_session_entry->gLimOverlap11aParams,
+	qdf_mem_zero(&pe_session_entry->gLimOverlap11aParams,
 		     sizeof(pe_session_entry->gLimOverlap11aParams));
-	cdf_mem_zero(&pe_session_entry->gLimOverlapHt20Params,
+	qdf_mem_zero(&pe_session_entry->gLimOverlapHt20Params,
 		     sizeof(pe_session_entry->gLimOverlapHt20Params));
-	cdf_mem_zero(&pe_session_entry->gLimOverlapNonGfParams,
+	qdf_mem_zero(&pe_session_entry->gLimOverlapNonGfParams,
 		     sizeof(pe_session_entry->gLimOverlapNonGfParams));
 
-	cdf_mem_zero(&pe_session_entry->gLimOlbcParams,
+	qdf_mem_zero(&pe_session_entry->gLimOlbcParams,
 		     sizeof(pe_session_entry->gLimOlbcParams));
 
-	cdf_mem_zero(&pe_session_entry->beaconParams,
+	qdf_mem_zero(&pe_session_entry->beaconParams,
 		     sizeof(pe_session_entry->beaconParams));
 
-	cdf_mem_zero(&mac_ctx->lim.gLimOverlap11gParams,
+	qdf_mem_zero(&mac_ctx->lim.gLimOverlap11gParams,
 		     sizeof(mac_ctx->lim.gLimOverlap11gParams));
-	cdf_mem_zero(&mac_ctx->lim.gLimOverlap11aParams,
+	qdf_mem_zero(&mac_ctx->lim.gLimOverlap11aParams,
 		     sizeof(mac_ctx->lim.gLimOverlap11aParams));
-	cdf_mem_zero(&mac_ctx->lim.gLimOverlapHt20Params,
+	qdf_mem_zero(&mac_ctx->lim.gLimOverlapHt20Params,
 		     sizeof(mac_ctx->lim.gLimOverlapHt20Params));
-	cdf_mem_zero(&mac_ctx->lim.gLimOverlapNonGfParams,
+	qdf_mem_zero(&mac_ctx->lim.gLimOverlapNonGfParams,
 		     sizeof(mac_ctx->lim.gLimOverlapNonGfParams));
 
 	old_op_mode = pe_session_entry->htOperMode;
 	pe_session_entry->htOperMode = eSIR_HT_OP_MODE_PURE;
 
-	cdf_mem_zero(&beacon_params, sizeof(tUpdateBeaconParams));
+	qdf_mem_zero(&beacon_params, sizeof(tUpdateBeaconParams));
 	/* index 0, is self node, peers start from 1 */
 	for (i = 1 ; i <= mac_ctx->lim.gLimAssocStaLimit ; i++) {
 		station_hash_node = dph_get_hash_entry(mac_ctx, i,
@@ -181,7 +181,7 @@
 			  QDF_TRACE_LEVEL_ERROR,
 			  FL("protection changed, update beacon template\n"));
 		/* update beacon fix params and send update to FW */
-		cdf_mem_zero(&beacon_params, sizeof(tUpdateBeaconParams));
+		qdf_mem_zero(&beacon_params, sizeof(tUpdateBeaconParams));
 		beacon_params.bssIdx = pe_session_entry->bssIdx;
 		beacon_params.fShortPreamble =
 				pe_session_entry->beaconParams.fShortPreamble;
@@ -258,20 +258,20 @@
 	}
 
 	session_ptr = &pMac->lim.gpSession[i];
-	cdf_mem_set((void *)session_ptr, sizeof(tPESession), 0);
+	qdf_mem_set((void *)session_ptr, sizeof(tPESession), 0);
 	/* Allocate space for Station Table for this session. */
 	session_ptr->dph.dphHashTable.pHashTable =
-		cdf_mem_malloc(sizeof(tpDphHashNode) * (numSta + 1));
+		qdf_mem_malloc(sizeof(tpDphHashNode) * (numSta + 1));
 	if (NULL == session_ptr->dph.dphHashTable.pHashTable) {
 		lim_log(pMac, LOGE, FL("memory allocate failed!"));
 		return NULL;
 	}
 
 	session_ptr->dph.dphHashTable.pDphNodeArray =
-		cdf_mem_malloc(sizeof(tDphHashNode) * (numSta + 1));
+		qdf_mem_malloc(sizeof(tDphHashNode) * (numSta + 1));
 	if (NULL == session_ptr->dph.dphHashTable.pDphNodeArray) {
 		lim_log(pMac, LOGE, FL("memory allocate failed!"));
-		cdf_mem_free(session_ptr->dph.dphHashTable.pHashTable);
+		qdf_mem_free(session_ptr->dph.dphHashTable.pHashTable);
 		session_ptr->dph.dphHashTable.
 		pHashTable = NULL;
 		return NULL;
@@ -279,17 +279,17 @@
 
 	session_ptr->dph.dphHashTable.size = numSta + 1;
 	dph_hash_table_class_init(pMac, &session_ptr->dph.dphHashTable);
-	session_ptr->gpLimPeerIdxpool = cdf_mem_malloc(
+	session_ptr->gpLimPeerIdxpool = qdf_mem_malloc(
 		sizeof(*(session_ptr->gpLimPeerIdxpool)) * (numSta + 1));
 	if (NULL == session_ptr->gpLimPeerIdxpool) {
 		lim_log(pMac, LOGE, FL("memory allocate failed!"));
-		cdf_mem_free(session_ptr->dph.dphHashTable.pHashTable);
-		cdf_mem_free(session_ptr->dph.dphHashTable.pDphNodeArray);
+		qdf_mem_free(session_ptr->dph.dphHashTable.pHashTable);
+		qdf_mem_free(session_ptr->dph.dphHashTable.pDphNodeArray);
 		session_ptr->dph.dphHashTable.pHashTable = NULL;
 		session_ptr->dph.dphHashTable.pDphNodeArray = NULL;
 		return NULL;
 	}
-	cdf_mem_set(session_ptr->gpLimPeerIdxpool,
+	qdf_mem_set(session_ptr->gpLimPeerIdxpool,
 		    sizeof(*session_ptr->gpLimPeerIdxpool) * (numSta + 1),
 		    0);
 	session_ptr->freePeerIdxHead = 0;
@@ -318,7 +318,7 @@
 	session_ptr->htRecommendedTxWidthSet = 0;
 	session_ptr->htSecondaryChannelOffset = 0;
 #ifdef FEATURE_WLAN_TDLS
-	cdf_mem_set(session_ptr->peerAIDBitmap,
+	qdf_mem_set(session_ptr->peerAIDBitmap,
 		    sizeof(session_ptr->peerAIDBitmap), 0);
 	session_ptr->tdls_prohibited = false;
 	session_ptr->tdls_chan_swit_prohibited = false;
@@ -334,21 +334,21 @@
 	    || eSIR_IBSS_MODE == bssType
 	    || eSIR_BTAMP_AP_MODE == bssType) {
 		session_ptr->pSchProbeRspTemplate =
-			cdf_mem_malloc(SCH_MAX_PROBE_RESP_SIZE);
+			qdf_mem_malloc(SCH_MAX_PROBE_RESP_SIZE);
 		session_ptr->pSchBeaconFrameBegin =
-			cdf_mem_malloc(SCH_MAX_BEACON_SIZE);
+			qdf_mem_malloc(SCH_MAX_BEACON_SIZE);
 		session_ptr->pSchBeaconFrameEnd =
-			cdf_mem_malloc(SCH_MAX_BEACON_SIZE);
+			qdf_mem_malloc(SCH_MAX_BEACON_SIZE);
 		if ((NULL == session_ptr->pSchProbeRspTemplate)
 		    || (NULL == session_ptr->pSchBeaconFrameBegin)
 		    || (NULL == session_ptr->pSchBeaconFrameEnd)) {
 			lim_log(pMac, LOGE, FL("memory allocate failed!"));
-			cdf_mem_free(session_ptr->dph.dphHashTable.pHashTable);
-			cdf_mem_free(session_ptr->dph.dphHashTable.pDphNodeArray);
-			cdf_mem_free(session_ptr->gpLimPeerIdxpool);
-			cdf_mem_free(session_ptr->pSchProbeRspTemplate);
-			cdf_mem_free(session_ptr->pSchBeaconFrameBegin);
-			cdf_mem_free(session_ptr->pSchBeaconFrameEnd);
+			qdf_mem_free(session_ptr->dph.dphHashTable.pHashTable);
+			qdf_mem_free(session_ptr->dph.dphHashTable.pDphNodeArray);
+			qdf_mem_free(session_ptr->gpLimPeerIdxpool);
+			qdf_mem_free(session_ptr->pSchProbeRspTemplate);
+			qdf_mem_free(session_ptr->pSchBeaconFrameBegin);
+			qdf_mem_free(session_ptr->pSchBeaconFrameEnd);
 
 			session_ptr->dph.dphHashTable.pHashTable = NULL;
 			session_ptr->dph.dphHashTable.pDphNodeArray = NULL;
@@ -559,54 +559,54 @@
 	lim_ft_cleanup(mac_ctx, session);
 #endif
 	if (session->pLimStartBssReq != NULL) {
-		cdf_mem_free(session->pLimStartBssReq);
+		qdf_mem_free(session->pLimStartBssReq);
 		session->pLimStartBssReq = NULL;
 	}
 
 	if (session->pLimJoinReq != NULL) {
-		cdf_mem_free(session->pLimJoinReq);
+		qdf_mem_free(session->pLimJoinReq);
 		session->pLimJoinReq = NULL;
 	}
 
 	if (session->pLimReAssocReq != NULL) {
-		cdf_mem_free(session->pLimReAssocReq);
+		qdf_mem_free(session->pLimReAssocReq);
 		session->pLimReAssocReq = NULL;
 	}
 
 	if (session->pLimMlmJoinReq != NULL) {
-		cdf_mem_free(session->pLimMlmJoinReq);
+		qdf_mem_free(session->pLimMlmJoinReq);
 		session->pLimMlmJoinReq = NULL;
 	}
 
 	if (session->dph.dphHashTable.pHashTable != NULL) {
-		cdf_mem_free(session->dph.dphHashTable.pHashTable);
+		qdf_mem_free(session->dph.dphHashTable.pHashTable);
 		session->dph.dphHashTable.pHashTable = NULL;
 	}
 
 	if (session->dph.dphHashTable.pDphNodeArray != NULL) {
-		cdf_mem_free(session->dph.dphHashTable.pDphNodeArray);
+		qdf_mem_free(session->dph.dphHashTable.pDphNodeArray);
 		session->dph.dphHashTable.pDphNodeArray = NULL;
 	}
 
 	if (session->gpLimPeerIdxpool != NULL) {
-		cdf_mem_free(session->gpLimPeerIdxpool);
+		qdf_mem_free(session->gpLimPeerIdxpool);
 		session->gpLimPeerIdxpool = NULL;
 	}
 
 	if (session->beacon != NULL) {
-		cdf_mem_free(session->beacon);
+		qdf_mem_free(session->beacon);
 		session->beacon = NULL;
 		session->bcnLen = 0;
 	}
 
 	if (session->assocReq != NULL) {
-		cdf_mem_free(session->assocReq);
+		qdf_mem_free(session->assocReq);
 		session->assocReq = NULL;
 		session->assocReqLen = 0;
 	}
 
 	if (session->assocRsp != NULL) {
-		cdf_mem_free(session->assocRsp);
+		qdf_mem_free(session->assocRsp);
 		session->assocRsp = NULL;
 		session->assocRspLen = 0;
 	}
@@ -620,58 +620,58 @@
 			tmp_ptr = ((tpSirAssocReq)
 				  (session->parsedAssocReq[i]));
 			if (tmp_ptr->assocReqFrame) {
-				cdf_mem_free(tmp_ptr->assocReqFrame);
+				qdf_mem_free(tmp_ptr->assocReqFrame);
 				tmp_ptr->assocReqFrame = NULL;
 				tmp_ptr->assocReqFrameLength = 0;
 			}
-			cdf_mem_free(session->parsedAssocReq[i]);
+			qdf_mem_free(session->parsedAssocReq[i]);
 			session->parsedAssocReq[i] = NULL;
 		}
 		/* Cleanup the whole block */
-		cdf_mem_free(session->parsedAssocReq);
+		qdf_mem_free(session->parsedAssocReq);
 		session->parsedAssocReq = NULL;
 	}
 	if (NULL != session->limAssocResponseData) {
-		cdf_mem_free(session->limAssocResponseData);
+		qdf_mem_free(session->limAssocResponseData);
 		session->limAssocResponseData = NULL;
 	}
 	if (NULL != session->pLimMlmReassocRetryReq) {
-		cdf_mem_free(session->pLimMlmReassocRetryReq);
+		qdf_mem_free(session->pLimMlmReassocRetryReq);
 		session->pLimMlmReassocRetryReq = NULL;
 	}
 	if (NULL != session->pLimMlmReassocReq) {
-		cdf_mem_free(session->pLimMlmReassocReq);
+		qdf_mem_free(session->pLimMlmReassocReq);
 		session->pLimMlmReassocReq = NULL;
 	}
 
 	if (NULL != session->pSchProbeRspTemplate) {
-		cdf_mem_free(session->pSchProbeRspTemplate);
+		qdf_mem_free(session->pSchProbeRspTemplate);
 		session->pSchProbeRspTemplate = NULL;
 	}
 
 	if (NULL != session->pSchBeaconFrameBegin) {
-		cdf_mem_free(session->pSchBeaconFrameBegin);
+		qdf_mem_free(session->pSchBeaconFrameBegin);
 		session->pSchBeaconFrameBegin = NULL;
 	}
 
 	if (NULL != session->pSchBeaconFrameEnd) {
-		cdf_mem_free(session->pSchBeaconFrameEnd);
+		qdf_mem_free(session->pSchBeaconFrameEnd);
 		session->pSchBeaconFrameEnd = NULL;
 	}
 
 	/* Must free the buffer before peSession invalid */
 	if (NULL != session->addIeParams.probeRespData_buff) {
-		cdf_mem_free(session->addIeParams.probeRespData_buff);
+		qdf_mem_free(session->addIeParams.probeRespData_buff);
 		session->addIeParams.probeRespData_buff = NULL;
 		session->addIeParams.probeRespDataLen = 0;
 	}
 	if (NULL != session->addIeParams.assocRespData_buff) {
-		cdf_mem_free(session->addIeParams.assocRespData_buff);
+		qdf_mem_free(session->addIeParams.assocRespData_buff);
 		session->addIeParams.assocRespData_buff = NULL;
 		session->addIeParams.assocRespDataLen = 0;
 	}
 	if (NULL != session->addIeParams.probeRespBCNData_buff) {
-		cdf_mem_free(session->addIeParams.probeRespBCNData_buff);
+		qdf_mem_free(session->addIeParams.probeRespBCNData_buff);
 		session->addIeParams.probeRespBCNData_buff = NULL;
 		session->addIeParams.probeRespBCNDataLen = 0;
 	}
diff --git a/core/mac/src/pe/lim/lim_sme_req_utils.c b/core/mac/src/pe/lim/lim_sme_req_utils.c
index 88c021e..fc26863 100644
--- a/core/mac/src/pe/lim/lim_sme_req_utils.c
+++ b/core/mac/src/pe/lim/lim_sme_req_utils.c
@@ -543,7 +543,7 @@
 	   Reject Join Req if the Self Mac Address and
 	   the Ap's Mac Address is same
 	 */
-	if (cdf_mem_compare((uint8_t *) pJoinReq->selfMacAddr,
+	if (!qdf_mem_cmp((uint8_t *) pJoinReq->selfMacAddr,
 			    (uint8_t *) pJoinReq->bssDescription.bssId,
 			    (uint8_t) (sizeof(tSirMacAddr)))) {
 		/* Log the event */
diff --git a/core/mac/src/pe/lim/lim_timer_utils.c b/core/mac/src/pe/lim/lim_timer_utils.c
index 185e6bb..92fa504 100644
--- a/core/mac/src/pe/lim/lim_timer_utils.c
+++ b/core/mac/src/pe/lim/lim_timer_utils.c
@@ -300,7 +300,7 @@
 		lim_log(pMac, LOGP, FL("could not retrieve mac preauth value"));
 	pMac->lim.gLimPreAuthTimerTable.numEntry = cfgValue;
 	pMac->lim.gLimPreAuthTimerTable.pTable =
-		cdf_mem_malloc(cfgValue * sizeof(tLimPreAuthNode));
+		qdf_mem_malloc(cfgValue * sizeof(tLimPreAuthNode));
 
 	if (pMac->lim.gLimPreAuthTimerTable.pTable == NULL) {
 		lim_log(pMac, LOGP, FL("AllocateMemory failed!"));
@@ -427,7 +427,7 @@
 	tx_timer_delete(&pMac->lim.limTimers.gLimActiveToPassiveChannelTimer);
 
 	if (NULL != pMac->lim.gLimPreAuthTimerTable.pTable) {
-		cdf_mem_free(pMac->lim.gLimPreAuthTimerTable.pTable);
+		qdf_mem_free(pMac->lim.gLimPreAuthTimerTable.pTable);
 		pMac->lim.gLimPreAuthTimerTable.pTable = NULL;
 	}
 	return TX_TIMER_ERROR;
@@ -471,7 +471,8 @@
 	msg.bodyptr = NULL;
 	msg.bodyval = 0;
 
-	if ((statusCode = lim_post_msg_api(pMac, &msg)) != eSIR_SUCCESS)
+	statusCode = lim_post_msg_api(pMac, &msg);
+	if (statusCode != eSIR_SUCCESS)
 		lim_log(pMac, LOGE,
 			FL("posting message %X to LIM failed, reason=%d"),
 			msg.type, statusCode);
@@ -583,7 +584,7 @@
 				FL("Reassoc request retry MAX(%d) reached"),
 				LIM_MAX_REASSOC_RETRY_LIMIT);
 			if (NULL != session->pLimMlmReassocRetryReq) {
-				cdf_mem_free(session->pLimMlmReassocRetryReq);
+				qdf_mem_free(session->pLimMlmReassocRetryReq);
 				session->pLimMlmReassocRetryReq = NULL;
 			}
 		}
@@ -1274,7 +1275,8 @@
 	msg.bodyval = 0;
 	msg.bodyptr = NULL;
 
-	if ((statusCode = lim_post_msg_api(pMac, &msg)) != eSIR_SUCCESS)
+	statusCode = lim_post_msg_api(pMac, &msg);
+	if (statusCode != eSIR_SUCCESS)
 		lim_log(pMac, LOGE,
 			FL("posting to LIM failed, reason=%d"), statusCode);
 
@@ -1308,7 +1310,8 @@
 	msg.bodyval = (uint32_t) param;
 	msg.bodyptr = NULL;
 
-	if ((statusCode = lim_post_msg_api(pMac, &msg)) != eSIR_SUCCESS)
+	statusCode = lim_post_msg_api(pMac, &msg);
+	if (statusCode != eSIR_SUCCESS)
 		lim_log(pMac, LOGE,
 			FL("posting to LIM failed, reason=%d"), statusCode);
 
diff --git a/core/mac/src/pe/lim/lim_types.h b/core/mac/src/pe/lim/lim_types.h
index 40e91cf..ed6e61c 100644
--- a/core/mac/src/pe/lim/lim_types.h
+++ b/core/mac/src/pe/lim/lim_types.h
@@ -114,11 +114,11 @@
 #define LIM_MIN_MEM_ASSOC       4
 
 /* / Verifies whether given mac addr matches the CURRENT Bssid */
-#define IS_CURRENT_BSSID(pMac, addr, psessionEntry)  (cdf_mem_compare(addr, \
+#define IS_CURRENT_BSSID(pMac, addr, psessionEntry)  (!qdf_mem_cmp(addr, \
 								      psessionEntry->bssId, \
 								      sizeof(psessionEntry->bssId)))
 /* / Verifies whether given addr matches the REASSOC Bssid */
-#define IS_REASSOC_BSSID(pMac, addr, psessionEntry)  (cdf_mem_compare(addr, \
+#define IS_REASSOC_BSSID(pMac, addr, psessionEntry)  (!qdf_mem_cmp(addr, \
 								      psessionEntry->limReAssocbssId, \
 								      sizeof(psessionEntry->limReAssocbssId)))
 
diff --git a/core/mac/src/pe/lim/lim_utils.c b/core/mac/src/pe/lim/lim_utils.c
index 2e71821..d259646 100644
--- a/core/mac/src/pe/lim/lim_utils.c
+++ b/core/mac/src/pe/lim/lim_utils.c
@@ -78,7 +78,7 @@
 		pCurrNode = pMac->lim.pDialogueTokenHead;
 		pMac->lim.pDialogueTokenHead =
 			pMac->lim.pDialogueTokenHead->next;
-		cdf_mem_free(pCurrNode);
+		qdf_mem_free(pCurrNode);
 		pCurrNode = NULL;
 	}
 	pMac->lim.pDialogueTokenTail = NULL;
@@ -956,7 +956,7 @@
 		mac_ctx->lim.gLimDeferredMsgQ.write = 0;
 
 	/* save the message to the queue and advanced the write pointer */
-	cdf_mem_copy((uint8_t *) &mac_ctx->lim.gLimDeferredMsgQ.
+	qdf_mem_copy((uint8_t *) &mac_ctx->lim.gLimDeferredMsgQ.
 			deferredQueue[mac_ctx->lim.gLimDeferredMsgQ.write++],
 				(uint8_t *) lim_msg, sizeof(tSirMsgQ));
 	return TX_SUCCESS;
@@ -1066,7 +1066,7 @@
 		return;
 	}
 
-	cdf_mem_set((uint8_t *) &beaconParams, sizeof(tUpdateBeaconParams), 0);
+	qdf_mem_set((uint8_t *) &beaconParams, sizeof(tUpdateBeaconParams), 0);
 	beaconParams.bssIdx = psessionEntry->bssIdx;
 
 	beaconParams.paramChangeBitmap = 0;
@@ -1212,7 +1212,7 @@
 				       LOG1);
 			       )
 
-			if (cdf_mem_compare
+			if (!qdf_mem_cmp
 				    (psessionEntry->protStaCache[i].addr,
 				    peerMacAddr, sizeof(tSirMacAddr))) {
 				PELOG1(lim_log
@@ -1236,7 +1236,7 @@
 		return;
 	}
 
-	cdf_mem_copy(psessionEntry->protStaCache[i].addr,
+	qdf_mem_copy(psessionEntry->protStaCache[i].addr,
 		     peerMacAddr, sizeof(tSirMacAddr));
 
 	psessionEntry->protStaCache[i].protStaCacheType = protStaCacheType;
@@ -1456,7 +1456,7 @@
 		if (LIM_IS_AP_ROLE(psession_entry) &&
 			(psession_entry->gLimNoShortParams.
 				staNoShortCache[i].active) &&
-			(cdf_mem_compare
+			(!qdf_mem_cmp
 				(psession_entry->gLimNoShortParams.
 				staNoShortCache[i].addr,
 				peer_mac_addr, sizeof(tSirMacAddr))))
@@ -1464,7 +1464,7 @@
 		else if (!LIM_IS_AP_ROLE(psession_entry) &&
 				(mac_ctx->lim.gLimNoShortParams.
 					staNoShortCache[i].active) &&
-			(cdf_mem_compare(mac_ctx->lim.gLimNoShortParams.
+			(!qdf_mem_cmp(mac_ctx->lim.gLimNoShortParams.
 				staNoShortCache[i].addr,
 				peer_mac_addr,
 				sizeof(tSirMacAddr))))
@@ -1503,14 +1503,14 @@
 	}
 
 	if (LIM_IS_AP_ROLE(psession_entry)) {
-		cdf_mem_copy(psession_entry->gLimNoShortParams.
+		qdf_mem_copy(psession_entry->gLimNoShortParams.
 				staNoShortCache[i].addr,
 				peer_mac_addr, sizeof(tSirMacAddr));
 		psession_entry->gLimNoShortParams.staNoShortCache[i].
 							active = true;
 		psession_entry->gLimNoShortParams.numNonShortPreambleSta++;
 	} else {
-		cdf_mem_copy(mac_ctx->lim.gLimNoShortParams.
+		qdf_mem_copy(mac_ctx->lim.gLimNoShortParams.
 					staNoShortCache[i].addr,
 				peer_mac_addr, sizeof(tSirMacAddr));
 		mac_ctx->lim.gLimNoShortParams.staNoShortCache[i].active = true;
@@ -1573,7 +1573,7 @@
 			if (LIM_IS_AP_ROLE(session_entry) &&
 				session_entry->gLimNoShortSlotParams.
 					staNoShortSlotCache[i].active) {
-				if (cdf_mem_compare(
+				if (!qdf_mem_cmp(
 					session_entry->gLimNoShortSlotParams.
 					staNoShortSlotCache[i].addr,
 					peer_mac_addr, sizeof(tSirMacAddr)))
@@ -1581,7 +1581,7 @@
 			} else if (!LIM_IS_AP_ROLE(session_entry)) {
 				if (mac_ctx->lim.gLimNoShortSlotParams.
 					staNoShortSlotCache[i].active) {
-					if (cdf_mem_compare(mac_ctx->lim.
+					if (!qdf_mem_cmp(mac_ctx->lim.
 							gLimNoShortSlotParams.
 							staNoShortSlotCache[i].
 							addr, peer_mac_addr,
@@ -1625,7 +1625,7 @@
 		}
 
 		if (LIM_IS_AP_ROLE(session_entry)) {
-			cdf_mem_copy(session_entry->gLimNoShortSlotParams.
+			qdf_mem_copy(session_entry->gLimNoShortSlotParams.
 					staNoShortSlotCache[i].addr,
 					peer_mac_addr, sizeof(tSirMacAddr));
 			session_entry->gLimNoShortSlotParams.
@@ -1633,7 +1633,7 @@
 			session_entry->gLimNoShortSlotParams.
 				numNonShortSlotSta++;
 		} else {
-			cdf_mem_copy(mac_ctx->lim.gLimNoShortSlotParams.
+			qdf_mem_copy(mac_ctx->lim.gLimNoShortSlotParams.
 					staNoShortSlotCache[i].addr,
 					peer_mac_addr, sizeof(tSirMacAddr));
 			mac_ctx->lim.gLimNoShortSlotParams.
@@ -2671,7 +2671,7 @@
 	}
 
 	mmhMsg.type = eWNI_SME_SWITCH_CHL_IND;
-	pSirSmeSwitchChInd = cdf_mem_malloc(sizeof(tSirSmeSwitchChannelInd));
+	pSirSmeSwitchChInd = qdf_mem_malloc(sizeof(tSirSmeSwitchChannelInd));
 	if (NULL == pSirSmeSwitchChInd) {
 		lim_log(pMac, LOGP,
 			FL("Failed to allocate buffer for buffer descriptor"));
@@ -2683,7 +2683,7 @@
 	pSirSmeSwitchChInd->newChannelId =
 		psessionEntry->gLimChannelSwitch.primaryChannel;
 	pSirSmeSwitchChInd->sessionId = psessionEntry->smeSessionId;
-	cdf_mem_copy(pSirSmeSwitchChInd->bssid.bytes, psessionEntry->bssId,
+	qdf_mem_copy(pSirSmeSwitchChInd->bssid.bytes, psessionEntry->bssId,
 		     QDF_MAC_ADDR_SIZE);
 	mmhMsg.bodyptr = pSirSmeSwitchChInd;
 	mmhMsg.bodyval = 0;
@@ -5139,14 +5139,14 @@
 		break;
 
 	default:
-		cdf_mem_free(msgParam);
+		qdf_mem_free(msgParam);
 		lim_log(pMac, LOGP, FL("invalid message id = %d received"),
 			msgId);
 		return eSIR_FAILURE;
 	}
 
 	if (lim_post_msg_api(pMac, &msg) != eSIR_SUCCESS) {
-		cdf_mem_free(msgParam);
+		qdf_mem_free(msgParam);
 		lim_log(pMac, LOGP, FL("lim_post_msg_api failed for msgid = %d"),
 			msg.type);
 		return eSIR_FAILURE;
@@ -5302,7 +5302,7 @@
 	tSirMsgQ msg;
 	tpHalIndCB pHalCB;
 
-	pHalCB = cdf_mem_malloc(sizeof(tHalIndCB));
+	pHalCB = qdf_mem_malloc(sizeof(tHalIndCB));
 	if (NULL == pHalCB) {
 		lim_log(pMac, LOGP, FL("AllocateMemory() failed"));
 		return;
@@ -5316,7 +5316,7 @@
 
 	MTRACE(mac_trace_msg_tx(pMac, NO_SESSION, msg.type));
 	if (eSIR_SUCCESS != wma_post_ctrl_msg(pMac, &msg)) {
-		cdf_mem_free(pHalCB);
+		qdf_mem_free(pHalCB);
 		lim_log(pMac, LOGP, FL("wma_post_ctrl_msg() failed"));
 	}
 
@@ -5351,7 +5351,7 @@
 	if (psessionEntry == NULL) {
 		lim_log(pMac, LOGE,
 			FL("session does not exist for given BssId"));
-		cdf_mem_free(limMsg->bodyptr);
+		qdf_mem_free(limMsg->bodyptr);
 		limMsg->bodyptr = NULL;
 		return;
 	}
@@ -5376,19 +5376,19 @@
 		goto error1;
 	}
 
-	pDelTsReq = cdf_mem_malloc(sizeof(tSirDeltsReq));
+	pDelTsReq = qdf_mem_malloc(sizeof(tSirDeltsReq));
 	if (NULL == pDelTsReq) {
 		PELOGE(lim_log(pMac, LOGE, FL("AllocateMemory() failed"));)
 		goto error1;
 	}
 
-	cdf_mem_set((uint8_t *) pDelTsReq, sizeof(tSirDeltsReq), 0);
+	qdf_mem_set((uint8_t *) pDelTsReq, sizeof(tSirDeltsReq), 0);
 
 	if (pSta->wmeEnabled)
-		cdf_mem_copy(&(pDelTsReq->req.tspec), &(pTspecInfo->tspec),
+		qdf_mem_copy(&(pDelTsReq->req.tspec), &(pTspecInfo->tspec),
 			     sizeof(tSirMacTspecIE));
 	else
-		cdf_mem_copy(&(pDelTsReq->req.tsinfo),
+		qdf_mem_copy(&(pDelTsReq->req.tsinfo),
 			     &(pTspecInfo->tspec.tsinfo),
 			     sizeof(tSirMacTSInfo));
 
@@ -5409,29 +5409,29 @@
 					&pDelTsReq->req.tspec, psessionEntry);
 
 	/* prepare and send an sme indication to HDD */
-	pDelTsReqInfo = cdf_mem_malloc(sizeof(tSirDeltsReqInfo));
+	pDelTsReqInfo = qdf_mem_malloc(sizeof(tSirDeltsReqInfo));
 	if (NULL == pDelTsReqInfo) {
 		PELOGE(lim_log(pMac, LOGE, FL("AllocateMemory() failed"));)
 		goto error3;
 	}
-	cdf_mem_set((uint8_t *) pDelTsReqInfo, sizeof(tSirDeltsReqInfo), 0);
+	qdf_mem_set((uint8_t *) pDelTsReqInfo, sizeof(tSirDeltsReqInfo), 0);
 
 	if (pSta->wmeEnabled)
-		cdf_mem_copy(&(pDelTsReqInfo->tspec), &(pTspecInfo->tspec),
+		qdf_mem_copy(&(pDelTsReqInfo->tspec), &(pTspecInfo->tspec),
 			     sizeof(tSirMacTspecIE));
 	else
-		cdf_mem_copy(&(pDelTsReqInfo->tsinfo),
+		qdf_mem_copy(&(pDelTsReqInfo->tsinfo),
 			     &(pTspecInfo->tspec.tsinfo),
 			     sizeof(tSirMacTSInfo));
 
 	lim_send_sme_delts_ind(pMac, pDelTsReqInfo, pDelTsReq->aid, psessionEntry);
 
 error3:
-	cdf_mem_free(pDelTsReqInfo);
+	qdf_mem_free(pDelTsReqInfo);
 error2:
-	cdf_mem_free(pDelTsReq);
+	qdf_mem_free(pDelTsReq);
 error1:
-	cdf_mem_free(limMsg->bodyptr);
+	qdf_mem_free(limMsg->bodyptr);
 	limMsg->bodyptr = NULL;
 	return;
 }
@@ -5466,7 +5466,7 @@
 	msgQ.type = WMA_SET_MIMOPS_REQ;
 
 	/* Allocate for WMA_SET_MIMOPS_REQ */
-	pMIMO_PSParams = cdf_mem_malloc(sizeof(tSetMIMOPS));
+	pMIMO_PSParams = qdf_mem_malloc(sizeof(tSetMIMOPS));
 	if (NULL == pMIMO_PSParams) {
 		lim_log(pMac, LOGP, FL(" AllocateMemory failed"));
 		return eSIR_MEM_ALLOC_FAILED;
@@ -5476,7 +5476,7 @@
 	pMIMO_PSParams->staIdx = staIdx;
 	pMIMO_PSParams->fsendRsp = true;
 	pMIMO_PSParams->sessionId = sessionId;
-	cdf_mem_copy(pMIMO_PSParams->peerMac, pPeerStaMac, sizeof(tSirMacAddr));
+	qdf_mem_copy(pMIMO_PSParams->peerMac, pPeerStaMac, sizeof(tSirMacAddr));
 
 	msgQ.bodyptr = pMIMO_PSParams;
 	msgQ.bodyval = 0;
@@ -5490,7 +5490,7 @@
 			FL
 				("Posting WMA_SET_MIMOPS_REQ to HAL failed! Reason = %d"),
 			retCode);
-		cdf_mem_free(pMIMO_PSParams);
+		qdf_mem_free(pMIMO_PSParams);
 		return retCode;
 	}
 
@@ -5536,7 +5536,7 @@
 
 void lim_resset_scan_channel_info(tpAniSirGlobal pMac)
 {
-	cdf_mem_set(&pMac->lim.scanChnInfo, sizeof(tLimScanChnInfo), 0);
+	qdf_mem_set(&pMac->lim.scanChnInfo, sizeof(tLimScanChnInfo), 0);
 }
 
 /**
@@ -5663,16 +5663,16 @@
 	 * Make it to align to 4 byte boundary  */
 	nBytes = (uint8_t) HALMSG_NUMBYTES_STATION_BITMAP(pMac->lim.maxStation);
 
-	pTxCtrlMsg = cdf_mem_malloc(sizeof(*pTxCtrlMsg) + nBytes);
+	pTxCtrlMsg = qdf_mem_malloc(sizeof(*pTxCtrlMsg) + nBytes);
 	if (NULL == pTxCtrlMsg) {
 		lim_log(pMac, LOGP, FL("AllocateMemory() failed"));
 		return;
 	}
 
-	cdf_mem_set((void *)pTxCtrlMsg, (sizeof(*pTxCtrlMsg) + nBytes), 0);
+	qdf_mem_set((void *)pTxCtrlMsg, (sizeof(*pTxCtrlMsg) + nBytes), 0);
 	status = __lim_fill_tx_control_params(pMac, pTxCtrlMsg, type, mode);
 	if (status != QDF_STATUS_SUCCESS) {
-		cdf_mem_free(pTxCtrlMsg);
+		qdf_mem_free(pTxCtrlMsg);
 		lim_log(pMac, LOGP,
 			FL("__lim_fill_tx_control_params failed, status = %d"),
 			status);
@@ -5686,7 +5686,7 @@
 
 	MTRACE(mac_trace_msg_tx(pMac, NO_SESSION, msgQ.type));
 	if (wma_post_ctrl_msg(pMac, &msgQ) != eSIR_SUCCESS) {
-		cdf_mem_free(pTxCtrlMsg);
+		qdf_mem_free(pTxCtrlMsg);
 		lim_log(pMac, LOGP, FL("Posting Message to HAL failed"));
 		return;
 	}
@@ -6030,7 +6030,7 @@
 	if (psessionEntry == NULL) {
 		lim_log(pMac, LOGP,
 			FL("Session Does not exist for given sessionID"));
-		cdf_mem_free(pAddStaParams);
+		qdf_mem_free(pAddStaParams);
 		return;
 	}
 	psessionEntry->csaOffloadEnable = pAddStaParams->csaOffloadEnable;
@@ -6200,7 +6200,7 @@
 		cds_pkt_return_packet((cds_pkt_t *) pLimMsg->bodyptr);
 		pLimMsg->bodyptr = NULL;
 	} else if (pLimMsg->bodyptr != NULL) {
-		cdf_mem_free(pLimMsg->bodyptr);
+		qdf_mem_free(pLimMsg->bodyptr);
 		pLimMsg->bodyptr = NULL;
 	}
 
@@ -6224,15 +6224,15 @@
 	tSirMacAddr nullBssid = { 0, 0, 0, 0, 0, 0 };
 	WLAN_HOST_DIAG_EVENT_DEF(peEvent, host_event_wlan_pe_payload_type);
 
-	cdf_mem_set(&peEvent, sizeof(host_event_wlan_pe_payload_type), 0);
+	qdf_mem_set(&peEvent, sizeof(host_event_wlan_pe_payload_type), 0);
 
 	if (NULL == pSessionEntry) {
-		cdf_mem_copy(peEvent.bssid, nullBssid, sizeof(tSirMacAddr));
+		qdf_mem_copy(peEvent.bssid, nullBssid, sizeof(tSirMacAddr));
 		peEvent.sme_state = (uint16_t) pMac->lim.gLimSmeState;
 		peEvent.mlm_state = (uint16_t) pMac->lim.gLimMlmState;
 
 	} else {
-		cdf_mem_copy(peEvent.bssid, pSessionEntry->bssId,
+		qdf_mem_copy(peEvent.bssid, pSessionEntry->bssId,
 			     sizeof(tSirMacAddr));
 		peEvent.sme_state = (uint16_t) pSessionEntry->limSmeState;
 		peEvent.mlm_state = (uint16_t) pSessionEntry->limMlmState;
@@ -6291,8 +6291,8 @@
 
 	ptr[length++] = SIR_MAC_EID_VENDOR;
 	ptr[length++] = ie_len + SIR_MAC_P2P_OUI_SIZE;
-	cdf_mem_copy(&ptr[length], SIR_MAC_P2P_OUI, SIR_MAC_P2P_OUI_SIZE);
-	cdf_mem_copy(&ptr[length + SIR_MAC_P2P_OUI_SIZE], data, ie_len);
+	qdf_mem_copy(&ptr[length], SIR_MAC_P2P_OUI, SIR_MAC_P2P_OUI_SIZE);
+	qdf_mem_copy(&ptr[length + SIR_MAC_P2P_OUI_SIZE], data, ie_len);
 	return ie_len + SIR_P2P_IE_HEADER_LEN;
 }
 
@@ -6306,14 +6306,14 @@
 
 	if ((noaLen <= (SIR_MAX_NOA_ATTR_LEN + SIR_P2P_IE_HEADER_LEN)) &&
 	    (noaLen >= overFlowLen) && (overFlowLen <= SIR_MAX_NOA_ATTR_LEN)) {
-		cdf_mem_copy(overFlowP2pStream,
+		qdf_mem_copy(overFlowP2pStream,
 			     noaStream + noaLen - overFlowLen, overFlowLen);
 		noaStream[noaLen - overFlowLen] = SIR_MAC_EID_VENDOR;
 		noaStream[noaLen - overFlowLen + 1] =
 			overFlowLen + SIR_MAC_P2P_OUI_SIZE;
-		cdf_mem_copy(noaStream + noaLen - overFlowLen + 2,
+		qdf_mem_copy(noaStream + noaLen - overFlowLen + 2,
 			     SIR_MAC_P2P_OUI, SIR_MAC_P2P_OUI_SIZE);
-		cdf_mem_copy(noaStream + noaLen + 2 + SIR_MAC_P2P_OUI_SIZE -
+		qdf_mem_copy(noaStream + noaLen + 2 + SIR_MAC_P2P_OUI_SIZE -
 			     overFlowLen, overFlowP2pStream, overFlowLen);
 	}
 
@@ -6519,7 +6519,7 @@
 	tempParam.opMode = chanWidth;
 	tempParam.staId = staId;
 	tempParam.smesessionId = psessionEntry->smeSessionId;
-	cdf_mem_copy(tempParam.peer_mac, peerMac, sizeof(tSirMacAddr));
+	qdf_mem_copy(tempParam.peer_mac, peerMac, sizeof(tSirMacAddr));
 
 	lim_send_mode_update(pMac, &tempParam, psessionEntry);
 
@@ -6534,7 +6534,7 @@
 	tempParam.rxNss = rxNss;
 	tempParam.staId = staId;
 	tempParam.smesessionId = psessionEntry->smeSessionId;
-	cdf_mem_copy(tempParam.peer_mac, peerMac, sizeof(tSirMacAddr));
+	qdf_mem_copy(tempParam.peer_mac, peerMac, sizeof(tSirMacAddr));
 
 	lim_send_rx_nss_update(pMac, &tempParam, psessionEntry);
 
@@ -6552,7 +6552,7 @@
 	tempParamMembership.membership = membership;
 	tempParamMembership.staId = staId;
 	tempParamMembership.smesessionId = psessionEntry->smeSessionId;
-	cdf_mem_copy(tempParamMembership.peer_mac, psessionEntry->bssId,
+	qdf_mem_copy(tempParamMembership.peer_mac, psessionEntry->bssId,
 		     sizeof(tSirMacAddr));
 
 	lim_set_membership(pMac, &tempParamMembership, psessionEntry);
@@ -6560,7 +6560,7 @@
 	tempParamUserPosition.userPos = userPosition;
 	tempParamUserPosition.staId = staId;
 	tempParamUserPosition.smesessionId = psessionEntry->smeSessionId;
-	cdf_mem_copy(tempParamUserPosition.peer_mac, psessionEntry->bssId,
+	qdf_mem_copy(tempParamUserPosition.peer_mac, psessionEntry->bssId,
 		     sizeof(tSirMacAddr));
 
 	lim_set_user_pos(pMac, &tempParamUserPosition, psessionEntry);
@@ -6690,7 +6690,7 @@
 		p_ht_cap->lsigTXOPProtection = dot11_ht_cap.lsigTXOPProtection;
 		p_ht_cap->maxRxAMPDUFactor = dot11_ht_cap.maxRxAMPDUFactor;
 		p_ht_cap->mpduDensity = dot11_ht_cap.mpduDensity;
-		cdf_mem_copy((void *)p_ht_cap->supportedMCSSet,
+		qdf_mem_copy((void *)p_ht_cap->supportedMCSSet,
 			(void *)(dot11_ht_cap.supportedMCSSet),
 			sizeof(p_ht_cap->supportedMCSSet));
 		p_ht_cap->pco = dot11_ht_cap.pco;
@@ -6821,7 +6821,7 @@
 		/* just for fail safe, don't handle MC/BC a1 in this routine */
 		return true;
 	}
-	if (!cdf_mem_compare(a1, session->selfMacAddr, 6)) {
+	if (qdf_mem_cmp(a1, session->selfMacAddr, 6)) {
 		lim_log(mac_ctx, LOGE,
 				FL("Invalid A1 address in received frame"));
 		return false;
@@ -6842,13 +6842,13 @@
 void lim_check_and_reset_protection_params(tpAniSirGlobal mac_ctx)
 {
 	if (!pe_get_active_session_count(mac_ctx)) {
-		cdf_mem_zero(&mac_ctx->lim.gLimOverlap11gParams,
+		qdf_mem_zero(&mac_ctx->lim.gLimOverlap11gParams,
 			sizeof(mac_ctx->lim.gLimOverlap11gParams));
-		cdf_mem_zero(&mac_ctx->lim.gLimOverlap11aParams,
+		qdf_mem_zero(&mac_ctx->lim.gLimOverlap11aParams,
 			sizeof(mac_ctx->lim.gLimOverlap11aParams));
-		cdf_mem_zero(&mac_ctx->lim.gLimOverlapHt20Params,
+		qdf_mem_zero(&mac_ctx->lim.gLimOverlapHt20Params,
 			sizeof(mac_ctx->lim.gLimOverlapHt20Params));
-		cdf_mem_zero(&mac_ctx->lim.gLimOverlapNonGfParams,
+		qdf_mem_zero(&mac_ctx->lim.gLimOverlapNonGfParams,
 			sizeof(mac_ctx->lim.gLimOverlapNonGfParams));
 
 		mac_ctx->lim.gHTOperMode = eSIR_HT_OP_MODE_PURE;
@@ -6932,7 +6932,7 @@
 	}
 
 	/* Allocate memory for the WMI request, and copy the parameter */
-	vdev_ie = cdf_mem_malloc(sizeof(*vdev_ie) + num_bytes);
+	vdev_ie = qdf_mem_malloc(sizeof(*vdev_ie) + num_bytes);
 	if (!vdev_ie) {
 		lim_log(mac_ctx, LOGE, FL("Failed to allocate memory"));
 		return QDF_STATUS_E_NOMEM;
@@ -6949,7 +6949,7 @@
 		lim_log(mac_ctx, LOG1, FL("%d byte is %02x"), i+1, *temp);
 
 	vdev_ie->data = (uint8_t *)vdev_ie + sizeof(*vdev_ie);
-	cdf_mem_copy(vdev_ie->data, ext_cap_data.bytes, num_bytes);
+	qdf_mem_copy(vdev_ie->data, ext_cap_data.bytes, num_bytes);
 
 	msg.type = WMA_SET_IE_INFO;
 	msg.bodyptr = vdev_ie;
@@ -6959,7 +6959,7 @@
 		cds_mq_post_message(QDF_MODULE_ID_WMA, &msg)) {
 		lim_log(mac_ctx, LOGE,
 		       FL("Not able to post WMA_SET_IE_INFO to WDA"));
-		cdf_mem_free(vdev_ie);
+		qdf_mem_free(vdev_ie);
 		return QDF_STATUS_E_FAILURE;
 	}
 
@@ -6992,7 +6992,7 @@
 		return eSIR_IGNORE_IE;
 	}
 
-	tempbuf = cdf_mem_malloc(left);
+	tempbuf = qdf_mem_malloc(left);
 	if (NULL == tempbuf) {
 		lim_log(mac_ctx, LOGE, FL("Unable to allocate memory"));
 		return eSIR_MEM_ALLOC_FAILED;
@@ -7006,28 +7006,28 @@
 			lim_log(mac_ctx, LOGE,
 				FL("Invalid IEs eid = %d elem_len=%d left=%d"),
 				elem_id, elem_len, left);
-			cdf_mem_free(tempbuf);
+			qdf_mem_free(tempbuf);
 			return eSIR_FAILURE;
 		}
 		if (!(DOT11F_EID_EXTCAP == elem_id)) {
-			cdf_mem_copy(tempbuf + templen, &ptr[0], elem_len + 2);
+			qdf_mem_copy(tempbuf + templen, &ptr[0], elem_len + 2);
 			templen += (elem_len + 2);
 		} else {
 			if (NULL != extracted_ie) {
-				cdf_mem_set(extracted_ie,
+				qdf_mem_set(extracted_ie,
 					DOT11F_IE_EXTCAP_MAX_LEN + 2, 0);
 				if (elem_len <= DOT11F_IE_EXTCAP_MAX_LEN)
-					cdf_mem_copy(extracted_ie, &ptr[0],
+					qdf_mem_copy(extracted_ie, &ptr[0],
 						     elem_len + 2);
 			}
 		}
 		left -= elem_len;
 		ptr += (elem_len + 2);
 	}
-	cdf_mem_copy(addn_ie, tempbuf, templen);
+	qdf_mem_copy(addn_ie, tempbuf, templen);
 
 	*addn_ielen = templen;
-	cdf_mem_free(tempbuf);
+	qdf_mem_free(tempbuf);
 
 	return eSIR_SUCCESS;
 }
@@ -7064,8 +7064,8 @@
 		return;
 	}
 
-	cdf_mem_set((uint8_t *)&out[0], DOT11F_IE_EXTCAP_MAX_LEN, 0);
-	cdf_mem_copy(&out[0], &buf[2], DOT11F_IE_EXTCAP_MAX_LEN);
+	qdf_mem_set((uint8_t *)&out[0], DOT11F_IE_EXTCAP_MAX_LEN, 0);
+	qdf_mem_copy(&out[0], &buf[2], DOT11F_IE_EXTCAP_MAX_LEN);
 
 	if (DOT11F_PARSE_SUCCESS != dot11f_unpack_ie_ext_cap(mac_ctx, &out[0],
 					DOT11F_IE_EXTCAP_MAX_LEN, dst))
@@ -7091,7 +7091,7 @@
 	uint8_t extracted_buff[DOT11F_IE_EXTCAP_MAX_LEN + 2];
 	tSirRetStatus status;
 
-	cdf_mem_set((uint8_t *)&extracted_buff[0], DOT11F_IE_EXTCAP_MAX_LEN + 2,
+	qdf_mem_set((uint8_t *)&extracted_buff[0], DOT11F_IE_EXTCAP_MAX_LEN + 2,
 		     0);
 	status = lim_strip_extcap_ie(mac_ctx, addn_ie, addn_ielen,
 				     extracted_buff);
diff --git a/core/mac/src/pe/rrm/rrm_api.c b/core/mac/src/pe/rrm/rrm_api.c
index 05af857..ecad9b1 100644
--- a/core/mac/src/pe/rrm/rrm_api.c
+++ b/core/mac/src/pe/rrm/rrm_api.c
@@ -156,7 +156,7 @@
 		PELOGE(lim_log(pMac, LOGE, FL("Invalid parameters"));)
 		return eSIR_FAILURE;
 	}
-	pMaxTxParams = cdf_mem_malloc(sizeof(tMaxTxPowerParams));
+	pMaxTxParams = qdf_mem_malloc(sizeof(tMaxTxPowerParams));
 	if (NULL == pMaxTxParams) {
 		lim_log(pMac, LOGP,
 			FL("Unable to allocate memory for pMaxTxParams "));
@@ -165,9 +165,9 @@
 	}
 	/* Allocated memory for pMaxTxParams...will be freed in other module */
 	pMaxTxParams->power = txPower;
-	cdf_mem_copy(pMaxTxParams->bssId.bytes, pSessionEntry->bssId,
+	qdf_mem_copy(pMaxTxParams->bssId.bytes, pSessionEntry->bssId,
 		     QDF_MAC_ADDR_SIZE);
-	cdf_mem_copy(pMaxTxParams->selfStaMacAddr.bytes,
+	qdf_mem_copy(pMaxTxParams->selfStaMacAddr.bytes,
 			pSessionEntry->selfMacAddr,
 			QDF_MAC_ADDR_SIZE);
 
@@ -187,7 +187,7 @@
 			FL
 				("Posting WMA_SET_MAX_TX_POWER_REQ to HAL failed, reason=%X"),
 			retCode);
-		cdf_mem_free(pMaxTxParams);
+		qdf_mem_free(pMaxTxParams);
 		return retCode;
 	}
 	return retCode;
@@ -239,7 +239,7 @@
 		}
 	}
 
-	cdf_mem_free(limMsgQ->bodyptr);
+	qdf_mem_free(limMsgQ->bodyptr);
 	limMsgQ->bodyptr = NULL;
 	return retCode;
 }
@@ -381,19 +381,19 @@
 		  (pNeighborRep->num_NeighborReport - 1));
 
 	/* Prepare the request to send to SME. */
-	pSmeNeighborRpt = cdf_mem_malloc(length);
+	pSmeNeighborRpt = qdf_mem_malloc(length);
 	if (NULL == pSmeNeighborRpt) {
 		PELOGE(lim_log(pMac, LOGP, FL("Unable to allocate memory"));)
 		return eSIR_MEM_ALLOC_FAILED;
 
 	}
-	cdf_mem_set(pSmeNeighborRpt, length, 0);
+	qdf_mem_set(pSmeNeighborRpt, length, 0);
 
 	/* Allocated memory for pSmeNeighborRpt...will be freed by other module */
 
 	for (i = 0; i < pNeighborRep->num_NeighborReport; i++) {
 		pSmeNeighborRpt->sNeighborBssDescription[i].length = sizeof(tSirNeighborBssDescription);        /*+ any optional ies */
-		cdf_mem_copy(pSmeNeighborRpt->sNeighborBssDescription[i].bssId,
+		qdf_mem_copy(pSmeNeighborRpt->sNeighborBssDescription[i].bssId,
 			     pNeighborRep->NeighborReport[i].bssid,
 			     sizeof(tSirMacAddr));
 		pSmeNeighborRpt->sNeighborBssDescription[i].bssidInfo.rrmInfo.
@@ -436,7 +436,7 @@
 	pSmeNeighborRpt->length = length;
 	pSmeNeighborRpt->sessionId = pSessionEntry->smeSessionId;
 	pSmeNeighborRpt->numNeighborReports = pNeighborRep->num_NeighborReport;
-	cdf_mem_copy(pSmeNeighborRpt->bssId, pSessionEntry->bssId,
+	qdf_mem_copy(pSmeNeighborRpt->bssId, pSessionEntry->bssId,
 		     sizeof(tSirMacAddr));
 
 	/* Send request to SME. */
@@ -489,12 +489,12 @@
 
 	lim_log(pMac, LOG1, FL("SSID present = %d "), pNeighborReq->noSSID);
 
-	cdf_mem_set(&NeighborReportReq, sizeof(tSirMacNeighborReportReq), 0);
+	qdf_mem_set(&NeighborReportReq, sizeof(tSirMacNeighborReportReq), 0);
 
 	NeighborReportReq.dialogToken = ++pMac->rrm.rrmPEContext.DialogToken;
 	NeighborReportReq.ssid_present = !pNeighborReq->noSSID;
 	if (NeighborReportReq.ssid_present) {
-		cdf_mem_copy(&NeighborReportReq.ssid, &pNeighborReq->ucSSID,
+		qdf_mem_copy(&NeighborReportReq.ssid, &pNeighborReq->ucSSID,
 			     sizeof(tSirMacSSid));
 		PELOGE(sir_dump_buf
 			       (pMac, SIR_LIM_MODULE_ID, LOGE,
@@ -601,7 +601,7 @@
 
 	if (pBeaconReq->measurement_request.Beacon.RequestedInfo.present) {
 		pCurrentReq->request.Beacon.reqIes.pElementIds =
-			cdf_mem_malloc(sizeof(uint8_t) *
+			qdf_mem_malloc(sizeof(uint8_t) *
 				       pBeaconReq->measurement_request.Beacon.
 				       RequestedInfo.num_requested_eids);
 		if (NULL == pCurrentReq->request.Beacon.reqIes.pElementIds) {
@@ -615,7 +615,7 @@
 		pCurrentReq->request.Beacon.reqIes.num =
 			pBeaconReq->measurement_request.Beacon.RequestedInfo.
 			num_requested_eids;
-		cdf_mem_copy(pCurrentReq->request.Beacon.reqIes.pElementIds,
+		qdf_mem_copy(pCurrentReq->request.Beacon.reqIes.pElementIds,
 			     pBeaconReq->measurement_request.Beacon.
 			     RequestedInfo.requested_eids,
 			     pCurrentReq->request.Beacon.reqIes.num);
@@ -631,7 +631,7 @@
 				APChannelReport[num_APChanReport].num_channelList;
 	}
 	/* Prepare the request to send to SME. */
-	pSmeBcnReportReq = cdf_mem_malloc(sizeof(tSirBeaconReportReqInd));
+	pSmeBcnReportReq = qdf_mem_malloc(sizeof(tSirBeaconReportReqInd));
 	if (NULL == pSmeBcnReportReq) {
 		lim_log(pMac, LOGP,
 			FL
@@ -641,10 +641,10 @@
 
 	}
 
-	cdf_mem_set(pSmeBcnReportReq, sizeof(tSirBeaconReportReqInd), 0);
+	qdf_mem_set(pSmeBcnReportReq, sizeof(tSirBeaconReportReqInd), 0);
 
 	/* Allocated memory for pSmeBcnReportReq....will be freed by other modulea */
-	cdf_mem_copy(pSmeBcnReportReq->bssId, pSessionEntry->bssId,
+	qdf_mem_copy(pSmeBcnReportReq->bssId, pSessionEntry->bssId,
 		     sizeof(tSirMacAddr));
 	pSmeBcnReportReq->messageType = eWNI_SME_BEACON_REPORT_REQ_IND;
 	pSmeBcnReportReq->length = sizeof(tSirBeaconReportReqInd);
@@ -659,14 +659,14 @@
 	pSmeBcnReportReq->measurementDuration[0] = SYS_TU_TO_MS(measDuration);
 	pSmeBcnReportReq->fMeasurementtype[0] =
 		pBeaconReq->measurement_request.Beacon.meas_mode;
-	cdf_mem_copy(pSmeBcnReportReq->macaddrBssid,
+	qdf_mem_copy(pSmeBcnReportReq->macaddrBssid,
 		     pBeaconReq->measurement_request.Beacon.BSSID,
 		     sizeof(tSirMacAddr));
 
 	if (pBeaconReq->measurement_request.Beacon.SSID.present) {
 		pSmeBcnReportReq->ssId.length =
 			pBeaconReq->measurement_request.Beacon.SSID.num_ssid;
-		cdf_mem_copy(pSmeBcnReportReq->ssId.ssId,
+		qdf_mem_copy(pSmeBcnReportReq->ssId.ssId,
 			     pBeaconReq->measurement_request.Beacon.SSID.ssid,
 			     pSmeBcnReportReq->ssId.length);
 	}
@@ -681,7 +681,7 @@
 		     num_APChanReport <
 		     pBeaconReq->measurement_request.Beacon.num_APChannelReport;
 		     num_APChanReport++) {
-			cdf_mem_copy(pChanList,
+			qdf_mem_copy(pChanList,
 				     pBeaconReq->measurement_request.Beacon.
 				     APChannelReport[num_APChanReport].
 				     channelList,
@@ -766,7 +766,7 @@
 				lim_log(pMac, LOG3, "Adding Eid %d, len=%d",
 					*pBcnIes, len);
 
-				cdf_mem_copy(pIes, pBcnIes, len);
+				qdf_mem_copy(pIes, pBcnIes, len);
 				pIes += len;
 				*pNumIes += len;
 				count++;
@@ -839,7 +839,7 @@
 			return eSIR_FAILURE;
 		}
 
-		pReport = cdf_mem_malloc(pBcnReport->numBssDesc *
+		pReport = qdf_mem_malloc(pBcnReport->numBssDesc *
 					 sizeof(tSirMacRadioMeasureReport));
 
 		if (NULL == pReport) {
@@ -850,7 +850,7 @@
 			return eSIR_MEM_ALLOC_FAILED;
 		}
 
-		cdf_mem_zero(pReport,
+		qdf_mem_zero(pReport,
 			     pBcnReport->numBssDesc *
 			     sizeof(tSirMacRadioMeasureReport));
 
@@ -879,7 +879,7 @@
 						pBcnReport->
 						pBssDescription[bssDescCnt]->
 						channelId;
-					cdf_mem_copy(pReport[bssDescCnt].report.
+					qdf_mem_copy(pReport[bssDescCnt].report.
 						     beaconReport.measStartTime,
 						     pBcnReport->
 						     pBssDescription
@@ -913,7 +913,7 @@
 						pBcnReport->
 						pBssDescription[bssDescCnt]->
 						parentTSF;
-					cdf_mem_copy(pReport[bssDescCnt].report.
+					qdf_mem_copy(pReport[bssDescCnt].report.
 						     beaconReport.bssid,
 						     pBcnReport->
 						     pBssDescription
@@ -1009,7 +1009,7 @@
 	}
 
 	if (NULL != pReport)
-		cdf_mem_free(pReport);
+		qdf_mem_free(pReport);
 
 	return status;
 }
@@ -1021,14 +1021,14 @@
 	tpSirMacRadioMeasureReport pReport = NULL;
 	tpRRMReq pCurrentReq = pMac->rrm.rrmPEContext.pCurrentReq;
 
-	pReport = cdf_mem_malloc(sizeof(tSirMacRadioMeasureReport));
+	pReport = qdf_mem_malloc(sizeof(tSirMacRadioMeasureReport));
 	if (NULL == pReport) {
 		lim_log(pMac, LOGP,
 			FL
 				("Unable to allocate memory during RRM Req processing"));
 		return;
 	}
-	cdf_mem_set(pReport, sizeof(tSirMacRadioMeasureReport), 0);
+	qdf_mem_set(pReport, sizeof(tSirMacRadioMeasureReport), 0);
 	pReport->token = pCurrentReq->token;
 	pReport->type = SIR_MAC_RRM_BEACON_TYPE;
 
@@ -1045,14 +1045,14 @@
 				       (" Beacon request processing failed no report sent with status %d "),
 			       status);
 		       );
-		cdf_mem_free(pReport);
+		qdf_mem_free(pReport);
 		return;
 	}
 
 	lim_send_radio_measure_report_action_frame(pMac, pCurrentReq->dialog_token, 1,
 						   pReport, peer, pSessionEntry);
 
-	cdf_mem_free(pReport);
+	qdf_mem_free(pReport);
 	lim_log(pMac, LOG3, FL(" Free memory for pReport"));
 	return;
 }
@@ -1091,14 +1091,14 @@
 	if (!pRRMReq->num_MeasurementRequest) {
 		/* No measurement requests.... */
 		/* */
-		pReport = cdf_mem_malloc(sizeof(tSirMacRadioMeasureReport));
+		pReport = qdf_mem_malloc(sizeof(tSirMacRadioMeasureReport));
 		if (NULL == pReport) {
 			lim_log(pMac, LOGP,
 				FL
 					("Unable to allocate memory during RRM Req processing"));
 			return eSIR_MEM_ALLOC_FAILED;
 		}
-		cdf_mem_set(pReport, sizeof(tSirMacRadioMeasureReport), 0);
+		qdf_mem_set(pReport, sizeof(tSirMacRadioMeasureReport), 0);
 		PELOGE(lim_log(pMac, LOGE,
 			       FL
 				       ("No requestIes in the measurement request, sending incapable report"));
@@ -1109,7 +1109,7 @@
 							   pRRMReq->DialogToken.token,
 							   num_report, pReport, peer,
 							   pSessionEntry);
-		cdf_mem_free(pReport);
+		qdf_mem_free(pReport);
 		return eSIR_FAILURE;
 	}
 	/* PF Fix */
@@ -1119,14 +1119,14 @@
 			pRRMReq->NumOfRepetitions.repetitions);
 
 		/* Send a report with incapable bit set. Not supporting repetitions. */
-		pReport = cdf_mem_malloc(sizeof(tSirMacRadioMeasureReport));
+		pReport = qdf_mem_malloc(sizeof(tSirMacRadioMeasureReport));
 		if (NULL == pReport) {
 			lim_log(pMac, LOGP,
 				FL
 					("Unable to allocate memory during RRM Req processing"));
 			return eSIR_MEM_ALLOC_FAILED;
 		}
-		cdf_mem_set(pReport, sizeof(tSirMacRadioMeasureReport), 0);
+		qdf_mem_set(pReport, sizeof(tSirMacRadioMeasureReport), 0);
 		PELOGE(lim_log(pMac, LOGE, FL(" Allocated memory for pReport"));)
 		pReport->incapable = 1;
 		pReport->type = pRRMReq->MeasurementRequest[0].measurement_type;
@@ -1142,7 +1142,7 @@
 			if (pCurrentReq) {
 				if (pReport == NULL) {  /* Allocate memory to send reports for any subsequent requests. */
 					pReport =
-						cdf_mem_malloc(sizeof
+						qdf_mem_malloc(sizeof
 							       (tSirMacRadioMeasureReport)
 							       *
 							       (pRRMReq->
@@ -1154,7 +1154,7 @@
 								("Unable to allocate memory during RRM Req processing"));
 						return eSIR_MEM_ALLOC_FAILED;
 					}
-					cdf_mem_set(pReport,
+					qdf_mem_set(pReport,
 						    sizeof
 						    (tSirMacRadioMeasureReport)
 						    *
@@ -1177,17 +1177,17 @@
 				continue;
 			} else {
 				pCurrentReq =
-					cdf_mem_malloc(sizeof(*pCurrentReq));
+					qdf_mem_malloc(sizeof(*pCurrentReq));
 				if (NULL == pCurrentReq) {
 					lim_log(pMac, LOGP,
 						FL
 							("Unable to allocate memory during RRM Req processing"));
-					cdf_mem_free(pReport);
+					qdf_mem_free(pReport);
 					return eSIR_MEM_ALLOC_FAILED;
 				}
 				lim_log(pMac, LOG3,
 					FL(" Processing Beacon Report request"));
-				cdf_mem_set(pCurrentReq, sizeof(*pCurrentReq),
+				qdf_mem_set(pCurrentReq, sizeof(*pCurrentReq),
 					    0);
 				pCurrentReq->dialog_token =
 					pRRMReq->DialogToken.token;
@@ -1223,7 +1223,7 @@
 			/* Send a report with incapabale bit set. */
 			if (pReport == NULL) { /* Allocate memory to send reports for any subsequent requests. */
 				pReport =
-					cdf_mem_malloc(sizeof
+					qdf_mem_malloc(sizeof
 						       (tSirMacRadioMeasureReport)
 						       *
 						       (pRRMReq->
@@ -1235,7 +1235,7 @@
 							("Unable to allocate memory during RRM Req processing"));
 					return eSIR_MEM_ALLOC_FAILED;
 				}
-				cdf_mem_set(pReport,
+				qdf_mem_set(pReport,
 					    sizeof(tSirMacRadioMeasureReport)
 					    * (pRRMReq->num_MeasurementRequest -
 					       i), 0);
@@ -1261,7 +1261,7 @@
 							   num_report, pReport, peer,
 							   pSessionEntry);
 
-		cdf_mem_free(pReport);
+		qdf_mem_free(pReport);
 		lim_log(pMac, LOG3, FL(" Free memory for pReport"));
 	}
 	return status;
@@ -1358,7 +1358,7 @@
 
 	pMac->rrm.rrmPEContext.rrmEnable = 0;
 
-	cdf_mem_set(pRRMCaps, sizeof(tRRMCaps), 0);
+	qdf_mem_set(pRRMCaps, sizeof(tRRMCaps), 0);
 	pRRMCaps->LinkMeasurement = 1;
 	pRRMCaps->NeighborRpt = 1;
 	pRRMCaps->BeaconPassive = 1;
@@ -1397,12 +1397,12 @@
 	if (pMac->rrm.rrmPEContext.pCurrentReq) {
 		if (pMac->rrm.rrmPEContext.pCurrentReq->request.Beacon.reqIes.
 		    pElementIds) {
-			cdf_mem_free(pMac->rrm.rrmPEContext.pCurrentReq->
+			qdf_mem_free(pMac->rrm.rrmPEContext.pCurrentReq->
 				     request.Beacon.reqIes.pElementIds);
 			lim_log(pMac, LOG4, FL(" Free memory for pElementIds"));
 		}
 
-		cdf_mem_free(pMac->rrm.rrmPEContext.pCurrentReq);
+		qdf_mem_free(pMac->rrm.rrmPEContext.pCurrentReq);
 		lim_log(pMac, LOG4, FL(" Free memory for pCurrentReq"));
 	}
 
@@ -1454,7 +1454,7 @@
 			       tpSirSmeJoinReq join_req)
 {
 	mac_ctx->rrm.rrmPEContext.rrmEnable = join_req->rrm_config.rrm_enabled;
-	cdf_mem_copy(&mac_ctx->rrm.rrmPEContext.rrmEnabledCaps,
+	qdf_mem_copy(&mac_ctx->rrm.rrmPEContext.rrmEnabledCaps,
 		     &join_req->rrm_config.rm_capability,
 		     RMENABLEDCAP_MAX_LEN);
 
diff --git a/core/mac/src/pe/sch/sch_api.c b/core/mac/src/pe/sch/sch_api.c
index 5a6744d..48d6560 100644
--- a/core/mac/src/pe/sch/sch_api.c
+++ b/core/mac/src/pe/sch/sch_api.c
@@ -245,7 +245,7 @@
 			("Indicating HAL to copy the beacon template [%d bytes] to memory"),
 		size);
 
-	beaconParams = cdf_mem_malloc(sizeof(tSendbeaconParams));
+	beaconParams = qdf_mem_malloc(sizeof(tSendbeaconParams));
 	if (NULL == beaconParams)
 		return eSIR_MEM_ALLOC_FAILED;
 
@@ -255,7 +255,7 @@
 	msgQ.reserved = 0;
 
 	/* Fill in tSendbeaconParams members */
-	cdf_mem_copy(beaconParams->bssId, psessionEntry->bssId,
+	qdf_mem_copy(beaconParams->bssId, psessionEntry->bssId,
 		     sizeof(psessionEntry->bssId));
 
 	if (LIM_IS_IBSS_ROLE(psessionEntry)) {
@@ -271,7 +271,7 @@
 		sch_log(pMac, LOGE, FL("Invalid p2pIeOffset:[%d]"),
 			pMac->sch.schObject.p2pIeOffset);
 		QDF_ASSERT(0);
-		cdf_mem_free(beaconParams);
+		qdf_mem_free(beaconParams);
 		return eSIR_FAILURE;
 	}
 	beaconParams->p2pIeOffset = pMac->sch.schObject.p2pIeOffset;
@@ -288,15 +288,15 @@
 
 	/* free previous copy of the beacon */
 	if (psessionEntry->beacon) {
-		cdf_mem_free(psessionEntry->beacon);
+		qdf_mem_free(psessionEntry->beacon);
 	}
 
 	psessionEntry->bcnLen = 0;
 	psessionEntry->beacon = NULL;
 
-	psessionEntry->beacon = cdf_mem_malloc(size);
+	psessionEntry->beacon = qdf_mem_malloc(size);
 	if (psessionEntry->beacon != NULL) {
-		cdf_mem_copy(psessionEntry->beacon, beaconPayload, size);
+		qdf_mem_copy(psessionEntry->beacon, beaconPayload, size);
 		psessionEntry->bcnLen = size;
 	}
 
@@ -341,7 +341,7 @@
 	uint32_t offset = 0;
 	uint8_t eid = 0xDD;
 
-	cdf_mem_copy(addIeWoP2pIe, ptr, left);
+	qdf_mem_copy(addIeWoP2pIe, ptr, left);
 	*addnIELenWoP2pIe = left;
 
 	if (addIeWoP2pIe != NULL) {
@@ -354,11 +354,11 @@
 				return eSIR_FAILURE;
 			}
 			if ((elem_id == eid) &&
-				(cdf_mem_compare(&ptr[2],
+				(!qdf_mem_cmp(&ptr[2],
 					"\x50\x6f\x9a\x09", 4))) {
 				left -= elem_len;
 				ptr += (elem_len + 2);
-				cdf_mem_copy(&addIeWoP2pIe[offset], ptr, left);
+				qdf_mem_copy(&addIeWoP2pIe[offset], ptr, left);
 				*addnIELenWoP2pIe -= (2 + elem_len);
 			} else {
 				left -= elem_len;
@@ -418,7 +418,7 @@
 		* by the FW, may also have P2P IE which will fail
 		* P2P cert case 6.1.3
 		*/
-		addIeWoP2pIe = cdf_mem_malloc(psessionEntry->addIeParams.
+		addIeWoP2pIe = qdf_mem_malloc(psessionEntry->addIeParams.
 						probeRespDataLen);
 		if (NULL == addIeWoP2pIe) {
 			sch_log(pMac, LOGE,
@@ -429,19 +429,19 @@
 		retStatus = lim_remove_p2p_ie_from_add_ie(pMac, psessionEntry,
 					addIeWoP2pIe, &addnIELenWoP2pIe);
 		if (retStatus != eSIR_SUCCESS) {
-			cdf_mem_free(addIeWoP2pIe);
+			qdf_mem_free(addIeWoP2pIe);
 			return eSIR_FAILURE;
 		}
 
 		/* Probe rsp IE available */
 		/*need to check the data length */
 		addIE =
-			cdf_mem_malloc(addnIELenWoP2pIe);
+			qdf_mem_malloc(addnIELenWoP2pIe);
 		if (NULL == addIE) {
 			sch_log(pMac, LOGE,
 				FL
 					("Unable to get WNI_CFG_PROBE_RSP_ADDNIE_DATA1 length"));
-			cdf_mem_free(addIeWoP2pIe);
+			qdf_mem_free(addIeWoP2pIe);
 			return eSIR_MEM_ALLOC_FAILED;
 		}
 		addnIELen = addnIELenWoP2pIe;
@@ -449,11 +449,11 @@
 		if (addnIELen <= WNI_CFG_PROBE_RSP_ADDNIE_DATA1_LEN && addnIELen
 		    && (nBytes + addnIELen) <= SIR_MAX_PACKET_SIZE) {
 
-			cdf_mem_copy(addIE,
+			qdf_mem_copy(addIE,
 				     addIeWoP2pIe,
 				     addnIELenWoP2pIe);
 		}
-		cdf_mem_free(addIeWoP2pIe);
+		qdf_mem_free(addIeWoP2pIe);
 	}
 
 	if (addnIEPresent) {
@@ -463,7 +463,7 @@
 			addnIEPresent = false;  /* Dont include the IE. */
 	}
 	/* Paranoia: */
-	cdf_mem_set(pFrame2Hal, nBytes, 0);
+	qdf_mem_set(pFrame2Hal, nBytes, 0);
 
 	/* Next, we fill out the buffer descriptor: */
 	lim_populate_mac_header(pMac, pFrame2Hal, SIR_MAC_MGMT_FRAME,
@@ -486,7 +486,7 @@
 			FL("Failed to pack a Probe Response (0x%08x)."),
 			nStatus);
 
-		cdf_mem_free(addIE);
+		qdf_mem_free(addIE);
 		return retCode; /* allocated! */
 	} else if (DOT11F_WARNED(nStatus)) {
 		sch_log(pMac, LOGE, FL("There were warnings while packing a P"
@@ -494,14 +494,14 @@
 	}
 
 	if (addnIEPresent) {
-		cdf_mem_copy(&pFrame2Hal[nBytes - addnIELen],
+		qdf_mem_copy(&pFrame2Hal[nBytes - addnIELen],
 			     &addIE[0], addnIELen);
 	}
 
 	/* free the allocated Memory */
-	cdf_mem_free(addIE);
+	qdf_mem_free(addIE);
 
-	pprobeRespParams = cdf_mem_malloc(sizeof(tSendProbeRespParams));
+	pprobeRespParams = qdf_mem_malloc(sizeof(tSendProbeRespParams));
 	if (NULL == pprobeRespParams) {
 		sch_log(pMac, LOGE,
 			FL
@@ -511,7 +511,7 @@
 		sir_copy_mac_addr(pprobeRespParams->bssId, psessionEntry->bssId);
 		pprobeRespParams->pProbeRespTemplate = pFrame2Hal;
 		pprobeRespParams->probeRespTemplateLen = nBytes;
-		cdf_mem_copy(pprobeRespParams->ucProxyProbeReqValidIEBmap,
+		qdf_mem_copy(pprobeRespParams->ucProxyProbeReqValidIEBmap,
 			     IeBitmap, (sizeof(uint32_t) * 8));
 		msgQ.type = WMA_SEND_PROBE_RSP_TMPL;
 		msgQ.reserved = 0;
@@ -525,7 +525,7 @@
 				FL
 					("lim_send_probe_rsp_template_to_hal: FAIL bytes %d retcode[%X]"),
 				nBytes, retCode);
-			cdf_mem_free(pprobeRespParams);
+			qdf_mem_free(pprobeRespParams);
 		} else {
 			sch_log(pMac, LOG1,
 				FL
@@ -557,7 +557,7 @@
 		{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF},
 	};
 
-	cdf_mem_zero((uint8_t *)&frame, sizeof(tDot11fTimingAdvertisementFrame));
+	qdf_mem_zero((uint8_t *)&frame, sizeof(tDot11fTimingAdvertisementFrame));
 
 	/* Populate the TA fields */
 	status = populate_dot11f_timing_advert_frame(mac_ctx, &frame);
@@ -578,12 +578,12 @@
 	}
 
 	buf_size = sizeof(tSirMacMgmtHdr) + payload_size;
-	*buf = cdf_mem_malloc(buf_size);
+	*buf = qdf_mem_malloc(buf_size);
 	if (*buf == NULL) {
 		sch_log(mac_ctx, LOGE, FL("Cannot allocate memory"));
 		return eSIR_FAILURE;
 	}
-	cdf_mem_zero(*buf, buf_size);
+	qdf_mem_zero(*buf, buf_size);
 
 	payload_size = 0;
 	status = dot11f_pack_timing_advertisement_frame(mac_ctx, &frame,
@@ -623,6 +623,6 @@
 
 fail:
 	if (*buf)
-		cdf_mem_free(*buf);
+		qdf_mem_free(*buf);
 	return status;
 }
diff --git a/core/mac/src/pe/sch/sch_beacon_gen.c b/core/mac/src/pe/sch/sch_beacon_gen.c
index 28d1941..efb73f4 100644
--- a/core/mac/src/pe/sch/sch_beacon_gen.c
+++ b/core/mac/src/pe/sch/sch_beacon_gen.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012-2015 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2016 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -73,7 +73,7 @@
 	/* Calculate the P2P IE Offset */
 	do {
 		if (*pExtraIe == 0xDD) {
-			if (cdf_mem_compare
+			if (!qdf_mem_cmp
 				    ((void *)(pExtraIe + 2), &p2p_oui, sizeof(p2p_oui))) {
 				status = eSIR_SUCCESS;
 				break;
@@ -117,7 +117,7 @@
 	    ((len + *num_bytes) <= max_bcn_size)))
 		return status;
 
-	cdf_mem_copy(&add_ie[0], session->addIeParams.probeRespBCNData_buff,
+	qdf_mem_copy(&add_ie[0], session->addIeParams.probeRespBCNData_buff,
 		     len);
 
 	p2p_ie = limGetP2pIEPtr(mac_ctx, &add_ie[0], len);
@@ -127,7 +127,7 @@
 		if (noa_len) {
 			if ((noa_len + len) <=
 			    WNI_CFG_PROBE_RSP_BCN_ADDNIE_DATA_LEN) {
-				cdf_mem_copy(&add_ie[len], noa_strm, noa_len);
+				qdf_mem_copy(&add_ie[len], noa_strm, noa_len);
 				len += noa_len;
 				p2p_ie[1] += noa_len;
 			} else {
@@ -137,7 +137,7 @@
 		}
 	}
 	if (len <= WNI_CFG_PROBE_RSP_BCN_ADDNIE_DATA_LEN) {
-		cdf_mem_copy(frm, &add_ie[0], len);
+		qdf_mem_copy(frm, &add_ie[0], len);
 		*num_bytes = *num_bytes + len;
 	} else {
 		sch_log(mac_ctx, LOGW,
@@ -177,24 +177,24 @@
 	tSirRetStatus status = eSIR_SUCCESS;
 	bool is_vht_enabled = false;
 
-	bcn_1 = cdf_mem_malloc(sizeof(tDot11fBeacon1));
+	bcn_1 = qdf_mem_malloc(sizeof(tDot11fBeacon1));
 	if (NULL == bcn_1) {
 		sch_log(mac_ctx, LOGE, FL("Failed to allocate memory"));
 		return eSIR_MEM_ALLOC_FAILED;
 	}
 
-	bcn_2 = cdf_mem_malloc(sizeof(tDot11fBeacon2));
+	bcn_2 = qdf_mem_malloc(sizeof(tDot11fBeacon2));
 	if (NULL == bcn_2) {
 		sch_log(mac_ctx, LOGE, FL("Failed to allocate memory"));
-		cdf_mem_free(bcn_1);
+		qdf_mem_free(bcn_1);
 		return eSIR_MEM_ALLOC_FAILED;
 	}
 
-	wsc_prb_res = cdf_mem_malloc(sizeof(tDot11fIEWscProbeRes));
+	wsc_prb_res = qdf_mem_malloc(sizeof(tDot11fIEWscProbeRes));
 	if (NULL == wsc_prb_res) {
 		sch_log(mac_ctx, LOGE, FL("Failed to allocate memory"));
-		cdf_mem_free(bcn_1);
-		cdf_mem_free(bcn_2);
+		qdf_mem_free(bcn_1);
+		qdf_mem_free(bcn_2);
 		return eSIR_MEM_ALLOC_FAILED;
 	}
 
@@ -204,7 +204,7 @@
 	 * First set the fixed fields:
 	 * set the TFP headers, set the mac header
 	 */
-	cdf_mem_set((uint8_t *) &bcn_struct->macHdr, sizeof(tSirMacMgmtHdr), 0);
+	qdf_mem_set((uint8_t *) &bcn_struct->macHdr, sizeof(tSirMacMgmtHdr), 0);
 	mac = (tpSirMacMgmtHdr) &bcn_struct->macHdr;
 	mac->fc.type = SIR_MAC_MGMT_FRAME;
 	mac->fc.subType = SIR_MAC_MGMT_BEACON;
@@ -212,15 +212,15 @@
 	for (i = 0; i < 6; i++)
 		mac->da[i] = 0xff;
 
-	cdf_mem_copy(mac->sa, session->selfMacAddr,
+	qdf_mem_copy(mac->sa, session->selfMacAddr,
 		     sizeof(session->selfMacAddr));
-	cdf_mem_copy(mac->bssId, session->bssId, sizeof(session->bssId));
+	qdf_mem_copy(mac->bssId, session->bssId, sizeof(session->bssId));
 
 	mac->fc.fromDS = 0;
 	mac->fc.toDS = 0;
 
 	/* Now set the beacon body */
-	cdf_mem_set((uint8_t *) bcn_1, sizeof(tDot11fBeacon1), 0);
+	qdf_mem_set((uint8_t *) bcn_1, sizeof(tDot11fBeacon1), 0);
 
 	/* Skip over the timestamp (it'll be updated later). */
 	bcn_1->BeaconInterval.interval =
@@ -247,11 +247,11 @@
 
 	if (LIM_IS_AP_ROLE(session)) {
 		/* Initialize the default IE bitmap to zero */
-		cdf_mem_set((uint8_t *) &(session->DefProbeRspIeBitmap),
+		qdf_mem_set((uint8_t *) &(session->DefProbeRspIeBitmap),
 			    (sizeof(uint32_t) * 8), 0);
 
 		/* Initialize the default IE bitmap to zero */
-		cdf_mem_set((uint8_t *) &(session->probeRespFrame),
+		qdf_mem_set((uint8_t *) &(session->probeRespFrame),
 			    sizeof(session->probeRespFrame), 0);
 
 		/*
@@ -270,9 +270,9 @@
 		sch_log(mac_ctx, LOGE,
 			FL("Failed to packed a tDot11fBeacon1 (0x%08x.)."),
 			n_status);
-		cdf_mem_free(bcn_1);
-		cdf_mem_free(bcn_2);
-		cdf_mem_free(wsc_prb_res);
+		qdf_mem_free(bcn_1);
+		qdf_mem_free(bcn_2);
+		qdf_mem_free(wsc_prb_res);
 		return eSIR_FAILURE;
 	} else if (DOT11F_WARNED(n_status)) {
 		sch_log(mac_ctx, LOGE,
@@ -280,7 +280,7 @@
 			n_status);
 	}
 	/*changed  to correct beacon corruption */
-	cdf_mem_set((uint8_t *) bcn_2, sizeof(tDot11fBeacon2), 0);
+	qdf_mem_set((uint8_t *) bcn_2, sizeof(tDot11fBeacon2), 0);
 	session->schBeaconOffsetBegin = offset + (uint16_t) n_bytes;
 	sch_log(mac_ctx, LOG1, FL("Initialized beacon begin, offset %d"),
 		offset);
@@ -443,7 +443,7 @@
 				set_probe_rsp_ie_bitmap(
 					&session->DefProbeRspIeBitmap[0],
 					SIR_MAC_WPA_EID);
-				cdf_mem_copy((void *)
+				qdf_mem_copy((void *)
 					&session->probeRespFrame.WscProbeRes,
 					(void *)wsc_prb_res,
 					sizeof(tDot11fIEWscProbeRes));
@@ -459,9 +459,9 @@
 		sch_log(mac_ctx, LOGE,
 			FL("Failed to packed a tDot11fBeacon2 (0x%08x.)."),
 			n_status);
-		cdf_mem_free(bcn_1);
-		cdf_mem_free(bcn_2);
-		cdf_mem_free(wsc_prb_res);
+		qdf_mem_free(bcn_1);
+		qdf_mem_free(bcn_2);
+		qdf_mem_free(wsc_prb_res);
 		return eSIR_FAILURE;
 	} else if (DOT11F_WARNED(n_status)) {
 		sch_log(mac_ctx, LOGE,
@@ -490,9 +490,9 @@
 	sch_log(mac_ctx, LOG1, FL("Initialized beacon end, offset %d"),
 		session->schBeaconOffsetEnd);
 	mac_ctx->sch.schObject.fBeaconChanged = 1;
-	cdf_mem_free(bcn_1);
-	cdf_mem_free(bcn_2);
-	cdf_mem_free(wsc_prb_res);
+	qdf_mem_free(bcn_1);
+	qdf_mem_free(bcn_2);
+	qdf_mem_free(wsc_prb_res);
 	return eSIR_SUCCESS;
 }
 
@@ -510,7 +510,7 @@
 	DefProbeRspIeBitmap = &psessionEntry->DefProbeRspIeBitmap[0];
 	prb_rsp = &psessionEntry->probeRespFrame;
 	prb_rsp->BeaconInterval = beacon1->BeaconInterval;
-	cdf_mem_copy((void *)&prb_rsp->Capabilities,
+	qdf_mem_copy((void *)&prb_rsp->Capabilities,
 		     (void *)&beacon1->Capabilities,
 		     sizeof(beacon1->Capabilities));
 
@@ -523,7 +523,7 @@
 	/* supported rates */
 	if (beacon1->SuppRates.present) {
 		set_probe_rsp_ie_bitmap(DefProbeRspIeBitmap, SIR_MAC_RATESET_EID);
-		cdf_mem_copy((void *)&prb_rsp->SuppRates,
+		qdf_mem_copy((void *)&prb_rsp->SuppRates,
 			     (void *)&beacon1->SuppRates,
 			     sizeof(beacon1->SuppRates));
 
@@ -532,7 +532,7 @@
 	if (beacon1->DSParams.present) {
 		set_probe_rsp_ie_bitmap(DefProbeRspIeBitmap,
 					SIR_MAC_DS_PARAM_SET_EID);
-		cdf_mem_copy((void *)&prb_rsp->DSParams,
+		qdf_mem_copy((void *)&prb_rsp->DSParams,
 			     (void *)&beacon1->DSParams,
 			     sizeof(beacon1->DSParams));
 
@@ -551,7 +551,7 @@
 	/* country */
 	if (beacon2->Country.present) {
 		set_probe_rsp_ie_bitmap(DefProbeRspIeBitmap, SIR_MAC_COUNTRY_EID);
-		cdf_mem_copy((void *)&prb_rsp->Country,
+		qdf_mem_copy((void *)&prb_rsp->Country,
 			     (void *)&beacon2->Country,
 			     sizeof(beacon2->Country));
 
@@ -560,7 +560,7 @@
 	if (beacon2->PowerConstraints.present) {
 		set_probe_rsp_ie_bitmap(DefProbeRspIeBitmap,
 					SIR_MAC_PWR_CONSTRAINT_EID);
-		cdf_mem_copy((void *)&prb_rsp->PowerConstraints,
+		qdf_mem_copy((void *)&prb_rsp->PowerConstraints,
 			     (void *)&beacon2->PowerConstraints,
 			     sizeof(beacon2->PowerConstraints));
 
@@ -569,7 +569,7 @@
 	if (beacon2->ChanSwitchAnn.present) {
 		set_probe_rsp_ie_bitmap(DefProbeRspIeBitmap,
 					SIR_MAC_CHNL_SWITCH_ANN_EID);
-		cdf_mem_copy((void *)&prb_rsp->ChanSwitchAnn,
+		qdf_mem_copy((void *)&prb_rsp->ChanSwitchAnn,
 			     (void *)&beacon2->ChanSwitchAnn,
 			     sizeof(beacon2->ChanSwitchAnn));
 
@@ -579,7 +579,7 @@
 	if (beacon2->ext_chan_switch_ann.present) {
 		set_probe_rsp_ie_bitmap(DefProbeRspIeBitmap,
 			SIR_MAC_CHNL_EXTENDED_SWITCH_ANN_EID);
-		cdf_mem_copy((void *)&prb_rsp->ext_chan_switch_ann,
+		qdf_mem_copy((void *)&prb_rsp->ext_chan_switch_ann,
 			(void *)&beacon2->ext_chan_switch_ann,
 			sizeof(beacon2->ext_chan_switch_ann));
 	}
@@ -588,7 +588,7 @@
 	if (beacon2->SuppOperatingClasses.present) {
 		set_probe_rsp_ie_bitmap(DefProbeRspIeBitmap,
 					SIR_MAC_OPERATING_CLASS_EID);
-		cdf_mem_copy((void *)&prb_rsp->SuppOperatingClasses,
+		qdf_mem_copy((void *)&prb_rsp->SuppOperatingClasses,
 				(void *)&beacon2->SuppOperatingClasses,
 				sizeof(beacon2->SuppOperatingClasses));
 	}
@@ -597,7 +597,7 @@
 	if (beacon2->QComVendorIE.present) {
 		set_probe_rsp_ie_bitmap(DefProbeRspIeBitmap,
 					SIR_MAC_QCOM_VENDOR_EID);
-		cdf_mem_copy((void *)&prb_rsp->QComVendorIE,
+		qdf_mem_copy((void *)&prb_rsp->QComVendorIE,
 			     (void *)&beacon2->QComVendorIE,
 			     sizeof(beacon2->QComVendorIE));
 	}
@@ -606,7 +606,7 @@
 	/* ERP information */
 	if (beacon2->ERPInfo.present) {
 		set_probe_rsp_ie_bitmap(DefProbeRspIeBitmap, SIR_MAC_ERP_INFO_EID);
-		cdf_mem_copy((void *)&prb_rsp->ERPInfo,
+		qdf_mem_copy((void *)&prb_rsp->ERPInfo,
 			     (void *)&beacon2->ERPInfo,
 			     sizeof(beacon2->ERPInfo));
 
@@ -615,7 +615,7 @@
 	if (beacon2->ExtSuppRates.present) {
 		set_probe_rsp_ie_bitmap(DefProbeRspIeBitmap,
 					SIR_MAC_EXTENDED_RATE_EID);
-		cdf_mem_copy((void *)&prb_rsp->ExtSuppRates,
+		qdf_mem_copy((void *)&prb_rsp->ExtSuppRates,
 			     (void *)&beacon2->ExtSuppRates,
 			     sizeof(beacon2->ExtSuppRates));
 
@@ -624,7 +624,7 @@
 	/* WPA */
 	if (beacon2->WPA.present) {
 		set_probe_rsp_ie_bitmap(DefProbeRspIeBitmap, SIR_MAC_WPA_EID);
-		cdf_mem_copy((void *)&prb_rsp->WPA, (void *)&beacon2->WPA,
+		qdf_mem_copy((void *)&prb_rsp->WPA, (void *)&beacon2->WPA,
 			     sizeof(beacon2->WPA));
 
 	}
@@ -632,7 +632,7 @@
 	/* RSN */
 	if (beacon2->RSNOpaque.present) {
 		set_probe_rsp_ie_bitmap(DefProbeRspIeBitmap, SIR_MAC_RSN_EID);
-		cdf_mem_copy((void *)&prb_rsp->RSNOpaque,
+		qdf_mem_copy((void *)&prb_rsp->RSNOpaque,
 			     (void *)&beacon2->RSNOpaque,
 			     sizeof(beacon2->RSNOpaque));
 	}
@@ -641,7 +641,7 @@
 	if (beacon2->EDCAParamSet.present) {
 		set_probe_rsp_ie_bitmap(DefProbeRspIeBitmap,
 					SIR_MAC_EDCA_PARAM_SET_EID);
-		cdf_mem_copy((void *)&prb_rsp->EDCAParamSet,
+		qdf_mem_copy((void *)&prb_rsp->EDCAParamSet,
 			     (void *)&beacon2->EDCAParamSet,
 			     sizeof(beacon2->EDCAParamSet));
 
@@ -652,34 +652,34 @@
 	if (beacon2->HTCaps.present) {
 		set_probe_rsp_ie_bitmap(DefProbeRspIeBitmap,
 					SIR_MAC_HT_CAPABILITIES_EID);
-		cdf_mem_copy((void *)&prb_rsp->HTCaps, (void *)&beacon2->HTCaps,
+		qdf_mem_copy((void *)&prb_rsp->HTCaps, (void *)&beacon2->HTCaps,
 			     sizeof(beacon2->HTCaps));
 	}
 	/* HT Info IE */
 	if (beacon2->HTInfo.present) {
 		set_probe_rsp_ie_bitmap(DefProbeRspIeBitmap, SIR_MAC_HT_INFO_EID);
-		cdf_mem_copy((void *)&prb_rsp->HTInfo, (void *)&beacon2->HTInfo,
+		qdf_mem_copy((void *)&prb_rsp->HTInfo, (void *)&beacon2->HTInfo,
 			     sizeof(beacon2->HTInfo));
 	}
 #ifdef WLAN_FEATURE_11AC
 	if (beacon2->VHTCaps.present) {
 		set_probe_rsp_ie_bitmap(DefProbeRspIeBitmap,
 					SIR_MAC_VHT_CAPABILITIES_EID);
-		cdf_mem_copy((void *)&prb_rsp->VHTCaps,
+		qdf_mem_copy((void *)&prb_rsp->VHTCaps,
 			     (void *)&beacon2->VHTCaps,
 			     sizeof(beacon2->VHTCaps));
 	}
 	if (beacon2->VHTOperation.present) {
 		set_probe_rsp_ie_bitmap(DefProbeRspIeBitmap,
 					SIR_MAC_VHT_OPERATION_EID);
-		cdf_mem_copy((void *)&prb_rsp->VHTOperation,
+		qdf_mem_copy((void *)&prb_rsp->VHTOperation,
 			     (void *)&beacon2->VHTOperation,
 			     sizeof(beacon2->VHTOperation));
 	}
 	if (beacon2->VHTExtBssLoad.present) {
 		set_probe_rsp_ie_bitmap(DefProbeRspIeBitmap,
 					SIR_MAC_VHT_EXT_BSS_LOAD_EID);
-		cdf_mem_copy((void *)&prb_rsp->VHTExtBssLoad,
+		qdf_mem_copy((void *)&prb_rsp->VHTExtBssLoad,
 			     (void *)&beacon2->VHTExtBssLoad,
 			     sizeof(beacon2->VHTExtBssLoad));
 	}
@@ -688,14 +688,14 @@
 	/* WMM IE */
 	if (beacon2->WMMParams.present) {
 		set_probe_rsp_ie_bitmap(DefProbeRspIeBitmap, SIR_MAC_WPA_EID);
-		cdf_mem_copy((void *)&prb_rsp->WMMParams,
+		qdf_mem_copy((void *)&prb_rsp->WMMParams,
 			     (void *)&beacon2->WMMParams,
 			     sizeof(beacon2->WMMParams));
 	}
 	/* WMM capability - most of the case won't be present */
 	if (beacon2->WMMCaps.present) {
 		set_probe_rsp_ie_bitmap(DefProbeRspIeBitmap, SIR_MAC_WPA_EID);
-		cdf_mem_copy((void *)&prb_rsp->WMMCaps,
+		qdf_mem_copy((void *)&prb_rsp->WMMCaps,
 			     (void *)&beacon2->WMMCaps,
 			     sizeof(beacon2->WMMCaps));
 	}
@@ -703,7 +703,7 @@
 	/* Extended Capability */
 	if (beacon2->ExtCap.present) {
 		set_probe_rsp_ie_bitmap(DefProbeRspIeBitmap, DOT11F_EID_EXTCAP);
-		cdf_mem_copy((void *)&prb_rsp->ExtCap,
+		qdf_mem_copy((void *)&prb_rsp->ExtCap,
 			     (void *)&beacon2->ExtCap,
 			     sizeof(beacon2->ExtCap));
 	}
@@ -878,8 +878,8 @@
 	tpPESession psessionEntry;
 	uint8_t sessionId;
 
-	if ((psessionEntry =
-		     pe_find_session_by_bssid(pMac, pMsg->bssId, &sessionId)) == NULL) {
+	psessionEntry = pe_find_session_by_bssid(pMac, pMsg->bssId, &sessionId);
+	if (psessionEntry == NULL) {
 		PELOGE(sch_log(pMac, LOGE, FL("session lookup fails"));)
 		goto end;
 	}
@@ -945,6 +945,6 @@
 	}
 
 end:
-		cdf_mem_free(pMsg);
+		qdf_mem_free(pMsg);
 
 	}
diff --git a/core/mac/src/pe/sch/sch_beacon_process.c b/core/mac/src/pe/sch/sch_beacon_process.c
index 10809e6..a8b8ed8 100644
--- a/core/mac/src/pe/sch/sch_beacon_process.c
+++ b/core/mac/src/pe/sch/sch_beacon_process.c
@@ -392,7 +392,7 @@
 		return false;
 
 	beaconParams->bssIdx = *bssIdx;
-	cdf_mem_copy((uint8_t *) &session->lastBeaconTimeStamp,
+	qdf_mem_copy((uint8_t *) &session->lastBeaconTimeStamp,
 			(uint8_t *) bcn->timeStamp, sizeof(uint64_t));
 	session->lastBeaconDtimCount = bcn->tim.dtimCount;
 	session->lastBeaconDtimPeriod = bcn->tim.dtimPeriod;
@@ -727,7 +727,7 @@
 #if defined FEATURE_WLAN_ESE || defined WLAN_FEATURE_VOWIFI
 	int8_t regMax = 0, maxTxPower = 0;
 #endif
-	cdf_mem_zero(&beaconParams, sizeof(tUpdateBeaconParams));
+	qdf_mem_zero(&beaconParams, sizeof(tUpdateBeaconParams));
 	beaconParams.paramChangeBitmap = 0;
 
 	if (LIM_IS_IBSS_ROLE(session)) {
@@ -863,7 +863,7 @@
 	tpPESession ap_session = NULL;
 	uint8_t i;
 
-	cdf_mem_zero(&bcn_prm, sizeof(tUpdateBeaconParams));
+	qdf_mem_zero(&bcn_prm, sizeof(tUpdateBeaconParams));
 	bcn_prm.paramChangeBitmap = 0;
 	mac_ctx->sch.gSchBcnRcvCnt++;
 	/* Convert the beacon frame into a structure */
diff --git a/core/mac/src/sys/common/src/wlan_qct_sys.c b/core/mac/src/sys/common/src/wlan_qct_sys.c
index 059dbcd..aab767f 100644
--- a/core/mac/src/sys/common/src/wlan_qct_sys.c
+++ b/core/mac/src/sys/common/src/wlan_qct_sys.c
@@ -212,7 +212,7 @@
 				QDF_TRACE(QDF_MODULE_ID_SYS,
 						QDF_TRACE_LEVEL_ERROR,
 						FL("Invalid hal"));
-				cdf_mem_free(pMsg->bodyptr);
+				qdf_mem_free(pMsg->bodyptr);
 				break;
 			}
 			mac_ctx = PMAC_STRUCT(hHal);
@@ -220,19 +220,19 @@
 				QDF_TRACE(QDF_MODULE_ID_SYS,
 						QDF_TRACE_LEVEL_ERROR,
 						FL("Invalid mac context"));
-				cdf_mem_free(pMsg->bodyptr);
+				qdf_mem_free(pMsg->bodyptr);
 				break;
 			}
 			if (NULL == mac_ctx->ftm_msg_processor_callback) {
 				QDF_TRACE(QDF_MODULE_ID_SYS,
 						QDF_TRACE_LEVEL_ERROR,
 						FL("callback pointer is NULL"));
-				cdf_mem_free(pMsg->bodyptr);
+				qdf_mem_free(pMsg->bodyptr);
 				break;
 			}
 			mac_ctx->ftm_msg_processor_callback(
 					(void *)pMsg->bodyptr);
-			cdf_mem_free(pMsg->bodyptr);
+			qdf_mem_free(pMsg->bodyptr);
 			break;
 
 		default:
@@ -251,7 +251,7 @@
 		qdf_status = QDF_STATUS_E_BADMSG;
 
 		if (pMsg->bodyptr)
-			cdf_mem_free(pMsg->bodyptr);
+			qdf_mem_free(pMsg->bodyptr);
 	}
 	return qdf_status;
 }
@@ -345,7 +345,7 @@
 		 * It allocate memory for bodyptr free the mem and return
 		 */
 		if (pMsg->bodyptr)
-			cdf_mem_free(pMsg->bodyptr);
+			qdf_mem_free(pMsg->bodyptr);
 	}
 
 }
diff --git a/core/mac/src/sys/legacy/src/platform/inc/sys_wrapper.h b/core/mac/src/sys/legacy/src/platform/inc/sys_wrapper.h
index ab955b4..b6109f0 100644
--- a/core/mac/src/sys/legacy/src/platform/inc/sys_wrapper.h
+++ b/core/mac/src/sys/legacy/src/platform/inc/sys_wrapper.h
@@ -50,7 +50,7 @@
 #include "qdf_mc_timer.h"
 #include "qdf_types.h"
 #include "qdf_trace.h"
-#include "cdf_memory.h"
+#include "qdf_mem.h"
 
 /* Interlocked Compare Exchange related definitions */
 
diff --git a/core/mac/src/sys/legacy/src/system/src/mac_init_api.c b/core/mac/src/sys/legacy/src/system/src/mac_init_api.c
index 02a46f5..3876857 100644
--- a/core/mac/src/sys/legacy/src/system/src/mac_init_api.c
+++ b/core/mac/src/sys/legacy/src/system/src/mac_init_api.c
@@ -120,12 +120,12 @@
 	 */
 
 	/* Allocate p_mac */
-	p_mac = cdf_mem_malloc(sizeof(tAniSirGlobal));
+	p_mac = qdf_mem_malloc(sizeof(tAniSirGlobal));
 	if (NULL == p_mac)
 		return eSIR_MEM_ALLOC_FAILED;
 
 	/* Initialize the p_mac structure */
-	cdf_mem_set(p_mac, sizeof(tAniSirGlobal), 0);
+	qdf_mem_set(p_mac, sizeof(tAniSirGlobal), 0);
 
 	/*
 	 * Set various global fields of p_mac here
@@ -138,13 +138,13 @@
 	{
 		/* Call various PE (and other layer init here) */
 		if (eSIR_SUCCESS != log_init(p_mac)) {
-			cdf_mem_free(p_mac);
+			qdf_mem_free(p_mac);
 			return eSIR_FAILURE;
 		}
 
 		/* Call routine to initialize CFG data structures */
 		if (eSIR_SUCCESS != cfg_init(p_mac)) {
-			cdf_mem_free(p_mac);
+			qdf_mem_free(p_mac);
 			return eSIR_FAILURE;
 		}
 
@@ -158,7 +158,7 @@
 	status =  pe_open(p_mac, pMacOpenParms);
 	if (eSIR_SUCCESS != status) {
 		sys_log(p_mac, LOGE, FL("mac_open failure\n"));
-		cdf_mem_free(p_mac);
+		qdf_mem_free(p_mac);
 	}
 
 	return status;
@@ -188,7 +188,7 @@
 	log_deinit(pMac);
 
 	/* Finally, de-allocate the global MAC datastructure: */
-	cdf_mem_free(pMac);
+	qdf_mem_free(pMac);
 
 	return eSIR_SUCCESS;
 }
diff --git a/core/mac/src/sys/legacy/src/system/src/sys_entry_func.c b/core/mac/src/sys/legacy/src/system/src/sys_entry_func.c
index 97703dc..057de05 100644
--- a/core/mac/src/sys/legacy/src/system/src/sys_entry_func.c
+++ b/core/mac/src/sys/legacy/src/system/src/sys_entry_func.c
@@ -78,7 +78,7 @@
 tSirRetStatus sys_init_globals(tpAniSirGlobal pMac)
 {
 
-	cdf_mem_set((uint8_t *) &pMac->sys, sizeof(pMac->sys), 0);
+	qdf_mem_set((uint8_t *) &pMac->sys, sizeof(pMac->sys), 0);
 
 	pMac->sys.gSysEnableScanMode = 1;
 	pMac->sys.gSysEnableLinkMonitorMode = 0;
diff --git a/core/mac/src/sys/legacy/src/utils/inc/dot11fdefs.h b/core/mac/src/sys/legacy/src/utils/inc/dot11fdefs.h
index 8cc4e97..7a155bf 100644
--- a/core/mac/src/sys/legacy/src/utils/inc/dot11fdefs.h
+++ b/core/mac/src/sys/legacy/src/utils/inc/dot11fdefs.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011-2012, 2014-2015 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2012, 2014-2016 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -45,11 +45,11 @@
 
 /* This controls how the "dot11f" code copies memory */
 #define DOT11F_MEMCPY(ctx, dst, src, len) \
-	cdf_mem_copy((uint8_t *)(dst), (uint8_t *)(src), (len))
+	qdf_mem_copy((uint8_t *)(dst), (uint8_t *)(src), (len))
 
 /* This controls how the "dot11f" code compares memory */
 #define DOT11F_MEMCMP(ctx, lhs, rhs, len) \
-	(!cdf_mem_compare((uint8_t *)(lhs), (uint8_t *)(rhs), (len)))
+	(qdf_mem_cmp((uint8_t *)(lhs), (uint8_t *)(rhs), (len)))
 
 #if defined(DBG) && (DBG != 0)
 
diff --git a/core/mac/src/sys/legacy/src/utils/src/mac_trace.c b/core/mac/src/sys/legacy/src/utils/src/mac_trace.c
index 0c2038a..92c4280 100644
--- a/core/mac/src/sys/legacy/src/utils/src/mac_trace.c
+++ b/core/mac/src/sys/legacy/src/utils/src/mac_trace.c
@@ -44,7 +44,7 @@
 #include "csr_neighbor_roam.h"
 #include "csr_internal.h"
 #include "lim_global.h"
-#include "cdf_memory.h"
+#include "qdf_mem.h"
 #include "qdf_trace.h"
 #include "wma_if.h"
 
diff --git a/core/mac/src/sys/legacy/src/utils/src/parser_api.c b/core/mac/src/sys/legacy/src/utils/src/parser_api.c
index 30ea1a7..7a5e691 100644
--- a/core/mac/src/sys/legacy/src/utils/src/parser_api.c
+++ b/core/mac/src/sys/legacy/src/utils/src/parser_api.c
@@ -415,7 +415,7 @@
 		CFG_GET_STR(nSirStatus, pMac, WNI_CFG_COUNTRY_CODE,
 			    code, codelen, 3);
 
-		cdf_mem_copy(pDot11f->country, code, codelen);
+		qdf_mem_copy(pDot11f->country, code, codelen);
 
 		if (len > MAX_SIZE_OF_TRIPLETS_IN_COUNTRY_IE) {
 			dot11f_log(pMac, LOGE,
@@ -425,7 +425,7 @@
 		}
 
 		pDot11f->num_triplets = (uint8_t) (len / 3);
-		cdf_mem_copy((uint8_t *) pDot11f->triplets, temp, len);
+		qdf_mem_copy((uint8_t *) pDot11f->triplets, temp, len);
 
 		pDot11f->present = 1;
 	}
@@ -619,7 +619,7 @@
 	if (POPULATE_DOT11F_RATES_OPERATIONAL == nChannelNum) {
 		if (psessionEntry != NULL) {
 			nRates = psessionEntry->extRateSet.numRates;
-			cdf_mem_copy(rates, psessionEntry->extRateSet.rate,
+			qdf_mem_copy(rates, psessionEntry->extRateSet.rate,
 				     nRates);
 		} else {
 			dot11f_log(pMac, LOGE,
@@ -634,7 +634,7 @@
 
 	if (0 != nRates) {
 		pDot11f->num_rates = (uint8_t) nRates;
-		cdf_mem_copy(pDot11f->rates, rates, nRates);
+		qdf_mem_copy(pDot11f->rates, rates, nRates);
 		pDot11f->present = 1;
 	}
 
@@ -663,7 +663,7 @@
 
 	if (0 != nRates) {
 		pDot11f->num_rates = (uint8_t) nRates;
-		cdf_mem_copy(pDot11f->rates, rates, nRates);
+		qdf_mem_copy(pDot11f->rates, rates, nRates);
 		pDot11f->present = 1;
 	}
 
@@ -1582,7 +1582,7 @@
 		if (0 <= idx) {
 			pDot11f->present = 1;
 			pDot11f->num_data = pRsnIe->rsnIEdata[idx + 1];
-			cdf_mem_copy(pDot11f->data, pRsnIe->rsnIEdata + idx + 2,        /* EID, len */
+			qdf_mem_copy(pDot11f->data, pRsnIe->rsnIEdata + idx + 2,        /* EID, len */
 				     pRsnIe->rsnIEdata[idx + 1]);
 		}
 	}
@@ -1633,7 +1633,7 @@
 		if (0 <= idx) {
 			pDot11f->present = 1;
 			pDot11f->num_data = pRsnIe->rsnIEdata[idx + 1];
-			cdf_mem_copy(pDot11f->data, pRsnIe->rsnIEdata + idx + 2,        /* EID, len */
+			qdf_mem_copy(pDot11f->data, pRsnIe->rsnIEdata + idx + 2,        /* EID, len */
 				     pRsnIe->rsnIEdata[idx + 1]);
 		}
 	}
@@ -1651,7 +1651,7 @@
 	pDot11f->present = 1;
 	pDot11f->num_ssid = pInternal->length;
 	if (pInternal->length) {
-		cdf_mem_copy((uint8_t *) pDot11f->ssid,
+		qdf_mem_copy((uint8_t *) pDot11f->ssid,
 			     (uint8_t *) &pInternal->ssId, pInternal->length);
 	}
 } /* End populate_dot11f_ssid. */
@@ -1731,7 +1731,7 @@
 #endif /* TO SUPPORT BT-AMP */
 		if (psessionEntry != NULL) {
 			nRates = psessionEntry->rateSet.numRates;
-			cdf_mem_copy(rates, psessionEntry->rateSet.rate,
+			qdf_mem_copy(rates, psessionEntry->rateSet.rate,
 				     nRates);
 		} else {
 			dot11f_log(pMac, LOGE,
@@ -1749,7 +1749,7 @@
 
 	if (0 != nRates) {
 		pDot11f->num_rates = (uint8_t) nRates;
-		cdf_mem_copy(pDot11f->rates, rates, nRates);
+		qdf_mem_copy(pDot11f->rates, rates, nRates);
 		pDot11f->present = 1;
 	}
 
@@ -1832,18 +1832,18 @@
 
 	if (temp_rateset.numRates <= MAX_NUM_SUPPORTED_RATES) {
 		p_supp_rates->num_rates = temp_rateset.numRates;
-		cdf_mem_copy(p_supp_rates->rates, temp_rateset.rate,
+		qdf_mem_copy(p_supp_rates->rates, temp_rateset.rate,
 			     p_supp_rates->num_rates);
 		p_supp_rates->present = 1;
 	}  else { /* Populate extended capability as well */
 		p_supp_rates->num_rates = MAX_NUM_SUPPORTED_RATES;
-		cdf_mem_copy(p_supp_rates->rates, temp_rateset.rate,
+		qdf_mem_copy(p_supp_rates->rates, temp_rateset.rate,
 			     p_supp_rates->num_rates);
 		p_supp_rates->present = 1;
 
 		p_ext_supp_rates->num_rates = temp_rateset.numRates -
 				     MAX_NUM_SUPPORTED_RATES;
-		cdf_mem_copy(p_ext_supp_rates->rates,
+		qdf_mem_copy(p_ext_supp_rates->rates,
 			     (uint8_t *)temp_rateset.rate +
 			     MAX_NUM_SUPPORTED_RATES,
 			     p_ext_supp_rates->num_rates);
@@ -2122,7 +2122,7 @@
 		if (0 <= idx) {
 			pDot11f->present = 1;
 			pDot11f->num_data = pRsnIe->rsnIEdata[idx + 1] - 4;
-			cdf_mem_copy(pDot11f->data, pRsnIe->rsnIEdata + idx + 2 + 4,    /* EID, len, OUI */
+			qdf_mem_copy(pDot11f->data, pRsnIe->rsnIEdata + idx + 2 + 4,    /* EID, len, OUI */
 				     pRsnIe->rsnIEdata[idx + 1] - 4);   /* OUI */
 		}
 	}
@@ -2142,7 +2142,7 @@
 	tDot11fProbeRequest pr;
 
 	/* Ok, zero-init our [out] parameter, */
-	cdf_mem_set((uint8_t *) pProbeReq, sizeof(tSirProbeReq), 0);
+	qdf_mem_set((uint8_t *) pProbeReq, sizeof(tSirProbeReq), 0);
 
 	/* delegate to the framesc-generated code, */
 	status = dot11f_unpack_probe_request(pMac, pFrame, nFrame, &pr);
@@ -2193,7 +2193,7 @@
 	}
 
 	if (pr.HTCaps.present) {
-		cdf_mem_copy(&pProbeReq->HTCaps, &pr.HTCaps,
+		qdf_mem_copy(&pProbeReq->HTCaps, &pr.HTCaps,
 			     sizeof(tDot11fIEHTCaps));
 	}
 
@@ -2204,7 +2204,7 @@
 	}
 #ifdef WLAN_FEATURE_11AC
 	if (pr.VHTCaps.present) {
-		cdf_mem_copy(&pProbeReq->VHTCaps, &pr.VHTCaps,
+		qdf_mem_copy(&pProbeReq->VHTCaps, &pr.VHTCaps,
 			     sizeof(tDot11fIEVHTCaps));
 	}
 #endif
@@ -2226,15 +2226,15 @@
 	tDot11fProbeResponse *pr;
 
 	/* Ok, zero-init our [out] parameter, */
-	cdf_mem_set((uint8_t *) pProbeResp, sizeof(tSirProbeRespBeacon), 0);
+	qdf_mem_set((uint8_t *) pProbeResp, sizeof(tSirProbeRespBeacon), 0);
 
-	pr = cdf_mem_malloc(sizeof(tDot11fProbeResponse));
+	pr = qdf_mem_malloc(sizeof(tDot11fProbeResponse));
 	if (NULL == pr) {
 		lim_log(pMac, LOGE, FL("Failed to allocate memory\n"));
 		return eSIR_MEM_ALLOC_FAILED;
 	}
 
-	cdf_mem_set((uint8_t *) pr, sizeof(tDot11fProbeResponse), 0);
+	qdf_mem_set((uint8_t *) pr, sizeof(tDot11fProbeResponse), 0);
 
 	/* delegate to the framesc-generated code, */
 	status = dot11f_unpack_probe_response(pMac, pFrame, nFrame, pr);
@@ -2246,7 +2246,7 @@
 		PELOG2(sir_dump_buf
 			       (pMac, SIR_DBG_MODULE_ID, LOG2, pFrame, nFrame);
 		       )
-		cdf_mem_free(pr);
+		qdf_mem_free(pr);
 		return eSIR_FAILURE;
 	} else if (DOT11F_WARNED(status)) {
 		lim_log(pMac, LOGW,
@@ -2260,7 +2260,7 @@
 	/* & "transliterate" from a 'tDot11fProbeResponse' to a 'tSirProbeRespBeacon'... */
 
 	/* Timestamp */
-	cdf_mem_copy((uint8_t *) pProbeResp->timeStamp,
+	qdf_mem_copy((uint8_t *) pProbeResp->timeStamp,
 		     (uint8_t *) &pr->TimeStamp, sizeof(tSirMacTimeStamp));
 
 	/* Beacon Interval */
@@ -2332,57 +2332,57 @@
 
 	if (pr->ChanSwitchAnn.present) {
 		pProbeResp->channelSwitchPresent = 1;
-		cdf_mem_copy(&pProbeResp->channelSwitchIE, &pr->ChanSwitchAnn,
+		qdf_mem_copy(&pProbeResp->channelSwitchIE, &pr->ChanSwitchAnn,
 			     sizeof(pProbeResp->channelSwitchIE));
 	}
 
 	if (pr->ext_chan_switch_ann.present) {
 		pProbeResp->ext_chan_switch_present = 1;
-		cdf_mem_copy(&pProbeResp->ext_chan_switch,
+		qdf_mem_copy(&pProbeResp->ext_chan_switch,
 			     &pr->ext_chan_switch_ann,
 			     sizeof(tDot11fIEext_chan_switch_ann));
 	}
 
 	if (pr->SuppOperatingClasses.present) {
 		pProbeResp->supp_operating_class_present = 1;
-		cdf_mem_copy(&pProbeResp->supp_operating_classes,
+		qdf_mem_copy(&pProbeResp->supp_operating_classes,
 			&pr->SuppOperatingClasses,
 			sizeof(tDot11fIESuppOperatingClasses));
 	}
 
 	if (pr->sec_chan_offset_ele.present) {
 		pProbeResp->sec_chan_offset_present = 1;
-		cdf_mem_copy(&pProbeResp->sec_chan_offset,
+		qdf_mem_copy(&pProbeResp->sec_chan_offset,
 			     &pr->sec_chan_offset_ele,
 			     sizeof(pProbeResp->sec_chan_offset));
 	}
 
 	if (pr->TPCReport.present) {
 		pProbeResp->tpcReportPresent = 1;
-		cdf_mem_copy(&pProbeResp->tpcReport, &pr->TPCReport,
+		qdf_mem_copy(&pProbeResp->tpcReport, &pr->TPCReport,
 			     sizeof(tDot11fIETPCReport));
 	}
 
 	if (pr->PowerConstraints.present) {
 		pProbeResp->powerConstraintPresent = 1;
-		cdf_mem_copy(&pProbeResp->localPowerConstraint,
+		qdf_mem_copy(&pProbeResp->localPowerConstraint,
 			     &pr->PowerConstraints,
 			     sizeof(tDot11fIEPowerConstraints));
 	}
 
 	if (pr->Quiet.present) {
 		pProbeResp->quietIEPresent = 1;
-		cdf_mem_copy(&pProbeResp->quietIE, &pr->Quiet,
+		qdf_mem_copy(&pProbeResp->quietIE, &pr->Quiet,
 			     sizeof(tDot11fIEQuiet));
 	}
 
 	if (pr->HTCaps.present) {
-		cdf_mem_copy(&pProbeResp->HTCaps, &pr->HTCaps,
+		qdf_mem_copy(&pProbeResp->HTCaps, &pr->HTCaps,
 			     sizeof(tDot11fIEHTCaps));
 	}
 
 	if (pr->HTInfo.present) {
-		cdf_mem_copy(&pProbeResp->HTInfo, &pr->HTInfo,
+		qdf_mem_copy(&pProbeResp->HTInfo, &pr->HTInfo,
 			     sizeof(tDot11fIEHTInfo));
 	}
 
@@ -2434,7 +2434,7 @@
 	if (pr->MobilityDomain.present) {
 		/* MobilityDomain */
 		pProbeResp->mdiePresent = 1;
-		cdf_mem_copy((uint8_t *) &(pProbeResp->mdie[0]),
+		qdf_mem_copy((uint8_t *) &(pProbeResp->mdie[0]),
 			     (uint8_t *) &(pr->MobilityDomain.MDID),
 			     sizeof(uint16_t));
 		pProbeResp->mdie[2] =
@@ -2452,25 +2452,25 @@
 	if (pr->ESEVersion.present)
 		pProbeResp->is_ese_ver_ie_present = 1;
 	if (pr->QBSSLoad.present) {
-		cdf_mem_copy(&pProbeResp->QBSSLoad, &pr->QBSSLoad,
+		qdf_mem_copy(&pProbeResp->QBSSLoad, &pr->QBSSLoad,
 			     sizeof(tDot11fIEQBSSLoad));
 	}
 #endif
 	if (pr->P2PProbeRes.present) {
-		cdf_mem_copy(&pProbeResp->P2PProbeRes, &pr->P2PProbeRes,
+		qdf_mem_copy(&pProbeResp->P2PProbeRes, &pr->P2PProbeRes,
 			     sizeof(tDot11fIEP2PProbeRes));
 	}
 #ifdef WLAN_FEATURE_11AC
 	if (pr->VHTCaps.present) {
-		cdf_mem_copy(&pProbeResp->VHTCaps, &pr->VHTCaps,
+		qdf_mem_copy(&pProbeResp->VHTCaps, &pr->VHTCaps,
 			     sizeof(tDot11fIEVHTCaps));
 	}
 	if (pr->VHTOperation.present) {
-		cdf_mem_copy(&pProbeResp->VHTOperation, &pr->VHTOperation,
+		qdf_mem_copy(&pProbeResp->VHTOperation, &pr->VHTOperation,
 			     sizeof(tDot11fIEVHTOperation));
 	}
 	if (pr->VHTExtBssLoad.present) {
-		cdf_mem_copy(&pProbeResp->VHTExtBssLoad, &pr->VHTExtBssLoad,
+		qdf_mem_copy(&pProbeResp->VHTExtBssLoad, &pr->VHTExtBssLoad,
 			     sizeof(tDot11fIEVHTExtBssLoad));
 	}
 #endif
@@ -2483,16 +2483,16 @@
 		pProbeResp->vendor2_ie.sub_type = pr->vendor2_ie.sub_type;
 	}
 	if (pr->vendor2_ie.VHTCaps.present) {
-		cdf_mem_copy(&pProbeResp->vendor2_ie.VHTCaps,
+		qdf_mem_copy(&pProbeResp->vendor2_ie.VHTCaps,
 				&pr->vendor2_ie.VHTCaps,
 				sizeof(tDot11fIEVHTCaps));
 	}
 	if (pr->vendor2_ie.VHTOperation.present) {
-		cdf_mem_copy(&pProbeResp->vendor2_ie.VHTOperation,
+		qdf_mem_copy(&pProbeResp->vendor2_ie.VHTOperation,
 				&pr->vendor2_ie.VHTOperation,
 				sizeof(tDot11fIEVHTOperation));
 	}
-	cdf_mem_free(pr);
+	qdf_mem_free(pr);
 	return eSIR_SUCCESS;
 
 } /* End sir_convert_probe_frame2_struct. */
@@ -2505,14 +2505,14 @@
 	tDot11fAssocRequest *ar;
 	uint32_t status;
 
-	ar = cdf_mem_malloc(sizeof(tDot11fAssocRequest));
+	ar = qdf_mem_malloc(sizeof(tDot11fAssocRequest));
 	if (NULL == ar) {
 		lim_log(pMac, LOGE, FL("Failed to allocate memory\n"));
 		return eSIR_MEM_ALLOC_FAILED;
 	}
 	/* Zero-init our [out] parameter, */
-	cdf_mem_set((uint8_t *) pAssocReq, sizeof(tSirAssocReq), 0);
-	cdf_mem_set((uint8_t *) ar, sizeof(tDot11fAssocRequest), 0);
+	qdf_mem_set((uint8_t *) pAssocReq, sizeof(tSirAssocReq), 0);
+	qdf_mem_set((uint8_t *) ar, sizeof(tDot11fAssocRequest), 0);
 
 	/* delegate to the framesc-generated code, */
 	status = dot11f_unpack_assoc_request(pMac, pFrame, nFrame, ar);
@@ -2524,7 +2524,7 @@
 		PELOG2(sir_dump_buf
 			       (pMac, SIR_DBG_MODULE_ID, LOG2, pFrame, nFrame);
 		       )
-		cdf_mem_free(ar);
+		qdf_mem_free(ar);
 		return eSIR_FAILURE;
 	} else if (DOT11F_WARNED(status)) {
 		lim_log(pMac, LOGW,
@@ -2634,13 +2634,13 @@
 	}
 
 	if (ar->HTCaps.present) {
-		cdf_mem_copy(&pAssocReq->HTCaps, &ar->HTCaps,
+		qdf_mem_copy(&pAssocReq->HTCaps, &ar->HTCaps,
 			     sizeof(tDot11fIEHTCaps));
 	}
 
 	if (ar->WMMInfoStation.present) {
 		pAssocReq->wmeInfoPresent = 1;
-		cdf_mem_copy(&pAssocReq->WMMInfoStation, &ar->WMMInfoStation,
+		qdf_mem_copy(&pAssocReq->WMMInfoStation, &ar->WMMInfoStation,
 			     sizeof(tDot11fIEWMMInfoStation));
 
 	}
@@ -2652,7 +2652,7 @@
 		PELOG2(lim_log
 			       (pMac, LOG2, FL("Received Assoc without SSID IE.\n"));
 		       )
-		cdf_mem_free(ar);
+		qdf_mem_free(ar);
 		return eSIR_FAILURE;
 	}
 
@@ -2661,18 +2661,18 @@
 			       (pMac, LOG2,
 			       FL("Received Assoc without supp rate IE.\n"));
 		       )
-		cdf_mem_free(ar);
+		qdf_mem_free(ar);
 		return eSIR_FAILURE;
 	}
 #ifdef WLAN_FEATURE_11AC
 	if (ar->VHTCaps.present) {
-		cdf_mem_copy(&pAssocReq->VHTCaps, &ar->VHTCaps,
+		qdf_mem_copy(&pAssocReq->VHTCaps, &ar->VHTCaps,
 			     sizeof(tDot11fIEVHTCaps));
 		lim_log(pMac, LOGW, FL("Received Assoc Req with VHT Cap\n"));
 		lim_log_vht_cap(pMac, &pAssocReq->VHTCaps);
 	}
 	if (ar->OperatingMode.present) {
-		cdf_mem_copy(&pAssocReq->operMode, &ar->OperatingMode,
+		qdf_mem_copy(&pAssocReq->operMode, &ar->OperatingMode,
 			     sizeof(tDot11fIEOperatingMode));
 		lim_log(pMac, LOGW,
 			FL("Received Assoc Req with Operating Mode IE\n"));
@@ -2681,7 +2681,7 @@
 #endif
 	if (ar->ExtCap.present) {
 		struct s_ext_cap *ext_cap;
-		cdf_mem_copy(&pAssocReq->ExtCap.bytes, &ar->ExtCap.bytes,
+		qdf_mem_copy(&pAssocReq->ExtCap.bytes, &ar->ExtCap.bytes,
 			     ar->ExtCap.num_bytes);
 
 		ext_cap = (struct s_ext_cap *)&pAssocReq->ExtCap.bytes;
@@ -2690,7 +2690,7 @@
 			ext_cap->timing_meas, ext_cap->fine_time_meas_initiator,
 			ext_cap->fine_time_meas_responder);
 	}
-	cdf_mem_free(ar);
+	qdf_mem_free(ar);
 	return eSIR_SUCCESS;
 
 } /* End sir_convert_assoc_req_frame2_struct. */
@@ -2705,7 +2705,7 @@
 	uint8_t cnt = 0;
 
 	/* Zero-init our [out] parameter, */
-	cdf_mem_set((uint8_t *) pAssocRsp, sizeof(tSirAssocRsp), 0);
+	qdf_mem_set((uint8_t *) pAssocRsp, sizeof(tSirAssocRsp), 0);
 
 	/* delegate to the framesc-generated code, */
 	status = dot11f_unpack_assoc_response(pMac, pFrame, nFrame, &ar);
@@ -2792,20 +2792,20 @@
 
 	if (ar.HTCaps.present) {
 		lim_log(pMac, LOG1, FL("Received Assoc Resp with HT Cap"));
-		cdf_mem_copy(&pAssocRsp->HTCaps, &ar.HTCaps,
+		qdf_mem_copy(&pAssocRsp->HTCaps, &ar.HTCaps,
 			     sizeof(tDot11fIEHTCaps));
 	}
 
 	if (ar.HTInfo.present) {
 		lim_log(pMac, LOG1, FL("Received Assoc Resp with HT Info"));
-		cdf_mem_copy(&pAssocRsp->HTInfo, &ar.HTInfo,
+		qdf_mem_copy(&pAssocRsp->HTInfo, &ar.HTInfo,
 			     sizeof(tDot11fIEHTInfo));
 	}
 #ifdef WLAN_FEATURE_VOWIFI_11R
 	if (ar.MobilityDomain.present) {
 		/* MobilityDomain */
 		pAssocRsp->mdiePresent = 1;
-		cdf_mem_copy((uint8_t *) &(pAssocRsp->mdie[0]),
+		qdf_mem_copy((uint8_t *) &(pAssocRsp->mdie[0]),
 			     (uint8_t *) &(ar.MobilityDomain.MDID),
 			     sizeof(uint16_t));
 		pAssocRsp->mdie[2] =
@@ -2823,7 +2823,7 @@
 			ar.FTInfo.R0KH_ID.num_PMK_R0_ID,
 			ar.FTInfo.R0KH_ID.present, ar.FTInfo.R1KH_ID.present);
 		pAssocRsp->ftinfoPresent = 1;
-		cdf_mem_copy(&pAssocRsp->FTInfo, &ar.FTInfo,
+		qdf_mem_copy(&pAssocRsp->FTInfo, &ar.FTInfo,
 			     sizeof(tDot11fIEFTInfo));
 	}
 #endif
@@ -2832,7 +2832,7 @@
 	if (ar.num_RICDataDesc) {
 		for (cnt = 0; cnt < ar.num_RICDataDesc; cnt++) {
 			if (ar.RICDataDesc[cnt].present) {
-				cdf_mem_copy(&pAssocRsp->RICData[cnt],
+				qdf_mem_copy(&pAssocRsp->RICData[cnt],
 					     &ar.RICDataDesc[cnt],
 					     sizeof(tDot11fIERICDataDesc));
 			}
@@ -2846,7 +2846,7 @@
 	if (ar.num_WMMTSPEC) {
 		pAssocRsp->num_tspecs = ar.num_WMMTSPEC;
 		for (cnt = 0; cnt < ar.num_WMMTSPEC; cnt++) {
-			cdf_mem_copy(&pAssocRsp->TSPECInfo[cnt],
+			qdf_mem_copy(&pAssocRsp->TSPECInfo[cnt],
 				     &ar.WMMTSPEC[cnt],
 				     (sizeof(tDot11fIEWMMTSPEC) *
 				      ar.num_WMMTSPEC));
@@ -2856,20 +2856,20 @@
 
 	if (ar.ESETrafStrmMet.present) {
 		pAssocRsp->tsmPresent = 1;
-		cdf_mem_copy(&pAssocRsp->tsmIE.tsid,
+		qdf_mem_copy(&pAssocRsp->tsmIE.tsid,
 			     &ar.ESETrafStrmMet.tsid, sizeof(tSirMacESETSMIE));
 	}
 #endif
 
 #ifdef WLAN_FEATURE_11AC
 	if (ar.VHTCaps.present) {
-		cdf_mem_copy(&pAssocRsp->VHTCaps, &ar.VHTCaps,
+		qdf_mem_copy(&pAssocRsp->VHTCaps, &ar.VHTCaps,
 			     sizeof(tDot11fIEVHTCaps));
 		lim_log(pMac, LOG1, FL("Received Assoc Response with VHT Cap"));
 		lim_log_vht_cap(pMac, &pAssocRsp->VHTCaps);
 	}
 	if (ar.VHTOperation.present) {
-		cdf_mem_copy(&pAssocRsp->VHTOperation, &ar.VHTOperation,
+		qdf_mem_copy(&pAssocRsp->VHTOperation, &ar.VHTOperation,
 			     sizeof(tDot11fIEVHTOperation));
 		lim_log(pMac, LOG1,
 			FL("Received Assoc Response with VHT Operation"));
@@ -2879,7 +2879,7 @@
 
 	if (ar.ExtCap.present) {
 		struct s_ext_cap *ext_cap;
-		cdf_mem_copy(&pAssocRsp->ExtCap.bytes, &ar.ExtCap.bytes,
+		qdf_mem_copy(&pAssocRsp->ExtCap.bytes, &ar.ExtCap.bytes,
 			     ar.ExtCap.num_bytes);
 
 		ext_cap = (struct s_ext_cap *)&pAssocRsp->ExtCap.bytes;
@@ -2905,7 +2905,7 @@
 	}
 
 	if (ar.vendor2_ie.VHTCaps.present) {
-		cdf_mem_copy(&pAssocRsp->vendor2_ie.VHTCaps,
+		qdf_mem_copy(&pAssocRsp->vendor2_ie.VHTCaps,
 				&ar.vendor2_ie.VHTCaps,
 				sizeof(tDot11fIEVHTCaps));
 		lim_log(pMac, LOG1,
@@ -2913,7 +2913,7 @@
 		lim_log_vht_cap(pMac, &pAssocRsp->VHTCaps);
 	}
 	if (ar.vendor2_ie.VHTOperation.present) {
-		cdf_mem_copy(&pAssocRsp->vendor2_ie.VHTOperation,
+		qdf_mem_copy(&pAssocRsp->vendor2_ie.VHTOperation,
 				&ar.vendor2_ie.VHTOperation,
 				sizeof(tDot11fIEVHTOperation));
 		lim_log(pMac, LOG1,
@@ -2933,7 +2933,7 @@
 	uint32_t status;
 
 	/* Zero-init our [out] parameter, */
-	cdf_mem_set((uint8_t *) pAssocReq, sizeof(tSirAssocReq), 0);
+	qdf_mem_set((uint8_t *) pAssocReq, sizeof(tSirAssocReq), 0);
 
 	/* delegate to the framesc-generated code, */
 	status = dot11f_unpack_re_assoc_request(pMac, pFrame, nFrame, &ar);
@@ -3030,13 +3030,13 @@
 	}
 
 	if (ar.HTCaps.present) {
-		cdf_mem_copy(&pAssocReq->HTCaps, &ar.HTCaps,
+		qdf_mem_copy(&pAssocReq->HTCaps, &ar.HTCaps,
 			     sizeof(tDot11fIEHTCaps));
 	}
 
 	if (ar.WMMInfoStation.present) {
 		pAssocReq->wmeInfoPresent = 1;
-		cdf_mem_copy(&pAssocReq->WMMInfoStation, &ar.WMMInfoStation,
+		qdf_mem_copy(&pAssocReq->WMMInfoStation, &ar.WMMInfoStation,
 			     sizeof(tDot11fIEWMMInfoStation));
 
 	}
@@ -3080,11 +3080,11 @@
 
 #ifdef WLAN_FEATURE_11AC
 	if (ar.VHTCaps.present) {
-		cdf_mem_copy(&pAssocReq->VHTCaps, &ar.VHTCaps,
+		qdf_mem_copy(&pAssocReq->VHTCaps, &ar.VHTCaps,
 			     sizeof(tDot11fIEVHTCaps));
 	}
 	if (ar.OperatingMode.present) {
-		cdf_mem_copy(&pAssocReq->operMode, &ar.OperatingMode,
+		qdf_mem_copy(&pAssocReq->operMode, &ar.OperatingMode,
 			     sizeof(tDot11fIEOperatingMode));
 		lim_log(pMac, LOGW,
 			FL("Received Assoc Req with Operating Mode IE\n"));
@@ -3094,7 +3094,7 @@
 
 	if (ar.ExtCap.present) {
 		struct s_ext_cap *ext_cap;
-		cdf_mem_copy(&pAssocReq->ExtCap.bytes, &ar.ExtCap.bytes,
+		qdf_mem_copy(&pAssocReq->ExtCap.bytes, &ar.ExtCap.bytes,
 			     ar.ExtCap.num_bytes);
 
 		ext_cap = (struct s_ext_cap *)&pAssocReq->ExtCap.bytes;
@@ -3125,9 +3125,9 @@
 	uint8_t *pos = NULL;
 
 	/* Zero-init our [out] parameter, */
-	cdf_mem_set((uint8_t *) &eseBcnReportMandatoryIe,
+	qdf_mem_set((uint8_t *) &eseBcnReportMandatoryIe,
 		    sizeof(eseBcnReportMandatoryIe), 0);
-	pBies = cdf_mem_malloc(sizeof(tDot11fBeaconIEs));
+	pBies = qdf_mem_malloc(sizeof(tDot11fBeaconIEs));
 	if (NULL == pBies) {
 		lim_log(pMac, LOGE, FL("Failed to allocate memory\n"));
 		return eSIR_MEM_ALLOC_FAILED;
@@ -3139,7 +3139,7 @@
 		lim_log(pMac, LOGE,
 			FL("Failed to parse Beacon IEs (0x%08x, %d bytes):\n"),
 			status, nPayload);
-		cdf_mem_free(pBies);
+		qdf_mem_free(pBies);
 		return eSIR_FAILURE;
 	} else if (DOT11F_WARNED(status)) {
 		lim_log(pMac, LOGW,
@@ -3214,16 +3214,16 @@
 
 	if (pBies->RRMEnabledCap.present) {
 		eseBcnReportMandatoryIe.rrmPresent = 1;
-		cdf_mem_copy(&eseBcnReportMandatoryIe.rmEnabledCapabilities,
+		qdf_mem_copy(&eseBcnReportMandatoryIe.rmEnabledCapabilities,
 			     &pBies->RRMEnabledCap,
 			     sizeof(tDot11fIERRMEnabledCap));
 		numBytes += 1 + 1 + SIR_MAC_RM_ENABLED_CAPABILITY_EID_MAX;
 	}
 
-	*outIeBuf = cdf_mem_malloc(numBytes);
+	*outIeBuf = qdf_mem_malloc(numBytes);
 	if (NULL == *outIeBuf) {
 		lim_log(pMac, LOGP, FL("Memory Allocation failure"));
-		cdf_mem_free(pBies);
+		qdf_mem_free(pBies);
 		return eSIR_MEM_ALLOC_FAILED;
 	}
 	pos = *outIeBuf;
@@ -3243,7 +3243,7 @@
 		pos++;
 		*pos = eseBcnReportMandatoryIe.ssId.length;
 		pos++;
-		cdf_mem_copy(pos,
+		qdf_mem_copy(pos,
 			     (uint8_t *) eseBcnReportMandatoryIe.ssId.ssId,
 			     eseBcnReportMandatoryIe.ssId.length);
 		pos += eseBcnReportMandatoryIe.ssId.length;
@@ -3263,7 +3263,7 @@
 		pos++;
 		*pos = eseBcnReportMandatoryIe.supportedRates.numRates;
 		pos++;
-		cdf_mem_copy(pos,
+		qdf_mem_copy(pos,
 			     (uint8_t *) eseBcnReportMandatoryIe.supportedRates.
 			     rate,
 			     eseBcnReportMandatoryIe.supportedRates.numRates);
@@ -3284,7 +3284,7 @@
 		pos++;
 		*pos = SIR_MAC_FH_PARAM_SET_EID_MAX;
 		pos++;
-		cdf_mem_copy(pos,
+		qdf_mem_copy(pos,
 			     (uint8_t *) &eseBcnReportMandatoryIe.fhParamSet,
 			     SIR_MAC_FH_PARAM_SET_EID_MAX);
 		pos += SIR_MAC_FH_PARAM_SET_EID_MAX;
@@ -3320,7 +3320,7 @@
 		pos++;
 		*pos = SIR_MAC_CF_PARAM_SET_EID_MAX;
 		pos++;
-		cdf_mem_copy(pos,
+		qdf_mem_copy(pos,
 			     (uint8_t *) &eseBcnReportMandatoryIe.cfParamSet,
 			     SIR_MAC_CF_PARAM_SET_EID_MAX);
 		pos += SIR_MAC_CF_PARAM_SET_EID_MAX;
@@ -3339,7 +3339,7 @@
 		pos++;
 		*pos = SIR_MAC_IBSS_PARAM_SET_EID_MAX;
 		pos++;
-		cdf_mem_copy(pos,
+		qdf_mem_copy(pos,
 			     (uint8_t *) &eseBcnReportMandatoryIe.ibssParamSet.
 			     atim, SIR_MAC_IBSS_PARAM_SET_EID_MAX);
 		pos += SIR_MAC_IBSS_PARAM_SET_EID_MAX;
@@ -3358,7 +3358,7 @@
 		pos++;
 		*pos = SIR_MAC_TIM_EID_MIN;
 		pos++;
-		cdf_mem_copy(pos,
+		qdf_mem_copy(pos,
 			     (uint8_t *) &eseBcnReportMandatoryIe.tim,
 			     SIR_MAC_TIM_EID_MIN);
 		pos += SIR_MAC_TIM_EID_MIN;
@@ -3377,7 +3377,7 @@
 		pos++;
 		*pos = SIR_MAC_RM_ENABLED_CAPABILITY_EID_MAX;
 		pos++;
-		cdf_mem_copy(pos,
+		qdf_mem_copy(pos,
 			     (uint8_t *) &eseBcnReportMandatoryIe.
 			     rmEnabledCapabilities,
 			     SIR_MAC_RM_ENABLED_CAPABILITY_EID_MAX);
@@ -3399,11 +3399,11 @@
 	 * that is returning failure.On success, the caller would take
 	 * care of freeing up the memory*/
 	if (retStatus == eSIR_FAILURE) {
-		cdf_mem_free(*outIeBuf);
+		qdf_mem_free(*outIeBuf);
 		*outIeBuf = NULL;
 	}
 
-	cdf_mem_free(pBies);
+	qdf_mem_free(pBies);
 	return retStatus;
 }
 
@@ -3418,9 +3418,9 @@
 	uint32_t status;
 
 	/* Zero-init our [out] parameter, */
-	cdf_mem_set((uint8_t *) pBeaconStruct, sizeof(tSirProbeRespBeacon), 0);
+	qdf_mem_set((uint8_t *) pBeaconStruct, sizeof(tSirProbeRespBeacon), 0);
 
-	pBies = cdf_mem_malloc(sizeof(tDot11fBeaconIEs));
+	pBies = qdf_mem_malloc(sizeof(tDot11fBeaconIEs));
 	if (NULL == pBies) {
 		lim_log(pMac, LOGE, FL("Failed to allocate memory\n"));
 		return eSIR_MEM_ALLOC_FAILED;
@@ -3435,7 +3435,7 @@
 		PELOG2(sir_dump_buf
 			       (pMac, SIR_DBG_MODULE_ID, LOG2, pPayload, nPayload);
 		       )
-		cdf_mem_free(pBies);
+		qdf_mem_free(pBies);
 		return eSIR_FAILURE;
 	} else if (DOT11F_WARNED(status)) {
 		lim_log(pMac, LOGW,
@@ -3492,13 +3492,13 @@
 	/* 11h IEs */
 	if (pBies->TPCReport.present) {
 		pBeaconStruct->tpcReportPresent = 1;
-		cdf_mem_copy(&pBeaconStruct->tpcReport,
+		qdf_mem_copy(&pBeaconStruct->tpcReport,
 			     &pBies->TPCReport, sizeof(tDot11fIETPCReport));
 	}
 
 	if (pBies->PowerConstraints.present) {
 		pBeaconStruct->powerConstraintPresent = 1;
-		cdf_mem_copy(&pBeaconStruct->localPowerConstraint,
+		qdf_mem_copy(&pBeaconStruct->localPowerConstraint,
 			     &pBies->PowerConstraints,
 			     sizeof(tDot11fIEPowerConstraints));
 	}
@@ -3511,7 +3511,7 @@
 			pBies->ESETxmitPower.power_limit;
 	}
 	if (pBies->QBSSLoad.present) {
-		cdf_mem_copy(&pBeaconStruct->QBSSLoad, &pBies->QBSSLoad,
+		qdf_mem_copy(&pBeaconStruct->QBSSLoad, &pBies->QBSSLoad,
 			     sizeof(tDot11fIEQBSSLoad));
 	}
 #endif
@@ -3530,45 +3530,45 @@
 
 	if (pBies->ChanSwitchAnn.present) {
 		pBeaconStruct->channelSwitchPresent = 1;
-		cdf_mem_copy(&pBeaconStruct->channelSwitchIE,
+		qdf_mem_copy(&pBeaconStruct->channelSwitchIE,
 			     &pBies->ChanSwitchAnn,
 			     sizeof(pBeaconStruct->channelSwitchIE));
 	}
 
 	if (pBies->SuppOperatingClasses.present) {
 		pBeaconStruct->supp_operating_class_present = 1;
-		cdf_mem_copy(&pBeaconStruct->supp_operating_classes,
+		qdf_mem_copy(&pBeaconStruct->supp_operating_classes,
 			&pBies->SuppOperatingClasses,
 			sizeof(tDot11fIESuppOperatingClasses));
 	}
 
 	if (pBies->ext_chan_switch_ann.present) {
 		pBeaconStruct->ext_chan_switch_present = 1;
-		cdf_mem_copy(&pBeaconStruct->ext_chan_switch,
+		qdf_mem_copy(&pBeaconStruct->ext_chan_switch,
 			     &pBies->ext_chan_switch_ann,
 			     sizeof(tDot11fIEext_chan_switch_ann));
 	}
 
 	if (pBies->sec_chan_offset_ele.present) {
 		pBeaconStruct->sec_chan_offset_present = 1;
-		cdf_mem_copy(&pBeaconStruct->sec_chan_offset,
+		qdf_mem_copy(&pBeaconStruct->sec_chan_offset,
 			     &pBies->sec_chan_offset_ele,
 			     sizeof(pBeaconStruct->sec_chan_offset));
 	}
 
 	if (pBies->Quiet.present) {
 		pBeaconStruct->quietIEPresent = 1;
-		cdf_mem_copy(&pBeaconStruct->quietIE, &pBies->Quiet,
+		qdf_mem_copy(&pBeaconStruct->quietIE, &pBies->Quiet,
 			     sizeof(tDot11fIEQuiet));
 	}
 
 	if (pBies->HTCaps.present) {
-		cdf_mem_copy(&pBeaconStruct->HTCaps, &pBies->HTCaps,
+		qdf_mem_copy(&pBeaconStruct->HTCaps, &pBies->HTCaps,
 			     sizeof(tDot11fIEHTCaps));
 	}
 
 	if (pBies->HTInfo.present) {
-		cdf_mem_copy(&pBeaconStruct->HTInfo, &pBies->HTInfo,
+		qdf_mem_copy(&pBeaconStruct->HTInfo, &pBies->HTInfo,
 			     sizeof(tDot11fIEHTInfo));
 	}
 
@@ -3611,23 +3611,23 @@
 #ifdef WLAN_FEATURE_11AC
 	if (pBies->VHTCaps.present) {
 		pBeaconStruct->VHTCaps.present = 1;
-		cdf_mem_copy(&pBeaconStruct->VHTCaps, &pBies->VHTCaps,
+		qdf_mem_copy(&pBeaconStruct->VHTCaps, &pBies->VHTCaps,
 			     sizeof(tDot11fIEVHTCaps));
 	}
 	if (pBies->VHTOperation.present) {
 		pBeaconStruct->VHTOperation.present = 1;
-		cdf_mem_copy(&pBeaconStruct->VHTOperation, &pBies->VHTOperation,
+		qdf_mem_copy(&pBeaconStruct->VHTOperation, &pBies->VHTOperation,
 			     sizeof(tDot11fIEVHTOperation));
 	}
 	if (pBies->VHTExtBssLoad.present) {
 		pBeaconStruct->VHTExtBssLoad.present = 1;
-		cdf_mem_copy(&pBeaconStruct->VHTExtBssLoad,
+		qdf_mem_copy(&pBeaconStruct->VHTExtBssLoad,
 			     &pBies->VHTExtBssLoad,
 			     sizeof(tDot11fIEVHTExtBssLoad));
 	}
 	if (pBies->OperatingMode.present) {
 		pBeaconStruct->OperatingMode.present = 1;
-		cdf_mem_copy(&pBeaconStruct->OperatingMode,
+		qdf_mem_copy(&pBeaconStruct->OperatingMode,
 			     &pBies->OperatingMode,
 			     sizeof(tDot11fIEOperatingMode));
 	}
@@ -3635,7 +3635,7 @@
 
 	if (pBies->MobilityDomain.present) {
 		pBeaconStruct->mdiePresent = 1;
-		cdf_mem_copy(pBeaconStruct->mdie, &pBies->MobilityDomain.MDID,
+		qdf_mem_copy(pBeaconStruct->mdie, &pBies->MobilityDomain.MDID,
 			     SIR_MDIE_SIZE);
 	}
 
@@ -3649,17 +3649,17 @@
 
 	if (pBies->vendor2_ie.VHTCaps.present) {
 		pBeaconStruct->vendor2_ie.VHTCaps.present = 1;
-		cdf_mem_copy(&pBeaconStruct->vendor2_ie.VHTCaps,
+		qdf_mem_copy(&pBeaconStruct->vendor2_ie.VHTCaps,
 				&pBies->vendor2_ie.VHTCaps,
 				sizeof(tDot11fIEVHTCaps));
 	}
 	if (pBies->vendor2_ie.VHTOperation.present) {
 		pBeaconStruct->vendor2_ie.VHTOperation.present = 1;
-		cdf_mem_copy(&pBeaconStruct->vendor2_ie.VHTOperation,
+		qdf_mem_copy(&pBeaconStruct->vendor2_ie.VHTOperation,
 				&pBies->vendor2_ie.VHTOperation,
 				sizeof(tDot11fIEVHTOperation));
 	}
-	cdf_mem_free(pBies);
+	qdf_mem_free(pBies);
 	return eSIR_SUCCESS;
 } /* End sir_parse_beacon_ie. */
 
@@ -3682,18 +3682,18 @@
 	rfBand = WMA_GET_RX_RFBAND(pFrame);
 
 	/* Zero-init our [out] parameter, */
-	cdf_mem_set((uint8_t *) pBeaconStruct, sizeof(tSirProbeRespBeacon), 0);
+	qdf_mem_set((uint8_t *) pBeaconStruct, sizeof(tSirProbeRespBeacon), 0);
 
-	pBeacon = cdf_mem_malloc(sizeof(tDot11fBeacon));
+	pBeacon = qdf_mem_malloc(sizeof(tDot11fBeacon));
 	if (NULL == pBeacon) {
 		lim_log(pMac, LOGE, FL("Failed to allocate memory\n"));
 		return eSIR_MEM_ALLOC_FAILED;
 	}
 
-	cdf_mem_set((uint8_t *) pBeacon, sizeof(tDot11fBeacon), 0);
+	qdf_mem_set((uint8_t *) pBeacon, sizeof(tDot11fBeacon), 0);
 
 	/* get the MAC address out of the BD, */
-	cdf_mem_copy(pBeaconStruct->bssid, pHdr->sa, 6);
+	qdf_mem_copy(pBeaconStruct->bssid, pHdr->sa, 6);
 
 	/* delegate to the framesc-generated code, */
 	status = dot11f_unpack_beacon(pMac, pPayload, nPayload, pBeacon);
@@ -3704,7 +3704,7 @@
 		PELOG2(sir_dump_buf
 			       (pMac, SIR_DBG_MODULE_ID, LOG2, pPayload, nPayload);
 		       )
-		cdf_mem_free(pBeacon);
+		qdf_mem_free(pBeacon);
 		return eSIR_FAILURE;
 	} else if (DOT11F_WARNED(status)) {
 		lim_log(pMac, LOGW,
@@ -3717,7 +3717,7 @@
 	}
 	/* & "transliterate" from a 'tDot11fBeacon' to a 'tSirProbeRespBeacon'... */
 	/* Timestamp */
-	cdf_mem_copy((uint8_t *) pBeaconStruct->timeStamp,
+	qdf_mem_copy((uint8_t *) pBeaconStruct->timeStamp,
 		     (uint8_t *) &pBeacon->TimeStamp,
 		     sizeof(tSirMacTimeStamp));
 
@@ -3807,51 +3807,51 @@
 
 	if (pBeacon->ChanSwitchAnn.present) {
 		pBeaconStruct->channelSwitchPresent = 1;
-		cdf_mem_copy(&pBeaconStruct->channelSwitchIE,
+		qdf_mem_copy(&pBeaconStruct->channelSwitchIE,
 			     &pBeacon->ChanSwitchAnn,
 			     sizeof(pBeaconStruct->channelSwitchIE));
 	}
 
 	if (pBeacon->ext_chan_switch_ann.present) {
 		pBeaconStruct->ext_chan_switch_present = 1;
-		cdf_mem_copy(&pBeaconStruct->ext_chan_switch,
+		qdf_mem_copy(&pBeaconStruct->ext_chan_switch,
 			     &pBeacon->ext_chan_switch_ann,
 			     sizeof(tDot11fIEext_chan_switch_ann));
 	}
 
 	if (pBeacon->sec_chan_offset_ele.present) {
 		pBeaconStruct->sec_chan_offset_present = 1;
-		cdf_mem_copy(&pBeaconStruct->sec_chan_offset,
+		qdf_mem_copy(&pBeaconStruct->sec_chan_offset,
 			     &pBeacon->sec_chan_offset_ele,
 			     sizeof(pBeaconStruct->sec_chan_offset));
 	}
 
 	if (pBeacon->TPCReport.present) {
 		pBeaconStruct->tpcReportPresent = 1;
-		cdf_mem_copy(&pBeaconStruct->tpcReport, &pBeacon->TPCReport,
+		qdf_mem_copy(&pBeaconStruct->tpcReport, &pBeacon->TPCReport,
 			     sizeof(tDot11fIETPCReport));
 	}
 
 	if (pBeacon->PowerConstraints.present) {
 		pBeaconStruct->powerConstraintPresent = 1;
-		cdf_mem_copy(&pBeaconStruct->localPowerConstraint,
+		qdf_mem_copy(&pBeaconStruct->localPowerConstraint,
 			     &pBeacon->PowerConstraints,
 			     sizeof(tDot11fIEPowerConstraints));
 	}
 
 	if (pBeacon->Quiet.present) {
 		pBeaconStruct->quietIEPresent = 1;
-		cdf_mem_copy(&pBeaconStruct->quietIE, &pBeacon->Quiet,
+		qdf_mem_copy(&pBeaconStruct->quietIE, &pBeacon->Quiet,
 			     sizeof(tDot11fIEQuiet));
 	}
 
 	if (pBeacon->HTCaps.present) {
-		cdf_mem_copy(&pBeaconStruct->HTCaps, &pBeacon->HTCaps,
+		qdf_mem_copy(&pBeaconStruct->HTCaps, &pBeacon->HTCaps,
 			     sizeof(tDot11fIEHTCaps));
 	}
 
 	if (pBeacon->HTInfo.present) {
-		cdf_mem_copy(&pBeaconStruct->HTInfo, &pBeacon->HTInfo,
+		qdf_mem_copy(&pBeaconStruct->HTInfo, &pBeacon->HTInfo,
 			     sizeof(tDot11fIEHTInfo));
 
 	}
@@ -3908,7 +3908,7 @@
 	if (pBeacon->MobilityDomain.present) {
 		/* MobilityDomain */
 		pBeaconStruct->mdiePresent = 1;
-		cdf_mem_copy((uint8_t *) &(pBeaconStruct->mdie[0]),
+		qdf_mem_copy((uint8_t *) &(pBeaconStruct->mdie[0]),
 			     (uint8_t *) &(pBeacon->MobilityDomain.MDID),
 			     sizeof(uint16_t));
 		pBeaconStruct->mdie[2] =
@@ -3926,39 +3926,39 @@
 	if (pBeacon->ESETxmitPower.present) {
 		/* copy ESE TPC info element */
 		pBeaconStruct->eseTxPwr.present = 1;
-		cdf_mem_copy(&pBeaconStruct->eseTxPwr,
+		qdf_mem_copy(&pBeaconStruct->eseTxPwr,
 			     &pBeacon->ESETxmitPower,
 			     sizeof(tDot11fIEESETxmitPower));
 	}
 	if (pBeacon->QBSSLoad.present) {
-		cdf_mem_copy(&pBeaconStruct->QBSSLoad,
+		qdf_mem_copy(&pBeaconStruct->QBSSLoad,
 			     &pBeacon->QBSSLoad, sizeof(tDot11fIEQBSSLoad));
 	}
 #endif
 
 #ifdef WLAN_FEATURE_11AC
 	if (pBeacon->VHTCaps.present) {
-		cdf_mem_copy(&pBeaconStruct->VHTCaps, &pBeacon->VHTCaps,
+		qdf_mem_copy(&pBeaconStruct->VHTCaps, &pBeacon->VHTCaps,
 			     sizeof(tDot11fIEVHTCaps));
 	}
 	if (pBeacon->VHTOperation.present) {
-		cdf_mem_copy(&pBeaconStruct->VHTOperation,
+		qdf_mem_copy(&pBeaconStruct->VHTOperation,
 			     &pBeacon->VHTOperation,
 			     sizeof(tDot11fIEVHTOperation));
 	}
 	if (pBeacon->VHTExtBssLoad.present) {
-		cdf_mem_copy(&pBeaconStruct->VHTExtBssLoad,
+		qdf_mem_copy(&pBeaconStruct->VHTExtBssLoad,
 			     &pBeacon->VHTExtBssLoad,
 			     sizeof(tDot11fIEVHTExtBssLoad));
 	}
 	if (pBeacon->OperatingMode.present) {
-		cdf_mem_copy(&pBeaconStruct->OperatingMode,
+		qdf_mem_copy(&pBeaconStruct->OperatingMode,
 			     &pBeacon->OperatingMode,
 			     sizeof(tDot11fIEOperatingMode));
 	}
 	if (pBeacon->WiderBWChanSwitchAnn.present) {
 		pBeaconStruct->WiderBWChanSwitchAnnPresent = 1;
-		cdf_mem_copy(&pBeaconStruct->WiderBWChanSwitchAnn,
+		qdf_mem_copy(&pBeaconStruct->WiderBWChanSwitchAnn,
 			     &pBeacon->WiderBWChanSwitchAnn,
 			     sizeof(tDot11fIEWiderBWChanSwitchAnn));
 	}
@@ -3967,7 +3967,7 @@
 	/* IBSS Peer Params */
 	if (pBeacon->IBSSParams.present) {
 		pBeaconStruct->IBSSParams.present = 1;
-		cdf_mem_copy(&pBeaconStruct->IBSSParams, &pBeacon->IBSSParams,
+		qdf_mem_copy(&pBeaconStruct->IBSSParams, &pBeacon->IBSSParams,
 			     sizeof(tDot11fIEIBSSParams));
 	}
 
@@ -3986,12 +3986,12 @@
 		      )
 	}
 	if (pBeacon->vendor2_ie.VHTCaps.present) {
-		cdf_mem_copy(&pBeaconStruct->vendor2_ie.VHTCaps,
+		qdf_mem_copy(&pBeaconStruct->vendor2_ie.VHTCaps,
 				&pBeacon->vendor2_ie.VHTCaps,
 				sizeof(tDot11fIEVHTCaps));
 	}
 	if (pBeacon->vendor2_ie.VHTOperation.present) {
-		cdf_mem_copy(&pBeaconStruct->vendor2_ie.VHTOperation,
+		qdf_mem_copy(&pBeaconStruct->vendor2_ie.VHTOperation,
 				&pBeacon->VHTOperation,
 				sizeof(tDot11fIEVHTOperation));
 	}
@@ -4007,7 +4007,7 @@
 #endif /* FEATURE_AP_MCC_CH_AVOIDANCE */
 
 
-	cdf_mem_free(pBeacon);
+	qdf_mem_free(pBeacon);
 	return eSIR_SUCCESS;
 
 } /* End sir_convert_beacon_frame2_struct. */
@@ -4021,7 +4021,7 @@
 	uint32_t status;
 
 	/* Zero-init our [out] parameter, */
-	cdf_mem_set((uint8_t *) pAuth, sizeof(tSirMacAuthFrameBody), 0);
+	qdf_mem_set((uint8_t *) pAuth, sizeof(tSirMacAuthFrameBody), 0);
 
 	/* delegate to the framesc-generated code, */
 	status = dot11f_unpack_authentication(pMac, pFrame, nFrame, &auth);
@@ -4051,7 +4051,7 @@
 	if (auth.ChallengeText.present) {
 		pAuth->type = SIR_MAC_CHALLENGE_TEXT_EID;
 		pAuth->length = auth.ChallengeText.num_text;
-		cdf_mem_copy(pAuth->challengeText, auth.ChallengeText.text,
+		qdf_mem_copy(pAuth->challengeText, auth.ChallengeText.text,
 			     auth.ChallengeText.num_text);
 	}
 
@@ -4078,7 +4078,7 @@
 		return eSIR_FAILURE;
 	}
 	/* Zero-init our [out] parameter, */
-	cdf_mem_set((uint8_t *) pAddTs, sizeof(tSirAddtsReqInfo), 0);
+	qdf_mem_set((uint8_t *) pAddTs, sizeof(tSirAddtsReqInfo), 0);
 
 	/* delegate to the framesc-generated code, */
 	switch (*pFrame) {
@@ -4219,9 +4219,9 @@
 		return eSIR_FAILURE;
 	}
 	/* Zero-init our [out] parameter, */
-	cdf_mem_set((uint8_t *) pAddTs, sizeof(tSirAddtsRspInfo), 0);
-	cdf_mem_set((uint8_t *) &addts, sizeof(tDot11fAddTSResponse), 0);
-	cdf_mem_set((uint8_t *) &wmmaddts, sizeof(tDot11fWMMAddTSResponse), 0);
+	qdf_mem_set((uint8_t *) pAddTs, sizeof(tSirAddtsRspInfo), 0);
+	qdf_mem_set((uint8_t *) &addts, sizeof(tDot11fAddTSResponse), 0);
+	qdf_mem_set((uint8_t *) &wmmaddts, sizeof(tDot11fWMMAddTSResponse), 0);
 
 	/* delegate to the framesc-generated code, */
 	switch (*pFrame) {
@@ -4304,7 +4304,7 @@
 #ifdef FEATURE_WLAN_ESE
 		if (addts.ESETrafStrmMet.present) {
 			pAddTs->tsmPresent = 1;
-			cdf_mem_copy(&pAddTs->tsmIE.tsid,
+			qdf_mem_copy(&pAddTs->tsmIE.tsid,
 				     &addts.ESETrafStrmMet.tsid,
 				     sizeof(tSirMacESETSMIE));
 		}
@@ -4373,7 +4373,7 @@
 #ifdef FEATURE_WLAN_ESE
 		if (wmmaddts.ESETrafStrmMet.present) {
 			pAddTs->tsmPresent = 1;
-			cdf_mem_copy(&pAddTs->tsmIE.tsid,
+			qdf_mem_copy(&pAddTs->tsmIE.tsid,
 				     &wmmaddts.ESETrafStrmMet.tsid,
 				     sizeof(tSirMacESETSMIE));
 		}
@@ -4402,7 +4402,7 @@
 		return eSIR_FAILURE;
 	}
 	/* Zero-init our [out] parameter, */
-	cdf_mem_set((uint8_t *) pDelTs, sizeof(tSirDeltsReqInfo), 0);
+	qdf_mem_set((uint8_t *) pDelTs, sizeof(tSirDeltsReqInfo), 0);
 
 	/* delegate to the framesc-generated code, */
 	switch (*pFrame) {
@@ -4515,7 +4515,7 @@
 {
 	tDot11fTPCRequest req;
 	uint32_t status;
-	cdf_mem_set((uint8_t *) pTpcReqFrame, sizeof(tSirMacTpcReqActionFrame),
+	qdf_mem_set((uint8_t *) pTpcReqFrame, sizeof(tSirMacTpcReqActionFrame),
 		    0);
 	status = dot11f_unpack_tpc_request(pMac, pFrame, nFrame, &req);
 	if (DOT11F_FAILED(status)) {
@@ -4560,7 +4560,7 @@
 	uint32_t status;
 
 	/* Zero-init our [out] parameter, */
-	cdf_mem_set((uint8_t *) pMeasReqFrame,
+	qdf_mem_set((uint8_t *) pMeasReqFrame,
 		    sizeof(tpSirMacMeasReqActionFrame), 0);
 
 	/* delegate to the framesc-generated code, */
@@ -4618,7 +4618,7 @@
 	pMeasReqFrame->measReqIE.measReqField.channelNumber =
 		mr.MeasurementRequest[0].channel_no;
 
-	cdf_mem_copy(pMeasReqFrame->measReqIE.measReqField.measStartTime,
+	qdf_mem_copy(pMeasReqFrame->measReqIE.measReqField.measStartTime,
 		     mr.MeasurementRequest[0].meas_start_time, 8);
 
 	pMeasReqFrame->measReqIE.measReqField.measDuration =
@@ -4731,7 +4731,7 @@
 			pDot11f->present = 1;
 			/* Dont include OUI */
 			pDot11f->num_data = pCCKMie->cckmIEdata[idx + 1] - 4;
-			cdf_mem_copy(pDot11f->data, pCCKMie->cckmIEdata + idx + 2 + 4,  /* EID,len,OUI */
+			qdf_mem_copy(pDot11f->data, pCCKMie->cckmIEdata + idx + 2 + 4,  /* EID,len,OUI */
 				     pCCKMie->cckmIEdata[idx + 1] - 4); /* Skip OUI */
 		}
 	}
@@ -4744,7 +4744,7 @@
 			   uint8_t rate_length)
 {
 	pDot11f->tsid = pOld->tsid;
-	cdf_mem_copy(pDot11f->tsrates, pOld->rates, rate_length);
+	qdf_mem_copy(pDot11f->tsrates, pOld->rates, rate_length);
 	pDot11f->num_tsrates = rate_length;
 	pDot11f->present = 1;
 }
@@ -4760,19 +4760,19 @@
 
 	switch (pDot11f->classifier_type) {
 	case SIR_MAC_TCLASTYPE_ETHERNET:
-		cdf_mem_copy((uint8_t *) &pDot11f->info.EthParams.source,
+		qdf_mem_copy((uint8_t *) &pDot11f->info.EthParams.source,
 			     (uint8_t *) &pOld->tclasParams.eth.srcAddr, 6);
-		cdf_mem_copy((uint8_t *) &pDot11f->info.EthParams.dest,
+		qdf_mem_copy((uint8_t *) &pDot11f->info.EthParams.dest,
 			     (uint8_t *) &pOld->tclasParams.eth.dstAddr, 6);
 		pDot11f->info.EthParams.type = pOld->tclasParams.eth.type;
 		break;
 	case SIR_MAC_TCLASTYPE_TCPUDPIP:
 		pDot11f->info.IpParams.version = pOld->version;
 		if (SIR_MAC_TCLAS_IPV4 == pDot11f->info.IpParams.version) {
-			cdf_mem_copy(pDot11f->info.IpParams.params.IpV4Params.
+			qdf_mem_copy(pDot11f->info.IpParams.params.IpV4Params.
 				     source, pOld->tclasParams.ipv4.srcIpAddr,
 				     4);
-			cdf_mem_copy(pDot11f->info.IpParams.params.IpV4Params.
+			qdf_mem_copy(pDot11f->info.IpParams.params.IpV4Params.
 				     dest, pOld->tclasParams.ipv4.dstIpAddr, 4);
 			pDot11f->info.IpParams.params.IpV4Params.src_port =
 				pOld->tclasParams.ipv4.srcPort;
@@ -4785,11 +4785,11 @@
 			pDot11f->info.IpParams.params.IpV4Params.reserved =
 				pOld->tclasParams.ipv4.rsvd;
 		} else {
-			cdf_mem_copy((uint8_t *) &pDot11f->info.IpParams.
+			qdf_mem_copy((uint8_t *) &pDot11f->info.IpParams.
 				     params.IpV6Params.source,
 				     (uint8_t *) pOld->tclasParams.ipv6.
 				     srcIpAddr, 16);
-			cdf_mem_copy((uint8_t *) &pDot11f->info.IpParams.
+			qdf_mem_copy((uint8_t *) &pDot11f->info.IpParams.
 				     params.IpV6Params.dest,
 				     (uint8_t *) pOld->tclasParams.ipv6.
 				     dstIpAddr, 16);
@@ -4797,7 +4797,7 @@
 				pOld->tclasParams.ipv6.srcPort;
 			pDot11f->info.IpParams.params.IpV6Params.dest_port =
 				pOld->tclasParams.ipv6.dstPort;
-			cdf_mem_copy((uint8_t *) &pDot11f->info.IpParams.
+			qdf_mem_copy((uint8_t *) &pDot11f->info.IpParams.
 				     params.IpV6Params.flow_label,
 				     (uint8_t *) pOld->tclasParams.ipv6.
 				     flowLabel, 3);
@@ -4831,20 +4831,20 @@
 
 	switch (pDot11f->classifier_type) {
 	case SIR_MAC_TCLASTYPE_ETHERNET:
-		cdf_mem_copy((uint8_t *) &pDot11f->info.EthParams.source,
+		qdf_mem_copy((uint8_t *) &pDot11f->info.EthParams.source,
 			     (uint8_t *) &pOld->tclasParams.eth.srcAddr, 6);
-		cdf_mem_copy((uint8_t *) &pDot11f->info.EthParams.dest,
+		qdf_mem_copy((uint8_t *) &pDot11f->info.EthParams.dest,
 			     (uint8_t *) &pOld->tclasParams.eth.dstAddr, 6);
 		pDot11f->info.EthParams.type = pOld->tclasParams.eth.type;
 		break;
 	case SIR_MAC_TCLASTYPE_TCPUDPIP:
 		pDot11f->info.IpParams.version = pOld->version;
 		if (SIR_MAC_TCLAS_IPV4 == pDot11f->info.IpParams.version) {
-			cdf_mem_copy((uint8_t *) &pDot11f->info.IpParams.
+			qdf_mem_copy((uint8_t *) &pDot11f->info.IpParams.
 				     params.IpV4Params.source,
 				     (uint8_t *) pOld->tclasParams.ipv4.
 				     srcIpAddr, 4);
-			cdf_mem_copy((uint8_t *) &pDot11f->info.IpParams.
+			qdf_mem_copy((uint8_t *) &pDot11f->info.IpParams.
 				     params.IpV4Params.dest,
 				     (uint8_t *) pOld->tclasParams.ipv4.
 				     dstIpAddr, 4);
@@ -4859,11 +4859,11 @@
 			pDot11f->info.IpParams.params.IpV4Params.reserved =
 				pOld->tclasParams.ipv4.rsvd;
 		} else {
-			cdf_mem_copy((uint8_t *) &pDot11f->info.IpParams.
+			qdf_mem_copy((uint8_t *) &pDot11f->info.IpParams.
 				     params.IpV6Params.source,
 				     (uint8_t *) pOld->tclasParams.ipv6.
 				     srcIpAddr, 16);
-			cdf_mem_copy((uint8_t *) &pDot11f->info.IpParams.
+			qdf_mem_copy((uint8_t *) &pDot11f->info.IpParams.
 				     params.IpV6Params.dest,
 				     (uint8_t *) pOld->tclasParams.ipv6.
 				     dstIpAddr, 16);
@@ -4871,7 +4871,7 @@
 				pOld->tclasParams.ipv6.srcPort;
 			pDot11f->info.IpParams.params.IpV6Params.dest_port =
 				pOld->tclasParams.ipv6.dstPort;
-			cdf_mem_copy((uint8_t *) &pDot11f->info.IpParams.
+			qdf_mem_copy((uint8_t *) &pDot11f->info.IpParams.
 				     params.IpV6Params.flow_label,
 				     (uint8_t *) pOld->tclasParams.ipv6.
 				     flowLabel, 3);
@@ -5038,7 +5038,7 @@
 
 	if (pSirWPSProbeRspIE->FieldPresent & SIR_WPS_PROBRSP_UUIDE_PRESENT) {
 		pDot11f->UUID_E.present = 1;
-		cdf_mem_copy(pDot11f->UUID_E.uuid, pSirWPSProbeRspIE->UUID_E,
+		qdf_mem_copy(pDot11f->UUID_E.uuid, pSirWPSProbeRspIE->UUID_E,
 			     WNI_CFG_WPS_UUID_LEN);
 	} else
 		pDot11f->UUID_E.present = 0;
@@ -5048,7 +5048,7 @@
 		pDot11f->Manufacturer.present = 1;
 		pDot11f->Manufacturer.num_name =
 			pSirWPSProbeRspIE->Manufacture.num_name;
-		cdf_mem_copy(pDot11f->Manufacturer.name,
+		qdf_mem_copy(pDot11f->Manufacturer.name,
 			     pSirWPSProbeRspIE->Manufacture.name,
 			     pSirWPSProbeRspIE->Manufacture.num_name);
 	} else
@@ -5059,7 +5059,7 @@
 		pDot11f->ModelName.present = 1;
 		pDot11f->ModelName.num_text =
 			pSirWPSProbeRspIE->ModelName.num_text;
-		cdf_mem_copy(pDot11f->ModelName.text,
+		qdf_mem_copy(pDot11f->ModelName.text,
 			     pSirWPSProbeRspIE->ModelName.text,
 			     pDot11f->ModelName.num_text);
 	} else
@@ -5070,7 +5070,7 @@
 		pDot11f->ModelNumber.present = 1;
 		pDot11f->ModelNumber.num_text =
 			pSirWPSProbeRspIE->ModelNumber.num_text;
-		cdf_mem_copy(pDot11f->ModelNumber.text,
+		qdf_mem_copy(pDot11f->ModelNumber.text,
 			     pSirWPSProbeRspIE->ModelNumber.text,
 			     pDot11f->ModelNumber.num_text);
 	} else
@@ -5081,7 +5081,7 @@
 		pDot11f->SerialNumber.present = 1;
 		pDot11f->SerialNumber.num_text =
 			pSirWPSProbeRspIE->SerialNumber.num_text;
-		cdf_mem_copy(pDot11f->SerialNumber.text,
+		qdf_mem_copy(pDot11f->SerialNumber.text,
 			     pSirWPSProbeRspIE->SerialNumber.text,
 			     pDot11f->SerialNumber.num_text);
 	} else
@@ -5090,7 +5090,7 @@
 	if (pSirWPSProbeRspIE->
 	    FieldPresent & SIR_WPS_PROBRSP_PRIMARYDEVICETYPE_PRESENT) {
 		pDot11f->PrimaryDeviceType.present = 1;
-		cdf_mem_copy(pDot11f->PrimaryDeviceType.oui,
+		qdf_mem_copy(pDot11f->PrimaryDeviceType.oui,
 			     pSirWPSProbeRspIE->PrimaryDeviceOUI,
 			     sizeof(pSirWPSProbeRspIE->PrimaryDeviceOUI));
 		pDot11f->PrimaryDeviceType.primary_category =
@@ -5105,7 +5105,7 @@
 		pDot11f->DeviceName.present = 1;
 		pDot11f->DeviceName.num_text =
 			pSirWPSProbeRspIE->DeviceName.num_text;
-		cdf_mem_copy(pDot11f->DeviceName.text,
+		qdf_mem_copy(pDot11f->DeviceName.text,
 			     pSirWPSProbeRspIE->DeviceName.text,
 			     pDot11f->DeviceName.num_text);
 	} else
@@ -5218,7 +5218,7 @@
 
 	if (pSirWPSBeaconIE->FieldPresent & SIR_WPS_BEACON_UUIDE_PRESENT) {
 		pDot11f->UUID_E.present = 1;
-		cdf_mem_copy(pDot11f->UUID_E.uuid, pSirWPSBeaconIE->UUID_E,
+		qdf_mem_copy(pDot11f->UUID_E.uuid, pSirWPSBeaconIE->UUID_E,
 			     WNI_CFG_WPS_UUID_LEN);
 	} else
 		pDot11f->UUID_E.present = 0;
@@ -5519,7 +5519,7 @@
 
 	pDot11f->report.Beacon.regClass = pBeaconReport->regClass;
 	pDot11f->report.Beacon.channel = pBeaconReport->channel;
-	cdf_mem_copy(pDot11f->report.Beacon.meas_start_time,
+	qdf_mem_copy(pDot11f->report.Beacon.meas_start_time,
 		     pBeaconReport->measStartTime,
 		     sizeof(pDot11f->report.Beacon.meas_start_time));
 	pDot11f->report.Beacon.meas_duration = pBeaconReport->measDuration;
@@ -5528,14 +5528,14 @@
 		!pBeaconReport->bcnProbeRsp;
 	pDot11f->report.Beacon.RCPI = pBeaconReport->rcpi;
 	pDot11f->report.Beacon.RSNI = pBeaconReport->rsni;
-	cdf_mem_copy(pDot11f->report.Beacon.BSSID, pBeaconReport->bssid,
+	qdf_mem_copy(pDot11f->report.Beacon.BSSID, pBeaconReport->bssid,
 		     sizeof(tSirMacAddr));
 	pDot11f->report.Beacon.antenna_id = pBeaconReport->antennaId;
 	pDot11f->report.Beacon.parent_TSF = pBeaconReport->parentTSF;
 
 	if (pBeaconReport->numIes) {
 		pDot11f->report.Beacon.BeaconReportFrmBody.present = 1;
-		cdf_mem_copy(pDot11f->report.Beacon.BeaconReportFrmBody.
+		qdf_mem_copy(pDot11f->report.Beacon.BeaconReportFrmBody.
 			     reportedFields, pBeaconReport->Ies,
 			     pBeaconReport->numIes);
 		pDot11f->report.Beacon.BeaconReportFrmBody.num_reportedFields =
@@ -5704,12 +5704,12 @@
 		WNI_CFG_MAX_TX_POWER_5_LEN);
 	item = WNI_CFG_COUNTRY_CODE;
 	CFG_GET_STR(nSirStatus, mac_ctx, item, code, codelen, 3);
-	cdf_mem_copy(&frame->Country, code, codelen);
+	qdf_mem_copy(&frame->Country, code, codelen);
 	if (len > MAX_SIZE_OF_TRIPLETS_IN_COUNTRY_IE)
 		len = MAX_SIZE_OF_TRIPLETS_IN_COUNTRY_IE;
 
 	frame->Country.num_triplets = (uint8_t)(len / 3);
-	cdf_mem_copy((uint8_t *)&frame->Country.triplets, temp, len);
+	qdf_mem_copy((uint8_t *)&frame->Country.triplets, temp, len);
 	frame->Country.present = 1;
 
 	/* PowerConstraints */
diff --git a/core/mac/src/sys/legacy/src/utils/src/utils_parser.c b/core/mac/src/sys/legacy/src/utils/src/utils_parser.c
index 9b91902..093e404 100644
--- a/core/mac/src/sys/legacy/src/utils/src/utils_parser.c
+++ b/core/mac/src/sys/legacy/src/utils/src/utils_parser.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011-2014 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2016 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -44,21 +44,21 @@
 void convert_ssid(tpAniSirGlobal pMac, tSirMacSSid *pOld, tDot11fIESSID *pNew)
 {
 	pOld->length = pNew->num_ssid;
-	cdf_mem_copy(pOld->ssId, pNew->ssid, pNew->num_ssid);
+	qdf_mem_copy(pOld->ssId, pNew->ssid, pNew->num_ssid);
 }
 
 void convert_supp_rates(tpAniSirGlobal pMac,
 			tSirMacRateSet *pOld, tDot11fIESuppRates *pNew)
 {
 	pOld->numRates = pNew->num_rates;
-	cdf_mem_copy(pOld->rate, pNew->rates, pNew->num_rates);
+	qdf_mem_copy(pOld->rate, pNew->rates, pNew->num_rates);
 }
 
 void convert_ext_supp_rates(tpAniSirGlobal pMac,
 			    tSirMacRateSet *pOld, tDot11fIEExtSuppRates *pNew)
 {
 	pOld->numRates = pNew->num_rates;
-	cdf_mem_copy(pOld->rate, pNew->rates, pNew->num_rates);
+	qdf_mem_copy(pOld->rate, pNew->rates, pNew->num_rates);
 }
 
 void convert_qos_caps(tpAniSirGlobal pMac,
@@ -101,7 +101,7 @@
 	}
 
 	pOld->length = (uint8_t) written - 2;
-	cdf_mem_copy(pOld->info, buffer + 2, pOld->length);
+	qdf_mem_copy(pOld->info, buffer + 2, pOld->length);
 
 	return eSIR_SUCCESS;
 }
@@ -116,7 +116,7 @@
 	pOld->info[1] = 0x50;
 	pOld->info[2] = 0xf2;
 	pOld->info[3] = 0x01;
-	cdf_mem_copy(pOld->info + 4, pNew->data, pNew->num_data);
+	qdf_mem_copy(pOld->info + 4, pNew->data, pNew->num_data);
 
 	return eSIR_SUCCESS;
 }
@@ -129,7 +129,7 @@
 	/* This is awful, I know, but the old code just rammed the IE into */
 	/* an opaque array.  Note that we need to explicitly add the OUI! */
 	pOld->length = pNew->num_data;
-	cdf_mem_copy(pOld->info, pNew->data, pNew->num_data);
+	qdf_mem_copy(pOld->info, pNew->data, pNew->num_data);
 
 	return eSIR_SUCCESS;
 }
@@ -149,7 +149,7 @@
 	pOld->addIEdata[curAddIELen++] = 0x50;
 	pOld->addIEdata[curAddIELen++] = 0xf2;
 	pOld->addIEdata[curAddIELen++] = 0x04;
-	cdf_mem_copy(pOld->addIEdata + curAddIELen, pNew->data, pNew->num_data);
+	qdf_mem_copy(pOld->addIEdata + curAddIELen, pNew->data, pNew->num_data);
 
 	return eSIR_SUCCESS;
 }
@@ -168,7 +168,7 @@
 	pOld->addIEdata[curAddIELen++] = 0x6f;
 	pOld->addIEdata[curAddIELen++] = 0x9A;
 	pOld->addIEdata[curAddIELen++] = 0x09;
-	cdf_mem_copy(pOld->addIEdata + curAddIELen, pNew->data, pNew->num_data);
+	qdf_mem_copy(pOld->addIEdata + curAddIELen, pNew->data, pNew->num_data);
 
 	return eSIR_SUCCESS;
 }
@@ -188,7 +188,7 @@
 	pOld->addIEdata[curAddIELen++] = 0x6f;
 	pOld->addIEdata[curAddIELen++] = 0x9A;
 	pOld->addIEdata[curAddIELen++] = 0x0a;
-	cdf_mem_copy(pOld->addIEdata + curAddIELen, pNew->data, pNew->num_data);
+	qdf_mem_copy(pOld->addIEdata + curAddIELen, pNew->data, pNew->num_data);
 
 	return eSIR_SUCCESS;
 }
@@ -207,7 +207,7 @@
 	}
 
 	pOld->length = (uint8_t) written - 2;
-	cdf_mem_copy(pOld->info, buffer + 2, pOld->length);
+	qdf_mem_copy(pOld->info, buffer + 2, pOld->length);
 
 	return eSIR_SUCCESS;
 }
@@ -218,7 +218,7 @@
 	/* This is awful, I know, but the old code just rammed the IE into */
 	/* an opaque array. */
 	pOld->length = pNew->num_data;
-	cdf_mem_copy(pOld->info, pNew->data, pOld->length);
+	qdf_mem_copy(pOld->info, pNew->data, pOld->length);
 
 	return eSIR_SUCCESS;
 }
@@ -239,7 +239,7 @@
 {
 	pOld->type = 36;
 	pOld->length = (pNew->num_bands * 2);
-	cdf_mem_copy((uint8_t *) pOld->supportedChannels,
+	qdf_mem_copy((uint8_t *) pOld->supportedChannels,
 		     (uint8_t *) pNew->bands, pOld->length);
 }
 
@@ -268,7 +268,7 @@
 	pOld->bitmapControl = pNew->bmpctl;
 	pOld->bitmapLength = pNew->num_vbmp;
 
-	cdf_mem_copy(pOld->bitmap, pNew->vbmp, pNew->num_vbmp);
+	qdf_mem_copy(pOld->bitmap, pNew->vbmp, pNew->num_vbmp);
 }
 
 void convert_country(tpAniSirGlobal pMac,
@@ -276,7 +276,7 @@
 {
 	int i;
 
-	cdf_mem_copy(pOld->countryString, pNew->country, COUNTRY_STRING_LENGTH);
+	qdf_mem_copy(pOld->countryString, pNew->country, COUNTRY_STRING_LENGTH);
 
 	pOld->numIntervals = pNew->num_triplets;
 
@@ -295,7 +295,7 @@
 	pOld->type = 221;
 	pOld->length = 24;
 
-	cdf_mem_copy((uint8_t *) &pOld->qosInfo, (uint8_t *) &pNew->qosInfo,
+	qdf_mem_copy((uint8_t *) &pOld->qosInfo, (uint8_t *) &pNew->qosInfo,
 		     1);
 
 	pOld->acbe.aci.aifsn = pNew->acbe_aifsn;
@@ -342,7 +342,7 @@
 	pOld->type = 12;
 	pOld->length = 20;
 
-	cdf_mem_copy((uint8_t *) &pOld->qosInfo, (uint8_t *) &pNew->qos, 1);
+	qdf_mem_copy((uint8_t *) &pOld->qosInfo, (uint8_t *) &pNew->qos, 1);
 
 	pOld->acbe.aci.aifsn = pNew->acbe_aifsn;
 	pOld->acbe.aci.acm = pNew->acbe_acm;
@@ -422,9 +422,9 @@
 
 	switch (pNew->classifier_type) {
 	case 0:
-		cdf_mem_copy(pOld->tclasParams.eth.srcAddr,
+		qdf_mem_copy(pOld->tclasParams.eth.srcAddr,
 			     pNew->info.EthParams.source, 6);
-		cdf_mem_copy(pOld->tclasParams.eth.dstAddr,
+		qdf_mem_copy(pOld->tclasParams.eth.dstAddr,
 			     pNew->info.EthParams.dest, 6);
 		pOld->tclasParams.eth.type = pNew->info.EthParams.type;
 		break;
@@ -432,10 +432,10 @@
 		pOld->version = pNew->info.IpParams.version;
 		if (4 == pNew->info.IpParams.version) {
 			pOld->tclasParams.ipv4.version = 4;
-			cdf_mem_copy(pOld->tclasParams.ipv4.srcIpAddr,
+			qdf_mem_copy(pOld->tclasParams.ipv4.srcIpAddr,
 				     pNew->info.IpParams.params.IpV4Params.
 				     source, 4);
-			cdf_mem_copy(pOld->tclasParams.ipv4.dstIpAddr,
+			qdf_mem_copy(pOld->tclasParams.ipv4.dstIpAddr,
 				     pNew->info.IpParams.params.IpV4Params.dest,
 				     4);
 			pOld->tclasParams.ipv4.srcPort =
@@ -450,11 +450,11 @@
 				pNew->info.IpParams.params.IpV4Params.reserved;
 		} else if (6 == pNew->info.IpParams.version) {
 			pOld->tclasParams.ipv6.version = 6;
-			cdf_mem_copy((uint8_t *) pOld->tclasParams.ipv6.
+			qdf_mem_copy((uint8_t *) pOld->tclasParams.ipv6.
 				     srcIpAddr,
 				     (uint8_t *) pNew->info.IpParams.params.
 				     IpV6Params.source, 16);
-			cdf_mem_copy((uint8_t *) pOld->tclasParams.ipv6.
+			qdf_mem_copy((uint8_t *) pOld->tclasParams.ipv6.
 				     dstIpAddr,
 				     (uint8_t *) pNew->info.IpParams.params.
 				     IpV6Params.dest, 16);
@@ -462,7 +462,7 @@
 				pNew->info.IpParams.params.IpV6Params.src_port;
 			pOld->tclasParams.ipv6.dstPort =
 				pNew->info.IpParams.params.IpV6Params.dest_port;
-			cdf_mem_copy((uint8_t *) pOld->tclasParams.ipv6.
+			qdf_mem_copy((uint8_t *) pOld->tclasParams.ipv6.
 				     flowLabel,
 				     (uint8_t *) pNew->info.IpParams.params.
 				     IpV6Params.flow_label, 3);
@@ -526,9 +526,9 @@
 
 	switch (pNew->classifier_type) {
 	case 0:
-		cdf_mem_copy(pOld->tclasParams.eth.srcAddr,
+		qdf_mem_copy(pOld->tclasParams.eth.srcAddr,
 			     pNew->info.EthParams.source, 6);
-		cdf_mem_copy(pOld->tclasParams.eth.dstAddr,
+		qdf_mem_copy(pOld->tclasParams.eth.dstAddr,
 			     pNew->info.EthParams.dest, 6);
 		pOld->tclasParams.eth.type = pNew->info.EthParams.type;
 		break;
@@ -536,10 +536,10 @@
 		pOld->version = pNew->info.IpParams.version;
 		if (4 == pNew->info.IpParams.version) {
 			pOld->tclasParams.ipv4.version = 4;
-			cdf_mem_copy(pOld->tclasParams.ipv4.srcIpAddr,
+			qdf_mem_copy(pOld->tclasParams.ipv4.srcIpAddr,
 				     pNew->info.IpParams.params.IpV4Params.
 				     source, 4);
-			cdf_mem_copy(pOld->tclasParams.ipv4.dstIpAddr,
+			qdf_mem_copy(pOld->tclasParams.ipv4.dstIpAddr,
 				     pNew->info.IpParams.params.IpV4Params.dest,
 				     4);
 			pOld->tclasParams.ipv4.srcPort =
@@ -554,11 +554,11 @@
 				pNew->info.IpParams.params.IpV4Params.reserved;
 		} else if (6 == pNew->info.IpParams.version) {
 			pOld->tclasParams.ipv6.version = 6;
-			cdf_mem_copy((uint8_t *) pOld->tclasParams.ipv6.
+			qdf_mem_copy((uint8_t *) pOld->tclasParams.ipv6.
 				     srcIpAddr,
 				     (uint8_t *) pNew->info.IpParams.params.
 				     IpV6Params.source, 16);
-			cdf_mem_copy((uint8_t *) pOld->tclasParams.ipv6.
+			qdf_mem_copy((uint8_t *) pOld->tclasParams.ipv6.
 				     dstIpAddr,
 				     (uint8_t *) pNew->info.IpParams.params.
 				     IpV6Params.dest, 16);
@@ -566,7 +566,7 @@
 				pNew->info.IpParams.params.IpV6Params.src_port;
 			pOld->tclasParams.ipv6.dstPort =
 				pNew->info.IpParams.params.IpV6Params.dest_port;
-			cdf_mem_copy((uint8_t *) pOld->tclasParams.ipv6.
+			qdf_mem_copy((uint8_t *) pOld->tclasParams.ipv6.
 				     flowLabel,
 				     (uint8_t *) pNew->info.IpParams.params.
 				     IpV6Params.flow_label, 3);
@@ -624,8 +624,9 @@
 }
 
 /**
-    @brief   :    This functions converts the given buffer till given size to Big endian format assuming the
-                     bus is 32 bit. The size should be four byte aligned.
+    @brief   :    This functions converts the given buffer till given size to
+    Big endian format assuming the bus is 32 bit. The size should
+    be four byte aligned.
     @param :    ptr to be converted, size
     @return  :    void
  */
@@ -670,11 +671,11 @@
 	macMgmtHdr->seqControl.fragNum = 0;
 	macMgmtHdr->seqControl.seqNumLo = 0;
 	macMgmtHdr->seqControl.seqNumHi = 2;
-	cdf_mem_copy((void *)&macMgmtHdr->da,
+	qdf_mem_copy((void *)&macMgmtHdr->da,
 		     (void *)bssid, sizeof(tSirMacAddr));
-	cdf_mem_copy((void *)&macMgmtHdr->sa,
+	qdf_mem_copy((void *)&macMgmtHdr->sa,
 		     (void *)selfMacAddr, sizeof(tSirMacAddr));
-	cdf_mem_copy((void *)&macMgmtHdr->bssId,
+	qdf_mem_copy((void *)&macMgmtHdr->bssId,
 		     (void *)bssid, sizeof(tSirMacAddr));
 
 	return;
@@ -697,7 +698,7 @@
 		(uint8_t) (SIR_MAC_MAX_DURATION_MICRO_SECONDS & 0xff);
 	macMgmtHdr->durationHi =
 		(uint8_t) ((SIR_MAC_MAX_DURATION_MICRO_SECONDS & 0xff00) >> 8);
-	cdf_mem_copy((void *)macMgmtHdr->da, (void *)selfMac,
+	qdf_mem_copy((void *)macMgmtHdr->da, (void *)selfMac,
 		     sizeof(tSirMacAddr));
 
 	return;
@@ -754,9 +755,9 @@
 		macMgmtHdr->seqControl.fragNum = 0;
 		macMgmtHdr->seqControl.seqNumLo = 0;
 		macMgmtHdr->seqControl.seqNumHi = 2;
-		cdf_mem_copy((void *)&macMgmtHdr->da, (void *)pSta[0].bssId, 6);
-		cdf_mem_copy(&macMgmtHdr->sa, pSta[0].staAddr, 6);
-		cdf_mem_copy((void *)&macMgmtHdr->bssId, (void *)pSta[0].bssId,
+		qdf_mem_copy((void *)&macMgmtHdr->da, (void *)pSta[0].bssId, 6);
+		qdf_mem_copy(&macMgmtHdr->sa, pSta[0].staAddr, 6);
+		qdf_mem_copy((void *)&macMgmtHdr->bssId, (void *)pSta[0].bssId,
 			     6);
 	} else if (role == eSYSTEM_AP_ROLE || role == eSYSTEM_STA_IN_IBSS_ROLE) {
 		macMgmtHdr->fc.type = SIR_MAC_CTRL_FRAME;
@@ -774,7 +775,7 @@
 		macMgmtHdr->durationHi =
 			(uint8_t) ((SIR_MAC_MAX_DURATION_MICRO_SECONDS & 0xff00) >>
 				   8);
-		cdf_mem_copy((void *)macMgmtHdr->da, (void *)pSta[0].staAddr,
+		qdf_mem_copy((void *)macMgmtHdr->da, (void *)pSta[0].staAddr,
 			     6);
 	}
 	return;
@@ -813,9 +814,9 @@
 		macMgmtHdr->seqControl.fragNum = 0;
 		macMgmtHdr->seqControl.seqNumLo = 0;
 		macMgmtHdr->seqControl.seqNumHi = 2;
-		cdf_mem_copy((void *)macMgmtHdr->da, (void *)pSta[0].bssId, 6);
-		cdf_mem_copy(macMgmtHdr->sa, pSta[0].staAddr, 6);
-		cdf_mem_copy((void *)macMgmtHdr->bssId, (void *)pSta[0].bssId,
+		qdf_mem_copy((void *)macMgmtHdr->da, (void *)pSta[0].bssId, 6);
+		qdf_mem_copy(macMgmtHdr->sa, pSta[0].staAddr, 6);
+		qdf_mem_copy((void *)macMgmtHdr->bssId, (void *)pSta[0].bssId,
 			     6);
 
 	}
diff --git a/core/sap/dfs/inc/ath_dfs_structs.h b/core/sap/dfs/inc/ath_dfs_structs.h
index 8a3e8f8..83c0655 100644
--- a/core/sap/dfs/inc/ath_dfs_structs.h
+++ b/core/sap/dfs/inc/ath_dfs_structs.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011-2014 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2016 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -53,7 +53,7 @@
 
 #ifndef _DFS__STRUCTS_H_
 #define _DFS__STRUCTS_H_
-#include <cdf_memory.h>
+#include <qdf_mem.h>
 
 #ifdef ANDROID
 #include <linux/string.h>
@@ -228,7 +228,7 @@
 static inline void ath_dfs_phyerr_param_copy(struct ath_dfs_phyerr_param *dst,
 					     struct ath_dfs_phyerr_param *src)
 {
-	cdf_mem_copy(dst, src, sizeof(*dst));
+	qdf_mem_copy(dst, src, sizeof(*dst));
 }
 
 static inline void ath_dfs_phyerr_init_noval(struct ath_dfs_phyerr_param *pe)
diff --git a/core/sap/dfs/inc/dfs.h b/core/sap/dfs/inc/dfs.h
index a9acc64..a2f9ae2 100644
--- a/core/sap/dfs/inc/dfs.h
+++ b/core/sap/dfs/inc/dfs.h
@@ -55,7 +55,7 @@
 #include <cds_queue.h>          /* TAILQ */
 #include <qdf_time.h>
 #include <qdf_timer.h>
-#include <cdf_memory.h>
+#include <qdf_mem.h>
 #include <osdep.h>
 /*DFS Utility Include END*/
 
diff --git a/core/sap/src/sap_api_link_cntl.c b/core/sap/src/sap_api_link_cntl.c
index 086864b..55f754f 100644
--- a/core/sap/src/sap_api_link_cntl.c
+++ b/core/sap/src/sap_api_link_cntl.c
@@ -194,7 +194,7 @@
 	if (sap_ctx->channelList != NULL) {
 		/* Always free up the memory for channel selection whatever
 		 * the result */
-		cdf_mem_free(sap_ctx->channelList);
+		qdf_mem_free(sap_ctx->channelList);
 		sap_ctx->channelList = NULL;
 	}
 #endif
@@ -394,7 +394,7 @@
 		* channel selection whatever
 		* the result
 		*/
-		cdf_mem_free(sap_ctx->channelList);
+		qdf_mem_free(sap_ctx->channelList);
 		sap_ctx->channelList = NULL;
 	}
 #endif
@@ -745,17 +745,17 @@
 		  roam_result);
 	sap_ctx->nStaWPARSnReqIeLength = csr_roam_info->rsnIELen;
 	if (sap_ctx->nStaWPARSnReqIeLength)
-		cdf_mem_copy(sap_ctx->pStaWpaRsnReqIE, csr_roam_info->prsnIE,
+		qdf_mem_copy(sap_ctx->pStaWpaRsnReqIE, csr_roam_info->prsnIE,
 			     sap_ctx->nStaWPARSnReqIeLength);
 #ifdef FEATURE_WLAN_WAPI
 	sap_ctx->nStaWAPIReqIeLength = csr_roam_info->wapiIELen;
 	if (sap_ctx->nStaWAPIReqIeLength)
-		cdf_mem_copy(sap_ctx->pStaWapiReqIE, csr_roam_info->pwapiIE,
+		qdf_mem_copy(sap_ctx->pStaWapiReqIE, csr_roam_info->pwapiIE,
 			     sap_ctx->nStaWAPIReqIeLength);
 #endif
 	sap_ctx->nStaAddIeLength = csr_roam_info->addIELen;
 	if (sap_ctx->nStaAddIeLength)
-		cdf_mem_copy(sap_ctx->pStaAddIE, csr_roam_info->paddIE,
+		qdf_mem_copy(sap_ctx->pStaAddIE, csr_roam_info->paddIE,
 			     sap_ctx->nStaAddIeLength);
 	sap_ctx->SapQosCfg.WmmIsEnabled = csr_roam_info->wmmEnabledSta;
 	/* MAC filtering */
@@ -995,13 +995,13 @@
 			  roam_result);
 		sap_ctx->nStaWPARSnReqIeLength = csr_roam_info->rsnIELen;
 		if (sap_ctx->nStaWPARSnReqIeLength)
-			cdf_mem_copy(sap_ctx->pStaWpaRsnReqIE,
+			qdf_mem_copy(sap_ctx->pStaWpaRsnReqIE,
 				     csr_roam_info->prsnIE,
 				     sap_ctx->nStaWPARSnReqIeLength);
 
 		sap_ctx->nStaAddIeLength = csr_roam_info->addIELen;
 		if (sap_ctx->nStaAddIeLength)
-			cdf_mem_copy(sap_ctx->pStaAddIE,
+			qdf_mem_copy(sap_ctx->pStaAddIE,
 				     csr_roam_info->paddIE,
 				     sap_ctx->nStaAddIeLength);
 
diff --git a/core/sap/src/sap_ch_select.c b/core/sap/src/sap_ch_select.c
index 41f4c63..c06f974 100644
--- a/core/sap/src/sap_ch_select.c
+++ b/core/sap/src/sap_ch_select.c
@@ -508,13 +508,13 @@
 
 	pSapCtx->SapChnlList.numChannel = 0;
 	if (pSapCtx->SapChnlList.channelList) {
-		cdf_mem_free(pSapCtx->SapChnlList.channelList);
+		qdf_mem_free(pSapCtx->SapChnlList.channelList);
 		pSapCtx->SapChnlList.channelList = NULL;
 	}
 
 	pSapCtx->SapAllChnlList.numChannel = 0;
 	if (pSapCtx->SapAllChnlList.channelList) {
-		cdf_mem_free(pSapCtx->SapAllChnlList.channelList);
+		qdf_mem_free(pSapCtx->SapAllChnlList.channelList);
 		pSapCtx->SapAllChnlList.channelList = NULL;
 	}
 }
@@ -607,7 +607,7 @@
 
 	/* Allocate memory for weight computation of 2.4GHz */
 	pSpectCh =
-		(tSapSpectChInfo *) cdf_mem_malloc((pSpectInfoParams->numSpectChans)
+		(tSapSpectChInfo *) qdf_mem_malloc((pSpectInfoParams->numSpectChans)
 						   * sizeof(*pSpectCh));
 
 	if (pSpectCh == NULL) {
@@ -616,7 +616,7 @@
 		return eSAP_FALSE;
 	}
 
-	cdf_mem_zero(pSpectCh,
+	qdf_mem_zero(pSpectCh,
 		     (pSpectInfoParams->numSpectChans) * sizeof(*pSpectCh));
 
 	/* Initialize the pointers in the DfsParams to the allocated memory */
@@ -1168,7 +1168,7 @@
 	tSirProbeRespBeacon *pBeaconStruct;
 	tpAniSirGlobal pMac = (tpAniSirGlobal) halHandle;
 
-	pBeaconStruct = cdf_mem_malloc(sizeof(tSirProbeRespBeacon));
+	pBeaconStruct = qdf_mem_malloc(sizeof(tSirProbeRespBeacon));
 	if (NULL == pBeaconStruct) {
 		QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
 			  "Unable to allocate memory in sap_compute_spect_weight\n");
@@ -1197,7 +1197,7 @@
 				(pScanResult->BssDescriptor.length +
 				 sizeof(uint16_t) + sizeof(uint32_t) -
 				 sizeof(tSirBssDescription));
-			cdf_mem_set((uint8_t *) pBeaconStruct,
+			qdf_mem_set((uint8_t *) pBeaconStruct,
 				    sizeof(tSirProbeRespBeacon), 0);
 
 			if ((sir_parse_beacon_ie
@@ -1315,7 +1315,7 @@
 		/* ------ Debug Info ------ */
 		pSpectCh++;
 	}
-	cdf_mem_free(pBeaconStruct);
+	qdf_mem_free(pBeaconStruct);
 }
 
 /*==========================================================================
@@ -1341,7 +1341,7 @@
 void sap_chan_sel_exit(tSapChSelSpectInfo *pSpectInfoParams)
 {
 	/* Free all the allocated memory */
-	cdf_mem_free(pSpectInfoParams->pSpectCh);
+	qdf_mem_free(pSpectInfoParams->pSpectCh);
 }
 
 /*==========================================================================
@@ -1380,11 +1380,11 @@
 			}
 		}
 		if (minWeightIndex != i) {
-			cdf_mem_copy(&temp, &pSpectCh[minWeightIndex],
+			qdf_mem_copy(&temp, &pSpectCh[minWeightIndex],
 				     sizeof(*pSpectCh));
-			cdf_mem_copy(&pSpectCh[minWeightIndex], &pSpectCh[i],
+			qdf_mem_copy(&pSpectCh[minWeightIndex], &pSpectCh[i],
 				     sizeof(*pSpectCh));
-			cdf_mem_copy(&pSpectCh[i], &temp, sizeof(*pSpectCh));
+			qdf_mem_copy(&pSpectCh[i], &temp, sizeof(*pSpectCh));
 		}
 	}
 }
@@ -1875,11 +1875,11 @@
 			}
 		}
 		if (minWeightIndex != i) {
-			cdf_mem_copy(&temp, &pSpectCh[minWeightIndex],
+			qdf_mem_copy(&temp, &pSpectCh[minWeightIndex],
 				     sizeof(*pSpectCh));
-			cdf_mem_copy(&pSpectCh[minWeightIndex], &pSpectCh[i],
+			qdf_mem_copy(&pSpectCh[minWeightIndex], &pSpectCh[i],
 				     sizeof(*pSpectCh));
-			cdf_mem_copy(&pSpectCh[i], &temp, sizeof(*pSpectCh));
+			qdf_mem_copy(&pSpectCh[i], &temp, sizeof(*pSpectCh));
 		}
 	}
 #endif
diff --git a/core/sap/src/sap_fsm.c b/core/sap/src/sap_fsm.c
index f2ce213..e7bcc38 100644
--- a/core/sap/src/sap_fsm.c
+++ b/core/sap/src/sap_fsm.c
@@ -1406,7 +1406,7 @@
 	} /* end of check for NOL or ACS channels */
 
 	/* valid_chnl_count now have number of valid channels */
-	tmp_ch_lst = cdf_mem_malloc(valid_chnl_count);
+	tmp_ch_lst = qdf_mem_malloc(valid_chnl_count);
 	if (tmp_ch_lst == NULL) {
 		QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
 				  FL("sapdfs: memory alloc failed"));
@@ -1445,12 +1445,12 @@
 							   nol,
 							   valid_chnl_count,
 							   tmp_ch_lst)) {
-			cdf_mem_free(tmp_ch_lst);
+			qdf_mem_free(tmp_ch_lst);
 			return target_channel;
 		}
 #endif
-		cdf_mem_zero(availableChannels, sizeof(availableChannels));
-		cdf_mem_zero(&channelBitmap, sizeof(channelBitmap));
+		qdf_mem_zero(availableChannels, sizeof(availableChannels));
+		qdf_mem_zero(&channelBitmap, sizeof(channelBitmap));
 		channelBitmap.chanBondingSet[0].startChannel = 36;
 		channelBitmap.chanBondingSet[1].startChannel = 52;
 		channelBitmap.chanBondingSet[2].startChannel = 100;
@@ -1591,7 +1591,7 @@
 		break;
 	/* this loop will iterate at max 3 times */
 	} while (1);
-	cdf_mem_free(tmp_ch_lst);
+	qdf_mem_free(tmp_ch_lst);
 	return target_channel;
 }
 
@@ -2049,7 +2049,7 @@
 		if (sap_context->acs_cfg->skip_scan_status !=
 						eSAP_SKIP_ACS_SCAN) {
 #endif
-		cdf_mem_zero(&scan_request, sizeof(scan_request));
+		qdf_mem_zero(&scan_request, sizeof(scan_request));
 
 		/*
 		 * Set scanType to Active scan. FW takes care of using passive
@@ -2141,7 +2141,7 @@
 			if (sap_context->channelList != NULL) {
 				sap_context->channel =
 					sap_context->channelList[0];
-				cdf_mem_free(sap_context->
+				qdf_mem_free(sap_context->
 					channelList);
 				sap_context->channelList = NULL;
 			}
@@ -2315,7 +2315,7 @@
 		4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, };
 	sapContext->key_type = 0x05;
 	sapContext->key_length = 32;
-	cdf_mem_copy(sapContext->key_material, key_material, sizeof(key_material));     /* Need a key size define */
+	qdf_mem_copy(sapContext->key_material, key_material, sizeof(key_material));     /* Need a key size define */
 
 	QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH, "In %s",
 		  __func__);
@@ -2574,14 +2574,14 @@
 		reassoc_complete->staId = csr_roaminfo->staId;
 		reassoc_complete->statusCode = csr_roaminfo->statusCode;
 		reassoc_complete->iesLen = csr_roaminfo->rsnIELen;
-		cdf_mem_copy(reassoc_complete->ies, csr_roaminfo->prsnIE,
+		qdf_mem_copy(reassoc_complete->ies, csr_roaminfo->prsnIE,
 			     csr_roaminfo->rsnIELen);
 
 #ifdef FEATURE_WLAN_WAPI
 		if (csr_roaminfo->wapiIELen) {
 			uint8_t len = reassoc_complete->iesLen;
 			reassoc_complete->iesLen += csr_roaminfo->wapiIELen;
-			cdf_mem_copy(&reassoc_complete->ies[len],
+			qdf_mem_copy(&reassoc_complete->ies[len],
 				     csr_roaminfo->pwapiIE,
 				     csr_roaminfo->wapiIELen);
 		}
@@ -2589,7 +2589,7 @@
 		if (csr_roaminfo->addIELen) {
 			uint8_t len = reassoc_complete->iesLen;
 			reassoc_complete->iesLen += csr_roaminfo->addIELen;
-			cdf_mem_copy(&reassoc_complete->ies[len],
+			qdf_mem_copy(&reassoc_complete->ies[len],
 				     csr_roaminfo->paddIE,
 				     csr_roaminfo->addIELen);
 		}
@@ -2646,20 +2646,20 @@
 		sap_ap_event.sapHddEventCode = eSAP_STA_MIC_FAILURE_EVENT;
 		mic_failure = &sap_ap_event.sapevt.sapStationMICFailureEvent;
 
-		cdf_mem_copy(&mic_failure->srcMacAddr,
+		qdf_mem_copy(&mic_failure->srcMacAddr,
 			     csr_roaminfo->u.pMICFailureInfo->srcMacAddr,
 			     sizeof(tSirMacAddr));
-		cdf_mem_copy(&mic_failure->staMac.bytes,
+		qdf_mem_copy(&mic_failure->staMac.bytes,
 			     csr_roaminfo->u.pMICFailureInfo->taMacAddr,
 			     sizeof(tSirMacAddr));
-		cdf_mem_copy(&mic_failure->dstMacAddr.bytes,
+		qdf_mem_copy(&mic_failure->dstMacAddr.bytes,
 			     csr_roaminfo->u.pMICFailureInfo->dstMacAddr,
 			     sizeof(tSirMacAddr));
 		mic_failure->multicast =
 			csr_roaminfo->u.pMICFailureInfo->multicast;
 		mic_failure->IV1 = csr_roaminfo->u.pMICFailureInfo->IV1;
 		mic_failure->keyId = csr_roaminfo->u.pMICFailureInfo->keyId;
-		cdf_mem_copy(mic_failure->TSC,
+		qdf_mem_copy(mic_failure->TSC,
 			     csr_roaminfo->u.pMICFailureInfo->TSC,
 			     SIR_CIPHER_SEQ_CTR_SIZE);
 		break;
@@ -2670,7 +2670,7 @@
 	case eSAP_WPS_PBC_PROBE_REQ_EVENT:
 		sap_ap_event.sapHddEventCode = eSAP_WPS_PBC_PROBE_REQ_EVENT;
 
-		cdf_mem_copy(&sap_ap_event.sapevt.sapPBCProbeReqEvent.
+		qdf_mem_copy(&sap_ap_event.sapevt.sapPBCProbeReqEvent.
 			     WPSPBCProbeReq, csr_roaminfo->u.pWPSPBCProbeReq,
 			     sizeof(tSirWPSPBCProbeReq));
 		break;
@@ -2700,7 +2700,7 @@
 
 	case eSAP_UNKNOWN_STA_JOIN:
 		sap_ap_event.sapHddEventCode = eSAP_UNKNOWN_STA_JOIN;
-		cdf_mem_copy((void *) sap_ap_event.sapevt.sapUnknownSTAJoin.
+		qdf_mem_copy((void *) sap_ap_event.sapevt.sapUnknownSTAJoin.
 			     macaddr.bytes, (void *) context,
 			     QDF_MAC_ADDR_SIZE);
 		break;
@@ -2866,7 +2866,7 @@
 		}
 		pMac->sap.SapDfsInfo.cac_state = eSAP_DFS_DO_NOT_SKIP_CAC;
 		sap_cac_reset_notify(hHal);
-		cdf_mem_zero(&pMac->sap, sizeof(pMac->sap));
+		qdf_mem_zero(&pMac->sap, sizeof(pMac->sap));
 	}
 
 	return qdf_status;
@@ -3746,7 +3746,7 @@
 	profile->csrPersona = pconfig_params->persona;
 	profile->disableDFSChSwitch = pconfig_params->disableDFSChSwitch;
 
-	cdf_mem_zero(profile->SSIDs.SSIDList[0].SSID.ssId,
+	qdf_mem_zero(profile->SSIDs.SSIDList[0].SSID.ssId,
 		     sizeof(profile->SSIDs.SSIDList[0].SSID.ssId));
 
 	/* Flag to not broadcast the SSID information */
@@ -3755,7 +3755,7 @@
 
 	profile->SSIDs.SSIDList[0].SSID.length =
 		pconfig_params->SSIDinfo.ssid.length;
-	cdf_mem_copy(&profile->SSIDs.SSIDList[0].SSID.ssId,
+	qdf_mem_copy(&profile->SSIDs.SSIDList[0].SSID.ssId,
 		     pconfig_params->SSIDinfo.ssid.ssId,
 		     sizeof(pconfig_params->SSIDinfo.ssid.ssId));
 
@@ -3805,13 +3805,13 @@
 	profile->nRSNReqIELength = pconfig_params->RSNWPAReqIELength;
 	if (pconfig_params->RSNWPAReqIELength) {
 		profile->pRSNReqIE =
-			cdf_mem_malloc(pconfig_params->RSNWPAReqIELength);
+			qdf_mem_malloc(pconfig_params->RSNWPAReqIELength);
 		if (NULL == profile->pRSNReqIE) {
 			QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
 				  " %s Fail to alloc memory", __func__);
 			return eSAP_STATUS_FAILURE;
 		}
-		cdf_mem_copy(profile->pRSNReqIE, pconfig_params->RSNWPAReqIE,
+		qdf_mem_copy(profile->pRSNReqIE, pconfig_params->RSNWPAReqIE,
 			     pconfig_params->RSNWPAReqIELength);
 		profile->nRSNReqIELength = pconfig_params->RSNWPAReqIELength;
 	}
@@ -3839,7 +3839,7 @@
 
 	/* country code */
 	if (pconfig_params->countryCode[0])
-		cdf_mem_copy(profile->countryCode, pconfig_params->countryCode,
+		qdf_mem_copy(profile->countryCode, pconfig_params->countryCode,
 			     WNI_CFG_COUNTRY_CODE_LEN);
 	profile->ieee80211d = pconfig_params->ieee80211d;
 	/* wps config info */
@@ -3891,7 +3891,7 @@
 void sap_free_roam_profile(tCsrRoamProfile *profile)
 {
 	if (profile->pRSNReqIE) {
-		cdf_mem_free(profile->pRSNReqIE);
+		qdf_mem_free(profile->pRSNReqIE);
 		profile->pRSNReqIE = NULL;
 	}
 }
@@ -3911,17 +3911,17 @@
 	for (outer = 0; outer < size; outer++) {
 		for (inner = 0; inner < size - 1; inner++) {
 			nRes =
-				cdf_mem_compare2((macList + inner)->bytes,
+				qdf_mem_cmp((macList + inner)->bytes,
 						 (macList + inner + 1)->bytes,
 						 QDF_MAC_ADDR_SIZE);
 			if (nRes > 0) {
-				cdf_mem_copy(temp.bytes,
+				qdf_mem_copy(temp.bytes,
 					     (macList + inner + 1)->bytes,
 					     QDF_MAC_ADDR_SIZE);
-				cdf_mem_copy((macList + inner + 1)->bytes,
+				qdf_mem_copy((macList + inner + 1)->bytes,
 					     (macList + inner)->bytes,
 					     QDF_MAC_ADDR_SIZE);
-				cdf_mem_copy((macList + inner)->bytes,
+				qdf_mem_copy((macList + inner)->bytes,
 					     temp.bytes, QDF_MAC_ADDR_SIZE);
 			}
 		}
@@ -3946,7 +3946,7 @@
 	while (nStart <= nEnd) {
 		nMiddle = (nStart + nEnd) / 2;
 		nRes =
-			cdf_mem_compare2(&macList[nMiddle], peerMac,
+			qdf_mem_cmp(&macList[nMiddle], peerMac,
 					 QDF_MAC_ADDR_SIZE);
 
 		if (0 == nRes) {
@@ -3991,18 +3991,18 @@
 
 	for (i = ((*size) - 1); i >= 0; i--) {
 		nRes =
-			cdf_mem_compare2(&macList[i], peerMac, QDF_MAC_ADDR_SIZE);
+			qdf_mem_cmp(&macList[i], peerMac, QDF_MAC_ADDR_SIZE);
 		if (nRes > 0) {
 			/* Move alphabetically greater mac addresses one index down to allow for insertion
 			   of new mac in sorted order */
-			cdf_mem_copy((macList + i + 1)->bytes,
+			qdf_mem_copy((macList + i + 1)->bytes,
 				     (macList + i)->bytes, QDF_MAC_ADDR_SIZE);
 		} else {
 			break;
 		}
 	}
 	/* This should also take care of if the element is the first to be added in the list */
-	cdf_mem_copy((macList + i + 1)->bytes, peerMac, QDF_MAC_ADDR_SIZE);
+	qdf_mem_copy((macList + i + 1)->bytes, peerMac, QDF_MAC_ADDR_SIZE);
 	/* increment the list size */
 	(*size)++;
 }
@@ -4030,11 +4030,11 @@
 	for (i = index; i < ((*size) - 1); i++) {
 		/* Move mac addresses starting from "index" passed one index up to delete the void
 		   created by deletion of a mac address in ACL */
-		cdf_mem_copy((macList + i)->bytes, (macList + i + 1)->bytes,
+		qdf_mem_copy((macList + i)->bytes, (macList + i + 1)->bytes,
 			     QDF_MAC_ADDR_SIZE);
 	}
 	/* The last space should be made empty since all mac addesses moved one step up */
-	cdf_mem_zero((macList + (*size) - 1)->bytes, QDF_MAC_ADDR_SIZE);
+	qdf_mem_zero((macList + (*size) - 1)->bytes, QDF_MAC_ADDR_SIZE);
 	/* reduce the list size by 1 */
 	(*size)--;
 }
@@ -4169,7 +4169,7 @@
 	}
 
 	/* Allocate the max number of channel supported */
-	list = (uint8_t *) cdf_mem_malloc(NUM_5GHZ_CHANNELS +
+	list = (uint8_t *) qdf_mem_malloc(NUM_5GHZ_CHANNELS +
 						NUM_24GHZ_CHANNELS);
 	if (NULL == list) {
 		QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
@@ -4266,7 +4266,7 @@
 		*ch_list = list;
 	} else {
 		*ch_list = NULL;
-		cdf_mem_free(list);
+		qdf_mem_free(list);
 	}
 
 	for (loop_count = 0; loop_count < ch_count; loop_count++) {
@@ -4292,12 +4292,12 @@
 	}
 
 	if (sapContext->SapAllChnlList.channelList) {
-		cdf_mem_free(sapContext->SapAllChnlList.channelList);
+		qdf_mem_free(sapContext->SapAllChnlList.channelList);
 		sapContext->SapAllChnlList.channelList = NULL;
 	}
 
 	sapContext->SapAllChnlList.channelList =
-		(tChannelInfo *) cdf_mem_malloc(WNI_CFG_VALID_CHANNEL_LIST_LEN *
+		(tChannelInfo *) qdf_mem_malloc(WNI_CFG_VALID_CHANNEL_LIST_LEN *
 						sizeof(tChannelInfo));
 	if (NULL == sapContext->SapAllChnlList.channelList) {
 		QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
diff --git a/core/sap/src/sap_module.c b/core/sap/src/sap_module.c
index e14f19e..4cc8d44 100644
--- a/core/sap/src/sap_module.c
+++ b/core/sap/src/sap_module.c
@@ -106,7 +106,7 @@
 	ptSapContext pSapCtx = NULL;
 
 	/* dynamically allocate the sapContext */
-	pSapCtx = (ptSapContext) cdf_mem_malloc(sizeof(tSapContext));
+	pSapCtx = (ptSapContext) qdf_mem_malloc(sizeof(tSapContext));
 
 	if (NULL == pSapCtx) {
 		QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
@@ -271,7 +271,7 @@
 	/* empty queues/lists/pkts if any */
 	wlansap_clean_cb(pSapCtx, true);
 
-	cdf_mem_free(pSapCtx);
+	qdf_mem_free(pSapCtx);
 
 	return QDF_STATUS_SUCCESS;
 } /* wlansap_close */
@@ -311,7 +311,7 @@
 	QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
 		  "wlansap_clean_cb");
 
-	cdf_mem_zero(pSapCtx, sizeof(tSapContext));
+	qdf_mem_zero(pSapCtx, sizeof(tSapContext));
 
 	pSapCtx->p_cds_gctx = NULL;
 
@@ -468,9 +468,9 @@
 	psap_ctx->csr_roamProfile.BSSIDs.numOfBSSIDs = 1;
 
 	/* Save a copy to SAP context */
-	cdf_mem_copy(psap_ctx->csr_roamProfile.BSSIDs.bssid,
+	qdf_mem_copy(psap_ctx->csr_roamProfile.BSSIDs.bssid,
 		pconfig->self_macaddr.bytes, QDF_MAC_ADDR_SIZE);
-	cdf_mem_copy(psap_ctx->self_mac_addr,
+	qdf_mem_copy(psap_ctx->self_mac_addr,
 		pconfig->self_macaddr.bytes, QDF_MAC_ADDR_SIZE);
 
 	h_hal = (tHalHandle)CDS_GET_HAL_CB(psap_ctx->p_cds_gctx);
@@ -631,13 +631,13 @@
 	/* Set the BSSID to your "self MAC Addr" read the mac address
 		from Configuation ITEM received from HDD */
 	pSapCtx->csr_roamProfile.BSSIDs.numOfBSSIDs = 1;
-	cdf_mem_copy(pSapCtx->csr_roamProfile.BSSIDs.bssid,
+	qdf_mem_copy(pSapCtx->csr_roamProfile.BSSIDs.bssid,
 		     pSapCtx->self_mac_addr, sizeof(struct qdf_mac_addr));
 
 	/* Save a copy to SAP context */
-	cdf_mem_copy(pSapCtx->csr_roamProfile.BSSIDs.bssid,
+	qdf_mem_copy(pSapCtx->csr_roamProfile.BSSIDs.bssid,
 		     pConfig->self_macaddr.bytes, QDF_MAC_ADDR_SIZE);
-	cdf_mem_copy(pSapCtx->self_mac_addr,
+	qdf_mem_copy(pSapCtx->self_mac_addr,
 		     pConfig->self_macaddr.bytes, QDF_MAC_ADDR_SIZE);
 
 	/* copy the configuration items to csrProfile */
@@ -678,11 +678,11 @@
 
 	/* Copy MAC filtering settings to sap context */
 	pSapCtx->eSapMacAddrAclMode = pConfig->SapMacaddr_acl;
-	cdf_mem_copy(pSapCtx->acceptMacList, pConfig->accept_mac,
+	qdf_mem_copy(pSapCtx->acceptMacList, pConfig->accept_mac,
 		     sizeof(pConfig->accept_mac));
 	pSapCtx->nAcceptMac = pConfig->num_accept_mac;
 	sap_sort_mac_list(pSapCtx->acceptMacList, pSapCtx->nAcceptMac);
-	cdf_mem_copy(pSapCtx->denyMacList, pConfig->deny_mac,
+	qdf_mem_copy(pSapCtx->denyMacList, pConfig->deny_mac,
 		     sizeof(pConfig->deny_mac));
 	pSapCtx->nDenyMac = pConfig->num_deny_mac;
 	sap_sort_mac_list(pSapCtx->denyMacList, pSapCtx->nDenyMac);
@@ -733,7 +733,7 @@
 	pSapCtx->eSapMacAddrAclMode = pConfig->SapMacaddr_acl;
 
 	if (eSAP_DENY_UNLESS_ACCEPTED == pSapCtx->eSapMacAddrAclMode) {
-		cdf_mem_copy(pSapCtx->acceptMacList,
+		qdf_mem_copy(pSapCtx->acceptMacList,
 			     pConfig->accept_mac,
 			     sizeof(pConfig->accept_mac));
 		pSapCtx->nAcceptMac = pConfig->num_accept_mac;
@@ -741,7 +741,7 @@
 			       pSapCtx->nAcceptMac);
 	} else if (eSAP_ACCEPT_UNLESS_DENIED ==
 		   pSapCtx->eSapMacAddrAclMode) {
-		cdf_mem_copy(pSapCtx->denyMacList, pConfig->deny_mac,
+		qdf_mem_copy(pSapCtx->denyMacList, pConfig->deny_mac,
 			     sizeof(pConfig->deny_mac));
 		pSapCtx->nDenyMac = pConfig->num_deny_mac;
 		sap_sort_mac_list(pSapCtx->denyMacList, pSapCtx->nDenyMac);
@@ -994,7 +994,7 @@
 
 	if (pSapCtx->denyMacList != NULL) {
 		for (i = 0; i < (pSapCtx->nDenyMac - 1); i++) {
-			cdf_mem_zero((pSapCtx->denyMacList + i)->bytes,
+			qdf_mem_zero((pSapCtx->denyMacList + i)->bytes,
 				     QDF_MAC_ADDR_SIZE);
 
 		}
@@ -1004,7 +1004,7 @@
 
 	if (pSapCtx->acceptMacList != NULL) {
 		for (i = 0; i < (pSapCtx->nAcceptMac - 1); i++) {
-			cdf_mem_zero((pSapCtx->acceptMacList + i)->bytes,
+			qdf_mem_zero((pSapCtx->acceptMacList + i)->bytes,
 				     QDF_MAC_ADDR_SIZE);
 
 		}
@@ -1713,7 +1713,7 @@
 		QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO,
 			FL("WPAIE len : %x"), *len);
 		if ((buf) && (ie_len >= sap_ctx->nStaWPARSnReqIeLength)) {
-			cdf_mem_copy(buf,
+			qdf_mem_copy(buf,
 				sap_ctx->pStaWpaRsnReqIE,
 				sap_ctx->nStaWPARSnReqIeLength);
 			QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO,
@@ -1764,13 +1764,13 @@
 
 	if (sap_acquire_global_lock(pSapCtx) == QDF_STATUS_SUCCESS) {
 		if (pSap_WPSIe->sapWPSIECode == eSAP_WPS_BEACON_IE) {
-			cdf_mem_copy(&pSapCtx->APWPSIEs.SirWPSBeaconIE,
+			qdf_mem_copy(&pSapCtx->APWPSIEs.SirWPSBeaconIE,
 				     &pSap_WPSIe->sapwpsie.
 				     sapWPSBeaconIE,
 				     sizeof(tSap_WPSBeaconIE));
 		} else if (pSap_WPSIe->sapWPSIECode ==
 			   eSAP_WPS_PROBE_RSP_IE) {
-			cdf_mem_copy(&pSapCtx->APWPSIEs.
+			qdf_mem_copy(&pSapCtx->APWPSIEs.
 				     SirWPSProbeRspIE,
 				     &pSap_WPSIe->sapwpsie.
 				     sapWPSProbeRspIE,
@@ -1946,7 +1946,7 @@
 	}
 
 	pSapCtx->APWPARSNIEs.length = (uint16_t) WPARSNIEsLen;
-	cdf_mem_copy(pSapCtx->APWPARSNIEs.rsnIEdata, pWPARSNIEs,
+	qdf_mem_copy(pSapCtx->APWPARSNIEs.rsnIEdata, pWPARSNIEs,
 		     WPARSNIEsLen);
 
 	cdf_ret_status =
@@ -2686,14 +2686,14 @@
 		/* initialize the buffer pointer so that pe can copy */
 		if (additionIELength > 0) {
 			bufferLength = additionIELength;
-			pBuffer = cdf_mem_malloc(bufferLength);
+			pBuffer = qdf_mem_malloc(bufferLength);
 			if (NULL == pBuffer) {
 				QDF_TRACE(QDF_MODULE_ID_SME,
 					  QDF_TRACE_LEVEL_ERROR,
 					  FL("Could not allocate the buffer "));
 				return QDF_STATUS_E_NOMEM;
 			}
-			cdf_mem_copy(pBuffer, pAdditionIEBuffer, bufferLength);
+			qdf_mem_copy(pBuffer, pAdditionIEBuffer, bufferLength);
 			bufferValid = true;
 		}
 	}
@@ -2704,7 +2704,7 @@
 			pConfig->probeRespBcnIEsLen = bufferLength;
 			pConfig->pProbeRespBcnIEsBuffer = pBuffer;
 		} else {
-			cdf_mem_free(pConfig->pProbeRespBcnIEsBuffer);
+			qdf_mem_free(pConfig->pProbeRespBcnIEsBuffer);
 			pConfig->probeRespBcnIEsLen = 0;
 			pConfig->pProbeRespBcnIEsBuffer = NULL;
 			QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_INFO,
@@ -2717,7 +2717,7 @@
 			pConfig->probeRespIEsBufferLen = bufferLength;
 			pConfig->pProbeRespIEsBuffer = pBuffer;
 		} else {
-			cdf_mem_free(pConfig->pProbeRespIEsBuffer);
+			qdf_mem_free(pConfig->pProbeRespIEsBuffer);
 			pConfig->probeRespIEsBufferLen = 0;
 			pConfig->pProbeRespIEsBuffer = NULL;
 			QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_INFO,
@@ -2730,7 +2730,7 @@
 			pConfig->assocRespIEsLen = bufferLength;
 			pConfig->pAssocRespIEsBuffer = pBuffer;
 		} else {
-			cdf_mem_free(pConfig->pAssocRespIEsBuffer);
+			qdf_mem_free(pConfig->pAssocRespIEsBuffer);
 			pConfig->assocRespIEsLen = 0;
 			pConfig->pAssocRespIEsBuffer = NULL;
 			QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_INFO,
@@ -2742,7 +2742,7 @@
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_INFO,
 			  FL("No matching buffer type %d"), updateType);
 		if (pBuffer != NULL)
-			cdf_mem_free(pBuffer);
+			qdf_mem_free(pBuffer);
 		break;
 	}
 
@@ -2761,21 +2761,21 @@
 	switch (updateType) {
 	case eUPDATE_IE_ALL:    /*only used to reset */
 	case eUPDATE_IE_PROBE_RESP:
-		cdf_mem_free(pConfig->pProbeRespIEsBuffer);
+		qdf_mem_free(pConfig->pProbeRespIEsBuffer);
 		pConfig->probeRespIEsBufferLen = 0;
 		pConfig->pProbeRespIEsBuffer = NULL;
 		if (eUPDATE_IE_ALL != updateType)
 			break;
 
 	case eUPDATE_IE_ASSOC_RESP:
-		cdf_mem_free(pConfig->pAssocRespIEsBuffer);
+		qdf_mem_free(pConfig->pAssocRespIEsBuffer);
 		pConfig->assocRespIEsLen = 0;
 		pConfig->pAssocRespIEsBuffer = NULL;
 		if (eUPDATE_IE_ALL != updateType)
 			break;
 
 	case eUPDATE_IE_PROBE_BCN:
-		cdf_mem_free(pConfig->pProbeRespBcnIEsBuffer);
+		qdf_mem_free(pConfig->pProbeRespBcnIEsBuffer);
 		pConfig->probeRespBcnIEsLen = 0;
 		pConfig->pProbeRespBcnIEsBuffer = NULL;
 		if (eUPDATE_IE_ALL != updateType)
@@ -3105,7 +3105,7 @@
 	if (NULL == mac)
 		qdf_set_macaddr_broadcast(&pDelStaParams->peerMacAddr);
 	else
-		cdf_mem_copy(pDelStaParams->peerMacAddr.bytes, mac,
+		qdf_mem_copy(pDelStaParams->peerMacAddr.bytes, mac,
 			     QDF_MAC_ADDR_SIZE);
 
 	if (reason_code == 0)
diff --git a/core/sme/inc/sme_inside.h b/core/sme/inc/sme_inside.h
index 04b9be3..0f75c43 100644
--- a/core/sme/inc/sme_inside.h
+++ b/core/sme/inc/sme_inside.h
@@ -40,7 +40,7 @@
 #include "qdf_status.h"
 #include "qdf_lock.h"
 #include "qdf_trace.h"
-#include "cdf_memory.h"
+#include "qdf_mem.h"
 #include "qdf_types.h"
 #include "sir_api.h"
 #include "csr_internal.h"
diff --git a/core/sme/inc/sme_internal.h b/core/sme/inc/sme_internal.h
index 61f7d82..21a7b78 100644
--- a/core/sme/inc/sme_internal.h
+++ b/core/sme/inc/sme_internal.h
@@ -40,7 +40,7 @@
 #include "qdf_status.h"
 #include "qdf_lock.h"
 #include "qdf_trace.h"
-#include "cdf_memory.h"
+#include "qdf_mem.h"
 #include "qdf_types.h"
 #include "host_diag_core_event.h"
 #include "csr_link_list.h"
diff --git a/core/sme/inc/sme_power_save.h b/core/sme/inc/sme_power_save.h
index 6c3c145..d0649a2 100644
--- a/core/sme/inc/sme_power_save.h
+++ b/core/sme/inc/sme_power_save.h
@@ -29,7 +29,7 @@
 #define __SME_POWER_SAVE_H
 #include "qdf_lock.h"
 #include "qdf_trace.h"
-#include "cdf_memory.h"
+#include "qdf_mem.h"
 #include "qdf_types.h"
 #include "ani_system_defs.h"
 #include "sir_api.h"
diff --git a/core/sme/inc/sme_qos_api.h b/core/sme/inc/sme_qos_api.h
index 5951508..7b98504 100644
--- a/core/sme/inc/sme_qos_api.h
+++ b/core/sme/inc/sme_qos_api.h
@@ -39,7 +39,7 @@
   ------------------------------------------------------------------------*/
 #include "qdf_lock.h"
 #include "qdf_trace.h"
-#include "cdf_memory.h"
+#include "qdf_mem.h"
 #include "qdf_types.h"
 #include "ani_global.h"
 #include "sir_api.h"
diff --git a/core/sme/inc/sme_qos_internal.h b/core/sme/inc/sme_qos_internal.h
index 61570d4..8682eaa 100644
--- a/core/sme/inc/sme_qos_internal.h
+++ b/core/sme/inc/sme_qos_internal.h
@@ -39,7 +39,7 @@
   ------------------------------------------------------------------------*/
 #include "qdf_lock.h"
 #include "qdf_trace.h"
-#include "cdf_memory.h"
+#include "qdf_mem.h"
 #include "qdf_types.h"
 #include "ani_global.h"
 #include "sir_api.h"
diff --git a/core/sme/inc/sme_rrm_api.h b/core/sme/inc/sme_rrm_api.h
index 9e8d56f..c65fb08 100644
--- a/core/sme/inc/sme_rrm_api.h
+++ b/core/sme/inc/sme_rrm_api.h
@@ -39,7 +39,7 @@
   ------------------------------------------------------------------------*/
 #include "qdf_lock.h"
 #include "qdf_trace.h"
-#include "cdf_memory.h"
+#include "qdf_mem.h"
 #include "qdf_types.h"
 #include "ani_global.h"
 #include "sir_api.h"
diff --git a/core/sme/inc/sme_rrm_internal.h b/core/sme/inc/sme_rrm_internal.h
index 9814e48..a4eb3b5 100644
--- a/core/sme/inc/sme_rrm_internal.h
+++ b/core/sme/inc/sme_rrm_internal.h
@@ -39,7 +39,7 @@
   ------------------------------------------------------------------------*/
 #include "qdf_lock.h"
 #include "qdf_trace.h"
-#include "cdf_memory.h"
+#include "qdf_mem.h"
 #include "qdf_types.h"
 #include "rrm_global.h"
 
diff --git a/core/sme/src/common/sme_api.c b/core/sme/src/common/sme_api.c
index 6b35228..fe3bef0 100644
--- a/core/sme/src/common/sme_api.c
+++ b/core/sme/src/common/sme_api.c
@@ -214,16 +214,16 @@
 					saved_cmd);
 			}
 			if (saved_cmd->u.roamCmd.pRoamBssEntry)
-				cdf_mem_free(
+				qdf_mem_free(
 					saved_cmd->u.roamCmd.pRoamBssEntry);
 			if (saved_cmd->u.scanCmd.u.scanRequest.SSIDs.SSIDList)
-				cdf_mem_free(saved_cmd->u.scanCmd.u.
+				qdf_mem_free(saved_cmd->u.scanCmd.u.
 						scanRequest.SSIDs.SSIDList);
 			if (saved_cmd->u.scanCmd.pToRoamProfile)
-				cdf_mem_free(saved_cmd->u.scanCmd.
+				qdf_mem_free(saved_cmd->u.scanCmd.
 						pToRoamProfile);
 			if (saved_cmd) {
-				cdf_mem_free(saved_cmd);
+				qdf_mem_free(saved_cmd);
 				saved_cmd = NULL;
 				mac->sme.saved_scan_cmd = NULL;
 			}
@@ -297,9 +297,9 @@
 		return;
 
 	for (idx = 0; idx < mac_ctx->sme.totalSmeCmd; idx++)
-		cdf_mem_free(mac_ctx->sme.pSmeCmdBufAddr[idx]);
+		qdf_mem_free(mac_ctx->sme.pSmeCmdBufAddr[idx]);
 
-	cdf_mem_free(mac_ctx->sme.pSmeCmdBufAddr);
+	qdf_mem_free(mac_ctx->sme.pSmeCmdBufAddr);
 	mac_ctx->sme.pSmeCmdBufAddr = NULL;
 }
 
@@ -336,14 +336,14 @@
 
 	/* following pointer contains array of pointers for tSmeCmd* */
 	sme_cmd_ptr_ary_sz = sizeof(void *) * pMac->sme.totalSmeCmd;
-	pMac->sme.pSmeCmdBufAddr = cdf_mem_malloc(sme_cmd_ptr_ary_sz);
+	pMac->sme.pSmeCmdBufAddr = qdf_mem_malloc(sme_cmd_ptr_ary_sz);
 	if (NULL == pMac->sme.pSmeCmdBufAddr) {
 		status = QDF_STATUS_E_NOMEM;
 		goto end;
 	}
 
 	status = QDF_STATUS_SUCCESS;
-	cdf_mem_set(pMac->sme.pSmeCmdBufAddr, sme_cmd_ptr_ary_sz, 0);
+	qdf_mem_set(pMac->sme.pSmeCmdBufAddr, sme_cmd_ptr_ary_sz, 0);
 	for (cmd_idx = 0; cmd_idx < pMac->sme.totalSmeCmd; cmd_idx++) {
 		/*
 		 * Since total size of all commands together can be huge chunk
@@ -355,7 +355,7 @@
 		 * freeing up of all SME CMDs with just a for loop.
 		 */
 		pMac->sme.pSmeCmdBufAddr[cmd_idx] =
-						cdf_mem_malloc(sizeof(tSmeCmd));
+						qdf_mem_malloc(sizeof(tSmeCmd));
 		if (NULL == pMac->sme.pSmeCmdBufAddr[cmd_idx]) {
 			status = QDF_STATUS_E_NOMEM;
 			free_sme_cmds(pMac);
@@ -369,7 +369,7 @@
 	/* This timer is only to debug the active list command timeout */
 
 	cmdTimeoutTimer =
-		(qdf_mc_timer_t *) cdf_mem_malloc(sizeof(qdf_mc_timer_t));
+		(qdf_mc_timer_t *) qdf_mem_malloc(sizeof(qdf_mc_timer_t));
 	if (cmdTimeoutTimer) {
 		pMac->sme.smeCmdActiveList.cmdTimeoutTimer = cmdTimeoutTimer;
 		qdf_status =
@@ -380,7 +380,7 @@
 		if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
 			QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 				  "Init Timer fail for active list command process time out");
-			cdf_mem_free(pMac->sme.smeCmdActiveList.
+			qdf_mem_free(pMac->sme.smeCmdActiveList.
 				     cmdTimeoutTimer);
 			pMac->sme.smeCmdActiveList.cmdTimeoutTimer = NULL;
 		} else {
@@ -433,7 +433,7 @@
 	tSmeCmd *pCommand;
 	tDblLinkList localList;
 
-	cdf_mem_zero(&localList, sizeof(tDblLinkList));
+	qdf_mem_zero(&localList, sizeof(tDblLinkList));
 	if (!QDF_IS_STATUS_SUCCESS(csr_ll_open(pMac->hHdd, &localList))) {
 		sms_log(pMac, LOGE, FL(" failed to open list"));
 		return;
@@ -474,7 +474,7 @@
 
 	/*destroy active list command time out timer */
 	qdf_mc_timer_destroy(pMac->sme.smeCmdActiveList.cmdTimeoutTimer);
-	cdf_mem_free(pMac->sme.smeCmdActiveList.cmdTimeoutTimer);
+	qdf_mem_free(pMac->sme.smeCmdActiveList.cmdTimeoutTimer);
 	pMac->sme.smeCmdActiveList.cmdTimeoutTimer = NULL;
 
 	status = qdf_mutex_acquire(&pMac->sme.lkSmeGlobalLock);
@@ -615,11 +615,11 @@
 
 	/* memset to zero */
 	if (pRetCmd) {
-		cdf_mem_set((uint8_t *)&pRetCmd->command,
+		qdf_mem_set((uint8_t *)&pRetCmd->command,
 			    sizeof(pRetCmd->command), 0);
-		cdf_mem_set((uint8_t *)&pRetCmd->sessionId,
+		qdf_mem_set((uint8_t *)&pRetCmd->sessionId,
 			    sizeof(pRetCmd->sessionId), 0);
-		cdf_mem_set((uint8_t *)&pRetCmd->u, sizeof(pRetCmd->u), 0);
+		qdf_mem_set((uint8_t *)&pRetCmd->u, sizeof(pRetCmd->u), 0);
 	}
 
 	return pRetCmd;
@@ -1285,10 +1285,10 @@
 	} /* End of for () */
 
 	/* Copying back the valid channel list to plm struct */
-	cdf_mem_set((void *)pPlmReq->plmChList,
+	qdf_mem_set((void *)pPlmReq->plmChList,
 		    pPlmReq->plmNumCh, 0);
 	if (valid_count)
-		cdf_mem_copy(pPlmReq->plmChList, ch_list,
+		qdf_mem_copy(pPlmReq->plmChList, ch_list,
 			     valid_count);
 	/* All are invalid channels, FW need to send the PLM
 	 *  report with "incapable" bit set.
@@ -1424,25 +1424,25 @@
 		roam_params_dst->is_5g_pref_enabled = true;
 		break;
 	case REASON_ROAM_SET_SSID_ALLOWED:
-		cdf_mem_set(&roam_params_dst->ssid_allowed_list, 0,
+		qdf_mem_set(&roam_params_dst->ssid_allowed_list, 0,
 				sizeof(tSirMacSSid) * MAX_SSID_ALLOWED_LIST);
 		roam_params_dst->num_ssid_allowed_list =
 			roam_params_src.num_ssid_allowed_list;
 		for (i = 0; i < roam_params_dst->num_ssid_allowed_list; i++) {
 			roam_params_dst->ssid_allowed_list[i].length =
 				roam_params_src.ssid_allowed_list[i].length;
-			cdf_mem_copy(roam_params_dst->ssid_allowed_list[i].ssId,
+			qdf_mem_copy(roam_params_dst->ssid_allowed_list[i].ssId,
 				roam_params_src.ssid_allowed_list[i].ssId,
 				roam_params_dst->ssid_allowed_list[i].length);
 		}
 		break;
 	case REASON_ROAM_SET_FAVORED_BSSID:
-		cdf_mem_set(&roam_params_dst->bssid_favored, 0,
+		qdf_mem_set(&roam_params_dst->bssid_favored, 0,
 			sizeof(tSirMacAddr) * MAX_BSSID_FAVORED);
 		roam_params_dst->num_bssid_favored =
 			roam_params_src.num_bssid_favored;
 		for (i = 0; i < roam_params_dst->num_bssid_favored; i++) {
-			cdf_mem_copy(&roam_params_dst->bssid_favored[i],
+			qdf_mem_copy(&roam_params_dst->bssid_favored[i],
 				&roam_params_src.bssid_favored[i],
 				sizeof(tSirMacAddr));
 			roam_params_dst->bssid_favored_factor[i] =
@@ -1450,7 +1450,7 @@
 		}
 		break;
 	case REASON_ROAM_SET_BLACKLIST_BSSID:
-		cdf_mem_set(&roam_params_dst->bssid_avoid_list, 0,
+		qdf_mem_set(&roam_params_dst->bssid_avoid_list, 0,
 			QDF_MAC_ADDR_SIZE * MAX_BSSID_AVOID_LIST);
 		roam_params_dst->num_bssid_avoid_list =
 			roam_params_src.num_bssid_avoid_list;
@@ -1733,7 +1733,7 @@
 			FL("scan request failed. session_id %d"), session_id);
 	}
 	csr_scan_free_request(mac_ctx, scan_msg->scan_param);
-	cdf_mem_free(scan_msg->scan_param);
+	qdf_mem_free(scan_msg->scan_param);
 	return status;
 }
 
@@ -1993,11 +1993,11 @@
 	}
 
 	/* Store the info in RRM context */
-	cdf_mem_copy(&pSmeRrmContext->eseBcnReqInfo, pEseBcnReq,
+	qdf_mem_copy(&pSmeRrmContext->eseBcnReqInfo, pEseBcnReq,
 		     sizeof(tCsrEseBeaconReq));
 
 	/* Prepare the request to send to SME. */
-	pSmeBcnReportReq = cdf_mem_malloc(sizeof(tSirBeaconReportReqInd));
+	pSmeBcnReportReq = qdf_mem_malloc(sizeof(tSirBeaconReportReqInd));
 	if (NULL == pSmeBcnReportReq) {
 		sms_log(pMac, LOGP,
 			"Memory Allocation Failure!!! ESE  BcnReq Ind to SME");
@@ -2007,11 +2007,11 @@
 	pSmeRrmContext->eseBcnReqInProgress = true;
 
 	sms_log(pMac, LOGE, "Sending Beacon Report Req to SME");
-	cdf_mem_zero(pSmeBcnReportReq, sizeof(tSirBeaconReportReqInd));
+	qdf_mem_zero(pSmeBcnReportReq, sizeof(tSirBeaconReportReqInd));
 
 	pSmeBcnReportReq->messageType = eWNI_SME_BEACON_REPORT_REQ_IND;
 	pSmeBcnReportReq->length = sizeof(tSirBeaconReportReqInd);
-	cdf_mem_copy(pSmeBcnReportReq->bssId,
+	qdf_mem_copy(pSmeBcnReportReq->bssId,
 		     pSession->connectedProfile.bssid.bytes,
 		     sizeof(tSirMacAddr));
 	pSmeBcnReportReq->channelInfo.channelNum = 255;
@@ -2057,7 +2057,7 @@
 		if (mac_ctx->sme.fw_dump_callback)
 			mac_ctx->sme.fw_dump_callback(mac_ctx->hHdd,
 				(struct fw_dump_rsp *) msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 	}
 }
 #else
@@ -2165,14 +2165,14 @@
 	if (!QDF_IS_STATUS_SUCCESS(status)) {
 		sms_log(pMac, LOGW, FL("Locking failed, bailing out"));
 		if (pMsg->bodyptr)
-			cdf_mem_free(pMsg->bodyptr);
+			qdf_mem_free(pMsg->bodyptr);
 		return status;
 	}
 	if (!SME_IS_START(pMac)) {
 		sms_log(pMac, LOGW, FL("message type %d in stop state ignored"),
 			pMsg->type);
 		if (pMsg->bodyptr)
-			cdf_mem_free(pMsg->bodyptr);
+			qdf_mem_free(pMsg->bodyptr);
 		goto release_lock;
 	}
 	switch (pMsg->type) {
@@ -2181,7 +2181,7 @@
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 			  FL("LFR3: Rcvd eWNI_SME_HO_FAIL_IND"));
 		csr_process_ho_fail_ind(pMac, pMsg->bodyptr);
-		cdf_mem_free(pMsg->bodyptr);
+		qdf_mem_free(pMsg->bodyptr);
 		break;
 #endif
 	case eWNI_PMC_SMPS_STATE_IND:
@@ -2201,7 +2201,7 @@
 #ifndef WLAN_MDM_CODE_REDUCTION_OPT
 			status = sme_qos_msg_processor(pMac, pMsg->type,
 						       pMsg->bodyptr);
-			cdf_mem_free(pMsg->bodyptr);
+			qdf_mem_free(pMsg->bodyptr);
 #endif
 		} else {
 			sms_log(pMac, LOGE, FL("Empty message for %d"),
@@ -2218,7 +2218,7 @@
 		if (pMsg->bodyptr) {
 			status = sme_rrm_msg_processor(pMac, pMsg->type,
 						       pMsg->bodyptr);
-			cdf_mem_free(pMsg->bodyptr);
+			qdf_mem_free(pMsg->bodyptr);
 		} else {
 			sms_log(pMac, LOGE, FL("Empty message for %d"),
 				pMsg->type);
@@ -2230,7 +2230,7 @@
 	case eWNI_SME_OEM_DATA_RSP:
 		if (pMsg->bodyptr) {
 			status = sme_handle_oem_data_rsp(pMac, pMsg->bodyptr);
-			cdf_mem_free(pMsg->bodyptr);
+			qdf_mem_free(pMsg->bodyptr);
 		} else {
 			sms_log(pMac, LOGE, FL("Empty message for %d"),
 				pMsg->type);
@@ -2242,7 +2242,7 @@
 		if (pMsg->bodyptr) {
 			status = csr_process_add_sta_session_rsp(pMac,
 								pMsg->bodyptr);
-			cdf_mem_free(pMsg->bodyptr);
+			qdf_mem_free(pMsg->bodyptr);
 		} else {
 			sms_log(pMac, LOGE, FL("Empty message for %d"),
 				pMsg->type);
@@ -2252,7 +2252,7 @@
 		if (pMsg->bodyptr) {
 			status = csr_process_del_sta_session_rsp(pMac,
 								pMsg->bodyptr);
-			cdf_mem_free(pMsg->bodyptr);
+			qdf_mem_free(pMsg->bodyptr);
 		} else {
 			sms_log(pMac, LOGE, FL("Empty message for %d"),
 				pMsg->type);
@@ -2261,7 +2261,7 @@
 	case eWNI_SME_REMAIN_ON_CHN_RSP:
 		if (pMsg->bodyptr) {
 			status = sme_remain_on_chn_rsp(pMac, pMsg->bodyptr);
-			cdf_mem_free(pMsg->bodyptr);
+			qdf_mem_free(pMsg->bodyptr);
 		} else {
 			sms_log(pMac, LOGE, FL("Empty message for %d"),
 				pMsg->type);
@@ -2270,7 +2270,7 @@
 	case eWNI_SME_REMAIN_ON_CHN_RDY_IND:
 		if (pMsg->bodyptr) {
 			status = sme_remain_on_chn_ready(pMac, pMsg->bodyptr);
-			cdf_mem_free(pMsg->bodyptr);
+			qdf_mem_free(pMsg->bodyptr);
 		} else {
 			sms_log(pMac, LOGE, FL("Empty message for %d"),
 				pMsg->type);
@@ -2279,7 +2279,7 @@
 	case eWNI_SME_ACTION_FRAME_SEND_CNF:
 		if (pMsg->bodyptr) {
 			status = sme_send_action_cnf(pMac, pMsg->bodyptr);
-			cdf_mem_free(pMsg->bodyptr);
+			qdf_mem_free(pMsg->bodyptr);
 		} else {
 			sms_log(pMac, LOGE, FL("Empty message for %d"),
 				pMsg->type);
@@ -2290,7 +2290,7 @@
 		if (pMsg->bodyptr) {
 			status = sme_preferred_network_found_ind((void *)pMac,
 								 pMsg->bodyptr);
-			cdf_mem_free(pMsg->bodyptr);
+			qdf_mem_free(pMsg->bodyptr);
 		} else {
 			sms_log(pMac, LOGE, FL("Empty message for %d"),
 				pMsg->type);
@@ -2301,7 +2301,7 @@
 		if (pMsg->bodyptr) {
 			status = sme_handle_change_country_code((void *)pMac,
 								pMsg->bodyptr);
-			cdf_mem_free(pMsg->bodyptr);
+			qdf_mem_free(pMsg->bodyptr);
 		} else {
 			sms_log(pMac, LOGE, FL("Empty message for %d"),
 				pMsg->type);
@@ -2311,7 +2311,7 @@
 		if (pMsg->bodyptr) {
 			status = sme_handle_generic_change_country_code(
 						(void *)pMac, pMsg->bodyptr);
-			cdf_mem_free(pMsg->bodyptr);
+			qdf_mem_free(pMsg->bodyptr);
 		} else {
 			sms_log(pMac, LOGE, FL("Empty message for %d"),
 				pMsg->type);
@@ -2320,7 +2320,7 @@
 	case eWNI_SME_SCAN_CMD:
 		if (pMsg->bodyptr) {
 			status = sme_handle_scan_req(pMac, pMsg->bodyptr);
-			cdf_mem_free(pMsg->bodyptr);
+			qdf_mem_free(pMsg->bodyptr);
 		} else {
 			sms_log(pMac, LOGE, FL("Empty message for %d"),
 				pMsg->type);
@@ -2329,7 +2329,7 @@
 	case eWNI_SME_ROC_CMD:
 		if (pMsg->bodyptr) {
 			status = sme_handle_roc_req(hHal, pMsg->bodyptr);
-			cdf_mem_free(pMsg->bodyptr);
+			qdf_mem_free(pMsg->bodyptr);
 		} else {
 			sms_log(pMac, LOGE, FL("Empty message for %d"),
 				pMsg->type);
@@ -2353,7 +2353,7 @@
 		if (pMsg->bodyptr) {
 			status = tdls_msg_processor(pMac, pMsg->type,
 						    pMsg->bodyptr);
-			cdf_mem_free(pMsg->bodyptr);
+			qdf_mem_free(pMsg->bodyptr);
 		} else {
 			sms_log(pMac, LOGE, FL("Empty message for %d"),
 				pMsg->type);
@@ -2364,7 +2364,7 @@
 	case eWNI_SME_UNPROT_MGMT_FRM_IND:
 		if (pMsg->bodyptr) {
 			sme_unprotected_mgmt_frm_ind(pMac, pMsg->bodyptr);
-			cdf_mem_free(pMsg->bodyptr);
+			qdf_mem_free(pMsg->bodyptr);
 		} else {
 			sms_log(pMac, LOGE, FL("Empty message for %d"),
 				pMsg->type);
@@ -2375,7 +2375,7 @@
 	case eWNI_SME_TSM_IE_IND:
 		if (pMsg->bodyptr) {
 			sme_tsm_ie_ind(pMac, pMsg->bodyptr);
-			cdf_mem_free(pMsg->bodyptr);
+			qdf_mem_free(pMsg->bodyptr);
 		} else {
 			sms_log(pMac, LOGE, FL("Empty message for %d"),
 				pMsg->type);
@@ -2385,13 +2385,13 @@
 	case eWNI_SME_ROAM_SCAN_OFFLOAD_RSP:
 		status = csr_roam_offload_scan_rsp_hdlr((void *)pMac,
 							pMsg->bodyptr);
-		cdf_mem_free(pMsg->bodyptr);
+		qdf_mem_free(pMsg->bodyptr);
 		break;
 #ifdef WLAN_FEATURE_GTK_OFFLOAD
 	case eWNI_PMC_GTK_OFFLOAD_GETINFO_RSP:
 		if (pMsg->bodyptr) {
 			sme_process_get_gtk_info_rsp(pMac, pMsg->bodyptr);
-			cdf_mem_free(pMsg->bodyptr);
+			qdf_mem_free(pMsg->bodyptr);
 		} else {
 			sms_log(pMac, LOGE, FL("Empty message for %d"),
 				pMsg->type);
@@ -2403,14 +2403,14 @@
 	case eWNI_SME_LPHB_IND:
 		if (pMac->sme.pLphbIndCb)
 			pMac->sme.pLphbIndCb(pMac->hHdd, pMsg->bodyptr);
-		cdf_mem_free(pMsg->bodyptr);
+		qdf_mem_free(pMsg->bodyptr);
 		break;
 #endif /* FEATURE_WLAN_LPHB */
 
 	case eWNI_SME_READY_TO_SUSPEND_IND:
 		if (pMsg->bodyptr) {
 			sme_process_ready_to_suspend(pMac, pMsg->bodyptr);
-			cdf_mem_free(pMsg->bodyptr);
+			qdf_mem_free(pMsg->bodyptr);
 		} else {
 			sms_log(pMac, LOGE, FL("Empty message for %d"),
 				pMsg->type);
@@ -2420,7 +2420,7 @@
 	case eWNI_SME_READY_TO_EXTWOW_IND:
 		if (pMsg->bodyptr) {
 			sme_process_ready_to_ext_wow(pMac, pMsg->bodyptr);
-			cdf_mem_free(pMsg->bodyptr);
+			qdf_mem_free(pMsg->bodyptr);
 		} else {
 			sms_log(pMac, LOGE, FL("Empty message for %d"),
 				pMsg->type);
@@ -2436,7 +2436,7 @@
 			pMac->sme.pChAvoidNotificationCb(pMac->hHdd,
 							 pMsg->bodyptr);
 		}
-		cdf_mem_free(pMsg->bodyptr);
+		qdf_mem_free(pMsg->bodyptr);
 		break;
 #endif /* FEATURE_WLAN_CH_AVOID */
 #ifdef FEATURE_WLAN_AUTO_SHUTDOWN
@@ -2446,20 +2446,20 @@
 				  FL("Auto shutdown notification"));
 			pMac->sme.pAutoShutdownNotificationCb();
 		}
-		cdf_mem_free(pMsg->bodyptr);
+		qdf_mem_free(pMsg->bodyptr);
 		break;
 #endif
 	case eWNI_SME_DFS_RADAR_FOUND:
 	case eWNI_SME_DFS_CSAIE_TX_COMPLETE_IND:
 		status = dfs_msg_processor(pMac, pMsg->type, pMsg->bodyptr);
-		cdf_mem_free(pMsg->bodyptr);
+		qdf_mem_free(pMsg->bodyptr);
 		break;
 	case eWNI_SME_CHANNEL_CHANGE_RSP:
 		if (pMsg->bodyptr) {
 			status = sme_process_channel_change_resp(pMac,
 								 pMsg->type,
 								 pMsg->bodyptr);
-			cdf_mem_free(pMsg->bodyptr);
+			qdf_mem_free(pMsg->bodyptr);
 		} else {
 			sms_log(pMac, LOGE, FL("Empty message for %d"),
 				pMsg->type);
@@ -2469,7 +2469,7 @@
 	case eWNI_SME_STATS_EXT_EVENT:
 		if (pMsg->bodyptr) {
 			status = sme_stats_ext_event(hHal, pMsg->bodyptr);
-			cdf_mem_free(pMsg->bodyptr);
+			qdf_mem_free(pMsg->bodyptr);
 		} else {
 			sms_log(pMac, LOGE, FL("Empty message for %d"),
 				pMsg->type);
@@ -2481,19 +2481,19 @@
 			pMac->sme.pLinkSpeedIndCb(pMsg->bodyptr,
 						pMac->sme.pLinkSpeedCbContext);
 		if (pMsg->bodyptr)
-			cdf_mem_free(pMsg->bodyptr);
+			qdf_mem_free(pMsg->bodyptr);
 		break;
 	case eWNI_SME_CSA_OFFLOAD_EVENT:
 		if (pMsg->bodyptr) {
 			csr_scan_flush_bss_entry(pMac, pMsg->bodyptr);
-			cdf_mem_free(pMsg->bodyptr);
+			qdf_mem_free(pMsg->bodyptr);
 		}
 		break;
 #ifdef WLAN_FEATURE_NAN
 	case eWNI_SME_NAN_EVENT:
 		if (pMsg->bodyptr) {
 			sme_nan_event(hHal, pMsg->bodyptr);
-			cdf_mem_free(pMsg->bodyptr);
+			qdf_mem_free(pMsg->bodyptr);
 		}
 		break;
 #endif /* WLAN_FEATURE_NAN */
@@ -2509,7 +2509,7 @@
 			}
 			pMac->sme.linkStatusCallback = NULL;
 			pMac->sme.linkStatusContext = NULL;
-			cdf_mem_free(pLinkStatus);
+			qdf_mem_free(pLinkStatus);
 		}
 		break;
 	}
@@ -2529,7 +2529,7 @@
 					(pSnrReq->snr, pSnrReq->staId,
 					pSnrReq->pDevContext);
 			}
-			cdf_mem_free(pSnrReq);
+			qdf_mem_free(pSnrReq);
 		}
 		break;
 	}
@@ -2544,7 +2544,7 @@
 				FL("callback not registered to process %d"),
 				pMsg->type);
 
-		cdf_mem_free(pMsg->bodyptr);
+		qdf_mem_free(pMsg->bodyptr);
 		break;
 	case eWNI_SME_EPNO_NETWORK_FOUND_IND:
 		if (pMac->sme.pExtScanIndCb)
@@ -2556,7 +2556,7 @@
 				FL("callback not registered to process %d"),
 				pMsg->type);
 
-		cdf_mem_free(pMsg->bodyptr);
+		qdf_mem_free(pMsg->bodyptr);
 		break;
 #endif
 	case eWNI_SME_FW_DUMP_IND:
@@ -2566,7 +2566,7 @@
 		if (pMsg->bodyptr) {
 			status = sme_process_set_hw_mode_resp(pMac,
 								pMsg->bodyptr);
-			cdf_mem_free(pMsg->bodyptr);
+			qdf_mem_free(pMsg->bodyptr);
 		} else {
 			sms_log(pMac, LOGE, FL("Empty message for %d"),
 				pMsg->type);
@@ -2576,7 +2576,7 @@
 		if (pMsg->bodyptr) {
 			status = sme_process_hw_mode_trans_ind(pMac,
 								pMsg->bodyptr);
-			cdf_mem_free(pMsg->bodyptr);
+			qdf_mem_free(pMsg->bodyptr);
 		} else {
 			sms_log(pMac, LOGE, FL("Empty message for %d"),
 				pMsg->type);
@@ -2586,7 +2586,7 @@
 		if (pMsg->bodyptr) {
 			status = sme_process_nss_update_resp(pMac,
 								pMsg->bodyptr);
-			cdf_mem_free(pMsg->bodyptr);
+			qdf_mem_free(pMsg->bodyptr);
 		} else {
 			sms_log(pMac, LOGE, FL("Empty message for %d"),
 				pMsg->type);
@@ -2603,7 +2603,7 @@
 		}
 		pMac->sme.ocb_set_config_callback = NULL;
 		pMac->sme.ocb_set_config_context = NULL;
-		cdf_mem_free(pMsg->bodyptr);
+		qdf_mem_free(pMsg->bodyptr);
 		break;
 	case eWNI_SME_OCB_GET_TSF_TIMER_RSP:
 		if (pMac->sme.ocb_get_tsf_timer_callback) {
@@ -2616,7 +2616,7 @@
 		}
 		pMac->sme.ocb_get_tsf_timer_callback = NULL;
 		pMac->sme.ocb_get_tsf_timer_context = NULL;
-		cdf_mem_free(pMsg->bodyptr);
+		qdf_mem_free(pMsg->bodyptr);
 		break;
 	case eWNI_SME_DCC_GET_STATS_RSP:
 		if (pMac->sme.dcc_get_stats_callback) {
@@ -2629,7 +2629,7 @@
 		}
 		pMac->sme.dcc_get_stats_callback = NULL;
 		pMac->sme.dcc_get_stats_context = NULL;
-		cdf_mem_free(pMsg->bodyptr);
+		qdf_mem_free(pMsg->bodyptr);
 		break;
 	case eWNI_SME_DCC_UPDATE_NDL_RSP:
 		if (pMac->sme.dcc_update_ndl_callback) {
@@ -2642,7 +2642,7 @@
 		}
 		pMac->sme.dcc_update_ndl_callback = NULL;
 		pMac->sme.dcc_update_ndl_context = NULL;
-		cdf_mem_free(pMsg->bodyptr);
+		qdf_mem_free(pMsg->bodyptr);
 		break;
 	case eWNI_SME_DCC_STATS_EVENT:
 		if (pMac->sme.dcc_stats_event_callback) {
@@ -2653,13 +2653,13 @@
 			sms_log(pMac, LOGE, FL(
 				"Message error. The callback is NULL."));
 		}
-		cdf_mem_free(pMsg->bodyptr);
+		qdf_mem_free(pMsg->bodyptr);
 		break;
 	case eWNI_SME_SET_DUAL_MAC_CFG_RESP:
 		if (pMsg->bodyptr) {
 			status = sme_process_dual_mac_config_resp(pMac,
 					pMsg->bodyptr);
-			cdf_mem_free(pMsg->bodyptr);
+			qdf_mem_free(pMsg->bodyptr);
 		} else {
 			sms_log(pMac, LOGE, FL("Empty message for %d"),
 					pMsg->type);
@@ -2671,7 +2671,7 @@
 		break;
 	case eWNI_SME_EXT_CHANGE_CHANNEL_IND:
 		 status = sme_extended_change_channel_ind(pMac, pMsg->bodyptr);
-		 cdf_mem_free(pMsg->bodyptr);
+		 qdf_mem_free(pMsg->bodyptr);
 		 break;
 	default:
 
@@ -2680,7 +2680,7 @@
 			/* CSR */
 			if (pMsg->bodyptr) {
 				status = csr_msg_processor(hHal, pMsg->bodyptr);
-				cdf_mem_free(pMsg->bodyptr);
+				qdf_mem_free(pMsg->bodyptr);
 			} else {
 				sms_log(pMac, LOGE, FL("Empty message for %d"),
 				pMsg->type);
@@ -2689,7 +2689,7 @@
 			sms_log(pMac, LOGW, FL("Unknown message type %d"),
 				pMsg->type);
 			if (pMsg->bodyptr)
-				cdf_mem_free(pMsg->bodyptr);
+				qdf_mem_free(pMsg->bodyptr);
 		}
 	} /* switch */
 release_lock:
@@ -2772,7 +2772,7 @@
 {
 	if (pMsg) {
 		if (pMsg->bodyptr) {
-			cdf_mem_free(pMsg->bodyptr);
+			qdf_mem_free(pMsg->bodyptr);
 		}
 	}
 
@@ -2958,7 +2958,7 @@
 		return status;
 	}
 	sms_log(mac_ctx, LOG1, FL(" called"));
-	scan_msg = cdf_mem_malloc(sizeof(struct ani_scan_req));
+	scan_msg = qdf_mem_malloc(sizeof(struct ani_scan_req));
 	if (NULL == scan_msg) {
 		sms_log(mac_ctx, LOGE,
 			" scan_req: failed to allocate mem for msg");
@@ -2970,12 +2970,12 @@
 	scan_msg->session_id = session_id;
 	scan_msg->callback = callback;
 	scan_msg->ctx = ctx;
-	scan_msg->scan_param = cdf_mem_malloc(sizeof(tCsrScanRequest));
+	scan_msg->scan_param = qdf_mem_malloc(sizeof(tCsrScanRequest));
 	if (NULL == scan_msg->scan_param) {
 		sms_log(mac_ctx, LOGE,
 			"scan_req:failed to allocate mem for scanreq");
 		sme_release_global_lock(&mac_ctx->sme);
-		cdf_mem_free(scan_msg);
+		qdf_mem_free(scan_msg);
 		return QDF_STATUS_E_NOMEM;
 	}
 	csr_scan_copy_request(mac_ctx, scan_msg->scan_param, scan_req);
@@ -2988,8 +2988,8 @@
 		sms_log(mac_ctx, LOGE,
 			" sme_scan_req failed to post msg");
 		csr_scan_free_request(mac_ctx, scan_msg->scan_param);
-		cdf_mem_free(scan_msg->scan_param);
-		cdf_mem_free(scan_msg);
+		qdf_mem_free(scan_msg->scan_param);
+		qdf_mem_free(scan_msg);
 		status = QDF_STATUS_E_FAILURE;
 	}
 	sme_release_global_lock(&mac_ctx->sme);
@@ -3054,14 +3054,14 @@
 				FL("mac_ctx is NULL"));
 		return QDF_STATUS_E_FAILURE;
 	}
-	scan_filter = cdf_mem_malloc(sizeof(tCsrScanResultFilter));
+	scan_filter = qdf_mem_malloc(sizeof(tCsrScanResultFilter));
 	if (NULL == scan_filter) {
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 				FL("scan_filter mem alloc failed"));
 		return QDF_STATUS_E_FAILURE;
 	} else {
-		cdf_mem_set(scan_filter, sizeof(tCsrScanResultFilter), 0);
-		cdf_mem_set(&first_ap_profile, sizeof(tSirBssDescription), 0);
+		qdf_mem_set(scan_filter, sizeof(tCsrScanResultFilter), 0);
+		qdf_mem_set(&first_ap_profile, sizeof(tSirBssDescription), 0);
 
 		if (NULL == profile) {
 			scan_filter->EncryptionType.numEntries = 1;
@@ -3088,7 +3088,7 @@
 		} else {
 			QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 				FL("Preparing the profile filter failed"));
-			cdf_mem_free(scan_filter);
+			qdf_mem_free(scan_filter);
 			return QDF_STATUS_E_FAILURE;
 		}
 	}
@@ -3131,7 +3131,7 @@
 		status = QDF_STATUS_E_FAILURE;
 	}
 
-	cdf_mem_free(scan_filter);
+	qdf_mem_free(scan_filter);
 
 	return status;
 }
@@ -4200,7 +4200,7 @@
 			sme_release_global_lock(&pMac->sme);
 			return status;
 		}
-		cdf_mem_copy(&pParam->rrmConfig,
+		qdf_mem_copy(&pParam->rrmConfig,
 				&pMac->rrm.rrmSmeContext.rrmConfig,
 				sizeof(pMac->rrm.rrmSmeContext.rrmConfig));
 		sme_release_global_lock(&pMac->sme);
@@ -4497,13 +4497,13 @@
 	MTRACE(qdf_trace(QDF_MODULE_ID_SME,
 			TRACE_CODE_SME_RX_HDD_WOWL_ADDBCAST_PATTERN, session_id,
 			0));
-	ptrn = cdf_mem_malloc(sizeof(*ptrn));
+	ptrn = qdf_mem_malloc(sizeof(*ptrn));
 	if (NULL == ptrn) {
 		sms_log(pMac, LOGP,
 			FL("Fail to allocate memory for WoWLAN Add Bcast Pattern "));
 		return QDF_STATUS_E_NOMEM;
 	}
-	(void)cdf_mem_copy(ptrn, pattern, sizeof(*ptrn));
+	(void)qdf_mem_copy(ptrn, pattern, sizeof(*ptrn));
 
 	msg_q.type = WMA_WOW_ADD_PTRN;
 	msg_q.reserved = 0;
@@ -4538,13 +4538,13 @@
 	MTRACE(qdf_trace(QDF_MODULE_ID_SME,
 			 TRACE_CODE_SME_RX_HDD_WOWL_DELBCAST_PATTERN, sessionId,
 			 0));
-	delete_ptrn = cdf_mem_malloc(sizeof(*delete_ptrn));
+	delete_ptrn = qdf_mem_malloc(sizeof(*delete_ptrn));
 	if (NULL == delete_ptrn) {
 		sms_log(pMac, LOGP,
 			FL("Fail to allocate memory for WoWLAN Delete Bcast Pattern "));
 		return QDF_STATUS_E_NOMEM;
 	}
-	(void)cdf_mem_copy(delete_ptrn, pattern, sizeof(*delete_ptrn));
+	(void)qdf_mem_copy(delete_ptrn, pattern, sizeof(*delete_ptrn));
 	msg_q.type = WMA_WOW_DEL_PTRN;
 	msg_q.reserved = 0;
 	msg_q.bodyptr = delete_ptrn;
@@ -4876,7 +4876,7 @@
 
 	status = sme_acquire_global_lock(&pMac->sme);
 	if (QDF_IS_STATUS_SUCCESS(status)) {
-		pMsg = cdf_mem_malloc(sizeof(tAniGetLinkStatus));
+		pMsg = qdf_mem_malloc(sizeof(tAniGetLinkStatus));
 		if (NULL == pMsg) {
 			QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 				  "%s: Not able to allocate memory for link status",
@@ -4899,7 +4899,7 @@
 			    (cds_mq_post_message(QDF_MODULE_ID_WMA, &cds_message))) {
 			QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 				  "%s: Post LINK STATUS MSG fail", __func__);
-			cdf_mem_free(pMsg);
+			qdf_mem_free(pMsg);
 			pMac->sme.linkStatusContext = NULL;
 			pMac->sme.linkStatusCallback = NULL;
 			status = QDF_STATUS_E_FAILURE;
@@ -5031,7 +5031,7 @@
 			return status;
 		}
 
-		pMsg = cdf_mem_malloc(sizeof(tAniChangeCountryCodeReq));
+		pMsg = qdf_mem_malloc(sizeof(tAniChangeCountryCodeReq));
 		if (NULL == pMsg) {
 			sms_log(pMac, LOGE,
 				" csrChangeCountryCode: failed to allocate mem for req");
@@ -5041,7 +5041,7 @@
 
 		pMsg->msgType = eWNI_SME_CHANGE_COUNTRY_CODE;
 		pMsg->msgLen = (uint16_t) sizeof(tAniChangeCountryCodeReq);
-		cdf_mem_copy(pMsg->countryCode, pCountry, 3);
+		qdf_mem_copy(pMsg->countryCode, pCountry, 3);
 		pMsg->countryFromUserSpace = countryFromUserSpace;
 		pMsg->sendRegHint = sendRegHint;
 		pMsg->changeCCCallback = callback;
@@ -5056,7 +5056,7 @@
 		    cds_mq_post_message(CDS_MQ_ID_SME, &msg)) {
 			sms_log(pMac, LOGE,
 				" sme_change_country_code failed to post msg to self ");
-			cdf_mem_free((void *)pMsg);
+			qdf_mem_free((void *)pMsg);
 			status = QDF_STATUS_E_FAILURE;
 		}
 		sms_log(pMac, LOG1, FL(" returned"));
@@ -5101,7 +5101,7 @@
 	status = sme_acquire_global_lock(&pMac->sme);
 	if (QDF_IS_STATUS_SUCCESS(status)) {
 		sms_log(pMac, LOG1, FL(" called"));
-		pMsg = cdf_mem_malloc(sizeof(tAniGenericChangeCountryCodeReq));
+		pMsg = qdf_mem_malloc(sizeof(tAniGenericChangeCountryCodeReq));
 
 		if (NULL == pMsg) {
 			sms_log(pMac, LOGE,
@@ -5113,7 +5113,7 @@
 		pMsg->msgType = eWNI_SME_GENERIC_CHANGE_COUNTRY_CODE;
 		pMsg->msgLen =
 			(uint16_t) sizeof(tAniGenericChangeCountryCodeReq);
-		cdf_mem_copy(pMsg->countryCode, pCountry, 2);
+		qdf_mem_copy(pMsg->countryCode, pCountry, 2);
 		pMsg->countryCode[2] = ' ';
 
 		msg.type = eWNI_SME_GENERIC_CHANGE_COUNTRY_CODE;
@@ -5124,7 +5124,7 @@
 		    cds_mq_post_message(CDS_MQ_ID_SME, &msg)) {
 			sms_log(pMac, LOGE,
 				"sme_generic_change_country_code failed to post msg to self");
-			cdf_mem_free(pMsg);
+			qdf_mem_free(pMsg);
 			status = QDF_STATUS_E_FAILURE;
 		}
 		sms_log(pMac, LOG1, FL(" returned"));
@@ -5174,7 +5174,7 @@
 			return QDF_STATUS_E_FAILURE;
 		}
 
-		pMsg = (tAniDHCPInd *) cdf_mem_malloc(sizeof(tAniDHCPInd));
+		pMsg = (tAniDHCPInd *) qdf_mem_malloc(sizeof(tAniDHCPInd));
 		if (NULL == pMsg) {
 			QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 				  "%s: Not able to allocate memory for dhcp start",
@@ -5185,7 +5185,7 @@
 		pMsg->msgType = WMA_DHCP_START_IND;
 		pMsg->msgLen = (uint16_t) sizeof(tAniDHCPInd);
 		pMsg->device_mode = device_mode;
-		cdf_mem_copy(pMsg->adapterMacAddr.bytes, macAddr,
+		qdf_mem_copy(pMsg->adapterMacAddr.bytes, macAddr,
 			     QDF_MAC_ADDR_SIZE);
 		qdf_copy_macaddr(&pMsg->peerMacAddr,
 				 &pSession->connectedProfile.bssid);
@@ -5198,7 +5198,7 @@
 		if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
 			QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 				  "%s: Post DHCP Start MSG fail", __func__);
-			cdf_mem_free(pMsg);
+			qdf_mem_free(pMsg);
 			status = QDF_STATUS_E_FAILURE;
 		}
 		sme_release_global_lock(&pMac->sme);
@@ -5244,7 +5244,7 @@
 			return QDF_STATUS_E_FAILURE;
 		}
 
-		pMsg = (tAniDHCPInd *) cdf_mem_malloc(sizeof(tAniDHCPInd));
+		pMsg = (tAniDHCPInd *) qdf_mem_malloc(sizeof(tAniDHCPInd));
 		if (NULL == pMsg) {
 			QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 				  "%s: Not able to allocate memory for dhcp stop",
@@ -5256,7 +5256,7 @@
 		pMsg->msgType = WMA_DHCP_STOP_IND;
 		pMsg->msgLen = (uint16_t) sizeof(tAniDHCPInd);
 		pMsg->device_mode = device_mode;
-		cdf_mem_copy(pMsg->adapterMacAddr.bytes, macAddr,
+		qdf_mem_copy(pMsg->adapterMacAddr.bytes, macAddr,
 			     QDF_MAC_ADDR_SIZE);
 		qdf_copy_macaddr(&pMsg->peerMacAddr,
 				 &pSession->connectedProfile.bssid);
@@ -5269,7 +5269,7 @@
 		if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
 			QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 				  "%s: Post DHCP Stop MSG fail", __func__);
-			cdf_mem_free(pMsg);
+			qdf_mem_free(pMsg);
 			status = QDF_STATUS_E_FAILURE;
 		}
 
@@ -5801,7 +5801,7 @@
 		return QDF_STATUS_E_FAILURE;
 	}
 
-	request_buf = cdf_mem_malloc(sizeof(*request_buf));
+	request_buf = qdf_mem_malloc(sizeof(*request_buf));
 	if (NULL == request_buf) {
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 		  FL("Not able to allocate memory for GTK offload request"));
@@ -5820,7 +5820,7 @@
 		    (cds_mq_post_message(QDF_MODULE_ID_WMA, &msg))) {
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 			FL("Not able to post SIR_HAL_SET_GTK_OFFLOAD message to HAL"));
-		cdf_mem_free(request_buf);
+		qdf_mem_free(request_buf);
 		return QDF_STATUS_E_FAILURE;
 	}
 
@@ -5854,7 +5854,7 @@
 		return QDF_STATUS_E_FAILURE;
 	}
 
-	request_buf = cdf_mem_malloc(sizeof(*request_buf));
+	request_buf = qdf_mem_malloc(sizeof(*request_buf));
 	if (NULL == request_buf) {
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 			 FL("Not able to allocate memory for Get GTK offload request"));
@@ -5887,7 +5887,7 @@
 		    (cds_mq_post_message(QDF_MODULE_ID_WMA, &msg))) {
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 			  FL("Not able to post WMA_GTK_OFFLOAD_GETINFO_REQ message to WMA"));
-		cdf_mem_free(request_buf);
+		qdf_mem_free(request_buf);
 		return QDF_STATUS_E_FAILURE;
 	}
 
@@ -5918,7 +5918,7 @@
 				FL("Session not Found"));
 		return QDF_STATUS_E_FAILURE;
 	}
-	request_buf = cdf_mem_malloc(sizeof(tSirKeepAliveReq));
+	request_buf = qdf_mem_malloc(sizeof(tSirKeepAliveReq));
 	if (NULL == request_buf) {
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 			FL("Not able to allocate memory for keep alive request"));
@@ -5926,7 +5926,7 @@
 	}
 
 	qdf_copy_macaddr(&request->bssid, &pSession->connectedProfile.bssid);
-	cdf_mem_copy(request_buf, request, sizeof(tSirKeepAliveReq));
+	qdf_mem_copy(request_buf, request, sizeof(tSirKeepAliveReq));
 
 	QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_INFO_LOW,
 			"buff TP %d input TP %d ", request_buf->timePeriod,
@@ -5940,7 +5940,7 @@
 			cds_mq_post_message(QDF_MODULE_ID_WMA, &msg)) {
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 				FL("Not able to post WMA_SET_KEEP_ALIVE message to WMA"));
-		cdf_mem_free(request_buf);
+		qdf_mem_free(request_buf);
 		return QDF_STATUS_E_FAILURE;
 	}
 
@@ -6064,14 +6064,14 @@
 
 	if (QDF_STATUS_SUCCESS ==
 			sme_acquire_global_lock(&mac_ctx->sme)) {
-		msg = cdf_mem_malloc(sizeof(*msg));
+		msg = qdf_mem_malloc(sizeof(*msg));
 		if (NULL == msg) {
 			sms_log(mac_ctx, LOGE,
 				FL("Not able to allocate memory for eWNI_SME_REGISTER_MGMT_FRAME_CB"));
 			sme_release_global_lock(&mac_ctx->sme);
 			return QDF_STATUS_E_NOMEM;
 		}
-		cdf_mem_set(msg, sizeof(*msg), 0);
+		qdf_mem_set(msg, sizeof(*msg), 0);
 		msg->message_type = eWNI_SME_REGISTER_MGMT_FRAME_CB;
 		msg->length          = sizeof(*msg);
 
@@ -6125,18 +6125,18 @@
 
 		len = sizeof(tSirRegisterMgmtFrame) + matchLen;
 
-		pMsg = cdf_mem_malloc(len);
+		pMsg = qdf_mem_malloc(len);
 		if (NULL == pMsg)
 			status = QDF_STATUS_E_NOMEM;
 		else {
-			cdf_mem_set(pMsg, len, 0);
+			qdf_mem_set(pMsg, len, 0);
 			pMsg->messageType = eWNI_SME_REGISTER_MGMT_FRAME_REQ;
 			pMsg->length = len;
 			pMsg->sessionId = sessionId;
 			pMsg->registerFrame = true;
 			pMsg->frameType = frameType;
 			pMsg->matchLen = matchLen;
-			cdf_mem_copy(pMsg->matchData, matchData, matchLen);
+			qdf_mem_copy(pMsg->matchData, matchData, matchLen);
 			status = cds_send_mb_message_to_mac(pMsg);
 		}
 		sme_release_global_lock(&pMac->sme);
@@ -6187,17 +6187,17 @@
 
 		len = sizeof(tSirRegisterMgmtFrame) + matchLen;
 
-		pMsg = cdf_mem_malloc(len);
+		pMsg = qdf_mem_malloc(len);
 		if (NULL == pMsg)
 			status = QDF_STATUS_E_NOMEM;
 		else {
-			cdf_mem_set(pMsg, len, 0);
+			qdf_mem_set(pMsg, len, 0);
 			pMsg->messageType = eWNI_SME_REGISTER_MGMT_FRAME_REQ;
 			pMsg->length = len;
 			pMsg->registerFrame = false;
 			pMsg->frameType = frameType;
 			pMsg->matchLen = matchLen;
-			cdf_mem_copy(pMsg->matchData, matchData, matchLen);
+			qdf_mem_copy(pMsg->matchData, matchData, matchLen);
 			status = cds_send_mb_message_to_mac(pMsg);
 		}
 		sme_release_global_lock(&pMac->sme);
@@ -6247,7 +6247,7 @@
 	status = sme_acquire_global_lock(&mac_ctx->sme);
 
 	sms_log(mac_ctx, LOG1, FL(" called"));
-	roc_msg = cdf_mem_malloc(sizeof(struct ani_roc_req));
+	roc_msg = qdf_mem_malloc(sizeof(struct ani_roc_req));
 	if (NULL == roc_msg) {
 		sms_log(mac_ctx, LOGE,
 			" scan_req: failed to allocate mem for msg");
@@ -6271,7 +6271,7 @@
 		cds_mq_post_message(CDS_MQ_ID_SME, &msg)) {
 		sms_log(mac_ctx, LOGE,
 			" sme_scan_req failed to post msg");
-		cdf_mem_free(roc_msg);
+		qdf_mem_free(roc_msg);
 		status = QDF_STATUS_E_FAILURE;
 	}
 	sme_release_global_lock(&mac_ctx->sme);
@@ -6328,11 +6328,11 @@
 	status = sme_acquire_global_lock(&pMac->sme);
 	if (QDF_IS_STATUS_SUCCESS(status)) {
 		if (NULL != pMac->p2pContext.probeRspIe) {
-			cdf_mem_free(pMac->p2pContext.probeRspIe);
+			qdf_mem_free(pMac->p2pContext.probeRspIe);
 			pMac->p2pContext.probeRspIeLength = 0;
 		}
 
-		pMac->p2pContext.probeRspIe = cdf_mem_malloc(p2pIeLength);
+		pMac->p2pContext.probeRspIe = qdf_mem_malloc(p2pIeLength);
 		if (NULL == pMac->p2pContext.probeRspIe) {
 			sms_log(pMac, LOGE, "%s: Unable to allocate P2P IE",
 				__func__);
@@ -6344,7 +6344,7 @@
 			sir_dump_buf(pMac, SIR_LIM_MODULE_ID, LOG2,
 				     pMac->p2pContext.probeRspIe,
 				     pMac->p2pContext.probeRspIeLength);
-			cdf_mem_copy((uint8_t *) pMac->p2pContext.probeRspIe,
+			qdf_mem_copy((uint8_t *) pMac->p2pContext.probeRspIe,
 				     p2pIe, p2pIeLength);
 		}
 
@@ -6584,7 +6584,7 @@
 	QDF_STATUS qdf_status = QDF_STATUS_SUCCESS;
 	tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
 	cds_msg_t cds_message;
-	tpSirExtWoWParams MsgPtr = cdf_mem_malloc(sizeof(*MsgPtr));
+	tpSirExtWoWParams MsgPtr = qdf_mem_malloc(sizeof(*MsgPtr));
 
 	if (!MsgPtr)
 		return QDF_STATUS_E_NOMEM;
@@ -6599,21 +6599,21 @@
 	if (QDF_IS_STATUS_SUCCESS(status)) {
 
 		/* serialize the req through MC thread */
-		cdf_mem_copy(MsgPtr, wlanExtParams, sizeof(*MsgPtr));
+		qdf_mem_copy(MsgPtr, wlanExtParams, sizeof(*MsgPtr));
 		cds_message.bodyptr = MsgPtr;
 		cds_message.type = WMA_WLAN_EXT_WOW;
 		qdf_status = cds_mq_post_message(CDS_MQ_ID_WMA, &cds_message);
 		if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
 			pMac->readyToExtWoWCallback = NULL;
 			pMac->readyToExtWoWContext = NULL;
-			cdf_mem_free(MsgPtr);
+			qdf_mem_free(MsgPtr);
 			status = QDF_STATUS_E_FAILURE;
 		}
 		sme_release_global_lock(&pMac->sme);
 	} else {
 		pMac->readyToExtWoWCallback = NULL;
 		pMac->readyToExtWoWContext = NULL;
-		cdf_mem_free(MsgPtr);
+		qdf_mem_free(MsgPtr);
 	}
 
 	return status;
@@ -6642,7 +6642,7 @@
 	QDF_STATUS qdf_status = QDF_STATUS_SUCCESS;
 	tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
 	cds_msg_t cds_message;
-	tpSirAppType1Params MsgPtr = cdf_mem_malloc(sizeof(*MsgPtr));
+	tpSirAppType1Params MsgPtr = qdf_mem_malloc(sizeof(*MsgPtr));
 
 	if (!MsgPtr)
 		return QDF_STATUS_E_NOMEM;
@@ -6654,17 +6654,17 @@
 	status = sme_acquire_global_lock(&pMac->sme);
 	if (QDF_IS_STATUS_SUCCESS(status)) {
 		/* serialize the req through MC thread */
-		cdf_mem_copy(MsgPtr, wlanAppType1Params, sizeof(*MsgPtr));
+		qdf_mem_copy(MsgPtr, wlanAppType1Params, sizeof(*MsgPtr));
 		cds_message.bodyptr = MsgPtr;
 		cds_message.type = WMA_WLAN_SET_APP_TYPE1_PARAMS;
 		qdf_status = cds_mq_post_message(CDS_MQ_ID_WMA, &cds_message);
 		if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
-			cdf_mem_free(MsgPtr);
+			qdf_mem_free(MsgPtr);
 			status = QDF_STATUS_E_FAILURE;
 		}
 		sme_release_global_lock(&pMac->sme);
 	} else {
-		cdf_mem_free(MsgPtr);
+		qdf_mem_free(MsgPtr);
 	}
 
 	return status;
@@ -6693,7 +6693,7 @@
 	QDF_STATUS qdf_status = QDF_STATUS_SUCCESS;
 	tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
 	cds_msg_t cds_message;
-	tpSirAppType2Params MsgPtr = cdf_mem_malloc(sizeof(*MsgPtr));
+	tpSirAppType2Params MsgPtr = qdf_mem_malloc(sizeof(*MsgPtr));
 
 	if (!MsgPtr)
 		return QDF_STATUS_E_NOMEM;
@@ -6705,17 +6705,17 @@
 	status = sme_acquire_global_lock(&pMac->sme);
 	if (QDF_IS_STATUS_SUCCESS(status)) {
 		/* serialize the req through MC thread */
-		cdf_mem_copy(MsgPtr, wlanAppType2Params, sizeof(*MsgPtr));
+		qdf_mem_copy(MsgPtr, wlanAppType2Params, sizeof(*MsgPtr));
 		cds_message.bodyptr = MsgPtr;
 		cds_message.type = WMA_WLAN_SET_APP_TYPE2_PARAMS;
 		qdf_status = cds_mq_post_message(CDS_MQ_ID_WMA, &cds_message);
 		if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
-			cdf_mem_free(MsgPtr);
+			qdf_mem_free(MsgPtr);
 			status = QDF_STATUS_E_FAILURE;
 		}
 		sme_release_global_lock(&pMac->sme);
 	} else {
-		cdf_mem_free(MsgPtr);
+		qdf_mem_free(MsgPtr);
 	}
 
 	return status;
@@ -6899,7 +6899,7 @@
 	if (pPrefNetworkFoundInd->ssId.length > 0) {
 		ssIdLength = CSR_MIN(SIR_MAC_MAX_SSID_LENGTH,
 				     pPrefNetworkFoundInd->ssId.length);
-		cdf_mem_copy(dumpSsId, pPrefNetworkFoundInd->ssId.ssId,
+		qdf_mem_copy(dumpSsId, pPrefNetworkFoundInd->ssId.ssId,
 			     ssIdLength);
 		dumpSsId[ssIdLength] = 0;
 		sms_log(pMac, LOG2, "%s:SSID=%s frame length %d",
@@ -6995,8 +6995,8 @@
 	 * if the reset Supplicant country code command is triggered,
 	 * enable 11D, reset the country code and return
 	 */
-	if (true ==
-	    cdf_mem_compare(pMsg->countryCode, SME_INVALID_COUNTRY_CODE, 2)) {
+	if (true !=
+	    qdf_mem_cmp(pMsg->countryCode, SME_INVALID_COUNTRY_CODE, 2)) {
 		pMac->roam.configParam.Is11dSupportEnabled =
 			pMac->roam.configParam.Is11dSupportEnabledOriginal;
 
@@ -7004,7 +7004,7 @@
 
 		/* read the country code and use it */
 		if (QDF_IS_STATUS_SUCCESS(qdf_status)) {
-			cdf_mem_copy(pMsg->countryCode,
+			qdf_mem_copy(pMsg->countryCode,
 				     default_country,
 				     WNI_CFG_COUNTRY_CODE_LEN);
 		} else {
@@ -7019,7 +7019,7 @@
 		sms_log(pMac, LOG1,
 			FL("Set default country code (%c%c) as invalid country received"),
 			pMsg->countryCode[0], pMsg->countryCode[1]);
-			cdf_mem_copy(pMac->scan.countryCode11d,
+			qdf_mem_copy(pMac->scan.countryCode11d,
 			pMsg->countryCode,
 			WNI_CFG_COUNTRY_CODE_LEN);
 	} else {
@@ -7044,7 +7044,7 @@
 	}
 
 	/* overwrite the defualt country code */
-	cdf_mem_copy(pMac->scan.countryCodeDefault,
+	qdf_mem_copy(pMac->scan.countryCodeDefault,
 		     pMac->scan.countryCodeCurrent, WNI_CFG_COUNTRY_CODE_LEN);
 
 	/* Get Domain ID from country code */
@@ -7076,9 +7076,9 @@
 			sms_log(pMac, LOGW,
 				FL
 					("Clearing currentCountryBssid, countryCode11d"));
-			cdf_mem_zero(&pMac->scan.currentCountryBssid,
+			qdf_mem_zero(&pMac->scan.currentCountryBssid,
 				     sizeof(struct qdf_mac_addr));
-			cdf_mem_zero(pMac->scan.countryCode11d,
+			qdf_mem_zero(pMac->scan.countryCode11d,
 				     sizeof(pMac->scan.countryCode11d));
 		}
 	}
@@ -7153,12 +7153,12 @@
 	/* if Supplicant country code has priority, disable 11d */
 	if (!is_11d_country && supplicant_priority)
 		mac_ctx->roam.configParam.Is11dSupportEnabled = false;
-	cdf_mem_copy(mac_ctx->scan.countryCodeCurrent, msg->countryCode,
+	qdf_mem_copy(mac_ctx->scan.countryCodeCurrent, msg->countryCode,
 		     WNI_CFG_COUNTRY_CODE_LEN);
 	status = wma_set_reg_domain(mac_ctx, reg_domain_id);
 	if (false == is_11d_country) {
 		/* overwrite the defualt country code */
-		cdf_mem_copy(mac_ctx->scan.countryCodeDefault,
+		qdf_mem_copy(mac_ctx->scan.countryCodeDefault,
 			     mac_ctx->scan.countryCodeCurrent,
 			     WNI_CFG_COUNTRY_CODE_LEN);
 		/* set to default domain ID */
@@ -7176,9 +7176,9 @@
 		if (!supplicant_priority && (false == is_11d_country)) {
 			sms_log(mac_ctx, LOGW,
 				FL("Clearing currentCountryBssid, countryCode11d"));
-			cdf_mem_zero(&mac_ctx->scan.currentCountryBssid,
+			qdf_mem_zero(&mac_ctx->scan.currentCountryBssid,
 				     sizeof(struct qdf_mac_addr));
-			cdf_mem_zero(mac_ctx->scan.countryCode11d,
+			qdf_mem_zero(mac_ctx->scan.countryCode11d,
 				     sizeof(mac_ctx->scan.countryCode11d));
 		}
 	}
@@ -7288,7 +7288,7 @@
 		return QDF_STATUS_E_FAILURE;
 	}
 
-	request_buf = cdf_mem_malloc(sizeof(tSirRcvFltMcAddrList));
+	request_buf = qdf_mem_malloc(sizeof(tSirRcvFltMcAddrList));
 	if (NULL == request_buf) {
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 			  "%s: Not able to "
@@ -7301,11 +7301,11 @@
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 			  "%s: Ignoring the "
 			  "indication as we are not connected", __func__);
-		cdf_mem_free(request_buf);
+		qdf_mem_free(request_buf);
 		return QDF_STATUS_E_FAILURE;
 	}
 
-	cdf_mem_copy(request_buf, pMulticastAddrs,
+	qdf_mem_copy(request_buf, pMulticastAddrs,
 		     sizeof(tSirRcvFltMcAddrList));
 
 	qdf_copy_macaddr(&request_buf->self_macaddr, &pSession->selfMacAddr);
@@ -7320,7 +7320,7 @@
 			  "%s: Not able to "
 			  "post WMA_8023_MULTICAST_LIST message to WMA",
 			  __func__);
-		cdf_mem_free(request_buf);
+		qdf_mem_free(request_buf);
 		return QDF_STATUS_E_FAILURE;
 	}
 
@@ -7344,7 +7344,7 @@
 
 	allocSize = sizeof(tSirRcvPktFilterCfgType);
 
-	request_buf = cdf_mem_malloc(allocSize);
+	request_buf = qdf_mem_malloc(allocSize);
 
 	if (NULL == request_buf) {
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
@@ -7357,7 +7357,7 @@
 	if (NULL == pSession) {
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 			  "%s: Session Not found ", __func__);
-		cdf_mem_free(request_buf);
+		qdf_mem_free(request_buf);
 		return QDF_STATUS_E_FAILURE;
 	}
 
@@ -7365,7 +7365,7 @@
 			 &pSession->selfMacAddr);
 	qdf_copy_macaddr(&pRcvPktFilterCfg->bssid,
 			 &pSession->connectedProfile.bssid);
-	cdf_mem_copy(request_buf, pRcvPktFilterCfg, allocSize);
+	qdf_mem_copy(request_buf, pRcvPktFilterCfg, allocSize);
 
 	msg.type = WMA_RECEIVE_FILTER_SET_FILTER_REQ;
 	msg.reserved = 0;
@@ -7416,7 +7416,7 @@
 			  "%s: Not able to post "
 			  "WMA_RECEIVE_FILTER_SET_FILTER message to WMA",
 			  __func__);
-		cdf_mem_free(request_buf);
+		qdf_mem_free(request_buf);
 		return QDF_STATUS_E_FAILURE;
 	}
 
@@ -7441,7 +7441,7 @@
 		return QDF_STATUS_E_FAILURE;
 	}
 
-	request_buf = cdf_mem_malloc(sizeof(tSirRcvFltPktClearParam));
+	request_buf = qdf_mem_malloc(sizeof(tSirRcvFltPktClearParam));
 	if (NULL == request_buf) {
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 			  "%s: Not able to allocate memory for Receive Filter "
@@ -7454,7 +7454,7 @@
 	qdf_copy_macaddr(&pRcvFltPktClearParam->bssid,
 			 &pSession->connectedProfile.bssid);
 
-	cdf_mem_copy(request_buf, pRcvFltPktClearParam,
+	qdf_mem_copy(request_buf, pRcvFltPktClearParam,
 		     sizeof(tSirRcvFltPktClearParam));
 
 	msg.type = WMA_RECEIVE_FILTER_CLEAR_FILTER_REQ;
@@ -7465,7 +7465,7 @@
 			  "%s: Not able to post "
 			  "WMA_RECEIVE_FILTER_CLEAR_FILTER message to WMA",
 			  __func__);
-		cdf_mem_free(request_buf);
+		qdf_mem_free(request_buf);
 		return QDF_STATUS_E_FAILURE;
 	}
 
@@ -7561,7 +7561,7 @@
 	tpMaxTxPowerPerBandParams pMaxTxPowerPerBandParams = NULL;
 
 	pMaxTxPowerPerBandParams =
-		cdf_mem_malloc(sizeof(tMaxTxPowerPerBandParams));
+		qdf_mem_malloc(sizeof(tMaxTxPowerPerBandParams));
 	if (NULL == pMaxTxPowerPerBandParams) {
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 			  "%s:Not able to allocate memory for pMaxTxPowerPerBandParams",
@@ -7580,7 +7580,7 @@
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 			  "%s:Not able to post WMA_SET_MAX_TX_POWER_PER_BAND_REQ",
 			  __func__);
-		cdf_mem_free(pMaxTxPowerPerBandParams);
+		qdf_mem_free(pMaxTxPowerPerBandParams);
 		return QDF_STATUS_E_FAILURE;
 	}
 
@@ -7609,7 +7609,7 @@
 
 	MTRACE(qdf_trace(QDF_MODULE_ID_SME,
 			 TRACE_CODE_SME_RX_HDD_SET_MAXTXPOW, NO_SESSION, 0));
-	pMaxTxParams = cdf_mem_malloc(sizeof(tMaxTxPowerParams));
+	pMaxTxParams = qdf_mem_malloc(sizeof(tMaxTxPowerParams));
 	if (NULL == pMaxTxParams) {
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 			  "%s: Not able to allocate memory for pMaxTxParams",
@@ -7629,7 +7629,7 @@
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 			  "%s: Not able to post WMA_SET_MAX_TX_POWER_REQ message to WMA",
 			  __func__);
-		cdf_mem_free(pMaxTxParams);
+		qdf_mem_free(pMaxTxParams);
 		return QDF_STATUS_E_FAILURE;
 	}
 
@@ -7651,14 +7651,14 @@
 	cds_msg_t msg;
 	tSirMacAddr *pBaseMacAddr;
 
-	pBaseMacAddr = cdf_mem_malloc(sizeof(tSirMacAddr));
+	pBaseMacAddr = qdf_mem_malloc(sizeof(tSirMacAddr));
 	if (NULL == pBaseMacAddr) {
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 			  FL("Not able to allocate memory for pBaseMacAddr"));
 		return QDF_STATUS_E_NOMEM;
 	}
 
-	cdf_mem_copy(*pBaseMacAddr, customMacAddr, sizeof(tSirMacAddr));
+	qdf_mem_copy(*pBaseMacAddr, customMacAddr, sizeof(tSirMacAddr));
 
 	msg.type = SIR_HAL_SET_BASE_MACADDR_IND;
 	msg.reserved = 0;
@@ -7668,7 +7668,7 @@
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 			  FL
 				  ("Not able to post SIR_HAL_SET_BASE_MACADDR_IND message to WMA"));
-		cdf_mem_free(pBaseMacAddr);
+		qdf_mem_free(pBaseMacAddr);
 		return QDF_STATUS_E_FAILURE;
 	}
 
@@ -7703,7 +7703,7 @@
 		return QDF_STATUS_E_FAILURE;
 	}
 
-	pTxParams = cdf_mem_malloc(sizeof(tMaxTxPowerParams));
+	pTxParams = qdf_mem_malloc(sizeof(tMaxTxPowerParams));
 	if (NULL == pTxParams) {
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 			  "%s: Not able to allocate memory for pTxParams",
@@ -7722,7 +7722,7 @@
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 			  "%s: failed to post WMA_SET_TX_POWER_REQ to WMA",
 			  __func__);
-		cdf_mem_free(pTxParams);
+		qdf_mem_free(pTxParams);
 		return QDF_STATUS_E_FAILURE;
 	}
 
@@ -7765,11 +7765,11 @@
 
 		/* Create the message and send to lim */
 		len = sizeof(tSirUpdateParams);
-		pMsg = cdf_mem_malloc(len);
+		pMsg = qdf_mem_malloc(len);
 		if (NULL == pMsg)
 			status = QDF_STATUS_E_NOMEM;
 		else {
-			cdf_mem_set(pMsg, sizeof(tSirUpdateParams), 0);
+			qdf_mem_set(pMsg, sizeof(tSirUpdateParams), 0);
 			pMsg->messageType = eWNI_SME_HIDE_SSID_REQ;
 			pMsg->length = len;
 			/* Data starts from here */
@@ -7805,7 +7805,7 @@
 	if (QDF_IS_STATUS_SUCCESS(status)) {
 		setTmLevelReq =
 			(tAniSetTmLevelReq *)
-			cdf_mem_malloc(sizeof(tAniSetTmLevelReq));
+			qdf_mem_malloc(sizeof(tAniSetTmLevelReq));
 		if (NULL == setTmLevelReq) {
 			QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 				  "%s: Not able to allocate memory for sme_set_tm_level",
@@ -7824,7 +7824,7 @@
 		if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
 			QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 				  "%s: Post Set TM Level MSG fail", __func__);
-			cdf_mem_free(setTmLevelReq);
+			qdf_mem_free(setTmLevelReq);
 			status = QDF_STATUS_E_FAILURE;
 		}
 		sme_release_global_lock(&pMac->sme);
@@ -9636,7 +9636,7 @@
 			 sessionId, statusCode));
 	status = sme_acquire_global_lock(&pMac->sme);
 	if (QDF_IS_STATUS_SUCCESS(status)) {
-		cdf_mem_copy(sendTdlsReq.peerMac, peerMac, sizeof(tSirMacAddr));
+		qdf_mem_copy(sendTdlsReq.peerMac, peerMac, sizeof(tSirMacAddr));
 		sendTdlsReq.frameType = frame_type;
 		sendTdlsReq.buf = buf;
 		sendTdlsReq.len = len;
@@ -9833,7 +9833,7 @@
 	status = sme_acquire_global_lock(&pMac->sme);
 	if (!QDF_IS_STATUS_SUCCESS(status))
 		return status;
-	pTdlsPeerStateParams = cdf_mem_malloc(sizeof(*pTdlsPeerStateParams));
+	pTdlsPeerStateParams = qdf_mem_malloc(sizeof(*pTdlsPeerStateParams));
 	if (NULL == pTdlsPeerStateParams) {
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 			FL("failed to allocate mem for tdls peer state param"));
@@ -9841,8 +9841,8 @@
 		return QDF_STATUS_E_NOMEM;
 	}
 
-	cdf_mem_zero(pTdlsPeerStateParams, sizeof(*pTdlsPeerStateParams));
-	cdf_mem_copy(&pTdlsPeerStateParams->peerMacAddr,
+	qdf_mem_zero(pTdlsPeerStateParams, sizeof(*pTdlsPeerStateParams));
+	qdf_mem_copy(&pTdlsPeerStateParams->peerMacAddr,
 			&peerStateParams->peerMacAddr, sizeof(tSirMacAddr));
 	pTdlsPeerStateParams->vdevId = peerStateParams->vdevId;
 	pTdlsPeerStateParams->peerState = peerStateParams->peerState;
@@ -9875,7 +9875,7 @@
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 			FL("invalid peer state param (%d)"),
 			peerStateParams->peerState);
-		cdf_mem_free(pTdlsPeerStateParams);
+		qdf_mem_free(pTdlsPeerStateParams);
 		sme_release_global_lock(&pMac->sme);
 		return QDF_STATUS_E_FAILURE;
 	}
@@ -9933,7 +9933,7 @@
 
 	qdf_status = cds_mq_post_message(CDS_MQ_ID_WMA, &cds_message);
 	if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
-		cdf_mem_free(pTdlsPeerStateParams);
+		qdf_mem_free(pTdlsPeerStateParams);
 		status = QDF_STATUS_E_FAILURE;
 	}
 	sme_release_global_lock(&pMac->sme);
@@ -9964,14 +9964,14 @@
 	status = sme_acquire_global_lock(&mac->sme);
 	if (QDF_STATUS_SUCCESS != status)
 		return status;
-	chan_switch_params = cdf_mem_malloc(sizeof(*chan_switch_params));
+	chan_switch_params = qdf_mem_malloc(sizeof(*chan_switch_params));
 	if (NULL == chan_switch_params) {
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 			FL("fail to alloc mem for tdls chan switch param"));
 		sme_release_global_lock(&mac->sme);
 		return QDF_STATUS_E_FAILURE;
 	}
-	cdf_mem_zero(chan_switch_params, sizeof(*chan_switch_params));
+	qdf_mem_zero(chan_switch_params, sizeof(*chan_switch_params));
 
 	switch (ch_switch_params->tdls_off_ch_mode) {
 	case ENABLE_CHANSWITCH:
@@ -9986,12 +9986,12 @@
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 			FL("invalid off channel command (%d)"),
 			ch_switch_params->tdls_off_ch_mode);
-		cdf_mem_free(chan_switch_params);
+		qdf_mem_free(chan_switch_params);
 		sme_release_global_lock(&mac->sme);
 		return QDF_STATUS_E_FAILURE;
 	}
 
-	cdf_mem_copy(&chan_switch_params->peer_mac_addr,
+	qdf_mem_copy(&chan_switch_params->peer_mac_addr,
 		&ch_switch_params->peer_mac_addr, sizeof(tSirMacAddr));
 	chan_switch_params->vdev_id = ch_switch_params->vdev_id;
 	chan_switch_params->tdls_off_ch = ch_switch_params->tdls_off_channel;
@@ -10015,7 +10015,7 @@
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 			FL("Message Post failed status=%d"),
 			qdf_status);
-		cdf_mem_free(chan_switch_params);
+		qdf_mem_free(chan_switch_params);
 		status = QDF_STATUS_E_FAILURE;
 	}
 	sme_release_global_lock(&mac->sme);
@@ -10346,7 +10346,7 @@
 
 	status = sme_acquire_global_lock(&pMac->sme);
 	if (QDF_STATUS_SUCCESS == status) {
-		request_buf = cdf_mem_malloc(sizeof(*request_buf));
+		request_buf = qdf_mem_malloc(sizeof(*request_buf));
 		if (NULL == request_buf) {
 			QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 					FL("Not able to allocate memory for \
@@ -10367,7 +10367,7 @@
 			QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 					FL("Not able to post WMA_IPA_OFFLOAD_\
 					ENABLE_DISABLE message to WMA"));
-			cdf_mem_free(request_buf);
+			qdf_mem_free(request_buf);
 			sme_release_global_lock(&pMac->sme);
 			return QDF_STATUS_E_FAILURE;
 		}
@@ -10485,7 +10485,7 @@
 
 	sms_log(mac, LOG1, FL("enter"));
 
-	req_msg = cdf_mem_malloc(sizeof(*req_msg));
+	req_msg = qdf_mem_malloc(sizeof(*req_msg));
 	if (!req_msg) {
 		sms_log(mac, LOGE, FL("memory allocation failed"));
 		return QDF_STATUS_E_NOMEM;
@@ -10498,7 +10498,7 @@
 		sms_log(mac, LOGE,
 			FL("sme_acquire_global_lock failed!(status=%d)"),
 			status);
-		cdf_mem_free(req_msg);
+		qdf_mem_free(req_msg);
 		return status;
 	}
 
@@ -10510,7 +10510,7 @@
 		sms_log(mac, LOGE,
 			FL("cds_mq_post_message failed!(err=%d)"),
 			status);
-		cdf_mem_free(req_msg);
+		qdf_mem_free(req_msg);
 	}
 	sme_release_global_lock(&mac->sme);
 	return status;
@@ -10534,7 +10534,7 @@
 
 	sms_log(mac, LOG1, FL("enter"));
 
-	req_msg = cdf_mem_malloc(sizeof(*req_msg));
+	req_msg = qdf_mem_malloc(sizeof(*req_msg));
 	if (!req_msg) {
 		sms_log(mac, LOGE, FL("memory allocation failed"));
 		return QDF_STATUS_E_NOMEM;
@@ -10547,7 +10547,7 @@
 		sms_log(mac, LOGE,
 			FL("sme_acquire_global_lock failed!(status=%d)"),
 			status);
-		cdf_mem_free(req_msg);
+		qdf_mem_free(req_msg);
 		return status;
 	}
 
@@ -10559,7 +10559,7 @@
 		sms_log(mac, LOGE,
 			FL("cds_mq_post_message failed!(err=%d)"),
 			status);
-		cdf_mem_free(req_msg);
+		qdf_mem_free(req_msg);
 	}
 	sme_release_global_lock(&mac->sme);
 	return status;
@@ -10629,7 +10629,7 @@
 		src->dcc_ndl_chan_list_len +
 		src->dcc_ndl_active_state_list_len;
 
-	dst = cdf_mem_malloc(length);
+	dst = qdf_mem_malloc(length);
 	if (!dst)
 		return NULL;
 
@@ -10639,19 +10639,19 @@
 	cursor += sizeof(*dst);
 	dst->channels = cursor;
 	cursor += src->channel_count * sizeof(*src->channels);
-	cdf_mem_copy(dst->channels, src->channels,
+	qdf_mem_copy(dst->channels, src->channels,
 		     src->channel_count * sizeof(*src->channels));
 	dst->schedule = cursor;
 	cursor += src->schedule_size * sizeof(*src->schedule);
-	cdf_mem_copy(dst->schedule, src->schedule,
+	qdf_mem_copy(dst->schedule, src->schedule,
 		     src->schedule_size * sizeof(*src->schedule));
 	dst->dcc_ndl_chan_list = cursor;
 	cursor += src->dcc_ndl_chan_list_len;
-	cdf_mem_copy(dst->dcc_ndl_chan_list, src->dcc_ndl_chan_list,
+	qdf_mem_copy(dst->dcc_ndl_chan_list, src->dcc_ndl_chan_list,
 		     src->dcc_ndl_chan_list_len);
 	dst->dcc_ndl_active_state_list = cursor;
 	cursor += src->dcc_ndl_active_state_list_len;
-	cdf_mem_copy(dst->dcc_ndl_active_state_list,
+	qdf_mem_copy(dst->dcc_ndl_active_state_list,
 		     src->dcc_ndl_active_state_list,
 		     src->dcc_ndl_active_state_list_len);
 	return dst;
@@ -10709,7 +10709,7 @@
 		      FL("Error posting message to WDA: %d"), status);
 		pMac->sme.ocb_set_config_callback = callback;
 		pMac->sme.ocb_set_config_context = context;
-		cdf_mem_free(msg_body);
+		qdf_mem_free(msg_body);
 		goto end;
 	}
 
@@ -10738,7 +10738,7 @@
 	if (!QDF_IS_STATUS_SUCCESS(status))
 		return status;
 
-	sme_utc = cdf_mem_malloc(sizeof(*sme_utc));
+	sme_utc = qdf_mem_malloc(sizeof(*sme_utc));
 	if (!sme_utc) {
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 			  FL("Malloc failed"));
@@ -10754,7 +10754,7 @@
 	if (!QDF_IS_STATUS_SUCCESS(status)) {
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 			  FL("Not able to post message to WDA"));
-		cdf_mem_free(utc);
+		qdf_mem_free(utc);
 		goto end;
 	}
 
@@ -10785,7 +10785,7 @@
 	if (!QDF_IS_STATUS_SUCCESS(status))
 		return status;
 
-	buf = cdf_mem_malloc(sizeof(*sme_timing_advert) +
+	buf = qdf_mem_malloc(sizeof(*sme_timing_advert) +
 			     timing_advert->template_length);
 	if (!buf) {
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
@@ -10797,7 +10797,7 @@
 	sme_timing_advert = (struct sir_ocb_timing_advert *)buf;
 	*sme_timing_advert = *timing_advert;
 	sme_timing_advert->template_value = buf + sizeof(*sme_timing_advert);
-	cdf_mem_copy(sme_timing_advert->template_value,
+	qdf_mem_copy(sme_timing_advert->template_value,
 	timing_advert->template_value, timing_advert->template_length);
 
 	msg.type = WMA_OCB_START_TIMING_ADVERT_CMD;
@@ -10836,7 +10836,7 @@
 	if (!QDF_IS_STATUS_SUCCESS(status))
 		return status;
 
-	sme_timing_advert = cdf_mem_malloc(sizeof(*timing_advert));
+	sme_timing_advert = qdf_mem_malloc(sizeof(*timing_advert));
 	if (!sme_timing_advert) {
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 			  FL("Not able to allocate memory for stop TA"));
@@ -10908,7 +10908,7 @@
 		return status;
 
 	/* Allocate memory for the WMI request, and copy the parameter */
-	msg_body = cdf_mem_malloc(sizeof(*msg_body));
+	msg_body = qdf_mem_malloc(sizeof(*msg_body));
 	if (!msg_body) {
 		status = QDF_STATUS_E_NOMEM;
 		goto end;
@@ -10929,7 +10929,7 @@
 			  FL("Error posting message to WDA: %d"), status);
 		pMac->sme.ocb_get_tsf_timer_callback = NULL;
 		pMac->sme.ocb_get_tsf_timer_context = NULL;
-		cdf_mem_free(msg_body);
+		qdf_mem_free(msg_body);
 		goto end;
 	}
 
@@ -10963,7 +10963,7 @@
 		return status;
 
 	/* Allocate memory for the WMI request, and copy the parameter */
-	msg_body = cdf_mem_malloc(sizeof(*msg_body) +
+	msg_body = qdf_mem_malloc(sizeof(*msg_body) +
 				  request->request_array_len);
 	if (!msg_body) {
 		status = QDF_STATUS_E_NOMEM;
@@ -10971,7 +10971,7 @@
 	}
 	*msg_body = *request;
 	msg_body->request_array = (void *)msg_body + sizeof(*msg_body);
-	cdf_mem_copy(msg_body->request_array, request->request_array,
+	qdf_mem_copy(msg_body->request_array, request->request_array,
 		     request->request_array_len);
 
 	msg.type = WMA_DCC_GET_STATS_CMD;
@@ -10987,7 +10987,7 @@
 			  FL("Error posting message to WDA: %d"), status);
 		pMac->sme.dcc_get_stats_callback = callback;
 		pMac->sme.dcc_get_stats_context = context;
-		cdf_mem_free(msg_body);
+		qdf_mem_free(msg_body);
 		goto end;
 	}
 
@@ -11018,7 +11018,7 @@
 	if (!QDF_IS_STATUS_SUCCESS(status))
 		return status;
 
-	request = cdf_mem_malloc(sizeof(struct sir_dcc_clear_stats));
+	request = qdf_mem_malloc(sizeof(struct sir_dcc_clear_stats));
 	if (!request) {
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 			  FL("Not able to allocate memory"));
@@ -11026,7 +11026,7 @@
 		goto end;
 	}
 
-	cdf_mem_zero(request, sizeof(*request));
+	qdf_mem_zero(request, sizeof(*request));
 	request->vdev_id = vdev_id;
 	request->dcc_stats_bitmap = dcc_stats_bitmap;
 
@@ -11037,7 +11037,7 @@
 	if (!QDF_IS_STATUS_SUCCESS(status)) {
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 			  FL("Not able to post msg to WDA"));
-		cdf_mem_free(request);
+		qdf_mem_free(request);
 		goto end;
 	}
 
@@ -11071,7 +11071,7 @@
 		return status;
 
 	/* Allocate memory for the WMI request, and copy the parameter */
-	msg_body = cdf_mem_malloc(sizeof(*msg_body) +
+	msg_body = qdf_mem_malloc(sizeof(*msg_body) +
 				  request->dcc_ndl_chan_list_len +
 				  request->dcc_ndl_active_state_list_len);
 	if (!msg_body) {
@@ -11086,9 +11086,9 @@
 	msg_body->dcc_ndl_chan_list = (void *)msg_body + sizeof(*msg_body);
 	msg_body->dcc_ndl_active_state_list = msg_body->dcc_ndl_chan_list +
 		request->dcc_ndl_chan_list_len;
-	cdf_mem_copy(msg_body->dcc_ndl_chan_list, request->dcc_ndl_chan_list,
+	qdf_mem_copy(msg_body->dcc_ndl_chan_list, request->dcc_ndl_chan_list,
 		     request->dcc_ndl_active_state_list_len);
-	cdf_mem_copy(msg_body->dcc_ndl_active_state_list,
+	qdf_mem_copy(msg_body->dcc_ndl_active_state_list,
 		     request->dcc_ndl_active_state_list,
 		     request->dcc_ndl_active_state_list_len);
 
@@ -11105,7 +11105,7 @@
 			  FL("Error posting message to WDA: %d"), status);
 		pMac->sme.dcc_update_ndl_callback = NULL;
 		pMac->sme.dcc_update_ndl_context = NULL;
-		cdf_mem_free(msg_body);
+		qdf_mem_free(msg_body);
 		goto end;
 	}
 
@@ -11236,7 +11236,7 @@
 		return QDF_STATUS_E_FAILURE;
 	}
 
-	request_buf = cdf_mem_malloc(sizeof(tSirModemPowerStateInd));
+	request_buf = qdf_mem_malloc(sizeof(tSirModemPowerStateInd));
 	if (NULL == request_buf) {
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 			  "%s: Not able to allocate memory for MODEM POWER STATE IND",
@@ -11254,7 +11254,7 @@
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 			  "%s: Not able to post WMA_MODEM_POWER_STATE_IND message"
 			  " to WMA", __func__);
-		cdf_mem_free(request_buf);
+		qdf_mem_free(request_buf);
 		return QDF_STATUS_E_FAILURE;
 	}
 
@@ -11275,7 +11275,7 @@
 		return QDF_STATUS_E_FAILURE;
 	}
 
-	pHtOpMode = cdf_mem_malloc(sizeof(tUpdateVHTOpMode));
+	pHtOpMode = qdf_mem_malloc(sizeof(tUpdateVHTOpMode));
 	if (NULL == pHtOpMode) {
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 			  "%s: Not able to allocate memory for setting OP mode",
@@ -11300,7 +11300,7 @@
 	}
 
 	pHtOpMode->staId = staId,
-	cdf_mem_copy(pHtOpMode->peer_mac, macAddrSTA.bytes,
+	qdf_mem_copy(pHtOpMode->peer_mac, macAddrSTA.bytes,
 		     sizeof(tSirMacAddr));
 	pHtOpMode->smesessionId = sessionId;
 
@@ -11312,7 +11312,7 @@
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 			  "%s: Not able to post WMA_UPDATE_OP_MODE message"
 			  " to WMA", __func__);
-		cdf_mem_free(pHtOpMode);
+		qdf_mem_free(pHtOpMode);
 		return QDF_STATUS_E_FAILURE;
 	}
 
@@ -11508,7 +11508,7 @@
 	tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
 	QDF_STATUS status;
 	cds_msg_t msg;
-	tSirRateUpdateInd *rate_upd = cdf_mem_malloc(sizeof(tSirRateUpdateInd));
+	tSirRateUpdateInd *rate_upd = qdf_mem_malloc(sizeof(tSirRateUpdateInd));
 
 	if (rate_upd == NULL) {
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
@@ -11538,7 +11538,7 @@
 				  __func__);
 
 			sme_release_global_lock(&pMac->sme);
-			cdf_mem_free(rate_upd);
+			qdf_mem_free(rate_upd);
 			return QDF_STATUS_E_FAILURE;
 		}
 
@@ -11637,7 +11637,7 @@
 	status = sme_acquire_global_lock(&pMac->sme);
 	if (QDF_STATUS_SUCCESS == status) {
 		auto_sh_cmd = (tSirAutoShutdownCmdParams *)
-			      cdf_mem_malloc(sizeof(tSirAutoShutdownCmdParams));
+			      qdf_mem_malloc(sizeof(tSirAutoShutdownCmdParams));
 		if (auto_sh_cmd == NULL) {
 			QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR,
 				  "%s Request Buffer Alloc Fail", __func__);
@@ -11654,7 +11654,7 @@
 		if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
 			QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 				  "%s: Post Auto shutdown MSG fail", __func__);
-			cdf_mem_free(auto_sh_cmd);
+			qdf_mem_free(auto_sh_cmd);
 			sme_release_global_lock(&pMac->sme);
 			return QDF_STATUS_E_FAILURE;
 		}
@@ -11715,7 +11715,7 @@
 	status = sme_acquire_global_lock(&pMac->sme);
 	if (QDF_STATUS_SUCCESS == status) {
 		cauReq = (tSirChAvoidUpdateReq *)
-			 cdf_mem_malloc(sizeof(tSirChAvoidUpdateReq));
+			 qdf_mem_malloc(sizeof(tSirChAvoidUpdateReq));
 		if (NULL == cauReq) {
 			QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR,
 				  "%s Request Buffer Alloc Fail", __func__);
@@ -11733,7 +11733,7 @@
 			QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 				  "%s: Post Ch Avoid Update MSG fail",
 				  __func__);
-			cdf_mem_free(cauReq);
+			qdf_mem_free(cauReq);
 			sme_release_global_lock(&pMac->sme);
 			return QDF_STATUS_E_FAILURE;
 		}
@@ -11763,7 +11763,7 @@
 	uint32_t *val;
 	tpAniSirGlobal mac_ptr = PMAC_STRUCT(hal);
 
-	val = cdf_mem_malloc(sizeof(*val));
+	val = qdf_mem_malloc(sizeof(*val));
 	if (NULL == val || NULL == mac_ptr) {
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 				"%s: Invalid pointer", __func__);
@@ -11781,7 +11781,7 @@
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 		    "%s: Not able to post WDA_SET_MAS_ENABLE_DISABLE to WMA!",
 		    __func__);
-		cdf_mem_free(val);
+		qdf_mem_free(val);
 		return QDF_STATUS_E_FAILURE;
 	}
 
@@ -11804,7 +11804,7 @@
 	cds_msg_t msg;
 	uint32_t *ptr_val;
 
-	ptr_val = cdf_mem_malloc(sizeof(*ptr_val));
+	ptr_val = qdf_mem_malloc(sizeof(*ptr_val));
 	if (NULL == ptr_val) {
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 				"%s: could not allocate ptr_val", __func__);
@@ -11822,7 +11822,7 @@
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 		    "%s: Not able to post WDA_SET_MAS_ENABLE_DISABLE to WMA!",
 		    __func__);
-		cdf_mem_free(ptr_val);
+		qdf_mem_free(ptr_val);
 		return QDF_STATUS_E_FAILURE;
 	}
 	return QDF_STATUS_SUCCESS;
@@ -11872,7 +11872,7 @@
 
 	proam_info.channelChangeRespEvent =
 		(tSirChanChangeResponse *)
-		cdf_mem_malloc(sizeof(tSirChanChangeResponse));
+		qdf_mem_malloc(sizeof(tSirChanChangeResponse));
 	if (NULL == proam_info.channelChangeRespEvent) {
 		status = QDF_STATUS_E_NOMEM;
 		sms_log(pMac, LOGE,
@@ -11910,7 +11910,7 @@
 		sms_log(pMac, LOGE, "Invalid Channel Change Resp Message: %d\n",
 			status);
 	}
-	cdf_mem_free(proam_info.channelChangeRespEvent);
+	qdf_mem_free(proam_info.channelChangeRespEvent);
 
 	return status;
 }
@@ -11976,14 +11976,14 @@
 	cds_msg_t msg;
 	tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
 
-	pWmaParam = (t_thermal_mgmt *) cdf_mem_malloc(sizeof(t_thermal_mgmt));
+	pWmaParam = (t_thermal_mgmt *) qdf_mem_malloc(sizeof(t_thermal_mgmt));
 	if (NULL == pWmaParam) {
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 			  "%s: could not allocate tThermalMgmt", __func__);
 		return QDF_STATUS_E_NOMEM;
 	}
 
-	cdf_mem_zero((void *)pWmaParam, sizeof(t_thermal_mgmt));
+	qdf_mem_zero((void *)pWmaParam, sizeof(t_thermal_mgmt));
 
 	pWmaParam->thermalMgmtEnabled = thermalParam.smeThermalMgmtEnabled;
 	pWmaParam->throttlePeriod = thermalParam.smeThrottlePeriod;
@@ -12013,14 +12013,14 @@
 			QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 				  "%s: Not able to post WMA_SET_THERMAL_INFO_CMD to WMA!",
 				  __func__);
-			cdf_mem_free(pWmaParam);
+			qdf_mem_free(pWmaParam);
 			sme_release_global_lock(&pMac->sme);
 			return QDF_STATUS_E_FAILURE;
 		}
 		sme_release_global_lock(&pMac->sme);
 		return QDF_STATUS_SUCCESS;
 	}
-	cdf_mem_free(pWmaParam);
+	qdf_mem_free(pWmaParam);
 	return QDF_STATUS_E_FAILURE;
 }
 
@@ -12055,7 +12055,7 @@
 	QDF_STATUS qdf_status = QDF_STATUS_SUCCESS;
 
 	if (QDF_STATUS_SUCCESS == sme_acquire_global_lock(&pMac->sme)) {
-		cdf_mem_set(&msg, sizeof(msg), 0);
+		qdf_mem_set(&msg, sizeof(msg), 0);
 		msg.type = WMA_SET_THERMAL_LEVEL;
 		msg.bodyval = level;
 
@@ -12088,7 +12088,7 @@
 	tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
 	tSirTxPowerLimit *tx_power_limit;
 
-	tx_power_limit = cdf_mem_malloc(sizeof(*tx_power_limit));
+	tx_power_limit = qdf_mem_malloc(sizeof(*tx_power_limit));
 	if (!tx_power_limit) {
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 			  "%s: Memory allocation for TxPowerLimit failed!",
@@ -12110,7 +12110,7 @@
 				  "%s: not able to post WMA_TX_POWER_LIMIT",
 				  __func__);
 			status = QDF_STATUS_E_FAILURE;
-			cdf_mem_free(tx_power_limit);
+			qdf_mem_free(tx_power_limit);
 		}
 		sme_release_global_lock(&pMac->sme);
 	}
@@ -12151,13 +12151,13 @@
 	tpDisableIntraBssFwd pSapDisableIntraFwd = NULL;
 
 	/* Prepare the request to send to SME. */
-	pSapDisableIntraFwd = cdf_mem_malloc(sizeof(tDisableIntraBssFwd));
+	pSapDisableIntraFwd = qdf_mem_malloc(sizeof(tDisableIntraBssFwd));
 	if (NULL == pSapDisableIntraFwd) {
 		sms_log(pMac, LOGP, "Memory Allocation Failure!!! %s", __func__);
 		return QDF_STATUS_E_NOMEM;
 	}
 
-	cdf_mem_zero(pSapDisableIntraFwd, sizeof(tDisableIntraBssFwd));
+	qdf_mem_zero(pSapDisableIntraFwd, sizeof(tDisableIntraBssFwd));
 
 	pSapDisableIntraFwd->sessionId = sessionId;
 	pSapDisableIntraFwd->disableintrabssfwd = disablefwd;
@@ -12170,7 +12170,7 @@
 		qdf_status = cds_mq_post_message(CDS_MQ_ID_WMA, &cds_message);
 		if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
 			status = QDF_STATUS_E_FAILURE;
-			cdf_mem_free(pSapDisableIntraFwd);
+			qdf_mem_free(pSapDisableIntraFwd);
 		}
 		sme_release_global_lock(&pMac->sme);
 	}
@@ -12214,17 +12214,17 @@
 	size_t data_len;
 
 	data_len = sizeof(tStatsExtRequest) + input->request_data_len;
-	data = cdf_mem_malloc(data_len);
+	data = qdf_mem_malloc(data_len);
 
 	if (data == NULL) {
 		return QDF_STATUS_E_NOMEM;
 	}
 
-	cdf_mem_zero(data, data_len);
+	qdf_mem_zero(data, data_len);
 	data->vdev_id = session_id;
 	data->request_data_len = input->request_data_len;
 	if (input->request_data_len) {
-		cdf_mem_copy(data->request_data,
+		qdf_mem_copy(data->request_data,
 			     input->request_data, input->request_data_len);
 	}
 
@@ -12236,7 +12236,7 @@
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 			  "%s: Not able to post WMA_STATS_EXT_REQUEST message to WMA",
 			  __func__);
-		cdf_mem_free(data);
+		qdf_mem_free(data);
 		return QDF_STATUS_E_FAILURE;
 	}
 
@@ -12903,13 +12903,13 @@
 	sms_log(mac, LOG1, FL("enter"));
 	len = sizeof(*req_msg) +
 		(input->num_networks * sizeof(struct wifi_epno_network));
-	req_msg = cdf_mem_malloc(len);
+	req_msg = qdf_mem_malloc(len);
 	if (!req_msg) {
-		sms_log(mac, LOGE, FL("cdf_mem_malloc failed"));
+		sms_log(mac, LOGE, FL("qdf_mem_malloc failed"));
 		return QDF_STATUS_E_NOMEM;
 	}
 
-	cdf_mem_zero(req_msg, len);
+	qdf_mem_zero(req_msg, len);
 	req_msg->num_networks = input->num_networks;
 	req_msg->request_id = input->request_id;
 	req_msg->session_id = input->session_id;
@@ -12921,7 +12921,7 @@
 				input->networks[i].auth_bit_field;
 		req_msg->networks[i].ssid.length =
 				input->networks[i].ssid.length;
-		cdf_mem_copy(req_msg->networks[i].ssid.ssId,
+		qdf_mem_copy(req_msg->networks[i].ssid.ssId,
 				input->networks[i].ssid.ssId,
 				req_msg->networks[i].ssid.length);
 	}
@@ -12931,7 +12931,7 @@
 		sms_log(mac, LOGE,
 			FL("sme_acquire_global_lock failed!(status=%d)"),
 			status);
-		cdf_mem_free(req_msg);
+		qdf_mem_free(req_msg);
 		return status;
 	}
 
@@ -12943,7 +12943,7 @@
 		sms_log(mac, LOGE,
 			FL("cds_mq_post_message failed!(err=%d)"),
 			status);
-		cdf_mem_free(req_msg);
+		qdf_mem_free(req_msg);
 		status = QDF_STATUS_E_FAILURE;
 	}
 	sme_release_global_lock(&mac->sme);
@@ -12972,26 +12972,26 @@
 	sms_log(mac, LOG1, FL("enter"));
 	len = sizeof(*req_msg) +
 		(input->num_networks * sizeof(struct wifi_passpoint_network));
-	req_msg = cdf_mem_malloc(len);
+	req_msg = qdf_mem_malloc(len);
 	if (!req_msg) {
-		sms_log(mac, LOGE, FL("cdf_mem_malloc failed"));
+		sms_log(mac, LOGE, FL("qdf_mem_malloc failed"));
 		return QDF_STATUS_E_NOMEM;
 	}
 
-	cdf_mem_zero(req_msg, len);
+	qdf_mem_zero(req_msg, len);
 	req_msg->num_networks = input->num_networks;
 	req_msg->request_id = input->request_id;
 	req_msg->session_id = input->session_id;
 	for (i = 0; i < req_msg->num_networks; i++) {
 		req_msg->networks[i].id =
 				input->networks[i].id;
-		cdf_mem_copy(req_msg->networks[i].realm,
+		qdf_mem_copy(req_msg->networks[i].realm,
 				input->networks[i].realm,
 				strlen(input->networks[i].realm) + 1);
-		cdf_mem_copy(req_msg->networks[i].plmn,
+		qdf_mem_copy(req_msg->networks[i].plmn,
 				input->networks[i].plmn,
 				SIR_PASSPOINT_PLMN_LEN);
-		cdf_mem_copy(req_msg->networks[i].roaming_consortium_ids,
+		qdf_mem_copy(req_msg->networks[i].roaming_consortium_ids,
 			     input->networks[i].roaming_consortium_ids,
 			sizeof(req_msg->networks[i].roaming_consortium_ids));
 	}
@@ -13001,7 +13001,7 @@
 		sms_log(mac, LOGE,
 			FL("sme_acquire_global_lock failed!(status=%d)"),
 			status);
-		cdf_mem_free(req_msg);
+		qdf_mem_free(req_msg);
 		return status;
 	}
 
@@ -13013,7 +13013,7 @@
 		sms_log(mac, LOGE,
 			FL("cds_mq_post_message failed!(err=%d)"),
 			status);
-		cdf_mem_free(req_msg);
+		qdf_mem_free(req_msg);
 		status = QDF_STATUS_E_FAILURE;
 	}
 	sme_release_global_lock(&mac->sme);
@@ -13036,13 +13036,13 @@
 	struct wifi_passpoint_req *req_msg;
 
 	sms_log(mac, LOG1, FL("enter"));
-	req_msg = cdf_mem_malloc(sizeof(*req_msg));
+	req_msg = qdf_mem_malloc(sizeof(*req_msg));
 	if (!req_msg) {
-		sms_log(mac, LOGE, FL("cdf_mem_malloc failed"));
+		sms_log(mac, LOGE, FL("qdf_mem_malloc failed"));
 		return QDF_STATUS_E_NOMEM;
 	}
 
-	cdf_mem_zero(req_msg, sizeof(*req_msg));
+	qdf_mem_zero(req_msg, sizeof(*req_msg));
 	req_msg->request_id = input->request_id;
 	req_msg->session_id = input->session_id;
 
@@ -13051,7 +13051,7 @@
 		sms_log(mac, LOGE,
 			FL("sme_acquire_global_lock failed!(status=%d)"),
 			status);
-		cdf_mem_free(req_msg);
+		qdf_mem_free(req_msg);
 		return status;
 	}
 
@@ -13063,7 +13063,7 @@
 		sms_log(mac, LOGE,
 			FL("cds_mq_post_message failed!(err=%d)"),
 			status);
-		cdf_mem_free(req_msg);
+		qdf_mem_free(req_msg);
 		status = QDF_STATUS_E_FAILURE;
 	}
 	sme_release_global_lock(&mac->sme);
@@ -13086,9 +13086,9 @@
 	cds_msg_t cds_message;
 	struct sir_set_ssid_hotlist_request *set_req;
 
-	set_req = cdf_mem_malloc(sizeof(*set_req));
+	set_req = qdf_mem_malloc(sizeof(*set_req));
 	if (!set_req) {
-		sms_log(mac, LOGE, FL("cdf_mem_malloc failed"));
+		sms_log(mac, LOGE, FL("qdf_mem_malloc failed"));
 		return QDF_STATUS_E_FAILURE;
 	}
 
@@ -13101,14 +13101,14 @@
 		status = cds_mq_post_message(CDS_MQ_ID_WMA, &cds_message);
 		sme_release_global_lock(&mac->sme);
 		if (!QDF_IS_STATUS_SUCCESS(status)) {
-			cdf_mem_free(set_req);
+			qdf_mem_free(set_req);
 			status = QDF_STATUS_E_FAILURE;
 		}
 	} else {
 		sms_log(mac, LOGE,
 			FL("sme_acquire_global_lock failed!(status=%d)"),
 			status);
-		cdf_mem_free(set_req);
+		qdf_mem_free(set_req);
 		status = QDF_STATUS_E_FAILURE;
 	}
 	return status;
@@ -13157,7 +13157,7 @@
 	QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_INFO,
 		  "stopReq = %u", pclearStatsReq->stopReq);
 
-	clear_stats_req = cdf_mem_malloc(sizeof(*clear_stats_req));
+	clear_stats_req = qdf_mem_malloc(sizeof(*clear_stats_req));
 
 	if (!clear_stats_req) {
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
@@ -13177,14 +13177,14 @@
 			QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 				  "%s: not able to post WMA_LL_STATS_CLEAR_REQ",
 				  __func__);
-			cdf_mem_free(clear_stats_req);
+			qdf_mem_free(clear_stats_req);
 			status = QDF_STATUS_E_FAILURE;
 		}
 		sme_release_global_lock(&pMac->sme);
 	} else {
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, "%s: "
 			  "sme_acquire_global_lock error", __func__);
-		cdf_mem_free(clear_stats_req);
+		qdf_mem_free(clear_stats_req);
 		status = QDF_STATUS_E_FAILURE;
 	}
 
@@ -13213,7 +13213,7 @@
 		  " Aggressive Stats Collections = %u",
 		  psetStatsReq->aggressiveStatisticsGathering);
 
-	set_stats_req = cdf_mem_malloc(sizeof(*set_stats_req));
+	set_stats_req = qdf_mem_malloc(sizeof(*set_stats_req));
 
 	if (!set_stats_req) {
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
@@ -13233,14 +13233,14 @@
 			QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 				  "%s: not able to post WMA_LL_STATS_SET_REQ",
 				  __func__);
-			cdf_mem_free(set_stats_req);
+			qdf_mem_free(set_stats_req);
 			status = QDF_STATUS_E_FAILURE;
 		}
 		sme_release_global_lock(&pMac->sme);
 	} else {
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, "%s: "
 			  "sme_acquire_global_lock error", __func__);
-		cdf_mem_free(set_stats_req);
+		qdf_mem_free(set_stats_req);
 		status = QDF_STATUS_E_FAILURE;
 	}
 
@@ -13269,7 +13269,7 @@
 	QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_INFO,
 		  "Stats Type = %u", pgetStatsReq->paramIdMask);
 
-	get_stats_req = cdf_mem_malloc(sizeof(*get_stats_req));
+	get_stats_req = qdf_mem_malloc(sizeof(*get_stats_req));
 
 	if (!get_stats_req) {
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
@@ -13290,7 +13290,7 @@
 				  "%s: not able to post WMA_LL_STATS_GET_REQ",
 				  __func__);
 
-			cdf_mem_free(get_stats_req);
+			qdf_mem_free(get_stats_req);
 			status = QDF_STATUS_E_FAILURE;
 
 		}
@@ -13298,7 +13298,7 @@
 	} else {
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, "%s: "
 			  "sme_acquire_global_lock error", __func__);
-		cdf_mem_free(get_stats_req);
+		qdf_mem_free(get_stats_req);
 		status = QDF_STATUS_E_FAILURE;
 	}
 
@@ -13565,7 +13565,7 @@
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
 	tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
 
-	pSmeDhcpSrvInfo = cdf_mem_malloc(sizeof(*pSmeDhcpSrvInfo));
+	pSmeDhcpSrvInfo = qdf_mem_malloc(sizeof(*pSmeDhcpSrvInfo));
 
 	if (!pSmeDhcpSrvInfo) {
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
@@ -13587,14 +13587,14 @@
 			QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 				  "%s: Not able to post WMA_SET_DHCP_SERVER_OFFLOAD_CMD to WMA!",
 				  __func__);
-			cdf_mem_free(pSmeDhcpSrvInfo);
+			qdf_mem_free(pSmeDhcpSrvInfo);
 			status = QDF_STATUS_E_FAILURE;
 		}
 		sme_release_global_lock(&pMac->sme);
 	} else {
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 			  "%s: sme_acquire_global_lock error!", __func__);
-		cdf_mem_free(pSmeDhcpSrvInfo);
+		qdf_mem_free(pSmeDhcpSrvInfo);
 	}
 
 	return status;
@@ -13618,7 +13618,7 @@
 	cds_msg_t cds_message;
 	tSirLedFlashingReq *ledflashing;
 
-	ledflashing = cdf_mem_malloc(sizeof(*ledflashing));
+	ledflashing = qdf_mem_malloc(sizeof(*ledflashing));
 	if (!ledflashing) {
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 			  FL
@@ -13731,7 +13731,7 @@
 	tpAniSirGlobal mac  = PMAC_STRUCT(hal);
 	struct sir_stats_avg_factor *stats_factor;
 
-	stats_factor = cdf_mem_malloc(sizeof(*stats_factor));
+	stats_factor = qdf_mem_malloc(sizeof(*stats_factor));
 
 	if (!stats_factor) {
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
@@ -13756,7 +13756,7 @@
 			QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 				  "%s: Not able to post SIR_HAL_CONFIG_STATS_FACTOR to WMA!",
 				  __func__);
-			cdf_mem_free(stats_factor);
+			qdf_mem_free(stats_factor);
 			status = QDF_STATUS_E_FAILURE;
 		}
 		sme_release_global_lock(&mac->sme);
@@ -13764,7 +13764,7 @@
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 			  "%s: sme_acquire_global_lock error!",
 			  __func__);
-		cdf_mem_free(stats_factor);
+		qdf_mem_free(stats_factor);
 	}
 
 	return status;
@@ -13788,7 +13788,7 @@
 	tpAniSirGlobal mac  = PMAC_STRUCT(hal);
 	struct sir_guard_time_request *g_time;
 
-	g_time = cdf_mem_malloc(sizeof(*g_time));
+	g_time = qdf_mem_malloc(sizeof(*g_time));
 
 	if (!g_time) {
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
@@ -13813,7 +13813,7 @@
 			QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 				  "%s: Not able to post SIR_HAL_CONFIG_GUARD_TIME to WMA!",
 				  __func__);
-			cdf_mem_free(g_time);
+			qdf_mem_free(g_time);
 			status = QDF_STATUS_E_FAILURE;
 		}
 		sme_release_global_lock(&mac->sme);
@@ -13821,7 +13821,7 @@
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 			  "%s: sme_acquire_global_lock error!",
 			  __func__);
-		cdf_mem_free(g_time);
+		qdf_mem_free(g_time);
 	}
 
 	return status;
@@ -13845,7 +13845,7 @@
 	tpAniSirGlobal mac  = PMAC_STRUCT(h_hal);
 	wma_cli_set_cmd_t *iwcmd;
 
-	iwcmd = cdf_mem_malloc(sizeof(*iwcmd));
+	iwcmd = qdf_mem_malloc(sizeof(*iwcmd));
 	if (NULL == iwcmd) {
 		QDF_TRACE(QDF_MODULE_ID_SME,
 			  QDF_TRACE_LEVEL_FATAL,
@@ -13857,7 +13857,7 @@
 
 	if (QDF_STATUS_SUCCESS == status) {
 
-		cdf_mem_zero((void *)iwcmd, sizeof(*iwcmd));
+		qdf_mem_zero((void *)iwcmd, sizeof(*iwcmd));
 		iwcmd->param_value = modulated_dtim;
 		iwcmd->param_vdev_id = session_id;
 		iwcmd->param_id = GEN_PARAM_MODULATED_DTIM;
@@ -13871,7 +13871,7 @@
 			QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 				  "%s: Not able to post GEN_PARAM_DYNAMIC_DTIM to WMA!",
 				  __func__);
-			cdf_mem_free(iwcmd);
+			qdf_mem_free(iwcmd);
 			status = QDF_STATUS_E_FAILURE;
 		}
 		sme_release_global_lock(&mac->sme);
@@ -13879,7 +13879,7 @@
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 			  "%s: sme_acquire_global_lock error!",
 			  __func__);
-		cdf_mem_free(iwcmd);
+		qdf_mem_free(iwcmd);
 	}
 
 	return status;
@@ -13905,13 +13905,13 @@
 	uint32_t len;
 
 	len = sizeof(*req_msg);
-	req_msg = cdf_mem_malloc(len);
+	req_msg = qdf_mem_malloc(len);
 	if (!req_msg) {
-		sms_log(mac, LOGE, FL("cdf_mem_malloc failed"));
+		sms_log(mac, LOGE, FL("qdf_mem_malloc failed"));
 		return QDF_STATUS_E_NOMEM;
 	}
 
-	cdf_mem_zero(req_msg, len);
+	qdf_mem_zero(req_msg, len);
 
 	req_msg->verbose_level = start_log.verbose_level;
 	req_msg->flag = start_log.flag;
@@ -13922,7 +13922,7 @@
 		sms_log(mac, LOGE,
 			FL("sme_acquire_global_lock failed(status=%d)"),
 			status);
-		cdf_mem_free(req_msg);
+		qdf_mem_free(req_msg);
 		return status;
 	}
 
@@ -13934,7 +13934,7 @@
 		sms_log(mac, LOGE,
 			FL("vos_mq_post_message failed!(err=%d)"),
 			status);
-		cdf_mem_free(req_msg);
+		qdf_mem_free(req_msg);
 		status = QDF_STATUS_E_FAILURE;
 	}
 	sme_release_global_lock(&mac->sme);
@@ -14236,7 +14236,7 @@
 	struct rssi_monitor_req *req_msg;
 
 	sms_log(mac, LOG1, FL("enter"));
-	req_msg = cdf_mem_malloc(sizeof(*req_msg));
+	req_msg = qdf_mem_malloc(sizeof(*req_msg));
 	if (!req_msg) {
 		sms_log(mac, LOGE, FL("memory allocation failed"));
 		return QDF_STATUS_E_NOMEM;
@@ -14249,7 +14249,7 @@
 		sms_log(mac, LOGE,
 			FL("sme_acquire_global_lock failed!(status=%d)"),
 			status);
-		cdf_mem_free(req_msg);
+		qdf_mem_free(req_msg);
 		return status;
 	}
 
@@ -14261,7 +14261,7 @@
 		sms_log(mac, LOGE,
 			FL("cds_mq_post_message failed!(err=%d)"),
 			status);
-		cdf_mem_free(req_msg);
+		qdf_mem_free(req_msg);
 	}
 	sme_release_global_lock(&mac->sme);
 
@@ -14289,13 +14289,13 @@
 	struct fw_dump_seg_req seg_req;
 	int loop;
 
-	send_req = cdf_mem_malloc(sizeof(*send_req));
+	send_req = qdf_mem_malloc(sizeof(*send_req));
 	if (!send_req) {
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 			FL("Memory allocation failed for WDA_FW_MEM_DUMP"));
 		return QDF_STATUS_E_FAILURE;
 	}
-	cdf_mem_copy(send_req, recvd_req, sizeof(*send_req));
+	qdf_mem_copy(send_req, recvd_req, sizeof(*send_req));
 
 	QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_INFO,
 		  FL("request_id:%d num_seg:%d"),
@@ -14325,14 +14325,14 @@
 		if (QDF_STATUS_SUCCESS != qdf_status) {
 			QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 				  FL("Not able to post WMA_FW_MEM_DUMP"));
-			cdf_mem_free(send_req);
+			qdf_mem_free(send_req);
 			status = QDF_STATUS_E_FAILURE;
 		}
 		sme_release_global_lock(&pMac->sme);
 	} else {
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 			FL("Failed to acquire SME Global Lock"));
-		cdf_mem_free(send_req);
+		qdf_mem_free(send_req);
 		status = QDF_STATUS_E_FAILURE;
 	}
 
@@ -14364,13 +14364,13 @@
 
 	len = sizeof(*req_msg);
 
-	req_msg = cdf_mem_malloc(len);
+	req_msg = qdf_mem_malloc(len);
 	if (!req_msg) {
-		sms_log(mac, LOGE, FL("cdf_mem_malloc failed"));
+		sms_log(mac, LOGE, FL("qdf_mem_malloc failed"));
 		return QDF_STATUS_E_NOMEM;
 	}
 
-	cdf_mem_zero(req_msg, len);
+	qdf_mem_zero(req_msg, len);
 
 	for (i = 0; i < msg.pcl_len; i++)
 		req_msg->pcl_list[i] =  msg.pcl_list[i];
@@ -14382,7 +14382,7 @@
 		sms_log(mac, LOGE,
 				FL("sme_AcquireGlobalLock failed!(status=%d)"),
 				status);
-		cdf_mem_free(req_msg);
+		qdf_mem_free(req_msg);
 		return status;
 	}
 
@@ -14394,7 +14394,7 @@
 		sms_log(mac, LOGE,
 				FL("vos_mq_post_message failed!(err=%d)"),
 				status);
-		cdf_mem_free(req_msg);
+		qdf_mem_free(req_msg);
 		status = QDF_STATUS_E_FAILURE;
 	}
 	sme_release_global_lock(&mac->sme);
@@ -14568,7 +14568,7 @@
 	cds_msg_t cds_message;
 	struct gateway_param_update_req *request_buf;
 
-	request_buf = cdf_mem_malloc(sizeof(*request_buf));
+	request_buf = qdf_mem_malloc(sizeof(*request_buf));
 	if (NULL == request_buf) {
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 			FL("Not able to allocate memory for gw param update request"));
@@ -14584,7 +14584,7 @@
 	if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 			FL("Not able to post WMA_GW_PARAM_UPDATE_REQ message to HAL"));
-		cdf_mem_free(request_buf);
+		qdf_mem_free(request_buf);
 		return QDF_STATUS_E_FAILURE;
 	}
 
@@ -14831,7 +14831,7 @@
 	QDF_STATUS status;
 	struct egap_conf_params *egap_params;
 
-	egap_params = cdf_mem_malloc(sizeof(*egap_params));
+	egap_params = qdf_mem_malloc(sizeof(*egap_params));
 	if (NULL == egap_params) {
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 				"%s: fail to alloc egap_params", __func__);
@@ -14850,7 +14850,7 @@
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 			"%s: Not able to post msg to WMA!", __func__);
 
-		cdf_mem_free(egap_params);
+		qdf_mem_free(egap_params);
 	}
 	return status;
 }
diff --git a/core/sme/src/common/sme_ft_api.c b/core/sme/src/common/sme_ft_api.c
index 3b9aba5..adbb1aa 100644
--- a/core/sme/src/common/sme_ft_api.c
+++ b/core/sme/src/common/sme_ft_api.c
@@ -40,10 +40,10 @@
 
 	if (NULL != pSession) {
 		/* Clean up the context */
-		cdf_mem_set(&pSession->ftSmeContext, sizeof(tftSMEContext), 0);
+		qdf_mem_set(&pSession->ftSmeContext, sizeof(tftSMEContext), 0);
 
 		pSession->ftSmeContext.pUsrCtx =
-			cdf_mem_malloc(sizeof(tFTRoamCallbackUsrCtx));
+			qdf_mem_malloc(sizeof(tFTRoamCallbackUsrCtx));
 
 		if (NULL == pSession->ftSmeContext.pUsrCtx) {
 			sms_log(pMac, LOGE, FL("Memory allocation failure"));
@@ -63,7 +63,7 @@
 			sms_log(pMac, LOGE,
 				FL
 					("Preauth Reassoc interval Timer allocation failed"));
-			cdf_mem_free(pSession->ftSmeContext.pUsrCtx);
+			qdf_mem_free(pSession->ftSmeContext.pUsrCtx);
 			pSession->ftSmeContext.pUsrCtx = NULL;
 			return;
 		}
@@ -102,7 +102,7 @@
 			sms_log(pMac, LOG1,
 				FL
 					("Freeing ftSmeContext.pUsrCtx and setting to NULL"));
-			cdf_mem_free(pSession->ftSmeContext.pUsrCtx);
+			qdf_mem_free(pSession->ftSmeContext.pUsrCtx);
 			pSession->ftSmeContext.pUsrCtx = NULL;
 		}
 	}
@@ -165,13 +165,13 @@
 		if ((session->ftSmeContext.auth_ft_ies) &&
 			(session->ftSmeContext.auth_ft_ies_length)) {
 			/* Free the one we recvd last from supplicant */
-			cdf_mem_free(session->ftSmeContext.auth_ft_ies);
+			qdf_mem_free(session->ftSmeContext.auth_ft_ies);
 			session->ftSmeContext.auth_ft_ies_length = 0;
 			session->ftSmeContext.auth_ft_ies = NULL;
 		}
 		/* Save the FT IEs */
 		session->ftSmeContext.auth_ft_ies =
-					cdf_mem_malloc(ft_ies_length);
+					qdf_mem_malloc(ft_ies_length);
 		if (NULL == session->ftSmeContext.auth_ft_ies) {
 			sms_log(mac_ctx, LOGE,
 				FL("Mem alloc failed for auth_ft_ies"));
@@ -179,7 +179,7 @@
 			return;
 		}
 		session->ftSmeContext.auth_ft_ies_length = ft_ies_length;
-		cdf_mem_copy((uint8_t *)session->ftSmeContext.auth_ft_ies,
+		qdf_mem_copy((uint8_t *)session->ftSmeContext.auth_ft_ies,
 				ft_ies, ft_ies_length);
 		session->ftSmeContext.FTState = eFT_AUTH_REQ_READY;
 
@@ -215,12 +215,12 @@
 		if ((session->ftSmeContext.reassoc_ft_ies) &&
 			(session->ftSmeContext.reassoc_ft_ies_length)) {
 			/* Free the one we recvd last from supplicant */
-			cdf_mem_free(session->ftSmeContext.reassoc_ft_ies);
+			qdf_mem_free(session->ftSmeContext.reassoc_ft_ies);
 			session->ftSmeContext.reassoc_ft_ies_length = 0;
 		}
 		/* Save the FT IEs */
 		session->ftSmeContext.reassoc_ft_ies =
-					cdf_mem_malloc(ft_ies_length);
+					qdf_mem_malloc(ft_ies_length);
 		if (NULL == session->ftSmeContext.reassoc_ft_ies) {
 			sms_log(mac_ctx, LOGE,
 				FL("Mem alloc fail for reassoc_ft_ie"));
@@ -229,7 +229,7 @@
 		}
 		session->ftSmeContext.reassoc_ft_ies_length =
 							ft_ies_length;
-		cdf_mem_copy((uint8_t *)session->ftSmeContext.reassoc_ft_ies,
+		qdf_mem_copy((uint8_t *)session->ftSmeContext.reassoc_ft_ies,
 				ft_ies, ft_ies_length);
 
 		session->ftSmeContext.FTState = eFT_SET_KEY_WAIT;
@@ -280,11 +280,11 @@
 	}
 	msglen  = sizeof(tSirFTUpdateKeyInfo);
 
-	msg = cdf_mem_malloc(msglen);
+	msg = qdf_mem_malloc(msglen);
 	if (NULL == msg)
 		return QDF_STATUS_E_NOMEM;
 
-	cdf_mem_set(msg, msglen, 0);
+	qdf_mem_set(msg, msglen, 0);
 	msg->messageType = eWNI_SME_FT_UPDATE_KEY;
 	msg->length = msglen;
 
@@ -297,13 +297,13 @@
 	keymaterial->key[0].unicast = (uint8_t) true;
 	keymaterial->key[0].keyDirection = ftkey_info->keyDirection;
 
-	cdf_mem_copy(&keymaterial->key[0].keyRsc,
+	qdf_mem_copy(&keymaterial->key[0].keyRsc,
 			ftkey_info->keyRsc, CSR_MAX_RSC_LEN);
 	keymaterial->key[0].paeRole = ftkey_info->paeRole;
 	keymaterial->key[0].keyLength = ftkey_info->keyLength;
 
 	if (ftkey_info->keyLength && ftkey_info->Key) {
-		cdf_mem_copy(&keymaterial->key[0].key, ftkey_info->Key,
+		qdf_mem_copy(&keymaterial->key[0].key, ftkey_info->Key,
 				ftkey_info->keyLength);
 		if (ftkey_info->keyLength == 16) {
 			sms_log(mac_ctx, LOG1,
@@ -457,11 +457,11 @@
 	}
 	/* hdd needs to pack the bssid also along with the */
 	/* auth response to supplicant */
-	cdf_mem_copy(ft_ies, pSession->ftSmeContext.preAuthbssId,
+	qdf_mem_copy(ft_ies, pSession->ftSmeContext.preAuthbssId,
 		     QDF_MAC_ADDR_SIZE);
 
 	/* Copy the auth resp FTIEs */
-	cdf_mem_copy(&(ft_ies[QDF_MAC_ADDR_SIZE]),
+	qdf_mem_copy(&(ft_ies[QDF_MAC_ADDR_SIZE]),
 		     pSession->ftSmeContext.psavedFTPreAuthRsp->ft_ies,
 		     pSession->ftSmeContext.psavedFTPreAuthRsp->ft_ies_length);
 
@@ -507,7 +507,7 @@
 		return;
 	}
 
-	cdf_mem_copy(ric_ies,
+	qdf_mem_copy(ric_ies,
 		     pSession->ftSmeContext.psavedFTPreAuthRsp->ric_ies,
 		     pSession->ftSmeContext.psavedFTPreAuthRsp->ric_ies_length);
 
@@ -559,7 +559,7 @@
 			sms_log(pMac, LOG1,
 				FL("Free FT Auth IE %p and set to NULL"),
 				pSession->ftSmeContext.auth_ft_ies);
-			cdf_mem_free(pSession->ftSmeContext.auth_ft_ies);
+			qdf_mem_free(pSession->ftSmeContext.auth_ft_ies);
 			pSession->ftSmeContext.auth_ft_ies = NULL;
 		}
 		pSession->ftSmeContext.auth_ft_ies_length = 0;
@@ -568,7 +568,7 @@
 			sms_log(pMac, LOG1,
 				FL("Free FT Reassoc IE %p and set to NULL"),
 				pSession->ftSmeContext.reassoc_ft_ies);
-			cdf_mem_free(pSession->ftSmeContext.reassoc_ft_ies);
+			qdf_mem_free(pSession->ftSmeContext.reassoc_ft_ies);
 			pSession->ftSmeContext.reassoc_ft_ies = NULL;
 		}
 		pSession->ftSmeContext.reassoc_ft_ies_length = 0;
@@ -577,13 +577,13 @@
 			sms_log(pMac, LOG1,
 				FL("Free FtPreAuthRsp %p and set to NULL"),
 				pSession->ftSmeContext.psavedFTPreAuthRsp);
-			cdf_mem_free(pSession->ftSmeContext.psavedFTPreAuthRsp);
+			qdf_mem_free(pSession->ftSmeContext.psavedFTPreAuthRsp);
 			pSession->ftSmeContext.psavedFTPreAuthRsp = NULL;
 		}
 		pSession->ftSmeContext.setFTPreAuthState = false;
 		pSession->ftSmeContext.setFTPTKState = false;
 
-		cdf_mem_zero(pSession->ftSmeContext.preAuthbssId,
+		qdf_mem_zero(pSession->ftSmeContext.preAuthbssId,
 			     QDF_MAC_ADDR_SIZE);
 		pSession->ftSmeContext.FTState = eFT_START_READY;
 	}
diff --git a/core/sme/src/common/sme_power_save.c b/core/sme/src/common/sme_power_save.c
index 78ccd34..7842709 100644
--- a/core/sme/src/common/sme_power_save.c
+++ b/core/sme/src/common/sme_power_save.c
@@ -28,7 +28,7 @@
 #include "sme_power_save.h"
 #include "sme_power_save_api.h"
 #include "sms_debug.h"
-#include "cdf_memory.h"
+#include "qdf_mem.h"
 #include "qdf_types.h"
 #include "wma_types.h"
 #include "wmm_apsd.h"
@@ -56,7 +56,7 @@
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 				"%s: Posting message %d failed",
 				__func__, type);
-		cdf_mem_free(body);
+		qdf_mem_free(body);
 		return QDF_STATUS_E_FAILURE;
 	}
 	return QDF_STATUS_SUCCESS;
@@ -75,7 +75,7 @@
 	struct sEnablePsParams *enable_ps_req_params;
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
 
-	enable_ps_req_params =  cdf_mem_malloc(sizeof(*enable_ps_req_params));
+	enable_ps_req_params =  qdf_mem_malloc(sizeof(*enable_ps_req_params));
 	if (NULL == enable_ps_req_params) {
 		sms_log(mac_ctx, LOGE,
 			FL("Memory allocation failed for enable_ps_req_params"));
@@ -105,7 +105,7 @@
 	struct  sDisablePsParams *disable_ps_req_params;
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
 
-	disable_ps_req_params = cdf_mem_malloc(sizeof(*disable_ps_req_params));
+	disable_ps_req_params = qdf_mem_malloc(sizeof(*disable_ps_req_params));
 	if (NULL == disable_ps_req_params) {
 		sms_log(mac_ctx, LOGE,
 			FL("Memory allocation failed for sDisablePsParams"));
@@ -142,7 +142,7 @@
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
 
 	enable_uapsd_req_params =
-		cdf_mem_malloc(sizeof(*enable_uapsd_req_params));
+		qdf_mem_malloc(sizeof(*enable_uapsd_req_params));
 	if (NULL == enable_uapsd_req_params) {
 		sms_log(mac_ctx, LOGE,
 			FL("Memory allocation failed for enable_uapsd_req_params"));
@@ -209,7 +209,7 @@
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
 
 	disable_uapsd_req_params =
-		cdf_mem_malloc(sizeof(*disable_uapsd_req_params));
+		qdf_mem_malloc(sizeof(*disable_uapsd_req_params));
 	if (NULL == disable_uapsd_req_params) {
 		sms_log(mac_ctx, LOGE,
 			FL("Memory allocation failed for disable_uapsd_req_params"));
@@ -245,13 +245,13 @@
 	sme_wowl_params =
 		&ps_global_info->ps_params[session_id].wowl_enter_params;
 
-	hal_wowl_params = cdf_mem_malloc(sizeof(*hal_wowl_params));
+	hal_wowl_params = qdf_mem_malloc(sizeof(*hal_wowl_params));
 	if (NULL == hal_wowl_params) {
 		sms_log(mac_ctx, LOGP,
 			FL("Fail to allocate memory for Enter Wowl Request"));
 		return  QDF_STATUS_E_NOMEM;
 	}
-	cdf_mem_set((uint8_t *) hal_wowl_params, sizeof(*hal_wowl_params), 0);
+	qdf_mem_set((uint8_t *) hal_wowl_params, sizeof(*hal_wowl_params), 0);
 
 	/* fill in the message field */
 	hal_wowl_params->ucMagicPktEnable = sme_wowl_params->ucMagicPktEnable;
@@ -337,7 +337,7 @@
 
 end:
 	if (hal_wowl_params != NULL)
-		cdf_mem_free(hal_wowl_params);
+		qdf_mem_free(hal_wowl_params);
 	return QDF_STATUS_E_FAILURE;
 }
 
@@ -352,13 +352,13 @@
 		uint32_t session_id)
 {
 	struct sSirHalWowlExitParams *hal_wowl_msg;
-	hal_wowl_msg = cdf_mem_malloc(sizeof(*hal_wowl_msg));
+	hal_wowl_msg = qdf_mem_malloc(sizeof(*hal_wowl_msg));
 	if (NULL == hal_wowl_msg) {
 		sms_log(mac_ctx, LOGP,
 			FL("Fail to allocate memory for WoWLAN Add Bcast Pattern "));
 		return  QDF_STATUS_E_NOMEM;
 	}
-	cdf_mem_set((uint8_t *) hal_wowl_msg,
+	qdf_mem_set((uint8_t *) hal_wowl_msg,
 			sizeof(*hal_wowl_msg), 0);
 	hal_wowl_msg->sessionId = session_id;
 
@@ -369,7 +369,7 @@
 		return QDF_STATUS_SUCCESS;
 	}
 	if (hal_wowl_msg != NULL)
-		cdf_mem_free(hal_wowl_msg);
+		qdf_mem_free(hal_wowl_msg);
 	return QDF_STATUS_E_FAILURE;
 }
 
@@ -647,13 +647,13 @@
 	mac_hdr->fc.subType = sub_type;
 
 	/* Prepare Address 1 */
-	cdf_mem_copy((uint8_t *) mac_hdr->da, (uint8_t *) peer_addr,
+	qdf_mem_copy((uint8_t *) mac_hdr->da, (uint8_t *) peer_addr,
 		     sizeof(tSirMacAddr));
 
 	sir_copy_mac_addr(mac_hdr->sa, self_mac_addr);
 
 	/* Prepare Address 3 */
-	cdf_mem_copy((uint8_t *) mac_hdr->bssId, (uint8_t *) peer_addr,
+	qdf_mem_copy((uint8_t *) mac_hdr->bssId, (uint8_t *) peer_addr,
 		     sizeof(tSirMacAddr));
 	return status_code;
 } /*** sme_populate_mac_header() ***/
@@ -676,7 +676,7 @@
 	 * and then hand it off to 'dot11f_pack_probe_request' (for
 	 * serialization).  We start by zero-initializing the structure:
 	 */
-	cdf_mem_set((uint8_t *) &pr, sizeof(pr), 0);
+	qdf_mem_set((uint8_t *) &pr, sizeof(pr), 0);
 
 	populate_dot11f_supp_rates(mac_ctx, channel_num, &pr.SuppRates, NULL);
 
@@ -714,7 +714,7 @@
 	bytes = payload + sizeof(tSirMacMgmtHdr);
 
 	/* Prepare outgoing frame */
-	cdf_mem_set(frame, bytes, 0);
+	qdf_mem_set(frame, bytes, 0);
 
 	/* Next, we fill out the buffer descriptor: */
 	sir_status = sme_populate_mac_header(mac_ctx, frame, SIR_MAC_MGMT_FRAME,
@@ -815,14 +815,14 @@
 		return QDF_STATUS_E_FAILURE;
 	}
 
-	request_buf = cdf_mem_malloc(sizeof(tSirPNOScanReq));
+	request_buf = qdf_mem_malloc(sizeof(tSirPNOScanReq));
 	if (NULL == request_buf) {
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 			FL("Not able to allocate memory for PNO request"));
 		return QDF_STATUS_E_NOMEM;
 	}
 
-	cdf_mem_copy(request_buf, request, sizeof(tSirPNOScanReq));
+	qdf_mem_copy(request_buf, request, sizeof(tSirPNOScanReq));
 
 	/*Must translate the mode first */
 	uc_dot11_mode = (uint8_t) csr_translate_to_wni_cfg_dot11_mode(mac_ctx,
@@ -847,7 +847,7 @@
 				((request_buf->us24GProbeTemplateLen +
 				  request->us24GProbeTemplateLen) <
 				 SIR_PNO_MAX_PB_REQ_SIZE)) {
-			cdf_mem_copy((uint8_t *) &request_buf->
+			qdf_mem_copy((uint8_t *) &request_buf->
 					p24GProbeTemplate +
 					request_buf->us24GProbeTemplateLen,
 					(uint8_t *) &request->p24GProbeTemplate,
@@ -880,7 +880,7 @@
 				((request_buf->us5GProbeTemplateLen +
 				  request->us5GProbeTemplateLen) <
 				 SIR_PNO_MAX_PB_REQ_SIZE)) {
-			cdf_mem_copy((uint8_t *) &request_buf->
+			qdf_mem_copy((uint8_t *) &request_buf->
 					p5GProbeTemplate +
 					request_buf->us5GProbeTemplateLen,
 					(uint8_t *) &request->p5GProbeTemplate,
@@ -935,7 +935,7 @@
 			(cds_mq_post_message(QDF_MODULE_ID_WMA, &msg))) {
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 			FL("Not able to post WMA_SET_PNO_REQ message to WMA"));
-		cdf_mem_free(request_buf);
+		qdf_mem_free(request_buf);
 		return QDF_STATUS_E_FAILURE;
 	}
 
@@ -982,7 +982,7 @@
 		return QDF_STATUS_E_FAILURE;
 	}
 
-	request_buf = cdf_mem_malloc(sizeof(tSirHostOffloadReq));
+	request_buf = qdf_mem_malloc(sizeof(tSirHostOffloadReq));
 	if (NULL == request_buf) {
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 		   FL("Not able to allocate memory for host offload request"));
@@ -991,7 +991,7 @@
 
 	qdf_copy_macaddr(&request->bssid, &session->connectedProfile.bssid);
 
-	cdf_mem_copy(request_buf, request, sizeof(tSirHostOffloadReq));
+	qdf_mem_copy(request_buf, request, sizeof(tSirHostOffloadReq));
 
 	msg.type = WMA_SET_HOST_OFFLOAD;
 	msg.reserved = 0;
@@ -1000,7 +1000,7 @@
 			cds_mq_post_message(QDF_MODULE_ID_WMA, &msg)) {
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 		      FL("Not able to post WMA_SET_HOST_OFFLOAD msg to WMA"));
-		cdf_mem_free(request_buf);
+		qdf_mem_free(request_buf);
 		return QDF_STATUS_E_FAILURE;
 	}
 
@@ -1033,7 +1033,7 @@
 
 	qdf_copy_macaddr(&request->bssid, &session->connectedProfile.bssid);
 
-	request_buf = cdf_mem_malloc(sizeof(*request_buf));
+	request_buf = qdf_mem_malloc(sizeof(*request_buf));
 	if (NULL == request_buf) {
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 			FL("Not able to allocate memory for NS offload request"));
@@ -1048,7 +1048,7 @@
 			cds_mq_post_message(QDF_MODULE_ID_WMA, &msg)) {
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 			FL("Not able to post SIR_HAL_SET_HOST_OFFLOAD message to HAL"));
-		cdf_mem_free(request_buf);
+		qdf_mem_free(request_buf);
 		return QDF_STATUS_E_FAILURE;
 	}
 
diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c
index 8c2c4bb..1cf113a 100644
--- a/core/sme/src/csr/csr_api_roam.c
+++ b/core/sme/src/csr/csr_api_roam.c
@@ -287,7 +287,7 @@
 static void csr_roam_init_globals(tpAniSirGlobal pMac)
 {
 	if (pMac) {
-		cdf_mem_zero(&csr_roam_roam_session, sizeof(csr_roam_roam_session));
+		qdf_mem_zero(&csr_roam_roam_session, sizeof(csr_roam_roam_session));
 		pMac->roam.roamSession = csr_roam_roam_session;
 	}
 	return;
@@ -365,9 +365,9 @@
 	}
 	mac->scan.domainIdDefault = reg_id;
 	mac->scan.domainIdCurrent = mac->scan.domainIdDefault;
-	cdf_mem_copy(mac->scan.countryCodeCurrent,
+	qdf_mem_copy(mac->scan.countryCodeCurrent,
 		     mac->scan.countryCodeDefault, WNI_CFG_COUNTRY_CODE_LEN);
-	cdf_mem_copy(mac->scan.countryCodeElected,
+	qdf_mem_copy(mac->scan.countryCodeElected,
 		     mac->scan.countryCodeDefault, WNI_CFG_COUNTRY_CODE_LEN);
 	status = csr_get_channel_and_power_list(mac);
 	csr_clear_votes_for_country_info(mac);
@@ -405,17 +405,17 @@
 	pMac->scan.domainIdDefault = regId;
 	pMac->scan.domainIdCurrent = pMac->scan.domainIdDefault;
 	/* Clear CC field */
-	cdf_mem_set(pMac->scan.countryCodeDefault, WNI_CFG_COUNTRY_CODE_LEN, 0);
+	qdf_mem_set(pMac->scan.countryCodeDefault, WNI_CFG_COUNTRY_CODE_LEN, 0);
 
 	/* Copy 2 or 3 bytes country code */
-	cdf_mem_copy(pMac->scan.countryCodeDefault, apCntryCode,
+	qdf_mem_copy(pMac->scan.countryCodeDefault, apCntryCode,
 		     cntryCodeLength);
 
 	/* If 2 bytes country code, 3rd byte must be filled with space */
 	if ((WNI_CFG_COUNTRY_CODE_LEN - 1) == cntryCodeLength) {
-		cdf_mem_set(pMac->scan.countryCodeDefault + 2, 1, 0x20);
+		qdf_mem_set(pMac->scan.countryCodeDefault + 2, 1, 0x20);
 	}
-	cdf_mem_copy(pMac->scan.countryCodeCurrent,
+	qdf_mem_copy(pMac->scan.countryCodeCurrent,
 		     pMac->scan.countryCodeDefault, WNI_CFG_COUNTRY_CODE_LEN);
 	status = csr_get_channel_and_power_list(pMac);
 	return status;
@@ -426,7 +426,7 @@
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
 	tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
 	uint8_t index = 0;
-	cdf_mem_copy(pParam->Csr11dinfo.countryCode,
+	qdf_mem_copy(pParam->Csr11dinfo.countryCode,
 		     pMac->scan.countryCodeCurrent, WNI_CFG_COUNTRY_CODE_LEN);
 	for (index = 0; index < pMac->scan.base_channels.numChannels;
 	     index++) {
@@ -454,7 +454,7 @@
 	csr_ll_close(&pMac->roam.peStatsReqList);
 	csr_ll_close(&pMac->roam.roamCmdPendingList);
 	if (pMac->sme.saved_scan_cmd) {
-		cdf_mem_free(pMac->sme.saved_scan_cmd);
+		qdf_mem_free(pMac->sme.saved_scan_cmd);
 		pMac->sme.saved_scan_cmd = NULL;
 	}
 	/* DeInit Globals */
@@ -505,7 +505,7 @@
 		return;
 
 	tmp_list = (tSirUpdateChanParam *)
-		cdf_mem_malloc(sizeof(tSirUpdateChanParam) * num_channel);
+		qdf_mem_malloc(sizeof(tSirUpdateChanParam) * num_channel);
 	if (tmp_list == NULL) {
 		sms_log(mac_ctx, LOGE, FL("Memory allocation failed"));
 		return;
@@ -515,7 +515,7 @@
 	for (i = 0; i < num_channel; i++) {
 		if (CDS_IS_CHANNEL_5GHZ(chan_list[i].chanId) &&
 			!CDS_IS_DFS_CH(chan_list[i].chanId)) {
-			cdf_mem_copy(&tmp_list[j++],
+			qdf_mem_copy(&tmp_list[j++],
 				&chan_list[i], sizeof(tSirUpdateChanParam));
 			chan_list[i].chanId = INVALID_CHANNEL_ID;
 		}
@@ -524,7 +524,7 @@
 		/* next copy DFS channels (remaining channels in 5G) */
 		for (i = 0; i < num_channel; i++) {
 			if (CDS_IS_CHANNEL_5GHZ(chan_list[i].chanId)) {
-				cdf_mem_copy(&tmp_list[j++], &chan_list[i],
+				qdf_mem_copy(&tmp_list[j++], &chan_list[i],
 					sizeof(tSirUpdateChanParam));
 				chan_list[i].chanId = INVALID_CHANNEL_ID;
 			}
@@ -533,7 +533,7 @@
 		/* next copy 2G channels */
 		for (i = 0; i < num_channel; i++) {
 			if (CDS_IS_CHANNEL_24GHZ(chan_list[i].chanId)) {
-				cdf_mem_copy(&tmp_list[j++], &chan_list[i],
+				qdf_mem_copy(&tmp_list[j++], &chan_list[i],
 					sizeof(tSirUpdateChanParam));
 				chan_list[i].chanId = INVALID_CHANNEL_ID;
 			}
@@ -542,15 +542,15 @@
 	/* copy rest of the channels in same order to tmp list */
 	for (i = 0; i < num_channel; i++) {
 		if (chan_list[i].chanId != INVALID_CHANNEL_ID) {
-			cdf_mem_copy(&tmp_list[j++], &chan_list[i],
+			qdf_mem_copy(&tmp_list[j++], &chan_list[i],
 				sizeof(tSirUpdateChanParam));
 			chan_list[i].chanId = INVALID_CHANNEL_ID;
 		}
 	}
 	/* copy tmp list to original channel list buffer */
-	cdf_mem_copy(chan_list, tmp_list,
+	qdf_mem_copy(chan_list, tmp_list,
 				 sizeof(tSirUpdateChanParam) * num_channel);
-	cdf_mem_free(tmp_list);
+	qdf_mem_free(tmp_list);
 }
 
 /**
@@ -589,15 +589,15 @@
 
 	buf_size = sizeof(tSirUpdateChanList) +
 		(sizeof(tSirUpdateChanParam) * num_channel);
-	chan_list_greedy = cdf_mem_malloc(buf_size);
-	chan_list_non_greedy = cdf_mem_malloc(buf_size);
+	chan_list_greedy = qdf_mem_malloc(buf_size);
+	chan_list_non_greedy = qdf_mem_malloc(buf_size);
 	if (!chan_list_greedy || !chan_list_non_greedy) {
 		QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
 			  "Failed to allocate memory for tSirUpdateChanList");
 		return;
 	}
-	cdf_mem_zero(chan_list_greedy, buf_size);
-	cdf_mem_zero(chan_list_non_greedy, buf_size);
+	qdf_mem_zero(chan_list_greedy, buf_size);
+	qdf_mem_zero(chan_list_non_greedy, buf_size);
 	/*
 	 * fixed_greedy_chan_list is an evaluated channel list based on most of
 	 * the enterprise wifi deployments and the order of the channels
@@ -619,7 +619,7 @@
 			}
 		}
 		if (!match_found) {
-			cdf_mem_copy(
+			qdf_mem_copy(
 			  &chan_list_non_greedy->chanParam[num_non_greedy_chan],
 			  &chan_list->chanParam[i],
 			  sizeof(tSirUpdateChanParam));
@@ -637,7 +637,7 @@
 		for (j = 0; j < num_channel; j++) {
 			if (fixed_greedy_chan_list[i] ==
 					chan_list->chanParam[j].chanId) {
-				cdf_mem_copy(
+				qdf_mem_copy(
 				  &chan_list_greedy->chanParam[num_greedy_chan],
 				  &chan_list->chanParam[j],
 				  sizeof(tSirUpdateChanParam));
@@ -656,21 +656,21 @@
 	}
 	/* Copy the Greedy channels first */
 	i = 0;
-	cdf_mem_copy(&chan_list->chanParam[i],
+	qdf_mem_copy(&chan_list->chanParam[i],
 		&chan_list_greedy->chanParam[i],
 		num_greedy_chan * sizeof(tSirUpdateChanParam));
 	/* Copy the remaining Non Greedy channels */
 	i = num_greedy_chan;
 	j = 0;
-	cdf_mem_copy(&chan_list->chanParam[i],
+	qdf_mem_copy(&chan_list->chanParam[i],
 		&chan_list_non_greedy->chanParam[j],
 		num_non_greedy_chan * sizeof(tSirUpdateChanParam));
 
 	/* Update channel list for 5g preference and allow DFS roam */
 	csr_roam_arrange_ch_list(mac_ctx, chan_list->chanParam, num_channel);
 scan_list_sort_error:
-	cdf_mem_free(chan_list_greedy);
-	cdf_mem_free(chan_list_non_greedy);
+	qdf_mem_free(chan_list_greedy);
+	qdf_mem_free(chan_list_non_greedy);
 }
 
 QDF_STATUS csr_update_channel_list(tpAniSirGlobal pMac)
@@ -696,13 +696,13 @@
 		 (sizeof(tSirUpdateChanParam) * (numChan));
 
 	csr_init_operating_classes((tHalHandle) pMac);
-	pChanList = (tSirUpdateChanList *) cdf_mem_malloc(bufLen);
+	pChanList = (tSirUpdateChanList *) qdf_mem_malloc(bufLen);
 	if (!pChanList) {
 		QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
 			  "Failed to allocate memory for tSirUpdateChanList");
 		return QDF_STATUS_E_NOMEM;
 	}
-	cdf_mem_zero(pChanList, bufLen);
+	qdf_mem_zero(pChanList, bufLen);
 
 	for (i = 0; i < pScan->base_channels.numChannels; i++) {
 		/* Scan is not performed on DSRC channels*/
@@ -768,7 +768,7 @@
 	if (QDF_STATUS_SUCCESS != cds_mq_post_message(QDF_MODULE_ID_WMA, &msg)) {
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_FATAL,
 			  "%s: Failed to post msg to WMA", __func__);
-		cdf_mem_free(pChanList);
+		qdf_mem_free(pChanList);
 		return QDF_STATUS_E_FAILURE;
 	}
 
@@ -1000,9 +1000,9 @@
 		size = pSession->pConnectBssDesc->length +
 			sizeof(pSession->pConnectBssDesc->length);
 		if (size) {
-			pProfile->pBssDesc = cdf_mem_malloc(size);
+			pProfile->pBssDesc = qdf_mem_malloc(size);
 			if (NULL != pProfile->pBssDesc) {
-				cdf_mem_copy(pProfile->pBssDesc,
+				qdf_mem_copy(pProfile->pBssDesc,
 					pSession->pConnectBssDesc,
 					size);
 				status = QDF_STATUS_SUCCESS;
@@ -1019,9 +1019,9 @@
 		pProfile->BSSType = connected_prof->BSSType;
 		pProfile->operationChannel = connected_prof->operationChannel;
 		pProfile->CBMode = connected_prof->CBMode;
-		cdf_mem_copy(&pProfile->bssid, &connected_prof->bssid,
+		qdf_mem_copy(&pProfile->bssid, &connected_prof->bssid,
 			sizeof(struct qdf_mac_addr));
-		cdf_mem_copy(&pProfile->SSID, &connected_prof->SSID,
+		qdf_mem_copy(&pProfile->SSID, &connected_prof->SSID,
 			sizeof(tSirMacSSid));
 		if (connected_prof->MDID.mdiePresent) {
 			pProfile->MDID.mdiePresent = 1;
@@ -1034,11 +1034,11 @@
 #ifdef FEATURE_WLAN_ESE
 		pProfile->isESEAssoc = connected_prof->isESEAssoc;
 		if (csr_is_auth_type_ese(connected_prof->AuthType)) {
-			cdf_mem_copy(pProfile->eseCckmInfo.krk,
+			qdf_mem_copy(pProfile->eseCckmInfo.krk,
 				connected_prof->eseCckmInfo.krk,
 				SIR_KRK_KEY_LEN);
 #ifdef WLAN_FEATURE_ROAM_OFFLOAD
-			cdf_mem_copy(pProfile->eseCckmInfo.btk,
+			qdf_mem_copy(pProfile->eseCckmInfo.btk,
 				connected_prof->eseCckmInfo.btk,
 				SIR_BTK_KEY_LEN);
 #endif
@@ -1076,10 +1076,10 @@
 void csr_roam_free_connect_profile(tCsrRoamConnectedProfile *profile)
 {
 	if (profile->pBssDesc)
-		cdf_mem_free(profile->pBssDesc);
+		qdf_mem_free(profile->pBssDesc);
 	if (profile->pAddIEAssoc)
-		cdf_mem_free(profile->pAddIEAssoc);
-	cdf_mem_set(profile, sizeof(tCsrRoamConnectedProfile), 0);
+		qdf_mem_free(profile->pAddIEAssoc);
+	qdf_mem_set(profile, sizeof(tCsrRoamConnectedProfile), 0);
 	profile->AuthType = eCSR_AUTH_TYPE_UNKNOWN;
 }
 
@@ -1089,7 +1089,7 @@
 {
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
 	if (pConnectedInfo->pbFrames) {
-		cdf_mem_free(pConnectedInfo->pbFrames);
+		qdf_mem_free(pConnectedInfo->pbFrames);
 		pConnectedInfo->pbFrames = NULL;
 	}
 	pConnectedInfo->nBeaconLength = 0;
@@ -1131,7 +1131,7 @@
 
 void csr_reinit_set_key_cmd(tpAniSirGlobal pMac, tSmeCmd *pCommand)
 {
-	cdf_mem_set(&pCommand->u.setKeyCmd, sizeof(tSetKeyCmd), 0);
+	qdf_mem_set(&pCommand->u.setKeyCmd, sizeof(tSetKeyCmd), 0);
 }
 
 void csr_release_command_set_key(tpAniSirGlobal pMac, tSmeCmd *pCommand)
@@ -1393,7 +1393,7 @@
 	if (NULL !=
 	    pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo.
 	    ChannelList) {
-		cdf_mem_free(pNeighborRoamInfo->roamChannelInfo.
+		qdf_mem_free(pNeighborRoamInfo->roamChannelInfo.
 			     currentChannelListInfo.ChannelList);
 		pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo.
 		ChannelList = NULL;
@@ -1416,7 +1416,7 @@
 
 	/* Free up the memory first (if required) */
 	if (NULL != pNeighborRoamInfo->cfgParams.channelInfo.ChannelList) {
-		cdf_mem_free(pNeighborRoamInfo->cfgParams.channelInfo.
+		qdf_mem_free(pNeighborRoamInfo->cfgParams.channelInfo.
 			     ChannelList);
 		pNeighborRoamInfo->cfgParams.channelInfo.ChannelList = NULL;
 		pNeighborRoamInfo->cfgParams.channelInfo.numOfChannels = 0;
@@ -1440,7 +1440,7 @@
 	pNeighborRoamInfo->cfgParams.channelInfo.numOfChannels = numChannels;
 
 	pNeighborRoamInfo->cfgParams.channelInfo.ChannelList =
-		cdf_mem_malloc(pNeighborRoamInfo->cfgParams.channelInfo.
+		qdf_mem_malloc(pNeighborRoamInfo->cfgParams.channelInfo.
 			       numOfChannels);
 
 	if (NULL == pNeighborRoamInfo->cfgParams.channelInfo.ChannelList) {
@@ -1451,7 +1451,7 @@
 	}
 
 	/* Update the roam global structure */
-	cdf_mem_copy(pNeighborRoamInfo->cfgParams.channelInfo.ChannelList,
+	qdf_mem_copy(pNeighborRoamInfo->cfgParams.channelInfo.ChannelList,
 		     pChannelList,
 		     pNeighborRoamInfo->cfgParams.channelInfo.numOfChannels);
 	return status;
@@ -1547,25 +1547,25 @@
 								  outNumChannels,
 								  tmpChannelList,
 								  &outNumChannels);
-		cdf_mem_copy(ChannelList, tmpChannelList, outNumChannels);
+		qdf_mem_copy(ChannelList, tmpChannelList, outNumChannels);
 	}
 	/* Prepare final roam scan channel list */
 	if (outNumChannels) {
 		/* Clear the channel list first */
 		if (NULL != currChannelListInfo->ChannelList) {
-			cdf_mem_free(currChannelListInfo->ChannelList);
+			qdf_mem_free(currChannelListInfo->ChannelList);
 			currChannelListInfo->ChannelList = NULL;
 			currChannelListInfo->numOfChannels = 0;
 		}
 		currChannelListInfo->ChannelList
-			= cdf_mem_malloc(outNumChannels * sizeof(uint8_t));
+			= qdf_mem_malloc(outNumChannels * sizeof(uint8_t));
 		if (NULL == currChannelListInfo->ChannelList) {
 			QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_FATAL,
 				  "Failed to allocate memory for roam scan channel list");
 			currChannelListInfo->numOfChannels = 0;
 			return QDF_STATUS_E_NOMEM;
 		}
-		cdf_mem_copy(currChannelListInfo->ChannelList,
+		qdf_mem_copy(currChannelListInfo->ChannelList,
 			     ChannelList, outNumChannels);
 	}
 	return status;
@@ -1911,7 +1911,7 @@
 			csr_init_channel_power_list(pMac, &pParam->Csr11dinfo);
 		}
 
-		cdf_mem_copy(&pMac->roam.configParam.csr11rConfig,
+		qdf_mem_copy(&pMac->roam.configParam.csr11rConfig,
 			     &pParam->csr11rConfig,
 			     sizeof(tCsr11rConfigParams));
 		sms_log(pMac, LOG1, "IsFTResourceReqSupp = %d",
@@ -1940,7 +1940,7 @@
 		pMac->roam.configParam.isEseIniFeatureEnabled =
 			pParam->isEseIniFeatureEnabled;
 #endif
-		cdf_mem_copy(&pMac->roam.configParam.neighborRoamConfig,
+		qdf_mem_copy(&pMac->roam.configParam.neighborRoamConfig,
 			     &pParam->neighborRoamConfig,
 			     sizeof(tCsrNeighborRoamConfigParams));
 		sms_log(pMac, LOG1, "nNeighborScanTimerPerioid = %d",
@@ -2177,7 +2177,7 @@
 	pParam->fEnableMCCMode = cfg_params->fenableMCCMode;
 	pParam->fAllowMCCGODiffBI = cfg_params->fAllowMCCGODiffBI;
 	pParam->scanCfgAgingTime = pMac->scan.scanResultCfgAgingTime;
-	cdf_mem_copy(&pParam->neighborRoamConfig,
+	qdf_mem_copy(&pParam->neighborRoamConfig,
 		     &cfg_params->neighborRoamConfig,
 		     sizeof(tCsrNeighborRoamConfigParams));
 #ifdef WLAN_FEATURE_11AC
@@ -2191,7 +2191,7 @@
 	pParam->ignore_peer_erp_info = cfg_params->ignore_peer_erp_info;
 	pParam->enable2x2 = cfg_params->enable2x2;
 #endif
-	cdf_mem_copy(&cfg_params->csr11rConfig, &pParam->csr11rConfig,
+	qdf_mem_copy(&cfg_params->csr11rConfig, &pParam->csr11rConfig,
 		     sizeof(tCsr11rConfigParams));
 	pParam->isFastTransitionEnabled = cfg_params->isFastTransitionEnabled;
 	pParam->RoamRssiDiff = cfg_params->RoamRssiDiff;
@@ -2208,7 +2208,7 @@
 #ifdef FEATURE_WLAN_ESE
 	pParam->isEseIniFeatureEnabled = cfg_params->isEseIniFeatureEnabled;
 #endif
-	cdf_mem_copy(&pParam->neighborRoamConfig,
+	qdf_mem_copy(&pParam->neighborRoamConfig,
 		     &cfg_params->neighborRoamConfig,
 		     sizeof(tCsrNeighborRoamConfigParams));
 	sms_log(pMac, LOG1,
@@ -2396,7 +2396,7 @@
 	}
 	/*
 	 * Cleanup the rest of channels. Note we only need to clean up the
-	 * channels if we had to trim the list. Calling cdf_mem_set() with a 0
+	 * channels if we had to trim the list. Calling qdf_mem_set() with a 0
 	 * size is going to throw asserts on the debug builds so let's be a bit
 	 * smarter about that. Zero out the reset of the channels only if we
 	 * need to. The amount of memory to clear is the number of channesl that
@@ -2404,7 +2404,7 @@
 	 * channel in the structure.
 	 */
 	if (ch_lst->numChannels > num_channels) {
-		cdf_mem_set(&ch_lst->channelList[num_channels],
+		qdf_mem_set(&ch_lst->channelList[num_channels],
 			    sizeof(ch_lst->channelList[0]) *
 			    (ch_lst->numChannels - num_channels), 0);
 	}
@@ -2570,7 +2570,7 @@
 		ps11dinfo->Channels.numChannels)) {
 		pMac->scan.base_channels.numChannels =
 			ps11dinfo->Channels.numChannels;
-		cdf_mem_copy(pMac->scan.base_channels.channelList,
+		qdf_mem_copy(pMac->scan.base_channels.channelList,
 			     ps11dinfo->Channels.channelList,
 			     ps11dinfo->Channels.numChannels);
 	} else {
@@ -2579,21 +2579,21 @@
 	}
 	/* legacy maintenance */
 
-	cdf_mem_copy(pMac->scan.countryCodeDefault, ps11dinfo->countryCode,
+	qdf_mem_copy(pMac->scan.countryCodeDefault, ps11dinfo->countryCode,
 		     WNI_CFG_COUNTRY_CODE_LEN);
 
 	/* Tush: at csropen get this initialized with default, during csr reset if this */
 	/* already set with some value no need initilaize with default again */
 	if (0 == pMac->scan.countryCodeCurrent[0]) {
-		cdf_mem_copy(pMac->scan.countryCodeCurrent,
+		qdf_mem_copy(pMac->scan.countryCodeCurrent,
 			     ps11dinfo->countryCode, WNI_CFG_COUNTRY_CODE_LEN);
 	}
 	/* need to add the max power channel list */
 	pChanInfo =
-		cdf_mem_malloc(sizeof(tSirMacChanInfo) *
+		qdf_mem_malloc(sizeof(tSirMacChanInfo) *
 			       WNI_CFG_VALID_CHANNEL_LIST_LEN);
 	if (pChanInfo != NULL) {
-		cdf_mem_set(pChanInfo,
+		qdf_mem_set(pChanInfo,
 			    sizeof(tSirMacChanInfo) *
 			    WNI_CFG_VALID_CHANNEL_LIST_LEN, 0);
 
@@ -2616,7 +2616,7 @@
 							 sizeof(tSirMacChanInfo),
 							 pChanInfoStart);
 		}
-		cdf_mem_free(pChanInfoStart);
+		qdf_mem_free(pChanInfoStart);
 	}
 	/* Only apply them to CFG when not in STOP state. Otherwise they will be applied later */
 	if (QDF_IS_STATUS_SUCCESS(status)) {
@@ -2652,10 +2652,10 @@
 	}
 
 	pChanInfo =
-		cdf_mem_malloc(sizeof(tSirMacChanInfo) *
+		qdf_mem_malloc(sizeof(tSirMacChanInfo) *
 			       WNI_CFG_VALID_CHANNEL_LIST_LEN);
 	if (pChanInfo != NULL) {
-		cdf_mem_set(pChanInfo,
+		qdf_mem_set(pChanInfo,
 			    sizeof(tSirMacChanInfo) *
 			    WNI_CFG_VALID_CHANNEL_LIST_LEN, 0);
 		pChanInfoStart = pChanInfo;
@@ -2678,7 +2678,7 @@
 							 sizeof(tSirMacChanInfo),
 							 pChanInfoStart);
 		}
-		cdf_mem_free(pChanInfoStart);
+		qdf_mem_free(pChanInfoStart);
 	}
 
 	return QDF_STATUS_SUCCESS;
@@ -2694,7 +2694,7 @@
 	tSmeCmd *pDupCommand;
 	tDblLinkList localList;
 
-	cdf_mem_zero(&localList, sizeof(tDblLinkList));
+	qdf_mem_zero(&localList, sizeof(tDblLinkList));
 	if (!QDF_IS_STATUS_SUCCESS(csr_ll_open(pMac->hHdd, &localList))) {
 		sms_log(pMac, LOGE, FL(" failed to open list"));
 		return;
@@ -2719,7 +2719,7 @@
 			 * suffice as pCommand will always be NULL for STA
 			 * scenarios
 			 */
-			 (cdf_mem_compare
+			 (!qdf_mem_cmp
 				  (pDupCommand->u.roamCmd.peerMac,
 				  pCommand->u.roamCmd.peerMac,
 				  QDF_MAC_ADDR_SIZE))
@@ -2842,7 +2842,7 @@
 		sms_log(pMac, LOGW,
 			FL("Assoc complete result=%d status=%d reason=%d"),
 			u2, pRoamInfo->statusCode, pRoamInfo->reasonCode);
-		beacon_ies = cdf_mem_malloc(sizeof(tDot11fBeaconIEs));
+		beacon_ies = qdf_mem_malloc(sizeof(tDot11fBeaconIEs));
 		if ((NULL != beacon_ies) && (NULL != pRoamInfo->pBssDesc)) {
 			status = csr_parse_bss_description_ies(
 					(tHalHandle) pMac, pRoamInfo->pBssDesc,
@@ -2874,7 +2874,7 @@
 		pRoamInfo->chan_info.reg_info_2 =
 			(csr_get_cfg_max_tx_power(pMac,
 				pRoamInfo->chan_info.chan_id) << 8);
-		cdf_mem_free(beacon_ies);
+		qdf_mem_free(beacon_ies);
 	} else if ((u1 == eCSR_ROAM_FT_REASSOC_FAILED)
 			&& (pSession->bRefAssocStartCnt)) {
 		/*
@@ -2916,7 +2916,7 @@
 	 *                    eCSR_ROAM_DISASSOCIATED,
 	 */
 #ifdef FEATURE_WLAN_DIAG_SUPPORT_CSR
-	cdf_mem_set(&connectionStatus,
+	qdf_mem_set(&connectionStatus,
 			sizeof(host_event_wlan_status_payload_type), 0);
 
 	if ((eCSR_ROAM_ASSOCIATION_COMPLETION == u1)
@@ -2944,18 +2944,18 @@
 		connectionStatus.encryptionType =
 			(uint8_t) diag_enc_type_from_csr_type(
 				pRoamInfo->u.pConnectedProfile->EncryptionType);
-		cdf_mem_copy(connectionStatus.ssid,
+		qdf_mem_copy(connectionStatus.ssid,
 				pRoamInfo->u.pConnectedProfile->SSID.ssId, 6);
 
 		connectionStatus.reason = eCSR_REASON_UNSPECIFIED;
-		cdf_mem_copy(&pMac->sme.eventPayload, &connectionStatus,
+		qdf_mem_copy(&pMac->sme.eventPayload, &connectionStatus,
 				sizeof(host_event_wlan_status_payload_type));
 		WLAN_HOST_DIAG_EVENT_REPORT(&connectionStatus,
 				EVENT_WLAN_STATUS);
 	}
 	if ((eCSR_ROAM_MIC_ERROR_IND == u1)
 			|| (eCSR_ROAM_RESULT_MIC_FAILURE == u2)) {
-		cdf_mem_copy(&connectionStatus, &pMac->sme.eventPayload,
+		qdf_mem_copy(&connectionStatus, &pMac->sme.eventPayload,
 				sizeof(host_event_wlan_status_payload_type));
 		if (IS_SIR_STATUS_SUCCESS(wlan_cfg_get_int(pMac,
 				WNI_CFG_CURRENT_RSSI, &rssi)))
@@ -2967,7 +2967,7 @@
 				EVENT_WLAN_STATUS);
 	}
 	if (eCSR_ROAM_RESULT_FORCED == u2) {
-		cdf_mem_copy(&connectionStatus, &pMac->sme.eventPayload,
+		qdf_mem_copy(&connectionStatus, &pMac->sme.eventPayload,
 				sizeof(host_event_wlan_status_payload_type));
 		if (IS_SIR_STATUS_SUCCESS(wlan_cfg_get_int(pMac,
 				WNI_CFG_CURRENT_RSSI, &rssi)))
@@ -2979,7 +2979,7 @@
 				EVENT_WLAN_STATUS);
 	}
 	if (eCSR_ROAM_RESULT_DISASSOC_IND == u2) {
-		cdf_mem_copy(&connectionStatus, &pMac->sme.eventPayload,
+		qdf_mem_copy(&connectionStatus, &pMac->sme.eventPayload,
 				sizeof(host_event_wlan_status_payload_type));
 		if (IS_SIR_STATUS_SUCCESS(wlan_cfg_get_int(pMac,
 				WNI_CFG_CURRENT_RSSI, &rssi)))
@@ -2995,7 +2995,7 @@
 				EVENT_WLAN_STATUS);
 	}
 	if (eCSR_ROAM_RESULT_DEAUTH_IND == u2) {
-		cdf_mem_copy(&connectionStatus, &pMac->sme.eventPayload,
+		qdf_mem_copy(&connectionStatus, &pMac->sme.eventPayload,
 				sizeof(host_event_wlan_status_payload_type));
 		if (IS_SIR_STATUS_SUCCESS(wlan_cfg_get_int(pMac,
 				WNI_CFG_CURRENT_RSSI, &rssi)))
@@ -3055,7 +3055,7 @@
 			      pNeighborRoamInfo->csrNeighborRoamProfile.BSSIDs.
 			      bssid);
 	} else if (pSession->pConnectBssDesc) {
-		cdf_mem_copy(&bssId.bytes, pSession->pConnectBssDesc->bssId,
+		qdf_mem_copy(&bssId.bytes, pSession->pConnectBssDesc->bssId,
 			     sizeof(struct qdf_mac_addr));
 	}
 
@@ -3114,7 +3114,7 @@
 		pCommand->command = eSmeCommandRoam;
 		pCommand->sessionId = (uint8_t) sessionId;
 		pCommand->u.roamCmd.roamReason = eCsrForcedDisassocSta;
-		cdf_mem_copy(pCommand->u.roamCmd.peerMac, pPeerMacAddr, 6);
+		qdf_mem_copy(pCommand->u.roamCmd.peerMac, pPeerMacAddr, 6);
 		pCommand->u.roamCmd.reason = (tSirMacReasonCodes) reason;
 		status = csr_queue_sme_command(pMac, pCommand, false);
 		if (!QDF_IS_STATUS_SUCCESS(status)) {
@@ -3153,7 +3153,7 @@
 		pCommand->command = eSmeCommandRoam;
 		pCommand->sessionId = (uint8_t) sessionId;
 		pCommand->u.roamCmd.roamReason = eCsrForcedDeauthSta;
-		cdf_mem_copy(pCommand->u.roamCmd.peerMac,
+		qdf_mem_copy(pCommand->u.roamCmd.peerMac,
 			     pDelStaParams->peerMacAddr.bytes,
 			     sizeof(tSirMacAddr));
 		pCommand->u.roamCmd.reason =
@@ -3177,14 +3177,14 @@
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
 	tSirSmeTkipCntrMeasReq *pMsg;
 	do {
-		pMsg = cdf_mem_malloc(sizeof(tSirSmeTkipCntrMeasReq));
+		pMsg = qdf_mem_malloc(sizeof(tSirSmeTkipCntrMeasReq));
 		if (NULL == pMsg)
 			status = QDF_STATUS_E_NOMEM;
 		else
 			status = QDF_STATUS_SUCCESS;
 		if (!QDF_IS_STATUS_SUCCESS(status))
 			break;
-		cdf_mem_set(pMsg, sizeof(tSirSmeTkipCntrMeasReq), 0);
+		qdf_mem_set(pMsg, sizeof(tSirSmeTkipCntrMeasReq), 0);
 		pMsg->messageType = eWNI_SME_TKIP_CNTR_MEAS_REQ;
 		pMsg->length = sizeof(tSirSmeTkipCntrMeasReq);
 		pMsg->sessionId = sessionId;
@@ -3209,7 +3209,7 @@
 		return status;
 	}
 	if (pSession->pConnectBssDesc) {
-		cdf_mem_copy(bssId.bytes, pSession->pConnectBssDesc->bssId,
+		qdf_mem_copy(bssId.bytes, pSession->pConnectBssDesc->bssId,
 			     sizeof(struct qdf_mac_addr));
 	} else {
 		sms_log(pMac, LOGE,
@@ -3239,7 +3239,7 @@
 		return status;
 	}
 	if (pSession->pConnectBssDesc) {
-		cdf_mem_copy(bssId.bytes, pSession->pConnectBssDesc->bssId,
+		qdf_mem_copy(bssId.bytes, pSession->pConnectBssDesc->bssId,
 			     sizeof(struct qdf_mac_addr));
 	} else {
 		sms_log(pMac, LOGE,
@@ -3273,7 +3273,7 @@
 		return status;
 	}
 	if (pSession->pConnectBssDesc) {
-		cdf_mem_copy(bssId.bytes, pSession->pConnectBssDesc->bssId,
+		qdf_mem_copy(bssId.bytes, pSession->pConnectBssDesc->bssId,
 			     sizeof(struct qdf_mac_addr));
 	} else {
 		sms_log(pMac, LOGE,
@@ -3303,7 +3303,7 @@
 	}
 
 	if (pSession->pConnectBssDesc) {
-		cdf_mem_copy(bssId.bytes, pSession->pConnectBssDesc->bssId,
+		qdf_mem_copy(bssId.bytes, pSession->pConnectBssDesc->bssId,
 			     sizeof(struct qdf_mac_addr));
 	}
 	sms_log(pMac, LOG2, "CSR Attempting to Deauth Bssid= " MAC_ADDRESS_STR,
@@ -3352,12 +3352,12 @@
 			}
 		}
 		if (NULL == pSession->pConnectBssDesc) {
-			pSession->pConnectBssDesc = cdf_mem_malloc(size);
+			pSession->pConnectBssDesc = qdf_mem_malloc(size);
 		}
 		if (NULL == pSession->pConnectBssDesc)
 			status = QDF_STATUS_E_NOMEM;
 		else
-			cdf_mem_copy(pSession->pConnectBssDesc, pBssDesc, size);
+			qdf_mem_copy(pSession->pConnectBssDesc, pBssDesc, size);
 	}
 	return status;
 }
@@ -3373,13 +3373,13 @@
 	if (pIes == NULL)
 		return QDF_STATUS_E_FAILURE;
 
-	cdf_mem_copy(&pBssConfig->BssCap, &pBssDesc->capabilityInfo,
+	qdf_mem_copy(&pBssConfig->BssCap, &pBssDesc->capabilityInfo,
 		     sizeof(tSirMacCapabilityInfo));
 	/* get qos */
 	pBssConfig->qosType = csr_get_qo_s_from_bss_desc(pMac, pBssDesc, pIes);
 	/* get SSID */
 	if (pIes->SSID.present) {
-		cdf_mem_copy(&pBssConfig->SSID.ssId, pIes->SSID.ssid,
+		qdf_mem_copy(&pBssConfig->SSID.ssId, pIes->SSID.ssid,
 			     pIes->SSID.num_ssid);
 		pBssConfig->SSID.length = pIes->SSID.num_ssid;
 	} else
@@ -3501,7 +3501,7 @@
 	pBssConfig->SSID.length = 0;
 	if (pProfile->SSIDs.numOfSSIDs) {
 		/* only use the first one */
-		cdf_mem_copy(&pBssConfig->SSID,
+		qdf_mem_copy(&pBssConfig->SSID,
 			     &pProfile->SSIDs.SSIDList[0].SSID,
 			     sizeof(tSirMacSSid));
 	} else {
@@ -3616,7 +3616,7 @@
 	} while (0);
 
 	if (NULL != pIes) {
-		cdf_mem_free(pIes);
+		qdf_mem_free(pIes);
 	}
 
 	return status;
@@ -3668,7 +3668,7 @@
 		 * clear those that are not present in this profile.
 		 */
 		if (pProfile->Keys.KeyLength[0]) {
-			cdf_mem_copy(Key0,
+			qdf_mem_copy(Key0,
 				pProfile->Keys.KeyMaterial[0],
 				WNI_CFG_WEP_KEY_LENGTH_5);
 			Key0Length = WNI_CFG_WEP_KEY_LENGTH_5;
@@ -3677,7 +3677,7 @@
 		}
 
 		if (pProfile->Keys.KeyLength[1]) {
-			cdf_mem_copy(Key1,
+			qdf_mem_copy(Key1,
 				pProfile->Keys.KeyMaterial[1],
 				WNI_CFG_WEP_KEY_LENGTH_5);
 			Key1Length = WNI_CFG_WEP_KEY_LENGTH_5;
@@ -3686,7 +3686,7 @@
 		}
 
 		if (pProfile->Keys.KeyLength[2]) {
-			cdf_mem_copy(Key2,
+			qdf_mem_copy(Key2,
 				pProfile->Keys.KeyMaterial[2],
 				WNI_CFG_WEP_KEY_LENGTH_5);
 			Key2Length = WNI_CFG_WEP_KEY_LENGTH_5;
@@ -3695,7 +3695,7 @@
 		}
 
 		if (pProfile->Keys.KeyLength[3]) {
-			cdf_mem_copy(Key3,
+			qdf_mem_copy(Key3,
 				pProfile->Keys.KeyMaterial[3],
 				WNI_CFG_WEP_KEY_LENGTH_5);
 			Key3Length = WNI_CFG_WEP_KEY_LENGTH_5;
@@ -3719,7 +3719,7 @@
 		 * those that are not present in this profile.
 		 */
 		if (pProfile->Keys.KeyLength[0]) {
-			cdf_mem_copy(Key0,
+			qdf_mem_copy(Key0,
 				pProfile->Keys.KeyMaterial[0],
 				WNI_CFG_WEP_KEY_LENGTH_13);
 			Key0Length = WNI_CFG_WEP_KEY_LENGTH_13;
@@ -3728,7 +3728,7 @@
 		}
 
 		if (pProfile->Keys.KeyLength[1]) {
-			cdf_mem_copy(Key1,
+			qdf_mem_copy(Key1,
 				pProfile->Keys.KeyMaterial[1],
 				WNI_CFG_WEP_KEY_LENGTH_13);
 			Key1Length = WNI_CFG_WEP_KEY_LENGTH_13;
@@ -3737,7 +3737,7 @@
 		}
 
 		if (pProfile->Keys.KeyLength[2]) {
-			cdf_mem_copy(Key2,
+			qdf_mem_copy(Key2,
 				pProfile->Keys.KeyMaterial[2],
 				WNI_CFG_WEP_KEY_LENGTH_13);
 			Key2Length = WNI_CFG_WEP_KEY_LENGTH_13;
@@ -3746,7 +3746,7 @@
 		}
 
 		if (pProfile->Keys.KeyLength[3]) {
-			cdf_mem_copy(Key3,
+			qdf_mem_copy(Key3,
 				pProfile->Keys.KeyMaterial[3],
 				WNI_CFG_WEP_KEY_LENGTH_13);
 			Key3Length = WNI_CFG_WEP_KEY_LENGTH_13;
@@ -3852,8 +3852,8 @@
 	eCsrCfgDot11Mode cfgDot11Mode;
 	uint8_t *pDstRate;
 	uint16_t rateBitmap = 0;
-	cdf_mem_set(pOpRateSet, sizeof(tSirMacRateSet), 0);
-	cdf_mem_set(pExRateSet, sizeof(tSirMacRateSet), 0);
+	qdf_mem_set(pOpRateSet, sizeof(tSirMacRateSet), 0);
+	qdf_mem_set(pExRateSet, sizeof(tSirMacRateSet), 0);
 	QDF_ASSERT(pIes != NULL);
 
 	if (NULL == pIes) {
@@ -4057,7 +4057,7 @@
 		OperationalRatesLength =
 			DefaultSupportedRates11a.supportedRateSet.numRates *
 			sizeof(*DefaultSupportedRates11a.supportedRateSet.rate);
-		cdf_mem_copy(OperationalRates,
+		qdf_mem_copy(OperationalRates,
 			     DefaultSupportedRates11a.supportedRateSet.rate,
 			     OperationalRatesLength);
 
@@ -4068,7 +4068,7 @@
 			ProprietaryOperationalRatesLength =
 				DefaultSupportedPropRates.numPropRates *
 				sizeof(*DefaultSupportedPropRates.propRate);
-			cdf_mem_copy(ProprietaryOperationalRates,
+			qdf_mem_copy(ProprietaryOperationalRates,
 				     DefaultSupportedPropRates.propRate,
 				     ProprietaryOperationalRatesLength);
 		} else {
@@ -4080,7 +4080,7 @@
 		OperationalRatesLength =
 			DefaultSupportedRates11b.supportedRateSet.numRates *
 			sizeof(*DefaultSupportedRates11b.supportedRateSet.rate);
-		cdf_mem_copy(OperationalRates,
+		qdf_mem_copy(OperationalRates,
 			     DefaultSupportedRates11b.supportedRateSet.rate,
 			     OperationalRatesLength);
 		/* Nothing in the Extended rate set. */
@@ -4094,7 +4094,7 @@
 		OperationalRatesLength =
 			DefaultSupportedRates11b.supportedRateSet.numRates *
 			sizeof(*DefaultSupportedRates11b.supportedRateSet.rate);
-		cdf_mem_copy(OperationalRates,
+		qdf_mem_copy(OperationalRates,
 			     DefaultSupportedRates11b.supportedRateSet.rate,
 			     OperationalRatesLength);
 
@@ -4102,7 +4102,7 @@
 		ExtendedOperationalRatesLength =
 			DefaultSupportedRates11a.supportedRateSet.numRates *
 			sizeof(*DefaultSupportedRates11a.supportedRateSet.rate);
-		cdf_mem_copy(ExtendedOperationalRates,
+		qdf_mem_copy(ExtendedOperationalRates,
 			     DefaultSupportedRates11a.supportedRateSet.rate,
 			     ExtendedOperationalRatesLength);
 
@@ -4111,7 +4111,7 @@
 			ProprietaryOperationalRatesLength =
 				DefaultSupportedPropRates.numPropRates *
 				sizeof(*DefaultSupportedPropRates.propRate);
-			cdf_mem_copy(ProprietaryOperationalRates,
+			qdf_mem_copy(ProprietaryOperationalRates,
 				     DefaultSupportedPropRates.propRate,
 				     ProprietaryOperationalRatesLength);
 		} else {
@@ -4225,7 +4225,7 @@
 			} else {
 				/* Let's also update the below to make sure we don't update CC while */
 				/* connected to an AP which is advertising some CC */
-				cdf_mem_copy(pMac->scan.currentCountryBssid.bytes,
+				qdf_mem_copy(pMac->scan.currentCountryBssid.bytes,
 					     pBssDesc->bssId,
 					     sizeof(tSirMacAddr));
 			}
@@ -4300,11 +4300,11 @@
 		return QDF_STATUS_E_FAILURE;
 	}
 
-	pBssConfig = cdf_mem_malloc(sizeof(tBssConfigParam));
+	pBssConfig = qdf_mem_malloc(sizeof(tBssConfigParam));
 	if (NULL == pBssConfig)
 		return QDF_STATUS_E_NOMEM;
 
-	cdf_mem_set(pBssConfig, sizeof(tBssConfigParam), 0);
+	qdf_mem_set(pBssConfig, sizeof(tBssConfigParam), 0);
 	status = csr_roam_prepare_bss_config(pMac, pProfile, pBssDesc,
 			pBssConfig, pIes);
 	if (QDF_IS_STATUS_SUCCESS(status)) {
@@ -4364,7 +4364,7 @@
 					is11rRoamingFlag);
 		}
 	} /* Success getting BSS config info */
-	cdf_mem_free(pBssConfig);
+	qdf_mem_free(pBssConfig);
 	return status;
 }
 
@@ -4392,7 +4392,7 @@
 				profile))
 		return eCsrReassocToSelfNoCapChange;
 	/* The key changes */
-	cdf_mem_set(&bssConfig, sizeof(bssConfig), 0);
+	qdf_mem_set(&bssConfig, sizeof(bssConfig), 0);
 	status = csr_roam_prepare_bss_config(mac_ctx, profile, bss_descr,
 				&bssConfig, ies_local);
 	if (QDF_IS_STATUS_SUCCESS(status)) {
@@ -4487,7 +4487,7 @@
 	}
 
 	if (pIesLocal && !pScanResult->pvIes)
-		cdf_mem_free(pIesLocal);
+		qdf_mem_free(pIesLocal);
 	return eRoamState;
 }
 
@@ -4496,7 +4496,7 @@
 {
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
 	tCsrRoamInfo roamInfo;
-	cdf_mem_set(&roamInfo, sizeof(tCsrRoamInfo), 0);
+	qdf_mem_set(&roamInfo, sizeof(tCsrRoamInfo), 0);
 	roamInfo.pBssDesc = pBssDesc;
 	status =
 		csr_roam_call_callback(pMac, sessionId, &roamInfo, roamId,
@@ -4681,7 +4681,7 @@
 			csr_set_abort_roaming_command(mac_ctx, cmd);
 			return;
 		}
-		cdf_mem_set(roam_info_ptr, sizeof(tCsrRoamInfo), 0);
+		qdf_mem_set(roam_info_ptr, sizeof(tCsrRoamInfo), 0);
 		if (!scan_result)
 			cmd->u.roamCmd.roamProfile.uapsd_mask = 0;
 		else
@@ -4711,7 +4711,7 @@
 			cmd->u.roamCmd.roamProfile.uapsd_mask = 0;
 		}
 		if (ies_local && !result->pvIes)
-			cdf_mem_free(ies_local);
+			qdf_mem_free(ies_local);
 		roam_info_ptr->pProfile = profile;
 		session->bRefAssocStartCnt++;
 		csr_roam_call_callback(mac_ctx, session_id, roam_info_ptr,
@@ -4825,8 +4825,8 @@
 		return eCsrStopRoaming;
 	}
 
-	cdf_mem_set(&roam_info, sizeof(roam_info), 0);
-	cdf_mem_copy(&roam_info.bssid, &session->joinFailStatusCode.bssId,
+	qdf_mem_set(&roam_info, sizeof(roam_info), 0);
+	qdf_mem_copy(&roam_info.bssid, &session->joinFailStatusCode.bssId,
 			sizeof(tSirMacAddr));
 	/*
 	 * When handling AP's capability change, continue to associate
@@ -5069,7 +5069,7 @@
 				csr_release_command_roam(mac_ctx, cmd);
 			}
 
-			cdf_mem_free(pIes);
+			qdf_mem_free(pIes);
 			pIes = NULL;
 		}
 	} else {
@@ -5182,9 +5182,9 @@
 			/* Remember the roaming profile */
 			csr_free_roam_profile(pMac, sessionId);
 			pSession->pCurRoamProfile =
-					cdf_mem_malloc(sizeof(tCsrRoamProfile));
+					qdf_mem_malloc(sizeof(tCsrRoamProfile));
 			if (NULL != pSession->pCurRoamProfile) {
-				cdf_mem_set(pSession->pCurRoamProfile,
+				qdf_mem_set(pSession->pCurRoamProfile,
 					sizeof(tCsrRoamProfile), 0);
 				csr_roam_copy_profile(pMac,
 					pSession->pCurRoamProfile,
@@ -5212,7 +5212,7 @@
 	pCommand->u.roamCmd.pLastRoamBss = NULL;
 	pCommand->u.roamCmd.pRoamBssEntry = NULL;
 	/* Because u.roamCmd is union and share with scanCmd and StatusChange */
-	cdf_mem_set(&pCommand->u.roamCmd, sizeof(tRoamCmd), 0);
+	qdf_mem_set(&pCommand->u.roamCmd, sizeof(tRoamCmd), 0);
 }
 
 void csr_reinit_roam_cmd(tpAniSirGlobal pMac, tSmeCmd *pCommand)
@@ -5228,12 +5228,12 @@
 	}
 	pCommand->u.roamCmd.pRoamBssEntry = NULL;
 	/* Because u.roamCmd is union and share with scanCmd and StatusChange */
-	cdf_mem_set(&pCommand->u.roamCmd, sizeof(tRoamCmd), 0);
+	qdf_mem_set(&pCommand->u.roamCmd, sizeof(tRoamCmd), 0);
 }
 
 void csr_reinit_wm_status_change_cmd(tpAniSirGlobal pMac, tSmeCmd *pCommand)
 {
-	cdf_mem_set(&pCommand->u.wmStatusChangeCmd, sizeof(tWmStatusChangeCmd),
+	qdf_mem_set(&pCommand->u.wmStatusChangeCmd, sizeof(tWmStatusChangeCmd),
 		    0);
 }
 
@@ -5291,7 +5291,7 @@
 		sms_log(pMac, LOGE, FL("  session %d not found "), sessionId);
 		return;
 	}
-	cdf_mem_set(&(pSession->PmkidCandidateInfo[0]),
+	qdf_mem_set(&(pSession->PmkidCandidateInfo[0]),
 		    sizeof(tPmkidCandidateInfo) * CSR_MAX_PMKID_ALLOWED, 0);
 	pSession->NumPmkidCandidate = 0;
 }
@@ -5304,7 +5304,7 @@
 		sms_log(pMac, LOGE, FL("  session %d not found "), sessionId);
 		return;
 	}
-	cdf_mem_set(&(pSession->BkidCandidateInfo[0]),
+	qdf_mem_set(&(pSession->BkidCandidateInfo[0]),
 		    sizeof(tBkidCandidateInfo) * CSR_MAX_BKID_ALLOWED, 0);
 	pSession->NumBkidCandidate = 0;
 }
@@ -5355,41 +5355,41 @@
 				nIeLen += 2 + rsnie->pmkid_count * 4;
 
 			/* nIeLen doesn't count EID and length fields */
-			session_ptr->pWpaRsnRspIE = cdf_mem_malloc(nIeLen + 2);
+			session_ptr->pWpaRsnRspIE = qdf_mem_malloc(nIeLen + 2);
 			if (NULL == session_ptr->pWpaRsnRspIE)
 				return QDF_STATUS_E_NOMEM;
 
-			cdf_mem_set(session_ptr->pWpaRsnRspIE,
+			qdf_mem_set(session_ptr->pWpaRsnRspIE,
 					nIeLen + 2, 0);
 			session_ptr->pWpaRsnRspIE[0] = DOT11F_EID_RSN;
 			session_ptr->pWpaRsnRspIE[1] = (uint8_t) nIeLen;
 			/* copy upto akm_suites */
 			pIeBuf = session_ptr->pWpaRsnRspIE + 2;
-			cdf_mem_copy(pIeBuf, &rsnie->version,
+			qdf_mem_copy(pIeBuf, &rsnie->version,
 					sizeof(rsnie->version));
 			pIeBuf += sizeof(rsnie->version);
-			cdf_mem_copy(pIeBuf, &rsnie->gp_cipher_suite,
+			qdf_mem_copy(pIeBuf, &rsnie->gp_cipher_suite,
 				sizeof(rsnie->gp_cipher_suite));
 			pIeBuf += sizeof(rsnie->gp_cipher_suite);
-			cdf_mem_copy(pIeBuf, &rsnie->pwise_cipher_suite_count,
+			qdf_mem_copy(pIeBuf, &rsnie->pwise_cipher_suite_count,
 				sizeof(rsnie->pwise_cipher_suite_count));
 			pIeBuf += sizeof(rsnie->pwise_cipher_suite_count);
 			if (rsnie->pwise_cipher_suite_count) {
 				/* copy pwise_cipher_suites */
-				cdf_mem_copy(pIeBuf, rsnie->pwise_cipher_suites,
+				qdf_mem_copy(pIeBuf, rsnie->pwise_cipher_suites,
 					rsnie->pwise_cipher_suite_count * 4);
 				pIeBuf += rsnie->pwise_cipher_suite_count * 4;
 			}
-			cdf_mem_copy(pIeBuf, &rsnie->akm_suite_count, 2);
+			qdf_mem_copy(pIeBuf, &rsnie->akm_suite_count, 2);
 			pIeBuf += 2;
 			if (rsnie->akm_suite_count) {
 				/* copy akm_suites */
-				cdf_mem_copy(pIeBuf, rsnie->akm_suites,
+				qdf_mem_copy(pIeBuf, rsnie->akm_suites,
 					rsnie->akm_suite_count * 4);
 				pIeBuf += rsnie->akm_suite_count * 4;
 			}
 			/* copy the rest */
-			cdf_mem_copy(pIeBuf, rsnie->akm_suites +
+			qdf_mem_copy(pIeBuf, rsnie->akm_suites +
 				rsnie->akm_suite_count * 4,
 				2 + rsnie->pmkid_count * 4);
 			session_ptr->nWpaRsnRspIeLength = nIeLen + 2;
@@ -5408,19 +5408,19 @@
 			 * we always "send" zero, so just remove it.  This is
 			 * consistent with our assumptions in the frames
 			 * compiler; nIeLen doesn't count EID & length fields */
-			session_ptr->pWpaRsnRspIE = cdf_mem_malloc(nIeLen + 2);
+			session_ptr->pWpaRsnRspIE = qdf_mem_malloc(nIeLen + 2);
 			if (NULL == session_ptr->pWpaRsnRspIE)
 				return QDF_STATUS_E_NOMEM;
 			session_ptr->pWpaRsnRspIE[0] = DOT11F_EID_WPA;
 			session_ptr->pWpaRsnRspIE[1] = (uint8_t) nIeLen;
 			pIeBuf = session_ptr->pWpaRsnRspIE + 2;
 			/* Copy WPA OUI */
-			cdf_mem_copy(pIeBuf, &csr_wpa_oui[1], 4);
+			qdf_mem_copy(pIeBuf, &csr_wpa_oui[1], 4);
 			pIeBuf += 4;
-			cdf_mem_copy(pIeBuf, &wpaie->version,
+			qdf_mem_copy(pIeBuf, &wpaie->version,
 				8 + wpaie->unicast_cipher_count * 4);
 			pIeBuf += 8 + wpaie->unicast_cipher_count * 4;
-			cdf_mem_copy(pIeBuf, &wpaie->auth_suite_count,
+			qdf_mem_copy(pIeBuf, &wpaie->auth_suite_count,
 				2 + wpaie->auth_suite_count * 4);
 			pIeBuf += wpaie->auth_suite_count * 4;
 			session_ptr->nWpaRsnRspIeLength = nIeLen + 2;
@@ -5443,48 +5443,48 @@
 
 			/* nIeLen doesn't count EID and length fields */
 			session_ptr->pWapiRspIE =
-				cdf_mem_malloc(nIeLen + 2);
+				qdf_mem_malloc(nIeLen + 2);
 			if (NULL == session_ptr->pWapiRspIE)
 				return QDF_STATUS_E_NOMEM;
 			session_ptr->pWapiRspIE[0] = DOT11F_EID_WAPI;
 			session_ptr->pWapiRspIE[1] = (uint8_t) nIeLen;
 			pIeBuf = session_ptr->pWapiRspIE + 2;
 			/* copy upto akm_suite_count */
-			cdf_mem_copy(pIeBuf, &wapi_ie->version, 2);
+			qdf_mem_copy(pIeBuf, &wapi_ie->version, 2);
 			pIeBuf += 4;
 			if (wapi_ie->akm_suite_count) {
 				/* copy akm_suites */
-				cdf_mem_copy(pIeBuf,
+				qdf_mem_copy(pIeBuf,
 					wapi_ie->akm_suites,
 					wapi_ie->akm_suite_count * 4);
 				pIeBuf += wapi_ie->akm_suite_count * 4;
 			}
-			cdf_mem_copy(pIeBuf,
+			qdf_mem_copy(pIeBuf,
 				&wapi_ie->unicast_cipher_suite_count, 2);
 			pIeBuf += 2;
 			if (wapi_ie->unicast_cipher_suite_count) {
 				uint16_t suite_size =
 					wapi_ie->unicast_cipher_suite_count * 4;
 				/* copy pwise_cipher_suites */
-				cdf_mem_copy(pIeBuf,
+				qdf_mem_copy(pIeBuf,
 					wapi_ie->unicast_cipher_suites,
 					suite_size);
 				pIeBuf += suite_size;
 			}
 			/* gp_cipher_suite */
-			cdf_mem_copy(pIeBuf,
+			qdf_mem_copy(pIeBuf,
 				wapi_ie->multicast_cipher_suite, 4);
 			pIeBuf += 4;
 			/* preauth + reserved */
-			cdf_mem_copy(pIeBuf,
+			qdf_mem_copy(pIeBuf,
 				wapi_ie->multicast_cipher_suite + 4, 2);
 			pIeBuf += 2;
 			if (wapi_ie->bkid_count) {
 				/* bkid_count */
-				cdf_mem_copy(pIeBuf, &wapi_ie->bkid_count, 2);
+				qdf_mem_copy(pIeBuf, &wapi_ie->bkid_count, 2);
 				pIeBuf += 2;
 				/* copy akm_suites */
-				cdf_mem_copy(pIeBuf, wapi_ie->bkid,
+				qdf_mem_copy(pIeBuf, wapi_ie->bkid,
 					wapi_ie->bkid_count * 4);
 				pIeBuf += wapi_ie->bkid_count * 4;
 			}
@@ -5534,7 +5534,7 @@
 					pIes, pIesLocal);
 			if (!pIes)
 				/* locally allocated */
-				cdf_mem_free(pIesLocal);
+				qdf_mem_free(pIesLocal);
 		}
 	}
 	return status;
@@ -5658,7 +5658,7 @@
 		  "%s: Roam Synch Failed, Clean Up", __func__);
 	session->roam_synch_in_progress = false;
 
-	roam_offload_failed = cdf_mem_malloc(
+	roam_offload_failed = qdf_mem_malloc(
 				sizeof(struct roam_offload_synch_fail));
 	if (NULL == roam_offload_failed) {
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
@@ -5676,7 +5676,7 @@
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG,
 			"%s: Unable to post WMA_ROAM_OFFLOAD_SYNCH_FAIL to WMA",
 			__func__);
-		cdf_mem_free(roam_offload_failed);
+		qdf_mem_free(roam_offload_failed);
 	}
 }
 #endif
@@ -5755,12 +5755,12 @@
 	case eCsrSmeIssuedDisassocForHandoff:
 		csr_roam_state_change(mac_ctx, eCSR_ROAMING_STATE_IDLE,
 			session_id);
-		cdf_mem_set(&roam_info, sizeof(tCsrRoamInfo), 0);
+		qdf_mem_set(&roam_info, sizeof(tCsrRoamInfo), 0);
 		roam_info.pBssDesc = cmd->u.roamCmd.pLastRoamBss;
 		roam_info.pProfile = &cmd->u.roamCmd.roamProfile;
 		roam_info.statusCode = session->joinFailStatusCode.statusCode;
 		roam_info.reasonCode = session->joinFailStatusCode.reasonCode;
-		cdf_mem_copy(&roam_info.bssid,
+		qdf_mem_copy(&roam_info.bssid,
 			&session->joinFailStatusCode.bssId,
 			sizeof(struct qdf_mac_addr));
 
@@ -5881,7 +5881,7 @@
 			CSR_IS_INFRA_AP(&session->connectedProfile)) {
 			roam_info.u.pConnectedProfile =
 				&session->connectedProfile;
-			cdf_mem_copy(roam_info.peerMac.bytes,
+			qdf_mem_copy(roam_info.peerMac.bytes,
 					cmd->u.roamCmd.peerMac,
 					sizeof(tSirMacAddr));
 			roam_info.reasonCode = eCSR_ROAM_RESULT_FORCED;
@@ -5953,7 +5953,7 @@
 	sms_log(mac_ctx, LOG2, FL("receives start BSS ok indication"));
 	status = QDF_STATUS_E_FAILURE;
 	start_bss_rsp = (tSirSmeStartBssRsp *) context;
-	cdf_mem_set(&roam_info, sizeof(tCsrRoamInfo), 0);
+	qdf_mem_set(&roam_info, sizeof(tCsrRoamInfo), 0);
 	if (CSR_IS_IBSS(profile))
 		session->connectState = eCSR_ASSOC_STATE_TYPE_IBSS_DISCONNECTED;
 	else if (CSR_IS_INFRA_AP(profile))
@@ -5986,11 +5986,11 @@
 	if (bss_desc) {
 		csr_roam_save_connected_infomation(mac_ctx, session_id,
 				profile, bss_desc, ies_ptr);
-		cdf_mem_copy(&roam_info.bssid, &bss_desc->bssId,
+		qdf_mem_copy(&roam_info.bssid, &bss_desc->bssId,
 			sizeof(struct qdf_mac_addr));
 	}
 	/* We are done with the IEs so free it */
-	cdf_mem_free(ies_ptr);
+	qdf_mem_free(ies_ptr);
 #ifdef FEATURE_WLAN_DIAG_SUPPORT_CSR
 	WLAN_HOST_DIAG_LOG_ALLOC(ibss_log,
 		host_log_ibss_pkt_type, LOG_WLAN_IBSS_C);
@@ -6008,7 +6008,7 @@
 				WLAN_IBSS_EVENT_JOIN_IBSS_RSP;
 		}
 		if (bss_desc) {
-			cdf_mem_copy(ibss_log->bssid.bytes,
+			qdf_mem_copy(ibss_log->bssid.bytes,
 				bss_desc->bssId, QDF_MAC_ADDR_SIZE);
 			ibss_log->operatingChannel =
 				bss_desc->channelId;
@@ -6064,13 +6064,13 @@
 		 * start the BSS ourself, handler of eSIR_SME_JOINED_NEW_BSS
 		 * will trigger the connection start indication in Vista
 		 */
-		cdf_mem_set(&roam_info, sizeof(tCsrRoamInfo), 0);
+		qdf_mem_set(&roam_info, sizeof(tCsrRoamInfo), 0);
 		roam_info.statusCode = session->joinFailStatusCode.statusCode;
 		roam_info.reasonCode = session->joinFailStatusCode.reasonCode;
 		/* We start the IBSS (didn't find any matched IBSS out there) */
 		roam_info.pBssDesc = bss_desc;
 		roam_info.staId = (uint8_t) start_bss_rsp->staId;
-		cdf_mem_copy(roam_info.bssid.bytes, bss_desc->bssId,
+		qdf_mem_copy(roam_info.bssid.bytes, bss_desc->bssId,
 				sizeof(struct qdf_mac_addr));
 		if (!IS_FEATURE_SUPPORTED_BY_FW(SLM_SESSIONIZATION) &&
 				(csr_is_concurrent_session_running(mac_ctx))) {
@@ -6133,17 +6133,17 @@
 	else
 		ind_qos = SME_QOS_CSR_ASSOC_COMPLETE;
 	sms_log(mac_ctx, LOGW, FL("receives association indication"));
-	cdf_mem_set(&roam_info, sizeof(roam_info), 0);
+	qdf_mem_set(&roam_info, sizeof(roam_info), 0);
 	/* always free the memory here */
 	if (session->pWpaRsnRspIE) {
 		session->nWpaRsnRspIeLength = 0;
-		cdf_mem_free(session->pWpaRsnRspIE);
+		qdf_mem_free(session->pWpaRsnRspIE);
 		session->pWpaRsnRspIE = NULL;
 	}
 #ifdef FEATURE_WLAN_WAPI
 	if (session->pWapiRspIE) {
 		session->nWapiRspIeLength = 0;
-		cdf_mem_free(session->pWapiRspIE);
+		qdf_mem_free(session->pWapiRspIE);
 		session->pWapiRspIE = NULL;
 	}
 #endif /* FEATURE_WLAN_WAPI */
@@ -6170,7 +6170,7 @@
 			cmd->u.roamCmd.roamReason)) {
 		bss_desc = session->pConnectBssDesc;
 		if (bss_desc)
-			cdf_mem_copy(&roam_info.bssid, &bss_desc->bssId,
+			qdf_mem_copy(&roam_info.bssid, &bss_desc->bssId,
 					sizeof(struct qdf_mac_addr));
 	} else {
 		if (cmd->u.roamCmd.pRoamBssEntry) {
@@ -6180,7 +6180,7 @@
 				bss_desc = &scan_res->Result.BssDescriptor;
 				ies_ptr = (tDot11fBeaconIEs *)
 					(scan_res->Result.pvIes);
-				cdf_mem_copy(&roam_info.bssid, &bss_desc->bssId,
+				qdf_mem_copy(&roam_info.bssid, &bss_desc->bssId,
 					sizeof(struct qdf_mac_addr));
 			}
 		}
@@ -6334,10 +6334,10 @@
 #endif
 			if (len) {
 				session->connectedInfo.pbFrames =
-					cdf_mem_malloc(len);
+					qdf_mem_malloc(len);
 				if (session->connectedInfo.pbFrames !=
 						NULL) {
-					cdf_mem_copy(
+					qdf_mem_copy(
 						session->connectedInfo.pbFrames,
 						join_rsp->frames, len);
 					session->connectedInfo.nAssocReqLength =
@@ -6463,13 +6463,13 @@
 				roam_info.roamSynchInProgress = 1;
 				roam_info.synchAuthStatus =
 					roam_offload_params->authStatus;
-				cdf_mem_copy(roam_info.kck,
+				qdf_mem_copy(roam_info.kck,
 					roam_offload_params->kck,
 					SIR_KCK_KEY_LEN);
-				cdf_mem_copy(roam_info.kek,
+				qdf_mem_copy(roam_info.kek,
 					roam_offload_params->kek,
 					SIR_KEK_KEY_LEN);
-				cdf_mem_copy(roam_info.replay_ctr,
+				qdf_mem_copy(roam_info.replay_ctr,
 					roam_offload_params->replay_ctr,
 					SIR_REPLAY_CTR_LEN);
 				QDF_TRACE(QDF_MODULE_ID_SME,
@@ -6571,7 +6571,7 @@
 		} else {
 			bss_desc = NULL;
 		}
-		cdf_mem_set(&roam_info, sizeof(tCsrRoamInfo), 0);
+		qdf_mem_set(&roam_info, sizeof(tCsrRoamInfo), 0);
 		roam_info.pBssDesc = bss_desc;
 		csr_roam_call_callback(mac_ctx, session_id, &roam_info,
 				cmd->u.roamCmd.roamId, roam_status,
@@ -6588,10 +6588,10 @@
 			session_id);
 		csr_roam_substate_change(mac_ctx, eCSR_ROAM_SUBSTATE_NONE,
 			session_id);
-		cdf_mem_set(&roam_info, sizeof(tCsrRoamInfo), 0);
+		qdf_mem_set(&roam_info, sizeof(tCsrRoamInfo), 0);
 		roam_info.pBssDesc = session->pConnectBssDesc;
 		if (roam_info.pBssDesc)
-			cdf_mem_copy(&roam_info.bssid,
+			qdf_mem_copy(&roam_info.bssid,
 				&roam_info.pBssDesc->bssId,
 				sizeof(struct qdf_mac_addr));
 		/*
@@ -6608,7 +6608,7 @@
 		/* No message to PE */
 		sms_log(mac_ctx, LOGW,
 			FL("receives silently stop roaming indication"));
-		cdf_mem_set(&roam_info, sizeof(roam_info), 0);
+		qdf_mem_set(&roam_info, sizeof(roam_info), 0);
 
 		/* to aviod resetting the substate to NONE */
 		mac_ctx->roam.curState[session_id] = eCSR_ROAMING_STATE_JOINED;
@@ -6618,7 +6618,7 @@
 		 */
 		roam_info.pBssDesc = session->pConnectBssDesc;
 		if (roam_info.pBssDesc)
-			cdf_mem_copy(&roam_info.bssid,
+			qdf_mem_copy(&roam_info.bssid,
 				&roam_info.pBssDesc->bssId,
 				sizeof(struct qdf_mac_addr));
 		roam_info.statusCode = session->joinFailStatusCode.statusCode;
@@ -6669,96 +6669,96 @@
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
 	uint32_t size = 0;
 
-	cdf_mem_set(pDstProfile, sizeof(tCsrRoamProfile), 0);
+	qdf_mem_set(pDstProfile, sizeof(tCsrRoamProfile), 0);
 	if (pSrcProfile->BSSIDs.numOfBSSIDs) {
 		size = sizeof(struct qdf_mac_addr) * pSrcProfile->BSSIDs.numOfBSSIDs;
-		pDstProfile->BSSIDs.bssid = cdf_mem_malloc(size);
+		pDstProfile->BSSIDs.bssid = qdf_mem_malloc(size);
 		if (NULL == pDstProfile->BSSIDs.bssid) {
 			status = QDF_STATUS_E_NOMEM;
 			goto end;
 		}
 		pDstProfile->BSSIDs.numOfBSSIDs =
 			pSrcProfile->BSSIDs.numOfBSSIDs;
-		cdf_mem_copy(pDstProfile->BSSIDs.bssid,
+		qdf_mem_copy(pDstProfile->BSSIDs.bssid,
 			pSrcProfile->BSSIDs.bssid, size);
 	}
 	if (pSrcProfile->SSIDs.numOfSSIDs) {
 		size = sizeof(tCsrSSIDInfo) * pSrcProfile->SSIDs.numOfSSIDs;
-		pDstProfile->SSIDs.SSIDList = cdf_mem_malloc(size);
+		pDstProfile->SSIDs.SSIDList = qdf_mem_malloc(size);
 		if (NULL == pDstProfile->SSIDs.SSIDList) {
 			status = QDF_STATUS_E_NOMEM;
 			goto end;
 		}
 		pDstProfile->SSIDs.numOfSSIDs =
 			pSrcProfile->SSIDs.numOfSSIDs;
-		cdf_mem_copy(pDstProfile->SSIDs.SSIDList,
+		qdf_mem_copy(pDstProfile->SSIDs.SSIDList,
 			pSrcProfile->SSIDs.SSIDList, size);
 	}
 	if (pSrcProfile->nWPAReqIELength) {
 		pDstProfile->pWPAReqIE =
-			cdf_mem_malloc(pSrcProfile->nWPAReqIELength);
+			qdf_mem_malloc(pSrcProfile->nWPAReqIELength);
 		if (NULL == pDstProfile->pWPAReqIE) {
 			status = QDF_STATUS_E_NOMEM;
 			goto end;
 		}
 		pDstProfile->nWPAReqIELength =
 			pSrcProfile->nWPAReqIELength;
-		cdf_mem_copy(pDstProfile->pWPAReqIE, pSrcProfile->pWPAReqIE,
+		qdf_mem_copy(pDstProfile->pWPAReqIE, pSrcProfile->pWPAReqIE,
 			pSrcProfile->nWPAReqIELength);
 	}
 	if (pSrcProfile->nRSNReqIELength) {
 		pDstProfile->pRSNReqIE =
-			cdf_mem_malloc(pSrcProfile->nRSNReqIELength);
+			qdf_mem_malloc(pSrcProfile->nRSNReqIELength);
 		if (NULL == pDstProfile->pRSNReqIE) {
 			status = QDF_STATUS_E_NOMEM;
 			goto end;
 		}
 		pDstProfile->nRSNReqIELength =
 			pSrcProfile->nRSNReqIELength;
-		cdf_mem_copy(pDstProfile->pRSNReqIE, pSrcProfile->pRSNReqIE,
+		qdf_mem_copy(pDstProfile->pRSNReqIE, pSrcProfile->pRSNReqIE,
 			pSrcProfile->nRSNReqIELength);
 	}
 #ifdef FEATURE_WLAN_WAPI
 	if (pSrcProfile->nWAPIReqIELength) {
 		pDstProfile->pWAPIReqIE =
-			cdf_mem_malloc(pSrcProfile->nWAPIReqIELength);
+			qdf_mem_malloc(pSrcProfile->nWAPIReqIELength);
 		if (NULL == pDstProfile->pWAPIReqIE) {
 			status = QDF_STATUS_E_NOMEM;
 			goto end;
 		}
 		pDstProfile->nWAPIReqIELength =
 			pSrcProfile->nWAPIReqIELength;
-		cdf_mem_copy(pDstProfile->pWAPIReqIE, pSrcProfile->pWAPIReqIE,
+		qdf_mem_copy(pDstProfile->pWAPIReqIE, pSrcProfile->pWAPIReqIE,
 			pSrcProfile->nWAPIReqIELength);
 	}
 #endif /* FEATURE_WLAN_WAPI */
 	if (pSrcProfile->nAddIEScanLength) {
 		pDstProfile->pAddIEScan =
-			cdf_mem_malloc(pSrcProfile->nAddIEScanLength);
+			qdf_mem_malloc(pSrcProfile->nAddIEScanLength);
 		if (NULL == pDstProfile->pAddIEScan) {
 			status = QDF_STATUS_E_NOMEM;
 			goto end;
 		}
 		pDstProfile->nAddIEScanLength =
 			pSrcProfile->nAddIEScanLength;
-		cdf_mem_copy(pDstProfile->pAddIEScan, pSrcProfile->pAddIEScan,
+		qdf_mem_copy(pDstProfile->pAddIEScan, pSrcProfile->pAddIEScan,
 			pSrcProfile->nAddIEScanLength);
 	}
 	if (pSrcProfile->nAddIEAssocLength) {
 		pDstProfile->pAddIEAssoc =
-			cdf_mem_malloc(pSrcProfile->nAddIEAssocLength);
+			qdf_mem_malloc(pSrcProfile->nAddIEAssocLength);
 		if (NULL == pDstProfile->pAddIEAssoc) {
 			status = QDF_STATUS_E_NOMEM;
 			goto end;
 		}
 		pDstProfile->nAddIEAssocLength =
 			pSrcProfile->nAddIEAssocLength;
-		cdf_mem_copy(pDstProfile->pAddIEAssoc, pSrcProfile->pAddIEAssoc,
+		qdf_mem_copy(pDstProfile->pAddIEAssoc, pSrcProfile->pAddIEAssoc,
 			pSrcProfile->nAddIEAssocLength);
 	}
 	if (pSrcProfile->ChannelInfo.ChannelList) {
 		pDstProfile->ChannelInfo.ChannelList =
-			cdf_mem_malloc(pSrcProfile->ChannelInfo.
+			qdf_mem_malloc(pSrcProfile->ChannelInfo.
 					numOfChannels);
 		if (NULL == pDstProfile->ChannelInfo.ChannelList) {
 			status = QDF_STATUS_E_NOMEM;
@@ -6766,7 +6766,7 @@
 		}
 		pDstProfile->ChannelInfo.numOfChannels =
 			pSrcProfile->ChannelInfo.numOfChannels;
-		cdf_mem_copy(pDstProfile->ChannelInfo.ChannelList,
+		qdf_mem_copy(pDstProfile->ChannelInfo.ChannelList,
 			pSrcProfile->ChannelInfo.ChannelList,
 			pSrcProfile->ChannelInfo.numOfChannels);
 	}
@@ -6818,7 +6818,7 @@
 	pDstProfile->wps_state = pSrcProfile->wps_state;
 	pDstProfile->ieee80211d = pSrcProfile->ieee80211d;
 	pDstProfile->sap_dot11mc = pSrcProfile->sap_dot11mc;
-	cdf_mem_copy(&pDstProfile->Keys, &pSrcProfile->Keys,
+	qdf_mem_copy(&pDstProfile->Keys, &pSrcProfile->Keys,
 		sizeof(pDstProfile->Keys));
 #ifdef WLAN_FEATURE_11W
 	pDstProfile->MFPEnabled = pSrcProfile->MFPEnabled;
@@ -6830,7 +6830,7 @@
 		pDstProfile->MDID.mobilityDomain =
 			pSrcProfile->MDID.mobilityDomain;
 	}
-	cdf_mem_copy(&pDstProfile->addIeParams, &pSrcProfile->addIeParams,
+	qdf_mem_copy(&pDstProfile->addIeParams, &pSrcProfile->addIeParams,
 			sizeof(tSirAddIeParams));
 end:
 	if (!QDF_IS_STATUS_SUCCESS(status)) {
@@ -6848,9 +6848,9 @@
 	tCsrRoamConnectedProfile *pSrcProfile =
 		&pMac->roam.roamSession[sessionId].connectedProfile;
 
-	cdf_mem_set(pDstProfile, sizeof(tCsrRoamProfile), 0);
+	qdf_mem_set(pDstProfile, sizeof(tCsrRoamProfile), 0);
 
-	pDstProfile->BSSIDs.bssid = cdf_mem_malloc(sizeof(struct qdf_mac_addr));
+	pDstProfile->BSSIDs.bssid = qdf_mem_malloc(sizeof(struct qdf_mac_addr));
 	if (NULL == pDstProfile->BSSIDs.bssid) {
 		status = QDF_STATUS_E_NOMEM;
 		sms_log(pMac, LOGE,
@@ -6864,7 +6864,7 @@
 
 	if (pSrcProfile->SSID.ssId) {
 		pDstProfile->SSIDs.SSIDList =
-			cdf_mem_malloc(sizeof(tCsrSSIDInfo));
+			qdf_mem_malloc(sizeof(tCsrSSIDInfo));
 		if (NULL == pDstProfile->SSIDs.SSIDList) {
 			status = QDF_STATUS_E_NOMEM;
 			sms_log(pMac, LOGE,
@@ -6878,12 +6878,12 @@
 			pSrcProfile->handoffPermitted;
 		pDstProfile->SSIDs.SSIDList[0].ssidHidden =
 			pSrcProfile->ssidHidden;
-		cdf_mem_copy(&pDstProfile->SSIDs.SSIDList[0].SSID,
+		qdf_mem_copy(&pDstProfile->SSIDs.SSIDList[0].SSID,
 			&pSrcProfile->SSID, sizeof(tSirMacSSid));
 	}
 	if (pSrcProfile->nAddIEAssocLength) {
 		pDstProfile->pAddIEAssoc =
-			cdf_mem_malloc(pSrcProfile->nAddIEAssocLength);
+			qdf_mem_malloc(pSrcProfile->nAddIEAssocLength);
 		if (NULL == pDstProfile->pAddIEAssoc) {
 			status = QDF_STATUS_E_NOMEM;
 			sms_log(pMac, LOGE,
@@ -6891,10 +6891,10 @@
 			goto end;
 		}
 		pDstProfile->nAddIEAssocLength = pSrcProfile->nAddIEAssocLength;
-		cdf_mem_copy(pDstProfile->pAddIEAssoc, pSrcProfile->pAddIEAssoc,
+		qdf_mem_copy(pDstProfile->pAddIEAssoc, pSrcProfile->pAddIEAssoc,
 			pSrcProfile->nAddIEAssocLength);
 	}
-	pDstProfile->ChannelInfo.ChannelList = cdf_mem_malloc(1);
+	pDstProfile->ChannelInfo.ChannelList = qdf_mem_malloc(1);
 	if (NULL == pDstProfile->ChannelInfo.ChannelList) {
 		status = QDF_STATUS_E_NOMEM;
 		goto end;
@@ -6916,7 +6916,7 @@
 		pSrcProfile->mcEncryptionType;
 	pDstProfile->BSSType = pSrcProfile->BSSType;
 	pDstProfile->CBMode = pSrcProfile->CBMode;
-	cdf_mem_copy(&pDstProfile->Keys, &pSrcProfile->Keys,
+	qdf_mem_copy(&pDstProfile->Keys, &pSrcProfile->Keys,
 		sizeof(pDstProfile->Keys));
 	if (pSrcProfile->MDID.mdiePresent) {
 		pDstProfile->MDID.mdiePresent = 1;
@@ -7194,13 +7194,13 @@
 #ifdef FEATURE_WLAN_BTAMP_UT_RF
 	pSession->maxRetryCount = CSR_JOIN_MAX_RETRY_COUNT;
 #endif
-	pScanFilter = cdf_mem_malloc(sizeof(tCsrScanResultFilter));
+	pScanFilter = qdf_mem_malloc(sizeof(tCsrScanResultFilter));
 	if (NULL == pScanFilter) {
 		status = QDF_STATUS_E_NOMEM;
 		goto end;
 	}
 
-	cdf_mem_set(pScanFilter, sizeof(tCsrScanResultFilter),
+	qdf_mem_set(pScanFilter, sizeof(tCsrScanResultFilter),
 			0);
 	/* Try to connect to any BSS */
 	if (NULL == pProfile) {
@@ -7217,7 +7217,7 @@
 	if (pRoamId)
 		*pRoamId = roamId;
 	if (!QDF_IS_STATUS_SUCCESS(status)) {
-		cdf_mem_free(pScanFilter);
+		qdf_mem_free(pScanFilter);
 		goto end;
 	}
 
@@ -7246,7 +7246,7 @@
 		}
 
 		csr_free_scan_filter(pMac, pScanFilter);
-		cdf_mem_free(pScanFilter);
+		qdf_mem_free(pScanFilter);
 		goto end;
 	}
 	status = csr_scan_get_result(pMac, pScanFilter, &hBSSList);
@@ -7323,7 +7323,7 @@
 		 */
 		csr_free_scan_filter(pMac, pScanFilter);
 
-	cdf_mem_free(pScanFilter);
+	qdf_mem_free(pScanFilter);
 end:
 	/* tell the caller if we fail to trigger a join request */
 	if (fCallCallback) {
@@ -7382,7 +7382,7 @@
 				 */
 				sms_log(mac_ctx, LOG1, FL("SSID mismatch"));
 			}
-		} else if (!cdf_mem_compare(&mod_fields,
+		} else if (qdf_mem_cmp(&mod_fields,
 				&session->connectedProfile.modifyProfileFields,
 				sizeof(tCsrRoamModifyProfileFields))) {
 			fCallCallback = false;
@@ -7431,22 +7431,22 @@
 		csr_scan_abort_mac_scan_not_for_connect(pMac, sessionId);
 		/* We have to make a copy of pCurRoamProfile because it
 		 * will be free inside csr_roam_issue_connect */
-		pProfile = cdf_mem_malloc(sizeof(tCsrRoamProfile));
+		pProfile = qdf_mem_malloc(sizeof(tCsrRoamProfile));
 		if (NULL == pProfile) {
 			status = QDF_STATUS_E_NOMEM;
 			goto end;
 		}
-		cdf_mem_set(pProfile, sizeof(tCsrRoamProfile), 0);
+		qdf_mem_set(pProfile, sizeof(tCsrRoamProfile), 0);
 		status = csr_roam_copy_profile(pMac, pProfile,
 			pSession->pCurRoamProfile);
 		if (!QDF_IS_STATUS_SUCCESS(status))
 			goto end;
-		pScanFilter = cdf_mem_malloc(sizeof(tCsrScanResultFilter));
+		pScanFilter = qdf_mem_malloc(sizeof(tCsrScanResultFilter));
 		if (NULL == pScanFilter) {
 			status = QDF_STATUS_E_NOMEM;
 			goto end;
 		}
-		cdf_mem_set(pScanFilter, sizeof(tCsrScanResultFilter), 0);
+		qdf_mem_set(pScanFilter, sizeof(tCsrScanResultFilter), 0);
 		status = csr_roam_prepare_filter_from_profile(pMac, pProfile,
 					pScanFilter);
 		if (!QDF_IS_STATUS_SUCCESS(status))
@@ -7480,11 +7480,11 @@
 end:
 	if (pScanFilter) {
 		csr_free_scan_filter(pMac, pScanFilter);
-		cdf_mem_free(pScanFilter);
+		qdf_mem_free(pScanFilter);
 	}
 	if (NULL != pProfile) {
 		csr_release_profile(pMac, pProfile);
-		cdf_mem_free(pProfile);
+		qdf_mem_free(pProfile);
 	}
 	return status;
 }
@@ -7817,11 +7817,11 @@
 	}
 	pConnectProfile = &pSession->connectedProfile;
 	if (pConnectProfile->pAddIEAssoc) {
-		cdf_mem_free(pConnectProfile->pAddIEAssoc);
+		qdf_mem_free(pConnectProfile->pAddIEAssoc);
 		pConnectProfile->pAddIEAssoc = NULL;
 	}
 	if (!pSession->roam_synch_in_progress) {
-		cdf_mem_set(&pSession->connectedProfile,
+		qdf_mem_set(&pSession->connectedProfile,
 				sizeof(tCsrRoamConnectedProfile), 0);
 		pConnectProfile->AuthType = pProfile->negotiatedAuthType;
 		pConnectProfile->AuthInfo = pProfile->AuthType;
@@ -7835,11 +7835,11 @@
 		pConnectProfile->BSSType = pProfile->BSSType;
 		pConnectProfile->modifyProfileFields.uapsd_mask =
 			pProfile->uapsd_mask;
-		cdf_mem_copy(&pConnectProfile->Keys, &pProfile->Keys,
+		qdf_mem_copy(&pConnectProfile->Keys, &pProfile->Keys,
 				sizeof(tCsrKeys));
 		if (pProfile->nAddIEAssocLength) {
 			pConnectProfile->pAddIEAssoc =
-				cdf_mem_malloc(pProfile->nAddIEAssocLength);
+				qdf_mem_malloc(pProfile->nAddIEAssocLength);
 			if (NULL == pConnectProfile->pAddIEAssoc)
 				status = QDF_STATUS_E_NOMEM;
 			else
@@ -7851,7 +7851,7 @@
 			}
 			pConnectProfile->nAddIEAssocLength =
 				pProfile->nAddIEAssocLength;
-			cdf_mem_copy(pConnectProfile->pAddIEAssoc,
+			qdf_mem_copy(pConnectProfile->pAddIEAssoc,
 					pProfile->pAddIEAssoc,
 					pProfile->nAddIEAssocLength);
 		}
@@ -7890,7 +7890,7 @@
 	if (QDF_IS_STATUS_SUCCESS(status)) {
 		if (pIesTemp->SSID.present) {
 			pConnectProfile->SSID.length = pIesTemp->SSID.num_ssid;
-			cdf_mem_copy(pConnectProfile->SSID.ssId,
+			qdf_mem_copy(pConnectProfile->SSID.ssId,
 				     pIesTemp->SSID.ssid,
 				     pIesTemp->SSID.num_ssid);
 		}
@@ -7914,7 +7914,7 @@
 
 		if (NULL == pIes) {
 			/* Free memory if it allocated locally */
-			cdf_mem_free(pIesTemp);
+			qdf_mem_free(pIesTemp);
 		}
 	}
 	/* Save Qos connection */
@@ -7927,9 +7927,9 @@
 	for (index = 0; index < pProfile->SSIDs.numOfSSIDs; index++) {
 		if ((pProfile->SSIDs.SSIDList[index].SSID.length ==
 		     pConnectProfile->SSID.length)
-		    && cdf_mem_compare(pProfile->SSIDs.SSIDList[index].SSID.
+		    && (!qdf_mem_cmp(pProfile->SSIDs.SSIDList[index].SSID.
 				       ssId, pConnectProfile->SSID.ssId,
-				       pConnectProfile->SSID.length)) {
+				       pConnectProfile->SSID.length))) {
 			pConnectProfile->handoffPermitted =
 				pProfile->SSIDs.SSIDList[index].handoffPermitted;
 			break;
@@ -8151,7 +8151,7 @@
 		}
 		return;
 	}
-	cdf_mem_set(&roamInfo, sizeof(tCsrRoamInfo), 0);
+	qdf_mem_set(&roamInfo, sizeof(tCsrRoamInfo), 0);
 	roamInfo.pBssDesc = pCommand->u.roamCmd.pLastRoamBss;
 	roamInfo.statusCode = pSession->joinFailStatusCode.statusCode;
 	roamInfo.reasonCode = pSession->joinFailStatusCode.reasonCode;
@@ -8525,7 +8525,7 @@
 	}
 	if (!scan_result->Result.pvIes) {
 		/* Locally allocated */
-		cdf_mem_free(local_ies);
+		qdf_mem_free(local_ies);
 	}
 }
 
@@ -8571,7 +8571,7 @@
 			pSmeJoinRsp->statusCode)) {
 			/* Inform HDD to turn off FT flag in HDD */
 			if (pNeighborRoamInfo) {
-				cdf_mem_zero(&roamInfo, sizeof(tCsrRoamInfo));
+				qdf_mem_zero(&roamInfo, sizeof(tCsrRoamInfo));
 				csr_roam_call_callback(pMac,
 						       pSmeJoinRsp->sessionId,
 						       &roamInfo, roamId,
@@ -8698,16 +8698,16 @@
 
 	if (scan_filter) {
 		csr_free_scan_filter(mac_ctx, scan_filter);
-		cdf_mem_free(scan_filter);
+		qdf_mem_free(scan_filter);
 	}
 	if (cur_roam_profile)
-		cdf_mem_free(cur_roam_profile);
+		qdf_mem_free(cur_roam_profile);
 
 #ifdef WLAN_FEATURE_ROAM_OFFLOAD
 		csr_roam_synch_clean_up(mac_ctx, session_id);
 #endif
 	/* Inform the upper layers that the reassoc failed */
-	cdf_mem_zero(roam_info, sizeof(tCsrRoamInfo));
+	qdf_mem_zero(roam_info, sizeof(tCsrRoamInfo));
 	csr_roam_call_callback(mac_ctx, session_id, roam_info, 0,
 			       eCSR_ROAM_FT_REASSOC_FAILED, eSIR_SME_SUCCESS);
 	/*
@@ -8744,12 +8744,12 @@
 				tScanResultHandle *hBSSList)
 {
 	QDF_STATUS status;
-	*scan_filter = cdf_mem_malloc(sizeof(tCsrScanResultFilter));
+	*scan_filter = qdf_mem_malloc(sizeof(tCsrScanResultFilter));
 	if (NULL == *scan_filter) {
 		sms_log(mac_ctx, LOGE, FL("alloc for ScanFilter failed."));
 		return false;
 	}
-	cdf_mem_set(*scan_filter, sizeof(tCsrScanResultFilter), 0);
+	qdf_mem_set(*scan_filter, sizeof(tCsrScanResultFilter), 0);
 	(*scan_filter)->scan_filter_for_roam = 1;
 	status = csr_roam_prepare_filter_from_profile(mac_ctx,
 			&neighbor_roam_info->csrNeighborRoamProfile,
@@ -8847,7 +8847,7 @@
 		 * Copy the connected profile to apply the same for this
 		 * connection as well
 		 */
-		pCurRoamProfile = cdf_mem_malloc(sizeof(tCsrRoamProfile));
+		pCurRoamProfile = qdf_mem_malloc(sizeof(tCsrRoamProfile));
 		if (pCurRoamProfile != NULL) {
 			/*
 			 * notify sub-modules like QoS etc. that handoff
@@ -8856,7 +8856,7 @@
 			sme_qos_csr_event_ind(pMac, sessionId,
 					      SME_QOS_CSR_HANDOFF_ASSOC_REQ,
 					      NULL);
-			cdf_mem_set(pCurRoamProfile, sizeof(tCsrRoamProfile),
+			qdf_mem_set(pCurRoamProfile, sizeof(tCsrRoamProfile),
 				    0);
 			csr_roam_copy_profile(pMac, pCurRoamProfile,
 					      pSession->pCurRoamProfile);
@@ -8871,9 +8871,9 @@
 					status);
 
 			csr_release_profile(pMac, pCurRoamProfile);
-			cdf_mem_free(pCurRoamProfile);
+			qdf_mem_free(pCurRoamProfile);
 			csr_free_scan_filter(pMac, pScanFilter);
-			cdf_mem_free(pScanFilter);
+			qdf_mem_free(pScanFilter);
 			return;
 		}
 
@@ -9042,7 +9042,7 @@
 		pIbssPeerInd = (tSmeIbssPeerInd *) pSmeRsp;
 		sms_log(pMac, LOGE,
 			FL("Peer departed ntf from LIM in joining state"));
-		cdf_mem_set(&roamInfo, sizeof(tCsrRoamInfo), 0);
+		qdf_mem_set(&roamInfo, sizeof(tCsrRoamInfo), 0);
 		roamInfo.staId = (uint8_t) pIbssPeerInd->staId;
 		roamInfo.ucastSig = (uint8_t) pIbssPeerInd->ucastSig;
 		roamInfo.bcastSig = (uint8_t) pIbssPeerInd->bcastSig;
@@ -9095,7 +9095,7 @@
 		sms_log(pMac, LOG1,
 			FL
 				("ASSOCIATION confirmation can be given to upper layer "));
-		cdf_mem_set(&roamInfo, sizeof(tCsrRoamInfo), 0);
+		qdf_mem_set(&roamInfo, sizeof(tCsrRoamInfo), 0);
 		pRoamInfo = &roamInfo;
 		pUpperLayerAssocCnf =
 			(tSirSmeAssocIndToUpperLayerCnf *) pMsgBuf;
@@ -9131,17 +9131,17 @@
 			(uint8_t) pUpperLayerAssocCnf->addIE.length;
 		pRoamInfo->paddIE =
 			pUpperLayerAssocCnf->addIE.addIEdata;
-		cdf_mem_copy(pRoamInfo->peerMac.bytes,
+		qdf_mem_copy(pRoamInfo->peerMac.bytes,
 			     pUpperLayerAssocCnf->peerMacAddr,
 			     sizeof(tSirMacAddr));
-		cdf_mem_copy(&pRoamInfo->bssid,
+		qdf_mem_copy(&pRoamInfo->bssid,
 			     pUpperLayerAssocCnf->bssId,
 			     sizeof(struct qdf_mac_addr));
 		pRoamInfo->wmmEnabledSta =
 			pUpperLayerAssocCnf->wmmEnabledSta;
 		pRoamInfo->timingMeasCap =
 			pUpperLayerAssocCnf->timingMeasCap;
-		cdf_mem_copy(&pRoamInfo->chan_info,
+		qdf_mem_copy(&pRoamInfo->chan_info,
 			     &pUpperLayerAssocCnf->chan_info,
 			     sizeof(tSirSmeChanInfo));
 		if (CSR_IS_INFRA_AP(pRoamInfo->u.pConnectedProfile)) {
@@ -9192,14 +9192,14 @@
 		tCsrRoamSetKey setKey;
 		setKey.encType = EncryptType;
 		setKey.keyDirection = aniKeyDirection;
-		cdf_mem_copy(&setKey.peerMac, bssId, sizeof(struct qdf_mac_addr));
+		qdf_mem_copy(&setKey.peerMac, bssId, sizeof(struct qdf_mac_addr));
 		/* 0 for supplicant */
 		setKey.paeRole = paeRole;
 		/* Key index */
 		setKey.keyId = keyId;
 		setKey.keyLength = keyLength;
 		if (keyLength) {
-			cdf_mem_copy(setKey.Key, pKey, keyLength);
+			qdf_mem_copy(setKey.Key, pKey, keyLength);
 		}
 		status = csr_roam_issue_set_key_command(pMac, sessionId,
 							&setKey, 0);
@@ -9239,7 +9239,7 @@
 			}
 
 			set_key_cmd->u.setKeyCmd.keyLength = CSR_WEP40_KEY_LEN;
-			cdf_mem_copy(set_key_cmd->u.setKeyCmd.Key, set_key->Key,
+			qdf_mem_copy(set_key_cmd->u.setKeyCmd.Key, set_key->Key,
 				     CSR_WEP40_KEY_LEN);
 		}
 		*enqueue_cmd = true;
@@ -9257,7 +9257,7 @@
 			}
 
 			set_key_cmd->u.setKeyCmd.keyLength = CSR_WEP104_KEY_LEN;
-			cdf_mem_copy(set_key_cmd->u.setKeyCmd.Key, set_key->Key,
+			qdf_mem_copy(set_key_cmd->u.setKeyCmd.Key, set_key->Key,
 				     CSR_WEP104_KEY_LEN);
 		}
 		*enqueue_cmd = true;
@@ -9271,7 +9271,7 @@
 			return QDF_STATUS_E_INVAL;
 		}
 		set_key_cmd->u.setKeyCmd.keyLength = CSR_TKIP_KEY_LEN;
-		cdf_mem_copy(set_key_cmd->u.setKeyCmd.Key, set_key->Key,
+		qdf_mem_copy(set_key_cmd->u.setKeyCmd.Key, set_key->Key,
 			     CSR_TKIP_KEY_LEN);
 		*enqueue_cmd = true;
 		break;
@@ -9284,7 +9284,7 @@
 			return QDF_STATUS_E_INVAL;
 		}
 		set_key_cmd->u.setKeyCmd.keyLength = CSR_AES_KEY_LEN;
-		cdf_mem_copy(set_key_cmd->u.setKeyCmd.Key, set_key->Key,
+		qdf_mem_copy(set_key_cmd->u.setKeyCmd.Key, set_key->Key,
 			     CSR_AES_KEY_LEN);
 		*enqueue_cmd = true;
 		break;
@@ -9298,7 +9298,7 @@
 			return QDF_STATUS_E_INVAL;
 		}
 		set_key_cmd->u.setKeyCmd.keyLength = CSR_WAPI_KEY_LEN;
-		cdf_mem_copy(set_key_cmd->u.setKeyCmd.Key, set_key->Key,
+		qdf_mem_copy(set_key_cmd->u.setKeyCmd.Key, set_key->Key,
 			     CSR_WAPI_KEY_LEN);
 		if (session->pCurRoamProfile) {
 			session->pCurRoamProfile->negotiatedUCEncryptionType =
@@ -9322,7 +9322,7 @@
 				set_key->keyLength);
 			return QDF_STATUS_E_INVAL;
 		}
-		cdf_mem_copy(session->eseCckmInfo.krk, set_key->Key,
+		qdf_mem_copy(session->eseCckmInfo.krk, set_key->Key,
 			     CSR_KRK_KEY_LEN);
 		session->eseCckmInfo.reassoc_req_num = 1;
 		session->eseCckmInfo.krk_plumbed = true;
@@ -9337,7 +9337,7 @@
 				set_key->keyLength);
 			return QDF_STATUS_E_INVAL;
 		}
-		cdf_mem_copy(session->eseCckmInfo.btk, set_key->Key,
+		qdf_mem_copy(session->eseCckmInfo.btk, set_key->Key,
 			     SIR_BTK_KEY_LEN);
 		break;
 #endif
@@ -9353,7 +9353,7 @@
 			return QDF_STATUS_E_INVAL;
 		}
 		set_key_cmd->u.setKeyCmd.keyLength = CSR_AES_KEY_LEN;
-		cdf_mem_copy(set_key_cmd->u.setKeyCmd.Key, set_key->Key,
+		qdf_mem_copy(set_key_cmd->u.setKeyCmd.Key, set_key->Key,
 			     CSR_AES_KEY_LEN);
 		*enqueue_cmd = true;
 		break;
@@ -9389,7 +9389,7 @@
 		sms_log(pMac, LOGE, FL(" fail to get command buffer"));
 		return QDF_STATUS_E_RESOURCES;
 	}
-	cdf_mem_zero(pCommand, sizeof(tSmeCmd));
+	qdf_mem_zero(pCommand, sizeof(tSmeCmd));
 	pCommand->command = eSmeCommandSetKey;
 	pCommand->sessionId = (uint8_t) sessionId;
 	/*
@@ -9413,7 +9413,7 @@
 		/* 0 for supplicant */
 		pCommand->u.setKeyCmd.paeRole = pSetKey->paeRole;
 		pCommand->u.setKeyCmd.keyId = pSetKey->keyId;
-		cdf_mem_copy(pCommand->u.setKeyCmd.keyRsc, pSetKey->keyRsc,
+		qdf_mem_copy(pCommand->u.setKeyCmd.keyRsc, pSetKey->keyRsc,
 			     CSR_MAX_RSC_LEN);
 		/*
 		 * Always put set key to the head of the Q because it is the
@@ -9461,7 +9461,7 @@
 	}
 
 	if (eSIR_ED_NONE != edType) {
-		cdf_mem_set(&setKeyEvent,
+		qdf_mem_set(&setKeyEvent,
 			    sizeof(host_event_wlan_security_payload_type), 0);
 		if (qdf_is_macaddr_group(&pCommand->u.setKeyCmd.peermac)) {
 			setKeyEvent.eventId = WLAN_SECURITY_EVENT_SET_GTK_REQ;
@@ -9482,7 +9482,7 @@
 								      connectedProfile.
 								      mcEncryptionType);
 		}
-		cdf_mem_copy(setKeyEvent.bssid,
+		qdf_mem_copy(setKeyEvent.bssid,
 			     pSession->connectedProfile.bssid.bytes,
 			     QDF_MAC_ADDR_SIZE);
 		if (CSR_IS_ENC_TYPE_STATIC(pCommand->u.setKeyCmd.encType)) {
@@ -9585,13 +9585,13 @@
 
 	if (profile->BSSIDs.numOfBSSIDs) {
 		size = sizeof(struct qdf_mac_addr) * profile->BSSIDs.numOfBSSIDs;
-		scan_fltr->BSSIDs.bssid = cdf_mem_malloc(size);
+		scan_fltr->BSSIDs.bssid = qdf_mem_malloc(size);
 		if (NULL == scan_fltr->BSSIDs.bssid) {
 			status = QDF_STATUS_E_NOMEM;
 			goto free_filter;
 		}
 		scan_fltr->BSSIDs.numOfBSSIDs = profile->BSSIDs.numOfBSSIDs;
-		cdf_mem_copy(scan_fltr->BSSIDs.bssid,
+		qdf_mem_copy(scan_fltr->BSSIDs.bssid,
 			     profile->BSSIDs.bssid, size);
 	}
 
@@ -9606,7 +9606,7 @@
 				roam_params->num_ssid_allowed_list;
 			size = sizeof(tCsrSSIDInfo) *
 				scan_fltr->SSIDs.numOfSSIDs;
-			scan_fltr->SSIDs.SSIDList = cdf_mem_malloc(size);
+			scan_fltr->SSIDs.SSIDList = qdf_mem_malloc(size);
 			if (NULL == scan_fltr->SSIDs.SSIDList)
 				status = QDF_STATUS_E_FAILURE;
 			else
@@ -9616,7 +9616,7 @@
 			for  (i = 0;
 				i < roam_params->num_ssid_allowed_list;
 				i++) {
-				cdf_mem_copy((void *)
+				qdf_mem_copy((void *)
 				    scan_fltr->SSIDs.SSIDList[i].SSID.ssId,
 				    roam_params->ssid_allowed_list[i].ssId,
 				    roam_params->ssid_allowed_list[i].length);
@@ -9629,12 +9629,12 @@
 		} else {
 			size = sizeof(tCsrSSIDInfo) *
 				profile->SSIDs.numOfSSIDs;
-			scan_fltr->SSIDs.SSIDList = cdf_mem_malloc(size);
+			scan_fltr->SSIDs.SSIDList = qdf_mem_malloc(size);
 			if (NULL == scan_fltr->SSIDs.SSIDList) {
 				status = QDF_STATUS_E_NOMEM;
 				goto free_filter;
 			}
-			cdf_mem_copy(scan_fltr->SSIDs.SSIDList,
+			qdf_mem_copy(scan_fltr->SSIDs.SSIDList,
 					profile->SSIDs.SSIDList, size);
 		}
 	}
@@ -9646,7 +9646,7 @@
 	} else if (profile_ch_info->numOfChannels) {
 		fltr_ch_info->numOfChannels = 0;
 		fltr_ch_info->ChannelList =
-			cdf_mem_malloc(sizeof(*(fltr_ch_info->ChannelList)) *
+			qdf_mem_malloc(sizeof(*(fltr_ch_info->ChannelList)) *
 				       profile_ch_info->numOfChannels);
 		if (NULL == fltr_ch_info->ChannelList) {
 			status = QDF_STATUS_E_NOMEM;
@@ -9699,7 +9699,7 @@
 		 * This causes the matching function to use countryCode as one
 		 * of the criteria.
 		 */
-		cdf_mem_copy(scan_fltr->countryCode, profile->countryCode,
+		qdf_mem_copy(scan_fltr->countryCode, profile->countryCode,
 			     WNI_CFG_COUNTRY_CODE_LEN);
 	}
 	if (profile->MDID.mdiePresent) {
@@ -9748,12 +9748,12 @@
 		pCommand->sessionId = (uint8_t) sessionId;
 		pCommand->u.wmStatusChangeCmd.Type = Type;
 		if (eCsrDisassociated == Type) {
-			cdf_mem_copy(&pCommand->u.wmStatusChangeCmd.u.
+			qdf_mem_copy(&pCommand->u.wmStatusChangeCmd.u.
 				     DisassocIndMsg, pSmeRsp,
 				     sizeof(pCommand->u.wmStatusChangeCmd.u.
 					    DisassocIndMsg));
 		} else {
-			cdf_mem_copy(&pCommand->u.wmStatusChangeCmd.u.
+			qdf_mem_copy(&pCommand->u.wmStatusChangeCmd.u.
 				     DeauthIndMsg, pSmeRsp,
 				     sizeof(pCommand->u.wmStatusChangeCmd.u.
 					    DeauthIndMsg));
@@ -9868,12 +9868,12 @@
 							     pDevContext);
 				reqBkp->tsmStatsCallback = NULL;
 			}
-			cdf_mem_free(reqBkp);
+			qdf_mem_free(reqBkp);
 			pTsmStatsRsp->tsmStatsReq = NULL;
 		} else {
 			sms_log(pMac, LOGE, FL("reqBkp is NULL"));
 			if (NULL != reqBkp) {
-				cdf_mem_free(reqBkp);
+				qdf_mem_free(reqBkp);
 				pTsmStatsRsp->tsmStatsReq = NULL;
 			}
 		}
@@ -9926,14 +9926,14 @@
 
 	/* Create the message and send to lim */
 	len = sizeof(tSirResetAPCapsChange);
-	pMsg = cdf_mem_malloc(len);
+	pMsg = qdf_mem_malloc(len);
 	if (NULL == pMsg)
 		status = QDF_STATUS_E_NOMEM;
 	else
 		status = QDF_STATUS_SUCCESS;
 
 	if (QDF_IS_STATUS_SUCCESS(status)) {
-		cdf_mem_set(pMsg, sizeof(tSirResetAPCapsChange), 0);
+		qdf_mem_set(pMsg, sizeof(tSirResetAPCapsChange), 0);
 		pMsg->messageType = eWNI_SME_RESET_AP_CAPS_CHANGED;
 		pMsg->length = len;
 		qdf_copy_macaddr(&pMsg->bssId, bssId);
@@ -9956,7 +9956,7 @@
 	tCsrRoamInfo *roam_info_ptr = NULL;
 	tSirSmeAssocInd *pAssocInd;
 	tCsrRoamInfo roam_info;
-	cdf_mem_set(&roam_info, sizeof(roam_info), 0);
+	qdf_mem_set(&roam_info, sizeof(roam_info), 0);
 
 	sms_log(mac_ctx, LOG1, FL("Receive WNI_SME_ASSOC_IND from SME"));
 	pAssocInd = (tSirSmeAssocInd *) msg_ptr;
@@ -9989,15 +9989,15 @@
 #endif
 	roam_info_ptr->addIELen = (uint8_t) pAssocInd->addIE.length;
 	roam_info_ptr->paddIE = pAssocInd->addIE.addIEdata;
-	cdf_mem_copy(roam_info_ptr->peerMac.bytes,
+	qdf_mem_copy(roam_info_ptr->peerMac.bytes,
 		     pAssocInd->peerMacAddr,
 		     sizeof(tSirMacAddr));
-	cdf_mem_copy(roam_info_ptr->bssid.bytes,
+	qdf_mem_copy(roam_info_ptr->bssid.bytes,
 		     pAssocInd->bssId,
 		     sizeof(struct qdf_mac_addr));
 	roam_info_ptr->wmmEnabledSta = pAssocInd->wmmEnabledSta;
 	roam_info_ptr->timingMeasCap = pAssocInd->timingMeasCap;
-	cdf_mem_copy(&roam_info_ptr->chan_info,
+	qdf_mem_copy(&roam_info_ptr->chan_info,
 		     &pAssocInd->chan_info,
 		     sizeof(tSirSmeChanInfo));
 	if (CSR_IS_INFRA_AP(roam_info_ptr->u.pConnectedProfile)) {
@@ -10053,7 +10053,7 @@
 	 * the WmStatusChange requests is pushed and processed
 	 */
 	pDisassocInd = (tSirSmeDisassocInd *) msg_ptr;
-	cdf_mem_set(&roam_info, sizeof(roam_info), 0);
+	qdf_mem_set(&roam_info, sizeof(roam_info), 0);
 	status = csr_roam_get_session_id_from_bssid(mac_ctx,
 				&pDisassocInd->bssid, &sessionId);
 	if (!QDF_IS_STATUS_SUCCESS(status)) {
@@ -10127,7 +10127,7 @@
 		cmd.command = eSmeCommandRoam;
 		cmd.sessionId = (uint8_t) sessionId;
 		cmd.u.roamCmd.roamReason = eCsrForcedDeauthSta;
-		cdf_mem_copy(cmd.u.roamCmd.peerMac,
+		qdf_mem_copy(cmd.u.roamCmd.peerMac,
 			     pDisassocInd->peer_macaddr.bytes,
 			     QDF_MAC_ADDR_SIZE);
 		csr_roam_remove_duplicate_command(mac_ctx, sessionId, &cmd,
@@ -10145,7 +10145,7 @@
 	tSirSmeDeauthInd *pDeauthInd;
 	tCsrRoamInfo roam_info;
 
-	cdf_mem_set(&roam_info, sizeof(roam_info), 0);
+	qdf_mem_set(&roam_info, sizeof(roam_info), 0);
 	sms_log(mac_ctx, LOG1, FL("DEAUTHENTICATION Indication from MAC"));
 	pDeauthInd = (tpSirSmeDeauthInd) msg_ptr;
 	status = csr_roam_get_session_id_from_bssid(mac_ctx,
@@ -10247,7 +10247,7 @@
 	tSirSmeDeauthRsp *pDeauthRsp = (tSirSmeDeauthRsp *) msg_ptr;
 	tCsrRoamInfo roam_info;
 
-	cdf_mem_set(&roam_info, sizeof(roam_info), 0);
+	qdf_mem_set(&roam_info, sizeof(roam_info), 0);
 	sms_log(mac_ctx, LOGW, FL("eWNI_SME_DEAUTH_RSP from SME"));
 	sessionId = pDeauthRsp->sessionId;
 	if (!CSR_IS_SESSION_VALID(mac_ctx, sessionId))
@@ -10281,7 +10281,7 @@
 	 */
 	tSirSmeDisassocRsp *pDisassocRsp = (tSirSmeDisassocRsp *) msg_ptr;
 
-	cdf_mem_set(&roam_info, sizeof(roam_info), 0);
+	qdf_mem_set(&roam_info, sizeof(roam_info), 0);
 	sms_log(mac_ctx, LOGW, FL("eWNI_SME_DISASSOC_RSP from SME "));
 	sessionId = pDisassocRsp->sessionId;
 	if (!CSR_IS_SESSION_VALID(mac_ctx, sessionId))
@@ -10312,7 +10312,7 @@
 		sms_log(mac_ctx, LOGE, FL("session %d not found"), sessionId);
 		return;
 	}
-	cdf_mem_set(&secEvent, sizeof(host_event_wlan_security_payload_type),
+	qdf_mem_set(&secEvent, sizeof(host_event_wlan_security_payload_type),
 		    0);
 	secEvent.eventId = WLAN_SECURITY_EVENT_MIC_ERROR;
 	secEvent.encryptionModeMulticast =
@@ -10324,7 +10324,7 @@
 	secEvent.authMode =
 		(uint8_t) diag_auth_type_from_csr_type(
 				session->connectedProfile.AuthType);
-	cdf_mem_copy(secEvent.bssid, session->connectedProfile.bssid.bytes,
+	qdf_mem_copy(secEvent.bssid, session->connectedProfile.bssid.bytes,
 			QDF_MAC_ADDR_SIZE);
 	WLAN_HOST_DIAG_EVENT_REPORT(&secEvent, EVENT_WLAN_SECURITY);
 }
@@ -10340,11 +10340,11 @@
 	tpSirSmeMicFailureInd pMicInd = (tpSirSmeMicFailureInd) msg_ptr;
 	eCsrRoamResult result = eCSR_ROAM_RESULT_MIC_ERROR_UNICAST;
 
-	cdf_mem_set(&roam_info, sizeof(roam_info), 0);
+	qdf_mem_set(&roam_info, sizeof(roam_info), 0);
 	status = csr_roam_get_session_id_from_bssid(mac_ctx,
 				&pMicInd->bssId, &sessionId);
 	if (QDF_IS_STATUS_SUCCESS(status)) {
-		cdf_mem_set(&roam_info, sizeof(tCsrRoamInfo), 0);
+		qdf_mem_set(&roam_info, sizeof(tCsrRoamInfo), 0);
 		roam_info.u.pMICFailureInfo = &pMicInd->info;
 		roam_info_ptr = &roam_info;
 		if (pMicInd->info.multicast)
@@ -10367,13 +10367,13 @@
 	tCsrRoamInfo roam_info;
 	tpSirSmeProbeReqInd pProbeReqInd = (tpSirSmeProbeReqInd) msg_ptr;
 
-	cdf_mem_set(&roam_info, sizeof(roam_info), 0);
+	qdf_mem_set(&roam_info, sizeof(roam_info), 0);
 	sms_log(mac_ctx, LOG1, FL("WPS PBC Probe request Indication from SME"));
 
 	status = csr_roam_get_session_id_from_bssid(mac_ctx,
 			&pProbeReqInd->bssid, &sessionId);
 	if (QDF_IS_STATUS_SUCCESS(status)) {
-		cdf_mem_set(&roam_info, sizeof(tCsrRoamInfo), 0);
+		qdf_mem_set(&roam_info, sizeof(tCsrRoamInfo), 0);
 		roam_info.u.pWPSPBCProbeReq = &pProbeReqInd->WPSPBCProbeReq;
 		csr_roam_call_callback(mac_ctx, sessionId, &roam_info,
 				       0, eCSR_ROAM_WPS_PBC_PROBE_REQ_IND,
@@ -10396,7 +10396,7 @@
 	if (pNewBss) {
 		qdf_copy_macaddr(&pIbssLog->bssid, &pNewBss->bssId);
 		if (pNewBss->ssId.length)
-			cdf_mem_copy(pIbssLog->ssid, pNewBss->ssId.ssId,
+			qdf_mem_copy(pIbssLog->ssid, pNewBss->ssId.ssId,
 				     pNewBss->ssId.length);
 		pIbssLog->operatingChannel = pNewBss->channelNumber;
 	}
@@ -10425,7 +10425,7 @@
 	tSirSmeNewBssInfo *pNewBss;
 	eRoamCmdStatus roamStatus = eCSR_ROAM_FAILED;
 
-	cdf_mem_set(&roam_info, sizeof(roam_info), 0);
+	qdf_mem_set(&roam_info, sizeof(roam_info), 0);
 	pStatusChangeMsg = (tSirSmeWmStatusChangeNtf *) msg_ptr;
 	switch (pStatusChangeMsg->statusChangeCode) {
 	case eSIR_SME_IBSS_ACTIVE:
@@ -10440,7 +10440,7 @@
 		}
 		session->connectState = eCSR_ASSOC_STATE_TYPE_IBSS_CONNECTED;
 		if (session->pConnectBssDesc) {
-			cdf_mem_copy(&roam_info.bssid,
+			qdf_mem_copy(&roam_info.bssid,
 				     session->pConnectBssDesc->bssId,
 				     sizeof(struct qdf_mac_addr));
 			roam_info.u.pConnectedProfile =
@@ -10503,12 +10503,12 @@
 		}
 		result = eCSR_ROAM_RESULT_IBSS_COALESCED;
 		roamStatus = eCSR_ROAM_IBSS_IND;
-		cdf_mem_copy(&roam_info.bssid, &pNewBss->bssId,
+		qdf_mem_copy(&roam_info.bssid, &pNewBss->bssId,
 			     sizeof(struct qdf_mac_addr));
 		roam_info_ptr = &roam_info;
 		/* This BSSID is the real BSSID, save it */
 		if (session->pConnectBssDesc)
-			cdf_mem_copy(session->pConnectBssDesc->bssId,
+			qdf_mem_copy(session->pConnectBssDesc->bssId,
 				     &pNewBss->bssId, sizeof(struct qdf_mac_addr));
 		break;
 
@@ -10589,7 +10589,7 @@
 	}
 #endif /* FEATURE_WLAN_DIAG_SUPPORT_CSR */
 
-	cdf_mem_set(&roam_info, sizeof(roam_info), 0);
+	qdf_mem_set(&roam_info, sizeof(roam_info), 0);
 	sessionId = csr_find_ibss_session(mac_ctx);
 	if (CSR_SESSION_ID_INVALID == sessionId)
 		return;
@@ -10607,10 +10607,10 @@
 		goto callback_and_free;
 	}
 	qdf_copy_macaddr(&roam_info.peerMac, &pIbssPeerInd->peer_addr);
-	cdf_mem_copy(&roam_info.bssid, session->pConnectBssDesc->bssId,
+	qdf_mem_copy(&roam_info.bssid, session->pConnectBssDesc->bssId,
 		     sizeof(struct qdf_mac_addr));
 	if (pIbssPeerInd->mesgLen > sizeof(tSmeIbssPeerInd)) {
-		roam_info.pbFrames = cdf_mem_malloc((pIbssPeerInd->mesgLen -
+		roam_info.pbFrames = qdf_mem_malloc((pIbssPeerInd->mesgLen -
 					sizeof(tSmeIbssPeerInd)));
 		if (NULL == roam_info.pbFrames) {
 			status = QDF_STATUS_E_NOMEM;
@@ -10618,7 +10618,7 @@
 			status = QDF_STATUS_SUCCESS;
 			roam_info.nBeaconLength = pIbssPeerInd->mesgLen -
 							sizeof(tSmeIbssPeerInd);
-			cdf_mem_copy(roam_info.pbFrames,
+			qdf_mem_copy(roam_info.pbFrames,
 				((uint8_t *) pIbssPeerInd) +
 				sizeof(tSmeIbssPeerInd),
 				roam_info.nBeaconLength);
@@ -10626,17 +10626,17 @@
 		roam_info.staId = (uint8_t) pIbssPeerInd->staId;
 		roam_info.ucastSig = (uint8_t) pIbssPeerInd->ucastSig;
 		roam_info.bcastSig = (uint8_t) pIbssPeerInd->bcastSig;
-		roam_info.pBssDesc = cdf_mem_malloc(
+		roam_info.pBssDesc = qdf_mem_malloc(
 					session->pConnectBssDesc->length);
 		if (NULL == roam_info.pBssDesc) {
 			status = QDF_STATUS_E_NOMEM;
 			if (roam_info.pbFrames)
-				cdf_mem_free(roam_info.pbFrames);
+				qdf_mem_free(roam_info.pbFrames);
 			if (roam_info.pBssDesc)
-				cdf_mem_free(roam_info.pBssDesc);
+				qdf_mem_free(roam_info.pBssDesc);
 		} else {
 			status = QDF_STATUS_SUCCESS;
-			cdf_mem_copy(roam_info.pBssDesc,
+			qdf_mem_copy(roam_info.pBssDesc,
 				     session->pConnectBssDesc,
 				     session->pConnectBssDesc->length);
 			roam_info_ptr = &roam_info;
@@ -10663,9 +10663,9 @@
 			       eCSR_ROAM_RESULT_IBSS_NEW_PEER);
 	if (roam_info_ptr) {
 		if (roam_info.pbFrames)
-			cdf_mem_free(roam_info.pbFrames);
+			qdf_mem_free(roam_info.pbFrames);
 		if (roam_info.pBssDesc)
-			cdf_mem_free(roam_info.pBssDesc);
+			qdf_mem_free(roam_info.pBssDesc);
 	}
 }
 
@@ -10681,7 +10681,7 @@
 		sms_log(mac_ctx, LOGE, FL("IBSS peer ind. message is NULL"));
 		return;
 	}
-	cdf_mem_set(&roam_info, sizeof(roam_info), 0);
+	qdf_mem_set(&roam_info, sizeof(roam_info), 0);
 	pIbssPeerInd = (tSmeIbssPeerInd *) msg_ptr;
 	sessionId = csr_find_ibss_session(mac_ctx);
 	if (CSR_SESSION_ID_INVALID != sessionId) {
@@ -10721,7 +10721,7 @@
 	if (eCSR_ENCRYPT_TYPE_NONE ==
 		session->connectedProfile.EncryptionType)
 		return;
-	cdf_mem_set(&setKeyEvent,
+	qdf_mem_set(&setKeyEvent,
 		    sizeof(host_event_wlan_security_payload_type), 0);
 	if (qdf_is_macaddr_group(&pRsp->peer_macaddr))
 		setKeyEvent.eventId = WLAN_SECURITY_EVENT_SET_GTK_RSP;
@@ -10733,7 +10733,7 @@
 	setKeyEvent.encryptionModeUnicast =
 		(uint8_t) diag_enc_type_from_csr_type(
 				session->connectedProfile.EncryptionType);
-	cdf_mem_copy(setKeyEvent.bssid, session->connectedProfile.bssid.bytes,
+	qdf_mem_copy(setKeyEvent.bssid, session->connectedProfile.bssid.bytes,
 			QDF_MAC_ADDR_SIZE);
 	setKeyEvent.authMode =
 		(uint8_t) diag_auth_type_from_csr_type(
@@ -10757,7 +10757,7 @@
 	tSirSmeSetContextRsp *pRsp = (tSirSmeSetContextRsp *) msg_ptr;
 	tListElem *entry;
 
-	cdf_mem_set(&roam_info, sizeof(roam_info), 0);
+	qdf_mem_set(&roam_info, sizeof(roam_info), 0);
 	entry = csr_ll_peek_head(&mac_ctx->sme.smeCmdActiveList,
 				 LL_ACCESS_LOCK);
 	if (!entry) {
@@ -10799,7 +10799,7 @@
 		 */
 		if (qdf_is_macaddr_broadcast(&pRsp->peer_macaddr)) {
 			tpSirSetActiveModeSetBncFilterReq pMsg;
-			pMsg = cdf_mem_malloc(
+			pMsg = qdf_mem_malloc(
 				    sizeof(tSirSetActiveModeSetBncFilterReq));
 			pMsg->messageType = eWNI_SME_SET_BCN_FILTER_REQ;
 			pMsg->length = sizeof(uint8_t);
@@ -10853,7 +10853,7 @@
 	tSmeMaxAssocInd *pSmeMaxAssocInd;
 	tCsrRoamInfo roam_info;
 
-	cdf_mem_set(&roam_info, sizeof(roam_info), 0);
+	qdf_mem_set(&roam_info, sizeof(roam_info), 0);
 	pSmeMaxAssocInd = (tSmeMaxAssocInd *) msg_ptr;
 	sms_log(mac_ctx, LOG1,
 		FL("max assoc have been reached, new peer cannot be accepted"));
@@ -11337,7 +11337,7 @@
 		fToRoam = false;
 	}
 	/* prepare to tell HDD to disconnect */
-	cdf_mem_set(&roamInfo, sizeof(tCsrRoamInfo), 0);
+	qdf_mem_set(&roamInfo, sizeof(tCsrRoamInfo), 0);
 	roamInfo.statusCode = (tSirResultCodes) pSession->roamingStatusCode;
 	roamInfo.reasonCode = pSession->joinFailStatusCode.reasonCode;
 	if (eWNI_SME_DISASSOC_IND == type) {
@@ -11375,7 +11375,7 @@
 					eCsrLostlinkRoamingDeauth :
 					eCsrLostlinkRoamingDisassoc);
 			if (QDF_IS_STATUS_SUCCESS(status)) {
-				cdf_mem_set(&roamInfo, sizeof(tCsrRoamInfo), 0);
+				qdf_mem_set(&roamInfo, sizeof(tCsrRoamInfo), 0);
 				/* For IBSS, we need to give some more info to HDD */
 				if (csr_is_bss_type_ibss
 					(pSession->connectedProfile.BSSType)) {
@@ -11853,7 +11853,7 @@
 	} else
 		return maxTxPwr;
 
-	pCountryInfo = cdf_mem_malloc(cfgLength);
+	pCountryInfo = qdf_mem_malloc(cfgLength);
 	if (NULL == pCountryInfo)
 		status = QDF_STATUS_E_NOMEM;
 	else
@@ -11882,7 +11882,7 @@
 
 error:
 	if (NULL != pCountryInfo)
-		cdf_mem_free(pCountryInfo);
+		qdf_mem_free(pCountryInfo);
 
 	return maxTxPwr;
 }
@@ -12053,11 +12053,11 @@
 
 	if (!(pProfile1 && pProfile2))
 		return fCheck;
-	pScanFilter = cdf_mem_malloc(sizeof(tCsrScanResultFilter));
+	pScanFilter = qdf_mem_malloc(sizeof(tCsrScanResultFilter));
 	if (NULL == pScanFilter)
 		return fCheck;
 
-	cdf_mem_set(pScanFilter, sizeof(tCsrScanResultFilter), 0);
+	qdf_mem_set(pScanFilter, sizeof(tCsrScanResultFilter), 0);
 	status = csr_roam_prepare_filter_from_profile(pMac, pProfile2,
 						      pScanFilter);
 	if (!(QDF_IS_STATUS_SUCCESS(status)))
@@ -12095,7 +12095,7 @@
 	fCheck = true;
 free_scan_filter:
 	csr_free_scan_filter(pMac, pScanFilter);
-	cdf_mem_free(pScanFilter);
+	qdf_mem_free(pScanFilter);
 	return fCheck;
 }
 
@@ -12127,7 +12127,7 @@
 			if (pConnProfile->Keys.KeyLength[i] !=
 			    pProfile2->Keys.KeyLength[i])
 				break;
-			if (!cdf_mem_compare(&pConnProfile->Keys.KeyMaterial[i],
+			if (qdf_mem_cmp(&pConnProfile->Keys.KeyMaterial[i],
 					     &pProfile2->Keys.KeyMaterial[i],
 					     pProfile2->Keys.KeyLength[i])) {
 				break;
@@ -12273,7 +12273,7 @@
 
 	if (type == true) {
 		rate_set->numRates = 8;
-		cdf_mem_copy(rate_set->rate, ofdm_rates, sizeof(ofdm_rates));
+		qdf_mem_copy(rate_set->rate, ofdm_rates, sizeof(ofdm_rates));
 		if (masked) {
 			rate_set->rate[0] |= CSR_DOT11_BASIC_RATE_MASK;
 			rate_set->rate[2] |= CSR_DOT11_BASIC_RATE_MASK;
@@ -12281,7 +12281,7 @@
 		}
 	} else {
 		rate_set->numRates = 4;
-		cdf_mem_copy(rate_set->rate, cck_rates, sizeof(cck_rates));
+		qdf_mem_copy(rate_set->rate, cck_rates, sizeof(cck_rates));
 		if (masked) {
 			rate_set->rate[0] |= CSR_DOT11_BASIC_RATE_MASK;
 			rate_set->rate[1] |= CSR_DOT11_BASIC_RATE_MASK;
@@ -12440,7 +12440,7 @@
 	pParam->sirNwType = pBssDesc->nwType;
 	pParam->cbMode = PHY_SINGLE_CHANNEL_CENTERED;
 	pParam->operationChn = pBssDesc->channelId;
-	cdf_mem_copy(&pParam->bssid, pBssDesc->bssId, sizeof(struct qdf_mac_addr));
+	qdf_mem_copy(&pParam->bssid, pBssDesc->bssId, sizeof(struct qdf_mac_addr));
 
 	if (!pIes) {
 		pParam->ssId.length = 0;
@@ -12457,7 +12457,7 @@
 				pIes->SuppRates.num_rates);
 			pIes->SuppRates.num_rates = SIR_MAC_RATESET_EID_MAX;
 		}
-		cdf_mem_copy(pParam->operationalRateSet.rate,
+		qdf_mem_copy(pParam->operationalRateSet.rate,
 			     pIes->SuppRates.rates,
 			     sizeof(*pIes->SuppRates.rates) *
 			     pIes->SuppRates.num_rates);
@@ -12470,14 +12470,14 @@
 				pIes->ExtSuppRates.num_rates);
 			pIes->ExtSuppRates.num_rates = SIR_MAC_RATESET_EID_MAX;
 		}
-		cdf_mem_copy(pParam->extendedRateSet.rate,
+		qdf_mem_copy(pParam->extendedRateSet.rate,
 			     pIes->ExtSuppRates.rates,
 			     sizeof(*pIes->ExtSuppRates.rates) *
 			     pIes->ExtSuppRates.num_rates);
 	}
 	if (pIes->SSID.present) {
 		pParam->ssId.length = pIes->SSID.num_ssid;
-		cdf_mem_copy(pParam->ssId.ssId, pIes->SSID.ssid,
+		qdf_mem_copy(pParam->ssId.ssId, pIes->SSID.ssid,
 			     pParam->ssId.length);
 	}
 	pParam->cbMode = csr_get_cb_mode_from_ies(pMac, pParam->operationChn,
@@ -12524,13 +12524,13 @@
 			if (pBssDesc) {
 				pIbssLog->eventId =
 					WLAN_IBSS_EVENT_JOIN_IBSS_REQ;
-				cdf_mem_copy(pIbssLog->bssid.bytes,
+				qdf_mem_copy(pIbssLog->bssid.bytes,
 					pBssDesc->bssId, QDF_MAC_ADDR_SIZE);
 			} else {
 				pIbssLog->eventId =
 					WLAN_IBSS_EVENT_START_IBSS_REQ;
 			}
-			cdf_mem_copy(pIbssLog->ssid, pParam->ssId.ssId,
+			qdf_mem_copy(pIbssLog->ssid, pParam->ssId.ssId,
 				     pParam->ssId.length);
 			if (pProfile->ChannelInfo.numOfChannels == 0) {
 				pIbssLog->channelSetting = AUTO_PICK;
@@ -12627,16 +12627,16 @@
 		csr_roam_get_bss_start_parms(pMac, pProfile, &pSession->bssParams);
 		/* Use the first SSID */
 		if (pProfile->SSIDs.numOfSSIDs)
-			cdf_mem_copy(&pSession->bssParams.ssId,
+			qdf_mem_copy(&pSession->bssParams.ssId,
 				     pProfile->SSIDs.SSIDList,
 				     sizeof(tSirMacSSid));
 		if (pProfile->BSSIDs.numOfBSSIDs)
 			/* Use the first BSSID */
-			cdf_mem_copy(&pSession->bssParams.bssid,
+			qdf_mem_copy(&pSession->bssParams.bssid,
 				     pProfile->BSSIDs.bssid,
 				     sizeof(struct qdf_mac_addr));
 		else
-			cdf_mem_set(&pSession->bssParams.bssid,
+			qdf_mem_set(&pSession->bssParams.bssid,
 				    sizeof(struct qdf_mac_addr), 0);
 	}
 	Channel = pSession->bssParams.operationChn;
@@ -12698,13 +12698,13 @@
 	} else {
 		tBssConfigParam *pBssConfig;
 
-		pBssConfig = cdf_mem_malloc(sizeof(tBssConfigParam));
+		pBssConfig = qdf_mem_malloc(sizeof(tBssConfigParam));
 		if (NULL == pBssConfig)
 			status = QDF_STATUS_E_NOMEM;
 		else
 			status = QDF_STATUS_SUCCESS;
 		if (QDF_IS_STATUS_SUCCESS(status)) {
-			cdf_mem_set(pBssConfig, sizeof(tBssConfigParam), 0);
+			qdf_mem_set(pBssConfig, sizeof(tBssConfigParam), 0);
 			/* there is no Bss description before we start an IBSS so we need to adopt */
 			/* all Bss configuration parameters from the Profile. */
 			status =
@@ -12726,7 +12726,7 @@
 								    false);
 			}
 
-			cdf_mem_free(pBssConfig);
+			qdf_mem_free(pBssConfig);
 		} /* Allocate memory */
 	}
 
@@ -12752,7 +12752,7 @@
 		pSession->connectedProfile.operationChannel =
 			pNewBss->channelNumber;
 		/* move the BSSId from the BSS description into the connected state information. */
-		cdf_mem_copy(&pSession->connectedProfile.bssid.bytes,
+		qdf_mem_copy(&pSession->connectedProfile.bssid.bytes,
 			     &(pNewBss->bssId), sizeof(struct qdf_mac_addr));
 	}
 	return;
@@ -12767,7 +12767,7 @@
 		sms_log(pMac, LOGE, FL("session %d not found"), sessionId);
 		return QDF_STATUS_E_FAILURE;
 	}
-	cdf_mem_copy(pSession->psk_pmk, pPSK_PMK, sizeof(pSession->psk_pmk));
+	qdf_mem_copy(pSession->psk_pmk, pPSK_PMK, sizeof(pSession->psk_pmk));
 	pSession->pmk_len = pmk_len;
 	return QDF_STATUS_SUCCESS;
 }
@@ -12779,7 +12779,7 @@
 {
 	WLAN_HOST_DIAG_EVENT_DEF(secEvent,
 				 host_event_wlan_security_payload_type);
-	cdf_mem_set(&secEvent,
+	qdf_mem_set(&secEvent,
 	    sizeof(host_event_wlan_security_payload_type), 0);
 	secEvent.eventId = WLAN_SECURITY_EVENT_PMKID_UPDATE;
 	secEvent.encryptionModeMulticast =
@@ -12788,7 +12788,7 @@
 	secEvent.encryptionModeUnicast =
 		(uint8_t) diag_enc_type_from_csr_type(
 			pSession->connectedProfile.EncryptionType);
-	cdf_mem_copy(secEvent.bssid,
+	qdf_mem_copy(secEvent.bssid,
 		     pSession->connectedProfile.bssid.bytes,
 			QDF_MAC_ADDR_SIZE);
 	secEvent.authMode = (uint8_t) diag_auth_type_from_csr_type(
@@ -12823,7 +12823,7 @@
 	if (update_entire_cache) {
 		if (numItems && pPMKIDCache) {
 			pSession->NumPmkidCache = (uint16_t) numItems;
-			cdf_mem_copy(pSession->PmkidCacheInfo, pPMKIDCache,
+			qdf_mem_copy(pSession->PmkidCacheInfo, pPMKIDCache,
 				sizeof(tPmkidCacheInfo) * numItems);
 			pSession->curr_cache_idx = (uint16_t)numItems;
 		}
@@ -12841,7 +12841,7 @@
 		qdf_copy_macaddr(
 		    &pSession->PmkidCacheInfo[pSession->curr_cache_idx].BSSID,
 		    &pmksa->BSSID);
-		cdf_mem_copy(
+		qdf_mem_copy(
 		    pSession->PmkidCacheInfo[pSession->curr_cache_idx].PMKID,
 		    pmksa->PMKID, CSR_RSN_PMKID_SIZE);
 
@@ -12882,7 +12882,7 @@
 
 	if (flush_cache) {
 		/* Flush the entire cache */
-		cdf_mem_zero(pSession->PmkidCacheInfo,
+		qdf_mem_zero(pSession->PmkidCacheInfo,
 			     sizeof(tPmkidCacheInfo) * CSR_MAX_PMKID_ALLOWED);
 		pSession->NumPmkidCache = 0;
 		pSession->curr_cache_idx = 0;
@@ -12891,12 +12891,12 @@
 
 	/* !flush_cache - so look up in the cache */
 	for (Index = 0; Index < CSR_MAX_PMKID_ALLOWED; Index++) {
-		if (cdf_mem_compare(pSession->PmkidCacheInfo[Index].BSSID.bytes,
+		if (!qdf_mem_cmp(pSession->PmkidCacheInfo[Index].BSSID.bytes,
 				    pBSSId, QDF_MAC_ADDR_SIZE)) {
 			fMatchFound = 1;
 
 			/* Clear this - the matched entry */
-			cdf_mem_zero(&pSession->PmkidCacheInfo[Index],
+			qdf_mem_zero(&pSession->PmkidCacheInfo[Index],
 				     sizeof(tPmkidCacheInfo));
 			break;
 		}
@@ -12912,23 +12912,23 @@
 	curr_idx = pSession->curr_cache_idx;
 	if (Index < curr_idx) {
 		for (i = Index; i < (curr_idx - 1); i++) {
-			cdf_mem_copy(&pSession->PmkidCacheInfo[i],
+			qdf_mem_copy(&pSession->PmkidCacheInfo[i],
 				     &pSession->PmkidCacheInfo[i + 1],
 				     sizeof(tPmkidCacheInfo));
 		}
 
 		pSession->curr_cache_idx--;
-		cdf_mem_zero(&pSession->PmkidCacheInfo
+		qdf_mem_zero(&pSession->PmkidCacheInfo
 			     [pSession->curr_cache_idx],
 			     sizeof(tPmkidCacheInfo));
 	} else if (Index > curr_idx) {
 		for (i = Index; i > (curr_idx); i--) {
-			cdf_mem_copy(&pSession->PmkidCacheInfo[i],
+			qdf_mem_copy(&pSession->PmkidCacheInfo[i],
 				     &pSession->PmkidCacheInfo[i - 1],
 				     sizeof(tPmkidCacheInfo));
 		}
 
-		cdf_mem_zero(&pSession->PmkidCacheInfo
+		qdf_mem_zero(&pSession->PmkidCacheInfo
 			     [pSession->curr_cache_idx],
 			     sizeof(tPmkidCacheInfo));
 	}
@@ -12982,7 +12982,7 @@
 		/* Fill the valid entries */
 		pmksa = &pSession->PmkidCacheInfo[i];
 		if (!qdf_is_macaddr_zero(&pmksa->BSSID)) {
-			cdf_mem_copy(pPmkidCache, pmksa,
+			qdf_mem_copy(pPmkidCache, pmksa,
 				     sizeof(tPmkidCacheInfo));
 			pPmkidCache++;
 			j++;
@@ -13010,7 +13010,7 @@
 		*pLen = pSession->nWpaRsnReqIeLength;
 		if (pBuf) {
 			if (len >= pSession->nWpaRsnReqIeLength) {
-				cdf_mem_copy(pBuf, pSession->pWpaRsnReqIE,
+				qdf_mem_copy(pBuf, pSession->pWpaRsnReqIE,
 					     pSession->nWpaRsnReqIeLength);
 				status = QDF_STATUS_SUCCESS;
 			}
@@ -13036,7 +13036,7 @@
 		*pLen = pSession->nWpaRsnRspIeLength;
 		if (pBuf) {
 			if (len >= pSession->nWpaRsnRspIeLength) {
-				cdf_mem_copy(pBuf, pSession->pWpaRsnRspIE,
+				qdf_mem_copy(pBuf, pSession->pWpaRsnRspIE,
 					     pSession->nWpaRsnRspIeLength);
 				status = QDF_STATUS_SUCCESS;
 			}
@@ -13063,7 +13063,7 @@
 		*pLen = pSession->nWapiReqIeLength;
 		if (pBuf) {
 			if (len >= pSession->nWapiReqIeLength) {
-				cdf_mem_copy(pBuf, pSession->pWapiReqIE,
+				qdf_mem_copy(pBuf, pSession->pWapiReqIE,
 					     pSession->nWapiReqIeLength);
 				status = QDF_STATUS_SUCCESS;
 			}
@@ -13089,7 +13089,7 @@
 		*pLen = pSession->nWapiRspIeLength;
 		if (pBuf) {
 			if (len >= pSession->nWapiRspIeLength) {
-				cdf_mem_copy(pBuf, pSession->pWapiRspIE,
+				qdf_mem_copy(pBuf, pSession->pWapiRspIE,
 					     pSession->nWapiRspIeLength);
 				status = QDF_STATUS_SUCCESS;
 			}
@@ -13134,29 +13134,29 @@
 	 * Prepare the filter. Only fill in the necessary fields. Not all fields
 	 * are needed
 	 */
-	pScanFilter = cdf_mem_malloc(sizeof(tCsrScanResultFilter));
+	pScanFilter = qdf_mem_malloc(sizeof(tCsrScanResultFilter));
 	if (NULL == pScanFilter)
 		return QDF_STATUS_E_NOMEM;
 
-	cdf_mem_set(pScanFilter, sizeof(tCsrScanResultFilter), 0);
-	pScanFilter->BSSIDs.bssid = cdf_mem_malloc(sizeof(struct qdf_mac_addr));
+	qdf_mem_set(pScanFilter, sizeof(tCsrScanResultFilter), 0);
+	pScanFilter->BSSIDs.bssid = qdf_mem_malloc(sizeof(struct qdf_mac_addr));
 	if (NULL == pScanFilter->BSSIDs.bssid) {
-		cdf_mem_free(pScanFilter);
+		qdf_mem_free(pScanFilter);
 		return QDF_STATUS_E_NOMEM;
 	}
-	cdf_mem_copy(pScanFilter->BSSIDs.bssid,
+	qdf_mem_copy(pScanFilter->BSSIDs.bssid,
 		     &pConnProfile->bssid, sizeof(struct qdf_mac_addr));
 	pScanFilter->BSSIDs.numOfBSSIDs = 1;
 	if (!csr_is_nullssid(pConnProfile->SSID.ssId,
 			pConnProfile->SSID.length)) {
-		pScanFilter->SSIDs.SSIDList = cdf_mem_malloc(
+		pScanFilter->SSIDs.SSIDList = qdf_mem_malloc(
 							sizeof(tCsrSSIDInfo));
 		if (NULL == pScanFilter->SSIDs.SSIDList) {
 			csr_free_scan_filter(pMac, pScanFilter);
-			cdf_mem_free(pScanFilter);
+			qdf_mem_free(pScanFilter);
 			return QDF_STATUS_E_NOMEM;
 		}
-		cdf_mem_copy(&pScanFilter->SSIDs.SSIDList[0].SSID,
+		qdf_mem_copy(&pScanFilter->SSIDs.SSIDList[0].SSID,
 			&pConnProfile->SSID, sizeof(tSirMacSSid));
 	}
 	pScanFilter->authType.numEntries = 1;
@@ -13194,7 +13194,7 @@
 			 * need to free the IEs since it is allocated
 			 * by csr_match_bss
 			 */
-			cdf_mem_free(pIes);
+			qdf_mem_free(pIes);
 		}
 		if (fMatch) {
 			/* We found the one */
@@ -13209,7 +13209,7 @@
 	} /* while */
 	csr_ll_unlock(&pMac->scan.scanResultList);
 	csr_free_scan_filter(pMac, pScanFilter);
-	cdf_mem_free(pScanFilter);
+	qdf_mem_free(pScanFilter);
 	return status;
 }
 
@@ -13246,7 +13246,7 @@
 			QDF_ASSERT(0);
 			return QDF_STATUS_E_FAILURE;
 		}
-		cdf_mem_set(&bssConfig, sizeof(tBssConfigParam), 0);
+		qdf_mem_set(&bssConfig, sizeof(tBssConfigParam), 0);
 		/* Assume HDD provide bssid in profile */
 		qdf_copy_macaddr(&pSession->bssParams.bssid,
 				 pProfile->BSSIDs.bssid);
@@ -13259,9 +13259,9 @@
 			/* Save profile for late use */
 			csr_free_roam_profile(pMac, sessionId);
 			pSession->pCurRoamProfile =
-				cdf_mem_malloc(sizeof(tCsrRoamProfile));
+				qdf_mem_malloc(sizeof(tCsrRoamProfile));
 			if (pSession->pCurRoamProfile != NULL) {
-				cdf_mem_set(pSession->pCurRoamProfile,
+				qdf_mem_set(pSession->pCurRoamProfile,
 					    sizeof(tCsrRoamProfile), 0);
 				csr_roam_copy_profile(pMac,
 						      pSession->pCurRoamProfile,
@@ -13372,7 +13372,7 @@
 	do {
 		pSession->joinFailStatusCode.statusCode = eSIR_SME_SUCCESS;
 		pSession->joinFailStatusCode.reasonCode = 0;
-		cdf_mem_copy(&pSession->joinFailStatusCode.bssId,
+		qdf_mem_copy(&pSession->joinFailStatusCode.bssId,
 		       &pBssDescription->bssId, sizeof(tSirMacAddr));
 		/*
 		 * the tSirSmeJoinReq which includes a single
@@ -13393,25 +13393,25 @@
 				 */
 				sizeof(tCsrWpaIe) + sizeof(tCsrWpaAuthIe) +
 				sizeof(uint16_t);
-		csr_join_req = cdf_mem_malloc(msgLen);
+		csr_join_req = qdf_mem_malloc(msgLen);
 		if (NULL == csr_join_req)
 			status = QDF_STATUS_E_NOMEM;
 		else
 			status = QDF_STATUS_SUCCESS;
 		if (!QDF_IS_STATUS_SUCCESS(status))
 			break;
-		cdf_mem_set(csr_join_req, msgLen, 0);
+		qdf_mem_set(csr_join_req, msgLen, 0);
 		csr_join_req->messageType = messageType;
 		csr_join_req->length = msgLen;
 		csr_join_req->sessionId = (uint8_t) sessionId;
 		csr_join_req->transactionId = 0;
 		if (pIes->SSID.present && pIes->SSID.num_ssid) {
 			csr_join_req->ssId.length = pIes->SSID.num_ssid;
-			cdf_mem_copy(&csr_join_req->ssId.ssId, pIes->SSID.ssid,
+			qdf_mem_copy(&csr_join_req->ssId.ssId, pIes->SSID.ssid,
 				     pIes->SSID.num_ssid);
 		} else
 			csr_join_req->ssId.length = 0;
-		cdf_mem_copy(&csr_join_req->selfMacAddr, &pSession->selfMacAddr,
+		qdf_mem_copy(&csr_join_req->selfMacAddr, &pSession->selfMacAddr,
 			     sizeof(tSirMacAddr));
 		sms_log(pMac, LOGE,
 			"Connecting to ssid:%.*s bssid: "
@@ -13462,7 +13462,7 @@
 			if (OpRateSet.numRates) {
 				csr_join_req->operationalRateSet.numRates =
 					OpRateSet.numRates;
-				cdf_mem_copy(&csr_join_req->operationalRateSet.
+				qdf_mem_copy(&csr_join_req->operationalRateSet.
 						rate, OpRateSet.rate,
 						OpRateSet.numRates);
 			} else
@@ -13472,7 +13472,7 @@
 			if (ExRateSet.numRates) {
 				csr_join_req->extendedRateSet.numRates =
 					ExRateSet.numRates;
-				cdf_mem_copy(&csr_join_req->extendedRateSet.
+				qdf_mem_copy(&csr_join_req->extendedRateSet.
 						rate, ExRateSet.rate,
 						ExRateSet.numRates);
 			} else
@@ -13522,11 +13522,11 @@
 				if (ieLen > pSession->nWapiReqIeLength) {
 					if (pSession->pWapiReqIE
 					    && pSession->nWapiReqIeLength) {
-						cdf_mem_free(pSession->
+						qdf_mem_free(pSession->
 							     pWapiReqIE);
 					}
 					pSession->pWapiReqIE =
-						cdf_mem_malloc(ieLen);
+						qdf_mem_malloc(ieLen);
 					if (NULL == pSession->pWapiReqIE)
 						status = QDF_STATUS_E_NOMEM;
 					else
@@ -13535,10 +13535,10 @@
 						break;
 				}
 				pSession->nWapiReqIeLength = ieLen;
-				cdf_mem_copy(pSession->pWapiReqIE, wpaRsnIE,
+				qdf_mem_copy(pSession->pWapiReqIE, wpaRsnIE,
 					     ieLen);
 				csr_join_req->rsnIE.length = ieLen;
-				cdf_mem_copy(&csr_join_req->rsnIE.rsnIEdata,
+				qdf_mem_copy(&csr_join_req->rsnIE.rsnIEdata,
 						 wpaRsnIE, ieLen);
 			} else  /* should be WPA/WPA2 otherwise */
 #endif /* FEATURE_WLAN_WAPI */
@@ -13547,11 +13547,11 @@
 				if (ieLen > pSession->nWpaRsnReqIeLength) {
 					if (pSession->pWpaRsnReqIE
 					    && pSession->nWpaRsnReqIeLength) {
-						cdf_mem_free(pSession->
+						qdf_mem_free(pSession->
 							     pWpaRsnReqIE);
 					}
 					pSession->pWpaRsnReqIE =
-						cdf_mem_malloc(ieLen);
+						qdf_mem_malloc(ieLen);
 					if (NULL == pSession->pWpaRsnReqIE)
 						status = QDF_STATUS_E_NOMEM;
 					else
@@ -13560,23 +13560,23 @@
 						break;
 				}
 				pSession->nWpaRsnReqIeLength = ieLen;
-				cdf_mem_copy(pSession->pWpaRsnReqIE, wpaRsnIE,
+				qdf_mem_copy(pSession->pWpaRsnReqIE, wpaRsnIE,
 					     ieLen);
 				csr_join_req->rsnIE.length = ieLen;
-				cdf_mem_copy(&csr_join_req->rsnIE.rsnIEdata,
+				qdf_mem_copy(&csr_join_req->rsnIE.rsnIEdata,
 						 wpaRsnIE, ieLen);
 			}
 		} else {
 			/* free whatever old info */
 			pSession->nWpaRsnReqIeLength = 0;
 			if (pSession->pWpaRsnReqIE) {
-				cdf_mem_free(pSession->pWpaRsnReqIE);
+				qdf_mem_free(pSession->pWpaRsnReqIE);
 				pSession->pWpaRsnReqIE = NULL;
 			}
 #ifdef FEATURE_WLAN_WAPI
 			pSession->nWapiReqIeLength = 0;
 			if (pSession->pWapiReqIE) {
-				cdf_mem_free(pSession->pWapiReqIE);
+				qdf_mem_free(pSession->pWapiReqIE);
 				pSession->pWapiReqIE = NULL;
 			}
 #endif /* FEATURE_WLAN_WAPI */
@@ -13591,7 +13591,7 @@
 				/* Insert the CCKM IE into the join request */
 #ifdef FEATURE_WLAN_ESE_UPLOAD
 				ieLen = pSession->suppCckmIeInfo.cckmIeLen;
-				cdf_mem_copy((void *)(wpaRsnIE),
+				qdf_mem_copy((void *)(wpaRsnIE),
 						pSession->suppCckmIeInfo.cckmIe,
 						ieLen);
 #endif /* FEATURE_WLAN_ESE_UPLOAD */
@@ -13607,7 +13607,7 @@
 				 * buffer (wpaRsnIE)
 				 */
 				csr_join_req->cckmIE.length = ieLen;
-				cdf_mem_copy(&csr_join_req->cckmIE.cckmIEdata,
+				qdf_mem_copy(&csr_join_req->cckmIE.cckmIEdata,
 						wpaRsnIE, ieLen);
 			} else
 				csr_join_req->cckmIE.length = 0;
@@ -13619,9 +13619,9 @@
 			if (ieLen > pSession->nAddIEScanLength) {
 				if (pSession->pAddIEScan
 					&& pSession->nAddIEScanLength) {
-					cdf_mem_free(pSession->pAddIEScan);
+					qdf_mem_free(pSession->pAddIEScan);
 				}
-				pSession->pAddIEScan = cdf_mem_malloc(ieLen);
+				pSession->pAddIEScan = qdf_mem_malloc(ieLen);
 				if (NULL == pSession->pAddIEScan)
 					status = QDF_STATUS_E_NOMEM;
 				else
@@ -13630,15 +13630,15 @@
 					break;
 			}
 			pSession->nAddIEScanLength = ieLen;
-			cdf_mem_copy(pSession->pAddIEScan, pProfile->pAddIEScan,
+			qdf_mem_copy(pSession->pAddIEScan, pProfile->pAddIEScan,
 					ieLen);
 			csr_join_req->addIEScan.length = ieLen;
-			cdf_mem_copy(&csr_join_req->addIEScan.addIEdata,
+			qdf_mem_copy(&csr_join_req->addIEScan.addIEdata,
 					pProfile->pAddIEScan, ieLen);
 		} else {
 			pSession->nAddIEScanLength = 0;
 			if (pSession->pAddIEScan) {
-				cdf_mem_free(pSession->pAddIEScan);
+				qdf_mem_free(pSession->pAddIEScan);
 				pSession->pAddIEScan = NULL;
 			}
 			csr_join_req->addIEScan.length = 0;
@@ -13649,9 +13649,9 @@
 			if (ieLen > pSession->nAddIEAssocLength) {
 				if (pSession->pAddIEAssoc
 				    && pSession->nAddIEAssocLength) {
-					cdf_mem_free(pSession->pAddIEAssoc);
+					qdf_mem_free(pSession->pAddIEAssoc);
 				}
-				pSession->pAddIEAssoc = cdf_mem_malloc(ieLen);
+				pSession->pAddIEAssoc = qdf_mem_malloc(ieLen);
 				if (NULL == pSession->pAddIEAssoc)
 					status = QDF_STATUS_E_NOMEM;
 				else
@@ -13660,15 +13660,15 @@
 					break;
 			}
 			pSession->nAddIEAssocLength = ieLen;
-			cdf_mem_copy(pSession->pAddIEAssoc,
+			qdf_mem_copy(pSession->pAddIEAssoc,
 				     pProfile->pAddIEAssoc, ieLen);
 			csr_join_req->addIEAssoc.length = ieLen;
-			cdf_mem_copy(&csr_join_req->addIEAssoc.addIEdata,
+			qdf_mem_copy(&csr_join_req->addIEAssoc.addIEdata,
 					 pProfile->pAddIEAssoc, ieLen);
 		} else {
 			pSession->nAddIEAssocLength = 0;
 			if (pSession->pAddIEAssoc) {
-				cdf_mem_free(pSession->pAddIEAssoc);
+				qdf_mem_free(pSession->pAddIEAssoc);
 				pSession->pAddIEAssoc = NULL;
 			}
 			csr_join_req->addIEAssoc.length = 0;
@@ -13746,8 +13746,8 @@
 			 * ESE-Tspec IEs in the ASSOC request is presently not
 			 * supported. so nullify the TSPEC parameters
 			 */
-			cdf_mem_set(&eseTspec, sizeof(tESETspecInfo), 0);
-			cdf_mem_copy(&csr_join_req->eseTspecInfo,
+			qdf_mem_set(&eseTspec, sizeof(tESETspecInfo), 0);
+			qdf_mem_copy(&csr_join_req->eseTspecInfo,
 					&eseTspec, sizeof(tESETspecInfo));
 		} else if (eWNI_SME_REASSOC_REQ == messageType) {
 			if ((csr_is_profile_ese(pProfile) ||
@@ -13756,7 +13756,7 @@
 					eCSR_AUTH_TYPE_OPEN_SYSTEM))) &&
 				(ese_config)) {
 				tESETspecInfo eseTspec;
-				cdf_mem_set(&eseTspec, sizeof(tESETspecInfo),
+				qdf_mem_set(&eseTspec, sizeof(tESETspecInfo),
 						0);
 				eseTspec.numTspecs =
 					sme_qos_ese_retrieve_tspec_info(pMac,
@@ -13766,7 +13766,7 @@
 				csr_join_req->eseTspecInfo.numTspecs =
 					eseTspec.numTspecs;
 				if (eseTspec.numTspecs) {
-					cdf_mem_copy(&csr_join_req->eseTspecInfo
+					qdf_mem_copy(&csr_join_req->eseTspecInfo
 						.tspec[0],
 						&eseTspec.tspec[0],
 						(eseTspec.numTspecs *
@@ -13779,9 +13779,9 @@
 				 * presently not supported. so nullify the TSPEC
 				 * parameters
 				 */
-				cdf_mem_set(&eseTspec, sizeof(tESETspecInfo),
+				qdf_mem_set(&eseTspec, sizeof(tESETspecInfo),
 						0);
-				cdf_mem_copy(&csr_join_req->eseTspecInfo,
+				qdf_mem_copy(&csr_join_req->eseTspecInfo,
 						&eseTspec,
 						sizeof(tESETspecInfo));
 			}
@@ -13813,7 +13813,7 @@
 				(&pIes->Country.triplets[0]));
 			csr_apply_power2_current(pMac);
 		}
-		cdf_mem_copy(&csr_join_req->htConfig,
+		qdf_mem_copy(&csr_join_req->htConfig,
 				&pSession->htConfig, sizeof(tSirHTConfig));
 #ifdef WLAN_FEATURE_11AC
 		csr_join_req->txBFIniFeatureEnabled =
@@ -13870,7 +13870,7 @@
 			csr_join_req->isOSENConnection = false;
 
 		/* Fill rrm config parameters */
-		cdf_mem_copy(&csr_join_req->rrm_config,
+		qdf_mem_copy(&csr_join_req->rrm_config,
 			     &pMac->rrm.rrmSmeContext.rrmConfig,
 			     sizeof(struct rrm_config_param));
 
@@ -13907,7 +13907,7 @@
 
 		csr_join_req->uapsdPerAcBitmask = (uint8_t)pProfile->uapsd_mask;
 		/* Move the entire BssDescription into the join request. */
-		cdf_mem_copy(&csr_join_req->bssDescription, pBssDescription,
+		qdf_mem_copy(&csr_join_req->bssDescription, pBssDescription,
 				pBssDescription->length +
 				sizeof(pBssDescription->length));
 
@@ -13987,7 +13987,7 @@
 
 	/* Clean up the memory in case of any failure */
 	if (!QDF_IS_STATUS_SUCCESS(status) && (NULL != csr_join_req))
-		cdf_mem_free(csr_join_req);
+		qdf_mem_free(csr_join_req);
 
 	return status;
 }
@@ -14002,27 +14002,27 @@
 	if (!CSR_IS_SESSION_VALID(pMac, sessionId))
 		return QDF_STATUS_E_FAILURE;
 
-	pMsg = cdf_mem_malloc(sizeof(tSirSmeDisassocReq));
+	pMsg = qdf_mem_malloc(sizeof(tSirSmeDisassocReq));
 	if (NULL == pMsg)
 		return QDF_STATUS_E_NOMEM;
 
-	cdf_mem_set(pMsg, sizeof(tSirSmeDisassocReq), 0);
+	qdf_mem_set(pMsg, sizeof(tSirSmeDisassocReq), 0);
 	pMsg->messageType = eWNI_SME_DISASSOC_REQ;
 	pMsg->length = sizeof(tSirSmeDisassocReq);
 	pMsg->sessionId = sessionId;
 	pMsg->transactionId = 0;
 	if ((pSession->pCurRoamProfile != NULL)
 		&& (CSR_IS_INFRA_AP(pSession->pCurRoamProfile))) {
-		cdf_mem_copy(&pMsg->bssid.bytes,
+		qdf_mem_copy(&pMsg->bssid.bytes,
 			     &pSession->selfMacAddr,
 			     QDF_MAC_ADDR_SIZE);
-		cdf_mem_copy(&pMsg->peer_macaddr.bytes,
+		qdf_mem_copy(&pMsg->peer_macaddr.bytes,
 			     bssId,
 			     QDF_MAC_ADDR_SIZE);
 	} else {
-		cdf_mem_copy(&pMsg->bssid.bytes,
+		qdf_mem_copy(&pMsg->bssid.bytes,
 			     bssId, QDF_MAC_ADDR_SIZE);
-		cdf_mem_copy(&pMsg->peer_macaddr.bytes,
+		qdf_mem_copy(&pMsg->peer_macaddr.bytes,
 			     bssId, QDF_MAC_ADDR_SIZE);
 	}
 	pMsg->reasonCode = reasonCode;
@@ -14050,17 +14050,17 @@
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
 	tSirSmeGetAssocSTAsReq *pMsg;
 
-	pMsg = cdf_mem_malloc(sizeof(*pMsg));
+	pMsg = qdf_mem_malloc(sizeof(*pMsg));
 	if (NULL == pMsg)
 		return QDF_STATUS_E_NOMEM;
 
 	pMsg->messageType = eWNI_SME_GET_ASSOC_STAS_REQ;
 	qdf_copy_macaddr(&pMsg->bssid, &bssid);
 	pMsg->modId = modId;
-	cdf_mem_copy(pMsg->pUsrContext, pUsrContext, sizeof(void *));
-	cdf_mem_copy(pMsg->pSapEventCallback,
+	qdf_mem_copy(pMsg->pUsrContext, pUsrContext, sizeof(void *));
+	qdf_mem_copy(pMsg->pSapEventCallback,
 			pfnSapEventCallback, sizeof(void *));
-	cdf_mem_copy(pMsg->pAssocStasArray, pAssocStasBuf, sizeof(void *));
+	qdf_mem_copy(pMsg->pAssocStasArray, pAssocStasBuf, sizeof(void *));
 	pMsg->length = sizeof(*pMsg);
 	status = cds_send_mb_message_to_mac(pMsg);
 
@@ -14077,17 +14077,17 @@
 	tSirSmeGetWPSPBCSessionsReq *pMsg;
 
 	do {
-		pMsg = cdf_mem_malloc(sizeof(tSirSmeGetWPSPBCSessionsReq));
+		pMsg = qdf_mem_malloc(sizeof(tSirSmeGetWPSPBCSessionsReq));
 		if (NULL == pMsg)
 			status = QDF_STATUS_E_NOMEM;
 		else
 			status = QDF_STATUS_SUCCESS;
 		if (!QDF_IS_STATUS_SUCCESS(status))
 			break;
-		cdf_mem_set(pMsg, sizeof(tSirSmeGetWPSPBCSessionsReq), 0);
+		qdf_mem_set(pMsg, sizeof(tSirSmeGetWPSPBCSessionsReq), 0);
 		pMsg->messageType = eWNI_SME_GET_WPSPBC_SESSION_REQ;
-		cdf_mem_copy(pMsg->pUsrContext, pUsrContext, sizeof(void *));
-		cdf_mem_copy(pMsg->pSapEventCallback, pfnSapEventCallback,
+		qdf_mem_copy(pMsg->pUsrContext, pUsrContext, sizeof(void *));
+		qdf_mem_copy(pMsg->pSapEventCallback, pfnSapEventCallback,
 			     sizeof(void *));
 		qdf_copy_macaddr(&pMsg->bssid, &bssid);
 		qdf_copy_macaddr(&pMsg->remove_mac, &remove_mac);
@@ -14117,13 +14117,13 @@
 
 	/* Create the message and send to lim */
 	len = sizeof(tSirChangeBIParams);
-	pMsg = cdf_mem_malloc(len);
+	pMsg = qdf_mem_malloc(len);
 	if (NULL == pMsg)
 		status = QDF_STATUS_E_NOMEM;
 	else
 		status = QDF_STATUS_SUCCESS;
 	if (QDF_IS_STATUS_SUCCESS(status)) {
-		cdf_mem_set(pMsg, sizeof(tSirChangeBIParams), 0);
+		qdf_mem_set(pMsg, sizeof(tSirChangeBIParams), 0);
 		pMsg->messageType = eWNI_SME_CHNG_MCC_BEACON_INTERVAL;
 		pMsg->length = len;
 
@@ -14159,13 +14159,13 @@
 
 	/* Create the message and send to lim */
 	len = sizeof(tSirSetHT2040Mode);
-	pMsg = cdf_mem_malloc(len);
+	pMsg = qdf_mem_malloc(len);
 	if (NULL == pMsg)
 		status = QDF_STATUS_E_NOMEM;
 	else
 		status = QDF_STATUS_SUCCESS;
 	if (QDF_IS_STATUS_SUCCESS(status)) {
-		cdf_mem_set(pMsg, sizeof(tSirSetHT2040Mode), 0);
+		qdf_mem_set(pMsg, sizeof(tSirSetHT2040Mode), 0);
 		pMsg->messageType = eWNI_SME_SET_HT_2040_MODE;
 		pMsg->length = len;
 
@@ -14193,11 +14193,11 @@
 	if (!CSR_IS_SESSION_VALID(pMac, sessionId))
 		return QDF_STATUS_E_FAILURE;
 
-	pMsg = cdf_mem_malloc(sizeof(tSirSmeDeauthReq));
+	pMsg = qdf_mem_malloc(sizeof(tSirSmeDeauthReq));
 	if (NULL == pMsg)
 		return QDF_STATUS_E_NOMEM;
 
-	cdf_mem_set(pMsg, sizeof(tSirSmeDeauthReq), 0);
+	qdf_mem_set(pMsg, sizeof(tSirSmeDeauthReq), 0);
 	pMsg->messageType = eWNI_SME_DEAUTH_REQ;
 	pMsg->length = sizeof(tSirSmeDeauthReq);
 	pMsg->sessionId = sessionId;
@@ -14205,16 +14205,16 @@
 
 	if ((pSession->pCurRoamProfile != NULL)
 	     && (CSR_IS_INFRA_AP(pSession->pCurRoamProfile))) {
-		cdf_mem_copy(&pMsg->bssid,
+		qdf_mem_copy(&pMsg->bssid,
 			     &pSession->selfMacAddr,
 			     QDF_MAC_ADDR_SIZE);
 	} else {
-		cdf_mem_copy(&pMsg->bssid,
+		qdf_mem_copy(&pMsg->bssid,
 			     bssId, QDF_MAC_ADDR_SIZE);
 	}
 
 	/* Set the peer MAC address before sending the message to LIM */
-	cdf_mem_copy(&pMsg->peer_macaddr.bytes, bssId, QDF_MAC_ADDR_SIZE);
+	qdf_mem_copy(&pMsg->peer_macaddr.bytes, bssId, QDF_MAC_ADDR_SIZE);
 	pMsg->reasonCode = reasonCode;
 
 	return cds_send_mb_message_to_mac(pMsg);
@@ -14226,14 +14226,14 @@
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
 	tSirSmeDisassocCnf *pMsg;
 	do {
-		pMsg = cdf_mem_malloc(sizeof(tSirSmeDisassocCnf));
+		pMsg = qdf_mem_malloc(sizeof(tSirSmeDisassocCnf));
 		if (NULL == pMsg)
 			status = QDF_STATUS_E_NOMEM;
 		else
 			status = QDF_STATUS_SUCCESS;
 		if (!QDF_IS_STATUS_SUCCESS(status))
 			break;
-		cdf_mem_set(pMsg, sizeof(tSirSmeDisassocCnf), 0);
+		qdf_mem_set(pMsg, sizeof(tSirSmeDisassocCnf), 0);
 		pMsg->messageType = eWNI_SME_DISASSOC_CNF;
 		pMsg->statusCode = eSIR_SME_SUCCESS;
 		pMsg->length = sizeof(tSirSmeDisassocCnf);
@@ -14241,14 +14241,14 @@
 				 &pDisassocInd->peer_macaddr);
 		status = QDF_STATUS_SUCCESS;
 		if (!QDF_IS_STATUS_SUCCESS(status)) {
-			cdf_mem_free(pMsg);
+			qdf_mem_free(pMsg);
 			break;
 		}
 
 		qdf_copy_macaddr(&pMsg->bssid, &pDisassocInd->bssid);
 		status = QDF_STATUS_SUCCESS;
 		if (!QDF_IS_STATUS_SUCCESS(status)) {
-			cdf_mem_free(pMsg);
+			qdf_mem_free(pMsg);
 			break;
 		}
 
@@ -14263,28 +14263,28 @@
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
 	tSirSmeDeauthCnf *pMsg;
 	do {
-		pMsg = cdf_mem_malloc(sizeof(tSirSmeDeauthCnf));
+		pMsg = qdf_mem_malloc(sizeof(tSirSmeDeauthCnf));
 		if (NULL == pMsg)
 			status = QDF_STATUS_E_NOMEM;
 		else
 			status = QDF_STATUS_SUCCESS;
 		if (!QDF_IS_STATUS_SUCCESS(status))
 			break;
-		cdf_mem_set(pMsg, sizeof(tSirSmeDeauthCnf), 0);
+		qdf_mem_set(pMsg, sizeof(tSirSmeDeauthCnf), 0);
 		pMsg->messageType = eWNI_SME_DEAUTH_CNF;
 		pMsg->statusCode = eSIR_SME_SUCCESS;
 		pMsg->length = sizeof(tSirSmeDeauthCnf);
 		qdf_copy_macaddr(&pMsg->bssid, &pDeauthInd->bssid);
 		status = QDF_STATUS_SUCCESS;
 		if (!QDF_IS_STATUS_SUCCESS(status)) {
-			cdf_mem_free(pMsg);
+			qdf_mem_free(pMsg);
 			break;
 		}
 		qdf_copy_macaddr(&pMsg->peer_macaddr,
 				 &pDeauthInd->peer_macaddr);
 		status = QDF_STATUS_SUCCESS;
 		if (!QDF_IS_STATUS_SUCCESS(status)) {
-			cdf_mem_free(pMsg);
+			qdf_mem_free(pMsg);
 			break;
 		}
 		status = cds_send_mb_message_to_mac(pMsg);
@@ -14302,10 +14302,10 @@
 		FL("Posting eWNI_SME_ASSOC_CNF to LIM.HalStatus :%d"),
 		Halstatus);
 	do {
-		pMsg = cdf_mem_malloc(sizeof(tSirSmeAssocCnf));
+		pMsg = qdf_mem_malloc(sizeof(tSirSmeAssocCnf));
 		if (NULL == pMsg)
 			return QDF_STATUS_E_NOMEM;
-		cdf_mem_set(pMsg, sizeof(tSirSmeAssocCnf), 0);
+		qdf_mem_set(pMsg, sizeof(tSirSmeAssocCnf), 0);
 		pMsg->messageType = eWNI_SME_ASSOC_CNF;
 		pMsg->length = sizeof(tSirSmeAssocCnf);
 		if (QDF_IS_STATUS_SUCCESS(Halstatus))
@@ -14313,15 +14313,15 @@
 		else
 			pMsg->statusCode = eSIR_SME_ASSOC_REFUSED;
 		/* bssId */
-		cdf_mem_copy(pMsg->bssid.bytes, pAssocInd->bssId,
+		qdf_mem_copy(pMsg->bssid.bytes, pAssocInd->bssId,
 			     QDF_MAC_ADDR_SIZE);
 		/* peerMacAddr */
-		cdf_mem_copy(pMsg->peer_macaddr.bytes, pAssocInd->peerMacAddr,
+		qdf_mem_copy(pMsg->peer_macaddr.bytes, pAssocInd->peerMacAddr,
 			     QDF_MAC_ADDR_SIZE);
 		/* aid */
 		pMsg->aid = pAssocInd->aid;
 		/* alternateBssId */
-		cdf_mem_copy(pMsg->alternate_bssid.bytes, pAssocInd->bssId,
+		qdf_mem_copy(pMsg->alternate_bssid.bytes, pAssocInd->bssId,
 			     QDF_MAC_ADDR_SIZE);
 		/* alternateChannelId */
 		pMsg->alternateChannelId = 11;
@@ -14342,10 +14342,10 @@
 	tSirResultCodes statusCode;
 	uint16_t wTmp;
 	do {
-		pMsg = cdf_mem_malloc(sizeof(tSirSmeAssocIndToUpperLayerCnf));
+		pMsg = qdf_mem_malloc(sizeof(tSirSmeAssocIndToUpperLayerCnf));
 		if (NULL == pMsg)
 			return QDF_STATUS_E_NOMEM;
-		cdf_mem_set(pMsg, sizeof(tSirSmeAssocIndToUpperLayerCnf), 0);
+		qdf_mem_set(pMsg, sizeof(tSirSmeAssocIndToUpperLayerCnf), 0);
 
 		pMsg->messageType = eWNI_SME_UPPER_LAYER_ASSOC_CNF;
 		pMsg->length = sizeof(tSirSmeAssocIndToUpperLayerCnf);
@@ -14357,22 +14357,22 @@
 			statusCode = eSIR_SME_SUCCESS;
 		else
 			statusCode = eSIR_SME_ASSOC_REFUSED;
-		cdf_mem_copy(pBuf, &statusCode, sizeof(tSirResultCodes));
+		qdf_mem_copy(pBuf, &statusCode, sizeof(tSirResultCodes));
 		pBuf += sizeof(tSirResultCodes);
 		/* bssId */
-		cdf_mem_copy((tSirMacAddr *) pBuf, pAssocInd->bssId,
+		qdf_mem_copy((tSirMacAddr *) pBuf, pAssocInd->bssId,
 			     sizeof(tSirMacAddr));
 		pBuf += sizeof(tSirMacAddr);
 		/* peerMacAddr */
-		cdf_mem_copy((tSirMacAddr *) pBuf, pAssocInd->peerMacAddr,
+		qdf_mem_copy((tSirMacAddr *) pBuf, pAssocInd->peerMacAddr,
 			     sizeof(tSirMacAddr));
 		pBuf += sizeof(tSirMacAddr);
 		/* StaId */
 		wTmp = pAssocInd->staId;
-		cdf_mem_copy(pBuf, &wTmp, sizeof(uint16_t));
+		qdf_mem_copy(pBuf, &wTmp, sizeof(uint16_t));
 		pBuf += sizeof(uint16_t);
 		/* alternateBssId */
-		cdf_mem_copy((tSirMacAddr *) pBuf, pAssocInd->bssId,
+		qdf_mem_copy((tSirMacAddr *) pBuf, pAssocInd->bssId,
 			     sizeof(tSirMacAddr));
 		pBuf += sizeof(tSirMacAddr);
 		/* alternateChannelId */
@@ -14383,17 +14383,17 @@
 		*pBuf = pAssocInd->wmmEnabledSta;
 		pBuf += sizeof(uint8_t);
 		/* RSN IE */
-		cdf_mem_copy((tSirRSNie *) pBuf, &pAssocInd->rsnIE,
+		qdf_mem_copy((tSirRSNie *) pBuf, &pAssocInd->rsnIE,
 			     sizeof(tSirRSNie));
 		pBuf += sizeof(tSirRSNie);
 #ifdef FEATURE_WLAN_WAPI
 		/* WAPI IE */
-		cdf_mem_copy((tSirWAPIie *) pBuf, &pAssocInd->wapiIE,
+		qdf_mem_copy((tSirWAPIie *) pBuf, &pAssocInd->wapiIE,
 			     sizeof(tSirWAPIie));
 		pBuf += sizeof(tSirWAPIie);
 #endif
 		/* Additional IE */
-		cdf_mem_copy((void *)pBuf, &pAssocInd->addIE,
+		qdf_mem_copy((void *)pBuf, &pAssocInd->addIE,
 			     sizeof(tSirAddie));
 		pBuf += sizeof(tSirAddie);
 		/* reassocReq */
@@ -14402,7 +14402,7 @@
 		/* timingMeasCap */
 		*pBuf = pAssocInd->timingMeasCap;
 		pBuf += sizeof(uint8_t);
-		cdf_mem_copy((void *)pBuf, &pAssocInd->chan_info,
+		qdf_mem_copy((void *)pBuf, &pAssocInd->chan_info,
 			     sizeof(tSirSmeChanInfo));
 		msgQ.type = eWNI_SME_UPPER_LAYER_ASSOC_CNF;
 		msgQ.bodyptr = pMsg;
@@ -14438,10 +14438,10 @@
 		 */
 		msgLen = sizeof(struct sSirSmeSetContextReq);
 
-		pMsg = cdf_mem_malloc(msgLen);
+		pMsg = qdf_mem_malloc(msgLen);
 		if (NULL == pMsg)
 			return QDF_STATUS_E_NOMEM;
-		cdf_mem_set(pMsg, msgLen, 0);
+		qdf_mem_set(pMsg, msgLen, 0);
 		pMsg->messageType = eWNI_SME_SETCONTEXT_REQ;
 		pMsg->length = msgLen;
 		pMsg->sessionId = (uint8_t) sessionId;
@@ -14467,13 +14467,13 @@
 		pMsg->keyMaterial.key[0].keyId = keyId;
 		pMsg->keyMaterial.key[0].unicast = fUnicast;
 		pMsg->keyMaterial.key[0].keyDirection = aniKeyDirection;
-		cdf_mem_copy(pMsg->keyMaterial.key[0].keyRsc,
+		qdf_mem_copy(pMsg->keyMaterial.key[0].keyRsc,
 				pKeyRsc, CSR_MAX_RSC_LEN);
 		/* 0 is Supplicant */
 		pMsg->keyMaterial.key[0].paeRole = paeRole;
 		pMsg->keyMaterial.key[0].keyLength = keyLength;
 		if (keyLength && pKey) {
-			cdf_mem_copy(pMsg->keyMaterial.key[0].key,
+			qdf_mem_copy(pMsg->keyMaterial.key[0].key,
 					pKey, keyLength);
 			sms_log(pMac, LOG1,
 				FL("SME set keyIndx (%d) encType (%d) key"),
@@ -14502,11 +14502,11 @@
 
 	pSession->joinFailStatusCode.statusCode = eSIR_SME_SUCCESS;
 	pSession->joinFailStatusCode.reasonCode = 0;
-	pMsg = cdf_mem_malloc(sizeof(tSirSmeStartBssReq));
+	pMsg = qdf_mem_malloc(sizeof(tSirSmeStartBssReq));
 	if (NULL == pMsg)
 		return QDF_STATUS_E_NOMEM;
 
-	cdf_mem_set(pMsg, sizeof(tSirSmeStartBssReq), 0);
+	qdf_mem_set(pMsg, sizeof(tSirSmeStartBssReq), 0);
 	pMsg->messageType = eWNI_SME_START_BSS_REQ;
 	pMsg->sessionId = sessionId;
 	pMsg->length = sizeof(tSirSmeStartBssReq);
@@ -14534,7 +14534,7 @@
 	} else {
 		sms_log(pMac, LOGE,
 			FL("****Start BSS failed persona already exists***"));
-		cdf_mem_free(pMsg);
+		qdf_mem_free(pMsg);
 		return QDF_STATUS_E_FAILURE;
 	}
 	pMsg->beaconInterval = wTmp;
@@ -14545,7 +14545,7 @@
 	pMsg->cc_switch_mode = pMac->roam.configParam.cc_switch_mode;
 #endif
 	pMsg->bssType = csr_translate_bsstype_to_mac_type(bssType);
-	cdf_mem_copy(&pMsg->ssId, &pParam->ssId, sizeof(pParam->ssId));
+	qdf_mem_copy(&pMsg->ssId, &pParam->ssId, sizeof(pParam->ssId));
 	pMsg->channelId = pParam->operationChn;
 	/* What should we really do for the cbmode. */
 	pMsg->cbMode = (ePhyChanBondState) pParam->cbMode;
@@ -14577,24 +14577,24 @@
 #endif
 
 	if (pParam->nRSNIELength > sizeof(pMsg->rsnIE.rsnIEdata)) {
-		cdf_mem_free(pMsg);
+		qdf_mem_free(pMsg);
 		return QDF_STATUS_E_INVAL;
 	}
 	pMsg->rsnIE.length = pParam->nRSNIELength;
-	cdf_mem_copy(pMsg->rsnIE.rsnIEdata,
+	qdf_mem_copy(pMsg->rsnIE.rsnIEdata,
 		     pParam->pRSNIE,
 		     pParam->nRSNIELength);
 	pMsg->nwType = (tSirNwType)pParam->sirNwType;
-	cdf_mem_copy(&pMsg->operationalRateSet,
+	qdf_mem_copy(&pMsg->operationalRateSet,
 		     &pParam->operationalRateSet,
 		     sizeof(tSirMacRateSet));
-	cdf_mem_copy(&pMsg->extendedRateSet,
+	qdf_mem_copy(&pMsg->extendedRateSet,
 		     &pParam->extendedRateSet,
 		     sizeof(tSirMacRateSet));
-	cdf_mem_copy(&pMsg->htConfig,
+	qdf_mem_copy(&pMsg->htConfig,
 		     &pSession->htConfig,
 		     sizeof(tSirHTConfig));
-	cdf_mem_copy(&pMsg->addIeParams,
+	qdf_mem_copy(&pMsg->addIeParams,
 		     &pParam->addIeParams,
 		     sizeof(pParam->addIeParams));
 	pMsg->obssEnabled = pMac->roam.configParam.obssEnabled;
@@ -14613,10 +14613,10 @@
 		return QDF_STATUS_E_FAILURE;
 	}
 
-	pMsg = cdf_mem_malloc(sizeof(tSirSmeStopBssReq));
+	pMsg = qdf_mem_malloc(sizeof(tSirSmeStopBssReq));
 	if (NULL == pMsg)
 		return QDF_STATUS_E_NOMEM;
-	cdf_mem_set(pMsg, sizeof(tSirSmeStopBssReq), 0);
+	qdf_mem_set(pMsg, sizeof(tSirSmeStopBssReq), 0);
 	pMsg->messageType = eWNI_SME_STOP_BSS_REQ;
 	pMsg->sessionId = sessionId;
 	pMsg->length = sizeof(tSirSmeStopBssReq);
@@ -14634,7 +14634,7 @@
 	uint32_t roamId = 0;
 	tCsrRoamSession *pSession = CSR_GET_SESSION(pMac, sessionId);
 	if ((csr_is_conn_state_connected(pMac, sessionId)) &&
-	    (fForce || (!cdf_mem_compare(&pModProfileFields,
+	    (fForce || (qdf_mem_cmp(&pModProfileFields,
 				     &pSession->connectedProfile.
 				     modifyProfileFields,
 				     sizeof(tCsrRoamModifyProfileFields))))) {
@@ -14657,7 +14657,7 @@
 {
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
 	tCsrRoamInfo roamInfo;
-	cdf_mem_set(&roamInfo, sizeof(tCsrRoamInfo), 0);
+	qdf_mem_set(&roamInfo, sizeof(tCsrRoamInfo), 0);
 	status = csr_roam_call_callback(pMac, sessionId, &roamInfo, 0,
 					eCSR_ROAM_SESSION_OPENED,
 					eCSR_ROAM_RESULT_NONE);
@@ -14696,13 +14696,13 @@
 		(WMI_VDEV_TYPE_AP == rsp->type &&
 		 WMI_UNIFIED_VDEV_SUBTYPE_P2P_DEVICE == rsp->sub_type))) {
 		sms_log(pMac, LOG1, FL("send SET IE msg to PE"));
-		msg = cdf_mem_malloc(sizeof(*msg));
+		msg = qdf_mem_malloc(sizeof(*msg));
 		if (NULL == msg) {
 			sms_log(pMac, LOGE, FL("Memory allocation failed"));
 			return QDF_STATUS_E_NOMEM;
 		}
 
-		cdf_mem_set(msg, sizeof(*msg), 0);
+		qdf_mem_set(msg, sizeof(*msg), 0);
 		msg->msg_type = eWNI_SME_SET_IE_REQ;
 		msg->session_id = rsp->session_id;
 		msg->length = sizeof(*msg);
@@ -14735,7 +14735,7 @@
 	} else {
 		pCommand->command = eSmeCommandAddStaSession;
 		pCommand->sessionId = (uint8_t) sessionId;
-		cdf_mem_copy(pCommand->u.addStaSessionCmd.selfMacAddr,
+		qdf_mem_copy(pCommand->u.addStaSessionCmd.selfMacAddr,
 			     sessionMacAddr, sizeof(tSirMacAddr));
 		pCommand->u.addStaSessionCmd.currDeviceMode =
 			pMac->sme.currDeviceMode;
@@ -14761,7 +14761,7 @@
 	QDF_STATUS status = QDF_STATUS_E_NOMEM;
 	tSirMsgQ msg;
 
-	add_sta_self_req = cdf_mem_malloc(sizeof(struct add_sta_self_params));
+	add_sta_self_req = qdf_mem_malloc(sizeof(struct add_sta_self_params));
 	if (NULL == add_sta_self_req) {
 		lim_log(pMac, LOGP,
 			FL
@@ -14769,7 +14769,7 @@
 		return status;
 	}
 
-	cdf_mem_copy(add_sta_self_req->self_mac_addr, pAddStaReq->selfMacAddr,
+	qdf_mem_copy(add_sta_self_req->self_mac_addr, pAddStaReq->selfMacAddr,
 			sizeof(tSirMacAddr));
 	add_sta_self_req->curr_device_mode = pAddStaReq->currDeviceMode;
 	add_sta_self_req->session_id = sessionId;
@@ -14790,7 +14790,7 @@
 
 	if (status != QDF_STATUS_SUCCESS) {
 		lim_log(pMac, LOGP, FL("wma_post_ctrl_msg failed"));
-		cdf_mem_free(add_sta_self_req);
+		qdf_mem_free(add_sta_self_req);
 		add_sta_self_req = NULL;
 	}
 	return status;
@@ -14830,7 +14830,7 @@
 
 			pSession->callback = callback;
 			pSession->pContext = pContext;
-			cdf_mem_copy(&pSession->selfMacAddr, pSelfMacAddr,
+			qdf_mem_copy(&pSession->selfMacAddr, pSelfMacAddr,
 				     sizeof(struct qdf_mac_addr));
 			*pbSessionId = (uint8_t) i;
 			status =
@@ -14958,7 +14958,7 @@
 		pCommand->sessionId = (uint8_t) sessionId;
 		pCommand->u.delStaSessionCmd.callback = callback;
 		pCommand->u.delStaSessionCmd.pContext = pContext;
-		cdf_mem_copy(pCommand->u.delStaSessionCmd.selfMacAddr,
+		qdf_mem_copy(pCommand->u.delStaSessionCmd.selfMacAddr,
 			     sessionMacAddr, sizeof(tSirMacAddr));
 		status = csr_queue_sme_command(pMac, pCommand, true);
 		if (!QDF_IS_STATUS_SUCCESS(status)) {
@@ -14976,14 +14976,14 @@
 	struct del_sta_self_params *del_sta_self_req;
 	tSirMsgQ msg;
 	QDF_STATUS status = QDF_STATUS_E_FAILURE;
-	del_sta_self_req = cdf_mem_malloc(sizeof(struct del_sta_self_params));
+	del_sta_self_req = qdf_mem_malloc(sizeof(struct del_sta_self_params));
 	if (NULL == del_sta_self_req) {
 		lim_log(pMac, LOGP,
 			FL(" mem alloc failed for tDelStaSelfParams"));
 		return QDF_STATUS_E_NOMEM;
 	}
 
-	cdf_mem_copy(del_sta_self_req->self_mac_addr,
+	qdf_mem_copy(del_sta_self_req->self_mac_addr,
 		pCommand->u.delStaSessionCmd.selfMacAddr,
 		sizeof(tSirMacAddr));
 
@@ -14999,7 +14999,7 @@
 	status = wma_post_ctrl_msg(pMac, &msg);
 	if (status != QDF_STATUS_SUCCESS) {
 		sms_log(pMac, LOGP, FL("wma_post_ctrl_msg failed"));
-		cdf_mem_free(del_sta_self_req);
+		qdf_mem_free(del_sta_self_req);
 	}
 	return status;
 }
@@ -15011,7 +15011,7 @@
 	tSmeCmd *pCommand;
 	tDblLinkList localList;
 
-	cdf_mem_zero(&localList, sizeof(tDblLinkList));
+	qdf_mem_zero(&localList, sizeof(tDblLinkList));
 	if (!QDF_IS_STATUS_SUCCESS(csr_ll_open(pMac->hHdd, &localList))) {
 		sms_log(pMac, LOGE, FL(" failed to open list"));
 		return;
@@ -15112,36 +15112,36 @@
 	csr_roam_free_connected_info(pMac, &pSession->connectedInfo);
 	csr_free_connect_bss_desc(pMac, sessionId);
 	csr_scan_enable(pMac);
-	cdf_mem_set(&pSession->selfMacAddr, sizeof(struct qdf_mac_addr), 0);
+	qdf_mem_set(&pSession->selfMacAddr, sizeof(struct qdf_mac_addr), 0);
 	if (pSession->pWpaRsnReqIE) {
-		cdf_mem_free(pSession->pWpaRsnReqIE);
+		qdf_mem_free(pSession->pWpaRsnReqIE);
 		pSession->pWpaRsnReqIE = NULL;
 	}
 	pSession->nWpaRsnReqIeLength = 0;
 	if (pSession->pWpaRsnRspIE) {
-		cdf_mem_free(pSession->pWpaRsnRspIE);
+		qdf_mem_free(pSession->pWpaRsnRspIE);
 		pSession->pWpaRsnRspIE = NULL;
 	}
 	pSession->nWpaRsnRspIeLength = 0;
 #ifdef FEATURE_WLAN_WAPI
 	if (pSession->pWapiReqIE) {
-		cdf_mem_free(pSession->pWapiReqIE);
+		qdf_mem_free(pSession->pWapiReqIE);
 		pSession->pWapiReqIE = NULL;
 	}
 	pSession->nWapiReqIeLength = 0;
 	if (pSession->pWapiRspIE) {
-		cdf_mem_free(pSession->pWapiRspIE);
+		qdf_mem_free(pSession->pWapiRspIE);
 		pSession->pWapiRspIE = NULL;
 	}
 	pSession->nWapiRspIeLength = 0;
 #endif /* FEATURE_WLAN_WAPI */
 	if (pSession->pAddIEScan) {
-		cdf_mem_free(pSession->pAddIEScan);
+		qdf_mem_free(pSession->pAddIEScan);
 		pSession->pAddIEScan = NULL;
 	}
 	pSession->nAddIEScanLength = 0;
 	if (pSession->pAddIEAssoc) {
-		cdf_mem_free(pSession->pAddIEAssoc);
+		qdf_mem_free(pSession->pAddIEAssoc);
 		pSession->pAddIEAssoc = NULL;
 	}
 	pSession->nAddIEAssocLength = 0;
@@ -15310,7 +15310,7 @@
 					("csr_roam_pe_stats_timer_handler:failed to destroy hPeStatsTimer timer"));
 		}
 		/* Free the entry */
-		cdf_mem_free(pPeStatsReqListEntry);
+		qdf_mem_free(pPeStatsReqListEntry);
 		pPeStatsReqListEntry = NULL;
 	} else {
 		if (!pPeStatsReqListEntry->rspPending) {
@@ -15376,7 +15376,7 @@
 {
 	tAniGetPEStatsReq *pMsg;
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
-	pMsg = cdf_mem_malloc(sizeof(tAniGetPEStatsReq));
+	pMsg = qdf_mem_malloc(sizeof(tAniGetPEStatsReq));
 	if (NULL == pMsg) {
 		sms_log(pMac, LOGE, FL("Failed to allocate mem for stats req "));
 		return QDF_STATUS_E_NOMEM;
@@ -15415,28 +15415,28 @@
 	switch (stats_type) {
 	case eCsrSummaryStats:
 		sms_log(mac, LOG2, FL("summary stats"));
-		cdf_mem_copy((uint8_t *) &mac->roam.summaryStatsInfo, *stats,
+		qdf_mem_copy((uint8_t *) &mac->roam.summaryStatsInfo, *stats,
 			     sizeof(tCsrSummaryStatsInfo));
 		*stats += sizeof(tCsrSummaryStatsInfo);
 		*length -= sizeof(tCsrSummaryStatsInfo);
 		break;
 	case eCsrGlobalClassAStats:
 		sms_log(mac, LOG2, FL("ClassA stats"));
-		cdf_mem_copy((uint8_t *) &mac->roam.classAStatsInfo, *stats,
+		qdf_mem_copy((uint8_t *) &mac->roam.classAStatsInfo, *stats,
 			     sizeof(tCsrGlobalClassAStatsInfo));
 		*stats += sizeof(tCsrGlobalClassAStatsInfo);
 		*length -= sizeof(tCsrGlobalClassAStatsInfo);
 		break;
 	case eCsrGlobalClassBStats:
 		sms_log(mac, LOG2, FL("ClassB stats"));
-		cdf_mem_copy((uint8_t *) &mac->roam.classBStatsInfo, *stats,
+		qdf_mem_copy((uint8_t *) &mac->roam.classBStatsInfo, *stats,
 			     sizeof(tCsrGlobalClassBStatsInfo));
 		*stats += sizeof(tCsrGlobalClassBStatsInfo);
 		*length -= sizeof(tCsrGlobalClassBStatsInfo);
 		break;
 	case eCsrGlobalClassCStats:
 		sms_log(mac, LOG2, FL("ClassC stats"));
-		cdf_mem_copy((uint8_t *) &mac->roam.classCStatsInfo, *stats,
+		qdf_mem_copy((uint8_t *) &mac->roam.classCStatsInfo, *stats,
 			     sizeof(tCsrGlobalClassCStatsInfo));
 		*stats += sizeof(tCsrGlobalClassCStatsInfo);
 		*length -= sizeof(tCsrGlobalClassCStatsInfo);
@@ -15444,7 +15444,7 @@
 	case eCsrPerStaStats:
 		sms_log(mac, LOG2, FL("PerSta stats"));
 		if (CSR_MAX_STA > sme_stats_rsp->staId) {
-			cdf_mem_copy(
+			qdf_mem_copy(
 				&mac->roam.perStaStatsInfo[sme_stats_rsp->staId],
 				*stats, sizeof(tCsrPerStaStatsInfo));
 		} else {
@@ -15704,7 +15704,7 @@
 	/* callback update it */
 	if (NULL == csr_roam_checkn_update_client_req_list(pMac, pStaEntry, true)) {
 
-		pNewStaEntry = cdf_mem_malloc(sizeof(tCsrStatsClientReqInfo));
+		pNewStaEntry = qdf_mem_malloc(sizeof(tCsrStatsClientReqInfo));
 		if (NULL == pNewStaEntry) {
 			sms_log(pMac, LOGW,
 				"csr_roam_insert_entry_into_list: couldn't allocate memory for the "
@@ -15734,7 +15734,7 @@
 								 pStaEntry)
 {
 	tCsrPeStatsReqInfo *pNewStaEntry = NULL;
-	pNewStaEntry = cdf_mem_malloc(sizeof(tCsrPeStatsReqInfo));
+	pNewStaEntry = qdf_mem_malloc(sizeof(tCsrPeStatsReqInfo));
 	if (NULL == pNewStaEntry) {
 		sms_log(pMac, LOGW,
 			"csr_roam_insert_entry_into_pe_stats_req_list: couldn't allocate memory for the "
@@ -15775,7 +15775,7 @@
 		return QDF_STATUS_E_FAILURE;
 	}
 
-	pMsg = cdf_mem_malloc(sizeof(tAniGetRssiReq));
+	pMsg = qdf_mem_malloc(sizeof(tAniGetRssiReq));
 	if (NULL == pMsg) {
 		sms_log(pMac, LOGE,
 			" csr_get_rssi: failed to allocate mem for req ");
@@ -15799,7 +15799,7 @@
 	msg.reserved = 0;
 	if (QDF_STATUS_SUCCESS != cds_mq_post_message(CDS_MQ_ID_SME, &msg)) {
 		sms_log(pMac, LOGE, " csr_get_rssi failed to post msg to self ");
-		cdf_mem_free((void *)pMsg);
+		qdf_mem_free((void *)pMsg);
 		status = QDF_STATUS_E_FAILURE;
 	}
 	sms_log(pMac, LOG2, FL("returned"));
@@ -15818,7 +15818,7 @@
 
 	sms_log(pMac, LOG2, FL("called"));
 
-	pMsg = (tAniGetSnrReq *) cdf_mem_malloc(sizeof(tAniGetSnrReq));
+	pMsg = (tAniGetSnrReq *) qdf_mem_malloc(sizeof(tAniGetSnrReq));
 	if (NULL == pMsg) {
 		sms_log(pMac, LOGE, "%s: failed to allocate mem for req",
 			__func__);
@@ -15839,7 +15839,7 @@
 
 	if (QDF_STATUS_SUCCESS != cds_mq_post_message(CDS_MQ_ID_SME, &msg)) {
 		sms_log(pMac, LOGE, "%s failed to post msg to self", __func__);
-		cdf_mem_free((void *)pMsg);
+		qdf_mem_free((void *)pMsg);
 		status = QDF_STATUS_E_FAILURE;
 	}
 
@@ -15856,7 +15856,7 @@
 {
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
 	tAniGetTsmStatsReq *pMsg = NULL;
-	pMsg = cdf_mem_malloc(sizeof(tAniGetTsmStatsReq));
+	pMsg = qdf_mem_malloc(sizeof(tAniGetTsmStatsReq));
 	if (!pMsg) {
 		sms_log(pMac, LOGE,
 			"csr_get_tsm_stats: failed to allocate mem for req");
@@ -16173,13 +16173,13 @@
 	pMacHdr->fc.subType = subType;
 
 	/* Prepare Address 1 */
-	cdf_mem_copy((uint8_t *) pMacHdr->da, (uint8_t *) peerAddr,
+	qdf_mem_copy((uint8_t *) pMacHdr->da, (uint8_t *) peerAddr,
 		     sizeof(tSirMacAddr));
 
 	sir_copy_mac_addr(pMacHdr->sa, selfMacAddr);
 
 	/* Prepare Address 3 */
-	cdf_mem_copy((uint8_t *) pMacHdr->bssId, (uint8_t *) peerAddr,
+	qdf_mem_copy((uint8_t *) pMacHdr->bssId, (uint8_t *) peerAddr,
 		     sizeof(tSirMacAddr));
 	return statusCode;
 } /*** csr_roam_scan_offload_populate_mac_header() ***/
@@ -16200,7 +16200,7 @@
 	tSirMacAddr bssId = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };
 	/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 
-	cdf_mem_set((uint8_t *) &pr, sizeof(pr), 0);
+	qdf_mem_set((uint8_t *) &pr, sizeof(pr), 0);
 
 	populate_dot11f_supp_rates(pMac, nChannelNum, &pr.SuppRates, NULL);
 
@@ -16236,7 +16236,7 @@
 	nBytes = nPayload + sizeof(tSirMacMgmtHdr);
 
 	/* Prepare outgoing frame */
-	cdf_mem_set(pFrame, nBytes, 0);
+	qdf_mem_set(pFrame, nBytes, 0);
 
 	nSirStatus =
 		csr_roam_scan_offload_populate_mac_header(pMac, pFrame,
@@ -16297,13 +16297,13 @@
 				     tSirRoamOffloadScanReq *req_buf,
 				     tCsrRoamSession *session)
 {
-	cdf_mem_copy(req_buf->PSK_PMK, session->psk_pmk,
+	qdf_mem_copy(req_buf->PSK_PMK, session->psk_pmk,
 		     sizeof(req_buf->PSK_PMK));
 	req_buf->pmk_len = session->pmk_len;
 	QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG,
 		  "LFR3: PMK Length = %d", req_buf->pmk_len);
 	req_buf->R0KH_ID_Length = session->ftSmeContext.r0kh_id_len;
-	cdf_mem_copy(req_buf->R0KH_ID,
+	qdf_mem_copy(req_buf->R0KH_ID,
 		     session->ftSmeContext.r0kh_id,
 		     req_buf->R0KH_ID_Length);
 	req_buf->Prefer5GHz = mac_ctx->roam.configParam.nRoamPrefer5GHz;
@@ -16319,9 +16319,9 @@
 	}
 #ifdef FEATURE_WLAN_ESE
 	if (csr_is_auth_type_ese(req_buf->ConnectedNetwork.authentication)) {
-		cdf_mem_copy(req_buf->KRK, session->eseCckmInfo.krk,
+		qdf_mem_copy(req_buf->KRK, session->eseCckmInfo.krk,
 			     SIR_KRK_KEY_LEN);
-		cdf_mem_copy(req_buf->BTK, session->eseCckmInfo.btk,
+		qdf_mem_copy(req_buf->BTK, session->eseCckmInfo.btk,
 			     SIR_BTK_KEY_LEN);
 	}
 #endif
@@ -16590,13 +16590,13 @@
 		|| (roam_info->isESEAssoc == false);
 #endif /* FEATURE_WLAN_ESE */
 
-	req_buf = cdf_mem_malloc(sizeof(tSirRoamOffloadScanReq));
+	req_buf = qdf_mem_malloc(sizeof(tSirRoamOffloadScanReq));
 	if (NULL == req_buf) {
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 			  FL("Mem alloc for roam scan offload req failed."));
 		return NULL;
 	}
-	cdf_mem_zero(req_buf, sizeof(tSirRoamOffloadScanReq));
+	qdf_mem_zero(req_buf, sizeof(tSirRoamOffloadScanReq));
 	req_buf->Command = command;
 	/*
 	 * If command is STOP, then pass down ScanOffloadEnabled as Zero. This
@@ -16618,12 +16618,12 @@
 		req_buf->RoamScanOffloadEnabled =
 			mac_ctx->roam.configParam.isRoamOffloadScanEnabled;
 	}
-	cdf_mem_copy(req_buf->ConnectedNetwork.currAPbssid,
+	qdf_mem_copy(req_buf->ConnectedNetwork.currAPbssid,
 		     roam_info->currAPbssid.bytes, sizeof(struct qdf_mac_addr));
 	req_buf->ConnectedNetwork.ssId.length =
 		mac_ctx->roam.roamSession[session_id].
 		connectedProfile.SSID.length;
-	cdf_mem_copy(req_buf->ConnectedNetwork.ssId.ssId,
+	qdf_mem_copy(req_buf->ConnectedNetwork.ssId.ssId,
 		mac_ctx->roam.roamSession[session_id].
 		connectedProfile.SSID.ssId,
 		req_buf->ConnectedNetwork.ssId.length);
@@ -16684,7 +16684,7 @@
 			status = csr_fetch_ch_lst_from_ini(mac_ctx, roam_info,
 							   req_buf);
 			if (!QDF_IS_STATUS_SUCCESS(status)) {
-				cdf_mem_free(req_buf);
+				qdf_mem_free(req_buf);
 				return NULL;
 			}
 		} else {
@@ -16720,7 +16720,7 @@
 	/* Maintain the Valid Channels List */
 	status = csr_fetch_valid_ch_lst(mac_ctx, req_buf);
 	if (!QDF_IS_STATUS_SUCCESS(status)) {
-		cdf_mem_free(req_buf);
+		qdf_mem_free(req_buf);
 		return NULL;
 	}
 
@@ -16784,7 +16784,7 @@
 	/* Roam Offload piggybacks upon the Roam Scan offload command. */
 	if (req_buf->RoamOffloadEnabled)
 		csr_update_roam_scan_offload_request(mac_ctx, req_buf, session);
-	cdf_mem_copy(&req_buf->roam_params,
+	qdf_mem_copy(&req_buf->roam_params,
 		&mac_ctx->roam.configParam.roam_params,
 		sizeof(req_buf->roam_params));
 #endif
@@ -16809,9 +16809,9 @@
 	for (i = 0; i < roam_params->num_ssid_allowed_list; i++) {
 		if ((roam_params->ssid_allowed_list[i].length ==
 			req_buffer->ConnectedNetwork.ssId.length) &&
-			cdf_mem_compare(roam_params->ssid_allowed_list[i].ssId,
+			(!qdf_mem_cmp(roam_params->ssid_allowed_list[i].ssId,
 				req_buffer->ConnectedNetwork.ssId.ssId,
-				roam_params->ssid_allowed_list[i].length)) {
+				roam_params->ssid_allowed_list[i].length))) {
 			QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG,
 				"Whitelist contains connected profile SSID");
 			match = true;
@@ -16829,7 +16829,7 @@
 				"Adding Connected profile SSID to whitelist");
 		/* i is the next available index to add the entry.*/
 		i = roam_params->num_ssid_allowed_list;
-		cdf_mem_copy(roam_params->ssid_allowed_list[i].ssId,
+		qdf_mem_copy(roam_params->ssid_allowed_list[i].ssId,
 				req_buffer->ConnectedNetwork.ssId.ssId,
 				req_buffer->ConnectedNetwork.ssId.length);
 		roam_params->ssid_allowed_list[i].length =
@@ -17008,7 +17008,7 @@
 		req_buf->LookupThreshold =
 			(int8_t)roam_info->cfgParams.neighborLookupThreshold *
 			(-1);
-	cdf_mem_copy(roam_params_dst, roam_params_src,
+	qdf_mem_copy(roam_params_dst, roam_params_src,
 		sizeof(struct roam_ext_params));
 	/*
 	 * rssi_diff which is updated via framework is equivalent to the
@@ -17090,7 +17090,7 @@
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 			  "%s: Not able to post message to WMA",
 			  __func__);
-		cdf_mem_free(req_buf);
+		qdf_mem_free(req_buf);
 		return QDF_STATUS_E_FAILURE;
 	} else {
 		if (ROAM_SCAN_OFFLOAD_START == command)
@@ -17155,7 +17155,7 @@
 		pTempStaEntry->numClient++;
 		found = true;
 	} else {
-		cdf_mem_set(&staEntry, sizeof(tCsrPeStatsReqInfo), 0);
+		qdf_mem_set(&staEntry, sizeof(tCsrPeStatsReqInfo), 0);
 		staEntry.numClient = 1;
 		staEntry.periodicity = periodicity;
 		staEntry.pMac = pMac;
@@ -17238,7 +17238,7 @@
 	if (pEntry) {
 		if (csr_ll_remove_entry
 			    (&pMac->roam.statsClientReqList, pEntry, LL_ACCESS_LOCK)) {
-			cdf_mem_free(GET_BASE_ADDR
+			qdf_mem_free(GET_BASE_ADDR
 					     (pEntry, tCsrStatsClientReqInfo, link));
 		}
 	}
@@ -17300,7 +17300,7 @@
 			 * successfully
 			 */
 			if (!pTempStaEntry->timerStopFailed) {
-				cdf_mem_free(pTempStaEntry);
+				qdf_mem_free(pTempStaEntry);
 				pTempStaEntry = NULL;
 			}
 			break;
@@ -17335,7 +17335,7 @@
 			switch (counter) {
 			case eCsrSummaryStats:
 				sms_log(pMac, LOG2, FL("Summary stats"));
-				cdf_mem_copy(pStats,
+				qdf_mem_copy(pStats,
 					     (uint8_t *) &pMac->roam.
 					     summaryStatsInfo,
 					     sizeof(tCsrSummaryStatsInfo));
@@ -17343,7 +17343,7 @@
 				break;
 			case eCsrGlobalClassAStats:
 				sms_log(pMac, LOG2, FL("ClassA stats"));
-				cdf_mem_copy(pStats,
+				qdf_mem_copy(pStats,
 					     (uint8_t *) &pMac->roam.
 					     classAStatsInfo,
 					     sizeof(tCsrGlobalClassAStatsInfo));
@@ -17351,7 +17351,7 @@
 				break;
 			case eCsrGlobalClassBStats:
 				sms_log(pMac, LOG2, FL("ClassB stats"));
-				cdf_mem_copy(pStats,
+				qdf_mem_copy(pStats,
 					     (uint8_t *) &pMac->roam.
 					     classBStatsInfo,
 					     sizeof(tCsrGlobalClassBStatsInfo));
@@ -17359,7 +17359,7 @@
 				break;
 			case eCsrGlobalClassCStats:
 				sms_log(pMac, LOG2, FL("ClassC stats"));
-				cdf_mem_copy(pStats,
+				qdf_mem_copy(pStats,
 					     (uint8_t *) &pMac->roam.
 					     classCStatsInfo,
 					     sizeof(tCsrGlobalClassCStatsInfo));
@@ -17367,7 +17367,7 @@
 				break;
 			case eCsrGlobalClassDStats:
 				sms_log(pMac, LOG2, FL("ClassD stats"));
-				cdf_mem_copy(pStats,
+				qdf_mem_copy(pStats,
 					     (uint8_t *) &pMac->roam.
 					     classDStatsInfo,
 					     sizeof(tCsrGlobalClassDStatsInfo));
@@ -17375,7 +17375,7 @@
 				break;
 			case eCsrPerStaStats:
 				sms_log(pMac, LOG2, FL("PerSta stats"));
-				cdf_mem_copy(pStats,
+				qdf_mem_copy(pStats,
 					     (uint8_t *) &pMac->roam.
 					     perStaStatsInfo[staId],
 					     sizeof(tCsrPerStaStatsInfo));
@@ -17571,7 +17571,7 @@
 		return QDF_STATUS_E_FAILURE;
 	}
 
-	pMsg = cdf_mem_malloc(sizeof(*pMsg));
+	pMsg = qdf_mem_malloc(sizeof(*pMsg));
 	if (NULL == pMsg)
 		return QDF_STATUS_E_NOMEM;
 
@@ -17579,7 +17579,7 @@
 	pMsg->transactionId = 0;
 	qdf_copy_macaddr(&pMsg->bssid, &pSession->selfMacAddr);
 	pMsg->sessionId = sessionId;
-	cdf_mem_copy(&pMsg->APWPSIEs, pAPWPSIES, sizeof(tSirAPWPSIEs));
+	qdf_mem_copy(&pMsg->APWPSIEs, pAPWPSIES, sizeof(tSirAPWPSIEs));
 	pMsg->length = sizeof(*pMsg);
 	status = cds_send_mb_message_to_mac(pMsg);
 
@@ -17599,15 +17599,15 @@
 		return QDF_STATUS_E_FAILURE;
 	}
 	do {
-		pMsg = cdf_mem_malloc(sizeof(tSirUpdateAPWPARSNIEsReq));
+		pMsg = qdf_mem_malloc(sizeof(tSirUpdateAPWPARSNIEsReq));
 		if (NULL == pMsg)
 			return QDF_STATUS_E_NOMEM;
-		cdf_mem_set(pMsg, sizeof(tSirUpdateAPWPARSNIEsReq), 0);
+		qdf_mem_set(pMsg, sizeof(tSirUpdateAPWPARSNIEsReq), 0);
 		pMsg->messageType = eWNI_SME_SET_APWPARSNIEs_REQ;
 		pMsg->transactionId = 0;
 		qdf_copy_macaddr(&pMsg->bssid, &pSession->selfMacAddr);
 		pMsg->sessionId = sessionId;
-		cdf_mem_copy(&pMsg->APWPARSNIEs, pAPSirRSNie,
+		qdf_mem_copy(&pMsg->APWPARSNIEs, pAPSirRSNie,
 			     sizeof(tSirRSNie));
 		pMsg->length = sizeof(struct sSirUpdateAPWPARSNIEsReq);
 		status = cds_send_mb_message_to_mac(pMsg);
@@ -17632,7 +17632,7 @@
 	}
 
 	auth_req_len = sizeof(tSirFTPreAuthReq);
-	pftPreAuthReq = (tpSirFTPreAuthReq) cdf_mem_malloc(auth_req_len);
+	pftPreAuthReq = (tpSirFTPreAuthReq) qdf_mem_malloc(auth_req_len);
 	if (NULL == pftPreAuthReq) {
 		sms_log(pMac, LOGE,
 			FL("Memory allocation for FT Preauth request failed"));
@@ -17640,10 +17640,10 @@
 	}
 	/* Save the SME Session ID here. We need it while processing the preauth response */
 	pSession->ftSmeContext.smeSessionId = sessionId;
-	cdf_mem_zero(pftPreAuthReq, auth_req_len);
+	qdf_mem_zero(pftPreAuthReq, auth_req_len);
 
 	pftPreAuthReq->pbssDescription =
-		(tpSirBssDescription) cdf_mem_malloc(sizeof(pBssDescription->length)
+		(tpSirBssDescription) qdf_mem_malloc(sizeof(pBssDescription->length)
 						     + pBssDescription->length);
 	if (NULL == pftPreAuthReq->pbssDescription) {
 		sms_log(pMac, LOGE,
@@ -17655,12 +17655,12 @@
 
 	pftPreAuthReq->preAuthchannelNum = pBssDescription->channelId;
 
-	cdf_mem_copy((void *)&pftPreAuthReq->currbssId,
+	qdf_mem_copy((void *)&pftPreAuthReq->currbssId,
 		     (void *)pSession->connectedProfile.bssid.bytes,
 		     sizeof(tSirMacAddr));
-	cdf_mem_copy((void *)&pftPreAuthReq->preAuthbssId,
+	qdf_mem_copy((void *)&pftPreAuthReq->preAuthbssId,
 		     (void *)pBssDescription->bssId, sizeof(tSirMacAddr));
-	cdf_mem_copy((void *)&pftPreAuthReq->self_mac_addr,
+	qdf_mem_copy((void *)&pftPreAuthReq->self_mac_addr,
 		     (void *)&pSession->selfMacAddr.bytes, sizeof(tSirMacAddr));
 
 	if (csr_roam_is11r_assoc(pMac, sessionId) &&
@@ -17668,13 +17668,13 @@
 	     eCSR_AUTH_TYPE_OPEN_SYSTEM)) {
 		pftPreAuthReq->ft_ies_length =
 			(uint16_t) pSession->ftSmeContext.auth_ft_ies_length;
-		cdf_mem_copy(pftPreAuthReq->ft_ies,
+		qdf_mem_copy(pftPreAuthReq->ft_ies,
 			     pSession->ftSmeContext.auth_ft_ies,
 			     pSession->ftSmeContext.auth_ft_ies_length);
 	} else {
 		pftPreAuthReq->ft_ies_length = 0;
 	}
-	cdf_mem_copy(pftPreAuthReq->pbssDescription, pBssDescription,
+	qdf_mem_copy(pftPreAuthReq->pbssDescription, pBssDescription,
 		     sizeof(pBssDescription->length) + pBssDescription->length);
 	pftPreAuthReq->length = auth_req_len;
 	return cds_send_mb_message_to_mac(pftPreAuthReq);
@@ -17744,7 +17744,7 @@
 		return;
 	}
 	/* Save the received response */
-	cdf_mem_copy((void *)&pSession->ftSmeContext.preAuthbssId,
+	qdf_mem_copy((void *)&pSession->ftSmeContext.preAuthbssId,
 		     (void *)pFTPreAuthRsp->preAuthbssId, sizeof(struct qdf_mac_addr));
 	if (csr_roam_is11r_assoc(pMac, pFTPreAuthRsp->smeSessionId))
 		csr_roam_call_callback(pMac, pFTPreAuthRsp->smeSessionId, NULL, 0,
@@ -17757,7 +17757,7 @@
 		csr_roam_read_tsf(pMac, (uint8_t *) roamInfo.timestamp,
 				  pFTPreAuthRsp->smeSessionId);
 		/* Save the bssid from the received response */
-		cdf_mem_copy((void *)&roamInfo.bssid,
+		qdf_mem_copy((void *)&roamInfo.bssid,
 			     (void *)pFTPreAuthRsp->preAuthbssId,
 			     sizeof(struct qdf_mac_addr));
 		csr_roam_call_callback(pMac, pFTPreAuthRsp->smeSessionId,
@@ -17770,7 +17770,7 @@
 	/* So he can send us a PMK-ID for this candidate AP. */
 	if (csr_roam_is_fast_roam_enabled(pMac, pFTPreAuthRsp->smeSessionId)) {
 		/* Save the bssid from the received response */
-		cdf_mem_copy((void *)&roamInfo.bssid,
+		qdf_mem_copy((void *)&roamInfo.bssid,
 			     (void *)pFTPreAuthRsp->preAuthbssId,
 			     sizeof(struct qdf_mac_addr));
 		csr_roam_call_callback(pMac, pFTPreAuthRsp->smeSessionId,
@@ -17794,7 +17794,7 @@
 
 		if ((pSession->ftSmeContext.reassoc_ft_ies) &&
 		    (pSession->ftSmeContext.reassoc_ft_ies_length)) {
-			cdf_mem_free(pSession->ftSmeContext.reassoc_ft_ies);
+			qdf_mem_free(pSession->ftSmeContext.reassoc_ft_ies);
 			pSession->ftSmeContext.reassoc_ft_ies_length = 0;
 			pSession->ftSmeContext.reassoc_ft_ies = NULL;
 		}
@@ -17803,14 +17803,14 @@
 			return;
 
 		pSession->ftSmeContext.reassoc_ft_ies =
-			cdf_mem_malloc(ft_ies_length);
+			qdf_mem_malloc(ft_ies_length);
 		if (NULL == pSession->ftSmeContext.reassoc_ft_ies) {
 			sms_log(pMac, LOGE,
 				FL("Memory allocation failed for ft_ies"));
 			return;
 		} else {
 			/* Copy the RIC IEs to reassoc IEs */
-			cdf_mem_copy(((uint8_t *) pSession->ftSmeContext.
+			qdf_mem_copy(((uint8_t *) pSession->ftSmeContext.
 				      reassoc_ft_ies),
 				     (uint8_t *) pFTPreAuthRsp->ric_ies,
 				     pFTPreAuthRsp->ric_ies_length);
@@ -17842,7 +17842,7 @@
 		pBuf += 2;
 		qdf_get_u32(pBuf, (uint32_t *) &pRsp->statusCode);
 		pBuf += 4;
-		cdf_mem_copy(pRsp->peer_macaddr.bytes, pBuf, QDF_MAC_ADDR_SIZE);
+		qdf_mem_copy(pRsp->peer_macaddr.bytes, pBuf, QDF_MAC_ADDR_SIZE);
 	}
 }
 
@@ -17889,7 +17889,7 @@
 	cds_msg_t msg;
 
 	tAniHandoffReq *pMsg;
-	pMsg = cdf_mem_malloc(sizeof(tAniHandoffReq));
+	pMsg = qdf_mem_malloc(sizeof(tAniHandoffReq));
 	if (NULL == pMsg) {
 		sms_log(pMac, LOGE,
 			" csr_handoff_request: failed to allocate mem for req ");
@@ -17900,14 +17900,14 @@
 	pMsg->sessionId = sessionId;
 	pMsg->channel = pHandoffInfo->channel;
 	pMsg->handoff_src = pHandoffInfo->src;
-	cdf_mem_copy(pMsg->bssid, pHandoffInfo->bssid.bytes, QDF_MAC_ADDR_SIZE);
+	qdf_mem_copy(pMsg->bssid, pHandoffInfo->bssid.bytes, QDF_MAC_ADDR_SIZE);
 	msg.type = eWNI_SME_HANDOFF_REQ;
 	msg.bodyptr = pMsg;
 	msg.reserved = 0;
 	if (QDF_STATUS_SUCCESS != cds_mq_post_message(CDS_MQ_ID_SME, &msg)) {
 		sms_log(pMac, LOGE,
 			" csr_handoff_request failed to post msg to self ");
-		cdf_mem_free((void *)pMsg);
+		qdf_mem_free((void *)pMsg);
 		status = QDF_STATUS_E_FAILURE;
 	}
 	return status;
@@ -17934,7 +17934,7 @@
 		sms_log(pMac, LOGE, FL("  session %d not found "), sessionId);
 		return QDF_STATUS_E_FAILURE;
 	}
-	cdf_mem_copy(pSession->suppCckmIeInfo.cckmIe, pCckmIe, ccKmIeLen);
+	qdf_mem_copy(pSession->suppCckmIeInfo.cckmIe, pCckmIe, ccKmIeLen);
 	pSession->suppCckmIeInfo.cckmIeLen = ccKmIeLen;
 	return status;
 }
@@ -17966,7 +17966,7 @@
 	timeStamp[0] = pBssDescription->timeStamp[0];
 	timeStamp[1] = pBssDescription->timeStamp[1];
 	update_cckmtsf(&(timeStamp[0]), &(timeStamp[1]), &timer_diff);
-	cdf_mem_copy(pTimestamp, (void *)&timeStamp[0], sizeof(uint32_t) * 2);
+	qdf_mem_copy(pTimestamp, (void *)&timeStamp[0], sizeof(uint32_t) * 2);
 	return status;
 }
 #endif /*FEATURE_WLAN_ESE && FEATURE_WLAN_ESE_UPLOAD */
@@ -17992,12 +17992,12 @@
 	tCsrRoamStartBssParams param;
 
 	csr_roam_get_bss_start_parms(pMac, profile, &param);
-	pMsg = cdf_mem_malloc(sizeof(tSirChanChangeRequest));
+	pMsg = qdf_mem_malloc(sizeof(tSirChanChangeRequest));
 	if (!pMsg) {
 		return QDF_STATUS_E_NOMEM;
 	}
 
-	cdf_mem_set((void *)pMsg, sizeof(tSirChanChangeRequest), 0);
+	qdf_mem_set((void *)pMsg, sizeof(tSirChanChangeRequest), 0);
 
 	pMsg->messageType = eWNI_SME_CHANNEL_CHANGE_REQ;
 	pMsg->messageLen = sizeof(tSirChanChangeRequest);
@@ -18008,10 +18008,10 @@
 					pMac->roam.configParam.uCfgDot11Mode);
 	pMsg->center_freq_seg_0 = ch_params->center_freq_seg0;
 	pMsg->center_freq_seg_1 = ch_params->center_freq_seg1;
-	cdf_mem_copy(pMsg->bssid, bssid.bytes, QDF_MAC_ADDR_SIZE);
-	cdf_mem_copy(&pMsg->operational_rateset,
+	qdf_mem_copy(pMsg->bssid, bssid.bytes, QDF_MAC_ADDR_SIZE);
+	qdf_mem_copy(&pMsg->operational_rateset,
 		&param.operationalRateSet, sizeof(pMsg->operational_rateset));
-	cdf_mem_copy(&pMsg->extended_rateset,
+	qdf_mem_copy(&pMsg->extended_rateset,
 		&param.extendedRateSet, sizeof(pMsg->extended_rateset));
 	status = cds_send_mb_message_to_mac(pMsg);
 
@@ -18030,17 +18030,17 @@
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
 	tSirStartBeaconIndication *pMsg;
 
-	pMsg = cdf_mem_malloc(sizeof(tSirStartBeaconIndication));
+	pMsg = qdf_mem_malloc(sizeof(tSirStartBeaconIndication));
 
 	if (!pMsg) {
 		return QDF_STATUS_E_NOMEM;
 	}
 
-	cdf_mem_set((void *)pMsg, sizeof(tSirStartBeaconIndication), 0);
+	qdf_mem_set((void *)pMsg, sizeof(tSirStartBeaconIndication), 0);
 	pMsg->messageType = eWNI_SME_START_BEACON_REQ;
 	pMsg->messageLen = sizeof(tSirStartBeaconIndication);
 	pMsg->beaconStartStatus = dfsCacWaitStatus;
-	cdf_mem_copy(pMsg->bssid, bssid.bytes, QDF_MAC_ADDR_SIZE);
+	qdf_mem_copy(pMsg->bssid, bssid.bytes, QDF_MAC_ADDR_SIZE);
 
 	status = cds_send_mb_message_to_mac(pMsg);
 
@@ -18064,24 +18064,24 @@
 	QDF_STATUS status;
 
 	/* following buffer will be freed by consumer (PE) */
-	pLocalBuffer = cdf_mem_malloc(pModifyIE->ieBufferlength);
+	pLocalBuffer = qdf_mem_malloc(pModifyIE->ieBufferlength);
 
 	if (NULL == pLocalBuffer) {
 		sms_log(pMac, LOGE, FL("Memory Allocation Failure!!!"));
 		return QDF_STATUS_E_NOMEM;
 	}
 
-	pModifyAddIEInd = cdf_mem_malloc(sizeof(tSirModifyIEsInd));
+	pModifyAddIEInd = qdf_mem_malloc(sizeof(tSirModifyIEsInd));
 	if (NULL == pModifyAddIEInd) {
 		sms_log(pMac, LOGE, FL("Memory Allocation Failure!!!"));
-		cdf_mem_free(pLocalBuffer);
+		qdf_mem_free(pLocalBuffer);
 		return QDF_STATUS_E_NOMEM;
 	}
 
 	/*copy the IE buffer */
-	cdf_mem_copy(pLocalBuffer, pModifyIE->pIEBuffer,
+	qdf_mem_copy(pLocalBuffer, pModifyIE->pIEBuffer,
 		     pModifyIE->ieBufferlength);
-	cdf_mem_zero(pModifyAddIEInd, sizeof(tSirModifyIEsInd));
+	qdf_mem_zero(pModifyAddIEInd, sizeof(tSirModifyIEsInd));
 
 	pModifyAddIEInd->msgType = eWNI_SME_MODIFY_ADDITIONAL_IES;
 	pModifyAddIEInd->msgLen = sizeof(tSirModifyIEsInd);
@@ -18102,7 +18102,7 @@
 		sms_log(pMac, LOGE,
 			FL("Failed to send eWNI_SME_UPDATE_ADDTIONAL_IES msg"
 			   "!!! status %d"), status);
-		cdf_mem_free(pLocalBuffer);
+		qdf_mem_free(pLocalBuffer);
 	}
 	return status;
 }
@@ -18129,25 +18129,25 @@
 
 	if (pUpdateIE->ieBufferlength != 0) {
 		/* Following buffer will be freed by consumer (PE) */
-		pLocalBuffer = cdf_mem_malloc(pUpdateIE->ieBufferlength);
+		pLocalBuffer = qdf_mem_malloc(pUpdateIE->ieBufferlength);
 		if (NULL == pLocalBuffer) {
 			sms_log(pMac, LOGE, FL("Memory Allocation Failure!!!"));
 			return QDF_STATUS_E_NOMEM;
 		}
-		cdf_mem_copy(pLocalBuffer, pUpdateIE->pAdditionIEBuffer,
+		qdf_mem_copy(pLocalBuffer, pUpdateIE->pAdditionIEBuffer,
 			     pUpdateIE->ieBufferlength);
 	}
 
-	pUpdateAddIEs = cdf_mem_malloc(sizeof(tSirUpdateIEsInd));
+	pUpdateAddIEs = qdf_mem_malloc(sizeof(tSirUpdateIEsInd));
 	if (NULL == pUpdateAddIEs) {
 		sms_log(pMac, LOGE, FL("Memory Allocation Failure!!!"));
 		if (pLocalBuffer != NULL) {
-			cdf_mem_free(pLocalBuffer);
+			qdf_mem_free(pLocalBuffer);
 		}
 		return QDF_STATUS_E_NOMEM;
 	}
 
-	cdf_mem_zero(pUpdateAddIEs, sizeof(tSirUpdateIEsInd));
+	qdf_mem_zero(pUpdateAddIEs, sizeof(tSirUpdateIEsInd));
 
 	pUpdateAddIEs->msgType = eWNI_SME_UPDATE_ADDITIONAL_IES;
 	pUpdateAddIEs->msgLen = sizeof(tSirUpdateIEsInd);
@@ -18167,7 +18167,7 @@
 		sms_log(pMac, LOGE,
 			FL("Failed to send eWNI_SME_UPDATE_ADDTIONAL_IES msg"
 			   "!!! status %d"), status);
-		cdf_mem_free(pLocalBuffer);
+		qdf_mem_free(pLocalBuffer);
 	}
 	return status;
 }
@@ -18189,11 +18189,11 @@
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
 	struct sir_sme_ext_cng_chan_req *msg;
 
-	msg = cdf_mem_malloc(sizeof(*msg));
+	msg = qdf_mem_malloc(sizeof(*msg));
 	if (NULL == msg)
 		return QDF_STATUS_E_NOMEM;
 
-	cdf_mem_zero(msg, sizeof(*msg));
+	qdf_mem_zero(msg, sizeof(*msg));
 	msg->message_type = eWNI_SME_EXT_CHANGE_CHANNEL;
 	msg->length = sizeof(*msg);
 	msg->new_channel = channel;
@@ -18223,19 +18223,19 @@
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
 	tSirDfsCsaIeRequest *msg;
 
-	msg = cdf_mem_malloc(sizeof(tSirDfsCsaIeRequest));
+	msg = qdf_mem_malloc(sizeof(tSirDfsCsaIeRequest));
 	if (!msg) {
 		return QDF_STATUS_E_NOMEM;
 	}
 
-	cdf_mem_set((void *)msg, sizeof(tSirDfsCsaIeRequest), 0);
+	qdf_mem_set((void *)msg, sizeof(tSirDfsCsaIeRequest), 0);
 	msg->msgType = eWNI_SME_DFS_BEACON_CHAN_SW_IE_REQ;
 	msg->msgLen = sizeof(tSirDfsCsaIeRequest);
 
 	msg->targetChannel = target_channel;
 	msg->csaIeRequired = csa_ie_reqd;
-	cdf_mem_copy(msg->bssid, bssid.bytes, QDF_MAC_ADDR_SIZE);
-	cdf_mem_copy(&msg->ch_params, ch_params, sizeof(chan_params_t));
+	qdf_mem_copy(msg->bssid, bssid.bytes, QDF_MAC_ADDR_SIZE);
+	qdf_mem_copy(&msg->ch_params, ch_params, sizeof(chan_params_t));
 
 	status = cds_send_mb_message_to_mac(msg);
 
@@ -18261,7 +18261,7 @@
 {
 	WLAN_HOST_DIAG_EVENT_DEF(roam_connection,
 		host_event_wlan_status_payload_type);
-	cdf_mem_set(&roam_connection,
+	qdf_mem_set(&roam_connection,
 		sizeof(host_event_wlan_status_payload_type), 0);
 	switch (reason) {
 	case eCSR_REASON_ROAM_SYNCH_IND:
@@ -18696,7 +18696,7 @@
 	}
 
 	len = sizeof(*cmd);
-	cmd = cdf_mem_malloc(len);
+	cmd = qdf_mem_malloc(len);
 	if (!cmd) {
 		sms_log(mac, LOGE, FL("Memory allocation failed"));
 		/* Probably the fail response will also fail during malloc.
@@ -18718,7 +18718,7 @@
 		}
 	}
 
-	cdf_mem_set(cmd, len, 0);
+	qdf_mem_set(cmd, len, 0);
 
 	cmd->messageType = eWNI_SME_SET_HW_MODE_REQ;
 	cmd->length = len;
@@ -18740,7 +18740,7 @@
 	}
 	return;
 fail:
-	param = cdf_mem_malloc(sizeof(*param));
+	param = qdf_mem_malloc(sizeof(*param));
 	if (!param) {
 		sms_log(mac, LOGE,
 			FL("Malloc fail: Fail to send response to SME"));
@@ -18783,7 +18783,7 @@
 	}
 
 	len = sizeof(*cmd);
-	cmd = cdf_mem_malloc(len);
+	cmd = qdf_mem_malloc(len);
 	if (!cmd) {
 		sms_log(mac, LOGE, FL("Memory allocation failed"));
 		/* Probably the fail response will also fail during malloc.
@@ -18816,7 +18816,7 @@
 	}
 	return;
 fail:
-	param = cdf_mem_malloc(sizeof(*param));
+	param = qdf_mem_malloc(sizeof(*param));
 	if (!param) {
 		sms_log(mac, LOGE,
 			FL("Malloc fail: Fail to send response to SME"));
@@ -18862,7 +18862,7 @@
 	}
 
 	len = sizeof(*msg);
-	msg = cdf_mem_malloc(len);
+	msg = qdf_mem_malloc(len);
 	if (!msg) {
 		sms_log(mac, LOGE, FL("Memory allocation failed"));
 		/* Probably the fail response is also fail during malloc.
@@ -18871,7 +18871,7 @@
 		goto fail;
 	}
 
-	cdf_mem_set((void *)msg, sizeof(*msg), 0);
+	qdf_mem_set((void *)msg, sizeof(*msg), 0);
 	msg->msgType = eWNI_SME_NSS_UPDATE_REQ;
 	msg->msgLen = sizeof(*msg);
 
@@ -18888,7 +18888,7 @@
 	}
 	return;
 fail:
-	param = cdf_mem_malloc(sizeof(*param));
+	param = qdf_mem_malloc(sizeof(*param));
 	if (!param) {
 		sms_log(mac, LOGE,
 			FL("Malloc fail: Fail to send response to SME"));
@@ -18980,7 +18980,7 @@
 		ies_local);
 	ps_global_info->remain_in_power_active_till_dhcp = false;
 	session->connectState = eCSR_ASSOC_STATE_TYPE_INFRA_ASSOCIATED;
-	roam_info = cdf_mem_malloc(sizeof(tCsrRoamInfo));
+	roam_info = qdf_mem_malloc(sizeof(tCsrRoamInfo));
 	if (NULL == roam_info) {
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG,
 			FL("LFR3: Mem Alloc failed for roam info"));
@@ -18990,12 +18990,12 @@
 	}
 	csr_scan_save_roam_offload_ap_to_scan_cache(mac_ctx, roam_synch_data,
 			bss_desc);
-	cdf_mem_zero(roam_info, sizeof(tCsrRoamInfo));
+	qdf_mem_zero(roam_info, sizeof(tCsrRoamInfo));
 	roam_info->sessionId = session_id;
 	csr_roam_call_callback(mac_ctx, roam_synch_data->roamedVdevId,
 		roam_info, 0, eCSR_ROAM_TDLS_STATUS_UPDATE,
 		eCSR_ROAM_RESULT_DELETE_ALL_TDLS_PEER_IND);
-	cdf_mem_copy(&roam_info->bssid.bytes, &bss_desc->bssId,
+	qdf_mem_copy(&roam_info->bssid.bytes, &bss_desc->bssId,
 			sizeof(struct qdf_mac_addr));
 	csr_roam_save_connected_infomation(mac_ctx, session_id,
 			session->pCurRoamProfile,
@@ -19058,24 +19058,24 @@
 		SIR_MAC_HDR_LEN_3A - SIR_MAC_REASSOC_SSID_OFFSET;
 	roam_info->nAssocRspLength = roam_synch_data->reassocRespLength -
 		SIR_MAC_HDR_LEN_3A;
-	roam_info->pbFrames = cdf_mem_malloc(roam_info->nBeaconLength +
+	roam_info->pbFrames = qdf_mem_malloc(roam_info->nBeaconLength +
 		roam_info->nAssocReqLength + roam_info->nAssocRspLength);
 	if (NULL == roam_info->pbFrames) {
 		sms_log(mac_ctx, LOGE, FL("no memory available"));
 		session->roam_synch_in_progress = false;
 		if (roam_info)
-			cdf_mem_free(roam_info);
+			qdf_mem_free(roam_info);
 		sme_release_global_lock(&mac_ctx->sme);
 		return;
 	}
-	cdf_mem_zero(roam_info->pbFrames, roam_info->nBeaconLength +
+	qdf_mem_zero(roam_info->pbFrames, roam_info->nBeaconLength +
 		roam_info->nAssocReqLength + roam_info->nAssocRspLength);
-	cdf_mem_copy(roam_info->pbFrames,
+	qdf_mem_copy(roam_info->pbFrames,
 			(uint8_t *)roam_synch_data +
 			roam_synch_data->reassoc_req_offset +
 			SIR_MAC_HDR_LEN_3A + SIR_MAC_REASSOC_SSID_OFFSET,
 			roam_info->nAssocReqLength);
-	cdf_mem_copy(roam_info->pbFrames + roam_info->nAssocReqLength,
+	qdf_mem_copy(roam_info->pbFrames + roam_info->nAssocReqLength,
 			(uint8_t *)roam_synch_data +
 			roam_synch_data->reassocRespOffset +
 			SIR_MAC_HDR_LEN_3A,
@@ -19149,9 +19149,9 @@
 	}
 	roam_info->roamSynchInProgress = true;
 	roam_info->synchAuthStatus = roam_synch_data->authStatus;
-	cdf_mem_copy(roam_info->kck, roam_synch_data->kck, SIR_KCK_KEY_LEN);
-	cdf_mem_copy(roam_info->kek, roam_synch_data->kek, SIR_KEK_KEY_LEN);
-	cdf_mem_copy(roam_info->replay_ctr, roam_synch_data->replay_ctr,
+	qdf_mem_copy(roam_info->kck, roam_synch_data->kck, SIR_KCK_KEY_LEN);
+	qdf_mem_copy(roam_info->kek, roam_synch_data->kek, SIR_KEK_KEY_LEN);
+	qdf_mem_copy(roam_info->replay_ctr, roam_synch_data->replay_ctr,
 			SIR_REPLAY_CTR_LEN);
 	QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG,
 		FL("LFR3: Copy KCK, KEK and Replay Ctr"));
@@ -19172,7 +19172,7 @@
 	}
 	session->fRoaming = false;
 	session->roam_synch_in_progress = false;
-	cdf_mem_free(roam_info->pbFrames);
-	cdf_mem_free(roam_info);
+	qdf_mem_free(roam_info->pbFrames);
+	qdf_mem_free(roam_info);
 	sme_release_global_lock(&mac_ctx->sme);
 }
diff --git a/core/sme/src/csr/csr_api_scan.c b/core/sme/src/csr/csr_api_scan.c
index c587ca5..4054ffe 100644
--- a/core/sme/src/csr/csr_api_scan.c
+++ b/core/sme/src/csr/csr_api_scan.c
@@ -133,9 +133,9 @@
 void csr_free_scan_result_entry(tpAniSirGlobal pMac, tCsrScanResult *pResult)
 {
 	if (NULL != pResult->Result.pvIes) {
-		cdf_mem_free(pResult->Result.pvIes);
+		qdf_mem_free(pResult->Result.pvIes);
 	}
-	cdf_mem_free(pResult);
+	qdf_mem_free(pResult);
 }
 
 static QDF_STATUS csr_ll_scan_purge_result(tpAniSirGlobal pMac,
@@ -320,7 +320,7 @@
 	/* Contsruct valid Supported 2.4 GHz Channel List */
 	if (NULL == scan_req->ChannelInfo.ChannelList) {
 		scan_req->ChannelInfo.ChannelList =
-			cdf_mem_malloc(NUM_24GHZ_CHANNELS);
+			qdf_mem_malloc(NUM_24GHZ_CHANNELS);
 		if (NULL == scan_req->ChannelInfo.ChannelList) {
 			sms_log(mac_ctx, LOGE, FL("Memory allocation failed."));
 			return QDF_STATUS_E_NOMEM;
@@ -400,20 +400,20 @@
 	    && (false == mac_ctx->scan.fEnableBypass11d)))
 		return QDF_STATUS_SUCCESS;
 
-	cdf_mem_set(&tmp_rq, sizeof(tCsrScanRequest), 0);
+	qdf_mem_set(&tmp_rq, sizeof(tCsrScanRequest), 0);
 	scan_11d_cmd = csr_get_command_buffer(mac_ctx);
 	if (!scan_11d_cmd) {
 		sms_log(mac_ctx, LOGE, FL("scan_11d_cmd failed"));
 		return QDF_STATUS_E_FAILURE;
 	}
 
-	cdf_mem_set(&scan_11d_cmd->u.scanCmd, sizeof(tScanCmd), 0);
-	pChnInfo->ChannelList = cdf_mem_malloc(numChn);
+	qdf_mem_set(&scan_11d_cmd->u.scanCmd, sizeof(tScanCmd), 0);
+	pChnInfo->ChannelList = qdf_mem_malloc(numChn);
 	if (NULL == pChnInfo->ChannelList) {
 		sms_log(mac_ctx, LOGE, FL("Failed to allocate memory"));
 		return QDF_STATUS_E_NOMEM;
 	}
-	cdf_mem_copy(pChnInfo->ChannelList,
+	qdf_mem_copy(pChnInfo->ChannelList,
 		     mac_ctx->scan.base_channels.channelList, numChn);
 
 	pChnInfo->numOfChannels = (uint8_t) numChn;
@@ -461,7 +461,7 @@
 	status = csr_scan_copy_request(mac_ctx,
 			&scan_11d_cmd->u.scanCmd.u.scanRequest, &tmp_rq);
 	/* Free the channel list */
-	cdf_mem_free(pChnInfo->ChannelList);
+	qdf_mem_free(pChnInfo->ChannelList);
 	pChnInfo->ChannelList = NULL;
 	if (!QDF_IS_STATUS_SUCCESS(status)) {
 		sms_log(mac_ctx, LOGE, FL("csr_scan_copy_request failed"));
@@ -531,7 +531,7 @@
 		goto release_cmd;
 	}
 
-	cdf_mem_set(&scan_cmd->u.scanCmd, sizeof(tScanCmd), 0);
+	qdf_mem_set(&scan_cmd->u.scanCmd, sizeof(tScanCmd), 0);
 	scan_cmd->command = eSmeCommandScan;
 	scan_cmd->sessionId = sessionId;
 	if (scan_cmd->sessionId >= CSR_ROAM_SESSION_MAX)
@@ -664,12 +664,12 @@
 		goto free_filter;
 	}
 	/* Here is the profile we need to connect to */
-	pScanFilter = cdf_mem_malloc(sizeof(tCsrScanResultFilter));
+	pScanFilter = qdf_mem_malloc(sizeof(tCsrScanResultFilter));
 	if (NULL == pScanFilter) {
 		status = QDF_STATUS_E_NOMEM;
 		goto free_filter;
 	}
-	cdf_mem_set(pScanFilter, sizeof(tCsrScanResultFilter), 0);
+	qdf_mem_set(pScanFilter, sizeof(tCsrScanResultFilter), 0);
 	if (NULL == pSession->pCurRoamProfile) {
 		pScanFilter->EncryptionType.numEntries = 1;
 		pScanFilter->EncryptionType.encryptionType[0] =
@@ -679,12 +679,12 @@
 		 * We have to make a copy of pCurRoamProfile because it will
 		 * be free inside csr_roam_issue_connect
 		 */
-		pProfile = cdf_mem_malloc(sizeof(tCsrRoamProfile));
+		pProfile = qdf_mem_malloc(sizeof(tCsrRoamProfile));
 		if (NULL == pProfile) {
 			status = QDF_STATUS_E_NOMEM;
 			goto free_filter;
 		}
-		cdf_mem_set(pProfile, sizeof(tCsrRoamProfile), 0);
+		qdf_mem_set(pProfile, sizeof(tCsrRoamProfile), 0);
 		status = csr_roam_copy_profile(pMac, pProfile,
 					       pSession->pCurRoamProfile);
 		if (!QDF_IS_STATUS_SUCCESS(status))
@@ -715,11 +715,11 @@
 	if (pScanFilter) {
 		/* we need to free memory for filter if profile exists */
 		csr_free_scan_filter(pMac, pScanFilter);
-		cdf_mem_free(pScanFilter);
+		qdf_mem_free(pScanFilter);
 	}
 	if (NULL != pProfile) {
 		csr_release_profile(pMac, pProfile);
-		cdf_mem_free(pProfile);
+		qdf_mem_free(pProfile);
 	}
 	return status;
 }
@@ -818,11 +818,11 @@
 		 * on error: following memory will be released by call to
 		 * csr_release_command_scan in the end
 		 */
-		ssid_list->SSIDList = cdf_mem_malloc(sizeof(tCsrSSIDInfo));
+		ssid_list->SSIDList = qdf_mem_malloc(sizeof(tCsrSSIDInfo));
 		if (NULL == ssid_list->SSIDList)
 			return QDF_STATUS_E_NOMEM;
 		ssid_list->numOfSSIDs = 1;
-		cdf_mem_copy(&ssid_list->SSIDList[0].SSID,
+		qdf_mem_copy(&ssid_list->SSIDList[0].SSID,
 			     &pSession->connectedProfile.SSID,
 			     sizeof(tSirMacSSid));
 	} else {
@@ -832,11 +832,11 @@
 	if (!pSession->pCurRoamProfile)
 		return QDF_STATUS_SUCCESS;
 
-	scan_filter = cdf_mem_malloc(sizeof(tCsrScanResultFilter));
+	scan_filter = qdf_mem_malloc(sizeof(tCsrScanResultFilter));
 	if (NULL == scan_filter)
 		return QDF_STATUS_E_NOMEM;
 
-	cdf_mem_set(scan_filter, sizeof(tCsrScanResultFilter), 0);
+	qdf_mem_set(scan_filter, sizeof(tCsrScanResultFilter), 0);
 	status = csr_roam_prepare_filter_from_profile(mac_ctx,
 			pSession->pCurRoamProfile, scan_filter);
 	if (!QDF_IS_STATUS_SUCCESS(status))
@@ -846,7 +846,7 @@
 		&bss_lst)) && bss_lst)) {
 		if (csr_roam_is_channel_valid(mac_ctx,
 			pSession->connectedProfile.operationChannel)) {
-			ch_info->ChannelList = cdf_mem_malloc(1);
+			ch_info->ChannelList = qdf_mem_malloc(1);
 			if (NULL == ch_info->ChannelList) {
 				status = QDF_STATUS_E_NOMEM;
 				goto free_lost_link1_local_mem;
@@ -859,7 +859,7 @@
 	}
 
 	/* on error: this mem will be released by csr_release_command_scan */
-	ch_info->ChannelList = cdf_mem_malloc(WNI_CFG_VALID_CHANNEL_LIST_LEN);
+	ch_info->ChannelList = qdf_mem_malloc(WNI_CFG_VALID_CHANNEL_LIST_LEN);
 	if (NULL == ch_info->ChannelList) {
 		status = QDF_STATUS_E_NOMEM;
 		goto free_lost_link1_local_mem;
@@ -893,7 +893,7 @@
 free_lost_link1_local_mem:
 	if (scan_filter) {
 		csr_free_scan_filter(mac_ctx, scan_filter);
-		cdf_mem_free(scan_filter);
+		qdf_mem_free(scan_filter);
 	}
 	if (bss_lst)
 		csr_scan_result_purge(mac_ctx, bss_lst);
@@ -929,12 +929,12 @@
 		status = QDF_STATUS_E_RESOURCES;
 		goto release_lost_link1_cmd;
 	}
-	cdf_mem_set(&cmd->u.scanCmd, sizeof(tScanCmd), 0);
+	qdf_mem_set(&cmd->u.scanCmd, sizeof(tScanCmd), 0);
 	status = csr_update_lost_link1_cmd(mac_ctx, cmd, session, session_id);
 	if (!QDF_IS_STATUS_SUCCESS(status))
 		goto release_lost_link1_cmd;
 
-	cdf_mem_set(&cmd->u.scanCmd.u.scanRequest.bssid,
+	qdf_mem_set(&cmd->u.scanCmd.u.scanRequest.bssid,
 		    sizeof(struct qdf_mac_addr), 0xFF);
 	status = csr_queue_sme_command(mac_ctx, cmd, false);
 	if (!QDF_IS_STATUS_SUCCESS(status)) {
@@ -981,11 +981,11 @@
 	status = qdf_mc_timer_init(&cmd->u.scanCmd.csr_scan_timer,
 			QDF_TIMER_TYPE_SW,
 			csr_scan_active_list_timeout_handle, &cmd);
-	scan_fltr = cdf_mem_malloc(sizeof(tCsrScanResultFilter));
+	scan_fltr = qdf_mem_malloc(sizeof(tCsrScanResultFilter));
 	if (NULL == scan_fltr)
 		return QDF_STATUS_E_NOMEM;
 
-	cdf_mem_set(scan_fltr, sizeof(tCsrScanResultFilter), 0);
+	qdf_mem_set(scan_fltr, sizeof(tCsrScanResultFilter), 0);
 	status = csr_roam_prepare_filter_from_profile(mac_ctx,
 				session->pCurRoamProfile, scan_fltr);
 	if (!QDF_IS_STATUS_SUCCESS(status))
@@ -998,7 +998,7 @@
 	if (!bss_lst)
 		goto free_lost_link2_local_mem;
 
-	ch_info->ChannelList = cdf_mem_malloc(WNI_CFG_VALID_CHANNEL_LIST_LEN);
+	ch_info->ChannelList = qdf_mem_malloc(WNI_CFG_VALID_CHANNEL_LIST_LEN);
 	if (NULL == ch_info->ChannelList) {
 		status = QDF_STATUS_E_NOMEM;
 		goto free_lost_link2_local_mem;
@@ -1020,7 +1020,7 @@
 free_lost_link2_local_mem:
 	if (scan_fltr) {
 		csr_free_scan_filter(mac_ctx, scan_fltr);
-		cdf_mem_free(scan_fltr);
+		qdf_mem_free(scan_fltr);
 	}
 	if (bss_lst)
 		csr_scan_result_purge(mac_ctx, bss_lst);
@@ -1056,12 +1056,12 @@
 		status = QDF_STATUS_E_RESOURCES;
 		goto release_lost_link2_cmd;
 	}
-	cdf_mem_set(&cmd->u.scanCmd, sizeof(tScanCmd), 0);
+	qdf_mem_set(&cmd->u.scanCmd, sizeof(tScanCmd), 0);
 	status = csr_update_lost_link2_cmd(mac_ctx, cmd, session_id, session);
 	if (!QDF_IS_STATUS_SUCCESS(status))
 		goto release_lost_link2_cmd;
 
-	cdf_mem_set(&cmd->u.scanCmd.u.scanRequest.bssid,
+	qdf_mem_set(&cmd->u.scanCmd.u.scanRequest.bssid,
 		    sizeof(struct qdf_mac_addr), 0xFF);
 	/* Put to the head in pending queue */
 	status = csr_queue_sme_command(mac_ctx, cmd, true);
@@ -1101,7 +1101,7 @@
 			status = QDF_STATUS_E_RESOURCES;
 			break;
 		}
-		cdf_mem_set(&cmd->u.scanCmd, sizeof(tScanCmd), 0);
+		qdf_mem_set(&cmd->u.scanCmd, sizeof(tScanCmd), 0);
 		cmd->command = eSmeCommandScan;
 		cmd->sessionId = (uint8_t) session_id;
 		cmd->u.scanCmd.reason = eCsrScanLostLink3;
@@ -1168,12 +1168,12 @@
 		}
 		if (pProfile == NULL)
 			break;
-		pScanFilter = cdf_mem_malloc(sizeof(tCsrScanResultFilter));
+		pScanFilter = qdf_mem_malloc(sizeof(tCsrScanResultFilter));
 		if (NULL == pScanFilter) {
 			status = QDF_STATUS_E_NOMEM;
 			break;
 		}
-		cdf_mem_set(pScanFilter, sizeof(tCsrScanResultFilter), 0);
+		qdf_mem_set(pScanFilter, sizeof(tCsrScanResultFilter), 0);
 		status = csr_roam_prepare_filter_from_profile(pMac, pProfile,
 							      pScanFilter);
 		if (!QDF_IS_STATUS_SUCCESS(status))
@@ -1206,7 +1206,7 @@
 	}
 	if (pScanFilter) {
 		csr_free_scan_filter(pMac, pScanFilter);
-		cdf_mem_free(pScanFilter);
+		qdf_mem_free(pScanFilter);
 	}
 	return status;
 }
@@ -1238,7 +1238,7 @@
 		char str[36];
 		tSirMacSSid *ptr_ssid =
 		&pCommand->u.scanCmd.u.scanRequest.SSIDs.SSIDList[0].SSID;
-		cdf_mem_copy(str, ptr_ssid->ssId, ptr_ssid->length);
+		qdf_mem_copy(str, ptr_ssid->ssId, ptr_ssid->length);
 		str[ptr_ssid->length] = 0;
 		sms_log(pMac, LOGW, FL("SSID = %s"), str);
 	}
@@ -1270,7 +1270,7 @@
 	if (pSession->bRefAssocStartCnt > 0) {
 		tCsrRoamInfo *pRoamInfo = NULL, roamInfo;
 
-		cdf_mem_set(&roamInfo, sizeof(tCsrRoamInfo), 0);
+		qdf_mem_set(&roamInfo, sizeof(tCsrRoamInfo), 0);
 		pRoamInfo = &roamInfo;
 		if (pCommand->u.roamCmd.pRoamBssEntry) {
 			tCsrScanResult *pScanResult = GET_BASE_ADDR(
@@ -1306,7 +1306,7 @@
 	if (pScanList) {
 		status = csr_ll_scan_purge_result(pMac, &pScanList->List);
 		csr_ll_close(&pScanList->List);
-		cdf_mem_free(pScanList);
+		qdf_mem_free(pScanList);
 	}
 	return status;
 }
@@ -1386,9 +1386,9 @@
 	struct qdf_mac_addr local_bssid;
 
 	modified_rssi = rssi;
-	cdf_mem_zero(&local_bssid.bytes, QDF_MAC_ADDR_SIZE);
+	qdf_mem_zero(&local_bssid.bytes, QDF_MAC_ADDR_SIZE);
 	if (bssid)
-		cdf_mem_copy(local_bssid.bytes, bssid->bytes,
+		qdf_mem_copy(local_bssid.bytes, bssid->bytes,
 				QDF_MAC_ADDR_SIZE);
 	roam_params = &mac_ctx->roam.configParam.roam_params;
 	/*
@@ -1421,10 +1421,10 @@
 	 * Check if there are preferred bssid and then apply the
 	 * preferred score
 	 */
-	cdf_mem_zero(&fav_bssid.bytes, QDF_MAC_ADDR_SIZE);
+	qdf_mem_zero(&fav_bssid.bytes, QDF_MAC_ADDR_SIZE);
 	if (bssid && roam_params->num_bssid_favored) {
 		for (i = 0; i < roam_params->num_bssid_favored; i++) {
-			cdf_mem_copy(fav_bssid.bytes,
+			qdf_mem_copy(fav_bssid.bytes,
 					&roam_params->bssid_favored[i],
 					QDF_MAC_ADDR_SIZE);
 			if (!qdf_is_macaddr_equal(&fav_bssid, bssid))
@@ -1526,13 +1526,13 @@
 	 * Apply the boost and penlty logic and check
 	 * which is the best RSSI
 	 */
-	cdf_mem_zero(&local_mac.bytes, QDF_MAC_ADDR_SIZE);
-	cdf_mem_copy(&local_mac.bytes,
+	qdf_mem_zero(&local_mac.bytes, QDF_MAC_ADDR_SIZE);
+	qdf_mem_copy(&local_mac.bytes,
 			&bss1->Result.BssDescriptor.bssId, QDF_MAC_ADDR_SIZE);
 	rssi1 = csr_get_altered_rssi(mac_ctx, rssi1,
 			bss1->Result.BssDescriptor.channelId,
 			&local_mac);
-	cdf_mem_copy(&local_mac.bytes,
+	qdf_mem_copy(&local_mac.bytes,
 			&bss2->Result.BssDescriptor.bssId, QDF_MAC_ADDR_SIZE);
 	rssi2 = csr_get_altered_rssi(mac_ctx, rssi2,
 			bss2->Result.BssDescriptor.channelId,
@@ -1626,8 +1626,8 @@
 
 	struct qdf_mac_addr bssid;
 	uint8_t channel_id = pResult->Result.BssDescriptor.channelId;
-	cdf_mem_zero(&bssid.bytes, QDF_MAC_ADDR_SIZE);
-	cdf_mem_copy(bssid.bytes, &pResult->Result.BssDescriptor.bssId,
+	qdf_mem_zero(&bssid.bytes, QDF_MAC_ADDR_SIZE);
+	qdf_mem_copy(bssid.bytes, &pResult->Result.BssDescriptor.bssId,
 			QDF_MAC_ADDR_SIZE);
 	pResult->preferValue = csr_get_bss_prefer_value(pMac,
 				(int)pResult->Result.BssDescriptor.rssi,
@@ -1684,7 +1684,7 @@
 				fMatch = true;
 				sms_log(pMac, LOG1, FL("Security Matched"));
 				if ((pBssDesc->Result.pvIes == NULL) && pIes)
-					cdf_mem_free(pIes);
+					qdf_mem_free(pIes);
 				continue;
 			}
 #ifdef WLAN_FEATURE_11W
@@ -1705,7 +1705,7 @@
 					pIes, NULL, NULL, NULL);
 #endif
 			if ((pBssDesc->Result.pvIes == NULL) && pIes)
-				cdf_mem_free(pIes);
+				qdf_mem_free(pIes);
 			if (fMatch)
 				sms_log(pMac, LOG1, FL("Security Matched"));
 		} /* for loop ends */
@@ -1816,7 +1816,7 @@
 		return status;
 	/* Only save it when matching */
 	if (!(*fMatch) && !pBssDesc->Result.pvIes) {
-		cdf_mem_free(pIes);
+		qdf_mem_free(pIes);
 		return status;
 	}
 	if (!pBssDesc->Result.pvIes) {
@@ -1832,16 +1832,16 @@
 	 * Only to save parsed IEs if caller provides a filter. Most likely the
 	 * caller is using to for association, hence save the parsed IEs
 	 */
-	*pNewIes = cdf_mem_malloc(sizeof(tDot11fBeaconIEs));
+	*pNewIes = qdf_mem_malloc(sizeof(tDot11fBeaconIEs));
 	if (NULL == *pNewIes) {
 		status = QDF_STATUS_E_NOMEM;
 		sms_log(pMac, LOGE, FL("fail to allocate memory for IEs"));
 		/* Need to free memory allocated by csr_match_bss */
 		if (!pBssDesc->Result.pvIes)
-			cdf_mem_free(pIes);
+			qdf_mem_free(pIes);
 		return status;
 	}
-	cdf_mem_copy(*pNewIes, pIes, sizeof(tDot11fBeaconIEs));
+	qdf_mem_copy(*pNewIes, pIes, sizeof(tDot11fBeaconIEs));
 	return status;
 }
 
@@ -1870,17 +1870,17 @@
 	bssLen = pBssDesc->Result.BssDescriptor.length +
 		sizeof(pBssDesc->Result.BssDescriptor.length);
 	allocLen = sizeof(tCsrScanResult) + bssLen;
-	pResult = cdf_mem_malloc(allocLen);
+	pResult = qdf_mem_malloc(allocLen);
 	if (NULL == pResult) {
 		status = QDF_STATUS_E_NOMEM;
 		sms_log(pMac, LOGE,
 			FL("fail to allocate memory for scan result, len=%d"),
 			allocLen);
 		if (pNewIes)
-			cdf_mem_free(pNewIes);
+			qdf_mem_free(pNewIes);
 		return status;
 	}
-	cdf_mem_set(pResult, allocLen, 0);
+	qdf_mem_set(pResult, allocLen, 0);
 	pResult->capValue = pBssDesc->capValue;
 	pResult->preferValue = pBssDesc->preferValue;
 	pResult->ucEncryptionType = uc;
@@ -1891,7 +1891,7 @@
 	/* save the pIes for later use */
 	pResult->Result.pvIes = pNewIes;
 	/* save bss description */
-	cdf_mem_copy(&pResult->Result.BssDescriptor,
+	qdf_mem_copy(&pResult->Result.BssDescriptor,
 		     &pBssDesc->Result.BssDescriptor,
 		     bssLen);
 	/*
@@ -2059,13 +2059,13 @@
 
 	csr_prefer_5ghz(pMac, pFilter);
 
-	pRetList = cdf_mem_malloc(sizeof(tScanResultList));
+	pRetList = qdf_mem_malloc(sizeof(tScanResultList));
 	if (NULL == pRetList) {
 		sms_log(pMac, LOGE, FL("pRetList is NULL"));
 		return QDF_STATUS_E_NOMEM;
 	}
 
-	cdf_mem_set(pRetList, sizeof(tScanResultList), 0);
+	qdf_mem_set(pRetList, sizeof(tScanResultList), 0);
 	csr_ll_open(pMac->hHdd, &pRetList->List);
 	pRetList->pCurEntry = NULL;
 	status = csr_parse_scan_results(pMac, pFilter, pRetList, &count);
@@ -2078,7 +2078,7 @@
 		if (0 == count) {
 			/* We are here meaning the there is no match */
 			csr_ll_close(&pRetList->List);
-			cdf_mem_free(pRetList);
+			qdf_mem_free(pRetList);
 			status = QDF_STATUS_E_NULL_VALUE;
 		} else if (phResult) {
 			*phResult = pRetList;
@@ -2140,7 +2140,7 @@
 	pEntry = csr_ll_peek_head(pList, LL_ACCESS_NOLOCK);
 	while (pEntry != NULL) {
 		pBssDesc = GET_BASE_ADDR(pEntry, tCsrScanResult, Link);
-		if (flushP2P == cdf_mem_compare(pBssDesc->Result.ssId.ssId,
+		if (flushP2P != qdf_mem_cmp(pBssDesc->Result.ssId.ssId,
 						"DIRECT-", 7)) {
 			pFreeElem = pEntry;
 			pEntry = csr_ll_next(pList, pEntry, LL_ACCESS_NOLOCK);
@@ -2168,7 +2168,7 @@
 	pEntry = csr_ll_peek_head(pList, LL_ACCESS_NOLOCK);
 	while (pEntry != NULL) {
 		pBssDesc = GET_BASE_ADDR(pEntry, tCsrScanResult, Link);
-		if (cdf_mem_compare(pBssDesc->Result.BssDescriptor.bssId,
+		if (!qdf_mem_cmp(pBssDesc->Result.BssDescriptor.bssId,
 			pCsaOffloadInd->bssid.bytes, QDF_MAC_ADDR_SIZE)) {
 			pFreeElem = pEntry;
 			pEntry = csr_ll_next(pList, pEntry, LL_ACCESS_NOLOCK);
@@ -2320,11 +2320,11 @@
 	if (phResult) {
 		*phResult = CSR_INVALID_SCANRESULT_HANDLE;
 	}
-	pRetList = cdf_mem_malloc(sizeof(tScanResultList));
+	pRetList = qdf_mem_malloc(sizeof(tScanResultList));
 	if (NULL == pRetList)
 		status = QDF_STATUS_E_NOMEM;
 	else {
-		cdf_mem_set(pRetList, sizeof(tScanResultList), 0);
+		qdf_mem_set(pRetList, sizeof(tScanResultList), 0);
 		csr_ll_open(pMac->hHdd, &pRetList->List);
 		pRetList->pCurEntry = NULL;
 		csr_ll_lock(&pMac->scan.scanResultList);
@@ -2338,7 +2338,7 @@
 				pScanResult->Result.BssDescriptor.length +
 				sizeof(pScanResult->Result.BssDescriptor.length);
 			allocLen = sizeof(tCsrScanResult) + bssLen;
-			pResult = cdf_mem_malloc(allocLen);
+			pResult = qdf_mem_malloc(allocLen);
 			if (NULL == pResult)
 				status = QDF_STATUS_E_NOMEM;
 			else
@@ -2350,27 +2350,27 @@
 				count = 0;
 				break;
 			}
-			cdf_mem_set(pResult, allocLen, 0);
-			cdf_mem_copy(&pResult->Result.BssDescriptor,
+			qdf_mem_set(pResult, allocLen, 0);
+			qdf_mem_copy(&pResult->Result.BssDescriptor,
 				     &pScanResult->Result.BssDescriptor,
 				     bssLen);
 			if (pScanResult->Result.pvIes) {
 				pResult->Result.pvIes =
-					cdf_mem_malloc(sizeof(tDot11fBeaconIEs));
+					qdf_mem_malloc(sizeof(tDot11fBeaconIEs));
 				if (NULL == pResult->Result.pvIes)
 					status = QDF_STATUS_E_NOMEM;
 				else
 					status = QDF_STATUS_SUCCESS;
 				if (!QDF_IS_STATUS_SUCCESS(status)) {
 					/* Free the memory we allocate above first */
-					cdf_mem_free(pResult);
+					qdf_mem_free(pResult);
 					csr_scan_result_purge(pMac,
 							      (tScanResultHandle *)
 							      pRetList);
 					count = 0;
 					break;
 				}
-				cdf_mem_copy(pResult->Result.pvIes,
+				qdf_mem_copy(pResult->Result.pvIes,
 					     pScanResult->Result.pvIes,
 					     sizeof(tDot11fBeaconIEs));
 			}
@@ -2386,7 +2386,7 @@
 		if (QDF_IS_STATUS_SUCCESS(status)) {
 			if (0 == count) {
 				csr_ll_close(&pRetList->List);
-				cdf_mem_free(pRetList);
+				qdf_mem_free(pRetList);
 				status = QDF_STATUS_E_NULL_VALUE;
 			} else if (phResult) {
 				*phResult = pRetList;
@@ -2430,7 +2430,7 @@
 
 	sms_log(pMac, LOG1,
 		FL("Scanning: ASSOC cnf can be given to upper layer"));
-	cdf_mem_set(&roamInfo, sizeof(tCsrRoamInfo), 0);
+	qdf_mem_set(&roamInfo, sizeof(tCsrRoamInfo), 0);
 	pRoamInfo = &roamInfo;
 	pUpperLayerAssocCnf = (tSirSmeAssocIndToUpperLayerCnf *) pMsgBuf;
 	status = csr_roam_get_session_id_from_bssid(pMac,
@@ -2450,10 +2450,10 @@
 	pRoamInfo->prsnIE = pUpperLayerAssocCnf->rsnIE.rsnIEdata;
 	pRoamInfo->addIELen = (uint8_t) pUpperLayerAssocCnf->addIE.length;
 	pRoamInfo->paddIE = pUpperLayerAssocCnf->addIE.addIEdata;
-	cdf_mem_copy(pRoamInfo->peerMac.bytes,
+	qdf_mem_copy(pRoamInfo->peerMac.bytes,
 			pUpperLayerAssocCnf->peerMacAddr,
 			QDF_MAC_ADDR_SIZE);
-	cdf_mem_copy(&pRoamInfo->bssid.bytes, pUpperLayerAssocCnf->bssId,
+	qdf_mem_copy(&pRoamInfo->bssid.bytes, pUpperLayerAssocCnf->bssId,
 		     QDF_MAC_ADDR_SIZE);
 	pRoamInfo->wmmEnabledSta = pUpperLayerAssocCnf->wmmEnabledSta;
 	if (CSR_IS_INFRA_AP(pRoamInfo->u.pConnectedProfile)) {
@@ -2491,7 +2491,7 @@
 				/* Founrd it */
 				if ((DOT11F_IE_WSCPROBERES_MAX_LEN - 2) >=
 				    pbIe[1]) {
-					cdf_mem_copy(pNewBssDescr->
+					qdf_mem_copy(pNewBssDescr->
 						     WscIeProbeRsp, pbIe,
 						     pbIe[1] + 2);
 					pNewBssDescr->WscIeLen = pbIe[1] + 2;
@@ -2619,14 +2619,14 @@
 
 	/* BSS is capable of doing pre-authentication */
 #ifdef FEATURE_WLAN_DIAG_SUPPORT_CSR
-	cdf_mem_set(&secEvent, sizeof(host_event_wlan_security_payload_type),
+	qdf_mem_set(&secEvent, sizeof(host_event_wlan_security_payload_type),
 		    0);
 	secEvent.eventId = WLAN_SECURITY_EVENT_PMKID_CANDIDATE_FOUND;
 	secEvent.encryptionModeMulticast = (uint8_t)diag_enc_type_from_csr_type(
 				pSession->connectedProfile.mcEncryptionType);
 	secEvent.encryptionModeUnicast = (uint8_t)diag_enc_type_from_csr_type(
 				pSession->connectedProfile.EncryptionType);
-	cdf_mem_copy(secEvent.bssid, pSession->connectedProfile.bssid.bytes,
+	qdf_mem_copy(secEvent.bssid, pSession->connectedProfile.bssid.bytes,
 			QDF_MAC_ADDR_SIZE);
 	secEvent.authMode = (uint8_t)diag_auth_type_from_csr_type(
 				pSession->connectedProfile.AuthType);
@@ -2635,7 +2635,7 @@
 
 	pmkid_info = &pSession->PmkidCandidateInfo[pSession->NumPmkidCandidate];
 	/* if yes, then add to PMKIDCandidateList */
-	cdf_mem_copy(pmkid_info->BSSID.bytes, pBssDesc->bssId,
+	qdf_mem_copy(pmkid_info->BSSID.bytes, pBssDesc->bssId,
 			QDF_MAC_ADDR_SIZE);
 	/* Bit 0 offirst byte - PreAuthentication Capability */
 	if ((pIes->RSN.RSN_Cap[0] >> 0) & 0x1)
@@ -2668,7 +2668,7 @@
 
 	if (!CSR_IS_SESSION_VALID(pMac, sessionId)) {
 		if (!pIes)
-			cdf_mem_free(pIesLocal);
+			qdf_mem_free(pIesLocal);
 		return status;
 	}
 
@@ -2689,7 +2689,7 @@
 	}
 
 	if (!pIes)
-		cdf_mem_free(pIesLocal);
+		qdf_mem_free(pIesLocal);
 
 	return status;
 }
@@ -2717,7 +2717,7 @@
 			if (pSession->NumBkidCandidate < CSR_MAX_BKID_ALLOWED) {
 
 				/* if yes, then add to BKIDCandidateList */
-				cdf_mem_copy(pSession->
+				qdf_mem_copy(pSession->
 					     BkidCandidateInfo[pSession->
 							       NumBkidCandidate].
 					     BSSID.bytes, pBssDesc->bssId,
@@ -2779,7 +2779,7 @@
 		}
 	}
 	if (!pIes)
-		cdf_mem_free(pIesLocal);
+		qdf_mem_free(pIesLocal);
 	return fRC;
 }
 
@@ -2828,7 +2828,7 @@
 		if (CSR_SCAN_IS_OVER_BSS_LIMIT(mac_ctx)) {
 			sms_log(mac_ctx, LOGW, FL("BSS limit reached"));
 			if ((bss_dscp->Result.pvIes == NULL) && local_ie)
-				cdf_mem_free(local_ie);
+				qdf_mem_free(local_ie);
 			csr_free_scan_result_entry(mac_ctx, bss_dscp);
 			/* Continue because there may be duplicated BSS */
 			continue;
@@ -2885,7 +2885,7 @@
 		/* append to main list */
 		csr_scan_add_result(mac_ctx, bss_dscp, local_ie, session_id);
 		if ((bss_dscp->Result.pvIes == NULL) && local_ie)
-			cdf_mem_free(local_ie);
+			qdf_mem_free(local_ie);
 	} /* end of loop */
 }
 
@@ -2935,9 +2935,9 @@
 
 	cbAllocated = sizeof(tCsrScanResult) + cbBSSDesc;
 
-	pCsrBssDescription = cdf_mem_malloc(cbAllocated);
+	pCsrBssDescription = qdf_mem_malloc(cbAllocated);
 	if (NULL != pCsrBssDescription) {
-		cdf_mem_set(pCsrBssDescription, cbAllocated, 0);
+		qdf_mem_set(pCsrBssDescription, cbAllocated, 0);
 		pCsrBssDescription->AgingCount =
 			(int32_t) pMac->roam.configParam.agingCount;
 		sms_log(pMac, LOGW,
@@ -2945,7 +2945,7 @@
 			pCsrBssDescription->AgingCount,
 			MAC_ADDR_ARRAY(pCsrBssDescription->Result.BssDescriptor.
 				       bssId));
-		cdf_mem_copy(&pCsrBssDescription->Result.BssDescriptor,
+		qdf_mem_copy(&pCsrBssDescription->Result.BssDescriptor,
 			     pBSSDescription, cbBSSDesc);
 #if defined(CDF_ENSBALED)
 		if (NULL != pCsrBssDescription->Result.pvIes) {
@@ -3019,7 +3019,7 @@
 					    LL_ACCESS_NOLOCK)) != NULL) {
 		pChannelSet = GET_BASE_ADDR(pEntry, tCsrChannelPowerInfo, link);
 		if (pChannelSet)
-			cdf_mem_free(pChannelSet);
+			qdf_mem_free(pChannelSet);
 	}
 	csr_ll_unlock(pChannelList);
 	return;
@@ -3043,12 +3043,12 @@
 	pChannelInfo = channelTable;
 	/* atleast 3 bytes have to be remaining  -- from "countryString" */
 	while (i--) {
-		pChannelSet = cdf_mem_malloc(sizeof(tCsrChannelPowerInfo));
+		pChannelSet = qdf_mem_malloc(sizeof(tCsrChannelPowerInfo));
 		if (NULL == pChannelSet) {
 			pChannelInfo++;
 			continue;
 		}
-		cdf_mem_set(pChannelSet, sizeof(tCsrChannelPowerInfo), 0);
+		qdf_mem_set(pChannelSet, sizeof(tCsrChannelPowerInfo), 0);
 		pChannelSet->firstChannel = pChannelInfo->firstChanNum;
 		pChannelSet->numChannels = pChannelInfo->numChannels;
 		/*
@@ -3071,7 +3071,7 @@
 			sms_log(pMac, LOGW,
 				FL("Invalid Channel %d Present in Country IE"),
 				pChannelSet->firstChannel);
-			cdf_mem_free(pChannelSet);
+			qdf_mem_free(pChannelSet);
 			return QDF_STATUS_E_FAILURE;
 		}
 		pChannelSet->txPower = QDF_MIN(pChannelInfo->maxTxPower,
@@ -3094,7 +3094,7 @@
 				sms_log(pMac, LOGW,
 					FL("Adding 11B/G ch in 11A. 1st ch %d"),
 					pChannelSet->firstChannel);
-				cdf_mem_free(pChannelSet);
+				qdf_mem_free(pChannelSet);
 			}
 		} else {
 			/* 5GHz info found */
@@ -3115,7 +3115,7 @@
 				sms_log(pMac, LOGW,
 					FL("Adding 11A ch in B/G. 1st ch %d"),
 					pChannelSet->firstChannel);
-				cdf_mem_free(pChannelSet);
+				qdf_mem_free(pChannelSet);
 			}
 		}
 		pChannelInfo++; /* move to next entry */
@@ -3129,9 +3129,9 @@
 	uint16_t msgLen;
 
 	msgLen = (uint16_t) (sizeof(tSirMbMsg));
-	pMsg = cdf_mem_malloc(msgLen);
+	pMsg = qdf_mem_malloc(msgLen);
 	if (NULL != pMsg) {
-		cdf_mem_set((void *)pMsg, msgLen, 0);
+		qdf_mem_set((void *)pMsg, msgLen, 0);
 		pMsg->type = eWNI_SME_CLEAR_DFS_CHANNEL_LIST;
 		pMsg->msgLen = msgLen;
 		cds_send_mb_message_to_mac(pMsg);
@@ -3194,10 +3194,10 @@
 		return;
 
 	p11dLog->eventId = WLAN_80211D_EVENT_RESET;
-	cdf_mem_copy(p11dLog->countryCode, pMac->scan.countryCodeCurrent, 3);
+	qdf_mem_copy(p11dLog->countryCode, pMac->scan.countryCodeCurrent, 3);
 	p11dLog->numChannel = pMac->scan.base_channels.numChannels;
 	if (p11dLog->numChannel <= HOST_LOG_MAX_NUM_CHANNEL) {
-		cdf_mem_copy(p11dLog->Channels,
+		qdf_mem_copy(p11dLog->Channels,
 			     pMac->scan.base_channels.channelList,
 			     p11dLog->numChannel);
 		for (Index = 0;
@@ -3238,13 +3238,13 @@
 	csr_apply_channel_power_info_to_fw(pMac,
 		&pMac->scan.base_channels, pMac->scan.countryCodeCurrent);
 	/* clear the 11d channel list */
-	cdf_mem_set(&pMac->scan.channels11d, sizeof(pMac->scan.channels11d), 0);
+	qdf_mem_set(&pMac->scan.channels11d, sizeof(pMac->scan.channels11d), 0);
 }
 
 void csr_clear_votes_for_country_info(tpAniSirGlobal pMac)
 {
 	pMac->scan.countryCodeCount = 0;
-	cdf_mem_set(pMac->scan.votes11d,
+	qdf_mem_set(pMac->scan.votes11d,
 		    sizeof(tCsrVotes11d) * CSR_MAX_NUM_COUNTRY_CODE, 0);
 }
 
@@ -3286,7 +3286,7 @@
 	}
 
 	for (i = 0; i < pMac->scan.countryCodeCount; i++) {
-		match = (cdf_mem_compare(pMac->scan.votes11d[i].countryCode,
+		match = (!qdf_mem_cmp(pMac->scan.votes11d[i].countryCode,
 					 pCountryCode, 2));
 		if (match) {
 			break;
@@ -3296,7 +3296,7 @@
 	if (match) {
 		pMac->scan.votes11d[i].votes++;
 	} else {
-		cdf_mem_copy(pMac->scan.votes11d[pMac->scan.countryCodeCount].
+		qdf_mem_copy(pMac->scan.votes11d[pMac->scan.countryCodeCount].
 			     countryCode, pCountryCode, 3);
 		pMac->scan.votes11d[pMac->scan.countryCodeCount].votes = 1;
 		pMac->scan.countryCodeCount++;
@@ -3335,10 +3335,10 @@
 
 	}
 	if (fRet) {
-		cdf_mem_copy(pMac->scan.countryCodeElected,
+		qdf_mem_copy(pMac->scan.countryCodeElected,
 		       pMac->scan.votes11d[j].countryCode,
 		       WNI_CFG_COUNTRY_CODE_LEN);
-		cdf_mem_copy(pMac->scan.countryCode11d,
+		qdf_mem_copy(pMac->scan.countryCode11d,
 		       pMac->scan.votes11d[j].countryCode,
 		       WNI_CFG_COUNTRY_CODE_LEN);
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_INFO,
@@ -3370,7 +3370,7 @@
 							     &domainId,
 							     SOURCE_USERSPACE);
 		if (QDF_IS_STATUS_SUCCESS(status)) {
-			cdf_mem_copy(pMac->scan.countryCodeCurrent,
+			qdf_mem_copy(pMac->scan.countryCodeCurrent,
 				     pCountry,
 				     WNI_CFG_COUNTRY_CODE_LEN);
 			csr_set_cfg_country_code(pMac, pCountry);
@@ -3421,12 +3421,12 @@
 		return;
 
 	p11dLog->eventId = WLAN_80211D_EVENT_COUNTRY_SET;
-	cdf_mem_copy(p11dLog->countryCode, mac_ctx->scan.countryCode11d, 3);
+	qdf_mem_copy(p11dLog->countryCode, mac_ctx->scan.countryCode11d, 3);
 	p11dLog->numChannel = mac_ctx->scan.channels11d.numChannels;
 	if (p11dLog->numChannel > HOST_LOG_MAX_NUM_CHANNEL)
 		goto diag_end;
 
-	cdf_mem_copy(p11dLog->Channels,
+	qdf_mem_copy(p11dLog->Channels,
 		     mac_ctx->scan.channels11d.channelList,
 		     p11dLog->numChannel);
 	csr_get_channel_power_info(mac_ctx,
@@ -3513,12 +3513,12 @@
 		pMac->scan.base_channels.numChannels :
 		WNI_CFG_VALID_CHANNEL_LIST_LEN;
 
-	chan_info = cdf_mem_malloc(sizeof(tSirMacChanInfo) *
+	chan_info = qdf_mem_malloc(sizeof(tSirMacChanInfo) *
 				   WNI_CFG_VALID_CHANNEL_LIST_LEN);
 	if (NULL == chan_info)
 		return;
 
-	cdf_mem_set(chan_info, sizeof(tSirMacChanInfo) *
+	qdf_mem_set(chan_info, sizeof(tSirMacChanInfo) *
 		    WNI_CFG_VALID_CHANNEL_LIST_LEN, 0);
 	ch_info_start = chan_info;
 	for (idx = 0; idx < max_ch_idx; idx++) {
@@ -3546,7 +3546,7 @@
 		csr_save_to_channel_power2_g_5_g(pMac,
 				count * sizeof(tSirMacChanInfo), ch_info_start);
 	}
-	cdf_mem_free(ch_info_start);
+	qdf_mem_free(ch_info_start);
 }
 
 bool csr_is_supported_channel(tpAniSirGlobal pMac, uint8_t channelId)
@@ -3618,13 +3618,13 @@
 	}
 
 	/* updating 11d Country Code with Country code selected. */
-	cdf_mem_copy(pMac->scan.countryCode11d, pCountryCodeSelected,
+	qdf_mem_copy(pMac->scan.countryCode11d, pCountryCodeSelected,
 		     WNI_CFG_COUNTRY_CODE_LEN);
 	fRet = true;
 free_ie:
 	if (!pIes && pIesLocal) {
 		/* locally allocated */
-		cdf_mem_free(pIesLocal);
+		qdf_mem_free(pIesLocal);
 	}
 	return fRet;
 }
@@ -3657,9 +3657,9 @@
 	}
 	if (pCommand->u.scanCmd.pToRoamProfile) {
 		csr_release_profile(pMac, pCommand->u.scanCmd.pToRoamProfile);
-		cdf_mem_free(pCommand->u.scanCmd.pToRoamProfile);
+		qdf_mem_free(pCommand->u.scanCmd.pToRoamProfile);
 	}
-	cdf_mem_set(&pCommand->u.scanCmd, sizeof(tScanCmd), 0);
+	qdf_mem_set(&pCommand->u.scanCmd, sizeof(tScanCmd), 0);
 }
 
 eCsrScanCompleteNextCommand csr_scan_get_next_command_state(tpAniSirGlobal pMac,
@@ -3800,15 +3800,15 @@
 				sms_log(pMac, LOGE, FL("fail to parse IEs"));
 				break;
 			}
-			cdf_mem_copy(pScanLog->bssid[n],
+			qdf_mem_copy(pScanLog->bssid[n],
 				pScanResult->BssDescriptor.bssId, 6);
 			if (pIes && pIes->SSID.present &&
 			    HOST_LOG_MAX_SSID_SIZE >= pIes->SSID.num_ssid) {
-				cdf_mem_copy(pScanLog->ssid[n],
+				qdf_mem_copy(pScanLog->ssid[n],
 					pIes->SSID.ssid,
 					pIes->SSID.num_ssid);
 			}
-			cdf_mem_free(pIes);
+			qdf_mem_free(pIes);
 			n++;
 		}
 		c++;
@@ -3846,7 +3846,7 @@
 	QDF_STATUS status;
 
 	save_cmd->u.scanCmd.pToRoamProfile =
-		cdf_mem_malloc(sizeof(tCsrRoamProfile));
+		qdf_mem_malloc(sizeof(tCsrRoamProfile));
 	if (!save_cmd->u.scanCmd.pToRoamProfile) {
 		sms_log(mac_ctx, LOGE, FL("pToRoamProfile mem fail"));
 		goto error;
@@ -3865,7 +3865,7 @@
 	save_cmd->u.scanCmd.u.scanRequest.SSIDs.numOfSSIDs =
 		command->u.scanCmd.u.scanRequest.SSIDs.numOfSSIDs;
 	save_cmd->u.scanCmd.u.scanRequest.SSIDs.SSIDList =
-		cdf_mem_malloc(
+		qdf_mem_malloc(
 			save_cmd->u.scanCmd.u.scanRequest.SSIDs.numOfSSIDs *
 			sizeof(tCsrSSIDInfo));
 	if (!save_cmd->u.scanCmd.u.scanRequest.SSIDs.SSIDList) {
@@ -3873,7 +3873,7 @@
 		goto error;
 	}
 
-	cdf_mem_copy(save_cmd->u.scanCmd.u.scanRequest.SSIDs.SSIDList,
+	qdf_mem_copy(save_cmd->u.scanCmd.u.scanRequest.SSIDs.SSIDList,
 			command->u.scanCmd.u.scanRequest.SSIDs.SSIDList,
 			save_cmd->u.scanCmd.u.scanRequest.SSIDs.numOfSSIDs *
 			sizeof(tCsrSSIDInfo));
@@ -3887,7 +3887,7 @@
 	bss_len = scan_result->Result.BssDescriptor.length +
 		sizeof(scan_result->Result.BssDescriptor.length);
 
-	temp = cdf_mem_malloc(sizeof(tCsrScanResult) + bss_len);
+	temp = qdf_mem_malloc(sizeof(tCsrScanResult) + bss_len);
 	if (!temp) {
 		sms_log(mac_ctx, LOGE, FL("bss mem fail"));
 		goto error;
@@ -3902,15 +3902,15 @@
 	/* pvIes is unsued in success/failure */
 	temp->Result.pvIes = NULL;
 
-	cdf_mem_copy(temp->Result.pvIes,
+	qdf_mem_copy(temp->Result.pvIes,
 			scan_result->Result.pvIes,
 			sizeof(*scan_result->Result.pvIes));
 	temp->Result.ssId.length = scan_result->Result.ssId.length;
-	cdf_mem_copy(temp->Result.ssId.ssId,
+	qdf_mem_copy(temp->Result.ssId.ssId,
 			scan_result->Result.ssId.ssId,
 			sizeof(scan_result->Result.ssId.ssId));
 	temp->Result.timer = scan_result->Result.timer;
-	cdf_mem_copy(&temp->Result.BssDescriptor,
+	qdf_mem_copy(&temp->Result.BssDescriptor,
 			&scan_result->Result.BssDescriptor,
 			sizeof(temp->Result.BssDescriptor));
 	temp->Link.last = temp->Link.next = NULL;
@@ -3921,11 +3921,11 @@
 	csr_scan_handle_search_for_ssid_failure(mac_ctx,
 			command);
 	if (save_cmd->u.roamCmd.pRoamBssEntry)
-		cdf_mem_free(save_cmd->u.roamCmd.pRoamBssEntry);
+		qdf_mem_free(save_cmd->u.roamCmd.pRoamBssEntry);
 	if (save_cmd->u.scanCmd.u.scanRequest.SSIDs.SSIDList)
-		cdf_mem_free(save_cmd->u.scanCmd.u.scanRequest.SSIDs.SSIDList);
+		qdf_mem_free(save_cmd->u.scanCmd.u.scanRequest.SSIDs.SSIDList);
 	if (save_cmd->u.scanCmd.pToRoamProfile)
-		cdf_mem_free(save_cmd->u.scanCmd.pToRoamProfile);
+		qdf_mem_free(save_cmd->u.scanCmd.pToRoamProfile);
 
 	return QDF_STATUS_E_FAILURE;
 }
@@ -4003,13 +4003,13 @@
 		sms_log(mac_ctx, LOG1, FL("chan: %d session: %d status: %d"),
 					chan, pCommand->sessionId, ret);
 		if (mac_ctx->sme.saved_scan_cmd) {
-			cdf_mem_free(mac_ctx->sme.saved_scan_cmd);
+			qdf_mem_free(mac_ctx->sme.saved_scan_cmd);
 			mac_ctx->sme.saved_scan_cmd = NULL;
 			sms_log(mac_ctx, LOGE,
 				FL("memory should have been free. Check!"));
 		}
 
-		save_cmd = (tSmeCmd *) cdf_mem_malloc(sizeof(*pCommand));
+		save_cmd = (tSmeCmd *) qdf_mem_malloc(sizeof(*pCommand));
 		if (!save_cmd) {
 			sms_log(mac_ctx, LOGE, FL("save_cmd mem fail"));
 			goto error;
@@ -4020,7 +4020,7 @@
 			/* csr_save_profile should report error */
 			sms_log(mac_ctx, LOGE, FL("profile save failed %d"),
 					status);
-			cdf_mem_free(save_cmd);
+			qdf_mem_free(save_cmd);
 			return;
 		}
 
@@ -4032,7 +4032,7 @@
 			csr_scan_handle_search_for_ssid_failure(mac_ctx,
 								pCommand);
 			if (mac_ctx->sme.saved_scan_cmd) {
-				cdf_mem_free(mac_ctx->sme.saved_scan_cmd);
+				qdf_mem_free(mac_ctx->sme.saved_scan_cmd);
 				mac_ctx->sme.saved_scan_cmd = NULL;
 			}
 		} else if ((QDF_STATUS_E_NOSUPPORT == ret) ||
@@ -4040,7 +4040,7 @@
 			sms_log(mac_ctx, LOGE, FL("conn update ret %d"), ret);
 			csr_scan_handle_search_for_ssid(mac_ctx, pCommand);
 			if (mac_ctx->sme.saved_scan_cmd) {
-				cdf_mem_free(mac_ctx->sme.saved_scan_cmd);
+				qdf_mem_free(mac_ctx->sme.saved_scan_cmd);
 				mac_ctx->sme.saved_scan_cmd = NULL;
 			}
 		}
@@ -4256,10 +4256,10 @@
 
 	sms_log(pMac, LOG4, FL("new BSS description, length %d, cbBSSDesc %d"),
 		cbAllocated, cbBSSDesc);
-	pCsrBssDescription = cdf_mem_malloc(cbAllocated);
+	pCsrBssDescription = qdf_mem_malloc(cbAllocated);
 	if (NULL != pCsrBssDescription) {
-		cdf_mem_set(pCsrBssDescription, cbAllocated, 0);
-		cdf_mem_copy(&pCsrBssDescription->Result.BssDescriptor,
+		qdf_mem_set(pCsrBssDescription, cbAllocated, 0);
+		qdf_mem_copy(&pCsrBssDescription->Result.BssDescriptor,
 			     pBSSDescription, cbBSSDesc);
 		pCsrBssDescription->AgingCount =
 			(int32_t) pMac->roam.configParam.agingCount;
@@ -4280,7 +4280,7 @@
 			pCsrBssDescription->Result.ssId.length = len;
 			pCsrBssDescription->Result.timer =
 				qdf_mc_timer_get_system_time();
-			cdf_mem_copy(pCsrBssDescription->Result.ssId.ssId,
+			qdf_mem_copy(pCsrBssDescription->Result.ssId.ssId,
 				     pIes->SSID.ssid, len);
 		}
 		csr_ll_insert_tail(&pMac->scan.tempScanResults,
@@ -4366,10 +4366,10 @@
 
 free_ies:
 	if (pIes1)
-		cdf_mem_free(pIes1);
+		qdf_mem_free(pIes1);
 	if ((NULL == pIes2) && pIesTemp)
 		/* locally allocated */
-		cdf_mem_free(pIesTemp);
+		qdf_mem_free(pIesTemp);
 	return fMatch;
 }
 
@@ -4466,7 +4466,7 @@
 		if (valid)
 			*ppIes = pIes;
 		else
-			cdf_mem_free(pIes);
+			qdf_mem_free(pIes);
 	}
 	return valid;
 }
@@ -4560,7 +4560,7 @@
 		csr_update_scantype(mac_ctx, ies, bssdescr->channelId);
 		/* Free the resource */
 		if (ies != NULL)
-			cdf_mem_free(ies);
+			qdf_mem_free(ies);
 	}
 	return QDF_STATUS_SUCCESS;
 }
@@ -4569,13 +4569,13 @@
 bool csr_scan_is_wild_card_scan(tpAniSirGlobal pMac, tSmeCmd *pCommand)
 {
 	uint8_t bssid[QDF_MAC_ADDR_SIZE] = {0};
-	bool f = cdf_mem_compare(pCommand->u.scanCmd.u.scanRequest.bssid.bytes,
+	bool f = qdf_mem_cmp(pCommand->u.scanCmd.u.scanRequest.bssid.bytes,
 				 bssid, sizeof(struct qdf_mac_addr));
 	/*
 	 * It is not a wild card scan if the bssid is not broadcast and
 	 * the number of SSID is 1.
 	 */
-	return (f || (0xff == pCommand->u.scanCmd.u.scanRequest.bssid.bytes[0]))
+	return ((!f) || (0xff == pCommand->u.scanCmd.u.scanRequest.bssid.bytes[0]))
 		&& (pCommand->u.scanCmd.u.scanRequest.SSIDs.numOfSSIDs != 1);
 }
 
@@ -4717,7 +4717,7 @@
 	pEntry = csr_ll_peek_head(&pResultList->List, LL_ACCESS_NOLOCK);
 	while (pEntry) {
 		pResult = GET_BASE_ADDR(pEntry, tCsrScanResult, Link);
-		if (cdf_mem_compare(bssid, pResult->Result.BssDescriptor.bssId,
+		if (!qdf_mem_cmp(bssid, pResult->Result.BssDescriptor.bssId,
 				    sizeof(struct qdf_mac_addr))) {
 			status = QDF_STATUS_SUCCESS;
 			csr_ll_remove_entry(&pResultList->List, pEntry,
@@ -4861,7 +4861,7 @@
 		 pScanReq->ChannelInfo.numOfChannels)) +
 		 (pScanReq->uIEFieldLen);
 
-	pMsg = cdf_mem_malloc(msgLen);
+	pMsg = qdf_mem_malloc(msgLen);
 	if (NULL == pMsg) {
 		sms_log(pMac, LOGE, FL("memory allocation failed"));
 		sms_log(pMac, LOG1, FL("Failed: SId: %d FirstMatch = %d"
@@ -4883,7 +4883,7 @@
 		return QDF_STATUS_E_NOMEM;
 	}
 
-	cdf_mem_set(pMsg, msgLen, 0);
+	qdf_mem_set(pMsg, msgLen, 0);
 	pMsg->messageType = eWNI_SME_SCAN_REQ;
 	pMsg->length = msgLen;
 	/* ToDO: Fill in session info when we need to do scan base on session */
@@ -4973,7 +4973,7 @@
 	if ((pScanReq->SSIDs.numOfSSIDs != 0)
 	    && (eSIR_PASSIVE_SCAN != scanType)) {
 		for (i = 0; i < pMsg->numSsid; i++) {
-			cdf_mem_copy(&pMsg->ssId[i],
+			qdf_mem_copy(&pMsg->ssId[i],
 				     &pScanReq->SSIDs.SSIDList[i].SSID,
 				     sizeof(tSirMacSSid));
 		}
@@ -5000,7 +5000,7 @@
 		(uint8_t) pScanReq->ChannelInfo.numOfChannels;
 	if (pScanReq->ChannelInfo.numOfChannels) {
 		/* Assuming the channelNumber is uint8_t (1 byte) */
-		cdf_mem_copy(pMsg->channelList.channelNumber,
+		qdf_mem_copy(pMsg->channelList.channelNumber,
 			     pScanReq->ChannelInfo.ChannelList,
 			     pScanReq->ChannelInfo.numOfChannels);
 	}
@@ -5011,7 +5011,7 @@
 			(sizeof(pMsg->channelList.channelNumber) *
 			 pScanReq->ChannelInfo.numOfChannels));
 	if (pScanReq->uIEFieldLen != 0) {
-		cdf_mem_copy((uint8_t *) pMsg + pMsg->uIEFieldOffset,
+		qdf_mem_copy((uint8_t *) pMsg + pMsg->uIEFieldOffset,
 			     pScanReq->pIEField, pScanReq->uIEFieldLen);
 	}
 	pMsg->p2pSearch = pScanReq->p2pSearch;
@@ -5037,7 +5037,7 @@
 		sms_log(pMac, LOGE,
 			FL("failed to send down scan req with status = %d"),
 			status);
-		cdf_mem_free(pMsg);
+		qdf_mem_free(pMsg);
 	}
 	return status;
 }
@@ -5051,11 +5051,11 @@
 	uint16_t msgLen;
 
 	msgLen = (uint16_t) (sizeof(tSirSmeScanReq));
-	pMsg = cdf_mem_malloc(msgLen);
+	pMsg = qdf_mem_malloc(msgLen);
 	if (NULL == pMsg)
 		return QDF_STATUS_E_NOMEM;
 
-	cdf_mem_set(pMsg, msgLen, 0);
+	qdf_mem_set(pMsg, msgLen, 0);
 	pMsg->messageType = eWNI_SME_SCAN_REQ;
 	pMsg->length = msgLen;
 	pMsg->sessionId = sessionId;
@@ -5104,7 +5104,7 @@
 	(uint8_t) pCommand->u.scanCmd.u.scanRequest.ChannelInfo.numOfChannels;
 	if (pScanLog->numChannel &&
 	    (pScanLog->numChannel < HOST_LOG_MAX_NUM_CHANNEL)) {
-		cdf_mem_copy(pScanLog->channels,
+		qdf_mem_copy(pScanLog->channels,
 		      pCommand->u.scanCmd.u.scanRequest.ChannelInfo.ChannelList,
 		      pScanLog->numChannel);
 	}
@@ -5164,7 +5164,7 @@
 	    && (NULL != cmd->u.scanCmd.u.scanRequest.ChannelInfo.ChannelList)) {
 		len = cmd->u.scanCmd.u.scanRequest.ChannelInfo.numOfChannels;
 		/* allocate twice the channel */
-		new_ch_info.ChannelList = (uint8_t *) cdf_mem_malloc(len * 2);
+		new_ch_info.ChannelList = (uint8_t *) qdf_mem_malloc(len * 2);
 		ch_lst = cmd->u.scanCmd.u.scanRequest.ChannelInfo.ChannelList;
 	} else {
 		/* get the valid channel list to scan all. */
@@ -5174,7 +5174,7 @@
 		if (QDF_IS_STATUS_SUCCESS(status)) {
 			/* allocate twice the channel */
 			new_ch_info.ChannelList =
-				(uint8_t *) cdf_mem_malloc(len * 2);
+				(uint8_t *) qdf_mem_malloc(len * 2);
 			ch_lst = mac_ctx->roam.validChannelList;
 		}
 	}
@@ -5193,7 +5193,7 @@
 			 * ch_lst points to the channellist from the command,
 			 * free it.
 			 */
-			cdf_mem_free(
+			qdf_mem_free(
 			  cmd->u.scanCmd.u.scanRequest.ChannelInfo.ChannelList);
 			cmd->u.scanCmd.u.scanRequest.ChannelInfo.ChannelList =
 			  NULL;
@@ -5333,7 +5333,7 @@
 					dst_req->ChannelInfo.numOfChannels) ?
 					dst_req->ChannelInfo.numOfChannels :
 					WNI_CFG_VALID_CHANNEL_LIST_LEN;
-		cdf_mem_copy(valid_chnl_list, dst_req->ChannelInfo.ChannelList,
+		qdf_mem_copy(valid_chnl_list, dst_req->ChannelInfo.ChannelList,
 				valid_chnl_len);
 	}
 	for (i = 0; i < valid_chnl_len; i++) {
@@ -5362,13 +5362,13 @@
 	}
 
 	if (dst_req->ChannelInfo.ChannelList) {
-		cdf_mem_free(dst_req->ChannelInfo.ChannelList);
+		qdf_mem_free(dst_req->ChannelInfo.ChannelList);
 		dst_req->ChannelInfo.ChannelList = NULL;
 		dst_req->ChannelInfo.numOfChannels = 0;
 	}
 
 	dst_req->ChannelInfo.ChannelList =
-			cdf_mem_malloc(filter_chnl_len *
+			qdf_mem_malloc(filter_chnl_len *
 				sizeof(*dst_req->ChannelInfo.ChannelList));
 	dst_req->ChannelInfo.numOfChannels = filter_chnl_len;
 	if (NULL == dst_req->ChannelInfo.ChannelList) {
@@ -5376,7 +5376,7 @@
 			FL("Memory allocation failed"));
 		return false;
 	}
-	cdf_mem_copy(dst_req->ChannelInfo.ChannelList, valid_chnl_list,
+	qdf_mem_copy(dst_req->ChannelInfo.ChannelList, valid_chnl_list,
 			filter_chnl_len);
 	return true;
 }
@@ -5409,7 +5409,7 @@
 	status = csr_scan_free_request(mac_ctx, dst_req);
 	if (!QDF_IS_STATUS_SUCCESS(status))
 		goto complete;
-	cdf_mem_copy(dst_req, src_req, sizeof(tCsrScanRequest));
+	qdf_mem_copy(dst_req, src_req, sizeof(tCsrScanRequest));
 	/* Re-initialize the pointers to NULL since we did a copy */
 	dst_req->pIEField = NULL;
 	dst_req->ChannelInfo.ChannelList = NULL;
@@ -5417,7 +5417,7 @@
 
 	if (src_req->uIEFieldLen) {
 		dst_req->pIEField =
-			cdf_mem_malloc(src_req->uIEFieldLen);
+			qdf_mem_malloc(src_req->uIEFieldLen);
 		if (NULL == dst_req->pIEField) {
 			status = QDF_STATUS_E_NOMEM;
 			sms_log(mac_ctx, LOGE,
@@ -5425,7 +5425,7 @@
 			goto complete;
 		} else {
 			status = QDF_STATUS_SUCCESS;
-			cdf_mem_copy(dst_req->pIEField, src_req->pIEField,
+			qdf_mem_copy(dst_req->pIEField, src_req->pIEField,
 				src_req->uIEFieldLen);
 			dst_req->uIEFieldLen = src_req->uIEFieldLen;
 		}
@@ -5437,7 +5437,7 @@
 		dst_req->ChannelInfo.numOfChannels = 0;
 	} else {
 		dst_req->ChannelInfo.ChannelList =
-			cdf_mem_malloc(src_req->ChannelInfo.numOfChannels *
+			qdf_mem_malloc(src_req->ChannelInfo.numOfChannels *
 				sizeof(*dst_req->ChannelInfo.ChannelList));
 		if (NULL == dst_req->ChannelInfo.ChannelList) {
 			status = QDF_STATUS_E_NOMEM;
@@ -5524,7 +5524,7 @@
 		dst_req->SSIDs.SSIDList = NULL;
 	} else {
 		dst_req->SSIDs.SSIDList =
-			cdf_mem_malloc(src_req->SSIDs.numOfSSIDs *
+			qdf_mem_malloc(src_req->SSIDs.numOfSSIDs *
 					sizeof(*dst_req->SSIDs.SSIDList));
 		if (NULL == dst_req->SSIDs.SSIDList)
 			status = QDF_STATUS_E_NOMEM;
@@ -5533,7 +5533,7 @@
 		if (QDF_IS_STATUS_SUCCESS(status)) {
 			dst_req->SSIDs.numOfSSIDs =
 				src_req->SSIDs.numOfSSIDs;
-			cdf_mem_copy(dst_req->SSIDs.SSIDList,
+			qdf_mem_copy(dst_req->SSIDs.SSIDList,
 				src_req->SSIDs.SSIDList,
 				src_req->SSIDs.numOfSSIDs *
 				sizeof(*dst_req->SSIDs.SSIDList));
@@ -5562,17 +5562,17 @@
 {
 
 	if (pReq->ChannelInfo.ChannelList) {
-		cdf_mem_free(pReq->ChannelInfo.ChannelList);
+		qdf_mem_free(pReq->ChannelInfo.ChannelList);
 		pReq->ChannelInfo.ChannelList = NULL;
 	}
 	pReq->ChannelInfo.numOfChannels = 0;
 	if (pReq->pIEField) {
-		cdf_mem_free(pReq->pIEField);
+		qdf_mem_free(pReq->pIEField);
 		pReq->pIEField = NULL;
 	}
 	pReq->uIEFieldLen = 0;
 	if (pReq->SSIDs.SSIDList) {
-		cdf_mem_free(pReq->SSIDs.SSIDList);
+		qdf_mem_free(pReq->SSIDs.SSIDList);
 		pReq->SSIDs.SSIDList = NULL;
 	}
 	pReq->SSIDs.numOfSSIDs = 0;
@@ -5674,7 +5674,7 @@
 		(csr_is_concurrent_infra_connected(mac_ctx)) &&
 		(scan_cmd->u.scanCmd.u.scanRequest.p2pSearch != 1)) ||
 		(csr_is_p2p_session_connected(mac_ctx)))) {
-			cdf_mem_set(&scan_req, sizeof(tCsrScanRequest), 0);
+			qdf_mem_set(&scan_req, sizeof(tCsrScanRequest), 0);
 
 		/* optimize this to use 2 command buffer only */
 		send_scancmd = csr_get_command_buffer(mac_ctx);
@@ -5706,12 +5706,12 @@
 		 * to be modified for split scan
 		 */
 		if (scan_req.ChannelInfo.ChannelList != NULL) {
-				cdf_mem_free(scan_req.ChannelInfo.ChannelList);
+				qdf_mem_free(scan_req.ChannelInfo.ChannelList);
 			scan_req.ChannelInfo.ChannelList = NULL;
 		}
 
 		chn_info->numOfChannels = numchan_combinedconc;
-		cdf_mem_copy(&channel_to_scan[0],
+		qdf_mem_copy(&channel_to_scan[0],
 				&scan_cmd->u.scanCmd.u.scanRequest.ChannelInfo.
 				ChannelList[0], chn_info->numOfChannels
 				* sizeof(uint8_t));
@@ -5848,7 +5848,7 @@
 	tDblLinkList localList;
 	tDblLinkList *pCmdList;
 
-	cdf_mem_zero(&localList, sizeof(tDblLinkList));
+	qdf_mem_zero(&localList, sizeof(tDblLinkList));
 	if (!QDF_IS_STATUS_SUCCESS(csr_ll_open(pMac->hHdd, &localList))) {
 		sms_log(pMac, LOGE, FL(" failed to open list"));
 		return fRet;
@@ -5946,23 +5946,23 @@
 		return status;
 
 	*pNumItems = 0;
-	pScanFilter = cdf_mem_malloc(sizeof(tCsrScanResultFilter));
+	pScanFilter = qdf_mem_malloc(sizeof(tCsrScanResultFilter));
 	if (NULL == pScanFilter)
 		return QDF_STATUS_E_NOMEM;
 
-	cdf_mem_set(pScanFilter, sizeof(tCsrScanResultFilter), 0);
+	qdf_mem_set(pScanFilter, sizeof(tCsrScanResultFilter), 0);
 	/* Here is the profile we need to connect to */
 	status = csr_roam_prepare_filter_from_profile(pMac,
 					pSession->pCurRoamProfile, pScanFilter);
 	if (!QDF_IS_STATUS_SUCCESS(status)) {
-		cdf_mem_free(pScanFilter);
+		qdf_mem_free(pScanFilter);
 		return status;
 	}
 
 	status = csr_scan_get_result(pMac, pScanFilter, &hBSSList);
 	if (!QDF_IS_STATUS_SUCCESS(status)) {
 		csr_free_scan_filter(pMac, pScanFilter);
-		cdf_mem_free(pScanFilter);
+		qdf_mem_free(pScanFilter);
 		return status;
 	}
 
@@ -5980,14 +5980,14 @@
 
 	if (pSession->NumPmkidCandidate) {
 		*pNumItems = pSession->NumPmkidCandidate;
-		cdf_mem_copy(pPmkidList, pSession->PmkidCandidateInfo,
+		qdf_mem_copy(pPmkidList, pSession->PmkidCandidateInfo,
 			     pSession->NumPmkidCandidate *
 			     sizeof(tPmkidCandidateInfo));
 	}
 
 	csr_scan_result_purge(pMac, hBSSList);
 	csr_free_scan_filter(pMac, pScanFilter);
-	cdf_mem_free(pScanFilter);
+	qdf_mem_free(pScanFilter);
 	return status;
 }
 
@@ -6017,23 +6017,23 @@
 		return status;
 
 	*pNumItems = 0;
-	pScanFilter = cdf_mem_malloc(sizeof(tCsrScanResultFilter));
+	pScanFilter = qdf_mem_malloc(sizeof(tCsrScanResultFilter));
 	if (NULL == pScanFilter)
 		return QDF_STATUS_E_NOMEM;
 
-	cdf_mem_set(pScanFilter, sizeof(tCsrScanResultFilter), 0);
+	qdf_mem_set(pScanFilter, sizeof(tCsrScanResultFilter), 0);
 	/* Here is the profile we need to connect to */
 	status = csr_roam_prepare_filter_from_profile(pMac,
 					pSession->pCurRoamProfile, pScanFilter);
 	if (!QDF_IS_STATUS_SUCCESS(status)) {
-		cdf_mem_free(pScanFilter);
+		qdf_mem_free(pScanFilter);
 		return status;
 	}
 
 	status = csr_scan_get_result(pMac, pScanFilter, &hBSSList);
 	if (!QDF_IS_STATUS_SUCCESS(status)) {
 		csr_free_scan_filter(pMac, pScanFilter);
-		cdf_mem_free(pScanFilter);
+		qdf_mem_free(pScanFilter);
 		return status;
 	}
 
@@ -6050,14 +6050,14 @@
 
 	if (pSession->NumBkidCandidate) {
 		*pNumItems = pSession->NumBkidCandidate;
-		cdf_mem_copy(pBkidList, pSession->BkidCandidateInfo,
+		qdf_mem_copy(pBkidList, pSession->BkidCandidateInfo,
 			     pSession->NumBkidCandidate *
 			     sizeof(tBkidCandidateInfo));
 	}
 
 	csr_scan_result_purge(pMac, hBSSList);
 	csr_free_scan_filter(pMac, pScanFilter);
-	cdf_mem_free(pScanFilter);
+	qdf_mem_free(pScanFilter);
 	return status;
 }
 #endif /* FEATURE_WLAN_WAPI */
@@ -6137,9 +6137,9 @@
 		goto error;
 	}
 
-	cdf_mem_set(&scan_cmd->u.scanCmd, sizeof(tScanCmd), 0);
+	qdf_mem_set(&scan_cmd->u.scanCmd, sizeof(tScanCmd), 0);
 	scan_cmd->u.scanCmd.pToRoamProfile =
-			cdf_mem_malloc(sizeof(tCsrRoamProfile));
+			qdf_mem_malloc(sizeof(tCsrRoamProfile));
 
 	if (NULL == scan_cmd->u.scanCmd.pToRoamProfile)
 		status = QDF_STATUS_E_NOMEM;
@@ -6160,7 +6160,7 @@
 
 	/* let it wrap around */
 	wma_get_scan_id(&scan_cmd->u.scanCmd.scanID);
-	cdf_mem_set(&scan_cmd->u.scanCmd.u.scanRequest,
+	qdf_mem_set(&scan_cmd->u.scanCmd.u.scanRequest,
 			sizeof(tCsrScanRequest), 0);
 	status = qdf_mc_timer_init(&scan_cmd->u.scanCmd.csr_scan_timer,
 			QDF_TIMER_TYPE_SW,
@@ -6179,18 +6179,18 @@
 	/* Allocate memory for IE field */
 	if (profile->pAddIEScan) {
 		scan_req->pIEField =
-			cdf_mem_malloc(profile->nAddIEScanLength);
+			qdf_mem_malloc(profile->nAddIEScanLength);
 
 		if (NULL == scan_req->pIEField)
 			status = QDF_STATUS_E_NOMEM;
 		else
 			status = QDF_STATUS_SUCCESS;
 
-		cdf_mem_set(scan_req->pIEField,
+		qdf_mem_set(scan_req->pIEField,
 				profile->nAddIEScanLength, 0);
 
 		if (QDF_IS_STATUS_SUCCESS(status)) {
-			cdf_mem_copy(scan_req->pIEField,
+			qdf_mem_copy(scan_req->pIEField,
 					profile->pAddIEScan,
 					profile->nAddIEScanLength);
 			scan_req->uIEFieldLen = profile->nAddIEScanLength;
@@ -6235,7 +6235,7 @@
 
 	if (profile->ChannelInfo.numOfChannels) {
 		scan_req->ChannelInfo.ChannelList =
-		    cdf_mem_malloc(sizeof(*scan_req->ChannelInfo.ChannelList) *
+		    qdf_mem_malloc(sizeof(*scan_req->ChannelInfo.ChannelList) *
 					profile->ChannelInfo.numOfChannels);
 
 		if (NULL == scan_req->ChannelInfo.ChannelList)
@@ -6259,7 +6259,7 @@
 
 	if (profile->SSIDs.numOfSSIDs) {
 		scan_req->SSIDs.SSIDList =
-			cdf_mem_malloc(profile->SSIDs.numOfSSIDs *
+			qdf_mem_malloc(profile->SSIDs.numOfSSIDs *
 					sizeof(tCsrSSIDInfo));
 
 		if (NULL == scan_req->SSIDs.SSIDList)
@@ -6273,7 +6273,7 @@
 		ssids = &scan_req->SSIDs;
 		ssids->numOfSSIDs =  1;
 
-		cdf_mem_copy(scan_req->SSIDs.SSIDList,
+		qdf_mem_copy(scan_req->SSIDs.SSIDList,
 				profile->SSIDs.SSIDList,
 				sizeof(tCsrSSIDInfo));
 	}
@@ -6338,11 +6338,11 @@
 
 	/* allocate maximum space for all channels */
 	dataLen = WNI_CFG_VALID_CHANNEL_LIST_LEN * sizeof(tSirMacChanInfo);
-	pBuf = cdf_mem_malloc(dataLen);
+	pBuf = qdf_mem_malloc(dataLen);
 	if (pBuf == NULL)
 		return;
 
-	cdf_mem_set(pBuf, dataLen, 0);
+	qdf_mem_set(pBuf, dataLen, 0);
 	ch_pwr_set = (tSirMacChanInfo *) (pBuf);
 	pEntry = csr_ll_peek_head(pList, LL_ACCESS_LOCK);
 	/*
@@ -6418,7 +6418,7 @@
 	if (cbLen)
 		cfg_set_str(pMac, cfgId, (uint8_t *) pBuf, cbLen);
 
-	cdf_mem_free(pBuf);
+	qdf_mem_free(pBuf);
 }
 
 void csr_set_cfg_country_code(tpAniSirGlobal pMac, uint8_t *countryCode)
@@ -6427,7 +6427,7 @@
 	/* v_REGDOMAIN_t DomainId */
 
 	sms_log(pMac, LOG3, FL("Setting Country Code in Cfg %s"), countryCode);
-	cdf_mem_copy(cc, countryCode, WNI_CFG_COUNTRY_CODE_LEN);
+	qdf_mem_copy(cc, countryCode, WNI_CFG_COUNTRY_CODE_LEN);
 
 	/*
 	* don't program the bogus country codes that we created for Korea in the
@@ -6482,9 +6482,9 @@
 	uint8_t *pControlList = NULL;
 	uint32_t len = WNI_CFG_SCAN_CONTROL_LIST_LEN;
 
-	pControlList = cdf_mem_malloc(WNI_CFG_SCAN_CONTROL_LIST_LEN);
+	pControlList = qdf_mem_malloc(WNI_CFG_SCAN_CONTROL_LIST_LEN);
 	if (pControlList != NULL) {
-		cdf_mem_set((void *)pControlList, WNI_CFG_SCAN_CONTROL_LIST_LEN,
+		qdf_mem_set((void *)pControlList, WNI_CFG_SCAN_CONTROL_LIST_LEN,
 			    0);
 		if (IS_SIR_STATUS_SUCCESS(wlan_cfg_get_str(pMac,
 					WNI_CFG_SCAN_CONTROL_LIST,
@@ -6516,7 +6516,7 @@
 			cfg_set_str(pMac, WNI_CFG_SCAN_CONTROL_LIST,
 					pControlList, len);
 		} /* Successfully getting scan control list */
-		cdf_mem_free(pControlList);
+		qdf_mem_free(pControlList);
 	} /* AllocateMemory */
 }
 
@@ -6547,7 +6547,7 @@
 	tSmeCmd *pCommand;
 	tListElem *pEntryToRemove;
 
-	cdf_mem_zero(&localList, sizeof(tDblLinkList));
+	qdf_mem_zero(&localList, sizeof(tDblLinkList));
 	if (!QDF_IS_STATUS_SUCCESS(csr_ll_open(pMac->hHdd, &localList))) {
 		sms_log(pMac, LOGE, FL("failed to open list"));
 		return;
@@ -6597,7 +6597,7 @@
 	tSmeCmd *pCommand;
 	tListElem *pEntryToRemove;
 
-	cdf_mem_zero(&localList, sizeof(tDblLinkList));
+	qdf_mem_zero(&localList, sizeof(tDblLinkList));
 	if (!QDF_IS_STATUS_SUCCESS(csr_ll_open(pMac->hHdd, &localList))) {
 		sms_log(pMac, LOGE, FL(" failed to open list"));
 		return;
@@ -6655,7 +6655,7 @@
 	tSmeCmd *pCommand;
 	tListElem *pEntryToRemove;
 
-	cdf_mem_zero(&localList, sizeof(tDblLinkList));
+	qdf_mem_zero(&localList, sizeof(tDblLinkList));
 	if (!QDF_IS_STATUS_SUCCESS(csr_ll_open(pMac->hHdd, &localList))) {
 		sms_log(pMac, LOGE, FL(" failed to open list"));
 		return;
@@ -6712,13 +6712,13 @@
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
 
 	msg_len = (uint16_t)(sizeof(tSirSmeScanAbortReq));
-	msg = cdf_mem_malloc(msg_len);
+	msg = qdf_mem_malloc(msg_len);
 	if (NULL == msg) {
 		sms_log(mac_ctx, LOGE,
 			FL("Failed to alloc memory for SmeScanAbortReq"));
 		return;
 	}
-	cdf_mem_zero((void *)msg, msg_len);
+	qdf_mem_zero((void *)msg, msg_len);
 	msg->type = eWNI_SME_SCAN_ABORT_IND;
 	msg->msgLen = msg_len;
 	msg->sessionId = session_id;
@@ -6728,7 +6728,7 @@
 		scan_id, session_id);
 	status = cds_send_mb_message_to_mac(msg);
 	if (!QDF_IS_STATUS_SUCCESS(status)) {
-		cdf_mem_free(msg);
+		qdf_mem_free(msg);
 		sms_log(mac_ctx, LOGE,
 			FL("Failed to send abort scan.scan_id %d session %d"),
 			scan_id, session_id);
@@ -6833,7 +6833,7 @@
 	tpSirMacMgmtHdr macHeader =
 		(tpSirMacMgmtHdr) pPrefNetworkFoundInd->data;
 	parsed_frm =
-	    (tpSirProbeRespBeacon) cdf_mem_malloc(sizeof(tSirProbeRespBeacon));
+	    (tpSirProbeRespBeacon) qdf_mem_malloc(sizeof(tSirProbeRespBeacon));
 
 	if (NULL == parsed_frm) {
 		sms_log(pMac, LOGE, FL("fail to allocate memory for frame"));
@@ -6843,7 +6843,7 @@
 		sms_log(pMac, LOGE,
 			FL("Incorrect len(%d)"),
 			pPrefNetworkFoundInd->frameLength);
-		cdf_mem_free(parsed_frm);
+		qdf_mem_free(parsed_frm);
 		return QDF_STATUS_E_FAILURE;
 	}
 	if (sir_convert_probe_frame2_struct(pMac,
@@ -6853,7 +6853,7 @@
 	    || !parsed_frm->ssidPresent) {
 		sms_log(pMac, LOGE, FL("Parse error ProbeResponse, length=%d"),
 			pPrefNetworkFoundInd->frameLength);
-		cdf_mem_free(parsed_frm);
+		qdf_mem_free(parsed_frm);
 		return QDF_STATUS_E_FAILURE;
 	}
 	/* 24 byte MAC header and 12 byte to ssid IE */
@@ -6862,13 +6862,13 @@
 		uLen = pPrefNetworkFoundInd->frameLength -
 		       (SIR_MAC_HDR_LEN_3A + SIR_MAC_B_PR_SSID_OFFSET);
 	}
-	pScanResult = cdf_mem_malloc(sizeof(tCsrScanResult) + uLen);
+	pScanResult = qdf_mem_malloc(sizeof(tCsrScanResult) + uLen);
 	if (NULL == pScanResult) {
 		sms_log(pMac, LOGE, FL("fail to allocate memory for frame"));
-		cdf_mem_free(parsed_frm);
+		qdf_mem_free(parsed_frm);
 		return QDF_STATUS_E_NOMEM;
 	}
-	cdf_mem_set(pScanResult, sizeof(tCsrScanResult) + uLen, 0);
+	qdf_mem_set(pScanResult, sizeof(tCsrScanResult) + uLen, 0);
 	pBssDescr = &pScanResult->Result.BssDescriptor;
 	/*
 	 * Length of BSS desription is without length of length itself and
@@ -6912,7 +6912,7 @@
 	pBssDescr->timeStamp[0] = parsed_frm->timeStamp[0];
 	pBssDescr->timeStamp[1] = parsed_frm->timeStamp[1];
 	pBssDescr->capabilityInfo = *((uint16_t *)&parsed_frm->capabilityInfo);
-	cdf_mem_copy((uint8_t *) &pBssDescr->bssId,
+	qdf_mem_copy((uint8_t *) &pBssDescr->bssId,
 		     (uint8_t *) macHeader->bssId, sizeof(tSirMacAddr));
 	pBssDescr->nReceivedTime = (uint32_t) qdf_mc_timer_get_system_ticks();
 	sms_log(pMac, LOG2, FL("Bssid= "MAC_ADDRESS_STR" chan= %d, rssi = %d"),
@@ -6920,7 +6920,7 @@
 		pBssDescr->rssi);
 	/* IEs */
 	if (uLen) {
-		cdf_mem_copy(&pBssDescr->ieFields,
+		qdf_mem_copy(&pBssDescr->ieFields,
 			pPrefNetworkFoundInd->data + (SIR_MAC_HDR_LEN_3A +
 			SIR_MAC_B_PR_SSID_OFFSET), uLen);
 	}
@@ -6930,7 +6930,7 @@
 	if (!(local_ie || QDF_IS_STATUS_SUCCESS(status))) {
 		sms_log(pMac, LOGE, FL("Cannot parse IEs"));
 		csr_free_scan_result_entry(pMac, pScanResult);
-		cdf_mem_free(parsed_frm);
+		qdf_mem_free(parsed_frm);
 		return QDF_STATUS_E_RESOURCES;
 	}
 
@@ -6943,9 +6943,9 @@
 		sms_log(pMac, LOGE, FL("BSS limit reached"));
 		/* Free the resources */
 		if ((pScanResult->Result.pvIes == NULL) && local_ie)
-			cdf_mem_free(local_ie);
+			qdf_mem_free(local_ie);
 		csr_free_scan_result_entry(pMac, pScanResult);
-		cdf_mem_free(parsed_frm);
+		qdf_mem_free(parsed_frm);
 		return QDF_STATUS_E_RESOURCES;
 	}
 	/* Add to scan cache */
@@ -6953,8 +6953,8 @@
 			    pPrefNetworkFoundInd->sessionId);
 
 	if ((pScanResult->Result.pvIes == NULL) && local_ie)
-		cdf_mem_free(local_ie);
-	cdf_mem_free(parsed_frm);
+		qdf_mem_free(local_ie);
+	qdf_mem_free(parsed_frm);
 	return QDF_STATUS_SUCCESS;
 }
 #endif /* FEATURE_WLAN_SCAN_PNO */
@@ -7005,7 +7005,7 @@
 		 * csr_get_parsed_bss_description_ies
 		 */
 		if ((pBssDesc->Result.pvIes == NULL) && pIes)
-			cdf_mem_free(pIes);
+			qdf_mem_free(pIes);
 		pEntry = csr_ll_next(&pMac->scan.scanResultList, pEntry,
 				     LL_ACCESS_NOLOCK);
 	} /* while */
@@ -7046,15 +7046,15 @@
 		status = QDF_STATUS_E_FAILURE;
 		goto free_mem;
 	}
-	pNewBssDescriptor = cdf_mem_malloc(size);
+	pNewBssDescriptor = qdf_mem_malloc(size);
 	if (NULL == pNewBssDescriptor) {
 		sms_log(pMac, LOGE, FL("memory allocation failed"));
 		status = QDF_STATUS_E_FAILURE;
 		goto free_mem;
 	}
-	cdf_mem_copy(pNewBssDescriptor, pSession->pConnectBssDesc, size);
+	qdf_mem_copy(pNewBssDescriptor, pSession->pConnectBssDesc, size);
 	/* change the BSSID & channel as passed */
-	cdf_mem_copy(pNewBssDescriptor->bssId, bssid.bytes,
+	qdf_mem_copy(pNewBssDescriptor->bssId, bssid.bytes,
 			sizeof(tSirMacAddr));
 	pNewBssDescriptor->channelId = channel;
 	if (NULL == csr_scan_append_bss_description(pMac, pNewBssDescriptor,
@@ -7068,10 +7068,10 @@
 
 free_mem:
 	if (pNewIes) {
-		cdf_mem_free(pNewIes);
+		qdf_mem_free(pNewIes);
 	}
 	if (pNewBssDescriptor) {
-		cdf_mem_free(pNewBssDescriptor);
+		qdf_mem_free(pNewBssDescriptor);
 	}
 	return status;
 }
@@ -7116,15 +7116,15 @@
 
 	length = roam_sync_ind_ptr->beaconProbeRespLength -
 		(SIR_MAC_HDR_LEN_3A + SIR_MAC_B_PR_SSID_OFFSET);
-	scan_res_ptr = cdf_mem_malloc(sizeof(tCsrScanResult) + length);
+	scan_res_ptr = qdf_mem_malloc(sizeof(tCsrScanResult) + length);
 	if (scan_res_ptr == NULL) {
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 				" fail to allocate memory for frame");
 		return QDF_STATUS_E_NOMEM;
 	}
 
-	cdf_mem_zero(scan_res_ptr, sizeof(tCsrScanResult) + length);
-	cdf_mem_copy(&scan_res_ptr->Result.BssDescriptor,
+	qdf_mem_zero(scan_res_ptr, sizeof(tCsrScanResult) + length);
+	qdf_mem_copy(&scan_res_ptr->Result.BssDescriptor,
 			bss_desc_ptr,
 			(sizeof(tSirBssDescription) + length));
 	ies_local_ptr = (tDot11fBeaconIEs *)(scan_res_ptr->Result.pvIes);
@@ -7146,7 +7146,7 @@
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 				"%s:BSS Limit Exceed", __func__);
 		if ((scan_res_ptr->Result.pvIes == NULL) && ies_local_ptr)
-			cdf_mem_free(ies_local_ptr);
+			qdf_mem_free(ies_local_ptr);
 
 		csr_free_scan_result_entry(pMac, scan_res_ptr);
 		return QDF_STATUS_E_RESOURCES;
@@ -7181,7 +7181,7 @@
 	if (csr_ll_is_list_empty(&bss_list->List, LL_ACCESS_NOLOCK)) {
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 				FL("bss_list->List is empty"));
-		cdf_mem_free(bss_list);
+		qdf_mem_free(bss_list);
 		return NULL;
 	}
 	first_element = csr_ll_peek_head(&bss_list->List, LL_ACCESS_NOLOCK);
@@ -7189,7 +7189,7 @@
 		scan_result = GET_BASE_ADDR(first_element,
 				tCsrScanResult,
 				Link);
-		cdf_mem_copy(bss_descr,
+		qdf_mem_copy(bss_descr,
 				&scan_result->Result.BssDescriptor,
 				sizeof(tSirBssDescription));
 	}
@@ -7230,13 +7230,13 @@
 		FL("Scan Timeout:Sending abort to Firmware ID %d session %d "),
 		scan_id, scan_cmd->sessionId);
 	msg_len = (uint16_t)(sizeof(tSirSmeScanAbortReq));
-	msg = cdf_mem_malloc(msg_len);
+	msg = qdf_mem_malloc(msg_len);
 	if (NULL == msg) {
 		sms_log(mac_ctx, LOGE,
 			FL("Failed to alloc memory for SmeScanAbortReq"));
 		return;
 	}
-	cdf_mem_zero((void *)msg, msg_len);
+	qdf_mem_zero((void *)msg, msg_len);
 	msg->type = eWNI_SME_SCAN_ABORT_IND;
 	msg->msgLen = msg_len;
 	msg->sessionId = scan_cmd->sessionId;
@@ -7245,7 +7245,7 @@
 	if (!QDF_IS_STATUS_SUCCESS(status)) {
 		sms_log(mac_ctx, LOGE,
 			FL(" Failed to post message to LIM"));
-		cdf_mem_free(msg);
+		qdf_mem_free(msg);
 	}
 	csr_release_scan_command(mac_ctx, scan_cmd, eCSR_SCAN_FAILURE);
 	return;
diff --git a/core/sme/src/csr/csr_link_list.c b/core/sme/src/csr/csr_link_list.c
index 4241ee5..2e52aa4 100644
--- a/core/sme/src/csr/csr_link_list.c
+++ b/core/sme/src/csr/csr_link_list.c
@@ -34,7 +34,7 @@
 
 #include "csr_link_list.h"
 #include "qdf_lock.h"
-#include "cdf_memory.h"
+#include "qdf_mem.h"
 #include "qdf_trace.h"
 #include "qdf_mc_timer.h"
 
diff --git a/core/sme/src/csr/csr_neighbor_roam.c b/core/sme/src/csr/csr_neighbor_roam.c
index 6059990..36e0104 100644
--- a/core/sme/src/csr/csr_neighbor_roam.c
+++ b/core/sme/src/csr/csr_neighbor_roam.c
@@ -110,15 +110,15 @@
 {
 	tCsrRoamInfo *roam_info;
 
-	roam_info = cdf_mem_malloc(sizeof(tCsrRoamInfo));
+	roam_info = qdf_mem_malloc(sizeof(tCsrRoamInfo));
 	if (NULL == roam_info) {
 		sms_log(mac_ctx, LOG1, FL("Memory allocation failed!"));
 	} else {
-		cdf_mem_copy((void *)roam_info->bssid,
+		qdf_mem_copy((void *)roam_info->bssid,
 			     (void *)bssid, sizeof(*roam_info));
 		csr_roam_call_callback(mac_ctx, session_id, roam_info, 0,
 			status, 0);
-		cdf_mem_free(roam_info);
+		qdf_mem_free(roam_info);
 	}
 }
 #else
@@ -150,10 +150,10 @@
 {
 	if (neighborRoamBSSNode) {
 		if (neighborRoamBSSNode->pBssDescription) {
-			cdf_mem_free(neighborRoamBSSNode->pBssDescription);
+			qdf_mem_free(neighborRoamBSSNode->pBssDescription);
 			neighborRoamBSSNode->pBssDescription = NULL;
 		}
-		cdf_mem_free(neighborRoamBSSNode);
+		qdf_mem_free(neighborRoamBSSNode);
 		neighborRoamBSSNode = NULL;
 	}
 
@@ -623,7 +623,7 @@
 		rChInfo->currentChannelListInfo.numOfChannels = 0;
 
 		if (rChInfo->currentChannelListInfo.ChannelList)
-			cdf_mem_free(rChInfo->currentChannelListInfo.
+			qdf_mem_free(rChInfo->currentChannelListInfo.
 				     ChannelList);
 
 		rChInfo->currentChannelListInfo.ChannelList = NULL;
@@ -648,11 +648,11 @@
 	pNeighborRoamInfo->FTRoamInfo.currentNeighborRptRetryNum = 0;
 	pNeighborRoamInfo->FTRoamInfo.neighborRptPending = false;
 	pNeighborRoamInfo->FTRoamInfo.numBssFromNeighborReport = 0;
-	cdf_mem_zero(pNeighborRoamInfo->FTRoamInfo.neighboReportBssInfo,
+	qdf_mem_zero(pNeighborRoamInfo->FTRoamInfo.neighboReportBssInfo,
 		     sizeof(tCsrNeighborReportBssInfo) *
 		     MAX_BSS_IN_NEIGHBOR_RPT);
 	pNeighborRoamInfo->uOsRequestedHandoff = 0;
-	cdf_mem_zero(&pNeighborRoamInfo->handoffReqInfo,
+	qdf_mem_zero(&pNeighborRoamInfo->handoffReqInfo,
 		     sizeof(tCsrHandoffRequest));
 }
 
@@ -684,11 +684,11 @@
 	pNeighborRoamInfo->FTRoamInfo.numPreAuthRetries = 0;
 	pNeighborRoamInfo->FTRoamInfo.numBssFromNeighborReport = 0;
 	pNeighborRoamInfo->FTRoamInfo.preauthRspPending = 0;
-	cdf_mem_zero(pNeighborRoamInfo->FTRoamInfo.neighboReportBssInfo,
+	qdf_mem_zero(pNeighborRoamInfo->FTRoamInfo.neighboReportBssInfo,
 		     sizeof(tCsrNeighborReportBssInfo) *
 		     MAX_BSS_IN_NEIGHBOR_RPT);
 	pNeighborRoamInfo->uOsRequestedHandoff = 0;
-	cdf_mem_zero(&pNeighborRoamInfo->handoffReqInfo,
+	qdf_mem_zero(&pNeighborRoamInfo->handoffReqInfo,
 		     sizeof(tCsrHandoffRequest));
 }
 
@@ -754,7 +754,7 @@
 		pNeighborRoamInfo = &pMac->roam.neighborRoamInfo[i];
 		while (pNeighborRoamInfo->FTRoamInfo.preAuthFailList.
 		       numMACAddress) {
-			cdf_mem_zero(pNeighborRoamInfo->FTRoamInfo.
+			qdf_mem_zero(pNeighborRoamInfo->FTRoamInfo.
 				     preAuthFailList.
 				     macAddress[pNeighborRoamInfo->FTRoamInfo.
 						preAuthFailList.numMACAddress -
@@ -792,7 +792,7 @@
 	for (i = 0;
 	     i < neighbor_roam_info->FTRoamInfo.preAuthFailList.numMACAddress;
 	     i++) {
-		if (true == cdf_mem_compare(
+		if (true != qdf_mem_cmp(
 		   neighbor_roam_info->FTRoamInfo.preAuthFailList.macAddress[i],
 		   bssid, sizeof(tSirMacAddr))) {
 			sms_log(mac_ctx, LOGW, FL("BSSID "MAC_ADDRESS_STR" already present in preauth fail list"),
@@ -806,7 +806,7 @@
 			FL("Cannot add, preauth fail list is full."));
 		return QDF_STATUS_E_FAILURE;
 	}
-	cdf_mem_copy(neighbor_roam_info->FTRoamInfo.preAuthFailList.
+	qdf_mem_copy(neighbor_roam_info->FTRoamInfo.preAuthFailList.
 		     macAddress[num_mac_addr], bssid, sizeof(tSirMacAddr));
 	neighbor_roam_info->FTRoamInfo.preAuthFailList.numMACAddress++;
 
@@ -840,8 +840,8 @@
 	for (i = 0;
 	     i < pNeighborRoamInfo->FTRoamInfo.preAuthFailList.numMACAddress;
 	     i++) {
-		if (true ==
-		    cdf_mem_compare(pNeighborRoamInfo->FTRoamInfo.
+		if (true !=
+		    qdf_mem_cmp(pNeighborRoamInfo->FTRoamInfo.
 				    preAuthFailList.macAddress[i], bssId,
 				    sizeof(tSirMacAddr))) {
 			NEIGHBOR_ROAM_DEBUG(pMac, LOGE,
@@ -1144,7 +1144,7 @@
 		return QDF_STATUS_E_FAILURE;
 	}
 
-	bss_info_ptr = cdf_mem_malloc(sizeof(tCsrNeighborRoamBSSInfo));
+	bss_info_ptr = qdf_mem_malloc(sizeof(tCsrNeighborRoamBSSInfo));
 	if (NULL == bss_info_ptr) {
 		sms_log(pMac, LOGE,
 		FL("LFR3:Memory allocation for Neighbor Roam BSS Info failed"));
@@ -1152,15 +1152,15 @@
 	}
 	bss_desc_len = roam_sync_ind_ptr->bss_desc_ptr->length +
 		     sizeof(roam_sync_ind_ptr->bss_desc_ptr->length);
-	bss_info_ptr->pBssDescription = cdf_mem_malloc(bss_desc_len);
+	bss_info_ptr->pBssDescription = qdf_mem_malloc(bss_desc_len);
 	if (bss_info_ptr->pBssDescription != NULL) {
-		cdf_mem_copy(bss_info_ptr->pBssDescription,
+		qdf_mem_copy(bss_info_ptr->pBssDescription,
 			     roam_sync_ind_ptr->bss_desc_ptr,
 			     bss_desc_len);
 	} else {
 		sms_log(pMac, LOGE,
 		FL("LFR3:Mem alloc for Neighbor Roam BSS Descriptor failed"));
-		cdf_mem_free(bss_info_ptr);
+		qdf_mem_free(bss_info_ptr);
 		return QDF_STATUS_E_NOMEM;
 
 	}
@@ -1205,7 +1205,7 @@
 	if (pScanFilter == NULL)
 		return QDF_STATUS_E_FAILURE;
 
-	cdf_mem_zero(pScanFilter, sizeof(tCsrScanResultFilter));
+	qdf_mem_zero(pScanFilter, sizeof(tCsrScanResultFilter));
 	roam_params = &pMac->roam.configParam.roam_params;
 	/* We dont want to set BSSID based Filter */
 	pScanFilter->BSSIDs.numOfBSSIDs = 0;
@@ -1214,7 +1214,7 @@
 	if (nbr_roam_info->uOsRequestedHandoff) {
 		pScanFilter->BSSIDs.numOfBSSIDs = 1;
 		pScanFilter->BSSIDs.bssid =
-			cdf_mem_malloc(sizeof(tSirMacAddr) *
+			qdf_mem_malloc(sizeof(tSirMacAddr) *
 				       pScanFilter->BSSIDs.numOfBSSIDs);
 		if (NULL == pScanFilter->BSSIDs.bssid) {
 			sms_log(pMac, LOGE,
@@ -1222,7 +1222,7 @@
 			return QDF_STATUS_E_NOMEM;
 		}
 
-		cdf_mem_zero(pScanFilter->BSSIDs.bssid,
+		qdf_mem_zero(pScanFilter->BSSIDs.bssid,
 			     sizeof(tSirMacAddr) *
 			     pScanFilter->BSSIDs.numOfBSSIDs);
 
@@ -1239,7 +1239,7 @@
 		pScanFilter->SSIDs.numOfSSIDs =
 			roam_params->num_ssid_allowed_list;
 		pScanFilter->SSIDs.SSIDList =
-			cdf_mem_malloc(sizeof(tCsrSSIDInfo) *
+			qdf_mem_malloc(sizeof(tCsrSSIDInfo) *
 				pScanFilter->SSIDs.numOfSSIDs);
 		if (NULL == pScanFilter->SSIDs.SSIDList) {
 			sms_log(pMac, LOGE,
@@ -1249,7 +1249,7 @@
 		for (i = 0; i < roam_params->num_ssid_allowed_list; i++) {
 			pScanFilter->SSIDs.SSIDList[i].handoffPermitted = 1;
 			pScanFilter->SSIDs.SSIDList[i].ssidHidden = 0;
-			cdf_mem_copy((void *)
+			qdf_mem_copy((void *)
 				pScanFilter->SSIDs.SSIDList[i].SSID.ssId,
 				roam_params->ssid_allowed_list[i].ssId,
 				roam_params->ssid_allowed_list[i].length);
@@ -1260,7 +1260,7 @@
 		/* Populate all the information from the connected profile */
 		pScanFilter->SSIDs.numOfSSIDs = 1;
 		pScanFilter->SSIDs.SSIDList =
-			cdf_mem_malloc(sizeof(tCsrSSIDInfo));
+			qdf_mem_malloc(sizeof(tCsrSSIDInfo));
 		if (NULL == pScanFilter->SSIDs.SSIDList) {
 			sms_log(pMac, LOGE,
 				FL("Scan Filter SSID mem alloc failed"));
@@ -1270,7 +1270,7 @@
 		pScanFilter->SSIDs.SSIDList->ssidHidden = 0;
 		pScanFilter->SSIDs.SSIDList->SSID.length =
 			pCurProfile->SSID.length;
-		cdf_mem_copy((void *)pScanFilter->SSIDs.SSIDList->SSID.ssId,
+		qdf_mem_copy((void *)pScanFilter->SSIDs.SSIDList->SSID.ssId,
 			(void *)pCurProfile->SSID.ssId,
 			pCurProfile->SSID.length);
 
@@ -1302,11 +1302,11 @@
 		 */
 		pScanFilter->ChannelInfo.numOfChannels = num_ch;
 		pScanFilter->ChannelInfo.ChannelList =
-			cdf_mem_malloc(num_ch * sizeof(uint8_t));
+			qdf_mem_malloc(num_ch * sizeof(uint8_t));
 		if (NULL == pScanFilter->ChannelInfo.ChannelList) {
 			sms_log(pMac, LOGE,
 				FL("Scan Filter Ch list mem alloc failed"));
-			cdf_mem_free(pScanFilter->SSIDs.SSIDList);
+			qdf_mem_free(pScanFilter->SSIDs.SSIDList);
 			pScanFilter->SSIDs.SSIDList = NULL;
 			return QDF_STATUS_E_NOMEM;
 		}
@@ -1352,8 +1352,8 @@
 
 	while (NULL !=
 	       (pScanResult = csr_scan_result_get_next(pMac, *pScanResultList))) {
-		if (true ==
-		    cdf_mem_compare(pScanResult->BssDescriptor.bssId,
+		if (true !=
+		    qdf_mem_cmp(pScanResult->BssDescriptor.bssId,
 				    nbr_roam_info->currAPbssid.bytes,
 				    sizeof(tSirMacAddr))) {
 			/* We got a match with the currently associated AP.
@@ -1451,7 +1451,7 @@
 				  MAC_ADDR_ARRAY(descr->bssId),
 				  abs(descr->rssi), descr->channelId);
 
-			if (true == cdf_mem_compare(descr->bssId,
+			if (true != qdf_mem_cmp(descr->bssId,
 					n_roam_info->currAPbssid.bytes,
 					sizeof(tSirMacAddr))) {
 				/*
@@ -1469,7 +1469,7 @@
 			 * have duplicates
 			 */
 			if ((n_roam_info->uOsRequestedHandoff) &&
-			    ((false == cdf_mem_compare(descr->bssId,
+			    ((false != qdf_mem_cmp(descr->bssId,
 					n_roam_info->handoffReqInfo.bssid.bytes,
 					sizeof(tSirMacAddr)))
 			     || (descr->channelId !=
@@ -1550,22 +1550,22 @@
 
 			/* Finished all checks, now add it to candidate list */
 			bss_info =
-				cdf_mem_malloc(sizeof(tCsrNeighborRoamBSSInfo));
+				qdf_mem_malloc(sizeof(tCsrNeighborRoamBSSInfo));
 			if (NULL == bss_info) {
 				sms_log(mac_ctx, LOGE,
 					FL("Memory allocation failed. Ignored candidate."));
 				continue;
 			}
 			bss_info->pBssDescription =
-				cdf_mem_malloc(descr->length +
+				qdf_mem_malloc(descr->length +
 					sizeof(descr->length));
 			if (bss_info->pBssDescription != NULL) {
-				cdf_mem_copy(bss_info->pBssDescription, descr,
+				qdf_mem_copy(bss_info->pBssDescription, descr,
 					descr->length + sizeof(descr->length));
 			} else {
 				sms_log(mac_ctx, LOGE,
 					FL("Memory allocation failed. Ignored candidate."));
-				cdf_mem_free(bss_info);
+				qdf_mem_free(bss_info);
 				continue;
 			}
 			/*
@@ -1859,7 +1859,7 @@
 		neighboReportBssInfo[pNeighborRoamInfo->FTRoamInfo.
 				     numBssFromNeighborReport].
 		neighborScore = (uint8_t) pNeighborBssDesc->roamScore;
-		cdf_mem_copy(pNeighborRoamInfo->FTRoamInfo.
+		qdf_mem_copy(pNeighborRoamInfo->FTRoamInfo.
 			     neighboReportBssInfo[pNeighborRoamInfo->FTRoamInfo.
 						  numBssFromNeighborReport].
 			     neighborBssId,
@@ -1921,7 +1921,7 @@
 
 	if (pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo.
 	    ChannelList) {
-		cdf_mem_free(pNeighborRoamInfo->roamChannelInfo.
+		qdf_mem_free(pNeighborRoamInfo->roamChannelInfo.
 			     currentChannelListInfo.ChannelList);
 	}
 
@@ -1933,7 +1933,7 @@
 	if (numChannels)
 		pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo.
 		ChannelList =
-			cdf_mem_malloc((numChannels) * sizeof(uint8_t));
+			qdf_mem_malloc((numChannels) * sizeof(uint8_t));
 	if (NULL ==
 	    pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo.
 	    ChannelList) {
@@ -1943,7 +1943,7 @@
 		return QDF_STATUS_E_NOMEM;
 	}
 
-	cdf_mem_copy(pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo.
+	qdf_mem_copy(pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo.
 		     ChannelList, channelList, (numChannels) * sizeof(uint8_t));
 	pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo.
 	numOfChannels = numChannels;
@@ -2101,7 +2101,7 @@
 			fNew = false;
 		}
 		if (pIes) {
-			cdf_mem_free(pIes);
+			qdf_mem_free(pIes);
 		}
 	}
 
@@ -2216,7 +2216,7 @@
 		FL("Roaming parameters are reset"));
 	roam_params = &mac_ctx->roam.configParam.roam_params;
 	roam_params->num_ssid_allowed_list = 0;
-	cdf_mem_set(&roam_params->ssid_allowed_list, 0,
+	qdf_mem_set(&roam_params->ssid_allowed_list, 0,
 			sizeof(tSirMacSSid) * MAX_SSID_ALLOWED_LIST);
 }
 
@@ -2276,7 +2276,7 @@
 		}
 #ifdef FEATURE_WLAN_ESE
 		if (pSession->connectedProfile.isESEAssoc) {
-			cdf_mem_copy(&pSession->prevApSSID,
+			qdf_mem_copy(&pSession->prevApSSID,
 				&pSession->connectedProfile.SSID,
 				sizeof(tSirMacSSid));
 			qdf_copy_macaddr(&pSession->prevApBssid,
@@ -2466,7 +2466,7 @@
 				QDF_TRACE(QDF_MODULE_ID_SME,
 					QDF_TRACE_LEVEL_DEBUG,
 					"Free Reassoc Rsp");
-				cdf_mem_free(pMac->roam.pReassocResp);
+				qdf_mem_free(pMac->roam.pReassocResp);
 				pMac->roam.pReassocResp = NULL;
 			}
 		} else
@@ -2537,7 +2537,7 @@
 		session->roam_synch_data->authStatus)) {
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG,
 			"LFR3:csr_neighbor_roam_indicate_connect");
-		msg = cdf_mem_malloc(sizeof(tSirSetActiveModeSetBncFilterReq));
+		msg = qdf_mem_malloc(sizeof(tSirSetActiveModeSetBncFilterReq));
 		if (msg == NULL) {
 			QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 				"LFR3:Mem Alloc failed for beacon Filter Req");
@@ -2615,7 +2615,7 @@
 		     i <
 		     pNeighborRoamInfo->FTRoamInfo.preAuthFailList.
 		     numMACAddress; i++) {
-			cdf_mem_zero(pNeighborRoamInfo->FTRoamInfo.
+			qdf_mem_zero(pNeighborRoamInfo->FTRoamInfo.
 				     preAuthFailList.macAddress[i],
 				     sizeof(tSirMacAddr));
 		}
@@ -2661,7 +2661,7 @@
 		pFTRoamInfo->currentNeighborRptRetryNum = 0;
 		pFTRoamInfo->numBssFromNeighborReport = 0;
 
-		cdf_mem_zero(pFTRoamInfo->neighboReportBssInfo,
+		qdf_mem_zero(pFTRoamInfo->neighboReportBssInfo,
 			     sizeof(tCsrNeighborReportBssInfo) *
 			     MAX_BSS_IN_NEIGHBOR_RPT);
 
@@ -2730,7 +2730,7 @@
 		numChannels;
 	if (pNeighborRoamInfo->cfgParams.channelInfo.numOfChannels != 0) {
 		pNeighborRoamInfo->cfgParams.channelInfo.ChannelList =
-		cdf_mem_malloc(pMac->roam.configParam.neighborRoamConfig.
+		qdf_mem_malloc(pMac->roam.configParam.neighborRoamConfig.
 				neighborScanChanList.numChannels);
 		if (NULL ==
 			pNeighborRoamInfo->cfgParams.channelInfo.ChannelList) {
@@ -2746,7 +2746,7 @@
 	}
 
 	/* Update the roam global structure from CFG */
-	cdf_mem_copy(pNeighborRoamInfo->cfgParams.channelInfo.ChannelList,
+	qdf_mem_copy(pNeighborRoamInfo->cfgParams.channelInfo.ChannelList,
 		     pMac->roam.configParam.neighborRoamConfig.
 		     neighborScanChanList.channelList,
 		     pMac->roam.configParam.neighborRoamConfig.
@@ -2777,13 +2777,13 @@
 		pNeighborRoamInfo->cfgParams.nRoamBmissFinalBcnt;
 	pNeighborRoamInfo->currentRoamBeaconRssiWeight =
 		pNeighborRoamInfo->cfgParams.nRoamBeaconRssiWeight;
-	cdf_mem_set(&pNeighborRoamInfo->prevConnProfile,
+	qdf_mem_set(&pNeighborRoamInfo->prevConnProfile,
 		    sizeof(tCsrRoamConnectedProfile), 0);
 
 	status = csr_ll_open(pMac->hHdd, &pNeighborRoamInfo->roamableAPList);
 	if (QDF_STATUS_SUCCESS != status) {
 		sms_log(pMac, LOGE, FL("LL Open of roam able AP List failed"));
-		cdf_mem_free(pNeighborRoamInfo->cfgParams.channelInfo.
+		qdf_mem_free(pNeighborRoamInfo->cfgParams.channelInfo.
 			     ChannelList);
 		pNeighborRoamInfo->cfgParams.channelInfo.ChannelList = NULL;
 		return QDF_STATUS_E_RESOURCES;
@@ -2800,7 +2800,7 @@
 	status = csr_neighbor_roam_init11r_assoc_info(pMac);
 	if (QDF_STATUS_SUCCESS != status) {
 		sms_log(pMac, LOGE, FL("LL Open of roam able AP List failed"));
-		cdf_mem_free(pNeighborRoamInfo->cfgParams.channelInfo.
+		qdf_mem_free(pNeighborRoamInfo->cfgParams.channelInfo.
 			     ChannelList);
 		pNeighborRoamInfo->cfgParams.channelInfo.ChannelList = NULL;
 		csr_ll_close(&pNeighborRoamInfo->roamableAPList);
@@ -2839,7 +2839,7 @@
 	}
 
 	if (pNeighborRoamInfo->cfgParams.channelInfo.ChannelList)
-		cdf_mem_free(pNeighborRoamInfo->cfgParams.channelInfo.
+		qdf_mem_free(pNeighborRoamInfo->cfgParams.channelInfo.
 			     ChannelList);
 
 	pNeighborRoamInfo->cfgParams.channelInfo.ChannelList = NULL;
@@ -2851,7 +2851,7 @@
 
 	if (pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo.
 	    ChannelList) {
-		cdf_mem_free(pNeighborRoamInfo->roamChannelInfo.
+		qdf_mem_free(pNeighborRoamInfo->roamChannelInfo.
 			     currentChannelListInfo.ChannelList);
 	}
 
@@ -2870,7 +2870,7 @@
 	csr_roam_free_connect_profile(&pNeighborRoamInfo->prevConnProfile);
 	pNeighborRoamInfo->FTRoamInfo.currentNeighborRptRetryNum = 0;
 	pNeighborRoamInfo->FTRoamInfo.numBssFromNeighborReport = 0;
-	cdf_mem_zero(pNeighborRoamInfo->FTRoamInfo.neighboReportBssInfo,
+	qdf_mem_zero(pNeighborRoamInfo->FTRoamInfo.neighboReportBssInfo,
 		     sizeof(tCsrNeighborReportBssInfo) *
 		     MAX_BSS_IN_NEIGHBOR_RPT);
 	csr_neighbor_roam_free_roamable_bss_list(pMac,
@@ -2927,11 +2927,11 @@
 		  FL("HANDOFF CANDIDATE BSSID "MAC_ADDRESS_STR),
 		  MAC_ADDR_ARRAY(handoff_node.pBssDescription->bssId));
 
-	cdf_mem_zero(&roam_info, sizeof(tCsrRoamInfo));
+	qdf_mem_zero(&roam_info, sizeof(tCsrRoamInfo));
 	csr_roam_call_callback(mac_ctx, session_id, &roam_info, roamid,
 			       eCSR_ROAM_FT_START, eSIR_SME_SUCCESS);
 
-	cdf_mem_zero(&roam_info, sizeof(tCsrRoamInfo));
+	qdf_mem_zero(&roam_info, sizeof(tCsrRoamInfo));
 	CSR_NEIGHBOR_ROAM_STATE_TRANSITION
 		(mac_ctx, eCSR_NEIGHBOR_ROAM_STATE_REASSOCIATING, session_id)
 
@@ -2954,7 +2954,7 @@
 			status);
 		return;
 	}
-	cdf_mem_copy(neighbor_roam_info->csrNeighborRoamProfile.BSSIDs.bssid,
+	qdf_mem_copy(neighbor_roam_info->csrNeighborRoamProfile.BSSIDs.bssid,
 		     handoff_node.pBssDescription->bssId, sizeof(tSirMacAddr));
 	neighbor_roam_info->csrNeighborRoamProfile.ChannelInfo.ChannelList[0] =
 		handoff_node.pBssDescription->channelId;
@@ -2973,7 +2973,7 @@
 	/* notify HDD for handoff, providing the BSSID too */
 	roam_info.reasonCode = eCsrRoamReasonBetterAP;
 
-	cdf_mem_copy(roam_info.bssid.bytes,
+	qdf_mem_copy(roam_info.bssid.bytes,
 		     handoff_node.pBssDescription->bssId,
 		     sizeof(struct qdf_mac_addr));
 
@@ -3085,7 +3085,7 @@
 	}
 	if (NULL == bss_node)
 		return false;
-	cdf_mem_copy(hand_off_node, bss_node, sizeof(tCsrNeighborRoamBSSInfo));
+	qdf_mem_copy(hand_off_node, bss_node, sizeof(tCsrNeighborRoamBSSInfo));
 	return true;
 }
 
@@ -3249,12 +3249,12 @@
 	}
 
 	roam_id = GET_NEXT_ROAM_ID(&mac_ctx->roam);
-	profile = cdf_mem_malloc(sizeof(tCsrRoamProfile));
+	profile = qdf_mem_malloc(sizeof(tCsrRoamProfile));
 	if (NULL == profile) {
 		sms_log(mac_ctx, LOGE, FL("Memory alloc failed"));
 		return QDF_STATUS_E_NOMEM;
 	}
-	cdf_mem_set(profile, sizeof(tCsrRoamProfile), 0);
+	qdf_mem_set(profile, sizeof(tCsrRoamProfile), 0);
 	status =
 		csr_roam_copy_profile(mac_ctx, profile,
 				      session->pCurRoamProfile);
@@ -3266,7 +3266,7 @@
 	profile->BSSIDs.numOfBSSIDs = 1;
 	if (NULL == profile->BSSIDs.bssid) {
 		profile->BSSIDs.bssid =
-			cdf_mem_malloc(sizeof(tSirMacAddr) *
+			qdf_mem_malloc(sizeof(tSirMacAddr) *
 				profile->BSSIDs.numOfBSSIDs);
 		if (NULL == profile->BSSIDs.bssid) {
 			sms_log(mac_ctx, LOGE, FL("mem alloc failed for BSSID"));
@@ -3275,7 +3275,7 @@
 		}
 	}
 
-	cdf_mem_zero(profile->BSSIDs.bssid,
+	qdf_mem_zero(profile->BSSIDs.bssid,
 		sizeof(tSirMacAddr) *
 		profile->BSSIDs.numOfBSSIDs);
 
@@ -3288,7 +3288,7 @@
 	profile->ChannelInfo.numOfChannels = 1;
 	if (NULL == profile->ChannelInfo.ChannelList) {
 		profile->ChannelInfo.ChannelList =
-			cdf_mem_malloc(sizeof(*profile->
+			qdf_mem_malloc(sizeof(*profile->
 				ChannelInfo.ChannelList) *
 				profile->ChannelInfo.numOfChannels);
 		if (NULL == profile->ChannelInfo.ChannelList) {
@@ -3311,7 +3311,7 @@
 end:
 	if (NULL != profile) {
 		csr_release_profile(mac_ctx, profile);
-		cdf_mem_free(profile);
+		qdf_mem_free(profile);
 	}
 
 	return status;
@@ -3412,7 +3412,7 @@
 	}
 
 	/* sanity check */
-	if (true == cdf_mem_compare(handoff_req->bssid,
+	if (true != qdf_mem_cmp(handoff_req->bssid,
 		roam_ctrl_info->currAPbssid.bytes,
 		sizeof(tSirMacAddr))) {
 		sms_log(mac_ctx, LOGE,
@@ -3424,7 +3424,7 @@
 		handoff_req->channel;
 	roam_ctrl_info->handoffReqInfo.src =
 		handoff_req->handoff_src;
-	cdf_mem_copy(&roam_ctrl_info->handoffReqInfo.bssid.bytes,
+	qdf_mem_copy(&roam_ctrl_info->handoffReqInfo.bssid.bytes,
 			&handoff_req->bssid, QDF_MAC_ADDR_SIZE);
 	roam_ctrl_info->uOsRequestedHandoff = 1;
 	status = csr_roam_offload_scan(mac_ctx, session_id,
diff --git a/core/sme/src/csr/csr_tdls_process.c b/core/sme/src/csr/csr_tdls_process.c
index fa96579..d6baf4e 100644
--- a/core/sme/src/csr/csr_tdls_process.c
+++ b/core/sme/src/csr/csr_tdls_process.c
@@ -63,7 +63,7 @@
 		if (cmdType == pCommand->command) {
 			if (csr_ll_remove_entry(&pMac->sme.smeCmdActiveList,
 						pEntry, LL_ACCESS_LOCK)) {
-				cdf_mem_zero(&pCommand->u.tdlsCmd,
+				qdf_mem_zero(&pCommand->u.tdlsCmd,
 					     sizeof(tTdlsCmd));
 				csr_release_command(pMac, pCommand);
 				sme_process_pending_queue(pMac);
@@ -106,18 +106,18 @@
 	tdlsSendMgmtCmdInfo->statusCode = tdlsSendMgmt->statusCode;
 	tdlsSendMgmtCmdInfo->responder = tdlsSendMgmt->responder;
 	tdlsSendMgmtCmdInfo->peerCapability = tdlsSendMgmt->peerCapability;
-	cdf_mem_copy(tdlsSendMgmtCmdInfo->peerMac, tdlsSendMgmt->peerMac,
+	qdf_mem_copy(tdlsSendMgmtCmdInfo->peerMac, tdlsSendMgmt->peerMac,
 			sizeof(tSirMacAddr));
 
 	if ((0 != tdlsSendMgmt->len) && (NULL != tdlsSendMgmt->buf)) {
-		tdlsSendMgmtCmdInfo->buf = cdf_mem_malloc(tdlsSendMgmt->len);
+		tdlsSendMgmtCmdInfo->buf = qdf_mem_malloc(tdlsSendMgmt->len);
 		if (NULL == tdlsSendMgmtCmdInfo->buf) {
 			status = QDF_STATUS_E_NOMEM;
 			sms_log(pMac, LOGE, FL("Alloc Failed"));
 			QDF_ASSERT(0);
 			return status;
 		}
-		cdf_mem_copy(tdlsSendMgmtCmdInfo->buf, tdlsSendMgmt->buf,
+		qdf_mem_copy(tdlsSendMgmtCmdInfo->buf, tdlsSendMgmt->buf,
 				tdlsSendMgmt->len);
 		tdlsSendMgmtCmdInfo->len = tdlsSendMgmt->len;
 	} else {
@@ -158,41 +158,41 @@
 
 			tdlsAddStaCmd->sessionId = sessionId;
 
-			cdf_mem_copy(tdlsAddStaCmdInfo->peermac.bytes,
+			qdf_mem_copy(tdlsAddStaCmdInfo->peermac.bytes,
 				     peerMac, QDF_MAC_ADDR_SIZE);
 			tdlsAddStaCmdInfo->capability = pstaParams->capability;
 			tdlsAddStaCmdInfo->uapsdQueues =
 				pstaParams->uapsd_queues;
 			tdlsAddStaCmdInfo->maxSp = pstaParams->max_sp;
-			cdf_mem_copy(tdlsAddStaCmdInfo->extnCapability,
+			qdf_mem_copy(tdlsAddStaCmdInfo->extnCapability,
 				     pstaParams->extn_capability,
 				     sizeof(pstaParams->extn_capability));
 
 			tdlsAddStaCmdInfo->htcap_present =
 				pstaParams->htcap_present;
 			if (pstaParams->htcap_present)
-				cdf_mem_copy(&tdlsAddStaCmdInfo->HTCap,
+				qdf_mem_copy(&tdlsAddStaCmdInfo->HTCap,
 					     &pstaParams->HTCap,
 					     sizeof(pstaParams->HTCap));
 			else
-				cdf_mem_set(&tdlsAddStaCmdInfo->HTCap,
+				qdf_mem_set(&tdlsAddStaCmdInfo->HTCap,
 					    sizeof(pstaParams->HTCap), 0);
 
 			tdlsAddStaCmdInfo->vhtcap_present =
 				pstaParams->vhtcap_present;
 			if (pstaParams->vhtcap_present)
-				cdf_mem_copy(&tdlsAddStaCmdInfo->VHTCap,
+				qdf_mem_copy(&tdlsAddStaCmdInfo->VHTCap,
 					     &pstaParams->VHTCap,
 					     sizeof(pstaParams->VHTCap));
 			else
-				cdf_mem_set(&tdlsAddStaCmdInfo->VHTCap,
+				qdf_mem_set(&tdlsAddStaCmdInfo->VHTCap,
 					    sizeof(pstaParams->VHTCap), 0);
 
 			tdlsAddStaCmdInfo->supportedRatesLen =
 				pstaParams->supported_rates_len;
 
 			if (0 != pstaParams->supported_rates_len)
-				cdf_mem_copy(&tdlsAddStaCmdInfo->supportedRates,
+				qdf_mem_copy(&tdlsAddStaCmdInfo->supportedRates,
 					     pstaParams->supported_rates,
 					     pstaParams->supported_rates_len);
 
@@ -232,7 +232,7 @@
 
 			tdlsLinkEstablishCmd->sessionId = sessionId;
 
-			cdf_mem_copy(tdlsLinkEstablishCmdInfo->peermac.bytes,
+			qdf_mem_copy(tdlsLinkEstablishCmdInfo->peermac.bytes,
 				     peerMac, QDF_MAC_ADDR_SIZE);
 			tdlsLinkEstablishCmdInfo->isBufSta =
 				tdlsLinkEstablishParams->isBufSta;
@@ -244,14 +244,14 @@
 				tdlsLinkEstablishParams->uapsdQueues;
 			tdlsLinkEstablishCmdInfo->isOffChannelSupported =
 				tdlsLinkEstablishParams->isOffChannelSupported;
-			cdf_mem_copy(tdlsLinkEstablishCmdInfo->
+			qdf_mem_copy(tdlsLinkEstablishCmdInfo->
 				     supportedChannels,
 				     tdlsLinkEstablishParams->supportedChannels,
 				     tdlsLinkEstablishParams->
 				     supportedChannelsLen);
 			tdlsLinkEstablishCmdInfo->supportedChannelsLen =
 				tdlsLinkEstablishParams->supportedChannelsLen;
-			cdf_mem_copy(tdlsLinkEstablishCmdInfo->
+			qdf_mem_copy(tdlsLinkEstablishCmdInfo->
 				     supportedOperClasses,
 				     tdlsLinkEstablishParams->
 				     supportedOperClasses,
@@ -300,7 +300,7 @@
 			tdlsAddStaCmd->sessionId = sessionId;
 			tdlsAddStaCmdInfo->tdlsAddOper = TDLS_OPER_ADD;
 
-			cdf_mem_copy(tdlsAddStaCmdInfo->peermac.bytes,
+			qdf_mem_copy(tdlsAddStaCmdInfo->peermac.bytes,
 				     peerMac, QDF_MAC_ADDR_SIZE);
 
 			tdlsAddStaCmd->command = eSmeCommandTdlsAddPeer;
@@ -336,7 +336,7 @@
 
 			tdlsDelStaCmd->sessionId = sessionId;
 
-			cdf_mem_copy(tdlsDelStaCmdInfo->peermac.bytes,
+			qdf_mem_copy(tdlsDelStaCmdInfo->peermac.bytes,
 				     peerMac, QDF_MAC_ADDR_SIZE);
 
 			tdlsDelStaCmd->command = eSmeCommandTdlsDelPeer;
@@ -390,7 +390,7 @@
 	}
 
 	tdlsSendMgmtReq =
-		cdf_mem_malloc(sizeof(tSirTdlsSendMgmtReq) +
+		qdf_mem_malloc(sizeof(tSirTdlsSendMgmtReq) +
 			       tdlsSendMgmtCmdInfo->len);
 	if (NULL == tdlsSendMgmtReq)
 		status = QDF_STATUS_E_NOMEM;
@@ -411,14 +411,14 @@
 	tdlsSendMgmtReq->responder = tdlsSendMgmtCmdInfo->responder;
 	tdlsSendMgmtReq->peerCapability = tdlsSendMgmtCmdInfo->peerCapability;
 
-	cdf_mem_copy(tdlsSendMgmtReq->bssid.bytes,
+	qdf_mem_copy(tdlsSendMgmtReq->bssid.bytes,
 		     pSession->pConnectBssDesc->bssId, QDF_MAC_ADDR_SIZE);
 
-	cdf_mem_copy(tdlsSendMgmtReq->peer_mac.bytes,
+	qdf_mem_copy(tdlsSendMgmtReq->peer_mac.bytes,
 		     tdlsSendMgmtCmdInfo->peerMac, QDF_MAC_ADDR_SIZE);
 
 	if (tdlsSendMgmtCmdInfo->len && tdlsSendMgmtCmdInfo->buf) {
-		cdf_mem_copy(tdlsSendMgmtReq->addIe, tdlsSendMgmtCmdInfo->buf,
+		qdf_mem_copy(tdlsSendMgmtReq->addIe, tdlsSendMgmtCmdInfo->buf,
 			     tdlsSendMgmtCmdInfo->len);
 
 	}
@@ -433,7 +433,7 @@
 	}
 	if (tdlsSendMgmtCmdInfo->len && tdlsSendMgmtCmdInfo->buf) {
 		/* Done with the buf. Free it. */
-		cdf_mem_free(tdlsSendMgmtCmdInfo->buf);
+		qdf_mem_free(tdlsSendMgmtCmdInfo->buf);
 		tdlsSendMgmtCmdInfo->buf = NULL;
 		tdlsSendMgmtCmdInfo->len = 0;
 	}
@@ -459,7 +459,7 @@
 		return QDF_STATUS_E_FAILURE;
 	}
 
-	tdlsAddStaReq = cdf_mem_malloc(sizeof(tSirTdlsAddStaReq));
+	tdlsAddStaReq = qdf_mem_malloc(sizeof(tSirTdlsAddStaReq));
 	if (NULL == tdlsAddStaReq)
 		status = QDF_STATUS_E_NOMEM;
 	else
@@ -475,7 +475,7 @@
 	/* Using dialog as transactionId. This can be used to match response with request */
 	tdlsAddStaReq->transactionId = 0;
 
-	cdf_mem_copy(tdlsAddStaReq->bssid.bytes,
+	qdf_mem_copy(tdlsAddStaReq->bssid.bytes,
 		     pSession->pConnectBssDesc->bssId, QDF_MAC_ADDR_SIZE);
 
 	qdf_copy_macaddr(&tdlsAddStaReq->peermac,
@@ -485,19 +485,19 @@
 	tdlsAddStaReq->uapsd_queues = tdlsAddStaCmdInfo->uapsdQueues;
 	tdlsAddStaReq->max_sp = tdlsAddStaCmdInfo->maxSp;
 
-	cdf_mem_copy(tdlsAddStaReq->extn_capability,
+	qdf_mem_copy(tdlsAddStaReq->extn_capability,
 		     tdlsAddStaCmdInfo->extnCapability, SIR_MAC_MAX_EXTN_CAP);
 	tdlsAddStaReq->htcap_present = tdlsAddStaCmdInfo->htcap_present;
-	cdf_mem_copy(&tdlsAddStaReq->htCap,
+	qdf_mem_copy(&tdlsAddStaReq->htCap,
 		     &tdlsAddStaCmdInfo->HTCap,
 		     sizeof(tdlsAddStaCmdInfo->HTCap));
 	tdlsAddStaReq->vhtcap_present = tdlsAddStaCmdInfo->vhtcap_present;
-	cdf_mem_copy(&tdlsAddStaReq->vhtCap,
+	qdf_mem_copy(&tdlsAddStaReq->vhtCap,
 		     &tdlsAddStaCmdInfo->VHTCap,
 		     sizeof(tdlsAddStaCmdInfo->VHTCap));
 	tdlsAddStaReq->supported_rates_length =
 		tdlsAddStaCmdInfo->supportedRatesLen;
-	cdf_mem_copy(&tdlsAddStaReq->supported_rates,
+	qdf_mem_copy(&tdlsAddStaReq->supported_rates,
 		     tdlsAddStaCmdInfo->supportedRates,
 		     tdlsAddStaCmdInfo->supportedRatesLen);
 
@@ -530,7 +530,7 @@
 		return QDF_STATUS_E_FAILURE;
 	}
 
-	tdlsDelStaReq = cdf_mem_malloc(sizeof(tSirTdlsDelStaReq));
+	tdlsDelStaReq = qdf_mem_malloc(sizeof(tSirTdlsDelStaReq));
 	if (NULL == tdlsDelStaReq)
 		status = QDF_STATUS_E_NOMEM;
 	else
@@ -545,7 +545,7 @@
 	/* Using dialog as transactionId. This can be used to match response with request */
 	tdlsDelStaReq->transactionId = 0;
 
-	cdf_mem_copy(tdlsDelStaReq->bssid.bytes,
+	qdf_mem_copy(tdlsDelStaReq->bssid.bytes,
 		     pSession->pConnectBssDesc->bssId, QDF_MAC_ADDR_SIZE);
 
 	qdf_copy_macaddr(&tdlsDelStaReq->peermac,
@@ -627,7 +627,7 @@
 		return QDF_STATUS_E_FAILURE;
 	}
 
-	tdlsLinkEstablishReq = cdf_mem_malloc(sizeof(tSirTdlsLinkEstablishReq));
+	tdlsLinkEstablishReq = qdf_mem_malloc(sizeof(tSirTdlsLinkEstablishReq));
 
 	if (tdlsLinkEstablishReq == NULL) {
 		sms_log(pMac, LOGE, FL("alloc failed"));
@@ -639,14 +639,14 @@
 	tdlsLinkEstablishReq->transactionId = 0;
 	qdf_copy_macaddr(&tdlsLinkEstablishReq->peermac,
 			 &tdlsLinkEstablishCmdInfo->peermac);
-	cdf_mem_copy(tdlsLinkEstablishReq->bssid.bytes,
+	qdf_mem_copy(tdlsLinkEstablishReq->bssid.bytes,
 		     pSession->pConnectBssDesc->bssId, QDF_MAC_ADDR_SIZE);
-	cdf_mem_copy(tdlsLinkEstablishReq->supportedChannels,
+	qdf_mem_copy(tdlsLinkEstablishReq->supportedChannels,
 		     tdlsLinkEstablishCmdInfo->supportedChannels,
 		     tdlsLinkEstablishCmdInfo->supportedChannelsLen);
 	tdlsLinkEstablishReq->supportedChannelsLen =
 		tdlsLinkEstablishCmdInfo->supportedChannelsLen;
-	cdf_mem_copy(tdlsLinkEstablishReq->supportedOperClasses,
+	qdf_mem_copy(tdlsLinkEstablishReq->supportedOperClasses,
 		     tdlsLinkEstablishCmdInfo->supportedOperClasses,
 		     tdlsLinkEstablishCmdInfo->supportedOperClassesLen);
 	tdlsLinkEstablishReq->supportedOperClassesLen =
diff --git a/core/sme/src/csr/csr_util.c b/core/sme/src/csr/csr_util.c
index 3107e08..e181cf8 100644
--- a/core/sme/src/csr/csr_util.c
+++ b/core/sme/src/csr/csr_util.c
@@ -258,7 +258,7 @@
 bool csr_get_bss_id_bss_desc(tHalHandle hHal, tSirBssDescription *pSirBssDesc,
 			     struct qdf_mac_addr *pBssId)
 {
-	cdf_mem_copy(pBssId, &pSirBssDesc->bssId[0],
+	qdf_mem_copy(pBssId, &pSirBssDesc->bssId[0],
 			sizeof(struct qdf_mac_addr));
 	return true;
 }
@@ -1123,20 +1123,19 @@
 			break;
 		if (pIes1->SSID.num_ssid != pIesLocal->SSID.num_ssid)
 			break;
-		cdf_mem_copy(Ssid1.ssId, pIes1->SSID.ssid,
+		qdf_mem_copy(Ssid1.ssId, pIes1->SSID.ssid,
 			     pIes1->SSID.num_ssid);
-		cdf_mem_copy(Ssid2.ssId, pIesLocal->SSID.ssid,
+		qdf_mem_copy(Ssid2.ssId, pIesLocal->SSID.ssid,
 			     pIesLocal->SSID.num_ssid);
 
-		fEqual =
-			cdf_mem_compare(Ssid1.ssId, Ssid2.ssId,
-					pIesLocal->SSID.num_ssid);
+		fEqual = (!qdf_mem_cmp(Ssid1.ssId, Ssid2.ssId,
+					pIesLocal->SSID.num_ssid));
 
 	} while (0);
 	if (pIes1)
-		cdf_mem_free(pIes1);
+		qdf_mem_free(pIes1);
 	if (pIesLocal && !pIes2)
-		cdf_mem_free(pIesLocal);
+		qdf_mem_free(pIesLocal);
 
 	return fEqual;
 }
@@ -1172,7 +1171,7 @@
 	}
 	if ((pIes == NULL) && (NULL != pIesTemp)) {
 		/* we allocate memory here so free it before returning */
-		cdf_mem_free(pIesTemp);
+		qdf_mem_free(pIesTemp);
 	}
 
 	return fWme;
@@ -1246,15 +1245,15 @@
 	tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
 
 	if (pBssDesc && ppIEStruct) {
-		*ppIEStruct = cdf_mem_malloc(sizeof(tDot11fBeaconIEs));
+		*ppIEStruct = qdf_mem_malloc(sizeof(tDot11fBeaconIEs));
 		if ((*ppIEStruct) != NULL) {
-			cdf_mem_set((void *)*ppIEStruct,
+			qdf_mem_set((void *)*ppIEStruct,
 				    sizeof(tDot11fBeaconIEs), 0);
 			status =
 				csr_parse_bss_description_ies(hHal, pBssDesc,
 							       *ppIEStruct);
 			if (!QDF_IS_STATUS_SUCCESS(status)) {
-				cdf_mem_free(*ppIEStruct);
+				qdf_mem_free(*ppIEStruct);
 				*ppIEStruct = NULL;
 			}
 		} else {
@@ -2428,7 +2427,7 @@
 static bool csr_is_wapi_oui_equal(tpAniSirGlobal pMac, uint8_t *Oui1,
 				  uint8_t *Oui2)
 {
-	return cdf_mem_compare(Oui1, Oui2, CSR_WAPI_OUI_SIZE);
+	return !qdf_mem_cmp(Oui1, Oui2, CSR_WAPI_OUI_SIZE);
 }
 
 static bool csr_is_wapi_oui_match(tpAniSirGlobal pMac,
@@ -2447,7 +2446,7 @@
 	}
 
 	if (fYes && Oui) {
-		cdf_mem_copy(Oui, AllCyphers[idx], CSR_WAPI_OUI_SIZE);
+		qdf_mem_copy(Oui, AllCyphers[idx], CSR_WAPI_OUI_SIZE);
 	}
 
 	return fYes;
@@ -2457,7 +2456,7 @@
 static bool csr_is_wpa_oui_equal(tpAniSirGlobal pMac, uint8_t *Oui1,
 				 uint8_t *Oui2)
 {
-	return cdf_mem_compare(Oui1, Oui2, CSR_WPA_OUI_SIZE);
+	return !qdf_mem_cmp(Oui1, Oui2, CSR_WPA_OUI_SIZE);
 }
 
 static bool csr_is_oui_match(tpAniSirGlobal pMac,
@@ -2475,7 +2474,7 @@
 	}
 
 	if (fYes && Oui) {
-		cdf_mem_copy(Oui, AllCyphers[idx], CSR_WPA_OUI_SIZE);
+		qdf_mem_copy(Oui, AllCyphers[idx], CSR_WPA_OUI_SIZE);
 	}
 
 	return fYes;
@@ -2707,13 +2706,13 @@
 	if (!rsn_ie->present)
 		goto end;
 	c_mcast_cipher++;
-	cdf_mem_copy(mccipher_arr, rsn_ie->gp_cipher_suite,
+	qdf_mem_copy(mccipher_arr, rsn_ie->gp_cipher_suite,
 			CSR_RSN_OUI_SIZE);
 	c_ucast_cipher =
 		(uint8_t) (rsn_ie->pwise_cipher_suite_count);
 	c_auth_suites = (uint8_t) (rsn_ie->akm_suite_count);
 	for (i = 0; i < c_auth_suites && i < CSR_RSN_MAX_AUTH_SUITES; i++) {
-		cdf_mem_copy((void *)&authsuites[i],
+		qdf_mem_copy((void *)&authsuites[i],
 			(void *)&rsn_ie->akm_suites[i], CSR_RSN_OUI_SIZE);
 	}
 
@@ -2814,14 +2813,14 @@
 end:
 	if (acceptable_cipher) {
 		if (mcast_cipher)
-			cdf_mem_copy(mcast_cipher, multicast,
+			qdf_mem_copy(mcast_cipher, multicast,
 					CSR_RSN_OUI_SIZE);
 
 		if (ucast_cipher)
-			cdf_mem_copy(ucast_cipher, unicast, CSR_RSN_OUI_SIZE);
+			qdf_mem_copy(ucast_cipher, unicast, CSR_RSN_OUI_SIZE);
 
 		if (auth_suite)
-			cdf_mem_copy(auth_suite, authentication,
+			qdf_mem_copy(auth_suite, authentication,
 					CSR_RSN_OUI_SIZE);
 
 		if (negotiated_authtype)
@@ -2985,7 +2984,7 @@
 			sms_log(pMac, LOG1,
 				"match PMKID " MAC_ADDRESS_STR " to ",
 				MAC_ADDR_ARRAY(pBSSId));
-			if (cdf_mem_compare
+			if (!qdf_mem_cmp
 			    (pBSSId, pSession->PmkidCacheInfo[Index].BSSID.bytes,
 			    sizeof(struct qdf_mac_addr))) {
 				/* match found */
@@ -2997,7 +2996,7 @@
 		if (!fMatchFound)
 			break;
 
-		cdf_mem_copy(pPMKId, pSession->PmkidCacheInfo[Index].PMKID,
+		qdf_mem_copy(pPMKId, pSession->PmkidCacheInfo[Index].PMKID,
 			     CSR_RSN_PMKID_SIZE);
 
 		fRC = true;
@@ -3058,12 +3057,12 @@
 
 		pRSNIe->Version = CSR_RSN_VERSION_SUPPORTED;
 
-		cdf_mem_copy(pRSNIe->MulticastOui, MulticastCypher,
+		qdf_mem_copy(pRSNIe->MulticastOui, MulticastCypher,
 			     sizeof(MulticastCypher));
 
 		pRSNIe->cUnicastCyphers = 1;
 
-		cdf_mem_copy(&pRSNIe->UnicastOui[0], UnicastCypher,
+		qdf_mem_copy(&pRSNIe->UnicastOui[0], UnicastCypher,
 			     sizeof(UnicastCypher));
 
 		pAuthSuite =
@@ -3071,7 +3070,7 @@
 					   UnicastOui[pRSNIe->cUnicastCyphers]);
 
 		pAuthSuite->cAuthenticationSuites = 1;
-		cdf_mem_copy(&pAuthSuite->AuthOui[0], AuthSuite,
+		qdf_mem_copy(&pAuthSuite->AuthOui[0], AuthSuite,
 			     sizeof(AuthSuite));
 
 		/* RSN capabilities follows the Auth Suite (two octects) */
@@ -3105,7 +3104,7 @@
 					 &(PMKId[0]))) {
 			pPMK->cPMKIDs = 1;
 
-			cdf_mem_copy(pPMK->PMKIDList[0].PMKID, PMKId,
+			qdf_mem_copy(pPMK->PMKIDList[0].PMKID, PMKId,
 				     CSR_RSN_PMKID_SIZE);
 		} else {
 			pPMK->cPMKIDs = 0;
@@ -3116,7 +3115,7 @@
 			pGroupMgmtCipherSuite =
 				(uint8_t *) pPMK + sizeof(uint16_t) +
 				(pPMK->cPMKIDs * CSR_RSN_PMKID_SIZE);
-			cdf_mem_copy(pGroupMgmtCipherSuite, csr_rsn_oui[07],
+			qdf_mem_copy(pGroupMgmtCipherSuite, csr_rsn_oui[07],
 				     CSR_WPA_OUI_SIZE);
 		}
 #endif
@@ -3150,7 +3149,7 @@
 
 	if (!pIes && pIesLocal) {
 		/* locally allocated */
-		cdf_mem_free(pIesLocal);
+		qdf_mem_free(pIesLocal);
 	}
 
 	return cbRSNIe;
@@ -3199,12 +3198,12 @@
 		goto end;
 
 	c_mcast_cipher++;
-	cdf_mem_copy(mccipher_arr, wapi_ie->multicast_cipher_suite,
+	qdf_mem_copy(mccipher_arr, wapi_ie->multicast_cipher_suite,
 			CSR_WAPI_OUI_SIZE);
 	c_ucast_cipher = (uint8_t) (wapi_ie->unicast_cipher_suite_count);
 	c_auth_suites = (uint8_t) (wapi_ie->akm_suite_count);
 	for (i = 0; i < c_auth_suites && i < CSR_WAPI_MAX_AUTH_SUITES; i++)
-		cdf_mem_copy((void *)&authsuites[i],
+		qdf_mem_copy((void *)&authsuites[i],
 			(void *)&wapi_ie->akm_suites[i], CSR_WAPI_OUI_SIZE);
 
 	wapioui_idx = csr_get_oui_index_from_cipher(encr_type);
@@ -3277,12 +3276,12 @@
 end:
 	if (acceptable_cipher) {
 		if (mcast_cipher)
-			cdf_mem_copy(mcast_cipher, multicast,
+			qdf_mem_copy(mcast_cipher, multicast,
 					CSR_WAPI_OUI_SIZE);
 		if (ucast_cipher)
-			cdf_mem_copy(ucast_cipher, unicast, CSR_WAPI_OUI_SIZE);
+			qdf_mem_copy(ucast_cipher, unicast, CSR_WAPI_OUI_SIZE);
 		if (auth_suite)
-			cdf_mem_copy(auth_suite, authentication,
+			qdf_mem_copy(auth_suite, authentication,
 					CSR_WAPI_OUI_SIZE);
 		if (negotiated_authtype)
 			*negotiated_authtype = neg_authtype;
@@ -3322,7 +3321,7 @@
 		for (Index = 0; Index < pSession->NumBkidCache; Index++) {
 			sms_log(pMac, LOGW, "match BKID " MAC_ADDRESS_STR " to ",
 				MAC_ADDR_ARRAY(pBSSId));
-			if (cdf_mem_compare
+			if (!qdf_mem_cmp
 			    (pBSSId, pSession->BkidCacheInfo[Index].BSSID.bytes,
 				    sizeof(struct qdf_mac_addr))) {
 				/* match found */
@@ -3334,7 +3333,7 @@
 		if (!fMatchFound)
 			break;
 
-		cdf_mem_copy(pBKId, pSession->BkidCacheInfo[Index].BKID,
+		qdf_mem_copy(pBKId, pSession->BkidCacheInfo[Index].BKID,
 			     CSR_WAPI_BKID_SIZE);
 
 		fRC = true;
@@ -3383,24 +3382,24 @@
 		if (!fWapiMatch)
 			break;
 
-		cdf_mem_set(pWapiIe, sizeof(tCsrWapiIe), 0);
+		qdf_mem_set(pWapiIe, sizeof(tCsrWapiIe), 0);
 
 		pWapiIe->IeHeader.ElementID = DOT11F_EID_WAPI;
 
 		pWapiIe->Version = CSR_WAPI_VERSION_SUPPORTED;
 
 		pWapiIe->cAuthenticationSuites = 1;
-		cdf_mem_copy(&pWapiIe->AuthOui[0], AuthSuite,
+		qdf_mem_copy(&pWapiIe->AuthOui[0], AuthSuite,
 			     sizeof(AuthSuite));
 
 		pWapi = (uint8_t *) (&pWapiIe->AuthOui[1]);
 
 		*pWapi = (uint16_t) 1;  /* cUnicastCyphers */
 		pWapi += 2;
-		cdf_mem_copy(pWapi, UnicastCypher, sizeof(UnicastCypher));
+		qdf_mem_copy(pWapi, UnicastCypher, sizeof(UnicastCypher));
 		pWapi += sizeof(UnicastCypher);
 
-		cdf_mem_copy(pWapi, MulticastCypher, sizeof(MulticastCypher));
+		qdf_mem_copy(pWapi, MulticastCypher, sizeof(MulticastCypher));
 		pWapi += sizeof(MulticastCypher);
 
 		/* WAPI capabilities follows the Auth Suite (two octects) */
@@ -3416,7 +3415,7 @@
 			/* Do we need to change the endianness here */
 			*pWapi = (uint16_t) 1;  /* cBKIDs */
 			pWapi += 2;
-			cdf_mem_copy(pWapi, BKId, CSR_WAPI_BKID_SIZE);
+			qdf_mem_copy(pWapi, BKId, CSR_WAPI_BKID_SIZE);
 		} else {
 			*pWapi = 0;
 			pWapi += 1;
@@ -3442,7 +3441,7 @@
 
 	if (!pIes && pIesLocal) {
 		/* locally allocated */
-		cdf_mem_free(pIesLocal);
+		qdf_mem_free(pIesLocal);
 	}
 
 	return cbWapiIe;
@@ -3487,7 +3486,7 @@
 	if (!wpa_ie->present)
 		goto end;
 	c_mcast_cipher = 1;
-	cdf_mem_copy(mccipher_arr, wpa_ie->multicast_cipher, CSR_WPA_OUI_SIZE);
+	qdf_mem_copy(mccipher_arr, wpa_ie->multicast_cipher, CSR_WPA_OUI_SIZE);
 	c_ucast_cipher = (uint8_t) (wpa_ie->unicast_cipher_count);
 	c_auth_suites = (uint8_t) (wpa_ie->auth_suite_count);
 
@@ -3558,15 +3557,15 @@
 end:
 	if (acceptable_cipher) {
 		if (mcast_cipher)
-			cdf_mem_copy((uint8_t **) mcast_cipher, multicast,
+			qdf_mem_copy((uint8_t **) mcast_cipher, multicast,
 					CSR_WPA_OUI_SIZE);
 
 		if (ucast_cipher)
-			cdf_mem_copy((uint8_t **) ucast_cipher, unicast,
+			qdf_mem_copy((uint8_t **) ucast_cipher, unicast,
 					CSR_WPA_OUI_SIZE);
 
 		if (auth_suite)
-			cdf_mem_copy((uint8_t **) auth_suite, authentication,
+			qdf_mem_copy((uint8_t **) auth_suite, authentication,
 					CSR_WPA_OUI_SIZE);
 
 		if (negotiated_authtype)
@@ -3630,16 +3629,16 @@
 
 		pWpaIe->IeHeader.ElementID = SIR_MAC_WPA_EID;
 
-		cdf_mem_copy(pWpaIe->Oui, csr_wpa_oui[01], sizeof(pWpaIe->Oui));
+		qdf_mem_copy(pWpaIe->Oui, csr_wpa_oui[01], sizeof(pWpaIe->Oui));
 
 		pWpaIe->Version = CSR_WPA_VERSION_SUPPORTED;
 
-		cdf_mem_copy(pWpaIe->MulticastOui, MulticastCypher,
+		qdf_mem_copy(pWpaIe->MulticastOui, MulticastCypher,
 			     sizeof(MulticastCypher));
 
 		pWpaIe->cUnicastCyphers = 1;
 
-		cdf_mem_copy(&pWpaIe->UnicastOui[0], UnicastCypher,
+		qdf_mem_copy(&pWpaIe->UnicastOui[0], UnicastCypher,
 			     sizeof(UnicastCypher));
 
 		pAuthSuite =
@@ -3647,7 +3646,7 @@
 					   UnicastOui[pWpaIe->cUnicastCyphers]);
 
 		pAuthSuite->cAuthenticationSuites = 1;
-		cdf_mem_copy(&pAuthSuite->AuthOui[0], AuthSuite,
+		qdf_mem_copy(&pAuthSuite->AuthOui[0], AuthSuite,
 			     sizeof(AuthSuite));
 
 		/* The WPA capabilities follows the Auth Suite (two octects)-- */
@@ -3669,7 +3668,7 @@
 
 	if (!pIes && pIesLocal) {
 		/* locally allocated */
-		cdf_mem_free(pIesLocal);
+		qdf_mem_free(pIesLocal);
 	}
 
 	return cbWpaIe;
@@ -3691,7 +3690,7 @@
 			if (SIR_MAC_WPA_IE_MAX_LENGTH >=
 			    pProfile->nWPAReqIELength) {
 				cbWpaIe = (uint8_t) pProfile->nWPAReqIELength;
-				cdf_mem_copy(pWpaIe, pProfile->pWPAReqIE,
+				qdf_mem_copy(pWpaIe, pProfile->pWPAReqIE,
 					     cbWpaIe);
 			} else {
 				sms_log(pMac, LOGW,
@@ -3732,7 +3731,7 @@
 			if (SIR_MAC_WPA_IE_MAX_LENGTH >=
 			    pProfile->nRSNReqIELength) {
 				cbRsnIe = (uint8_t) pProfile->nRSNReqIELength;
-				cdf_mem_copy(pRsnIe, pProfile->pRSNReqIE,
+				qdf_mem_copy(pRsnIe, pProfile->pRSNReqIE,
 					     cbRsnIe);
 			} else {
 				sms_log(pMac, LOGW,
@@ -3767,7 +3766,7 @@
 			if (DOT11F_IE_WAPI_MAX_LEN >=
 			    pProfile->nWAPIReqIELength) {
 				cbWapiIe = (uint8_t) pProfile->nWAPIReqIELength;
-				cdf_mem_copy(pWapiIe, pProfile->pWAPIReqIE,
+				qdf_mem_copy(pWapiIe, pProfile->pWAPIReqIE,
 					     cbWapiIe);
 			} else {
 				sms_log(pMac, LOGW,
@@ -3965,18 +3964,18 @@
 
 	/* else we can use the encryption type directly */
 	if (ie_ptr->WPA.present) {
-		match = cdf_mem_compare(ie_ptr->WPA.multicast_cipher,
+		match = (!qdf_mem_cmp(ie_ptr->WPA.multicast_cipher,
 				csr_wpa_oui[csr_get_oui_index_from_cipher(
 					uc_encry_type)],
-				CSR_WPA_OUI_SIZE);
+				CSR_WPA_OUI_SIZE));
 		if (match)
 			goto end;
 	}
 	if (ie_ptr->RSN.present) {
-		match = cdf_mem_compare(ie_ptr->RSN.gp_cipher_suite,
+		match = (!qdf_mem_cmp(ie_ptr->RSN.gp_cipher_suite,
 				csr_rsn_oui[csr_get_oui_index_from_cipher(
 					uc_encry_type)],
-				CSR_RSN_OUI_SIZE);
+				CSR_RSN_OUI_SIZE));
 	}
 
 
@@ -4292,7 +4291,7 @@
 
 		if (ssid1Len != bssSsidLen)
 			break;
-		if (cdf_mem_compare(bssSsid, ssid1, bssSsidLen)) {
+		if (!qdf_mem_cmp(bssSsid, ssid1, bssSsidLen)) {
 			fMatch = true;
 			break;
 		}
@@ -4317,9 +4316,9 @@
 			    ||
 			    ((pSsidList->SSIDList[i].SSID.length ==
 			      pSsid->length)
-			     && cdf_mem_compare(pSsid->ssId,
+			     && (!qdf_mem_cmp(pSsid->ssId,
 						pSsidList->SSIDList[i].SSID.
-						ssId, pSsid->length))) {
+						ssId, pSsid->length)))) {
 				fMatch = true;
 				break;
 			}
@@ -4337,7 +4336,7 @@
 
 	/* for efficiency of the MAC_ADDRESS functions, move the */
 	/* Bssid's into MAC_ADDRESS structs. */
-	cdf_mem_copy(&ProfileBssid, pProfBssid, sizeof(struct qdf_mac_addr));
+	qdf_mem_copy(&ProfileBssid, pProfBssid, sizeof(struct qdf_mac_addr));
 
 	do {
 
@@ -4845,7 +4844,7 @@
 	if (ie_dblptr)
 		*ie_dblptr = ie_ptr;
 	else if (ie_ptr)
-		cdf_mem_free(ie_ptr);
+		qdf_mem_free(ie_ptr);
 	return rc;
 }
 
@@ -4933,7 +4932,7 @@
 
 	if (!pIes && pIesLocal) {
 		/* locally allocated */
-		cdf_mem_free(pIesLocal);
+		qdf_mem_free(pIesLocal);
 	}
 
 	return fRC;
@@ -5169,57 +5168,57 @@
 {
 	if (pProfile) {
 		if (pProfile->BSSIDs.bssid) {
-			cdf_mem_free(pProfile->BSSIDs.bssid);
+			qdf_mem_free(pProfile->BSSIDs.bssid);
 			pProfile->BSSIDs.bssid = NULL;
 		}
 		if (pProfile->SSIDs.SSIDList) {
-			cdf_mem_free(pProfile->SSIDs.SSIDList);
+			qdf_mem_free(pProfile->SSIDs.SSIDList);
 			pProfile->SSIDs.SSIDList = NULL;
 		}
 		if (pProfile->pWPAReqIE) {
-			cdf_mem_free(pProfile->pWPAReqIE);
+			qdf_mem_free(pProfile->pWPAReqIE);
 			pProfile->pWPAReqIE = NULL;
 		}
 		if (pProfile->pRSNReqIE) {
-			cdf_mem_free(pProfile->pRSNReqIE);
+			qdf_mem_free(pProfile->pRSNReqIE);
 			pProfile->pRSNReqIE = NULL;
 		}
 #ifdef FEATURE_WLAN_WAPI
 		if (pProfile->pWAPIReqIE) {
-			cdf_mem_free(pProfile->pWAPIReqIE);
+			qdf_mem_free(pProfile->pWAPIReqIE);
 			pProfile->pWAPIReqIE = NULL;
 		}
 #endif /* FEATURE_WLAN_WAPI */
 
 		if (pProfile->pAddIEScan) {
-			cdf_mem_free(pProfile->pAddIEScan);
+			qdf_mem_free(pProfile->pAddIEScan);
 			pProfile->pAddIEScan = NULL;
 		}
 
 		if (pProfile->pAddIEAssoc) {
-			cdf_mem_free(pProfile->pAddIEAssoc);
+			qdf_mem_free(pProfile->pAddIEAssoc);
 			pProfile->pAddIEAssoc = NULL;
 		}
 		if (pProfile->ChannelInfo.ChannelList) {
-			cdf_mem_free(pProfile->ChannelInfo.ChannelList);
+			qdf_mem_free(pProfile->ChannelInfo.ChannelList);
 			pProfile->ChannelInfo.ChannelList = NULL;
 		}
-		cdf_mem_set(pProfile, sizeof(tCsrRoamProfile), 0);
+		qdf_mem_set(pProfile, sizeof(tCsrRoamProfile), 0);
 	}
 }
 
 void csr_free_scan_filter(tpAniSirGlobal pMac, tCsrScanResultFilter *pScanFilter)
 {
 	if (pScanFilter->BSSIDs.bssid) {
-		cdf_mem_free(pScanFilter->BSSIDs.bssid);
+		qdf_mem_free(pScanFilter->BSSIDs.bssid);
 		pScanFilter->BSSIDs.bssid = NULL;
 	}
 	if (pScanFilter->ChannelInfo.ChannelList) {
-		cdf_mem_free(pScanFilter->ChannelInfo.ChannelList);
+		qdf_mem_free(pScanFilter->ChannelInfo.ChannelList);
 		pScanFilter->ChannelInfo.ChannelList = NULL;
 	}
 	if (pScanFilter->SSIDs.SSIDList) {
-		cdf_mem_free(pScanFilter->SSIDs.SSIDList);
+		qdf_mem_free(pScanFilter->SSIDs.SSIDList);
 		pScanFilter->SSIDs.SSIDList = NULL;
 	}
 }
@@ -5230,7 +5229,7 @@
 
 	if (pSession->pCurRoamProfile) {
 		csr_release_profile(pMac, pSession->pCurRoamProfile);
-		cdf_mem_free(pSession->pCurRoamProfile);
+		qdf_mem_free(pSession->pCurRoamProfile);
 		pSession->pCurRoamProfile = NULL;
 	}
 }
@@ -5240,7 +5239,7 @@
 	tCsrRoamSession *pSession = &pMac->roam.roamSession[sessionId];
 
 	if (pSession->pConnectBssDesc) {
-		cdf_mem_free(pSession->pConnectBssDesc);
+		qdf_mem_free(pSession->pConnectBssDesc);
 		pSession->pConnectBssDesc = NULL;
 	}
 }
@@ -5452,7 +5451,7 @@
 			for (i = 0; i < WNI_CFG_COUNTRY_CODE_LEN - 1; i++) {
 				pCountry[i] = csr_to_upper(pCountry[i]);
 			}
-			if (!cdf_mem_compare(pIes->Country.country, pCountry,
+			if (qdf_mem_cmp(pIes->Country.country, pCountry,
 					     WNI_CFG_COUNTRY_CODE_LEN - 1)) {
 				fRet = false;
 				break;
@@ -5472,7 +5471,7 @@
 		return QDF_STATUS_E_FAILURE;
 	}
 
-	cdf_mem_copy(pModifyProfileFields,
+	qdf_mem_copy(pModifyProfileFields,
 		     &pMac->roam.roamSession[sessionId].connectedProfile.
 		     modifyProfileFields, sizeof(tCsrRoamModifyProfileFields));
 
@@ -5485,7 +5484,7 @@
 {
 	tCsrRoamSession *pSession = CSR_GET_SESSION(pMac, sessionId);
 
-	cdf_mem_copy(&pSession->connectedProfile.modifyProfileFields,
+	qdf_mem_copy(&pSession->connectedProfile.modifyProfileFields,
 		     pModifyProfileFields, sizeof(tCsrRoamModifyProfileFields));
 
 	return QDF_STATUS_SUCCESS;
@@ -5633,7 +5632,7 @@
 {
 	WLAN_HOST_DIAG_EVENT_DEF(diag_event, host_event_wlan_pe_payload_type);
 
-	cdf_mem_zero(&diag_event, sizeof(host_event_wlan_pe_payload_type));
+	qdf_mem_zero(&diag_event, sizeof(host_event_wlan_pe_payload_type));
 
 	/* diag_event.bssid is already all zeroes */
 	diag_event.sme_state = sme_get_lim_sme_state(pmac);
diff --git a/core/sme/src/nan/nan_api.c b/core/sme/src/nan/nan_api.c
index 849d5fb..7fc71e0 100644
--- a/core/sme/src/nan/nan_api.c
+++ b/core/sme/src/nan/nan_api.c
@@ -79,7 +79,7 @@
 	size_t data_len;
 
 	data_len = sizeof(tNanRequest) + input->request_data_len;
-	data = cdf_mem_malloc(data_len);
+	data = qdf_mem_malloc(data_len);
 
 	if (data == NULL) {
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
@@ -87,10 +87,10 @@
 		return QDF_STATUS_E_NOMEM;
 	}
 
-	cdf_mem_zero(data, data_len);
+	qdf_mem_zero(data, data_len);
 	data->request_data_len = input->request_data_len;
 	if (input->request_data_len) {
-		cdf_mem_copy(data->request_data,
+		qdf_mem_copy(data->request_data,
 			     input->request_data, input->request_data_len);
 	}
 
@@ -102,7 +102,7 @@
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 			  FL
 				  ("Not able to post WMA_NAN_REQUEST message to WMA"));
-		cdf_mem_free(data);
+		qdf_mem_free(data);
 		return QDF_STATUS_SUCCESS;
 	}
 
diff --git a/core/sme/src/oem_data/oem_data_api.c b/core/sme/src/oem_data/oem_data_api.c
index 5474e8c..6478e19 100644
--- a/core/sme/src/oem_data/oem_data_api.c
+++ b/core/sme/src/oem_data/oem_data_api.c
@@ -58,7 +58,7 @@
 
 	do {
 		/* initialize all the variables to null */
-		cdf_mem_set(&(pMac->oemData), sizeof(tOemDataStruct), 0);
+		qdf_mem_set(&(pMac->oemData), sizeof(tOemDataStruct), 0);
 		if (!QDF_IS_STATUS_SUCCESS(status)) {
 			sms_log(pMac, LOGE,
 				"oem_data_oem_data_req_open: Cannot allocate memory for the timer function");
@@ -88,7 +88,7 @@
 		}
 
 		/* initialize all the variables to null */
-		cdf_mem_set(&(pMac->oemData), sizeof(tOemDataStruct), 0);
+		qdf_mem_set(&(pMac->oemData), sizeof(tOemDataStruct), 0);
 
 	} while (0);
 
@@ -110,12 +110,12 @@
 	if (csr_ll_remove_entry
 		    (&pMac->sme.smeCmdActiveList, &pOemDataCmd->Link, LL_ACCESS_LOCK)) {
 		if (pOemDataCmd->u.oemDataCmd.oemDataReq.data) {
-			cdf_mem_free(
+			qdf_mem_free(
 			    pOemDataCmd->u.oemDataCmd.oemDataReq.data);
 			pOemDataCmd->u.oemDataCmd.oemDataReq.data =
 			    NULL;
 		}
-		cdf_mem_zero(&(pOemDataCmd->u.oemDataCmd), sizeof(tOemDataCmd));
+		qdf_mem_zero(&(pOemDataCmd->u.oemDataCmd), sizeof(tOemDataCmd));
 
 		/* Now put this command back on the avilable command list */
 		sme_release_command(pMac, pOemDataCmd);
@@ -165,7 +165,7 @@
 			/* set the oem data request */
 			cmd_req->sessionId = sessionId;
 			cmd_req->data_len =  oemDataReqConfig->data_len;
-			cmd_req->data = cdf_mem_malloc(cmd_req->data_len);
+			cmd_req->data = qdf_mem_malloc(cmd_req->data_len);
 
 			if (!cmd_req->data) {
 				sms_log(pMac, LOGE, FL("memory alloc failed"));
@@ -173,7 +173,7 @@
 				break;
 			}
 
-			cdf_mem_copy((void *)(cmd_req->data),
+			qdf_mem_copy((void *)(cmd_req->data),
 				     (void *)(oemDataReqConfig->data),
 				     cmd_req->data_len);
 		} else {
@@ -220,9 +220,9 @@
 		return QDF_STATUS_E_INVAL;
 	}
 
-	pMsg = cdf_mem_malloc(sizeof(*pMsg));
+	pMsg = qdf_mem_malloc(sizeof(*pMsg));
 	if (NULL == pMsg) {
-		sms_log(pMac, LOGP, FL("cdf_mem_malloc failed"));
+		sms_log(pMac, LOGP, FL("qdf_mem_malloc failed"));
 		return QDF_STATUS_E_NOMEM;
 	}
 
@@ -333,11 +333,11 @@
 				if (csr_ll_remove_entry
 					    (&pMac->sme.smeCmdActiveList,
 					    &pCommand->Link, LL_ACCESS_LOCK)) {
-					cdf_mem_set(&(pCommand->u.oemDataCmd),
+					qdf_mem_set(&(pCommand->u.oemDataCmd),
 						    sizeof(tOemDataCmd), 0);
 					req =
 					   &(pCommand->u.oemDataCmd.oemDataReq);
-					cdf_mem_free(req->data);
+					qdf_mem_free(req->data);
 					sme_release_command(pMac, pCommand);
 				}
 			}
diff --git a/core/sme/src/p2p/p2p_api.c b/core/sme/src/p2p/p2p_api.c
index 3f84dfb..9deb167 100644
--- a/core/sme/src/p2p/p2p_api.c
+++ b/core/sme/src/p2p/p2p_api.c
@@ -70,13 +70,13 @@
 		goto error;
 	}
 
-	pMsg = cdf_mem_malloc(len);
+	pMsg = qdf_mem_malloc(len);
 	if (NULL == pMsg)
 		goto error;
 	else {
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_INFO, "%s call",
 			  __func__);
-		cdf_mem_set(pMsg, sizeof(tSirRemainOnChnReq), 0);
+		qdf_mem_set(pMsg, sizeof(tSirRemainOnChnReq), 0);
 		pMsg->messageType = eWNI_SME_REMAIN_ON_CHANNEL_REQ;
 		pMsg->length = (uint16_t) len;
 		qdf_copy_macaddr(&pMsg->selfMacAddr, &pSession->selfMacAddr);
@@ -88,7 +88,7 @@
 			p2pRemainonChn->u.remainChlCmd.isP2PProbeReqAllowed;
 		pMsg->scan_id = p2pRemainonChn->u.remainChlCmd.scan_id;
 		if (pMac->p2pContext.probeRspIeLength)
-			cdf_mem_copy((void *)pMsg->probeRspIe,
+			qdf_mem_copy((void *)pMsg->probeRspIe,
 				     (void *)pMac->p2pContext.probeRspIe,
 				     pMac->p2pContext.probeRspIeLength);
 		status = cds_send_mb_message_to_mac(pMsg);
@@ -196,7 +196,7 @@
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
 
 	/* If static structure is too big, Need to change this function to allocate memory dynamically */
-	cdf_mem_zero(&pMac->p2pContext, sizeof(tp2pContext));
+	qdf_mem_zero(&pMac->p2pContext, sizeof(tp2pContext));
 
 	if (!QDF_IS_STATUS_SUCCESS(status)) {
 		sme_p2p_close(hHal);
@@ -210,7 +210,7 @@
 	tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
 
 	if (pMac->p2pContext.probeRspIe) {
-		cdf_mem_free(pMac->p2pContext.probeRspIe);
+		qdf_mem_free(pMac->p2pContext.probeRspIe);
 		pMac->p2pContext.probeRspIe = NULL;
 	}
 
@@ -224,7 +224,7 @@
 	tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
 
 	if (pMac->p2pContext.probeRspIe) {
-		cdf_mem_free(pMac->p2pContext.probeRspIe);
+		qdf_mem_free(pMac->p2pContext.probeRspIe);
 		pMac->p2pContext.probeRspIe = NULL;
 	}
 
@@ -314,18 +314,18 @@
 	QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_INFO_MED,
 		  " %s sends action frame", __func__);
 	msgLen = (uint16_t) ((sizeof(tSirMbMsgP2p)) + len);
-	pMsg = cdf_mem_malloc(msgLen);
+	pMsg = qdf_mem_malloc(msgLen);
 	if (NULL == pMsg)
 		status = QDF_STATUS_E_NOMEM;
 	else {
-		cdf_mem_set((void *)pMsg, msgLen, 0);
+		qdf_mem_set((void *)pMsg, msgLen, 0);
 		pMsg->type = eWNI_SME_SEND_ACTION_FRAME_IND;
 		pMsg->msgLen = msgLen;
 		pMsg->sessionId = sessionId;
 		pMsg->noack = noack;
 		pMsg->channel_freq = channel_freq;
 		pMsg->wait = (uint16_t) wait;
-		cdf_mem_copy(pMsg->data, pBuf, len);
+		qdf_mem_copy(pMsg->data, pBuf, len);
 		status = cds_send_mb_message_to_mac(pMsg);
 	}
 	return status;
@@ -341,11 +341,11 @@
 	/* Need to check session ID to support concurrency */
 
 	msgLen = (uint16_t) (sizeof(tSirMbMsgP2p));
-	pMsg = cdf_mem_malloc(msgLen);
+	pMsg = qdf_mem_malloc(msgLen);
 	if (NULL == pMsg)
 		status = QDF_STATUS_E_NOMEM;
 	else {
-		cdf_mem_set((void *)pMsg, msgLen, 0);
+		qdf_mem_set((void *)pMsg, msgLen, 0);
 		pMsg->type = eWNI_SME_ABORT_REMAIN_ON_CHAN_IND;
 		pMsg->msgLen = msgLen;
 		pMsg->sessionId = sessionId;
@@ -363,12 +363,12 @@
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
 	tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
 
-	pNoAParam = cdf_mem_malloc(sizeof(tP2pPsConfig));
+	pNoAParam = qdf_mem_malloc(sizeof(tP2pPsConfig));
 	if (NULL == pNoAParam)
 		status = QDF_STATUS_E_NOMEM;
 	else {
-		cdf_mem_set(pNoAParam, sizeof(tP2pPsConfig), 0);
-		cdf_mem_copy(pNoAParam, pNoA, sizeof(tP2pPsConfig));
+		qdf_mem_set(pNoAParam, sizeof(tP2pPsConfig), 0);
+		qdf_mem_copy(pNoAParam, pNoA, sizeof(tP2pPsConfig));
 		msg.type = eWNI_SME_UPDATE_NOA;
 		msg.bodyval = 0;
 		msg.bodyptr = pNoAParam;
diff --git a/core/sme/src/qos/sme_qos.c b/core/sme/src/qos/sme_qos.c
index 64eb0fe..0e3d4ff 100644
--- a/core/sme/src/qos/sme_qos.c
+++ b/core/sme/src/qos/sme_qos.c
@@ -520,7 +520,7 @@
 		  "%s: %d: initializing SME-QoS module", __func__, __LINE__);
 	/* init the control block */
 	/* (note that this will make all sessions invalid) */
-	cdf_mem_zero(&sme_qos_cb, sizeof(sme_qos_cb));
+	qdf_mem_zero(&sme_qos_cb, sizeof(sme_qos_cb));
 	sme_qos_cb.pMac = pMac;
 	sme_qos_cb.nextFlowId = SME_QOS_MIN_FLOW_ID;
 	sme_qos_cb.nextDialogToken = SME_QOS_MIN_DIALOG_TOKEN;
@@ -595,7 +595,7 @@
 
 		/* Clean up the assoc info if already allocated */
 		if (pSession->assocInfo.pBssDesc) {
-			cdf_mem_free(pSession->assocInfo.pBssDesc);
+			qdf_mem_free(pSession->assocInfo.pBssDesc);
 			pSession->assocInfo.pBssDesc = NULL;
 		}
 		/* close the session's buffered command list */
@@ -779,7 +779,7 @@
 
 void qos_release_command(tpAniSirGlobal pMac, tSmeCmd *pCommand)
 {
-	cdf_mem_zero(&pCommand->u.qosCmd, sizeof(tGenericQosCmd));
+	qdf_mem_zero(&pCommand->u.qosCmd, sizeof(tGenericQosCmd));
 	sme_release_command(pMac, pCommand);
 }
 
@@ -904,7 +904,7 @@
 		  "%s: %d: validated with status = %d",
 		  __func__, __LINE__, status);
 	if (pIes) {
-		cdf_mem_free(pIes);
+		qdf_mem_free(pIes);
 	}
 	return status;
 }
@@ -1183,7 +1183,7 @@
 			status)) {
 			/* we received an expected "good" status */
 			/* create an entry in the flow list */
-			pentry = cdf_mem_malloc(sizeof(*pentry));
+			pentry = qdf_mem_malloc(sizeof(*pentry));
 			if (!pentry) {
 				QDF_TRACE(QDF_MODULE_ID_SME,
 					  QDF_TRACE_LEVEL_ERROR,
@@ -1214,7 +1214,7 @@
 						  ac,
 						  pACInfo->tspec_mask_status);
 					QDF_ASSERT(0);
-					cdf_mem_free(pentry);
+					qdf_mem_free(pentry);
 					return SME_QOS_STATUS_SETUP_FAILURE_RSP;
 				}
 				pACInfo->tspec_mask_status =
@@ -1518,7 +1518,7 @@
 			/* create an entry in the flow list */
 			pentry =
 				(sme_QosFlowInfoEntry *)
-				cdf_mem_malloc(sizeof(*pentry));
+				qdf_mem_malloc(sizeof(*pentry));
 			if (!pentry) {
 				QDF_TRACE(QDF_MODULE_ID_SME,
 					  QDF_TRACE_LEVEL_ERROR,
@@ -1556,7 +1556,7 @@
 					/* if we are not in handoff, then notify all flows on */
 					/* this AC that the aggregate TSPEC may have changed */
 					if (!pentry->hoRenewal) {
-						cdf_mem_zero(&search_key,
+						qdf_mem_zero(&search_key,
 							     sizeof
 							     (sme_QosSearchInfo));
 						search_key.key.ac_type = ac;
@@ -1681,7 +1681,7 @@
 	QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_INFO_HIGH,
 		  "%s: %d: invoked for flow %d", __func__, __LINE__, QosFlowID);
 
-	cdf_mem_zero(&search_key, sizeof(sme_QosSearchInfo));
+	qdf_mem_zero(&search_key, sizeof(sme_QosSearchInfo));
 	/* set the key type & the key to be searched in the Flow List */
 	search_key.key.QosFlowID = QosFlowID;
 	search_key.index = SME_QOS_SEARCH_KEY_INDEX_1;
@@ -1790,7 +1790,7 @@
 		/* Once we have decided on OTA exchange needed or not we can delete the */
 		/* original one from the List */
 		pNewEntry =
-			(sme_QosFlowInfoEntry *) cdf_mem_malloc(sizeof(*pNewEntry));
+			(sme_QosFlowInfoEntry *) qdf_mem_malloc(sizeof(*pNewEntry));
 		if (!pNewEntry) {
 			QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 				  "%s: %d: couldn't allocate memory for the new "
@@ -1855,7 +1855,7 @@
 			     == status)) {
 				new_state = SME_QOS_QOS_ON;
 
-				cdf_mem_zero(&search_key,
+				qdf_mem_zero(&search_key,
 					     sizeof(sme_QosSearchInfo));
 				/* delete the original entry in FLOW list which got modified */
 				search_key.key.ac_type = ac;
@@ -1878,7 +1878,7 @@
 					if (SME_QOS_STATUS_SETUP_SUCCESS_APSD_SET_ALREADY == status) {
 						status =
 							SME_QOS_STATUS_MODIFY_SETUP_SUCCESS_APSD_SET_ALREADY;
-						cdf_mem_zero(&search_key,
+						qdf_mem_zero(&search_key,
 							     sizeof
 							     (sme_QosSearchInfo));
 						search_key.key.ac_type = ac;
@@ -2031,7 +2031,7 @@
 	QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_INFO_HIGH,
 		  "%s: %d: invoked for flow %d", __func__, __LINE__, QosFlowID);
 
-	cdf_mem_zero(&search_key, sizeof(sme_QosSearchInfo));
+	qdf_mem_zero(&search_key, sizeof(sme_QosSearchInfo));
 	/* set the key type & the key to be searched in the Flow List */
 	search_key.key.QosFlowID = QosFlowID;
 	search_key.index = SME_QOS_SEARCH_KEY_INDEX_1;
@@ -2115,7 +2115,7 @@
 			 * to AP. */
 			if (flow_info->QoSInfo.ts_info.direction ==
 			    SME_QOS_WMM_TS_DIR_BOTH) {
-				cdf_mem_zero(&search_key,
+				qdf_mem_zero(&search_key,
 					     sizeof(sme_QosSearchInfo));
 				/* set the key type & the key to be searched in the Flow List */
 				search_key.key.ac_type = ac;
@@ -2149,7 +2149,7 @@
 					    && downlinkFlowsPresent) {
 						/* Need to split the uni-directional flows into SME_QOS_TSPEC_INDEX_0 and SME_QOS_TSPEC_INDEX_1 */
 
-						cdf_mem_zero(&search_key,
+						qdf_mem_zero(&search_key,
 							     sizeof
 							     (sme_QosSearchInfo));
 						/* Mark all downstream flows as using tspec index 1 */
@@ -2281,7 +2281,7 @@
 							    pEntry, true);
 					pDeletedFlow = flow_info;
 					if (SME_QOS_STATUS_SETUP_SUCCESS_APSD_SET_ALREADY == status) {
-						cdf_mem_zero(&search_key,
+						qdf_mem_zero(&search_key,
 							     sizeof
 							     (sme_QosSearchInfo));
 						search_key.key.ac_type = ac;
@@ -2551,12 +2551,12 @@
 			}
 
 			if (false == deltsIssued) {
-				cdf_mem_zero(&pACInfo->
+				qdf_mem_zero(&pACInfo->
 					     curr_QoSInfo[flow_info->
 							  tspec_mask - 1],
 					     sizeof(sme_QosWmmTspecInfo));
 			}
-			cdf_mem_zero(&pACInfo->
+			qdf_mem_zero(&pACInfo->
 				     requested_QoSInfo[flow_info->tspec_mask -
 						       1],
 				     sizeof(sme_QosWmmTspecInfo));
@@ -2617,7 +2617,7 @@
 	}
 	/* if we deleted a flow, reclaim the memory */
 	if (pDeletedFlow) {
-		cdf_mem_free(pDeletedFlow);
+		qdf_mem_free(pDeletedFlow);
 	}
 	if ((SME_QOS_STATUS_RELEASE_SUCCESS_RSP == status)) {
 		(void)sme_qos_process_buffered_cmd(sessionId);
@@ -2705,7 +2705,7 @@
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 			  "%s: %d: On session %d AP doesn't support QoS",
 			  __func__, __LINE__, sessionId);
-		cdf_mem_free(pIes);
+		qdf_mem_free(pIes);
 		/* notify HDD through the synchronous status msg */
 		return SME_QOS_STATUS_SETUP_NOT_QOS_AP_RSP;
 	}
@@ -2870,7 +2870,7 @@
 		}
 	} while (0);
 
-	cdf_mem_free(pIes);
+	qdf_mem_free(pIes);
 	return status;
 }
 
@@ -2912,7 +2912,7 @@
 
 	ac = sme_qos_u_pto_ac_map[pTspec->user_priority];
 
-	cdf_mem_zero(pAddtsRsp, sizeof(tSirAddtsRsp));
+	qdf_mem_zero(pAddtsRsp, sizeof(tSirAddtsRsp));
 
 	pAddtsRsp->messageType = eWNI_SME_ADDTS_RSP;
 	pAddtsRsp->length = sizeof(tSirAddtsRsp);
@@ -3176,7 +3176,7 @@
 		return QDF_STATUS_E_FAILURE;
 	}
 
-	cdf_mem_zero(&ricIE, sizeof(tDot11fIERICDataDesc));
+	qdf_mem_zero(&ricIE, sizeof(tDot11fIERICDataDesc));
 
 	ricIE.present = 1;
 	ricIE.RICData.present = 1;
@@ -3314,7 +3314,7 @@
 
 				ac_info->requested_QoSInfo[tspec_index] =
 					ac_info->curr_QoSInfo[tspec_index];
-				cdf_mem_zero(
+				qdf_mem_zero(
 					&ac_info->curr_QoSInfo[tspec_index],
 					sizeof(sme_QosWmmTspecInfo));
 				qos_requested = true;
@@ -3407,7 +3407,7 @@
 		session->ac_info[ac_id].addTsRsp[ts_id].rsp.lleTspecPresent;
 	msg->aggrInfo.aggrAddTsInfo[ac_id].numTclas =
 		session->ac_info[ac_id].addTsRsp[ts_id].rsp.numTclas;
-	cdf_mem_copy(msg->aggrInfo.aggrAddTsInfo[ac_id].tclasInfo,
+	qdf_mem_copy(msg->aggrInfo.aggrAddTsInfo[ac_id].tclasInfo,
 		     session->ac_info[ac_id].addTsRsp[ts_id].rsp.tclasInfo,
 		     SIR_MAC_TCLASIE_MAXNUM);
 	msg->aggrInfo.aggrAddTsInfo[ac_id].tclasProc =
@@ -3452,7 +3452,7 @@
 
 	session = &sme_qos_cb.sessionInfo[session_id];
 
-	aggr_req = (tSirAggrQosReq *) cdf_mem_malloc(sizeof(tSirAggrQosReq));
+	aggr_req = (tSirAggrQosReq *) qdf_mem_malloc(sizeof(tSirAggrQosReq));
 
 	if (!aggr_req) {
 		/* err msg */
@@ -3461,14 +3461,14 @@
 		return QDF_STATUS_E_NOMEM;
 	}
 
-	cdf_mem_zero(aggr_req, sizeof(tSirAggrQosReq));
+	qdf_mem_zero(aggr_req, sizeof(tSirAggrQosReq));
 
 	aggr_req->messageType = eWNI_SME_FT_AGGR_QOS_REQ;
 	aggr_req->length = sizeof(tSirAggrQosReq);
 	aggr_req->sessionId = session_id;
 	aggr_req->timeout = 0;
 	aggr_req->rspReqd = true;
-	cdf_mem_copy(&aggr_req->bssid.bytes[0],
+	qdf_mem_copy(&aggr_req->bssid.bytes[0],
 		     &session->assocInfo.pBssDesc->bssId[0],
 		     sizeof(struct qdf_mac_addr));
 
@@ -3519,7 +3519,7 @@
 		=
 			&sme_qos_cb.sessionInfo[sessionId].ac_info[ac].addTsRsp[tspecIndex];
 
-	cdf_mem_zero(pAddtsRsp, sizeof(tSirAddtsRsp));
+	qdf_mem_zero(pAddtsRsp, sizeof(tSirAddtsRsp));
 
 	pAddtsRsp->messageType = eWNI_SME_ADDTS_RSP;
 	pAddtsRsp->length = sizeof(tSirAddtsRsp);
@@ -3899,7 +3899,7 @@
 	}
 
 	pSession = &sme_qos_cb.sessionInfo[sessionId];
-	pMsg = (tSirAddtsReq *) cdf_mem_malloc(sizeof(tSirAddtsReq));
+	pMsg = (tSirAddtsReq *) qdf_mem_malloc(sizeof(tSirAddtsReq));
 	if (!pMsg) {
 		/* err msg */
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
@@ -3907,7 +3907,7 @@
 			  __func__, __LINE__);
 		return QDF_STATUS_E_NOMEM;
 	}
-	cdf_mem_zero(pMsg, sizeof(tSirAddtsReq));
+	qdf_mem_zero(pMsg, sizeof(tSirAddtsReq));
 	pMsg->messageType = eWNI_SME_ADDTS_REQ;
 	pMsg->length = sizeof(tSirAddtsReq);
 	pMsg->sessionId = sessionId;
@@ -3956,10 +3956,10 @@
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 			  "%s: %d: BSS descriptor is NULL so we don't send request to PE",
 			  __func__, __LINE__);
-		cdf_mem_free(pMsg);
+		qdf_mem_free(pMsg);
 		return QDF_STATUS_E_FAILURE;
 	}
-	cdf_mem_copy(&pMsg->bssid.bytes[0],
+	qdf_mem_copy(&pMsg->bssid.bytes[0],
 		     &pSession->assocInfo.pBssDesc->bssId[0],
 		     sizeof(struct qdf_mac_addr));
 	QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_INFO_HIGH,
@@ -4016,7 +4016,7 @@
 	QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_INFO_HIGH,
 		  "%s: %d: invoked on session %d for AC %d",
 		  __func__, __LINE__, sessionId, ac);
-	pMsg = (tSirDeltsReq *) cdf_mem_malloc(sizeof(tSirDeltsReq));
+	pMsg = (tSirDeltsReq *) qdf_mem_malloc(sizeof(tSirDeltsReq));
 	if (!pMsg) {
 		/* err msg */
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
@@ -4024,7 +4024,7 @@
 			  __func__, __LINE__);
 		return QDF_STATUS_E_NOMEM;
 	}
-	cdf_mem_zero(pMsg, sizeof(tSirDeltsReq));
+	qdf_mem_zero(pMsg, sizeof(tSirDeltsReq));
 	/* get pointer to the TSPEC being deleted */
 	pSession = &sme_qos_cb.sessionInfo[sessionId];
 	pACInfo = &pSession->ac_info[ac];
@@ -4066,10 +4066,10 @@
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 			  "%s: %d: BSS descriptor is NULL so we don't send request to PE",
 			  __func__, __LINE__);
-		cdf_mem_free(pMsg);
+		qdf_mem_free(pMsg);
 		return QDF_STATUS_E_FAILURE;
 	}
-	cdf_mem_copy(&pMsg->bssid.bytes[0],
+	qdf_mem_copy(&pMsg->bssid.bytes[0],
 		     &pSession->assocInfo.pBssDesc->bssId[0],
 		     sizeof(struct qdf_mac_addr));
 
@@ -4077,7 +4077,7 @@
 		  "%s: %d: up = %d, tid = %d",
 		  __func__, __LINE__,
 		  pTspecInfo->ts_info.up, pTspecInfo->ts_info.tid);
-	cdf_mem_zero(&pACInfo->curr_QoSInfo[tspec_mask - 1],
+	qdf_mem_zero(&pACInfo->curr_QoSInfo[tspec_mask - 1],
 		     sizeof(sme_QosWmmTspecInfo));
 	if (QDF_IS_STATUS_SUCCESS(cds_send_mb_message_to_mac(pMsg))) {
 		status = QDF_STATUS_SUCCESS;
@@ -4243,7 +4243,7 @@
 	pSession = &sme_qos_cb.sessionInfo[sessionId];
 	pACInfo = &pSession->ac_info[ac];
 
-	cdf_mem_zero(&search_key, sizeof(sme_QosSearchInfo));
+	qdf_mem_zero(&search_key, sizeof(sme_QosSearchInfo));
 	/* set the key type & the key to be searched in the Flow List */
 	search_key.key.ac_type = ac;
 	search_key.index = SME_QOS_SEARCH_KEY_INDEX_2;
@@ -4516,14 +4516,14 @@
 	/* notify HDD with new Service Interval */
 	ac_info->curr_QoSInfo[SME_QOS_TSPEC_INDEX_0] =
 		ac_info->requested_QoSInfo[SME_QOS_TSPEC_INDEX_0];
-	cdf_mem_zero(&search_key, sizeof(sme_QosSearchInfo));
+	qdf_mem_zero(&search_key, sizeof(sme_QosSearchInfo));
 	/* set the key type & the key to be searched in the Flow List */
 	search_key.key.ac_type = ac;
 	search_key.index = SME_QOS_SEARCH_KEY_INDEX_2;
 	search_key.sessionId = sessionid;
 	/* notify PMC that reassoc is done for APSD on certain AC?? */
 
-	cdf_mem_zero(&search_key1, sizeof(sme_QosSearchInfo));
+	qdf_mem_zero(&search_key1, sizeof(sme_QosSearchInfo));
 	/* set the hoRenewal field in control block if needed */
 	search_key1.index = SME_QOS_SEARCH_KEY_INDEX_3;
 	search_key1.key.reason = SME_QOS_REASON_SETUP;
@@ -4554,7 +4554,7 @@
 		return QDF_STATUS_E_FAILURE;
 	}
 	ac_info->hoRenewal = false;
-	cdf_mem_zero(&ac_info->requested_QoSInfo[SME_QOS_TSPEC_INDEX_0],
+	qdf_mem_zero(&ac_info->requested_QoSInfo[SME_QOS_TSPEC_INDEX_0],
 		     sizeof(sme_QosWmmTspecInfo));
 
 	return status;
@@ -4712,16 +4712,16 @@
 			if (pACInfo->reassoc_pending) {
 				pACInfo->reassoc_pending = false;
 			}
-			cdf_mem_zero(&pACInfo->
+			qdf_mem_zero(&pACInfo->
 				     curr_QoSInfo[SME_QOS_TSPEC_INDEX_0],
 				     sizeof(sme_QosWmmTspecInfo));
-			cdf_mem_zero(&pACInfo->
+			qdf_mem_zero(&pACInfo->
 				     requested_QoSInfo[SME_QOS_TSPEC_INDEX_0],
 				     sizeof(sme_QosWmmTspecInfo));
-			cdf_mem_zero(&pACInfo->
+			qdf_mem_zero(&pACInfo->
 				     curr_QoSInfo[SME_QOS_TSPEC_INDEX_1],
 				     sizeof(sme_QosWmmTspecInfo));
-			cdf_mem_zero(&pACInfo->
+			qdf_mem_zero(&pACInfo->
 				     requested_QoSInfo[SME_QOS_TSPEC_INDEX_1],
 				     sizeof(sme_QosWmmTspecInfo));
 			pACInfo->tspec_mask_status = SME_QOS_TSPEC_MASK_CLEAR;
@@ -4902,16 +4902,16 @@
 		case SME_QOS_HANDOFF:
 			sme_qos_state_transition(sessionId, ac, SME_QOS_INIT);
 			/* need to clean up flows: TODO */
-			cdf_mem_zero(&pACInfo->
+			qdf_mem_zero(&pACInfo->
 				     curr_QoSInfo[SME_QOS_TSPEC_INDEX_0],
 				     sizeof(sme_QosWmmTspecInfo));
-			cdf_mem_zero(&pACInfo->
+			qdf_mem_zero(&pACInfo->
 				     requested_QoSInfo[SME_QOS_TSPEC_INDEX_0],
 				     sizeof(sme_QosWmmTspecInfo));
-			cdf_mem_zero(&pACInfo->
+			qdf_mem_zero(&pACInfo->
 				     curr_QoSInfo[SME_QOS_TSPEC_INDEX_1],
 				     sizeof(sme_QosWmmTspecInfo));
-			cdf_mem_zero(&pACInfo->
+			qdf_mem_zero(&pACInfo->
 				     requested_QoSInfo[SME_QOS_TSPEC_INDEX_1],
 				     sizeof(sme_QosWmmTspecInfo));
 			pACInfo->tspec_mask_status = SME_QOS_TSPEC_MASK_CLEAR;
@@ -4937,7 +4937,7 @@
 	pSession->handoffRequested = false;
 	/* clean up the assoc info */
 	if (pSession->assocInfo.pBssDesc) {
-		cdf_mem_free(pSession->assocInfo.pBssDesc);
+		qdf_mem_free(pSession->assocInfo.pBssDesc);
 		pSession->assocInfo.pBssDesc = NULL;
 	}
 	return QDF_STATUS_SUCCESS;
@@ -4997,7 +4997,7 @@
 	sme_qos_delete_existing_flows(pMac, sessionId);
 	/* clean up the assoc info */
 	if (pSession->assocInfo.pBssDesc) {
-		cdf_mem_free(pSession->assocInfo.pBssDesc);
+		qdf_mem_free(pSession->assocInfo.pBssDesc);
 		pSession->assocInfo.pBssDesc = NULL;
 	}
 	sme_qos_cb.sessionInfo[sessionId].sessionActive = false;
@@ -5046,7 +5046,7 @@
 	}
 	/* clean up the assoc info if already set */
 	if (pSession->assocInfo.pBssDesc) {
-		cdf_mem_free(pSession->assocInfo.pBssDesc);
+		qdf_mem_free(pSession->assocInfo.pBssDesc);
 		pSession->assocInfo.pBssDesc = NULL;
 	}
 	return QDF_STATUS_SUCCESS;
@@ -5143,7 +5143,7 @@
 		ac_info = &qos_session->ac_info[ac];
 		tspec_pending_status = ac_info->tspec_pending;
 		tspec_mask_status = ac_info->tspec_mask_status;
-		cdf_mem_zero(ac_info->ricIdentifier, SME_QOS_TSPEC_INDEX_MAX);
+		qdf_mem_zero(ac_info->ricIdentifier, SME_QOS_TSPEC_INDEX_MAX);
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_INFO,
 			  FL("AC %d ==> TSPEC status = %d, tspec pending = %d"),
 			  ac, tspec_mask_status, tspec_pending_status);
@@ -5229,7 +5229,7 @@
 		return QDF_STATUS_E_FAILURE;
 	}
 
-	cdf_mem_zero(&search_key, sizeof(sme_QosSearchInfo));
+	qdf_mem_zero(&search_key, sizeof(sme_QosSearchInfo));
 	/* set the key type & the key to be searched in the Flow List */
 	search_key.key.ac_type = ac;
 	search_key.index = SME_QOS_SEARCH_KEY_INDEX_2;
@@ -5244,7 +5244,7 @@
 		QDF_ASSERT(0);
 		return QDF_STATUS_E_FAILURE;
 	}
-	cdf_mem_zero(&pACInfo->requested_QoSInfo[tspec_pending - 1],
+	qdf_mem_zero(&pACInfo->requested_QoSInfo[tspec_pending - 1],
 		     sizeof(sme_QosWmmTspecInfo));
 
 	if ((!pACInfo->num_flows[0]) && (!pACInfo->num_flows[1])) {
@@ -5473,7 +5473,7 @@
 	if ((pACInfo->curr_QoSInfo[pACInfo->tspec_pending - 1].ts_info.
 	     direction == SME_QOS_WMM_TS_DIR_BOTH)
 	    && (pACInfo->num_flows[SME_QOS_TSPEC_INDEX_1] > 0)) {
-		cdf_mem_zero(&search_key, sizeof(sme_QosSearchInfo));
+		qdf_mem_zero(&search_key, sizeof(sme_QosSearchInfo));
 		/* update tspec_mask for all the flows having SME_QOS_TSPEC_MASK_BIT_2_SET to SME_QOS_TSPEC_MASK_BIT_1_SET */
 		search_key.key.ac_type = ac;
 		search_key.index = SME_QOS_SEARCH_KEY_INDEX_5;
@@ -5483,7 +5483,7 @@
 					  SME_QOS_TSPEC_MASK_BIT_1_SET);
 	}
 
-	cdf_mem_zero(&search_key1, sizeof(sme_QosSearchInfo));
+	qdf_mem_zero(&search_key1, sizeof(sme_QosSearchInfo));
 	/* set the horenewal field in control block if needed */
 	search_key1.index = SME_QOS_SEARCH_KEY_INDEX_3;
 	search_key1.key.reason = SME_QOS_REASON_SETUP;
@@ -5500,7 +5500,7 @@
 			}
 		}
 	}
-	cdf_mem_zero(&search_key, sizeof(sme_QosSearchInfo));
+	qdf_mem_zero(&search_key, sizeof(sme_QosSearchInfo));
 	/* set the key type & the key to be searched in the Flow List */
 	search_key.key.ac_type = ac;
 	search_key.index = SME_QOS_SEARCH_KEY_INDEX_2;
@@ -5518,7 +5518,7 @@
 		return QDF_STATUS_E_FAILURE;
 	}
 	pACInfo->hoRenewal = false;
-	cdf_mem_zero(&pACInfo->requested_QoSInfo[tspec_pending - 1],
+	qdf_mem_zero(&pACInfo->requested_QoSInfo[tspec_pending - 1],
 		     sizeof(sme_QosWmmTspecInfo));
 	/* event: EVENT_WLAN_QOS */
 #ifdef FEATURE_WLAN_DIAG_SUPPORT
@@ -5623,7 +5623,7 @@
 			  __func__, __LINE__);
 		return QDF_STATUS_E_FAILURE;
 	}
-	cdf_mem_copy(&TspecInfo, pCurrent_Tspec_Info,
+	qdf_mem_copy(&TspecInfo, pCurrent_Tspec_Info,
 		     sizeof(sme_QosWmmTspecInfo));
 	TspecInfo.ts_info.psb = pInput_Tspec_Info->ts_info.psb;
 	/*-------------------------------------------------------------------------
@@ -5755,10 +5755,10 @@
 		TspecInfo.ts_info.burst_size_defn = 1;
 	}
 	if (pUpdated_Tspec_Info) {
-		cdf_mem_copy(pUpdated_Tspec_Info, &TspecInfo,
+		qdf_mem_copy(pUpdated_Tspec_Info, &TspecInfo,
 			     sizeof(sme_QosWmmTspecInfo));
 	} else {
-		cdf_mem_copy(pCurrent_Tspec_Info, &TspecInfo,
+		qdf_mem_copy(pCurrent_Tspec_Info, &TspecInfo,
 			     sizeof(sme_QosWmmTspecInfo));
 	}
 	return QDF_STATUS_SUCCESS;
@@ -5797,7 +5797,7 @@
 			  __func__, __LINE__);
 		return QDF_STATUS_E_FAILURE;
 	}
-	cdf_mem_zero(&Tspec_Info, sizeof(sme_QosWmmTspecInfo));
+	qdf_mem_zero(&Tspec_Info, sizeof(sme_QosWmmTspecInfo));
 	pEntry = csr_ll_peek_head(&sme_qos_cb.flow_list, false);
 	if (!pEntry) {
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
@@ -6137,7 +6137,7 @@
 		  __func__, __LINE__, ret_val, ac);
 	if (NULL == pIes) {
 		/* IEs were allocated locally so free them */
-		cdf_mem_free(pIesLocal);
+		qdf_mem_free(pIesLocal);
 	}
 	return ret_val;
 }
@@ -6253,7 +6253,7 @@
 			  FL("Deleting original entry at %p with flowID %d"),
 			  flow_info, flow_info->QosFlowID);
 		csr_ll_remove_entry(&sme_qos_cb.flow_list, list_entry, true);
-		cdf_mem_free(flow_info);
+		qdf_mem_free(flow_info);
 
 		list_entry = list_nextentry;
 	}
@@ -6304,7 +6304,7 @@
 			/* delete the entry from Flow List */
 			csr_ll_remove_entry(&sme_qos_cb.flow_list, pEntry,
 					    true);
-			cdf_mem_free(flow_info);
+			qdf_mem_free(flow_info);
 		}
 		pEntry = pNextEntry;
 	}
@@ -6329,7 +6329,7 @@
 	QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_INFO_HIGH,
 		  "%s: %d: Invoked", __func__, __LINE__);
 	pentry =
-		(sme_QosCmdInfoEntry *) cdf_mem_malloc(sizeof(sme_QosCmdInfoEntry));
+		(sme_QosCmdInfoEntry *) qdf_mem_malloc(sizeof(sme_QosCmdInfoEntry));
 	if (!pentry) {
 		/* err msg */
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
@@ -6451,7 +6451,7 @@
 			break;
 		}
 		/* buffered command has been processed, reclaim the memory */
-		cdf_mem_free(pcmd);
+		qdf_mem_free(pcmd);
 	} else {
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_INFO_HIGH,
 			  FL("cmd buffer empty"));
@@ -6497,7 +6497,7 @@
 				    true);
 		/* reclaim the memory */
 		pcmd = GET_BASE_ADDR(pEntry, sme_QosCmdInfoEntry, link);
-		cdf_mem_free(pcmd);
+		qdf_mem_free(pcmd);
 		pEntry = pNextEntry;
 	}
 	return QDF_STATUS_SUCCESS;
@@ -6528,20 +6528,20 @@
 	}
 	/* clean up the assoc info if already set */
 	if (pSession->assocInfo.pBssDesc) {
-		cdf_mem_free(pSession->assocInfo.pBssDesc);
+		qdf_mem_free(pSession->assocInfo.pBssDesc);
 		pSession->assocInfo.pBssDesc = NULL;
 	}
 	bssLen = pAssoc_info->pBssDesc->length +
 		 sizeof(pAssoc_info->pBssDesc->length);
 	/* save the bss Descriptor */
-	pBssDesc = (tSirBssDescription *) cdf_mem_malloc(bssLen);
+	pBssDesc = (tSirBssDescription *) qdf_mem_malloc(bssLen);
 	if (!pBssDesc) {
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 			  "%s: %d: couldn't allocate memory for the bss Descriptor",
 			  __func__, __LINE__);
 		return QDF_STATUS_E_NOMEM;
 	}
-	cdf_mem_copy(pBssDesc, pAssoc_info->pBssDesc, bssLen);
+	qdf_mem_copy(pBssDesc, pAssoc_info->pBssDesc, bssLen);
 	pSession->assocInfo.pBssDesc = pBssDesc;
 	/* save the apsd info from assoc */
 	if (pAssoc_info->pProfile) {
@@ -6666,7 +6666,7 @@
 			  __func__, __LINE__, flow_info, flow_info->QosFlowID);
 		csr_ll_remove_entry(&sme_qos_cb.flow_list, pEntry, true);
 		/* reclaim the memory */
-		cdf_mem_free(flow_info);
+		qdf_mem_free(flow_info);
 		break;
 	default:
 		break;
@@ -6848,7 +6848,7 @@
 			flow_info, flow_info->QosFlowID);
 		csr_ll_remove_entry(&sme_qos_cb.flow_list, entry, true);
 		/* reclaim the memory */
-		cdf_mem_free(flow_info);
+		qdf_mem_free(flow_info);
 	}
 	return QDF_STATUS_SUCCESS;
 }
@@ -6935,7 +6935,7 @@
 			  __func__, __LINE__, flow_info, flow_info->QosFlowID);
 		csr_ll_remove_entry(&sme_qos_cb.flow_list, pEntry, true);
 		/* reclaim the memory */
-		cdf_mem_free(flow_info);
+		qdf_mem_free(flow_info);
 	}
 	return QDF_STATUS_SUCCESS;
 }
@@ -7116,7 +7116,7 @@
 		/* delete the entry from Flow List */
 		csr_ll_remove_entry(&sme_qos_cb.flow_list, entry, true);
 		/* reclaim the memory */
-		cdf_mem_free(flow_info);
+		qdf_mem_free(flow_info);
 	}
 	return QDF_STATUS_SUCCESS;
 }
@@ -7311,10 +7311,10 @@
 	pSession = &sme_qos_cb.sessionInfo[sessionId];
 	for (ac = SME_QOS_EDCA_AC_BE; ac < SME_QOS_EDCA_AC_MAX; ac++) {
 		pACInfo = &pSession->ac_info[ac];
-		cdf_mem_zero(pACInfo->curr_QoSInfo,
+		qdf_mem_zero(pACInfo->curr_QoSInfo,
 			     sizeof(sme_QosWmmTspecInfo) *
 			     SME_QOS_TSPEC_INDEX_MAX);
-		cdf_mem_zero(pACInfo->requested_QoSInfo,
+		qdf_mem_zero(pACInfo->requested_QoSInfo,
 			     sizeof(sme_QosWmmTspecInfo) *
 			     SME_QOS_TSPEC_INDEX_MAX);
 		pACInfo->num_flows[0] = 0;
@@ -7389,11 +7389,11 @@
 			  "%s: %d: On session %d HT Caps aren't present but application set ack policy to HT ",
 			  __func__, __LINE__, sessionId);
 
-		cdf_mem_free(pIes);
+		qdf_mem_free(pIes);
 		return false;
 	}
 
-	cdf_mem_free(pIes);
+	qdf_mem_free(pIes);
 	return true;
 }
 
@@ -7654,7 +7654,7 @@
 	sme_QosEdcaAcType ac;
 	pSession = &sme_qos_cb.sessionInfo[sessionId];
 	for (ac = SME_QOS_EDCA_AC_BE; ac < SME_QOS_EDCA_AC_MAX; ac++) {
-		cdf_mem_zero(&pSession->ac_info[ac], sizeof(sme_QosACInfo));
+		qdf_mem_zero(&pSession->ac_info[ac], sizeof(sme_QosACInfo));
 		sme_qos_state_transition(sessionId, ac, SME_QOS_INIT);
 	}
 }
diff --git a/core/sme/src/rrm/sme_rrm.c b/core/sme/src/rrm/sme_rrm.c
index 3172817..c95c6ee 100644
--- a/core/sme/src/rrm/sme_rrm.c
+++ b/core/sme/src/rrm/sme_rrm.c
@@ -94,8 +94,8 @@
 	while ((pEntry = csr_ll_remove_head(pList, LL_ACCESS_NOLOCK)) != NULL) {
 		pNeighborReportDesc =
 			GET_BASE_ADDR(pEntry, tRrmNeighborReportDesc, List);
-		cdf_mem_free(pNeighborReportDesc->pNeighborBssDescription);
-		cdf_mem_free(pNeighborReportDesc);
+		qdf_mem_free(pNeighborReportDesc->pNeighborBssDescription);
+		qdf_mem_free(pNeighborReportDesc);
 	}
 	csr_ll_unlock(pList);
 	return;
@@ -193,13 +193,13 @@
 
 	do {
 		length = sizeof(tSirBeaconReportXmitInd);
-		beacon_rep = cdf_mem_malloc(length);
+		beacon_rep = qdf_mem_malloc(length);
 		if (NULL == beacon_rep) {
 			sms_log(mac_ctx, LOGP,
 				"Unable to allocate memory for beacon report");
 			return QDF_STATUS_E_NOMEM;
 		}
-		cdf_mem_zero(beacon_rep, length);
+		qdf_mem_zero(beacon_rep, length);
 #if defined WLAN_VOWIFI_DEBUG
 		sms_log(mac_ctx, LOGE, FL("Allocated memory for beacon_rep"));
 #endif
@@ -208,7 +208,7 @@
 		beacon_rep->uDialogToken = rrm_ctx->token;
 		beacon_rep->duration = rrm_ctx->duration[0];
 		beacon_rep->regClass = rrm_ctx->regClass;
-		cdf_mem_copy(beacon_rep->bssId, rrm_ctx->sessionBssId.bytes,
+		qdf_mem_copy(beacon_rep->bssId, rrm_ctx->sessionBssId.bytes,
 			QDF_MAC_ADDR_SIZE);
 
 		i = 0;
@@ -218,14 +218,14 @@
 				break;
 			ie_len = GET_IE_LEN_IN_BSS(bss_desc->length);
 			beacon_rep->pBssDescription[i] =
-				cdf_mem_malloc(ie_len +
+				qdf_mem_malloc(ie_len +
 					sizeof(tSirBssDescription));
 			if (NULL ==
 				beacon_rep->pBssDescription[i])
 				break;
-			cdf_mem_copy(beacon_rep->pBssDescription[i],
+			qdf_mem_copy(beacon_rep->pBssDescription[i],
 				bss_desc, sizeof(tSirBssDescription));
-			cdf_mem_copy(
+			qdf_mem_copy(
 				&beacon_rep->pBssDescription[i]->ieFields[0],
 				bss_desc->ieFields, ie_len);
 			sms_log(mac_ctx, LOG1,
@@ -314,7 +314,7 @@
 	if (result_arr)
 		cur_result = result_arr[bss_counter];
 
-	cdf_mem_zero(&bcn_rpt_rsp, sizeof(tSirEseBcnReportRsp));
+	qdf_mem_zero(&bcn_rpt_rsp, sizeof(tSirEseBcnReportRsp));
 	do {
 		cur_meas_req = NULL;
 		for (i = 0; i < rrm_ctx->eseBcnReqInfo.numBcnReqIe; i++) {
@@ -356,7 +356,7 @@
 			bcn_rpt_fields->CapabilityInfo =
 				bss_desc->capabilityInfo;
 
-			cdf_mem_copy(bcn_rpt_fields->Bssid,
+			qdf_mem_copy(bcn_rpt_fields->Bssid,
 				bss_desc->bssId, sizeof(tSirMacAddr));
 				fill_ie_status =
 					sir_beacon_ie_ese_bcn_report(mac_ctx,
@@ -405,7 +405,7 @@
 		/* Free the memory allocated to IE */
 		for (i = 0; i < j; i++)
 			if (bcn_report->bcnRepBssInfo[i].pBuf)
-				cdf_mem_free(bcn_report->bcnRepBssInfo[i].pBuf);
+				qdf_mem_free(bcn_report->bcnRepBssInfo[i].pBuf);
 	} while (cur_result);
 	return status;
 }
@@ -442,27 +442,27 @@
 	sms_log(mac_ctx, LOGE, FL("Send scan result to PE "));
 #endif
 
-	cdf_mem_zero(&filter, sizeof(filter));
-	cdf_mem_zero(scanresults_arr,
+	qdf_mem_zero(&filter, sizeof(filter));
+	qdf_mem_zero(scanresults_arr,
 			sizeof(next_result) * SIR_BCN_REPORT_MAX_BSS_DESC);
 	filter.BSSIDs.numOfBSSIDs = 1;
 	filter.BSSIDs.bssid = (struct qdf_mac_addr *)&rrm_ctx->bssId;
 
 	if (rrm_ctx->ssId.length) {
 		filter.SSIDs.SSIDList =
-			(tCsrSSIDInfo *) cdf_mem_malloc(sizeof(tCsrSSIDInfo));
+			(tCsrSSIDInfo *) qdf_mem_malloc(sizeof(tCsrSSIDInfo));
 		if (filter.SSIDs.SSIDList == NULL) {
-			sms_log(mac_ctx, LOGP, FL("cdf_mem_malloc failed"));
+			sms_log(mac_ctx, LOGP, FL("qdf_mem_malloc failed"));
 			return QDF_STATUS_E_NOMEM;
 		}
 #if defined WLAN_VOWIFI_DEBUG
 		sms_log(mac_ctx, LOGE, FL("Allocated memory for SSIDList"));
 #endif
-		cdf_mem_zero(filter.SSIDs.SSIDList, sizeof(tCsrSSIDInfo));
+		qdf_mem_zero(filter.SSIDs.SSIDList, sizeof(tCsrSSIDInfo));
 
 		filter.SSIDs.SSIDList->SSID.length =
 			rrm_ctx->ssId.length;
-		cdf_mem_copy(filter.SSIDs.SSIDList->SSID.ssId,
+		qdf_mem_copy(filter.SSIDs.SSIDList->SSID.ssId,
 				rrm_ctx->ssId.ssId, rrm_ctx->ssId.length);
 		filter.SSIDs.numOfSSIDs = 1;
 	} else {
@@ -489,7 +489,7 @@
 
 	if (filter.SSIDs.SSIDList) {
 		/* Free the memory allocated for SSIDList */
-		cdf_mem_free(filter.SSIDs.SSIDList);
+		qdf_mem_free(filter.SSIDs.SSIDList);
 #if defined WLAN_VOWIFI_DEBUG
 		sms_log(mac_ctx, LOGE, FL("Free memory for SSIDList"));
 #endif
@@ -623,7 +623,7 @@
 					 &pSmeRrmContext->channelList.
 					 ChannelList[pSmeRrmContext->currentIndex],
 					 true);
-		cdf_mem_free(pSmeRrmContext->channelList.ChannelList);
+		qdf_mem_free(pSmeRrmContext->channelList.ChannelList);
 #if defined(FEATURE_WLAN_ESE) && defined(FEATURE_WLAN_ESE_UPLOAD)
 		pSmeRrmContext->eseBcnReqInProgress = false;
 #endif
@@ -674,31 +674,31 @@
 #if defined WLAN_VOWIFI_DEBUG
 		sms_log(mac_ctx, LOGE, FL("Issue scan request"));
 #endif
-		cdf_mem_zero(&scan_req, sizeof(scan_req));
+		qdf_mem_zero(&scan_req, sizeof(scan_req));
 		/* set scan_type, active or passive */
 		scan_req.bcnRptReqScan = true;
 		scan_req.scanType = scan_type;
-		cdf_mem_copy(&scan_req.bssid.bytes, sme_rrm_ctx->bssId,
+		qdf_mem_copy(&scan_req.bssid.bytes, sme_rrm_ctx->bssId,
 				QDF_MAC_ADDR_SIZE);
 		if (sme_rrm_ctx->ssId.length) {
 			scan_req.SSIDs.numOfSSIDs = 1;
 			scan_req.SSIDs.SSIDList =
-				(tCsrSSIDInfo *)cdf_mem_malloc(
+				(tCsrSSIDInfo *)qdf_mem_malloc(
 					sizeof(tCsrSSIDInfo));
 			if (NULL == scan_req.SSIDs.SSIDList) {
 				sms_log(mac_ctx, LOGP,
-					FL("cdf_mem_malloc failed"));
+					FL("qdf_mem_malloc failed"));
 				return QDF_STATUS_E_NOMEM;
 			}
 #if defined WLAN_VOWIFI_DEBUG
 			sms_log(mac_ctx, LOGE,
 				FL("Allocated memory for pSSIDList"));
 #endif
-			cdf_mem_zero(scan_req.SSIDs.SSIDList,
+			qdf_mem_zero(scan_req.SSIDs.SSIDList,
 					sizeof(tCsrSSIDInfo));
 			scan_req.SSIDs.SSIDList->SSID.length =
 				sme_rrm_ctx->ssId.length;
-			cdf_mem_copy(scan_req.SSIDs.SSIDList->SSID.ssId,
+			qdf_mem_copy(scan_req.SSIDs.SSIDList->SSID.ssId,
 					sme_rrm_ctx->ssId.ssId,
 					sme_rrm_ctx->ssId.length);
 		}
@@ -743,7 +743,7 @@
 					&sme_rrm_scan_request_callback, NULL);
 
 		if (sme_rrm_ctx->ssId.length) {
-			cdf_mem_free(scan_req.SSIDs.SSIDList);
+			qdf_mem_free(scan_req.SSIDs.SSIDList);
 #if defined WLAN_VOWIFI_DEBUG
 			sms_log(mac_ctx, LOGE, FL("Free memory for SSIDList"));
 #endif
@@ -776,7 +776,7 @@
 			sme_rrm_send_scan_result(mac_ctx, 1,
 				&sme_rrm_ctx->channelList.ChannelList[
 					sme_rrm_ctx->currentIndex], true);
-			cdf_mem_free(sme_rrm_ctx->channelList.ChannelList);
+			qdf_mem_free(sme_rrm_ctx->channelList.ChannelList);
 		}
 	} else {
 		sms_log(mac_ctx, LOGE, FL("Unknown beacon report req mode(%d)"),
@@ -821,9 +821,9 @@
 	     && (pBeaconReq->channelList.numChannels == 0))) {
 		/* Add all the channel in the regulatory domain. */
 		wlan_cfg_get_str_len(pMac, WNI_CFG_VALID_CHANNEL_LIST, &len);
-		pSmeRrmContext->channelList.ChannelList = cdf_mem_malloc(len);
+		pSmeRrmContext->channelList.ChannelList = qdf_mem_malloc(len);
 		if (pSmeRrmContext->channelList.ChannelList == NULL) {
-			sms_log(pMac, LOGP, FL("cdf_mem_malloc failed"));
+			sms_log(pMac, LOGP, FL("qdf_mem_malloc failed"));
 			return QDF_STATUS_E_NOMEM;
 		}
 #if defined WLAN_VOWIFI_DEBUG
@@ -851,9 +851,9 @@
 
 		len += pBeaconReq->channelList.numChannels;
 
-		pSmeRrmContext->channelList.ChannelList = cdf_mem_malloc(len);
+		pSmeRrmContext->channelList.ChannelList = qdf_mem_malloc(len);
 		if (pSmeRrmContext->channelList.ChannelList == NULL) {
-			sms_log(pMac, LOGP, FL("cdf_mem_malloc failed"));
+			sms_log(pMac, LOGP, FL("qdf_mem_malloc failed"));
 			return QDF_STATUS_E_NOMEM;
 		}
 #if defined WLAN_VOWIFI_DEBUG
@@ -891,15 +891,15 @@
 	}
 
 	/* Copy session bssid */
-	cdf_mem_copy(pSmeRrmContext->sessionBssId.bytes, pBeaconReq->bssId,
+	qdf_mem_copy(pSmeRrmContext->sessionBssId.bytes, pBeaconReq->bssId,
 		     sizeof(tSirMacAddr));
 
 	/* copy measurement bssid */
-	cdf_mem_copy(pSmeRrmContext->bssId, pBeaconReq->macaddrBssid,
+	qdf_mem_copy(pSmeRrmContext->bssId, pBeaconReq->macaddrBssid,
 		     sizeof(tSirMacAddr));
 
 	/* Copy ssid */
-	cdf_mem_copy(&pSmeRrmContext->ssId, &pBeaconReq->ssId,
+	qdf_mem_copy(&pSmeRrmContext->ssId, &pBeaconReq->ssId,
 		     sizeof(tAniSSID));
 
 	pSmeRrmContext->token = pBeaconReq->uDialogToken;
@@ -909,10 +909,10 @@
 			pSmeRrmContext->rrmConfig.max_randn_interval);
 	pSmeRrmContext->currentIndex = 0;
 	pSmeRrmContext->msgSource = pBeaconReq->msgSource;
-	cdf_mem_copy((uint8_t *) &pSmeRrmContext->measMode,
+	qdf_mem_copy((uint8_t *) &pSmeRrmContext->measMode,
 		     (uint8_t *) &pBeaconReq->fMeasurementtype,
 		     SIR_ESE_MAX_MEAS_IE_REQS);
-	cdf_mem_copy((uint8_t *) &pSmeRrmContext->duration,
+	qdf_mem_copy((uint8_t *) &pSmeRrmContext->duration,
 		     (uint8_t *) &pBeaconReq->measurementDuration,
 		     SIR_ESE_MAX_MEAS_IE_REQS);
 
@@ -959,14 +959,14 @@
 		return QDF_STATUS_E_AGAIN;
 	}
 
-	pMsg = cdf_mem_malloc(sizeof(tSirNeighborReportReqInd));
+	pMsg = qdf_mem_malloc(sizeof(tSirNeighborReportReqInd));
 	if (NULL == pMsg) {
 		sms_log(pMac, LOGE,
 			"Unable to allocate memory for Neighbor request");
 		return QDF_STATUS_E_NOMEM;
 	}
 
-	cdf_mem_zero(pMsg, sizeof(tSirNeighborReportReqInd));
+	qdf_mem_zero(pMsg, sizeof(tSirNeighborReportReqInd));
 #if defined WLAN_VOWIFI_DEBUG
 	sms_log(pMac, LOGE, FL(" Allocated memory for Neighbor request"));
 #endif
@@ -983,10 +983,10 @@
 
 	pMsg->messageType = eWNI_SME_NEIGHBOR_REPORT_REQ_IND;
 	pMsg->length = sizeof(tSirNeighborReportReqInd);
-	cdf_mem_copy(&pMsg->bssId, &pSession->connectedProfile.bssid,
+	qdf_mem_copy(&pMsg->bssId, &pSession->connectedProfile.bssid,
 		     sizeof(tSirMacAddr));
 	pMsg->noSSID = pNeighborReq->no_ssid;
-	cdf_mem_copy(&pMsg->ucSSID, &pNeighborReq->ssid, sizeof(tSirMacSSid));
+	qdf_mem_copy(&pMsg->ucSSID, &pNeighborReq->ssid, sizeof(tSirMacSSid));
 
 	status = cds_send_mb_message_to_mac(pMsg);
 	if (status != QDF_STATUS_SUCCESS)
@@ -1198,7 +1198,7 @@
 
 	for (i = 0; i < pNeighborRpt->numNeighborReports; i++) {
 		pNeighborReportDesc =
-			cdf_mem_malloc(sizeof(tRrmNeighborReportDesc));
+			qdf_mem_malloc(sizeof(tRrmNeighborReportDesc));
 		if (NULL == pNeighborReportDesc) {
 			sms_log(pMac, LOGE,
 				"Failed to allocate memory for RRM Neighbor report desc");
@@ -1207,20 +1207,20 @@
 
 		}
 
-		cdf_mem_zero(pNeighborReportDesc,
+		qdf_mem_zero(pNeighborReportDesc,
 			     sizeof(tRrmNeighborReportDesc));
 		pNeighborReportDesc->pNeighborBssDescription =
-			cdf_mem_malloc(sizeof(tSirNeighborBssDescription));
+			qdf_mem_malloc(sizeof(tSirNeighborBssDescription));
 		if (NULL == pNeighborReportDesc->pNeighborBssDescription) {
 			sms_log(pMac, LOGE,
 				"Failed to allocate memory for RRM Neighbor report BSS Description");
-			cdf_mem_free(pNeighborReportDesc);
+			qdf_mem_free(pNeighborReportDesc);
 			status = QDF_STATUS_E_NOMEM;
 			goto end;
 		}
-		cdf_mem_zero(pNeighborReportDesc->pNeighborBssDescription,
+		qdf_mem_zero(pNeighborReportDesc->pNeighborBssDescription,
 			     sizeof(tSirNeighborBssDescription));
-		cdf_mem_copy(pNeighborReportDesc->pNeighborBssDescription,
+		qdf_mem_copy(pNeighborReportDesc->pNeighborBssDescription,
 			     &pNeighborRpt->sNeighborBssDescription[i],
 			     sizeof(tSirNeighborBssDescription));
 
@@ -1247,9 +1247,9 @@
 					       sNeighborBssDescription[i].
 					       bssId));
 
-			cdf_mem_free(pNeighborReportDesc->
+			qdf_mem_free(pNeighborReportDesc->
 				     pNeighborBssDescription);
-			cdf_mem_free(pNeighborReportDesc);
+			qdf_mem_free(pNeighborReportDesc);
 		}
 	}
 end:
@@ -1493,7 +1493,7 @@
 QDF_STATUS rrm_change_default_config_param(tpAniSirGlobal pMac,
 					   struct rrm_config_param *rrm_config)
 {
-	cdf_mem_copy(&pMac->rrm.rrmSmeContext.rrmConfig, rrm_config,
+	qdf_mem_copy(&pMac->rrm.rrmSmeContext.rrmConfig, rrm_config,
 		     sizeof(struct rrm_config_param));
 
 	return QDF_STATUS_SUCCESS;
diff --git a/core/utils/epping/src/epping_helper.c b/core/utils/epping/src/epping_helper.c
index 2786933..8940579 100644
--- a/core/utils/epping/src/epping_helper.c
+++ b/core/utils/epping/src/epping_helper.c
@@ -60,7 +60,7 @@
 	pEpping_ctx->cookie_count = 0;
 	for (i = 0; i < MAX_COOKIE_SLOTS_NUM; i++) {
 		pEpping_ctx->s_cookie_mem[i] =
-			cdf_mem_malloc(sizeof(struct epping_cookie) *
+			qdf_mem_malloc(sizeof(struct epping_cookie) *
 				       MAX_COOKIE_SLOT_SIZE);
 		if (pEpping_ctx->s_cookie_mem == NULL) {
 			EPPING_LOG(QDF_TRACE_LEVEL_FATAL,
@@ -68,7 +68,7 @@
 				   i);
 			goto error;
 		}
-		cdf_mem_zero(pEpping_ctx->s_cookie_mem[i],
+		qdf_mem_zero(pEpping_ctx->s_cookie_mem[i],
 			     sizeof(struct epping_cookie) *
 			     MAX_COOKIE_SLOT_SIZE);
 	}
@@ -84,7 +84,7 @@
 error:
 	for (i = 0; i < MAX_COOKIE_SLOTS_NUM; i++) {
 		if (pEpping_ctx->s_cookie_mem[i]) {
-			cdf_mem_free(pEpping_ctx->s_cookie_mem[i]);
+			qdf_mem_free(pEpping_ctx->s_cookie_mem[i]);
 			pEpping_ctx->s_cookie_mem[i] = NULL;
 		}
 	}
@@ -101,7 +101,7 @@
 	qdf_spin_unlock_bh(&pEpping_ctx->cookie_lock);
 	for (i = 0; i < MAX_COOKIE_SLOTS_NUM; i++) {
 		if (pEpping_ctx->s_cookie_mem[i]) {
-			cdf_mem_free(pEpping_ctx->s_cookie_mem[i]);
+			qdf_mem_free(pEpping_ctx->s_cookie_mem[i]);
 			pEpping_ctx->s_cookie_mem[i] = NULL;
 		}
 	}
diff --git a/core/utils/epping/src/epping_main.c b/core/utils/epping/src/epping_main.c
index ee8fef1..e9b141e 100644
--- a/core/utils/epping/src/epping_main.c
+++ b/core/utils/epping/src/epping_main.c
@@ -87,7 +87,7 @@
 {
 	EPPING_LOG(QDF_TRACE_LEVEL_INFO_HIGH, "%s: Enter", __func__);
 
-	g_epping_ctx = cdf_mem_malloc(sizeof(*g_epping_ctx));
+	g_epping_ctx = qdf_mem_malloc(sizeof(*g_epping_ctx));
 
 	if (g_epping_ctx == NULL) {
 		EPPING_LOG(QDF_TRACE_LEVEL_ERROR,
@@ -148,7 +148,7 @@
 
 	to_free = g_epping_ctx;
 	g_epping_ctx = NULL;
-	cdf_mem_free(to_free);
+	qdf_mem_free(to_free);
 }
 
 static void epping_target_suspend_acknowledge(void *context)
diff --git a/core/utils/epping/src/epping_txrx.c b/core/utils/epping/src/epping_txrx.c
index 4012af5..3d41d0f 100644
--- a/core/utils/epping/src/epping_txrx.c
+++ b/core/utils/epping/src/epping_txrx.c
@@ -221,9 +221,9 @@
 {
 	epping_adapter_t *pAdapter = netdev_priv(dev);
 	struct sockaddr *psta_mac_addr = addr;
-	cdf_mem_copy(&pAdapter->macAddressCurrent,
+	qdf_mem_copy(&pAdapter->macAddressCurrent,
 		     psta_mac_addr->sa_data, ETH_ALEN);
-	cdf_mem_copy(dev->dev_addr, psta_mac_addr->sa_data, ETH_ALEN);
+	qdf_mem_copy(dev->dev_addr, psta_mac_addr->sa_data, ETH_ALEN);
 	return 0;
 }
 
@@ -360,12 +360,12 @@
 	}
 
 	pAdapter = netdev_priv(dev);
-	cdf_mem_zero(pAdapter, sizeof(*pAdapter));
+	qdf_mem_zero(pAdapter, sizeof(*pAdapter));
 	pAdapter->dev = dev;
 	pAdapter->pEpping_ctx = pEpping_ctx;
 	pAdapter->device_mode = device_mode;    /* station, SAP, etc */
-	cdf_mem_copy(dev->dev_addr, (void *)macAddr, sizeof(tSirMacAddr));
-	cdf_mem_copy(pAdapter->macAddressCurrent.bytes,
+	qdf_mem_copy(dev->dev_addr, (void *)macAddr, sizeof(tSirMacAddr));
+	qdf_mem_copy(pAdapter->macAddressCurrent.bytes,
 		     macAddr, sizeof(tSirMacAddr));
 	qdf_spinlock_create(&pAdapter->data_lock);
 	cdf_nbuf_queue_init(&pAdapter->nodrop_queue);
@@ -394,8 +394,8 @@
 	HTC_SERVICE_CONNECT_REQ connect;
 	HTC_SERVICE_CONNECT_RESP response;
 
-	cdf_mem_zero(&connect, sizeof(connect));
-	cdf_mem_zero(&response, sizeof(response));
+	qdf_mem_zero(&connect, sizeof(connect));
+	qdf_mem_zero(&response, sizeof(response));
 
 	/* these fields are the same for all service endpoints */
 	connect.EpCallbacks.pContext = pEpping_ctx;
diff --git a/core/utils/fwlog/dbglog_host.c b/core/utils/fwlog/dbglog_host.c
index 6de19c5..b37e839 100644
--- a/core/utils/fwlog/dbglog_host.c
+++ b/core/utils/fwlog/dbglog_host.c
@@ -4118,10 +4118,10 @@
 	event_report_t *pEvent_report;
 	A_UINT16 total_len;
 	total_len = sizeof(event_report_t) + length;
-	pBuf = cdf_mem_malloc(total_len);
+	pBuf = qdf_mem_malloc(total_len);
 	if (!pBuf) {
 		AR_DEBUG_PRINTF(ATH_DEBUG_ERR,
-				("%s: cdf_mem_malloc failed \n", __func__));
+				("%s: qdf_mem_malloc failed \n", __func__));
 		return;
 	}
 	pBuf1 = pBuf;
@@ -4133,7 +4133,7 @@
 	memcpy(pBuf, pPayload, length);
 	send_diag_netlink_data((A_UINT8 *) pBuf1, total_len,
 			       DIAG_TYPE_HOST_MSG);
-	cdf_mem_free((void *)pBuf1);
+	qdf_mem_free((void *)pBuf1);
 	return;
 
 }
diff --git a/core/utils/host_diag_log/src/host_diag_log.c b/core/utils/host_diag_log/src/host_diag_log.c
index 0ad8071..4f9d261 100644
--- a/core/utils/host_diag_log/src/host_diag_log.c
+++ b/core/utils/host_diag_log/src/host_diag_log.c
@@ -131,15 +131,15 @@
 
 		total_len = sizeof(tAniHdr) + sizeof(uint32_t) + data_len;
 
-		pBuf = (uint8_t *) cdf_mem_malloc(total_len);
+		pBuf = (uint8_t *) qdf_mem_malloc(total_len);
 
 		if (!pBuf) {
 			QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR,
-				  "cdf_mem_malloc failed");
+				  "qdf_mem_malloc failed");
 			return;
 		}
 
-		cdf_mem_zero((void *)pBuf, total_len);
+		qdf_mem_zero((void *)pBuf, total_len);
 
 		wmsg = (tAniHdr *) pBuf;
 		wmsg->type = PTT_MSG_DIAG_CMDS_TYPE;
@@ -154,7 +154,7 @@
 		memcpy(pBuf, pHdr, data_len);
 		ptt_sock_send_msg_to_app (wmsg, 0, ANI_NL_MSG_PUMAC,
 			INVALID_PID);
-		cdf_mem_free((void *)wmsg);
+		qdf_mem_free((void *)wmsg);
 	}
 	return;
 }
@@ -226,11 +226,11 @@
 	if (cds_is_multicast_logging()) {
 		total_len = sizeof(tAniHdr) + sizeof(event_report_t) + length;
 
-		pBuf = (uint8_t *) cdf_mem_malloc(total_len);
+		pBuf = (uint8_t *) qdf_mem_malloc(total_len);
 
 		if (!pBuf) {
 			QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR,
-				  "cdf_mem_malloc failed");
+				  "qdf_mem_malloc failed");
 			return;
 		}
 		wmsg = (tAniHdr *) pBuf;
@@ -252,11 +252,11 @@
 			    (wmsg, 0, ANI_NL_MSG_PUMAC, INVALID_PID) < 0) {
 			QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR,
 				  "Ptt Socket error sending message to the app!!");
-			cdf_mem_free((void *)wmsg);
+			qdf_mem_free((void *)wmsg);
 			return;
 		}
 
-		cdf_mem_free((void *)wmsg);
+		qdf_mem_free((void *)wmsg);
 	}
 
 	return;
diff --git a/core/utils/host_diag_log/src/i_host_diag_core_log.h b/core/utils/host_diag_log/src/i_host_diag_core_log.h
index 8695171..829ae19 100644
--- a/core/utils/host_diag_log/src/i_host_diag_core_log.h
+++ b/core/utils/host_diag_log/src/i_host_diag_core_log.h
@@ -46,7 +46,7 @@
    Include Files
    ------------------------------------------------------------------------*/
 #include <qdf_types.h>
-#include <cdf_memory.h>
+#include <qdf_mem.h>
 
 /*--------------------------------------------------------------------------
    Preprocessor definitions and constants
@@ -83,9 +83,9 @@
 
 #define WLAN_HOST_DIAG_LOG_ALLOC(payload_ptr, payload_type, log_code)	\
 	do { \
-		payload_ptr = (payload_type *)cdf_mem_malloc(sizeof(payload_type)); \
+		payload_ptr = (payload_type *)qdf_mem_malloc(sizeof(payload_type)); \
 		if (payload_ptr) { \
-			cdf_mem_zero(payload_ptr, sizeof(payload_type)); \
+			qdf_mem_zero(payload_ptr, sizeof(payload_type)); \
 			host_diag_log_set_code(payload_ptr, log_code); \
 			host_diag_log_set_length(payload_ptr, sizeof(payload_type)); \
 		} \
@@ -98,7 +98,7 @@
 	do { \
 		if (payload_ptr) { \
 			host_diag_log_submit(payload_ptr); \
-			cdf_mem_free(payload_ptr); \
+			qdf_mem_free(payload_ptr); \
 		} \
 	} while (0)
 
@@ -108,7 +108,7 @@
 #define WLAN_HOST_DIAG_LOG_FREE(payload_ptr) \
 	do {				\
 		if (payload_ptr) {	      \
-			cdf_mem_free(payload_ptr); \
+			qdf_mem_free(payload_ptr); \
 		}			      \
 	} while (0)
 
diff --git a/core/utils/logging/src/wlan_logging_sock_svc.c b/core/utils/logging/src/wlan_logging_sock_svc.c
index 55eefa9..631cff5 100644
--- a/core/utils/logging/src/wlan_logging_sock_svc.c
+++ b/core/utils/logging/src/wlan_logging_sock_svc.c
@@ -667,7 +667,7 @@
 		return -ENOMEM;
 	}
 
-	cdf_mem_zero(gplog_msg, (num_buf * sizeof(struct log_msg)));
+	qdf_mem_zero(gplog_msg, (num_buf * sizeof(struct log_msg)));
 
 	gwlan_logging.log_fe_to_console = !!log_fe_to_console;
 	gwlan_logging.num_buf = num_buf;
diff --git a/core/utils/pktlog/linux_ac.c b/core/utils/pktlog/linux_ac.c
index 3297c00..4289ab3 100644
--- a/core/utils/pktlog/linux_ac.c
+++ b/core/utils/pktlog/linux_ac.c
@@ -583,7 +583,7 @@
 
 	do {
 		pktlog = (struct host_log_pktlog_info *)
-			cdf_mem_malloc(sizeof(struct host_log_pktlog_info) +
+			qdf_mem_malloc(sizeof(struct host_log_pktlog_info) +
 					VOS_LOG_PKT_LOG_SIZE);
 		if (!pktlog) {
 			printk(PKTLOG_TAG " %s: Memory allocation failed\n",
@@ -591,7 +591,7 @@
 			return -ENOMEM;
 		}
 
-		cdf_mem_zero(pktlog, VOS_LOG_PKT_LOG_SIZE);
+		qdf_mem_zero(pktlog, VOS_LOG_PKT_LOG_SIZE);
 		host_diag_log_set_code(pktlog, LOG_WLAN_PKT_LOG_INFO_C);
 
 		pktlog->buf_len = 0;
@@ -643,7 +643,7 @@
 			pktlog->seq_no = pl_info->buf->msg_index++;
 			WLAN_HOST_DIAG_LOG_REPORT(pktlog);
 		} else {
-			cdf_mem_free(pktlog);
+			qdf_mem_free(pktlog);
 		}
 		num_bytes_read += ret_val;
 
@@ -710,7 +710,7 @@
 
 	if (*ppos < bufhdr_size) {
 		count = MIN((bufhdr_size - *ppos), rem_len);
-		cdf_mem_copy(buf, ((char *)&log_buf->bufhdr) + *ppos,
+		qdf_mem_copy(buf, ((char *)&log_buf->bufhdr) + *ppos,
 				count);
 		rem_len -= count;
 		ret_val += count;
@@ -756,7 +756,7 @@
 			goto rd_done;
 
 		count = MIN(rem_len, (end_offset - ppos_data + 1));
-		cdf_mem_copy(buf + ret_val,
+		qdf_mem_copy(buf + ret_val,
 				log_buf->log_data + ppos_data,
 				count);
 		ret_val += count;
@@ -764,7 +764,7 @@
 	} else {
 		if (ppos_data <= fold_offset) {
 			count = MIN(rem_len, (fold_offset - ppos_data + 1));
-			cdf_mem_copy(buf + ret_val,
+			qdf_mem_copy(buf + ret_val,
 					log_buf->log_data + ppos_data,
 					count);
 			ret_val += count;
@@ -780,7 +780,7 @@
 
 		if (ppos_data <= end_offset) {
 			count = MIN(rem_len, (end_offset - ppos_data + 1));
-			cdf_mem_copy(buf + ret_val,
+			qdf_mem_copy(buf + ret_val,
 					log_buf->log_data + ppos_data,
 					count);
 			ret_val += count;
diff --git a/core/utils/pktlog/pktlog_ac.c b/core/utils/pktlog/pktlog_ac.c
index 842ecb5..3b3f071 100644
--- a/core/utils/pktlog/pktlog_ac.c
+++ b/core/utils/pktlog/pktlog_ac.c
@@ -41,7 +41,7 @@
  */
 
 #ifndef REMOVE_PKT_LOG
-#include "cdf_memory.h"
+#include "qdf_mem.h"
 #include "athdefs.h"
 #include "pktlog_ac_i.h"
 #include "cds_api.h"
@@ -78,7 +78,7 @@
 	QDF_STATUS status;
 	struct ath_pktlog_wmi_params *param;
 
-	param = cdf_mem_malloc(sizeof(struct ath_pktlog_wmi_params));
+	param = qdf_mem_malloc(sizeof(struct ath_pktlog_wmi_params));
 
 	if (!param)
 		return A_NO_MEMORY;
@@ -93,7 +93,7 @@
 	status = cds_mq_post_message(CDS_MQ_ID_WMA, &msg);
 
 	if (status != QDF_STATUS_SUCCESS) {
-		cdf_mem_free(param);
+		qdf_mem_free(param);
 		return A_ERROR;
 	}
 
diff --git a/core/utils/pktlog/pktlog_internal.c b/core/utils/pktlog/pktlog_internal.c
index cdc416f..010585c 100644
--- a/core/utils/pktlog/pktlog_internal.c
+++ b/core/utils/pktlog/pktlog_internal.c
@@ -44,7 +44,7 @@
 #include "ol_txrx_types.h"
 #include "ol_htt_tx_api.h"
 #include "ol_tx_desc.h"
-#include "cdf_memory.h"
+#include "qdf_mem.h"
 #include "htt.h"
 #include "htt_internal.h"
 #include "pktlog_ac_i.h"
@@ -327,7 +327,7 @@
 								&buf_size);
 			if (data) {
 				process_ieee_hdr(data);
-				cdf_mem_free(data);
+				qdf_mem_free(data);
 			}
 		} else {
 			/*
@@ -359,11 +359,11 @@
 		 */
 		txctl_log.priv.frm_hdr = frm_hdr;
 		qdf_assert(txctl_log.priv.txdesc_ctl);
-		cdf_mem_copy((void *)&txctl_log.priv.txdesc_ctl,
+		qdf_mem_copy((void *)&txctl_log.priv.txdesc_ctl,
 			     ((void *)data + sizeof(struct ath_pktlog_hdr)),
 			     pl_hdr.size);
 		qdf_assert(txctl_log.txdesc_hdr_ctl);
-		cdf_mem_copy(txctl_log.txdesc_hdr_ctl, &txctl_log.priv,
+		qdf_mem_copy(txctl_log.txdesc_hdr_ctl, &txctl_log.priv,
 			     sizeof(txctl_log.priv));
 		/* Add Protocol information and HT specific information */
 #else
@@ -373,8 +373,8 @@
 		qdf_assert(txdesc_hdr_ctl);
 		qdf_assert(pl_hdr.size < (370 * sizeof(u_int32_t)));
 
-		cdf_mem_copy(txdesc_hdr_ctl, &frm_hdr, sizeof(frm_hdr));
-		cdf_mem_copy((char *)txdesc_hdr_ctl + sizeof(frm_hdr),
+		qdf_mem_copy(txdesc_hdr_ctl, &frm_hdr, sizeof(frm_hdr));
+		qdf_mem_copy((char *)txdesc_hdr_ctl + sizeof(frm_hdr),
 					((void *)data + sizeof(struct ath_pktlog_hdr)),
 					 pl_hdr.size);
 #endif /* !defined(HELIUMPLUS) */
@@ -387,7 +387,7 @@
 		txstat_log.ds_status = (void *)
 				       pktlog_getbuf(pl_dev, pl_info, log_size, &pl_hdr);
 		qdf_assert(txstat_log.ds_status);
-		cdf_mem_copy(txstat_log.ds_status,
+		qdf_mem_copy(txstat_log.ds_status,
 			     ((void *)data + sizeof(struct ath_pktlog_hdr)),
 			     pl_hdr.size);
 	}
@@ -409,7 +409,7 @@
 		cdf_nbuf_t netbuf;
 		uint32_t len;
 
-		cdf_mem_set(&pl_msdu_info, sizeof(pl_msdu_info), 0);
+		qdf_mem_set(&pl_msdu_info, sizeof(pl_msdu_info), 0);
 
 		pl_msdu_info.num_msdu = *msdu_id_info;
 		pl_msdu_info.priv_size = sizeof(uint32_t) *
@@ -473,10 +473,10 @@
 		}
 		pl_msdu_info.ath_msdu_info = pktlog_getbuf(pl_dev, pl_info,
 							   log_size, &pl_hdr);
-		cdf_mem_copy((void *)&pl_msdu_info.priv.msdu_id_info,
+		qdf_mem_copy((void *)&pl_msdu_info.priv.msdu_id_info,
 			     ((void *)data + sizeof(struct ath_pktlog_hdr)),
 			     sizeof(pl_msdu_info.priv.msdu_id_info));
-		cdf_mem_copy(pl_msdu_info.ath_msdu_info, &pl_msdu_info.priv,
+		qdf_mem_copy(pl_msdu_info.ath_msdu_info, &pl_msdu_info.priv,
 			     sizeof(pl_msdu_info.priv));
 	}
 	return A_OK;
@@ -528,7 +528,7 @@
 #endif /* !defined(HELIUMPLUS) */
 		rxstat_log.rx_desc = (void *)pktlog_getbuf(pl_dev, pl_info,
 							   log_size, &pl_hdr);
-		cdf_mem_copy(rxstat_log.rx_desc, (void *)rx_desc +
+		qdf_mem_copy(rxstat_log.rx_desc, (void *)rx_desc +
 			     sizeof(struct htt_host_fw_desc_base), pl_hdr.size);
 		msdu = cdf_nbuf_next(msdu);
 	}
@@ -567,7 +567,7 @@
 	rxstat_log.rx_desc = (void *)pktlog_getbuf(pl_dev, pl_info,
 						   log_size, &pl_hdr);
 
-	cdf_mem_copy(rxstat_log.rx_desc,
+	qdf_mem_copy(rxstat_log.rx_desc,
 		     (void *)data + sizeof(struct ath_pktlog_hdr), pl_hdr.size);
 
 	return A_OK;
@@ -620,7 +620,7 @@
 	rcf_log.rcFind = (void *)pktlog_getbuf(pl_dev, pl_info,
 					       log_size, &pl_hdr);
 
-	cdf_mem_copy(rcf_log.rcFind,
+	qdf_mem_copy(rcf_log.rcFind,
 				 ((char *)data + sizeof(struct ath_pktlog_hdr)),
 				 pl_hdr.size);
 
@@ -672,7 +672,7 @@
 	 */
 	rcu_log.txRateCtrl = (void *)pktlog_getbuf(pl_dev, pl_info,
 						   log_size, &pl_hdr);
-	cdf_mem_copy(rcu_log.txRateCtrl,
+	qdf_mem_copy(rcu_log.txRateCtrl,
 		     ((char *)data + sizeof(struct ath_pktlog_hdr)),
 		     pl_hdr.size);
 	return A_OK;
diff --git a/core/wma/src/wlan_qct_wma_legacy.c b/core/wma/src/wlan_qct_wma_legacy.c
index 71768f7..c2c81bd 100644
--- a/core/wma/src/wlan_qct_wma_legacy.c
+++ b/core/wma/src/wlan_qct_wma_legacy.c
@@ -114,14 +114,14 @@
 	msg.type = pMb->type;
 	msg.bodyval = 0;
 
-	pMbLocal = cdf_mem_malloc(pMb->msgLen);
+	pMbLocal = qdf_mem_malloc(pMb->msgLen);
 	if (!pMbLocal) {
 		WMA_LOGE("Memory allocation failed! Can't send 0x%x\n",
 			 msg.type);
 		return eSIR_MEM_ALLOC_FAILED;
 	}
 
-	cdf_mem_copy((void *)pMbLocal, (void *)pMb, pMb->msgLen);
+	qdf_mem_copy((void *)pMbLocal, (void *)pMb, pMb->msgLen);
 	msg.bodyptr = pMbLocal;
 
 	switch (msg.type & HAL_MMH_MB_MSG_TYPE_MASK) {
@@ -142,12 +142,12 @@
 		break;
 
 	case SIR_PTT_MSG_TYPES_BEGIN:
-		cdf_mem_free(msg.bodyptr);
+		qdf_mem_free(msg.bodyptr);
 		break;
 
 	default:
 		WMA_LOGD("Unknown message type = 0x%X\n", msg.type);
-		cdf_mem_free(msg.bodyptr);
+		qdf_mem_free(msg.bodyptr);
 		return eSIR_FAILURE;
 	}
 
diff --git a/core/wma/src/wma_data.c b/core/wma/src/wma_data.c
index aa56cb9..941ce36 100644
--- a/core/wma/src/wma_data.c
+++ b/core/wma/src/wma_data.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"
 
@@ -830,7 +830,7 @@
 
 	wma_handle->umac_data_ota_ack_cb = NULL;
 	wma_handle->last_umac_data_nbuf = NULL;
-	cdf_mem_free(work);
+	qdf_mem_free(work);
 	wma_handle->ack_work_ctx = NULL;
 }
 
@@ -881,7 +881,7 @@
 	if (wma_handle && wma_handle->umac_data_ota_ack_cb) {
 		struct wma_tx_ack_work_ctx *ack_work;
 
-		ack_work = cdf_mem_malloc(sizeof(struct wma_tx_ack_work_ctx));
+		ack_work = qdf_mem_malloc(sizeof(struct wma_tx_ack_work_ctx));
 		wma_handle->ack_work_ctx = ack_work;
 		if (ack_work) {
 			ack_work->wma_handle = wma_handle;
@@ -1128,7 +1128,7 @@
 	buf_ptr += WMI_TLV_HDR_SIZE;
 	chan_latency.chan_mhz = chan1_freq;
 	chan_latency.latency = latency_chan1;
-	cdf_mem_copy(buf_ptr, &chan_latency, sizeof(chan_latency));
+	qdf_mem_copy(buf_ptr, &chan_latency, sizeof(chan_latency));
 	ret = wmi_unified_cmd_send(wma->wmi_handle, buf, len,
 				   WMI_RESMGR_SET_CHAN_LATENCY_CMDID);
 	if (ret) {
@@ -1255,12 +1255,12 @@
 	buf_ptr += WMI_TLV_HDR_SIZE;
 	chan_quota.chan_mhz = chan1_freq;
 	chan_quota.channel_time_quota = quota_chan1;
-	cdf_mem_copy(buf_ptr, &chan_quota, sizeof(chan_quota));
+	qdf_mem_copy(buf_ptr, &chan_quota, sizeof(chan_quota));
 	/* Construct channel and quota record for the 2nd MCC mode. */
 	buf_ptr += sizeof(chan_quota);
 	chan_quota.chan_mhz = chan2_freq;
 	chan_quota.channel_time_quota = quota_chan2;
-	cdf_mem_copy(buf_ptr, &chan_quota, sizeof(chan_quota));
+	qdf_mem_copy(buf_ptr, &chan_quota, sizeof(chan_quota));
 
 	ret = wmi_unified_cmd_send(wma->wmi_handle, buf, len,
 				   WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID);
@@ -1410,7 +1410,7 @@
 	if (!pdev) {
 		WMA_LOGE("vdev handle is invalid for %pM",
 			 pRateUpdateParams->bssid.bytes);
-		cdf_mem_free(pRateUpdateParams);
+		qdf_mem_free(pRateUpdateParams);
 		return QDF_STATUS_E_INVAL;
 	}
 	short_gi = intr[vdev_id].config.shortgi;
@@ -1446,7 +1446,7 @@
 				 mbpsx10_rate, pRateUpdateParams->nss, &rate);
 	if (ret != QDF_STATUS_SUCCESS) {
 		WMA_LOGE("%s: Error, Invalid input rate value", __func__);
-		cdf_mem_free(pRateUpdateParams);
+		qdf_mem_free(pRateUpdateParams);
 		return ret;
 	}
 	ret = wmi_unified_vdev_set_param_send(wma->wmi_handle, vdev_id,
@@ -1454,12 +1454,12 @@
 	if (ret) {
 		WMA_LOGE("%s: Failed to Set WMI_VDEV_PARAM_SGI (%d), ret = %d",
 			 __func__, short_gi, ret);
-		cdf_mem_free(pRateUpdateParams);
+		qdf_mem_free(pRateUpdateParams);
 		return QDF_STATUS_E_FAILURE;
 	}
 	ret = wmi_unified_vdev_set_param_send(wma->wmi_handle,
 					      vdev_id, paramId, rate);
-	cdf_mem_free(pRateUpdateParams);
+	qdf_mem_free(pRateUpdateParams);
 	if (ret) {
 		WMA_LOGE("%s: Failed to Set rate, ret = %d", __func__, ret);
 		return QDF_STATUS_E_FAILURE;
@@ -1497,7 +1497,7 @@
 	ack_cb((tpAniSirGlobal) (wma_handle->mac_context),
 	       work->status ? 0 : 1);
 
-	cdf_mem_free(work);
+	qdf_mem_free(work);
 	wma_handle->ack_work_ctx = NULL;
 }
 
@@ -1555,7 +1555,7 @@
 			struct wma_tx_ack_work_ctx *ack_work;
 
 			ack_work =
-				cdf_mem_malloc(sizeof(struct wma_tx_ack_work_ctx));
+				qdf_mem_malloc(sizeof(struct wma_tx_ack_work_ctx));
 
 			if (ack_work) {
 				ack_work->wma_handle = wma_handle;
@@ -2181,27 +2181,27 @@
 	ethr_hdr = (struct ethernet_hdr_t *)local_buf;
 	switch (wh->i_fc[1] & IEEE80211_FC1_DIR_MASK) {
 	case IEEE80211_FC1_DIR_NODS:
-		cdf_mem_copy(ethr_hdr->dest_addr, wh->i_addr1,
+		qdf_mem_copy(ethr_hdr->dest_addr, wh->i_addr1,
 			     ETHERNET_ADDR_LEN);
-		cdf_mem_copy(ethr_hdr->src_addr, wh->i_addr2,
+		qdf_mem_copy(ethr_hdr->src_addr, wh->i_addr2,
 			     ETHERNET_ADDR_LEN);
 		break;
 	case IEEE80211_FC1_DIR_TODS:
-		cdf_mem_copy(ethr_hdr->dest_addr, wh->i_addr3,
+		qdf_mem_copy(ethr_hdr->dest_addr, wh->i_addr3,
 			     ETHERNET_ADDR_LEN);
-		cdf_mem_copy(ethr_hdr->src_addr, wh->i_addr2,
+		qdf_mem_copy(ethr_hdr->src_addr, wh->i_addr2,
 			     ETHERNET_ADDR_LEN);
 		break;
 	case IEEE80211_FC1_DIR_FROMDS:
-		cdf_mem_copy(ethr_hdr->dest_addr, wh->i_addr1,
+		qdf_mem_copy(ethr_hdr->dest_addr, wh->i_addr1,
 			     ETHERNET_ADDR_LEN);
-		cdf_mem_copy(ethr_hdr->src_addr, wh->i_addr3,
+		qdf_mem_copy(ethr_hdr->src_addr, wh->i_addr3,
 			     ETHERNET_ADDR_LEN);
 		break;
 	case IEEE80211_FC1_DIR_DSTODS:
-		cdf_mem_copy(ethr_hdr->dest_addr, wh->i_addr3,
+		qdf_mem_copy(ethr_hdr->dest_addr, wh->i_addr3,
 			     ETHERNET_ADDR_LEN);
-		cdf_mem_copy(ethr_hdr->src_addr, wh->i_addr4,
+		qdf_mem_copy(ethr_hdr->src_addr, wh->i_addr4,
 			     ETHERNET_ADDR_LEN);
 		break;
 	}
@@ -2217,7 +2217,7 @@
 		ethr_hdr->ethertype[0] = (ether_type >> 8) & 0xff;
 		ethr_hdr->ethertype[1] = (ether_type) & 0xff;
 	}
-	cdf_mem_copy(buf, ethr_hdr, ETHERNET_HDR_LEN);
+	qdf_mem_copy(buf, ethr_hdr, ETHERNET_HDR_LEN);
 }
 
 /**
@@ -2257,7 +2257,7 @@
 	WMA_LOGE("%s: initialize desc pool of size %d", __func__, pool_size);
 	wma_handle->wmi_desc_pool.pool_size = pool_size;
 	wma_handle->wmi_desc_pool.num_free = pool_size;
-	wma_handle->wmi_desc_pool.array = cdf_mem_malloc(pool_size *
+	wma_handle->wmi_desc_pool.array = qdf_mem_malloc(pool_size *
 					sizeof(union wmi_desc_elem_t));
 	if (!wma_handle->wmi_desc_pool.array) {
 		WMA_LOGE("%s: failed to allocate desc pool", __func__);
@@ -2289,7 +2289,7 @@
 {
 	qdf_spin_lock_bh(&wma_handle->wmi_desc_pool.wmi_desc_pool_lock);
 	if (wma_handle->wmi_desc_pool.array) {
-		cdf_mem_free(wma_handle->wmi_desc_pool.array);
+		qdf_mem_free(wma_handle->wmi_desc_pool.array);
 		wma_handle->wmi_desc_pool.array = NULL;
 	} else {
 		WMA_LOGE("%s: Empty WMI descriptor pool", __func__);
@@ -2392,7 +2392,7 @@
 	WMITLV_SET_HDR(bufp, WMITLV_TAG_ARRAY_BYTE, roundup(bufp_len,
 							    sizeof(uint32_t)));
 	bufp += WMI_TLV_HDR_SIZE;
-	cdf_mem_copy(bufp, pData, bufp_len);
+	qdf_mem_copy(bufp, pData, bufp_len);
 	cdf_nbuf_map_single(qdf_ctx, tx_frame, QDF_DMA_TO_DEVICE);
 	dma_addr = cdf_nbuf_get_frag_paddr(tx_frame, 0);
 	cmd->paddr_lo = (uint32_t)(dma_addr & 0xffffffff);
@@ -2529,9 +2529,9 @@
 				 * MAC header and data, Keep the CCMP header and
 				 * trailer as 0's, firmware shall fill this
 				 */
-				cdf_mem_set(pFrame, newFrmLen, 0);
-				cdf_mem_copy(pFrame, wh, sizeof(*wh));
-				cdf_mem_copy(pFrame + sizeof(*wh) +
+				qdf_mem_set(pFrame, newFrmLen, 0);
+				qdf_mem_copy(pFrame, wh, sizeof(*wh));
+				qdf_mem_copy(pFrame + sizeof(*wh) +
 					     IEEE80211_CCMP_HEADERLEN,
 					     pData + sizeof(*wh),
 					     frmLen - sizeof(*wh));
@@ -2560,9 +2560,9 @@
 			 * MAC header and data. MMIE field will be
 			 * filled by cds_attach_mmie API
 			 */
-			cdf_mem_set(pFrame, newFrmLen, 0);
-			cdf_mem_copy(pFrame, wh, sizeof(*wh));
-			cdf_mem_copy(pFrame + sizeof(*wh),
+			qdf_mem_set(pFrame, newFrmLen, 0);
+			qdf_mem_copy(pFrame, wh, sizeof(*wh));
+			qdf_mem_copy(pFrame + sizeof(*wh),
 				     pData + sizeof(*wh), frmLen - sizeof(*wh));
 			if (!cds_attach_mmie(iface->key.key,
 					     iface->key.key_id[0].ipn,
@@ -2644,14 +2644,14 @@
 
 		/* Take out 802.11 header from skb */
 		decap_info.hdr_len = wma_ieee80211_hdrsize(wh);
-		cdf_mem_copy(decap_info.hdr, wh, decap_info.hdr_len);
+		qdf_mem_copy(decap_info.hdr, wh, decap_info.hdr_len);
 		cdf_nbuf_pull_head(skb, decap_info.hdr_len);
 
 		/*  Decapsulate to 802.3 format */
 		wma_decap_to_8023(skb, &decap_info);
 
 		/* Zero out skb's context buffer for the driver to use */
-		cdf_mem_set(skb->cb, sizeof(skb->cb), 0);
+		qdf_mem_set(skb->cb, sizeof(skb->cb), 0);
 
 		/* Do the DMA Mapping */
 		cdf_nbuf_map_single(pdev->osdev, skb, QDF_DMA_TO_DEVICE);
@@ -2912,34 +2912,34 @@
 	if (cdf_nbuf_len(rx_frame) < sizeof(*eth_hdr))
 		return;
 	eth_hdr = (struct ether_header *)cdf_nbuf_data(rx_frame);
-	mic_err_ind = cdf_mem_malloc(sizeof(*mic_err_ind));
+	mic_err_ind = qdf_mem_malloc(sizeof(*mic_err_ind));
 	if (!mic_err_ind) {
 		WMA_LOGE("%s: Failed to allocate memory for MIC indication message",
 			__func__);
 		return;
 	}
-	cdf_mem_set((void *)mic_err_ind, sizeof(*mic_err_ind), 0);
+	qdf_mem_set((void *)mic_err_ind, sizeof(*mic_err_ind), 0);
 
 	mic_err_ind->messageType = eWNI_SME_MIC_FAILURE_IND;
 	mic_err_ind->length = sizeof(*mic_err_ind);
 	mic_err_ind->sessionId = vdev_id;
 	qdf_copy_macaddr(&mic_err_ind->bssId,
 		     (struct qdf_mac_addr *) &wma->interfaces[vdev_id].bssid);
-	cdf_mem_copy(mic_err_ind->info.taMacAddr,
+	qdf_mem_copy(mic_err_ind->info.taMacAddr,
 		     (struct qdf_mac_addr *) peer_mac_addr,
 			sizeof(tSirMacAddr));
-	cdf_mem_copy(mic_err_ind->info.srcMacAddr,
+	qdf_mem_copy(mic_err_ind->info.srcMacAddr,
 		     (struct qdf_mac_addr *) eth_hdr->ether_shost,
 			sizeof(tSirMacAddr));
-	cdf_mem_copy(mic_err_ind->info.dstMacAddr,
+	qdf_mem_copy(mic_err_ind->info.dstMacAddr,
 		     (struct qdf_mac_addr *) eth_hdr->ether_dhost,
 			sizeof(tSirMacAddr));
 	mic_err_ind->info.keyId = key_id;
 	mic_err_ind->info.multicast =
 		IEEE80211_IS_MULTICAST(eth_hdr->ether_dhost);
-	cdf_mem_copy(mic_err_ind->info.TSC, pn, SIR_CIPHER_SEQ_CTR_SIZE);
+	qdf_mem_copy(mic_err_ind->info.TSC, pn, SIR_CIPHER_SEQ_CTR_SIZE);
 
-	cdf_mem_set(&cds_msg, sizeof(cds_msg_t), 0);
+	qdf_mem_set(&cds_msg, sizeof(cds_msg_t), 0);
 	cds_msg.type = eWNI_SME_MIC_FAILURE_IND;
 	cds_msg.bodyptr = (void *) mic_err_ind;
 
@@ -2947,7 +2947,7 @@
 		cds_mq_post_message(CDS_MQ_ID_SME, (cds_msg_t *) &cds_msg)) {
 		WMA_LOGE("%s: could not post mic failure indication to SME",
 			 __func__);
-		cdf_mem_free((void *)mic_err_ind);
+		qdf_mem_free((void *)mic_err_ind);
 	}
 }
 
@@ -3107,14 +3107,14 @@
 			return;
 		}
 
-		mic_err_ind = cdf_mem_malloc(sizeof(*mic_err_ind));
+		mic_err_ind = qdf_mem_malloc(sizeof(*mic_err_ind));
 		if (!mic_err_ind) {
 			WMA_LOGE("%s: MIC indication mem alloc failed",
 					 __func__);
 			return;
 		}
 
-		cdf_mem_set((void *) mic_err_ind, 0,
+		qdf_mem_set((void *) mic_err_ind, 0,
 			 sizeof(*mic_err_ind));
 		mic_err_ind->messageType = eWNI_SME_MIC_FAILURE_IND;
 		mic_err_ind->length = sizeof(*mic_err_ind);
@@ -3125,23 +3125,23 @@
 			 mic_err_ind->bssId.bytes[0], mic_err_ind->bssId.bytes[1],
 			 mic_err_ind->bssId.bytes[2], mic_err_ind->bssId.bytes[3],
 			 mic_err_ind->bssId.bytes[4], mic_err_ind->bssId.bytes[5]);
-		cdf_mem_copy(mic_err_ind->info.taMacAddr,
+		qdf_mem_copy(mic_err_ind->info.taMacAddr,
 			 (struct qdf_mac_addr *) err_info->u.mic_err.ta,
 			 sizeof(tSirMacAddr));
-		cdf_mem_copy(mic_err_ind->info.srcMacAddr,
+		qdf_mem_copy(mic_err_ind->info.srcMacAddr,
 			 (struct qdf_mac_addr *) err_info->u.mic_err.sa,
 			 sizeof(tSirMacAddr));
-		cdf_mem_copy(mic_err_ind->info.dstMacAddr,
+		qdf_mem_copy(mic_err_ind->info.dstMacAddr,
 			(struct qdf_mac_addr *) err_info->u.mic_err.da,
 			 sizeof(tSirMacAddr));
 		mic_err_ind->info.keyId = err_info->u.mic_err.key_id;
 		mic_err_ind->info.multicast =
 			 IEEE80211_IS_MULTICAST(err_info->u.mic_err.da);
-		cdf_mem_copy(mic_err_ind->info.TSC,
+		qdf_mem_copy(mic_err_ind->info.TSC,
 			 (void *)&err_info->
 			 u.mic_err.pn, SIR_CIPHER_SEQ_CTR_SIZE);
 
-		cdf_mem_set(&cds_msg, sizeof(cds_msg_t), 0);
+		qdf_mem_set(&cds_msg, sizeof(cds_msg_t), 0);
 		cds_msg.type = eWNI_SME_MIC_FAILURE_IND;
 		cds_msg.bodyptr = (void *) mic_err_ind;
 		if (QDF_STATUS_SUCCESS !=
@@ -3149,7 +3149,7 @@
 				 (cds_msg_t *) &cds_msg)) {
 			WMA_LOGE("%s: mic failure ind post to SME failed",
 					 __func__);
-			cdf_mem_free((void *)mic_err_ind);
+			qdf_mem_free((void *)mic_err_ind);
 		}
 		break;
 	}
diff --git a/core/wma/src/wma_dev_if.c b/core/wma/src/wma_dev_if.c
index a4ce0be..3dafbdd 100644
--- a/core/wma/src/wma_dev_if.c
+++ b/core/wma/src/wma_dev_if.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"
 
@@ -504,18 +504,18 @@
 				 __func__, param->session_id);
 			qdf_mc_timer_stop(&req_msg->event_timeout);
 			qdf_mc_timer_destroy(&req_msg->event_timeout);
-			cdf_mem_free(req_msg);
+			qdf_mem_free(req_msg);
 		}
 	}
 	if (iface->addBssStaContext)
-		cdf_mem_free(iface->addBssStaContext);
+		qdf_mem_free(iface->addBssStaContext);
 
 
 #if defined WLAN_FEATURE_VOWIFI_11R
 	if (iface->staKeyParams)
-		cdf_mem_free(iface->staKeyParams);
+		qdf_mem_free(iface->staKeyParams);
 #endif /* WLAN_FEATURE_VOWIFI_11R */
-	cdf_mem_zero(iface, sizeof(*iface));
+	qdf_mem_zero(iface, sizeof(*iface));
 	param->status = QDF_STATUS_SUCCESS;
 	sme_msg.type = eWNI_SME_DEL_STA_SELF_RSP;
 	sme_msg.bodyptr = param;
@@ -524,7 +524,7 @@
 	status = cds_mq_post_message(QDF_MODULE_ID_SME, &sme_msg);
 	if (!QDF_IS_STATUS_SUCCESS(status)) {
 		WMA_LOGE("Failed to post eWNI_SME_ADD_STA_SELF_RSP");
-		cdf_mem_free(param);
+		qdf_mem_free(param);
 	}
 }
 
@@ -573,7 +573,7 @@
 	if (WMI_SERVICE_IS_ENABLED(wma_handle->wmi_service_bitmap,
 				WMI_SERVICE_SYNC_DELETE_CMDS)) {
 		sta_self_wmi_rsp =
-			cdf_mem_malloc(sizeof(struct del_sta_self_rsp_params));
+			qdf_mem_malloc(sizeof(struct del_sta_self_rsp_params));
 		if (sta_self_wmi_rsp == NULL) {
 			WMA_LOGP(FL("Failed to allocate memory"));
 			return QDF_STATUS_E_NOMEM;
@@ -652,12 +652,12 @@
 	return status;
 out:
 	if (iface->addBssStaContext)
-		cdf_mem_free(iface->addBssStaContext);
+		qdf_mem_free(iface->addBssStaContext);
 #if defined WLAN_FEATURE_VOWIFI_11R
 	if (iface->staKeyParams)
-		cdf_mem_free(iface->staKeyParams);
+		qdf_mem_free(iface->staKeyParams);
 #endif /* WLAN_FEATURE_VOWIFI_11R */
-	cdf_mem_zero(iface, sizeof(*iface));
+	qdf_mem_zero(iface, sizeof(*iface));
 	del_sta_self_req_param->status = status;
 	if (generate_rsp) {
 		sme_msg.type = eWNI_SME_DEL_STA_SELF_RSP;
@@ -667,7 +667,7 @@
 		status = cds_mq_post_message(QDF_MODULE_ID_SME, &sme_msg);
 		if (!QDF_IS_STATUS_SUCCESS(status)) {
 			WMA_LOGE("Failed to post eWNI_SME_DEL_STA_SELF_RSP");
-			cdf_mem_free(del_sta_self_req_param);
+			qdf_mem_free(del_sta_self_req_param);
 		}
 	}
 	return status;
@@ -698,7 +698,7 @@
 	if (!iface->handle) {
 		WMA_LOGE("handle of vdev_id %d is NULL vdev is already freed",
 			 vdev_id);
-		cdf_mem_free(pdel_sta_self_req_param);
+		qdf_mem_free(pdel_sta_self_req_param);
 		pdel_sta_self_req_param = NULL;
 		return status;
 	}
@@ -791,7 +791,7 @@
 #endif /* QCA_IBSS_SUPPORT */
 	    ) {
 		wma->interfaces[resp_event->vdev_id].beacon =
-			cdf_mem_malloc(sizeof(struct beacon_info));
+			qdf_mem_malloc(sizeof(struct beacon_info));
 
 		bcn = wma->interfaces[resp_event->vdev_id].beacon;
 		if (!bcn) {
@@ -800,13 +800,13 @@
 			add_bss->status = QDF_STATUS_E_NOMEM;
 			goto send_fail_resp;
 		}
-		cdf_mem_zero(bcn, sizeof(*bcn));
+		qdf_mem_zero(bcn, sizeof(*bcn));
 		bcn->buf = cdf_nbuf_alloc(NULL, WMA_BCN_BUF_MAX_SIZE, 0,
 					  sizeof(uint32_t), 0);
 		if (!bcn->buf) {
 			WMA_LOGE("%s: No memory allocated for beacon buffer",
 				 __func__);
-			cdf_mem_free(bcn);
+			qdf_mem_free(bcn);
 			add_bss->status = QDF_STATUS_E_FAILURE;
 			goto send_fail_resp;
 		}
@@ -858,7 +858,7 @@
 	uint8_t *ap_vdev_ids = NULL;
 	uint8_t num_ch = 0;
 
-	ap_vdev_ids = cdf_mem_malloc(wma->max_bssid);
+	ap_vdev_ids = qdf_mem_malloc(wma->max_bssid);
 	if (!ap_vdev_ids)
 		return;
 
@@ -1024,7 +1024,7 @@
 		wma_send_msg(wma, WMA_SWITCH_CHANNEL_RSP, (void *)params, 0);
 	} else if (req_msg->msg_type == WMA_ADD_BSS_REQ) {
 		tpAddBssParams bssParams = (tpAddBssParams) req_msg->user_data;
-		cdf_mem_copy(iface->bssid, bssParams->bssId,
+		qdf_mem_copy(iface->bssid, bssParams->bssId,
 				IEEE80211_ADDR_LEN);
 		wma_vdev_start_rsp(wma, bssParams, resp_event);
 	} else if (req_msg->msg_type == WMA_OCB_SET_CONFIG_CMD) {
@@ -1044,7 +1044,7 @@
 		wma_set_sap_keepalive(wma, resp_event->vdev_id);
 
 	qdf_mc_timer_destroy(&req_msg->event_timeout);
-	cdf_mem_free(req_msg);
+	qdf_mem_free(req_msg);
 
 	return 0;
 }
@@ -1182,7 +1182,7 @@
 				   WMI_PEER_SET_PARAM_CMDID);
 	if (err) {
 		WMA_LOGE("Failed to send set_param cmd");
-		cdf_mem_free(buf);
+		qdf_mem_free(buf);
 		return -EIO;
 	}
 	return 0;
@@ -1323,15 +1323,15 @@
 
 	/* for each remote ibss peer, clear its keys */
 	if (wma_is_vdev_in_ibss_mode(wma, vdev_id) &&
-	    !cdf_mem_compare(peer_addr, vdev->mac_addr.raw,
+	    qdf_mem_cmp(peer_addr, vdev->mac_addr.raw,
 				IEEE80211_ADDR_LEN)) {
 
 		tSetStaKeyParams key_info;
 		WMA_LOGD("%s: remote ibss peer %pM key clearing\n", __func__,
 			 peer_addr);
-		cdf_mem_set(&key_info, sizeof(key_info), 0);
+		qdf_mem_set(&key_info, sizeof(key_info), 0);
 		key_info.smesessionId = vdev_id;
-		cdf_mem_copy(key_info.peer_macaddr.bytes, peer_addr,
+		qdf_mem_copy(key_info.peer_macaddr.bytes, peer_addr,
 				IEEE80211_ADDR_LEN);
 		key_info.sendRsp = false;
 
@@ -1535,7 +1535,7 @@
 
 	/* delete old ibss vdev */
 	del_sta_param.session_id = vdev_id;
-	cdf_mem_copy((void *)del_sta_param.self_mac_addr,
+	qdf_mem_copy((void *)del_sta_param.self_mac_addr,
 		     (void *)&(vdev->mac_addr), QDF_MAC_ADDR_SIZE);
 	wma_vdev_detach(wma, &del_sta_param, 0);
 
@@ -1617,7 +1617,7 @@
 
 	cmd->vdev_id = sessionId;
 	cmd->ssid.ssid_len = intr[sessionId].vdev_restart_params.ssid.ssid_len;
-	cdf_mem_copy(cmd->ssid.ssid,
+	qdf_mem_copy(cmd->ssid.ssid,
 		     intr[sessionId].vdev_restart_params.ssid.ssid,
 		     cmd->ssid.ssid_len);
 	cmd->flags = intr[sessionId].vdev_restart_params.flags;
@@ -1782,7 +1782,7 @@
 				cdf_nbuf_unmap_single(pdev->osdev, bcn->buf,
 						      QDF_DMA_TO_DEVICE);
 			cdf_nbuf_free(bcn->buf);
-			cdf_mem_free(bcn);
+			qdf_mem_free(bcn);
 			wma->interfaces[resp_event->vdev_id].beacon = NULL;
 		}
 
@@ -1796,7 +1796,7 @@
 		 * to send response to UMAC
 		 */
 		if (params->status == QDF_STATUS_FW_MSG_TIMEDOUT) {
-			cdf_mem_free(params);
+			qdf_mem_free(params);
 			WMA_LOGE("%s: DEL BSS from ADD BSS timeout do not send "
 				 "resp to UMAC (vdev id %x)",
 				 __func__, resp_event->vdev_id);
@@ -1814,7 +1814,7 @@
 	}
 free_req_msg:
 	qdf_mc_timer_destroy(&req_msg->event_timeout);
-	cdf_mem_free(req_msg);
+	qdf_mem_free(req_msg);
 	return status;
 }
 
@@ -1911,7 +1911,7 @@
 	else
 		wma_handle->wow.bmiss_enable = cfg_val ? true : false;
 
-	cdf_mem_copy(wma_handle->interfaces[self_sta_req->session_id].addr,
+	qdf_mem_copy(wma_handle->interfaces[self_sta_req->session_id].addr,
 		     self_sta_req->self_mac_addr,
 		     sizeof(wma_handle->interfaces[self_sta_req->session_id].
 			    addr));
@@ -2063,7 +2063,7 @@
 		status = cds_mq_post_message(QDF_MODULE_ID_SME, &sme_msg);
 		if (!QDF_IS_STATUS_SUCCESS(status)) {
 			WMA_LOGE("Failed to post eWNI_SME_ADD_STA_SELF_RSP");
-			cdf_mem_free(self_sta_req);
+			qdf_mem_free(self_sta_req);
 		}
 	}
 	return txrx_vdev_handle;
@@ -2248,7 +2248,7 @@
 				cmd->ssid.ssid_len = req->ssid.length;
 			else
 				cmd->ssid.ssid_len = sizeof(cmd->ssid.ssid);
-			cdf_mem_copy(cmd->ssid.ssid, req->ssid.ssId,
+			qdf_mem_copy(cmd->ssid.ssid, req->ssid.ssId,
 				     cmd->ssid.ssid_len);
 		}
 
@@ -2284,7 +2284,7 @@
 		intr[req->vdev_id].vdev_restart_params.vdev_id = req->vdev_id;
 		intr[req->vdev_id].vdev_restart_params.ssid.ssid_len =
 			cmd->ssid.ssid_len;
-		cdf_mem_copy(intr[req->vdev_id].vdev_restart_params.ssid.ssid,
+		qdf_mem_copy(intr[req->vdev_id].vdev_restart_params.ssid.ssid,
 			     cmd->ssid.ssid, cmd->ssid.ssid_len);
 		intr[req->vdev_id].vdev_restart_params.flags = cmd->flags;
 		intr[req->vdev_id].vdev_restart_params.requestor_id =
@@ -2418,7 +2418,7 @@
 
 free_req_msg:
 	qdf_mc_timer_destroy(&req_msg->event_timeout);
-	cdf_mem_free(req_msg);
+	qdf_mem_free(req_msg);
 
 	return status;
 }
@@ -2467,7 +2467,7 @@
 	wma_vdev_detach_callback(req_msg->user_data);
 	qdf_mc_timer_stop(&req_msg->event_timeout);
 	qdf_mc_timer_destroy(&req_msg->event_timeout);
-	cdf_mem_free(req_msg);
+	qdf_mem_free(req_msg);
 
 	return status;
 }
@@ -2533,9 +2533,9 @@
 		WMA_LOGD(FL("Calling vdev detach handler"));
 		wma_handle_vdev_detach(wma, data->self_sta_param,
 				data->generate_rsp);
-		cdf_mem_free(data);
+		qdf_mem_free(data);
 	}
-	cdf_mem_free(req_msg);
+	qdf_mem_free(req_msg);
 	return status;
 }
 
@@ -2596,7 +2596,7 @@
 	}
 free_tgt_req:
 	qdf_mc_timer_destroy(&tgt_req->event_timeout);
-	cdf_mem_free(tgt_req);
+	qdf_mem_free(tgt_req);
 }
 
 /**
@@ -2617,7 +2617,7 @@
 	struct wma_target_req *req;
 	QDF_STATUS status;
 
-	req = cdf_mem_malloc(sizeof(*req));
+	req = qdf_mem_malloc(sizeof(*req));
 	if (!req) {
 		WMA_LOGP(FL("Failed to allocate memory for msg %d vdev %d"),
 			 msg_type, vdev_id);
@@ -2638,7 +2638,7 @@
 	if (QDF_STATUS_SUCCESS != status) {
 		qdf_spin_unlock_bh(&wma->wma_hold_req_q_lock);
 		WMA_LOGE(FL("Failed add request in queue"));
-		cdf_mem_free(req);
+		qdf_mem_free(req);
 		return NULL;
 	}
 	qdf_spin_unlock_bh(&wma->wma_hold_req_q_lock);
@@ -2668,7 +2668,7 @@
 
 	qdf_mc_timer_stop(&req_msg->event_timeout);
 	qdf_mc_timer_destroy(&req_msg->event_timeout);
-	cdf_mem_free(req_msg);
+	qdf_mem_free(req_msg);
 }
 
 /**
@@ -2790,7 +2790,7 @@
 				cdf_nbuf_unmap_single(pdev->osdev, bcn->buf,
 						      QDF_DMA_TO_DEVICE);
 			cdf_nbuf_free(bcn->buf);
-			cdf_mem_free(bcn);
+			qdf_mem_free(bcn);
 			wma->interfaces[tgt_req->vdev_id].beacon = NULL;
 		}
 
@@ -2830,19 +2830,19 @@
 		status = cds_mq_post_message(QDF_MODULE_ID_SME, &sme_msg);
 		if (!QDF_IS_STATUS_SUCCESS(status)) {
 			WMA_LOGE("Failed to post eWNI_SME_ADD_STA_SELF_RSP");
-			cdf_mem_free(iface->del_staself_req);
+			qdf_mem_free(iface->del_staself_req);
 		}
 		if (iface->addBssStaContext)
-			cdf_mem_free(iface->addBssStaContext);
+			qdf_mem_free(iface->addBssStaContext);
 #if defined WLAN_FEATURE_VOWIFI_11R
 		if (iface->staKeyParams)
-			cdf_mem_free(iface->staKeyParams);
+			qdf_mem_free(iface->staKeyParams);
 #endif /* WLAN_FEATURE_VOWIFI_11R */
-		cdf_mem_zero(iface, sizeof(*iface));
+		qdf_mem_zero(iface, sizeof(*iface));
 	} else if (tgt_req->msg_type == WMA_ADD_BSS_REQ) {
 		tpAddBssParams params = (tpAddBssParams) tgt_req->user_data;
 		tDeleteBssParams *del_bss_params =
-			cdf_mem_malloc(sizeof(tDeleteBssParams));
+			qdf_mem_malloc(sizeof(tDeleteBssParams));
 		if (NULL == del_bss_params) {
 			WMA_LOGE("Failed to allocate memory for del_bss_params");
 			peer = ol_txrx_find_peer_by_addr(pdev, params->bssId,
@@ -2854,7 +2854,7 @@
 						 QDF_STATUS_FW_MSG_TIMEDOUT;
 		del_bss_params->sessionId = params->sessionId;
 		del_bss_params->bssIdx = params->bssIdx;
-		cdf_mem_copy(del_bss_params->bssid, params->bssId,
+		qdf_mem_copy(del_bss_params->bssid, params->bssId,
 			     sizeof(tSirMacAddr));
 
 		WMA_LOGA("%s: WMA_ADD_BSS_REQ timedout", __func__);
@@ -2905,7 +2905,7 @@
 	}
 free_tgt_req:
 	qdf_mc_timer_destroy(&tgt_req->event_timeout);
-	cdf_mem_free(tgt_req);
+	qdf_mem_free(tgt_req);
 }
 
 /**
@@ -2926,7 +2926,7 @@
 	struct wma_target_req *req;
 	QDF_STATUS status;
 
-	req = cdf_mem_malloc(sizeof(*req));
+	req = qdf_mem_malloc(sizeof(*req));
 	if (!req) {
 		WMA_LOGP("%s: Failed to allocate memory for msg %d vdev %d",
 			 __func__, msg_type, vdev_id);
@@ -2947,7 +2947,7 @@
 		qdf_spin_unlock_bh(&wma->vdev_respq_lock);
 		WMA_LOGE(FL("Failed add request in queue for vdev_id %d type %d"),
 			 vdev_id, type);
-		cdf_mem_free(req);
+		qdf_mem_free(req);
 		return NULL;
 	}
 
@@ -2974,7 +2974,7 @@
 
 	qdf_mc_timer_stop(&req_msg->event_timeout);
 	qdf_mc_timer_destroy(&req_msg->event_timeout);
-	cdf_mem_free(req_msg);
+	qdf_mem_free(req_msg);
 }
 
 /**
@@ -3108,7 +3108,7 @@
 
 	add_bss->staContext.staIdx = ol_txrx_local_peer_id(peer);
 
-	cdf_mem_zero(&req, sizeof(req));
+	qdf_mem_zero(&req, sizeof(req));
 	req.vdev_id = vdev_id;
 	req.chan = add_bss->currentOperChannel;
 	req.chan_width = add_bss->ch_width;
@@ -3146,7 +3146,7 @@
 	req.oper_mode = BSS_OPERATIONAL_MODE_AP;
 	req.ssid.length = add_bss->ssId.length;
 	if (req.ssid.length > 0)
-		cdf_mem_copy(req.ssid.ssId, add_bss->ssId.ssId,
+		qdf_mem_copy(req.ssid.ssId, add_bss->ssId.ssId,
 			     add_bss->ssId.length);
 	status = wma_get_current_hw_mode(&hw_mode);
 	if (!QDF_IS_STATUS_SUCCESS(status))
@@ -3284,10 +3284,10 @@
 	/* clear leftover ibss keys on bss peer */
 
 	WMA_LOGD("%s: ibss bss key clearing", __func__);
-	cdf_mem_set(&key_info, sizeof(key_info), 0);
+	qdf_mem_set(&key_info, sizeof(key_info), 0);
 	key_info.smesessionId = vdev_id;
 	key_info.numKeys = SIR_MAC_MAX_NUM_OF_DEFAULT_KEYS;
-	cdf_mem_copy(&wma->ibsskey_info, &key_info, sizeof(tSetBssKeyParams));
+	qdf_mem_copy(&wma->ibsskey_info, &key_info, sizeof(tSetBssKeyParams));
 
 	/* start ibss vdev */
 
@@ -3319,7 +3319,7 @@
 		}
 	}
 
-	cdf_mem_zero(&req, sizeof(req));
+	qdf_mem_zero(&req, sizeof(req));
 	req.vdev_id = vdev_id;
 	req.chan = add_bss->currentOperChannel;
 	req.chan_width = add_bss->ch_width;
@@ -3338,7 +3338,7 @@
 	req.oper_mode = BSS_OPERATIONAL_MODE_IBSS;
 	req.ssid.length = add_bss->ssId.length;
 	if (req.ssid.length > 0)
-		cdf_mem_copy(req.ssid.ssId, add_bss->ssId.ssId,
+		qdf_mem_copy(req.ssid.ssId, add_bss->ssId.ssId,
 			     add_bss->ssId.length);
 	status = wma_get_current_hw_mode(&hw_mode);
 	if (!QDF_IS_STATUS_SUCCESS(status))
@@ -3425,30 +3425,30 @@
 	if (add_bss->operMode) {
 		/* Save parameters later needed by WMA_ADD_STA_REQ */
 		if (iface->addBssStaContext) {
-			cdf_mem_free(iface->addBssStaContext);
+			qdf_mem_free(iface->addBssStaContext);
 		}
-		iface->addBssStaContext = cdf_mem_malloc(sizeof(tAddStaParams));
+		iface->addBssStaContext = qdf_mem_malloc(sizeof(tAddStaParams));
 		if (!iface->addBssStaContext) {
 			WMA_LOGE("%s Failed to allocat memory", __func__);
 			goto send_fail_resp;
 		}
-		cdf_mem_copy(iface->addBssStaContext, &add_bss->staContext,
+		qdf_mem_copy(iface->addBssStaContext, &add_bss->staContext,
 			     sizeof(tAddStaParams));
 
 #if defined WLAN_FEATURE_VOWIFI_11R
 		if (iface->staKeyParams) {
-			cdf_mem_free(iface->staKeyParams);
+			qdf_mem_free(iface->staKeyParams);
 			iface->staKeyParams = NULL;
 		}
 		if (add_bss->extSetStaKeyParamValid) {
 			iface->staKeyParams =
-				cdf_mem_malloc(sizeof(tSetStaKeyParams));
+				qdf_mem_malloc(sizeof(tSetStaKeyParams));
 			if (!iface->staKeyParams) {
 				WMA_LOGE("%s Failed to allocat memory",
 					 __func__);
 				goto send_fail_resp;
 			}
-			cdf_mem_copy(iface->staKeyParams,
+			qdf_mem_copy(iface->staKeyParams,
 				     &add_bss->extSetStaKeyParam,
 				     sizeof(tSetStaKeyParams));
 		}
@@ -3502,7 +3502,7 @@
 			add_bss->staContext.staIdx =
 				ol_txrx_local_peer_id(peer);
 
-			cdf_mem_zero(&req, sizeof(req));
+			qdf_mem_zero(&req, sizeof(req));
 			req.vdev_id = vdev_id;
 			req.chan = add_bss->currentOperChannel;
 			req.chan_width = add_bss->ch_width;
@@ -3520,7 +3520,7 @@
 			req.ssid.length = add_bss->ssId.length;
 			req.oper_mode = BSS_OPERATIONAL_MODE_STA;
 			if (req.ssid.length > 0)
-				cdf_mem_copy(req.ssid.ssId, add_bss->ssId.ssId,
+				qdf_mem_copy(req.ssid.ssId, add_bss->ssId.ssId,
 					     add_bss->ssId.length);
 			status = wma_get_current_hw_mode(&hw_mode);
 			if (!QDF_IS_STATUS_SUCCESS(status))
@@ -3636,7 +3636,7 @@
 		 * Store the bssid in interface table, bssid will
 		 * be used during group key setting sta mode.
 		 */
-		cdf_mem_copy(iface->bssid, add_bss->bssId, IEEE80211_ADDR_LEN);
+		qdf_mem_copy(iface->bssid, add_bss->bssId, IEEE80211_ADDR_LEN);
 
 	}
 send_bss_resp:
@@ -3645,7 +3645,7 @@
 	add_bss->status = (add_bss->staContext.staIdx < 0) ?
 			  QDF_STATUS_E_FAILURE : QDF_STATUS_SUCCESS;
 	add_bss->bssIdx = add_bss->staContext.smesessionId;
-	cdf_mem_copy(add_bss->staContext.staMac, add_bss->bssId,
+	qdf_mem_copy(add_bss->staContext.staMac, add_bss->bssId,
 		     sizeof(add_bss->staContext.staMac));
 
 	if (!WMI_SERVICE_IS_ENABLED(wma->wmi_service_bitmap,
@@ -4031,7 +4031,7 @@
 			 "staIdx: %d, staMac: %pM",
 			 __func__, add_sta->staIdx, add_sta->staMac);
 
-		peerStateParams = cdf_mem_malloc(sizeof(tTdlsPeerStateParams));
+		peerStateParams = qdf_mem_malloc(sizeof(tTdlsPeerStateParams));
 		if (!peerStateParams) {
 			WMA_LOGE
 				("%s: Failed to allocate memory for peerStateParams for %pM",
@@ -4040,10 +4040,10 @@
 			goto send_rsp;
 		}
 
-		cdf_mem_zero(peerStateParams, sizeof(*peerStateParams));
+		qdf_mem_zero(peerStateParams, sizeof(*peerStateParams));
 		peerStateParams->peerState = WMI_TDLS_PEER_STATE_PEERING;
 		peerStateParams->vdevId = vdev->vdev_id;
-		cdf_mem_copy(&peerStateParams->peerMacAddr,
+		qdf_mem_copy(&peerStateParams->peerMacAddr,
 			     &add_sta->staMac, sizeof(tSirMacAddr));
 		wma_update_tdls_peer_state(wma, peerStateParams);
 	} else {
@@ -4438,7 +4438,7 @@
 		goto send_del_rsp;
 	}
 
-	peerStateParams = cdf_mem_malloc(sizeof(tTdlsPeerStateParams));
+	peerStateParams = qdf_mem_malloc(sizeof(tTdlsPeerStateParams));
 	if (!peerStateParams) {
 		WMA_LOGE("%s: Failed to allocate memory for peerStateParams for: %pM",
 			__func__, del_sta->staMac);
@@ -4446,10 +4446,10 @@
 		goto send_del_rsp;
 	}
 
-	cdf_mem_zero(peerStateParams, sizeof(*peerStateParams));
+	qdf_mem_zero(peerStateParams, sizeof(*peerStateParams));
 	peerStateParams->peerState = WMA_TDLS_PEER_STATE_TEARDOWN;
 	peerStateParams->vdevId = vdev->vdev_id;
-	cdf_mem_copy(&peerStateParams->peerMacAddr,
+	qdf_mem_copy(&peerStateParams->peerMacAddr,
 		     &del_sta->staMac, sizeof(tSirMacAddr));
 
 	WMA_LOGD("%s: sending tdls_peer_state for peer mac: %pM, "
@@ -4588,7 +4588,7 @@
 	if (!rsp_requested) {
 		WMA_LOGD("%s: vdev_id %d status %d", __func__,
 			 del_sta->smesessionId, del_sta->status);
-		cdf_mem_free(del_sta);
+		qdf_mem_free(del_sta);
 	}
 }
 
@@ -4662,7 +4662,7 @@
 		goto out;
 	}
 
-	cdf_mem_zero(wma->interfaces[params->smesessionId].bssid,
+	qdf_mem_zero(wma->interfaces[params->smesessionId].bssid,
 			IEEE80211_ADDR_LEN);
 
 	txrx_vdev = wma_find_vdev_by_id(wma, params->smesessionId);
@@ -4674,12 +4674,12 @@
 
 	/*Free the allocated stats response buffer for the the session */
 	if (wma->interfaces[params->smesessionId].stats_rsp) {
-		cdf_mem_free(wma->interfaces[params->smesessionId].stats_rsp);
+		qdf_mem_free(wma->interfaces[params->smesessionId].stats_rsp);
 		wma->interfaces[params->smesessionId].stats_rsp = NULL;
 	}
 
 	if (wma->interfaces[params->smesessionId].psnr_req) {
-		cdf_mem_free(wma->interfaces[params->smesessionId].psnr_req);
+		qdf_mem_free(wma->interfaces[params->smesessionId].psnr_req);
 		wma->interfaces[params->smesessionId].psnr_req = NULL;
 	}
 
diff --git a/core/wma/src/wma_features.c b/core/wma/src/wma_features.c
index c3ae957..ea82fa9 100644
--- a/core/wma/src/wma_features.c
+++ b/core/wma/src/wma_features.c
@@ -49,7 +49,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"
 
@@ -116,7 +116,7 @@
 	cds_msg_t sme_msg = { 0 };
 
 	auto_sh_evt = (tSirAutoShutdownEvtParams *)
-		      cdf_mem_malloc(sizeof(tSirAutoShutdownEvtParams));
+		      qdf_mem_malloc(sizeof(tSirAutoShutdownEvtParams));
 	if (!auto_sh_evt) {
 		WMA_LOGE(FL("No Mem"));
 		return -ENOMEM;
@@ -131,7 +131,7 @@
 	qdf_status = cds_mq_post_message(QDF_MODULE_ID_SME, &sme_msg);
 	if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
 		WMA_LOGE("Fail to post eWNI_SME_AUTO_SHUTDOWN_IND msg to SME");
-		cdf_mem_free(auto_sh_evt);
+		qdf_mem_free(auto_sh_evt);
 		return -EINVAL;
 	}
 
@@ -161,13 +161,13 @@
 	 * after wmi event
 	 */
 	if (pGetRssiReq) {
-		pRssiBkUp = cdf_mem_malloc(sizeof(tAniGetRssiReq));
+		pRssiBkUp = qdf_mem_malloc(sizeof(tAniGetRssiReq));
 		if (!pRssiBkUp) {
 			WMA_LOGE("Failed to allocate memory for tAniGetRssiReq");
 			wma_handle->pGetRssiReq = NULL;
 			return QDF_STATUS_E_NOMEM;
 		}
-		cdf_mem_set(pRssiBkUp, sizeof(tAniGetRssiReq), 0);
+		qdf_mem_set(pRssiBkUp, sizeof(tAniGetRssiReq), 0);
 		pRssiBkUp->sessionId =
 			((tAniGetRssiReq *) pGetRssiReq)->sessionId;
 		pRssiBkUp->rssiCallback =
@@ -180,7 +180,7 @@
 	buf = wmi_buf_alloc(wma_handle->wmi_handle, len);
 	if (!buf) {
 		WMA_LOGE("%s: wmi_buf_alloc failed", __func__);
-		cdf_mem_free(pRssiBkUp);
+		qdf_mem_free(pRssiBkUp);
 		wma_handle->pGetRssiReq = NULL;
 		return QDF_STATUS_E_FAILURE;
 	}
@@ -195,7 +195,7 @@
 		    (wma_handle->wmi_handle, buf, len, WMI_REQUEST_STATS_CMDID)) {
 		WMA_LOGE("Failed to send host stats request to fw");
 		wmi_buf_free(buf);
-		cdf_mem_free(pRssiBkUp);
+		qdf_mem_free(pRssiBkUp);
 		wma_handle->pGetRssiReq = NULL;
 		return QDF_STATUS_E_FAILURE;
 	}
@@ -231,20 +231,20 @@
 		return QDF_STATUS_SUCCESS;
 	}
 
-	psnr_req_bkp = cdf_mem_malloc(sizeof(tAniGetSnrReq));
+	psnr_req_bkp = qdf_mem_malloc(sizeof(tAniGetSnrReq));
 	if (!psnr_req_bkp) {
 		WMA_LOGE("Failed to allocate memory for tAniGetSnrReq");
 		return QDF_STATUS_E_NOMEM;
 	}
 
-	cdf_mem_set(psnr_req_bkp, sizeof(tAniGetSnrReq), 0);
+	qdf_mem_set(psnr_req_bkp, sizeof(tAniGetSnrReq), 0);
 	psnr_req_bkp->staId = psnr_req->staId;
 	psnr_req_bkp->pDevContext = psnr_req->pDevContext;
 	psnr_req_bkp->snrCallback = psnr_req->snrCallback;
 	buf = wmi_buf_alloc(wma_handle->wmi_handle, len);
 	if (!buf) {
 		WMA_LOGE("%s: wmi_buf_alloc failed", __func__);
-		cdf_mem_free(psnr_req_bkp);
+		qdf_mem_free(psnr_req_bkp);
 		return QDF_STATUS_E_FAILURE;
 	}
 
@@ -261,7 +261,7 @@
 				 WMI_REQUEST_STATS_CMDID)) {
 		WMA_LOGE("Failed to send host stats request to fw");
 		wmi_buf_free(buf);
-		cdf_mem_free(psnr_req_bkp);
+		qdf_mem_free(psnr_req_bkp);
 		intr->psnr_req = NULL;
 		return QDF_STATUS_E_FAILURE;
 	}
@@ -288,7 +288,7 @@
 	if (iface->plink_status_req) {
 		WMA_LOGE("%s:previous link status request is pending,deleting the new request",
 			__func__);
-		cdf_mem_free(pGetLinkStatus);
+		qdf_mem_free(pGetLinkStatus);
 		return;
 	}
 
@@ -402,7 +402,7 @@
 			WMA_LOGI("%s: cached LPHB status in WMA context for item %d",
 				__func__, i);
 		} else {
-			cdf_mem_zero((void *)&wma_handle->wow.lphb_cache,
+			qdf_mem_zero((void *)&wma_handle->wow.lphb_cache,
 				     sizeof(wma_handle->wow.lphb_cache));
 			WMA_LOGI("%s: cleared all cached LPHB status in WMA context",
 				__func__);
@@ -748,7 +748,7 @@
 		break;
 	}
 
-	cdf_mem_free(lphb_conf_req);
+	qdf_mem_free(lphb_conf_req);
 	return qdf_status;
 }
 #endif /* FEATURE_WLAN_LPHB */
@@ -1293,7 +1293,7 @@
 	WMA_LOGD("lphb indication received with vdev_id=%d, session=%d, reason=%d",
 		hb_fp->vdev_id, hb_fp->session, hb_fp->reason);
 
-	slphb_indication = (tSirLPHBInd *) cdf_mem_malloc(sizeof(tSirLPHBInd));
+	slphb_indication = (tSirLPHBInd *) qdf_mem_malloc(sizeof(tSirLPHBInd));
 
 	if (!slphb_indication) {
 		WMA_LOGE("Invalid LPHB indication buffer");
@@ -1311,7 +1311,7 @@
 	qdf_status = cds_mq_post_message(QDF_MODULE_ID_SME, &sme_msg);
 	if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
 		WMA_LOGE("Fail to post eWNI_SME_LPHB_IND msg to SME");
-		cdf_mem_free(slphb_indication);
+		qdf_mem_free(slphb_indication);
 		return -EINVAL;
 	}
 
@@ -1527,14 +1527,14 @@
 	buf_ptr = (uint8_t *) nan_rsp_event_hdr;
 	alloc_len = sizeof(tSirNanEvent);
 	alloc_len += nan_rsp_event_hdr->data_len;
-	nan_rsp_event = (tSirNanEvent *) cdf_mem_malloc(alloc_len);
+	nan_rsp_event = (tSirNanEvent *) qdf_mem_malloc(alloc_len);
 	if (NULL == nan_rsp_event) {
 		WMA_LOGE("%s: Memory allocation failure", __func__);
 		return -ENOMEM;
 	}
 
 	nan_rsp_event->event_data_len = nan_rsp_event_hdr->data_len;
-	cdf_mem_copy(nan_rsp_event->event_data, buf_ptr +
+	qdf_mem_copy(nan_rsp_event->event_data, buf_ptr +
 		     sizeof(wmi_nan_event_hdr) + WMI_TLV_HDR_SIZE,
 		     nan_rsp_event->event_data_len);
 	cds_msg.type = eWNI_SME_NAN_EVENT;
@@ -1545,7 +1545,7 @@
 	if (status != QDF_STATUS_SUCCESS) {
 		WMA_LOGE("%s: Failed to post NaN response event to SME",
 			 __func__);
-		cdf_mem_free(nan_rsp_event);
+		qdf_mem_free(nan_rsp_event);
 		return -EFAULT;
 	}
 	WMA_LOGD("%s: NaN response event Posted to SME", __func__);
@@ -1592,14 +1592,14 @@
 		return -EINVAL;
 	}
 
-	csa_offload_event = cdf_mem_malloc(sizeof(*csa_offload_event));
+	csa_offload_event = qdf_mem_malloc(sizeof(*csa_offload_event));
 	if (!csa_offload_event) {
 		WMA_LOGE("CDF MEM Alloc Failed for csa_offload_event");
 		return -EINVAL;
 	}
 
-	cdf_mem_zero(csa_offload_event, sizeof(*csa_offload_event));
-	cdf_mem_copy(csa_offload_event->bssId, &bssid, IEEE80211_ADDR_LEN);
+	qdf_mem_zero(csa_offload_event, sizeof(*csa_offload_event));
+	qdf_mem_copy(csa_offload_event->bssId, &bssid, IEEE80211_ADDR_LEN);
 
 	if (csa_event->ies_present_flag & WMI_CSA_IE_PRESENT) {
 		csa_ie = (struct ieee80211_channelswitch_ie *)
@@ -1614,7 +1614,7 @@
 		csa_offload_event->new_op_class = xcsa_ie->newClass;
 	} else {
 		WMA_LOGE("CSA Event error: No CSA IE present");
-		cdf_mem_free(csa_offload_event);
+		qdf_mem_free(csa_offload_event);
 		return -EINVAL;
 	}
 
@@ -1640,7 +1640,7 @@
 	    (cur_chan == csa_offload_event->channel)) {
 		WMA_LOGE("CSA Event with channel %d. Ignore !!",
 			 csa_offload_event->channel);
-		cdf_mem_free(csa_offload_event);
+		qdf_mem_free(csa_offload_event);
 		return -EINVAL;
 	}
 	wma->interfaces[vdev_id].is_channel_switch = true;
@@ -1692,17 +1692,17 @@
 		return -EINVAL;
 	}
 
-	pStartOemDataRsp = cdf_mem_malloc(sizeof(*pStartOemDataRsp));
+	pStartOemDataRsp = qdf_mem_malloc(sizeof(*pStartOemDataRsp));
 	if (!pStartOemDataRsp) {
 		WMA_LOGE("%s: Failed to alloc pStartOemDataRsp", __func__);
 		return -ENOMEM;
 	}
 
-	cdf_mem_zero(pStartOemDataRsp, sizeof(tStartOemDataRsp));
+	qdf_mem_zero(pStartOemDataRsp, sizeof(tStartOemDataRsp));
 	pStartOemDataRsp->target_rsp = true;
 	msg_subtype = (uint32_t *) (&pStartOemDataRsp->oemDataRsp[0]);
 	*msg_subtype = WMI_OEM_CAPABILITY_RSP;
-	cdf_mem_copy(&pStartOemDataRsp->oemDataRsp[4], data, datalen);
+	qdf_mem_copy(&pStartOemDataRsp->oemDataRsp[4], data, datalen);
 
 	WMA_LOGI("%s: Sending WMA_START_OEM_DATA_RSP, data len (%d)",
 		 __func__, datalen);
@@ -1754,17 +1754,17 @@
 		return -EINVAL;
 	}
 
-	pStartOemDataRsp = cdf_mem_malloc(sizeof(*pStartOemDataRsp));
+	pStartOemDataRsp = qdf_mem_malloc(sizeof(*pStartOemDataRsp));
 	if (!pStartOemDataRsp) {
 		WMA_LOGE("%s: Failed to alloc pStartOemDataRsp", __func__);
 		return -ENOMEM;
 	}
 
-	cdf_mem_zero(pStartOemDataRsp, sizeof(tStartOemDataRsp));
+	qdf_mem_zero(pStartOemDataRsp, sizeof(tStartOemDataRsp));
 	pStartOemDataRsp->target_rsp = true;
 	msg_subtype = (uint32_t *) (&pStartOemDataRsp->oemDataRsp[0]);
 	*msg_subtype = WMI_OEM_MEASUREMENT_RSP;
-	cdf_mem_copy(&pStartOemDataRsp->oemDataRsp[4], data, datalen);
+	qdf_mem_copy(&pStartOemDataRsp->oemDataRsp[4], data, datalen);
 
 	WMA_LOGI("%s: Sending WMA_START_OEM_DATA_RSP, data len (%d)",
 		 __func__, datalen);
@@ -1815,17 +1815,17 @@
 		return -EINVAL;
 	}
 
-	pStartOemDataRsp = cdf_mem_malloc(sizeof(*pStartOemDataRsp));
+	pStartOemDataRsp = qdf_mem_malloc(sizeof(*pStartOemDataRsp));
 	if (!pStartOemDataRsp) {
 		WMA_LOGE("%s: Failed to alloc pStartOemDataRsp", __func__);
 		return -ENOMEM;
 	}
 
-	cdf_mem_zero(pStartOemDataRsp, sizeof(tStartOemDataRsp));
+	qdf_mem_zero(pStartOemDataRsp, sizeof(tStartOemDataRsp));
 	pStartOemDataRsp->target_rsp = true;
 	msg_subtype = (uint32_t *) (&pStartOemDataRsp->oemDataRsp[0]);
 	*msg_subtype = WMI_OEM_ERROR_REPORT_RSP;
-	cdf_mem_copy(&pStartOemDataRsp->oemDataRsp[4], data, datalen);
+	qdf_mem_copy(&pStartOemDataRsp->oemDataRsp[4], data, datalen);
 
 	WMA_LOGI("%s: Sending WMA_START_OEM_DATA_RSP, data len (%d)",
 		 __func__, datalen);
@@ -1871,15 +1871,15 @@
 		return -EINVAL;
 	}
 
-	oem_data_rsp = cdf_mem_malloc(sizeof(*oem_data_rsp));
+	oem_data_rsp = qdf_mem_malloc(sizeof(*oem_data_rsp));
 	if (!oem_data_rsp) {
 		WMA_LOGE(FL("Failed to alloc oem_data_rsp"));
 		return -ENOMEM;
 	}
 
-	cdf_mem_zero(oem_data_rsp, sizeof(tStartOemDataRsp));
+	qdf_mem_zero(oem_data_rsp, sizeof(tStartOemDataRsp));
 	oem_data_rsp->target_rsp = true;
-	cdf_mem_copy(&oem_data_rsp->oemDataRsp[0], data, datalen);
+	qdf_mem_copy(&oem_data_rsp->oemDataRsp[0], data, datalen);
 
 	WMA_LOGI(FL("Sending WMA_START_OEM_DATA_RSP, data len %d"), datalen);
 
@@ -1925,7 +1925,7 @@
 
 	WMITLV_SET_HDR(cmd, WMITLV_TAG_ARRAY_BYTE, startOemDataReq->data_len);
 	cmd += WMI_TLV_HDR_SIZE;
-	cdf_mem_copy(cmd, startOemDataReq->data,
+	qdf_mem_copy(cmd, startOemDataReq->data,
 		     startOemDataReq->data_len);
 
 	WMA_LOGI(FL("Sending OEM Data Request to target, data len %d"),
@@ -1944,8 +1944,8 @@
 	/* free oem data req buffer received from UMAC */
 	if (startOemDataReq) {
 		if (startOemDataReq->data)
-			cdf_mem_free(startOemDataReq->data);
-		cdf_mem_free(startOemDataReq);
+			qdf_mem_free(startOemDataReq->data);
+		qdf_mem_free(startOemDataReq);
 	}
 
 	/* Now send data resp back to PE/SME with message sub-type of
@@ -1954,13 +1954,13 @@
 	 * comes as wmi event from target then those shall be passed
 	 * to oem application
 	 */
-	pStartOemDataRsp = cdf_mem_malloc(sizeof(*pStartOemDataRsp));
+	pStartOemDataRsp = qdf_mem_malloc(sizeof(*pStartOemDataRsp));
 	if (!pStartOemDataRsp) {
 		WMA_LOGE("%s:failed to allocate memory for OEM Data Resp to PE",
 			 __func__);
 		return;
 	}
-	cdf_mem_zero(pStartOemDataRsp, sizeof(tStartOemDataRsp));
+	qdf_mem_zero(pStartOemDataRsp, sizeof(tStartOemDataRsp));
 	pStartOemDataRsp->target_rsp = false;
 
 	WMA_LOGI("%s: Sending WMA_START_OEM_DATA_RSP to clear up PE/SME pending cmd",
@@ -2584,7 +2584,7 @@
 	WMA_LOGD("Posting ready to suspend indication to umac");
 
 	len = sizeof(tSirReadyToSuspendInd);
-	ready_to_suspend = (tSirReadyToSuspendInd *) cdf_mem_malloc(len);
+	ready_to_suspend = (tSirReadyToSuspendInd *) qdf_mem_malloc(len);
 
 	if (NULL == ready_to_suspend) {
 		WMA_LOGE("%s: Memory allocation failure", __func__);
@@ -2602,7 +2602,7 @@
 	status = cds_mq_post_message(CDS_MQ_ID_SME, &cds_msg);
 	if (status != QDF_STATUS_SUCCESS) {
 		WMA_LOGE("Failed to post ready to suspend");
-		cdf_mem_free(ready_to_suspend);
+		qdf_mem_free(ready_to_suspend);
 	}
 }
 
@@ -2940,7 +2940,7 @@
 		WMA_LOGD("Wake up for Rx packet, dump starting from ethernet hdr");
 		if (param_buf->wow_packet_buffer) {
 			/* First 4-bytes of wow_packet_buffer is the length */
-			cdf_mem_copy((uint8_t *) &wow_buf_pkt_len,
+			qdf_mem_copy((uint8_t *) &wow_buf_pkt_len,
 				     param_buf->wow_packet_buffer, 4);
 			wma_wow_wake_up_stats(wma,
 				param_buf->wow_packet_buffer + 4,
@@ -2967,7 +2967,7 @@
 		if (param_buf->wow_packet_buffer) {
 			/* Roam event is embedded in wow_packet_buffer */
 			WMA_LOGD("Host woken up because of roam event");
-			cdf_mem_copy((uint8_t *) &wow_buf_pkt_len,
+			qdf_mem_copy((uint8_t *) &wow_buf_pkt_len,
 				     param_buf->wow_packet_buffer, 4);
 			WMA_LOGD("wow_packet_buffer dump");
 			qdf_trace_hex_dump(QDF_MODULE_ID_WMA,
@@ -3000,7 +3000,7 @@
 		if (param_buf->wow_packet_buffer) {
 		    /* station kickout event embedded in wow_packet_buffer */
 		    WMA_LOGD("Host woken up because of sta_kickout event");
-		    cdf_mem_copy((u_int8_t *) &wow_buf_pkt_len,
+		    qdf_mem_copy((u_int8_t *) &wow_buf_pkt_len,
 				param_buf->wow_packet_buffer, 4);
 		    WMA_LOGD("wow_packet_buffer dump");
 				qdf_trace_hex_dump(QDF_MODULE_ID_WMA,
@@ -3043,7 +3043,7 @@
 			WMA_LOGD("Host woken up because of rssi breach reason");
 			/* rssi breach event is embedded in wow_packet_buffer */
 			if (param_buf->wow_packet_buffer) {
-				cdf_mem_copy((u_int8_t *) &wow_buf_pkt_len,
+				qdf_mem_copy((u_int8_t *) &wow_buf_pkt_len,
 					param_buf->wow_packet_buffer, 4);
 				if (wow_buf_pkt_len >= sizeof(param)) {
 					param.fixed_param =
@@ -3232,8 +3232,8 @@
 		       WMITLV_TAG_STRUC_WOW_BITMAP_PATTERN_T,
 		       WMITLV_GET_STRUCT_TLVLEN(WOW_BITMAP_PATTERN_T));
 
-	cdf_mem_copy(&bitmap_pattern->patternbuf[0], ptrn, ptrn_len);
-	cdf_mem_copy(&bitmap_pattern->bitmaskbuf[0], mask, mask_len);
+	qdf_mem_copy(&bitmap_pattern->patternbuf[0], ptrn, ptrn_len);
+	qdf_mem_copy(&bitmap_pattern->bitmaskbuf[0], mask, mask_len);
 
 	bitmap_pattern->pattern_offset = ptrn_offset;
 	bitmap_pattern->pattern_len = ptrn_len;
@@ -3314,7 +3314,7 @@
 	uint8_t mac_mask[IEEE80211_ADDR_LEN];
 
 	/* Setup unicast pkt pattern */
-	cdf_mem_set(&mac_mask, IEEE80211_ADDR_LEN, 0xFF);
+	qdf_mem_set(&mac_mask, IEEE80211_ADDR_LEN, 0xFF);
 	ret = wma_send_wow_patterns_to_fw(wma, vdev_id, 0,
 				wma->interfaces[vdev_id].addr,
 				IEEE80211_ADDR_LEN, 0, mac_mask,
@@ -3355,7 +3355,7 @@
 	QDF_STATUS ret = QDF_STATUS_SUCCESS;
 
 	/* Setup unicast pkt pattern */
-	cdf_mem_set(&mac_mask, IEEE80211_ADDR_LEN, 0xFF);
+	qdf_mem_set(&mac_mask, IEEE80211_ADDR_LEN, 0xFF);
 	ret = wma_send_wow_patterns_to_fw(wma, vdev_id, 0,
 				wma->interfaces[vdev_id].addr,
 				IEEE80211_ADDR_LEN, 0, mac_mask,
@@ -3809,7 +3809,7 @@
 	 *      Mask value    : FF:00:FF:00:0:00:00:FF
 	 *      Pattern value : 12:00:13:00:00:00:00:44
 	 */
-	cdf_mem_zero(new_mask, sizeof(new_mask));
+	qdf_mem_zero(new_mask, sizeof(new_mask));
 	for (pos = 0; pos < ptrn->pattern_size; pos++) {
 		bit_to_check = (WMA_NUM_BITS_IN_BYTE - 1) -
 			       (pos % WMA_NUM_BITS_IN_BYTE);
@@ -3890,7 +3890,7 @@
 
 	if (info->sessionId > wma->max_bssid) {
 		WMA_LOGE("Invalid vdev id (%d)", info->sessionId);
-		cdf_mem_free(info);
+		qdf_mem_free(info);
 		return QDF_STATUS_E_INVAL;
 	}
 
@@ -3902,7 +3902,7 @@
 	wma->wow.disassoc_enable = info->ucWowDeauthRcv ? true : false;
 	wma->wow.bmiss_enable = info->ucWowMaxMissedBeacons ? true : false;
 
-	cdf_mem_free(info);
+	qdf_mem_free(info);
 
 	return QDF_STATUS_SUCCESS;
 }
@@ -3922,14 +3922,14 @@
 
 	if (info->sessionId > wma->max_bssid) {
 		WMA_LOGE("Invalid vdev id (%d)", info->sessionId);
-		cdf_mem_free(info);
+		qdf_mem_free(info);
 		return QDF_STATUS_E_INVAL;
 	}
 
 	iface = &wma->interfaces[info->sessionId];
 	iface->ptrn_match_enable = false;
 	wma->wow.magic_ptrn_enable = false;
-	cdf_mem_free(info);
+	qdf_mem_free(info);
 
 	return QDF_STATUS_SUCCESS;
 }
@@ -4468,7 +4468,7 @@
 #endif /* WLAN_FEATURE_ROAM_OFFLOAD */
 
 err:
-	cdf_mem_free(msg);
+	qdf_mem_free(msg);
 }
 
 /**
@@ -4827,7 +4827,7 @@
 
 	if (NULL == pdev) {
 		WMA_LOGE("%s: Failed to get pdev", __func__);
-		cdf_mem_free(pTsmStatsMsg);
+		qdf_mem_free(pTsmStatsMsg);
 		return QDF_STATUS_E_INVAL;
 	}
 
@@ -4838,12 +4838,12 @@
 
 #ifdef FEATURE_WLAN_ESE_UPLOAD
 	pTsmRspParams =
-		(tpAniGetTsmStatsRsp) cdf_mem_malloc(sizeof(tAniGetTsmStatsRsp));
+		(tpAniGetTsmStatsRsp) qdf_mem_malloc(sizeof(tAniGetTsmStatsRsp));
 	if (NULL == pTsmRspParams) {
 		QDF_TRACE(QDF_MODULE_ID_WMA, QDF_TRACE_LEVEL_ERROR,
 			  "%s: CDF MEM Alloc Failure", __func__);
 		QDF_ASSERT(0);
-		cdf_mem_free(pTsmStatsMsg);
+		qdf_mem_free(pTsmStatsMsg);
 		return QDF_STATUS_E_NOMEM;
 	}
 	pTsmRspParams->staId = pStats->staId;
@@ -4899,7 +4899,7 @@
 	}
 
 	cmd = (WMI_SET_MCASTBCAST_FILTER_CMD_fixed_param *) wmi_buf_data(buf);
-	cdf_mem_zero(cmd, sizeof(*cmd));
+	qdf_mem_zero(cmd, sizeof(*cmd));
 
 	WMITLV_SET_HDR(&cmd->tlv_header,
 		       WMITLV_TAG_STRUC_WMI_SET_MCASTBCAST_FILTER_CMD_fixed_param,
@@ -4914,7 +4914,7 @@
 				   WMI_SET_MCASTBCAST_FILTER_CMDID);
 	if (err) {
 		WMA_LOGE("Failed to send set_param cmd");
-		cdf_mem_free(buf);
+		qdf_mem_free(buf);
 		return -EIO;
 	}
 	WMA_LOGD("Action:%d; vdev_id:%d; clearList:%d",
@@ -5002,12 +5002,12 @@
 		return -ENOENT;
 	}
 
-	resp = cdf_mem_malloc(sizeof(*resp));
+	resp = qdf_mem_malloc(sizeof(*resp));
 	if (!resp) {
 		WMA_LOGE("%s: Failed to alloc response", __func__);
 		return -ENOMEM;
 	}
-	cdf_mem_zero(resp, sizeof(*resp));
+	qdf_mem_zero(resp, sizeof(*resp));
 	resp->mesgType = eWNI_PMC_GTK_OFFLOAD_GETINFO_RSP;
 	resp->mesgLen = sizeof(*resp);
 	resp->ulStatus = QDF_STATUS_SUCCESS;
@@ -5015,10 +5015,10 @@
 	/* TODO: Is the total rekey count and GTK rekey count same? */
 	resp->ulGTKRekeyCount = status->refresh_cnt;
 
-	cdf_mem_copy(&resp->ullKeyReplayCounter, &status->replay_counter,
+	qdf_mem_copy(&resp->ullKeyReplayCounter, &status->replay_counter,
 		     GTK_REPLAY_COUNTER_BYTES);
 
-	cdf_mem_copy(resp->bssid.bytes, bssid, IEEE80211_ADDR_LEN);
+	qdf_mem_copy(resp->bssid.bytes, bssid, IEEE80211_ADDR_LEN);
 
 #ifdef IGTK_OFFLOAD
 	/* TODO: Is the refresh count same for GTK and IGTK? */
@@ -5032,7 +5032,7 @@
 	if (cds_mq_post_message(CDS_MQ_ID_SME, (cds_msg_t *) &cds_msg)
 	    != QDF_STATUS_SUCCESS) {
 		WMA_LOGE("Failed to post GTK response to SME");
-		cdf_mem_free(resp);
+		qdf_mem_free(resp);
 		return -EINVAL;
 	}
 
@@ -5096,9 +5096,9 @@
 		wma->wow.gtk_err_enable[vdev_id] = true;
 
 		/* Copy the keys and replay counter */
-		cdf_mem_copy(cmd->KCK, params->aKCK, GTK_OFFLOAD_KCK_BYTES);
-		cdf_mem_copy(cmd->KEK, params->aKEK, GTK_OFFLOAD_KEK_BYTES);
-		cdf_mem_copy(cmd->replay_counter, &params->ullKeyReplayCounter,
+		qdf_mem_copy(cmd->KCK, params->aKCK, GTK_OFFLOAD_KCK_BYTES);
+		qdf_mem_copy(cmd->KEK, params->aKEK, GTK_OFFLOAD_KEK_BYTES);
+		qdf_mem_copy(cmd->replay_counter, &params->ullKeyReplayCounter,
 			     GTK_REPLAY_COUNTER_BYTES);
 	} else {
 		wma->wow.gtk_err_enable[vdev_id] = false;
@@ -5165,7 +5165,7 @@
 	}
 	status = wma_send_gtk_offload_req(wma, vdev_id, params);
 out:
-	cdf_mem_free(params);
+	qdf_mem_free(params);
 	WMA_LOGD("%s Exit", __func__);
 	return status;
 }
@@ -5223,7 +5223,7 @@
 		status = QDF_STATUS_E_FAILURE;
 	}
 out:
-	cdf_mem_free(params);
+	qdf_mem_free(params);
 	WMA_LOGD("%s Exit", __func__);
 	return status;
 }
@@ -5260,13 +5260,13 @@
 					&vdev_id)) {
 		WMA_LOGE("vdev handle is invalid for %pM",
 			 pHostOffloadParams->bssid.bytes);
-		cdf_mem_free(pHostOffloadParams);
+		qdf_mem_free(pHostOffloadParams);
 		return QDF_STATUS_E_INVAL;
 	}
 
 	if (!wma->interfaces[vdev_id].vdev_up) {
 		WMA_LOGE("vdev %d is not up skipping arp/ns offload", vdev_id);
-		cdf_mem_free(pHostOffloadParams);
+		qdf_mem_free(pHostOffloadParams);
 		return QDF_STATUS_E_FAILURE;
 	}
 
@@ -5295,7 +5295,7 @@
 	buf = wmi_buf_alloc(wma->wmi_handle, len);
 	if (!buf) {
 		WMA_LOGE("%s: wmi_buf_alloc failed", __func__);
-		cdf_mem_free(pHostOffloadParams);
+		qdf_mem_free(pHostOffloadParams);
 		return QDF_STATUS_E_NOMEM;
 	}
 
@@ -5315,7 +5315,7 @@
 	/* Have copy of arp info to send along with NS, Since FW expects
 	 * both ARP and NS info in single cmd */
 	if (bArpOnly)
-		cdf_mem_copy(&wma->mArpInfo, pHostOffloadParams,
+		qdf_mem_copy(&wma->mArpInfo, pHostOffloadParams,
 			     sizeof(tSirHostOffloadReq));
 
 	buf_ptr += sizeof(WMI_SET_ARP_NS_OFFLOAD_CMD_fixed_param);
@@ -5438,11 +5438,11 @@
 	if (res) {
 		WMA_LOGE("Failed to enable ARP NDP/NSffload");
 		wmi_buf_free(buf);
-		cdf_mem_free(pHostOffloadParams);
+		qdf_mem_free(pHostOffloadParams);
 		return QDF_STATUS_E_FAILURE;
 	}
 
-	cdf_mem_free(pHostOffloadParams);
+	qdf_mem_free(pHostOffloadParams);
 	return QDF_STATUS_SUCCESS;
 }
 
@@ -5507,7 +5507,7 @@
 	buf_ptr += sizeof(WMI_ADD_PROACTIVE_ARP_RSP_PATTERN_CMD_fixed_param);
 	WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_BYTE, ptrn_len_aligned);
 	buf_ptr += WMI_TLV_HDR_SIZE;
-	cdf_mem_copy(buf_ptr, pAddPeriodicTxPtrnParams->ucPattern, ptrn_len);
+	qdf_mem_copy(buf_ptr, pAddPeriodicTxPtrnParams->ucPattern, ptrn_len);
 	for (j = 0; j < pAddPeriodicTxPtrnParams->ucPtrnSize; j++) {
 		WMA_LOGD("%s: Add Ptrn: %02x", __func__, buf_ptr[j] & 0xff);
 	}
@@ -5624,7 +5624,7 @@
 	WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_BYTE, cmd->data_len);
 
 	buf_ptr += WMI_TLV_HDR_SIZE;
-	cdf_mem_copy(buf_ptr, preq->request_data, cmd->data_len);
+	qdf_mem_copy(buf_ptr, preq->request_data, cmd->data_len);
 
 	ret = wmi_unified_cmd_send(wma->wmi_handle, buf, len,
 				   WMI_REQUEST_STATS_EXT_CMDID);
@@ -5657,7 +5657,7 @@
 	WMA_LOGD("Posting ready to suspend indication to umac");
 
 	len = sizeof(tSirReadyToExtWoWInd);
-	ready_to_extwow = (tSirReadyToExtWoWInd *) cdf_mem_malloc(len);
+	ready_to_extwow = (tSirReadyToExtWoWInd *) qdf_mem_malloc(len);
 
 	if (NULL == ready_to_extwow) {
 		WMA_LOGE("%s: Memory allocation failure", __func__);
@@ -5675,7 +5675,7 @@
 	vstatus = cds_mq_post_message(CDS_MQ_ID_SME, &cds_msg);
 	if (vstatus != QDF_STATUS_SUCCESS) {
 		WMA_LOGE("Failed to post ready to suspend");
-		cdf_mem_free(ready_to_extwow);
+		qdf_mem_free(ready_to_extwow);
 	}
 }
 
@@ -5761,9 +5761,9 @@
 	cmd->vdev_id = appType1Params->vdev_id;
 	WMI_CHAR_ARRAY_TO_MAC_ADDR(appType1Params->wakee_mac_addr.bytes,
 				   &cmd->wakee_mac);
-	cdf_mem_copy(cmd->ident, appType1Params->identification_id, 8);
+	qdf_mem_copy(cmd->ident, appType1Params->identification_id, 8);
 	cmd->ident_len = appType1Params->id_length;
-	cdf_mem_copy(cmd->passwd, appType1Params->password, 16);
+	qdf_mem_copy(cmd->passwd, appType1Params->password, 16);
 	cmd->passwd_len = appType1Params->pass_length;
 
 	WMA_LOGD("%s: vdev_id %d wakee_mac_addr %pM "
@@ -5815,7 +5815,7 @@
 
 	cmd->vdev_id = appType2Params->vdev_id;
 
-	cdf_mem_copy(cmd->rc4_key, appType2Params->rc4_key, 16);
+	qdf_mem_copy(cmd->rc4_key, appType2Params->rc4_key, 16);
 	cmd->rc4_key_len = appType2Params->rc4_key_len;
 
 	cmd->ip_id = appType2Params->ip_id;
@@ -6004,7 +6004,7 @@
 	buf_ptr += sizeof(wmi_nan_cmd_param);
 	WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_BYTE, nan_data_len_aligned);
 	buf_ptr += WMI_TLV_HDR_SIZE;
-	cdf_mem_copy(buf_ptr, nan_req->request_data, cmd->data_len);
+	qdf_mem_copy(buf_ptr, nan_req->request_data, cmd->data_len);
 
 	ret = wmi_unified_cmd_send(wma_handle->wmi_handle, buf, len,
 				   WMI_NAN_CMDID);
@@ -6041,7 +6041,7 @@
 	}
 
 	cmd = (wmi_set_dhcp_server_offload_cmd_fixed_param *) wmi_buf_data(buf);
-	cdf_mem_zero(cmd, sizeof(*cmd));
+	qdf_mem_zero(cmd, sizeof(*cmd));
 
 	WMITLV_SET_HDR(&cmd->tlv_header,
 		       WMITLV_TAG_STRUC_wmi_set_dhcp_server_offload_cmd_fixed_param,
@@ -6169,7 +6169,7 @@
 	}
 
 	sca_indication = (tSirChAvoidIndType *)
-			 cdf_mem_malloc(sizeof(tSirChAvoidIndType));
+			 qdf_mem_malloc(sizeof(tSirChAvoidIndType));
 	if (!sca_indication) {
 		WMA_LOGE("Invalid channel avoid indication buffer");
 		return -EINVAL;
@@ -6194,7 +6194,7 @@
 	qdf_status = cds_mq_post_message(QDF_MODULE_ID_SME, &sme_msg);
 	if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
 		WMA_LOGE("Fail to post eWNI_SME_CH_AVOID_IND msg to SME");
-		cdf_mem_free(sca_indication);
+		qdf_mem_free(sca_indication);
 		return -EINVAL;
 	}
 
@@ -6783,7 +6783,7 @@
 	}
 
 	tdls_event = (tSirTdlsEventnotify *)
-		     cdf_mem_malloc(sizeof(*tdls_event));
+		     qdf_mem_malloc(sizeof(*tdls_event));
 	if (!tdls_event) {
 		WMA_LOGE("%s: failed to allocate memory for tdls_event",
 			 __func__);
@@ -6919,7 +6919,7 @@
 
 end:
 	if (chan_switch_params)
-		cdf_mem_free(chan_switch_params);
+		qdf_mem_free(chan_switch_params);
 	return ret;
 }
 
@@ -7029,7 +7029,7 @@
 
 end_fw_tdls_state:
 	if (pwmaTdlsparams)
-		cdf_mem_free(pwmaTdlsparams);
+		qdf_mem_free(pwmaTdlsparams);
 	return ret;
 }
 
@@ -7065,7 +7065,7 @@
 
 	/* peer capability info is valid only when peer state is connected */
 	if (WMA_TDLS_PEER_STATE_CONNECTED != peerStateParams->peerState) {
-		cdf_mem_zero(&peerStateParams->peerCap,
+		qdf_mem_zero(&peerStateParams->peerCap,
 			     sizeof(tTdlsPeerCapParams));
 	}
 
@@ -7257,7 +7257,7 @@
 
 end_tdls_peer_state:
 	if (peerStateParams)
-		cdf_mem_free(peerStateParams);
+		qdf_mem_free(peerStateParams);
 	return ret;
 }
 #endif /* FEATURE_WLAN_TDLS */
@@ -7625,7 +7625,7 @@
 		return -ENOENT;
 	}
 	radar_event = (struct wma_dfs_radar_indication *)
-		      cdf_mem_malloc(sizeof(struct wma_dfs_radar_indication));
+		      qdf_mem_malloc(sizeof(struct wma_dfs_radar_indication));
 	if (radar_event == NULL) {
 		WMA_LOGE("%s:DFS- Invalid radar_event", __func__);
 		return -ENOMEM;
@@ -7651,7 +7651,7 @@
 		if (indication_status == false) {
 			WMA_LOGE("%s:Application triggered channel switch in progress!.. drop radar event indiaction to SAP",
 				__func__);
-			cdf_mem_free(radar_event);
+			qdf_mem_free(radar_event);
 			qdf_spin_unlock_bh(&ic->chan_lock);
 			return 0;
 		}
@@ -7718,7 +7718,7 @@
 	}
 
 	buf_ptr = (u_int8_t *) wmi_buf_data(buf);
-	cdf_mem_zero(buf_ptr, len);
+	qdf_mem_zero(buf_ptr, len);
 	cmd = (wmi_get_fw_mem_dump_fixed_param *) buf_ptr;
 
 	WMITLV_SET_HDR(&cmd->tlv_header,
@@ -7791,7 +7791,7 @@
 	cds_msg_t sme_msg = {0};
 	QDF_STATUS qdf_status = QDF_STATUS_SUCCESS;
 
-	dump_rsp = cdf_mem_malloc(sizeof(*dump_rsp));
+	dump_rsp = qdf_mem_malloc(sizeof(*dump_rsp));
 
 	if (!dump_rsp) {
 		WMA_LOGE(FL("Memory allocation failed."));
@@ -7812,7 +7812,7 @@
 	qdf_status = cds_mq_post_message(QDF_MODULE_ID_SME, &sme_msg);
 	if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
 		WMA_LOGE(FL("Fail to post fw mem dump ind msg"));
-		cdf_mem_free(dump_rsp);
+		qdf_mem_free(dump_rsp);
 	}
 
 	return qdf_status;
@@ -7898,7 +7898,7 @@
 	}
 
 	buf_ptr = wmi_buf_data(buf);
-	cdf_mem_zero(buf_ptr, len);
+	qdf_mem_zero(buf_ptr, len);
 
 	/* Populate the WMI command */
 	cmd = (wmi_vdev_set_ie_cmd_fixed_param *)buf_ptr;
@@ -7918,7 +7918,7 @@
 	WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_BYTE, ie_len_aligned);
 	buf_ptr += WMI_TLV_HDR_SIZE;
 
-	cdf_mem_copy(buf_ptr, ie_info->data, cmd->ie_len);
+	qdf_mem_copy(buf_ptr, ie_info->data, cmd->ie_len);
 
 	ret = wmi_unified_cmd_send(wma->wmi_handle, buf, len,
 				   WMI_VDEV_SET_IE_CMDID);
diff --git a/core/wma/src/wma_main.c b/core/wma/src/wma_main.c
index b54a362..777b027 100644
--- a/core/wma/src/wma_main.c
+++ b/core/wma/src/wma_main.c
@@ -50,7 +50,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"
 
@@ -505,13 +505,13 @@
 	cds_msg_t msg = { 0 };
 	wma_cli_set_cmd_t *iwcmd;
 
-	iwcmd = cdf_mem_malloc(sizeof(*iwcmd));
+	iwcmd = qdf_mem_malloc(sizeof(*iwcmd));
 	if (!iwcmd) {
 		WMA_LOGE("%s: Failed alloc memory for iwcmd", __func__);
 		return -ENOMEM;
 	}
 
-	cdf_mem_zero(iwcmd, sizeof(*iwcmd));
+	qdf_mem_zero(iwcmd, sizeof(*iwcmd));
 	iwcmd->param_value = sval1;
 	iwcmd->param_sec_value = sval2;
 	iwcmd->param_vdev_id = vdev_id;
@@ -525,7 +525,7 @@
 	    cds_mq_post_message(QDF_MODULE_ID_WMA, &msg)) {
 		WMA_LOGP("%s: Failed to post WMA_CLI_SET_CMD msg",
 			  __func__);
-		cdf_mem_free(iwcmd);
+		qdf_mem_free(iwcmd);
 		return -EIO;
 	}
 	return 0;
@@ -1489,7 +1489,7 @@
 	wma_process_fw_event_params *params_buf;
 	cds_msg_t cds_msg = { 0 };
 
-	params_buf = cdf_mem_malloc(sizeof(wma_process_fw_event_params));
+	params_buf = qdf_mem_malloc(sizeof(wma_process_fw_event_params));
 	if (!params_buf) {
 		WMA_LOGE("%s: Failed alloc memory for params_buf", __func__);
 		cdf_nbuf_free(evt_buf);
@@ -1508,7 +1508,7 @@
 		WMA_LOGP("%s: Failed to post WMA_PROCESS_FW_EVENT msg",
 			 __func__);
 		cdf_nbuf_free(evt_buf);
-		cdf_mem_free(params_buf);
+		qdf_mem_free(params_buf);
 		return -EFAULT;
 	}
 	WMA_LOGD("WMA_PROCESS_FW_EVENT posted");
@@ -1619,7 +1619,7 @@
 		return qdf_status;
 	}
 
-	cdf_mem_zero(wma_handle, sizeof(t_wma_handle));
+	qdf_mem_zero(wma_handle, sizeof(t_wma_handle));
 
 	if (cds_get_conparam() != QDF_GLOBAL_FTM_MODE) {
 #ifdef FEATURE_WLAN_SCAN_PNO
@@ -1752,14 +1752,14 @@
 	wma_handle->dfs_phyerr_filter_offload =
 		mac_params->dfsPhyerrFilterOffload;
 	wma_handle->dfs_pri_multiplier = mac_params->dfsRadarPriMultiplier;
-	wma_handle->interfaces = cdf_mem_malloc(sizeof(struct wma_txrx_node) *
+	wma_handle->interfaces = qdf_mem_malloc(sizeof(struct wma_txrx_node) *
 						wma_handle->max_bssid);
 	if (!wma_handle->interfaces) {
 		WMA_LOGP("%s: failed to allocate interface table", __func__);
 		qdf_status = QDF_STATUS_E_NOMEM;
 		goto err_scn_context;
 	}
-	cdf_mem_zero(wma_handle->interfaces, sizeof(struct wma_txrx_node) *
+	qdf_mem_zero(wma_handle->interfaces, sizeof(struct wma_txrx_node) *
 		     wma_handle->max_bssid);
 	/* Register the debug print event handler */
 	wmi_unified_register_event_handler(wma_handle->wmi_handle,
@@ -2016,14 +2016,14 @@
 err_event_init:
 	wmi_unified_unregister_event_handler(wma_handle->wmi_handle,
 					     WMI_DEBUG_PRINT_EVENTID);
-	cdf_mem_free(wma_handle->interfaces);
+	qdf_mem_free(wma_handle->interfaces);
 err_scn_context:
 	wma_dfs_detach(wma_handle->dfs_ic);
 #if defined(QCA_WIFI_FTM)
 	wma_utf_detach(wma_handle);
 #endif /* QCA_WIFI_FTM */
 err_wmi_handle:
-	cdf_mem_free(((p_cds_contextType) cds_context)->cfg_ctx);
+	qdf_mem_free(((p_cds_contextType) cds_context)->cfg_ctx);
 	OS_FREE(wmi_handle);
 
 err_wma_handle:
@@ -2115,7 +2115,7 @@
 	status = lim_post_msg_api(pMac, &msg);
 	if (QDF_STATUS_SUCCESS != status) {
 		if (NULL != body_ptr)
-			cdf_mem_free(body_ptr);
+			qdf_mem_free(body_ptr);
 		QDF_ASSERT(0);
 	}
 	return;
@@ -2142,7 +2142,7 @@
 	}
 
 	cmd = (wmi_pdev_set_base_macaddr_cmd_fixed_param *) wmi_buf_data(buf);
-	cdf_mem_zero(cmd, sizeof(*cmd));
+	qdf_mem_zero(cmd, sizeof(*cmd));
 
 	WMITLV_SET_HDR(&cmd->tlv_header,
 		       WMITLV_TAG_STRUC_wmi_pdev_set_base_macaddr_cmd_fixed_param,
@@ -2154,7 +2154,7 @@
 				   WMI_PDEV_SET_BASE_MACADDR_CMDID);
 	if (err) {
 		WMA_LOGE("Failed to send set_base_macaddr cmd");
-		cdf_mem_free(buf);
+		qdf_mem_free(buf);
 		return -EIO;
 	}
 	WMA_LOGD("Base MAC Addr: " MAC_ADDRESS_STR,
@@ -2211,10 +2211,10 @@
 
 	/* Free any previous allocation */
 	if (wma->events_logs_list)
-		cdf_mem_free(wma->events_logs_list);
+		qdf_mem_free(wma->events_logs_list);
 
 	/* Store the event list for run time enable/disable */
-	wma->events_logs_list = cdf_mem_malloc(num_of_diag_events_logs *
+	wma->events_logs_list = qdf_mem_malloc(num_of_diag_events_logs *
 			sizeof(uint32_t));
 	if (!wma->events_logs_list) {
 		WMA_LOGE("%s: event log list memory allocation failed",
@@ -2230,7 +2230,7 @@
 	buf = wmi_buf_alloc(wma->wmi_handle, buf_len);
 	if (!buf) {
 		WMA_LOGE("%s: wmi_buf_alloc failed", __func__);
-		cdf_mem_free(wma->events_logs_list);
+		qdf_mem_free(wma->events_logs_list);
 		wma->events_logs_list = NULL;
 		return -ENOMEM;
 	}
@@ -2380,7 +2380,7 @@
 		return QDF_STATUS_E_NULL_VALUE;
 	}
 
-	hw_mode_resp = cdf_mem_malloc(sizeof(*hw_mode_resp));
+	hw_mode_resp = qdf_mem_malloc(sizeof(*hw_mode_resp));
 	if (!hw_mode_resp) {
 		WMA_LOGI("%s: Memory allocation failed", __func__);
 		/* Since this memory allocation itself failed, we cannot
@@ -2490,7 +2490,7 @@
 		return QDF_STATUS_E_FAILURE;
 	}
 
-	hw_mode_trans_ind = cdf_mem_malloc(sizeof(*hw_mode_trans_ind));
+	hw_mode_trans_ind = qdf_mem_malloc(sizeof(*hw_mode_trans_ind));
 	if (!hw_mode_trans_ind) {
 		WMA_LOGI("%s: Memory allocation failed", __func__);
 		return QDF_STATUS_E_NULL_VALUE;
@@ -2566,7 +2566,7 @@
 		return QDF_STATUS_E_NULL_VALUE;
 	}
 
-	dual_mac_cfg_resp = cdf_mem_malloc(sizeof(*dual_mac_cfg_resp));
+	dual_mac_cfg_resp = qdf_mem_malloc(sizeof(*dual_mac_cfg_resp));
 	if (!dual_mac_cfg_resp) {
 		WMA_LOGE("%s: Memory allocation failed", __func__);
 		/* Since the mem alloc failed, we cannot send resp to LIM.
@@ -2864,7 +2864,7 @@
 
 	if (wma_handle->ack_work_ctx) {
 		cds_flush_work(&wma_handle->ack_work_ctx->ack_cmp_work);
-		cdf_mem_free(wma_handle->ack_work_ctx);
+		qdf_mem_free(wma_handle->ack_work_ctx);
 		wma_handle->ack_work_ctx = NULL;
 	}
 
@@ -2935,7 +2935,7 @@
 			return;
 		}
 		qdf_mc_timer_destroy(&req_msg->event_timeout);
-		cdf_mem_free(req_msg);
+		qdf_mem_free(req_msg);
 	}
 	qdf_spin_unlock_bh(&wma->wma_hold_req_q_lock);
 }
@@ -2970,7 +2970,7 @@
 			return;
 		}
 		qdf_mc_timer_destroy(&req_msg->event_timeout);
-		cdf_mem_free(req_msg);
+		qdf_mem_free(req_msg);
 	}
 	qdf_spin_unlock_bh(&wma->vdev_respq_lock);
 }
@@ -3016,33 +3016,33 @@
 				cdf_nbuf_unmap_single(wma_handle->qdf_dev,
 					bcn->buf, QDF_DMA_TO_DEVICE);
 			cdf_nbuf_free(bcn->buf);
-			cdf_mem_free(bcn);
+			qdf_mem_free(bcn);
 			wma_handle->interfaces[i].beacon = NULL;
 		}
 
 		if (wma_handle->interfaces[i].handle) {
-			cdf_mem_free(wma_handle->interfaces[i].handle);
+			qdf_mem_free(wma_handle->interfaces[i].handle);
 			wma_handle->interfaces[i].handle = NULL;
 		}
 
 		if (wma_handle->interfaces[i].addBssStaContext) {
-			cdf_mem_free(wma_handle->
+			qdf_mem_free(wma_handle->
 				     interfaces[i].addBssStaContext);
 			wma_handle->interfaces[i].addBssStaContext = NULL;
 		}
 
 		if (wma_handle->interfaces[i].del_staself_req) {
-			cdf_mem_free(wma_handle->interfaces[i].del_staself_req);
+			qdf_mem_free(wma_handle->interfaces[i].del_staself_req);
 			wma_handle->interfaces[i].del_staself_req = NULL;
 		}
 	}
 
-	cdf_mem_free(wma_handle->interfaces);
+	qdf_mem_free(wma_handle->interfaces);
 	/* free the wma_handle */
 	cds_free_context(wma_handle->cds_context, QDF_MODULE_ID_WMA,
 			 wma_handle);
 
-	cdf_mem_free(((p_cds_contextType) cds_ctx)->cfg_ctx);
+	qdf_mem_free(((p_cds_contextType) cds_ctx)->cfg_ctx);
 	WMA_LOGD("%s: Exit", __func__);
 	return QDF_STATUS_SUCCESS;
 }
@@ -3116,13 +3116,13 @@
 
 	/* Free DBS list */
 	if (wma_handle->hw_mode.hw_mode_list) {
-		cdf_mem_free(wma_handle->hw_mode.hw_mode_list);
+		qdf_mem_free(wma_handle->hw_mode.hw_mode_list);
 		wma_handle->hw_mode.hw_mode_list = NULL;
 		WMA_LOGI("%s: DBS list is freed", __func__);
 	}
 
 	if (wma_handle->events_logs_list) {
-		cdf_mem_free(wma_handle->events_logs_list);
+		qdf_mem_free(wma_handle->events_logs_list);
 		wma_handle->events_logs_list = NULL;
 		WMA_LOGD("%s: Event log list freed", __func__);
 	}
@@ -3163,7 +3163,7 @@
 	qdf_wake_lock_destroy(&wma_handle->wmi_cmd_rsp_wake_lock);
 	qdf_runtime_lock_deinit(wma_handle->wmi_cmd_rsp_runtime_lock);
 	for (idx = 0; idx < wma_handle->num_mem_chunks; ++idx) {
-		cdf_os_mem_free_consistent(wma_handle->qdf_dev,
+		qdf_mem_free_consistent(wma_handle->qdf_dev,
 					   wma_handle->mem_chunks[idx].len,
 					   wma_handle->mem_chunks[idx].vaddr,
 					   wma_handle->mem_chunks[idx].paddr,
@@ -3184,7 +3184,7 @@
 	}
 
 	if (NULL != wma_handle->pGetRssiReq) {
-		cdf_mem_free(wma_handle->pGetRssiReq);
+		qdf_mem_free(wma_handle->pGetRssiReq);
 		wma_handle->pGetRssiReq = NULL;
 	}
 	if (WMI_SERVICE_IS_ENABLED(wma_handle->wmi_service_bitmap,
@@ -3244,11 +3244,10 @@
 	/** reduce the requested allocation by half until allocation succeeds */
 	while (wma_handle->mem_chunks[idx].vaddr == NULL && num_units) {
 		wma_handle->mem_chunks[idx].vaddr =
-			cdf_os_mem_alloc_consistent(wma_handle->qdf_dev,
-						    num_units * unit_len, &paddr,
-						    qdf_get_dma_mem_context(
-							(&(wma_handle->mem_chunks[idx])),
-								memctx));
+			qdf_mem_alloc_consistent(wma_handle->qdf_dev,
+						 wma_handle->qdf_dev->dev,
+						    num_units * unit_len,
+						    &paddr);
 		if (wma_handle->mem_chunks[idx].vaddr == NULL) {
 			num_units = (num_units >> 1);/* reduce length by half */
 		} else {
@@ -3514,7 +3513,7 @@
 	struct wma_tgt_cfg tgt_cfg;
 	void *hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
 
-	cdf_mem_zero(&tgt_cfg, sizeof(struct wma_tgt_cfg));
+	qdf_mem_zero(&tgt_cfg, sizeof(struct wma_tgt_cfg));
 	tgt_cfg.reg_domain = wma_handle->reg_cap.eeprom_rd;
 	tgt_cfg.eeprom_rd_ext = wma_handle->reg_cap.eeprom_rd_ext;
 
@@ -3536,7 +3535,7 @@
 
 	tgt_cfg.max_intf_count = wma_handle->wlan_resource_config.num_vdevs;
 
-	cdf_mem_copy(tgt_cfg.hw_macaddr.bytes, wma_handle->hwaddr,
+	qdf_mem_copy(tgt_cfg.hw_macaddr.bytes, wma_handle->hwaddr,
 		     ATH_MAC_LEN);
 
 	wma_update_target_services(wma_handle, &tgt_cfg.services);
@@ -3654,7 +3653,7 @@
 		       WMITLV_TAG_ARRAY_STRUC,
 		       (sizeof(wlan_host_memory_chunk) *
 			wma_handle->num_mem_chunks));
-	cdf_mem_copy(&wma_handle->target_abi_vers,
+	qdf_mem_copy(&wma_handle->target_abi_vers,
 		     &param_buf->fixed_param->fw_abi_vers,
 		     sizeof(wmi_abi_version));
 	num_whitelist = sizeof(version_whitelist) /
@@ -3679,7 +3678,7 @@
 		 cmd->host_abi_vers.abi_version_ns_2,
 		 cmd->host_abi_vers.abi_version_ns_3);
 
-	cdf_mem_copy(&wma_handle->final_abi_vers, &cmd->host_abi_vers,
+	qdf_mem_copy(&wma_handle->final_abi_vers, &cmd->host_abi_vers,
 		     sizeof(wmi_abi_version));
 	return buf;
 }
@@ -3831,13 +3830,13 @@
 	wma_handle->num_dbs_hw_modes = ev->num_dbs_hw_modes;
 	ev_wlan_dbs_hw_mode_list = param_buf->wlan_dbs_hw_mode_list;
 	wma_handle->hw_mode.hw_mode_list =
-		cdf_mem_malloc(sizeof(*wma_handle->hw_mode.hw_mode_list) *
+		qdf_mem_malloc(sizeof(*wma_handle->hw_mode.hw_mode_list) *
 				wma_handle->num_dbs_hw_modes);
 	if (!wma_handle->hw_mode.hw_mode_list) {
 		WMA_LOGE("%s: Memory allocation failed for DBS", __func__);
 		/* Continuing with the rest of the processing */
 	}
-	cdf_mem_copy(wma_handle->hw_mode.hw_mode_list,
+	qdf_mem_copy(wma_handle->hw_mode.hw_mode_list,
 			ev_wlan_dbs_hw_mode_list,
 			(sizeof(*wma_handle->hw_mode.hw_mode_list) *
 						wma_handle->num_dbs_hw_modes));
@@ -3855,7 +3854,7 @@
 	wma_handle->phy_capability = ev->phy_capability;
 	wma_handle->max_frag_entry = ev->max_frag_entry;
 	wma_handle->num_rf_chains = ev->num_rf_chains;
-	cdf_mem_copy(&wma_handle->reg_cap, param_buf->hal_reg_capabilities,
+	qdf_mem_copy(&wma_handle->reg_cap, param_buf->hal_reg_capabilities,
 		     sizeof(HAL_REG_CAPABILITIES));
 	wma_handle->ht_cap_info = ev->ht_cap_info;
 #ifdef WLAN_FEATURE_11AC
@@ -3876,7 +3875,7 @@
 
 	if (ev->hw_bd_id) {
 		wma_handle->hw_bd_id = ev->hw_bd_id;
-		cdf_mem_copy(wma_handle->hw_bd_info,
+		qdf_mem_copy(wma_handle->hw_bd_info,
 			     ev->hw_bd_info, sizeof(ev->hw_bd_info));
 
 		WMA_LOGE("%s: Board version: %x.%x",
@@ -3884,7 +3883,7 @@
 			 wma_handle->hw_bd_info[0], wma_handle->hw_bd_info[1]);
 	} else {
 		wma_handle->hw_bd_id = 0;
-		cdf_mem_zero(wma_handle->hw_bd_info,
+		qdf_mem_zero(wma_handle->hw_bd_info,
 			     sizeof(wma_handle->hw_bd_info));
 		WMA_LOGE("%s: Board version is unknown!", __func__);
 	}
@@ -3894,7 +3893,7 @@
 	/* dbg_print_wmi_service_11ac(ev); */
 
 	/* wmi service is ready */
-	cdf_mem_copy(wma_handle->wmi_service_bitmap,
+	qdf_mem_copy(wma_handle->wmi_service_bitmap,
 		     param_buf->wmi_service_bitmap,
 		     sizeof(wma_handle->wmi_service_bitmap));
 
@@ -4004,12 +4003,12 @@
 		return;
 	}
 
-	cdf_mem_copy(target_cap.wmi_service_bitmap,
+	qdf_mem_copy(target_cap.wmi_service_bitmap,
 		     param_buf->wmi_service_bitmap,
 		     sizeof(wma_handle->wmi_service_bitmap));
 	target_cap.wlan_resource_config = wma_handle->wlan_resource_config;
 	wma_update_fw_config(wma_handle, &target_cap);
-	cdf_mem_copy(wma_handle->wmi_service_bitmap,
+	qdf_mem_copy(wma_handle->wmi_service_bitmap,
 		     target_cap.wmi_service_bitmap,
 		     sizeof(wma_handle->wmi_service_bitmap));
 	wma_handle->wlan_resource_config = target_cap.wlan_resource_config;
@@ -4192,9 +4191,9 @@
 				WLAN_INIT_STATUS_GEN_FAILED;
 		}
 	}
-	cdf_mem_copy(&wma_handle->final_abi_vers, &ev->fw_abi_vers,
+	qdf_mem_copy(&wma_handle->final_abi_vers, &ev->fw_abi_vers,
 		     sizeof(wmi_abi_version));
-	cdf_mem_copy(&wma_handle->target_abi_vers, &ev->fw_abi_vers,
+	qdf_mem_copy(&wma_handle->target_abi_vers, &ev->fw_abi_vers,
 		     sizeof(wmi_abi_version));
 
 	/* copy the mac addr */
@@ -4716,7 +4715,7 @@
 	if (NULL == wma_handle) {
 		WMA_LOGP("%s: wma_handle is NULL", __func__);
 		QDF_ASSERT(0);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		qdf_status = QDF_STATUS_E_INVAL;
 		goto end;
 	}
@@ -4729,7 +4728,7 @@
 	case WMA_PROCESS_FW_EVENT:
 		wma_process_fw_event(wma_handle,
 				(wma_process_fw_event_params *) msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 
 #ifdef FEATURE_WLAN_ESE
@@ -4767,16 +4766,16 @@
 		break;
 	case WMA_START_SCAN_OFFLOAD_REQ:
 		wma_start_scan(wma_handle, msg->bodyptr, msg->type);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 	case WMA_STOP_SCAN_OFFLOAD_REQ:
 		wma_stop_scan(wma_handle, msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 	case WMA_UPDATE_CHAN_LIST_REQ:
 		wma_update_channel_list(wma_handle,
 					(tSirUpdateChanList *) msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 	case WMA_SET_LINK_STATE:
 		wma_set_linkstate(wma_handle, (tpLinkStateParams) msg->bodyptr);
@@ -4806,27 +4805,27 @@
 	case WMA_UPDATE_EDCA_PROFILE_IND:
 		wma_process_update_edca_param_req(wma_handle,
 						  (tEdcaParams *) msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 	case WMA_SEND_BEACON_REQ:
 		wma_send_beacon(wma_handle, (tpSendbeaconParams) msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 	case WMA_SEND_PROBE_RSP_TMPL:
 		wma_send_probe_rsp_tmpl(wma_handle,
 					(tpSendProbeRespParams) msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 	case WMA_CLI_SET_CMD:
 		wma_process_cli_set_cmd(wma_handle,
 					(wma_cli_set_cmd_t *) msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 #if !defined(REMOVE_PKT_LOG)
 	case WMA_PKTLOG_ENABLE_REQ:
 		wma_pktlog_wmi_send_cmd(wma_handle,
 			(struct ath_pktlog_wmi_params *)msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 #endif /* REMOVE_PKT_LOG */
 #if defined(QCA_WIFI_FTM)
@@ -4838,22 +4837,22 @@
 	case WMA_ENTER_PS_REQ:
 		wma_enable_sta_ps_mode(wma_handle,
 				       (tpEnablePsParams) msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 	case WMA_EXIT_PS_REQ:
 		wma_disable_sta_ps_mode(wma_handle,
 					(tpDisablePsParams) msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 	case WMA_ENABLE_UAPSD_REQ:
 		wma_enable_uapsd_mode(wma_handle,
 				      (tpEnableUapsdParams) msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 	case WMA_DISABLE_UAPSD_REQ:
 		wma_disable_uapsd_mode(wma_handle,
 				       (tpDisableUapsdParams) msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 	case WMA_SET_TX_POWER_REQ:
 		wma_set_tx_power(wma_handle, (tpMaxTxPowerParams) msg->bodyptr);
@@ -4892,12 +4891,12 @@
 	case WMA_UPDATE_OP_MODE:
 		wma_process_update_opmode(wma_handle,
 					  (tUpdateVHTOpMode *) msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 	case WMA_UPDATE_RX_NSS:
 		wma_process_update_rx_nss(wma_handle,
 					  (tUpdateRxNss *) msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 #ifdef WLAN_FEATURE_11AC
 	case WMA_UPDATE_MEMBERSHIP:
@@ -4912,7 +4911,7 @@
 	case WMA_UPDATE_BEACON_IND:
 		wma_process_update_beacon_params(wma_handle,
 			(tUpdateBeaconParams *) msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 
 	case WMA_ADD_TS_REQ:
@@ -4930,24 +4929,24 @@
 	case WMA_RECEIVE_FILTER_SET_FILTER_REQ:
 		wma_process_receive_filter_set_filter_req(wma_handle,
 				(tSirRcvPktFilterCfgType *) msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 
 	case WMA_RECEIVE_FILTER_CLEAR_FILTER_REQ:
 		wma_process_receive_filter_clear_filter_req(wma_handle,
 				(tSirRcvFltPktClearParam *) msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 
 	case WMA_WOW_ADD_PTRN:
 		wma_wow_add_pattern(wma_handle,
 				    (struct wow_add_pattern *) msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 	case WMA_WOW_DEL_PTRN:
 		wma_wow_delete_user_pattern(wma_handle,
 				    (struct wow_delete_pattern *) msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 	case WMA_WOWL_ENTER_REQ:
 		wma_wow_enter(wma_handle,
@@ -4973,7 +4972,7 @@
 	case WMA_8023_MULTICAST_LIST_REQ:
 		wma_process_mcbc_set_filter_req(wma_handle,
 				(tpSirRcvFltMcAddrList) msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 #ifdef WLAN_FEATURE_GTK_OFFLOAD
 	case WMA_GTK_OFFLOAD_REQ:
@@ -5034,17 +5033,17 @@
 	case WMA_ADD_PERIODIC_TX_PTRN_IND:
 		wma_process_add_periodic_tx_ptrn_ind(wma_handle,
 				(tSirAddPeriodicTxPtrn *) msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 	case WMA_DEL_PERIODIC_TX_PTRN_IND:
 		wma_process_del_periodic_tx_ptrn_ind(wma_handle,
 				(tSirDelPeriodicTxPtrn *) msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 	case WMA_TX_POWER_LIMIT:
 		wma_process_tx_power_limits(wma_handle,
 					    (tSirTxPowerLimit *) msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 #ifdef FEATURE_WLAN_LPHB
 	case WMA_LPHB_CONF_REQ:
@@ -5057,25 +5056,25 @@
 	case WMA_CH_AVOID_UPDATE_REQ:
 		wma_process_ch_avoid_update_req(wma_handle,
 				(tSirChAvoidUpdateReq *) msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 #endif /* FEATURE_WLAN_CH_AVOID */
 #ifdef FEATURE_WLAN_AUTO_SHUTDOWN
 	case WMA_SET_AUTO_SHUTDOWN_TIMER_REQ:
 		wma_set_auto_shutdown_timer_req(wma_handle, msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 #endif /* FEATURE_WLAN_AUTO_SHUTDOWN */
 	case WMA_DHCP_START_IND:
 	case WMA_DHCP_STOP_IND:
 		wma_process_dhcp_ind(wma_handle, (tAniDHCPInd *) msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 
 	case WMA_INIT_THERMAL_INFO_CMD:
 		wma_process_init_thermal_info(wma_handle,
 					      (t_thermal_mgmt *) msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 
 	case WMA_SET_THERMAL_LEVEL:
@@ -5085,26 +5084,26 @@
 	case WMA_SET_P2P_GO_NOA_REQ:
 		wma_process_set_p2pgo_noa_req(wma_handle,
 					      (tP2pPsParams *) msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 	case WMA_SET_MIMOPS_REQ:
 		wma_process_set_mimops_req(wma_handle,
 					   (tSetMIMOPS *) msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 	case WMA_SET_SAP_INTRABSS_DIS:
 		wma_set_vdev_intrabss_fwd(wma_handle,
 					  (tDisableIntraBssFwd *) msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 	case WMA_GET_LINK_SPEED:
 		wma_get_link_speed(wma_handle, msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 	case WMA_MODEM_POWER_STATE_IND:
 		wma_notify_modem_power_state(wma_handle,
 				(tSirModemPowerStateInd *) msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 	case WMA_WLAN_RESUME_REQ:
 		wma_resume_req(wma_handle, QDF_SYSTEM_SUSPEND);
@@ -5114,76 +5113,76 @@
 	case WMA_STATS_EXT_REQUEST:
 		wma_stats_ext_req(wma_handle,
 				  (tpStatsExtRequest) (msg->bodyptr));
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 #endif /* WLAN_FEATURE_STATS_EXT */
 	case WMA_HIDDEN_SSID_VDEV_RESTART:
 		wma_hidden_ssid_vdev_restart(wma_handle,
 				(tHalHiddenSsidVdevRestart *) msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 #ifdef WLAN_FEATURE_EXTWOW_SUPPORT
 	case WMA_WLAN_EXT_WOW:
 		wma_enable_ext_wow(wma_handle,
 				   (tSirExtWoWParams *) msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 	case WMA_WLAN_SET_APP_TYPE1_PARAMS:
 		wma_set_app_type1_params_in_fw(wma_handle,
 				(tSirAppType1Params *) msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 	case WMA_WLAN_SET_APP_TYPE2_PARAMS:
 		wma_set_app_type2_params_in_fw(wma_handle,
 				(tSirAppType2Params *) msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 #endif /* WLAN_FEATURE_EXTWOW_SUPPORT */
 #ifdef FEATURE_WLAN_EXTSCAN
 	case WMA_EXTSCAN_START_REQ:
 		wma_start_extscan(wma_handle,
 				  (tSirWifiScanCmdReqParams *) msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 	case WMA_EXTSCAN_STOP_REQ:
 		wma_stop_extscan(wma_handle,
 				 (tSirExtScanStopReqParams *) msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 	case WMA_EXTSCAN_SET_BSSID_HOTLIST_REQ:
 		wma_extscan_start_hotlist_monitor(wma_handle,
 			(tSirExtScanSetBssidHotListReqParams *) msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 	case WMA_EXTSCAN_RESET_BSSID_HOTLIST_REQ:
 		wma_extscan_stop_hotlist_monitor(wma_handle,
 			(tSirExtScanResetBssidHotlistReqParams *) msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 	case WMA_EXTSCAN_SET_SIGNF_CHANGE_REQ:
 		wma_extscan_start_change_monitor(wma_handle,
 			(tSirExtScanSetSigChangeReqParams *) msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 	case WMA_EXTSCAN_RESET_SIGNF_CHANGE_REQ:
 		wma_extscan_stop_change_monitor(wma_handle,
 			(tSirExtScanResetSignificantChangeReqParams *) msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 	case WMA_EXTSCAN_GET_CACHED_RESULTS_REQ:
 		wma_extscan_get_cached_results(wma_handle,
 			(tSirExtScanGetCachedResultsReqParams *) msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 	case WMA_EXTSCAN_GET_CAPABILITIES_REQ:
 		wma_extscan_get_capabilities(wma_handle,
 			(tSirGetExtScanCapabilitiesReqParams *) msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 	case WMA_SET_EPNO_LIST_REQ:
 		wma_set_epno_network_list(wma_handle,
 			(struct wifi_epno_params *)msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 	case WMA_SET_PASSPOINT_LIST_REQ:
 		/* Issue reset passpoint network list first and clear
@@ -5193,7 +5192,7 @@
 
 		wma_set_passpoint_network_list(wma_handle,
 			(struct wifi_passpoint_req *)msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 	case WMA_RESET_PASSPOINT_LIST_REQ:
 		wma_reset_passpoint_network_list(wma_handle,
@@ -5202,57 +5201,57 @@
 	case WMA_EXTSCAN_SET_SSID_HOTLIST_REQ:
 		wma_set_ssid_hotlist(wma_handle,
 			(struct sir_set_ssid_hotlist_request *)msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 #endif /* FEATURE_WLAN_EXTSCAN */
 	case WMA_SET_SCAN_MAC_OUI_REQ:
 		wma_scan_probe_setoui(wma_handle, msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 #ifdef WLAN_FEATURE_LINK_LAYER_STATS
 	case WMA_LINK_LAYER_STATS_CLEAR_REQ:
 		wma_process_ll_stats_clear_req(wma_handle,
 			(tpSirLLStatsClearReq) msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 	case WMA_LINK_LAYER_STATS_SET_REQ:
 		wma_process_ll_stats_set_req(wma_handle,
 					     (tpSirLLStatsSetReq) msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 	case WMA_LINK_LAYER_STATS_GET_REQ:
 		wma_process_ll_stats_get_req(wma_handle,
 					     (tpSirLLStatsGetReq) msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 #endif /* WLAN_FEATURE_LINK_LAYER_STATS */
 	case SIR_HAL_UNIT_TEST_CMD:
 		wma_process_unit_test_cmd(wma_handle,
 					  (t_wma_unit_test_cmd *) msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 #ifdef WLAN_FEATURE_ROAM_OFFLOAD
 	case WMA_ROAM_OFFLOAD_SYNCH_FAIL:
 		wma_process_roam_synch_fail(wma_handle,
 			(struct roam_offload_synch_fail *)msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 	case SIR_HAL_ROAM_INVOKE:
 		wma_process_roam_invoke(wma_handle,
 			(struct wma_roam_invoke_cmd *)msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 #endif /* WLAN_FEATURE_ROAM_OFFLOAD */
 #ifdef WLAN_FEATURE_NAN
 	case WMA_NAN_REQUEST:
 		wma_nan_req(wma_handle, (tNanRequest *) msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 #endif /* WLAN_FEATURE_NAN */
 	case SIR_HAL_SET_BASE_MACADDR_IND:
 		wma_set_base_macaddr_indicate(wma_handle,
 					      (tSirMacAddr *) msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 	case WMA_LINK_STATUS_GET_REQ:
 		wma_process_link_status_req(wma_handle,
@@ -5260,37 +5259,37 @@
 		break;
 	case WMA_GET_TEMPERATURE_REQ:
 		wma_get_temperature(wma_handle);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 #ifdef DHCP_SERVER_OFFLOAD
 	case WMA_SET_DHCP_SERVER_OFFLOAD_CMD:
 		wma_process_dhcpserver_offload(wma_handle,
 			(tSirDhcpSrvOffloadInfo *) msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 #endif /* DHCP_SERVER_OFFLOAD */
 #ifdef WLAN_FEATURE_GPIO_LED_FLASHING
 	case WMA_LED_FLASHING_REQ:
 		wma_set_led_flashing(wma_handle,
 				     (tSirLedFlashingReq *) msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 #endif /* WLAN_FEATURE_GPIO_LED_FLASHING */
 	case SIR_HAL_SET_MAS:
 		wma_process_set_mas(wma_handle,
 				(uint32_t *)msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 	case SIR_HAL_SET_MIRACAST:
 		wma_process_set_miracast(wma_handle,
 				(uint32_t *)msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 	case SIR_HAL_CONFIG_STATS_FACTOR:
 		wma_config_stats_factor(wma_handle,
 					(struct sir_stats_avg_factor *)
 					msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 	case SIR_HAL_CONFIG_GUARD_TIME:
 		wma_config_guard_time(wma_handle,
@@ -5299,14 +5298,14 @@
 	case WMA_IPA_OFFLOAD_ENABLE_DISABLE:
 		wma_ipa_offload_enable_disable(wma_handle,
 			(struct sir_ipa_offload_enable_disable *)msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 	case SIR_HAL_START_STOP_LOGGING:
 		wma_set_wifi_start_packet_stats(wma_handle,
 				(struct sir_wifi_start_log *)msg->bodyptr);
 		wma_enable_specific_fw_logs(wma_handle,
 				(struct sir_wifi_start_log *)msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 	case SIR_HAL_FLUSH_LOG_TO_FW:
 		wma_send_flush_logs_to_fw(wma_handle);
@@ -5319,72 +5318,72 @@
 	case WMA_FW_MEM_DUMP_REQ:
 		wma_process_fw_mem_dump_req(wma_handle,
 			(struct fw_dump_req *)msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 	case SIR_HAL_SOC_SET_PCL_TO_FW:
 		wma_send_soc_set_pcl_cmd(wma_handle,
 					(struct sir_pcl_list *)msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 	case SIR_HAL_SOC_SET_HW_MODE:
 		wma_send_soc_set_hw_mode_cmd(wma_handle,
 				(struct sir_hw_mode *)msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 	case WMA_OCB_SET_CONFIG_CMD:
 		wma_ocb_set_config_req(wma_handle,
 			(struct sir_ocb_config *)msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 	case WMA_OCB_SET_UTC_TIME_CMD:
 		wma_ocb_set_utc_time(wma_handle,
 			(struct sir_ocb_utc *)msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 	case WMA_OCB_START_TIMING_ADVERT_CMD:
 		wma_ocb_start_timing_advert(wma_handle,
 			(struct sir_ocb_timing_advert *)msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 	case WMA_OCB_STOP_TIMING_ADVERT_CMD:
 		wma_ocb_stop_timing_advert(wma_handle,
 			(struct sir_ocb_timing_advert *)msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 	case WMA_DCC_CLEAR_STATS_CMD:
 		wma_dcc_clear_stats(wma_handle,
 			(struct sir_dcc_clear_stats *)msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 	case WMA_OCB_GET_TSF_TIMER_CMD:
 		wma_ocb_get_tsf_timer(wma_handle,
 			(struct sir_ocb_get_tsf_timer *)msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 	case WMA_DCC_GET_STATS_CMD:
 		wma_dcc_get_stats(wma_handle,
 			(struct sir_dcc_get_stats *)msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 	case WMA_DCC_UPDATE_NDL_CMD:
 		wma_dcc_update_ndl(wma_handle,
 			(struct sir_dcc_update_ndl *)msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 	case SIR_HAL_SOC_DUAL_MAC_CFG_REQ:
 		wma_send_soc_set_dual_mac_config(wma_handle,
 				(struct sir_dual_mac_config *)msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 	case WMA_SET_IE_INFO:
 		wma_process_set_ie_info(wma_handle,
 			(struct vdev_ie_info *)msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 	case WMA_LRO_CONFIG_CMD:
 		wma_lro_config_cmd(wma_handle,
 			(struct wma_lro_config_cmd_t *)msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 	case WMA_GW_PARAM_UPDATE_REQ:
 		wma_set_gateway_params(wma_handle,
@@ -5393,13 +5392,13 @@
 	case WMA_SET_EGAP_CONF_PARAMS:
 		wma_send_egap_conf_params(wma_handle,
 			(struct egap_conf_params *)msg->bodyptr);
-		cdf_mem_free(msg->bodyptr);
+		qdf_mem_free(msg->bodyptr);
 		break;
 	default:
 		WMA_LOGD("unknow msg type %x", msg->type);
 		/* Do Nothing? MSG Body should be freed at here */
 		if (NULL != msg->bodyptr) {
-			cdf_mem_free(msg->bodyptr);
+			qdf_mem_free(msg->bodyptr);
 		}
 	}
 end:
@@ -5555,7 +5554,7 @@
 	}
 	return QDF_STATUS_SUCCESS;
 fail:
-	param = cdf_mem_malloc(sizeof(*param));
+	param = qdf_mem_malloc(sizeof(*param));
 	if (!param) {
 		WMA_LOGE("%s: Memory allocation failed", __func__);
 		return QDF_STATUS_E_NULL_VALUE;
@@ -5656,7 +5655,7 @@
 	cds_msg_t msg = {0};
 	struct wma_lro_config_cmd_t *iwcmd;
 
-	iwcmd = cdf_mem_malloc(sizeof(*iwcmd));
+	iwcmd = qdf_mem_malloc(sizeof(*iwcmd));
 	if (!iwcmd) {
 		WMA_LOGE("memory allocation for WMA_LRO_CONFIG_CMD failed!");
 		return -ENOMEM;
@@ -5671,7 +5670,7 @@
 	if (QDF_STATUS_SUCCESS !=
 		cds_mq_post_message(QDF_MODULE_ID_WMA, &msg)) {
 		WMA_LOGE("Failed to post WMA_LRO_CONFIG_CMD msg!");
-		cdf_mem_free(iwcmd);
+		qdf_mem_free(iwcmd);
 		return -EAGAIN;
 	}
 
diff --git a/core/wma/src/wma_mgmt.c b/core/wma/src/wma_mgmt.c
index fce66cc..2573e67 100644
--- a/core/wma/src/wma_mgmt.c
+++ b/core/wma/src/wma_mgmt.c
@@ -49,7 +49,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"
 
@@ -117,10 +117,10 @@
 
 	if (tim_info->tim_changed) {
 		if (tim_info->tim_num_ps_pending)
-			cdf_mem_copy(&tim_ie->tim_bitmap, tim_info->tim_bitmap,
+			qdf_mem_copy(&tim_ie->tim_bitmap, tim_info->tim_bitmap,
 				     WMA_TIM_SUPPORTED_PVB_LENGTH);
 		else
-			cdf_mem_zero(&tim_ie->tim_bitmap,
+			qdf_mem_zero(&tim_ie->tim_bitmap,
 				     WMA_TIM_SUPPORTED_PVB_LENGTH);
 		/*
 		 * Currently we support fixed number of
@@ -161,7 +161,7 @@
 	bcn->seq_no++;
 
 	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);
@@ -334,14 +334,14 @@
 	switch (kickout_event->reason) {
 	case WMI_PEER_STA_KICKOUT_REASON_IBSS_DISCONNECT:
 		p_inactivity = (tpSirIbssPeerInactivityInd)
-			       cdf_mem_malloc(sizeof(tSirIbssPeerInactivityInd));
+			       qdf_mem_malloc(sizeof(tSirIbssPeerInactivityInd));
 		if (!p_inactivity) {
 			WMA_LOGE("CDF MEM Alloc Failed for tSirIbssPeerInactivity");
 			return -ENOMEM;
 		}
 
 		p_inactivity->staIdx = peer_id;
-		cdf_mem_copy(p_inactivity->peer_addr.bytes, macaddr,
+		qdf_mem_copy(p_inactivity->peer_addr.bytes, macaddr,
 			     IEEE80211_ADDR_LEN);
 		wma_send_msg(wma, WMA_IBSS_PEER_INACTIVITY_IND,
 			     (void *)p_inactivity, 0);
@@ -351,7 +351,7 @@
 #ifdef FEATURE_WLAN_TDLS
 	case WMI_PEER_STA_KICKOUT_REASON_TDLS_DISCONNECT:
 		del_sta_ctx = (tpDeleteStaContext)
-			cdf_mem_malloc(sizeof(tDeleteStaContext));
+			qdf_mem_malloc(sizeof(tDeleteStaContext));
 		if (!del_sta_ctx) {
 			WMA_LOGE("%s: mem alloc failed for tDeleteStaContext for TDLS peer: %pM",
 				__func__, macaddr);
@@ -359,8 +359,8 @@
 		}
 
 		del_sta_ctx->staId = peer_id;
-		cdf_mem_copy(del_sta_ctx->addr2, macaddr, IEEE80211_ADDR_LEN);
-		cdf_mem_copy(del_sta_ctx->bssId, wma->interfaces[vdev_id].bssid,
+		qdf_mem_copy(del_sta_ctx->addr2, macaddr, IEEE80211_ADDR_LEN);
+		qdf_mem_copy(del_sta_ctx->bssId, wma->interfaces[vdev_id].bssid,
 			     IEEE80211_ADDR_LEN);
 		del_sta_ctx->reasonCode = HAL_DEL_STA_REASON_CODE_KEEP_ALIVE;
 		wma_send_msg(wma, SIR_LIM_DELETE_STA_CONTEXT_IND,
@@ -374,7 +374,7 @@
 		    (wma->interfaces[vdev_id].sub_type == 0 ||
 		     wma->interfaces[vdev_id].sub_type ==
 		     WMI_UNIFIED_VDEV_SUBTYPE_P2P_CLIENT) &&
-		    cdf_mem_compare(wma->interfaces[vdev_id].bssid,
+		    !qdf_mem_cmp(wma->interfaces[vdev_id].bssid,
 				    macaddr, IEEE80211_ADDR_LEN)) {
 			/*
 			 * KICKOUT event is for current station-AP connection.
@@ -400,7 +400,7 @@
 		    (wma->interfaces[vdev_id].sub_type == 0 ||
 		     wma->interfaces[vdev_id].sub_type ==
 		     WMI_UNIFIED_VDEV_SUBTYPE_P2P_CLIENT) &&
-		    cdf_mem_compare(wma->interfaces[vdev_id].bssid,
+		    !qdf_mem_cmp(wma->interfaces[vdev_id].bssid,
 				    macaddr, IEEE80211_ADDR_LEN)) {
 			/*
 			 * KICKOUT event is for current station-AP connection.
@@ -429,15 +429,15 @@
 	 * default action is to send delete station context indication to LIM
 	 */
 	del_sta_ctx =
-		(tpDeleteStaContext) cdf_mem_malloc(sizeof(tDeleteStaContext));
+		(tpDeleteStaContext) qdf_mem_malloc(sizeof(tDeleteStaContext));
 	if (!del_sta_ctx) {
 		WMA_LOGE("CDF MEM Alloc Failed for tDeleteStaContext");
 		return -ENOMEM;
 	}
 
 	del_sta_ctx->staId = peer_id;
-	cdf_mem_copy(del_sta_ctx->addr2, macaddr, IEEE80211_ADDR_LEN);
-	cdf_mem_copy(del_sta_ctx->bssId, wma->interfaces[vdev_id].addr,
+	qdf_mem_copy(del_sta_ctx->addr2, macaddr, IEEE80211_ADDR_LEN);
+	qdf_mem_copy(del_sta_ctx->bssId, wma->interfaces[vdev_id].addr,
 		     IEEE80211_ADDR_LEN);
 	del_sta_ctx->reasonCode = HAL_DEL_STA_REASON_CODE_KEEP_ALIVE;
 	del_sta_ctx->rssi = kickout_event->rssi + WMA_TGT_NOISE_FLOOR_DBM;
@@ -498,7 +498,7 @@
 	}
 
 	beacon_tx_complete_ind = (tSirFirstBeaconTxCompleteInd *)
-			cdf_mem_malloc(sizeof(tSirFirstBeaconTxCompleteInd));
+			qdf_mem_malloc(sizeof(tSirFirstBeaconTxCompleteInd));
 	if (!beacon_tx_complete_ind) {
 		WMA_LOGE("%s: Failed to alloc beacon_tx_complete_ind",
 			 __func__);
@@ -727,9 +727,9 @@
 			return;
 		}
 		cmd->method = WMI_STA_KEEPALIVE_METHOD_UNSOLICITED_ARP_RESPONSE;
-		cdf_mem_copy(&arp_rsp->sender_prot_addr, hostv4addr,
+		qdf_mem_copy(&arp_rsp->sender_prot_addr, hostv4addr,
 			     SIR_IPV4_ADDR_LEN);
-		cdf_mem_copy(&arp_rsp->target_prot_addr, destv4addr,
+		qdf_mem_copy(&arp_rsp->target_prot_addr, destv4addr,
 			     SIR_IPV4_ADDR_LEN);
 		WMI_CHAR_ARRAY_TO_MAC_ADDR(destmac, &arp_rsp->dest_mac_addr);
 	} else {
@@ -857,8 +857,8 @@
 		return -EINVAL;
 	}
 
-	cdf_mem_zero(&peer_legacy_rates, sizeof(wmi_rate_set));
-	cdf_mem_zero(&peer_ht_rates, sizeof(wmi_rate_set));
+	qdf_mem_zero(&peer_legacy_rates, sizeof(wmi_rate_set));
+	qdf_mem_zero(&peer_ht_rates, sizeof(wmi_rate_set));
 
 	phymode = wma_peer_phymode(nw_type, params->staType,
 				   params->htCapable,
@@ -923,7 +923,7 @@
 		/* TODO: Do we really need this? */
 		WMA_LOGW("Peer is marked as HT capable but supported mcs rate is 0");
 		peer_ht_rates.num_rates = sizeof(temp_ni_rates);
-		cdf_mem_copy((uint8_t *) peer_ht_rates.rates, temp_ni_rates,
+		qdf_mem_copy((uint8_t *) peer_ht_rates.rates, temp_ni_rates,
 			     peer_ht_rates.num_rates);
 	}
 
@@ -1093,7 +1093,7 @@
 	WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_BYTE, num_peer_legacy_rates);
 	buf_ptr += WMI_TLV_HDR_SIZE;
 	cmd->num_peer_legacy_rates = peer_legacy_rates.num_rates;
-	cdf_mem_copy(buf_ptr, peer_legacy_rates.rates,
+	qdf_mem_copy(buf_ptr, peer_legacy_rates.rates,
 		     peer_legacy_rates.num_rates);
 
 	/* Update peer HT rate information */
@@ -1101,7 +1101,7 @@
 	WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_BYTE, num_peer_ht_rates);
 	buf_ptr += WMI_TLV_HDR_SIZE;
 	cmd->num_peer_ht_rates = peer_ht_rates.num_rates;
-	cdf_mem_copy(buf_ptr, peer_ht_rates.rates, peer_ht_rates.num_rates);
+	qdf_mem_copy(buf_ptr, peer_ht_rates.rates, peer_ht_rates.num_rates);
 
 	/* VHT Rates */
 	buf_ptr += num_peer_ht_rates;
@@ -1499,9 +1499,9 @@
 		cmd->key_txmic_len = WMA_TXMIC_LEN;
 		cmd->key_rxmic_len = WMA_RXMIC_LEN;
 
-		cdf_mem_copy(&cmd->wpi_key_rsc_counter, &rx_iv,
+		qdf_mem_copy(&cmd->wpi_key_rsc_counter, &rx_iv,
 			     WPI_IV_LEN);
-		cdf_mem_copy(&cmd->wpi_key_tsc_counter, &tx_iv,
+		qdf_mem_copy(&cmd->wpi_key_tsc_counter, &tx_iv,
 			     WPI_IV_LEN);
 		cmd->key_cipher = WMI_CIPHER_WAPI;
 		break;
@@ -1549,7 +1549,7 @@
 		}
 	}
 #else
-	cdf_mem_copy((void *)key_data,
+	qdf_mem_copy((void *)key_data,
 		     (const void *)key_params->key_data, key_params->key_len);
 #endif /* BIG_ENDIAN_HOST */
 	cmd->key_len = key_params->key_len;
@@ -1559,12 +1559,12 @@
 		iface = &wma_handle->interfaces[key_params->vdev_id];
 		if (iface) {
 			iface->key.key_length = key_params->key_len;
-			cdf_mem_copy(iface->key.key,
+			qdf_mem_copy(iface->key.key,
 				     (const void *)key_params->key_data,
 				     iface->key.key_length);
 			if ((cmd->key_ix == WMA_IGTK_KEY_INDEX_4) ||
 			    (cmd->key_ix == WMA_IGTK_KEY_INDEX_5))
-				cdf_mem_zero(iface->key.key_id[cmd->key_ix -
+				qdf_mem_zero(iface->key.key_id[cmd->key_ix -
 						    WMA_IGTK_KEY_INDEX_4].ipn,
 					     CMAC_IPN_LEN);
 		}
@@ -1614,22 +1614,22 @@
 		if (wma_handle->ibss_started > 0)
 			goto out;
 		WMA_LOGD("Caching IBSS Key");
-		cdf_mem_copy(&wma_handle->ibsskey_info, key_info,
+		qdf_mem_copy(&wma_handle->ibsskey_info, key_info,
 			     sizeof(tSetBssKeyParams));
 	}
 
-	cdf_mem_set(&key_params, sizeof(key_params), 0);
+	qdf_mem_set(&key_params, sizeof(key_params), 0);
 	key_params.vdev_id = key_info->smesessionId;
 	key_params.key_type = key_info->encType;
 	key_params.singl_tid_rc = key_info->singleTidRc;
 	key_params.unicast = false;
 	if (txrx_vdev->opmode == wlan_op_mode_sta) {
-		cdf_mem_copy(key_params.peer_mac,
+		qdf_mem_copy(key_params.peer_mac,
 			wma_handle->interfaces[key_info->smesessionId].bssid,
 			IEEE80211_ADDR_LEN);
 	} else {
 		/* vdev mac address will be passed for all other modes */
-		cdf_mem_copy(key_params.peer_mac, txrx_vdev->mac_addr.raw,
+		qdf_mem_copy(key_params.peer_mac, txrx_vdev->mac_addr.raw,
 			     IEEE80211_ADDR_LEN);
 		WMA_LOGA("BSS Key setup with vdev_mac %pM\n",
 			 txrx_vdev->mac_addr.raw);
@@ -1654,14 +1654,14 @@
 
 		key_params.key_len = key_info->key[i].keyLength;
 		if (key_info->encType == eSIR_ED_TKIP) {
-			cdf_mem_copy(key_params.key_data,
+			qdf_mem_copy(key_params.key_data,
 				     key_info->key[i].key, 16);
-			cdf_mem_copy(&key_params.key_data[16],
+			qdf_mem_copy(&key_params.key_data[16],
 				     &key_info->key[i].key[24], 8);
-			cdf_mem_copy(&key_params.key_data[24],
+			qdf_mem_copy(&key_params.key_data[24],
 				     &key_info->key[i].key[16], 8);
 		} else
-			cdf_mem_copy((void *)key_params.key_data,
+			qdf_mem_copy((void *)key_params.key_data,
 				     (const void *)key_info->key[i].key,
 				     key_info->key[i].keyLength);
 
@@ -1823,14 +1823,14 @@
 		return;
 	}
 
-	cdf_mem_set(&key_params, sizeof(key_params), 0);
+	qdf_mem_set(&key_params, sizeof(key_params), 0);
 	key_params.vdev_id = key_info->smesessionId;
 	key_params.key_type = key_info->encType;
 	key_params.singl_tid_rc = key_info->singleTidRc;
 	key_params.unicast = false;
 	ASSERT(wlan_op_mode_ibss == txrx_vdev->opmode);
 
-	cdf_mem_copy(key_params.peer_mac, peer_macaddr.bytes,
+	qdf_mem_copy(key_params.peer_mac, peer_macaddr.bytes,
 			IEEE80211_ADDR_LEN);
 
 	if (key_info->numKeys == 0 &&
@@ -1847,14 +1847,14 @@
 		key_params.key_idx = key_info->key[i].keyId;
 		key_params.key_len = key_info->key[i].keyLength;
 		if (key_info->encType == eSIR_ED_TKIP) {
-			cdf_mem_copy(key_params.key_data,
+			qdf_mem_copy(key_params.key_data,
 				     key_info->key[i].key, 16);
-			cdf_mem_copy(&key_params.key_data[16],
+			qdf_mem_copy(&key_params.key_data[16],
 				     &key_info->key[i].key[24], 8);
-			cdf_mem_copy(&key_params.key_data[24],
+			qdf_mem_copy(&key_params.key_data[24],
 				     &key_info->key[i].key[16], 8);
 		} else
-			cdf_mem_copy((void *)key_params.key_data,
+			qdf_mem_copy((void *)key_params.key_data,
 				     (const void *)key_info->key[i].key,
 				     key_info->key[i].keyLength);
 
@@ -1946,13 +1946,13 @@
 			}
 		}
 	}
-	cdf_mem_set(&key_params, sizeof(key_params), 0);
+	qdf_mem_set(&key_params, sizeof(key_params), 0);
 	key_params.vdev_id = key_info->smesessionId;
 	key_params.key_type = key_info->encType;
 	key_params.singl_tid_rc = key_info->singleTidRc;
 	key_params.unicast = true;
 	key_params.def_key_idx = key_info->defWEPIdx;
-	cdf_mem_copy((void *)key_params.peer_mac,
+	qdf_mem_copy((void *)key_params.peer_mac,
 		     (const void *)key_info->peer_macaddr.bytes,
 		     IEEE80211_ADDR_LEN);
 	for (i = 0; i < num_keys; i++) {
@@ -1960,14 +1960,14 @@
 		    !key_info->key[i].keyLength)
 			continue;
 		if (key_info->encType == eSIR_ED_TKIP) {
-			cdf_mem_copy(key_params.key_data,
+			qdf_mem_copy(key_params.key_data,
 				     key_info->key[i].key, 16);
-			cdf_mem_copy(&key_params.key_data[16],
+			qdf_mem_copy(&key_params.key_data[16],
 				     &key_info->key[i].key[24], 8);
-			cdf_mem_copy(&key_params.key_data[24],
+			qdf_mem_copy(&key_params.key_data[24],
 				     &key_info->key[i].key[16], 8);
 		} else
-			cdf_mem_copy(key_params.key_data, key_info->key[i].key,
+			qdf_mem_copy(key_params.key_data, key_info->key[i].key,
 				     key_info->key[i].keyLength);
 		if (key_info->encType == eSIR_ED_WPI) {
 			key_params.key_idx = key_info->key[i].keyId;
@@ -2172,7 +2172,7 @@
 
 	WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_BYTE, tmpl_len_aligned);
 	buf_ptr += WMI_TLV_HDR_SIZE;
-	cdf_mem_copy(buf_ptr, frm, tmpl_len);
+	qdf_mem_copy(buf_ptr, frm, tmpl_len);
 
 	ret = wmi_unified_cmd_send(wma->wmi_handle,
 				   wmi_buf, wmi_buf_len, WMI_PRB_TMPL_CMDID);
@@ -2273,7 +2273,7 @@
 
 	WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_BYTE, tmpl_len_aligned);
 	buf_ptr += WMI_TLV_HDR_SIZE;
-	cdf_mem_copy(buf_ptr, frm, tmpl_len);
+	qdf_mem_copy(buf_ptr, frm, tmpl_len);
 
 	ret = wmi_unified_cmd_send(wma->wmi_handle,
 				   wmi_buf, wmi_buf_len, WMI_BCN_TMPL_CMDID);
@@ -2420,7 +2420,7 @@
 		intf[if_id].tsfadjust = adjusted_tsf[if_id];
 
 		qdf_spin_lock_bh(&bcn->lock);
-		cdf_mem_zero(&bcn_info, sizeof(bcn_info));
+		qdf_mem_zero(&bcn_info, sizeof(bcn_info));
 		bcn_info.beacon = cdf_nbuf_data(bcn->buf);
 		bcn_info.p2pIeOffset = bcn->p2p_ie_offset;
 		bcn_info.beaconLength = bcn->len;
@@ -2490,7 +2490,7 @@
 	buf_ptr += sizeof(wmi_p2p_go_set_beacon_ie_fixed_param);
 	WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_BYTE, ie_len_aligned);
 	buf_ptr += WMI_TLV_HDR_SIZE;
-	cdf_mem_copy(buf_ptr, p2pIe, ie_len);
+	qdf_mem_copy(buf_ptr, p2pIe, ie_len);
 
 	WMA_LOGI("%s: Sending WMI_P2P_GO_SET_BEACON_IE", __func__);
 
@@ -2632,7 +2632,7 @@
 			       keepalive->destIpv4Addr,
 			       keepalive->dest_macaddr.bytes);
 
-	cdf_mem_free(keepalive);
+	qdf_mem_free(keepalive);
 }
 
 /**
@@ -2648,7 +2648,7 @@
 {
 	tSirSmeMissedBeaconInd *beacon_miss_ind;
 
-	beacon_miss_ind = (tSirSmeMissedBeaconInd *) cdf_mem_malloc
+	beacon_miss_ind = (tSirSmeMissedBeaconInd *) qdf_mem_malloc
 				  (sizeof(tSirSmeMissedBeaconInd));
 
 	if (NULL == beacon_miss_ind) {
@@ -3089,7 +3089,7 @@
 		/* Strip privacy headers (and trailer)
 		 * for a received frame
 		 */
-		cdf_mem_move(orig_hdr +
+		qdf_mem_move(orig_hdr +
 			IEEE80211_CCMP_HEADERLEN, wh,
 			sizeof(*wh));
 		cdf_nbuf_pull_head(wbuf,
@@ -3170,7 +3170,7 @@
 		return -EINVAL;
 	}
 
-	rx_pkt = cdf_mem_malloc(sizeof(*rx_pkt));
+	rx_pkt = qdf_mem_malloc(sizeof(*rx_pkt));
 	if (!rx_pkt) {
 		WMA_LOGE("Failed to allocate rx packet");
 		return -ENOMEM;
@@ -3181,7 +3181,7 @@
 		return -EINVAL;
 	}
 
-	cdf_mem_zero(rx_pkt, sizeof(*rx_pkt));
+	qdf_mem_zero(rx_pkt, sizeof(*rx_pkt));
 
 	/*
 	 * Fill in meta information needed by pe/lim
@@ -3221,7 +3221,7 @@
 	if (!wbuf) {
 		WMA_LOGE("%s: Failed to allocate wbuf for mgmt rx len(%u)",
 			    __func__, hdr->buf_len);
-		cdf_mem_free(rx_pkt);
+		qdf_mem_free(rx_pkt);
 		return -ENOMEM;
 	}
 
@@ -3259,7 +3259,7 @@
 		}
 	}
 #else
-	cdf_mem_copy(wh, param_tlvs->bufp, hdr->buf_len);
+	qdf_mem_copy(wh, param_tlvs->bufp, hdr->buf_len);
 #endif
 
 	WMA_LOGD(
diff --git a/core/wma/src/wma_ocb.c b/core/wma/src/wma_ocb.c
index def726d..3a63ca5 100644
--- a/core/wma/src/wma_ocb.c
+++ b/core/wma/src/wma_ocb.c
@@ -55,7 +55,7 @@
 	 */
 	if (status == QDF_STATUS_SUCCESS && vdev && req) {
 		if (vdev->ocb_channel_info)
-			cdf_mem_free(vdev->ocb_channel_info);
+			qdf_mem_free(vdev->ocb_channel_info);
 		vdev->ocb_channel_count =
 			req->channel_count;
 		if (req->channel_count) {
@@ -63,10 +63,10 @@
 			int buf_size = sizeof(*vdev->ocb_channel_info) *
 			    req->channel_count;
 			vdev->ocb_channel_info =
-				cdf_mem_malloc(buf_size);
+				qdf_mem_malloc(buf_size);
 			if (!vdev->ocb_channel_info)
 				return -ENOMEM;
-			cdf_mem_zero(vdev->ocb_channel_info, buf_size);
+			qdf_mem_zero(vdev->ocb_channel_info, buf_size);
 			for (i = 0; i < req->channel_count; i++) {
 				vdev->ocb_channel_info[i].chan_freq =
 					req->channels[i].chan_freq;
@@ -81,10 +81,10 @@
 	}
 
 	/* Free the configuration that was saved in wma_ocb_set_config. */
-	cdf_mem_free(wma_handle->ocb_config_req);
+	qdf_mem_free(wma_handle->ocb_config_req);
 	wma_handle->ocb_config_req = NULL;
 
-	resp = cdf_mem_malloc(sizeof(*resp));
+	resp = qdf_mem_malloc(sizeof(*resp));
 	if (!resp)
 		return -ENOMEM;
 
@@ -96,7 +96,7 @@
 	qdf_status = cds_mq_post_message(QDF_MODULE_ID_SME, &msg);
 	if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
 		WMA_LOGE(FL("Fail to post msg to SME"));
-		cdf_mem_free(resp);
+		qdf_mem_free(resp);
 		return -EINVAL;
 	}
 
@@ -121,7 +121,7 @@
 		src->dcc_ndl_chan_list_len +
 		src->dcc_ndl_active_state_list_len;
 
-	dst = cdf_mem_malloc(length);
+	dst = qdf_mem_malloc(length);
 	if (!dst)
 		return NULL;
 
@@ -131,19 +131,19 @@
 	cursor += sizeof(*dst);
 	dst->channels = cursor;
 	cursor += src->channel_count * sizeof(*dst->channels);
-	cdf_mem_copy(dst->channels, src->channels,
+	qdf_mem_copy(dst->channels, src->channels,
 		     src->channel_count * sizeof(*dst->channels));
 	dst->schedule = cursor;
 	cursor += src->schedule_size * sizeof(*dst->schedule);
-	cdf_mem_copy(dst->schedule, src->schedule,
+	qdf_mem_copy(dst->schedule, src->schedule,
 		     src->schedule_size * sizeof(*dst->schedule));
 	dst->dcc_ndl_chan_list = cursor;
 	cursor += src->dcc_ndl_chan_list_len;
-	cdf_mem_copy(dst->dcc_ndl_chan_list, src->dcc_ndl_chan_list,
+	qdf_mem_copy(dst->dcc_ndl_chan_list, src->dcc_ndl_chan_list,
 		     src->dcc_ndl_chan_list_len);
 	dst->dcc_ndl_active_state_list = cursor;
 	cursor += src->dcc_ndl_active_state_list_len;
-	cdf_mem_copy(dst->dcc_ndl_active_state_list,
+	qdf_mem_copy(dst->dcc_ndl_active_state_list,
 		     src->dcc_ndl_active_state_list,
 		     src->dcc_ndl_active_state_list_len);
 	return dst;
@@ -166,7 +166,7 @@
 	 * vdev start response message
 	 */
 	if (!wma_handle->interfaces[config_req->session_id].vdev_up) {
-		cdf_mem_zero(&req, sizeof(req));
+		qdf_mem_zero(&req, sizeof(req));
 		/* Enqueue OCB Set Schedule request message */
 		msg = wma_fill_vdev_req(wma_handle, config_req->session_id,
 					WMA_OCB_SET_CONFIG_CMD,
@@ -185,7 +185,7 @@
 			req.dot11_mode = WNI_CFG_DOT11_MODE_11A;
 
 		if (wma_handle->ocb_config_req)
-			cdf_mem_free(wma_handle->ocb_config_req);
+			qdf_mem_free(wma_handle->ocb_config_req);
 		wma_handle->ocb_config_req = copy_sir_ocb_config(config_req);
 		req.preferred_rx_streams = 2;
 		req.preferred_tx_streams = 2;
@@ -376,7 +376,7 @@
 	buf_ptr += WMI_TLV_HDR_SIZE;
 	if (config->dcc_ndl_chan_list_len) {
 		ndl_chan = (wmi_dcc_ndl_chan *)buf_ptr;
-		cdf_mem_copy(ndl_chan, config->dcc_ndl_chan_list,
+		qdf_mem_copy(ndl_chan, config->dcc_ndl_chan_list,
 			     config->dcc_ndl_chan_list_len);
 		for (i = 0; i < config->channel_count; i++)
 			WMITLV_SET_HDR(&(ndl_chan[i].tlv_header),
@@ -391,7 +391,7 @@
 	buf_ptr += WMI_TLV_HDR_SIZE;
 	if (active_state_count) {
 		ndl_active_config = (wmi_dcc_ndl_active_state_config *)buf_ptr;
-		cdf_mem_copy(ndl_active_config,
+		qdf_mem_copy(ndl_active_config,
 			config->dcc_ndl_active_state_list,
 			active_state_count * sizeof(*ndl_active_config));
 		for (i = 0; i < active_state_count; ++i)
@@ -424,7 +424,7 @@
 	 */
 	if (wma_handle->ocb_config_req != config) {
 		if (wma_handle->ocb_config_req)
-			cdf_mem_free(wma_handle->ocb_config_req);
+			qdf_mem_free(wma_handle->ocb_config_req);
 		wma_handle->ocb_config_req = copy_sir_ocb_config(config);
 	}
 
@@ -432,7 +432,7 @@
 				   WMI_OCB_SET_CONFIG_CMDID);
 	if (ret != EOK) {
 		if (wma_handle->ocb_config_req) {
-			cdf_mem_free(wma_handle->ocb_config_req);
+			qdf_mem_free(wma_handle->ocb_config_req);
 			wma_handle->ocb_config_req = NULL;
 		}
 
@@ -556,7 +556,7 @@
 	/* Add the timing advert template */
 	WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_BYTE,
 		       len_template);
-	cdf_mem_copy(buf_ptr + WMI_TLV_HDR_SIZE,
+	qdf_mem_copy(buf_ptr + WMI_TLV_HDR_SIZE,
 		     (uint8_t *)timing_advert->template_value,
 		     timing_advert->template_length);
 
@@ -641,7 +641,7 @@
 	buf_ptr = (uint8_t *)wmi_buf_data(buf);
 
 	cmd = (wmi_ocb_get_tsf_timer_cmd_fixed_param *)buf_ptr;
-	cdf_mem_zero(cmd, len);
+	qdf_mem_zero(cmd, len);
 	WMITLV_SET_HDR(&cmd->tlv_header,
 		WMITLV_TAG_STRUC_wmi_ocb_get_tsf_timer_cmd_fixed_param,
 		WMITLV_GET_STRUCT_TLVLEN(
@@ -681,7 +681,7 @@
 	fix_param = param_tlvs->fixed_param;
 
 	/* Allocate and populate the response */
-	response = cdf_mem_malloc(sizeof(*response));
+	response = qdf_mem_malloc(sizeof(*response));
 	if (response == NULL)
 		return -ENOMEM;
 	response->vdev_id = fix_param->vdev_id;
@@ -694,7 +694,7 @@
 	qdf_status = cds_mq_post_message(QDF_MODULE_ID_SME, &msg);
 	if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
 		WMA_LOGE(FL("Failed to post msg to SME"));
-		cdf_mem_free(response);
+		qdf_mem_free(response);
 		return -EINVAL;
 	}
 
@@ -737,7 +737,7 @@
 	}
 
 	buf_ptr = wmi_buf_data(buf);
-	cdf_mem_zero(buf_ptr, len);
+	qdf_mem_zero(buf_ptr, len);
 
 	/* Populate the WMI command */
 	cmd = (wmi_dcc_get_stats_cmd_fixed_param *)buf_ptr;
@@ -755,7 +755,7 @@
 	buf_ptr += WMI_TLV_HDR_SIZE;
 
 	channel_stats_array = (wmi_dcc_channel_stats_request *)buf_ptr;
-	cdf_mem_copy(channel_stats_array, get_stats_param->request_array,
+	qdf_mem_copy(channel_stats_array, get_stats_param->request_array,
 		     get_stats_param->request_array_len);
 	for (i = 0; i < cmd->num_channels; i++)
 		WMITLV_SET_HDR(&channel_stats_array[i].tlv_header,
@@ -797,7 +797,7 @@
 	fix_param = param_tlvs->fixed_param;
 
 	/* Allocate and populate the response */
-	response = cdf_mem_malloc(sizeof(*response) + fix_param->num_channels *
+	response = qdf_mem_malloc(sizeof(*response) + fix_param->num_channels *
 		sizeof(wmi_dcc_ndl_stats_per_channel));
 	if (response == NULL)
 		return -ENOMEM;
@@ -807,7 +807,7 @@
 	response->channel_stats_array_len =
 		fix_param->num_channels * sizeof(wmi_dcc_ndl_stats_per_channel);
 	response->channel_stats_array = ((void *)response) + sizeof(*response);
-	cdf_mem_copy(response->channel_stats_array,
+	qdf_mem_copy(response->channel_stats_array,
 		     param_tlvs->stats_per_channel_list,
 		     response->channel_stats_array_len);
 
@@ -817,7 +817,7 @@
 	qdf_status = cds_mq_post_message(QDF_MODULE_ID_SME, &msg);
 	if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
 		WMA_LOGE(FL("Failed to post msg to SME"));
-		cdf_mem_free(response);
+		qdf_mem_free(response);
 		return -EINVAL;
 	}
 
@@ -850,7 +850,7 @@
 	}
 
 	buf_ptr = wmi_buf_data(buf);
-	cdf_mem_zero(buf_ptr, len);
+	qdf_mem_zero(buf_ptr, len);
 
 	/* Populate the WMI command */
 	cmd = (wmi_dcc_clear_stats_cmd_fixed_param *)buf_ptr;
@@ -924,7 +924,7 @@
 	}
 
 	buf_ptr = wmi_buf_data(buf);
-	cdf_mem_zero(buf_ptr, len);
+	qdf_mem_zero(buf_ptr, len);
 
 	/* Populate the WMI command */
 	cmd = (wmi_dcc_update_ndl_cmd_fixed_param *)buf_ptr;
@@ -942,7 +942,7 @@
 	buf_ptr += WMI_TLV_HDR_SIZE;
 
 	ndl_chan_array = (wmi_dcc_ndl_chan *)buf_ptr;
-	cdf_mem_copy(ndl_chan_array, update_ndl_param->dcc_ndl_chan_list,
+	qdf_mem_copy(ndl_chan_array, update_ndl_param->dcc_ndl_chan_list,
 		     update_ndl_param->dcc_ndl_chan_list_len);
 	for (i = 0; i < cmd->num_channel; i++)
 		WMITLV_SET_HDR(&ndl_chan_array[i].tlv_header,
@@ -956,7 +956,7 @@
 	buf_ptr += WMI_TLV_HDR_SIZE;
 
 	ndl_active_state_array = (wmi_dcc_ndl_active_state_config *) buf_ptr;
-	cdf_mem_copy(ndl_active_state_array,
+	qdf_mem_copy(ndl_active_state_array,
 		     update_ndl_param->dcc_ndl_active_state_list,
 		     update_ndl_param->dcc_ndl_active_state_list_len);
 	for (i = 0; i < active_state_count; i++) {
@@ -1001,7 +1001,7 @@
 	param_tlvs = (WMI_DCC_UPDATE_NDL_RESP_EVENTID_param_tlvs *)event_buf;
 	fix_param = param_tlvs->fixed_param;
 	/* Allocate and populate the response */
-	resp = cdf_mem_malloc(sizeof(*resp));
+	resp = qdf_mem_malloc(sizeof(*resp));
 	if (!resp) {
 		WMA_LOGE(FL("Error allocating memory for the response."));
 		return -ENOMEM;
@@ -1015,7 +1015,7 @@
 	qdf_status = cds_mq_post_message(QDF_MODULE_ID_SME, &msg);
 	if (!QDF_IS_STATUS_SUCCESS(qdf_status))	{
 		WMA_LOGE(FL("Failed to post msg to SME"));
-		cdf_mem_free(resp);
+		qdf_mem_free(resp);
 		return -EINVAL;
 	}
 
@@ -1042,7 +1042,7 @@
 	param_tlvs = (WMI_DCC_STATS_EVENTID_param_tlvs *)event_buf;
 	fix_param = param_tlvs->fixed_param;
 	/* Allocate and populate the response */
-	response = cdf_mem_malloc(sizeof(*response) +
+	response = qdf_mem_malloc(sizeof(*response) +
 	    fix_param->num_channels * sizeof(wmi_dcc_ndl_stats_per_channel));
 	if (response == NULL)
 		return -ENOMEM;
@@ -1051,7 +1051,7 @@
 	response->channel_stats_array_len =
 		fix_param->num_channels * sizeof(wmi_dcc_ndl_stats_per_channel);
 	response->channel_stats_array = ((void *)response) + sizeof(*response);
-	cdf_mem_copy(response->channel_stats_array,
+	qdf_mem_copy(response->channel_stats_array,
 		     param_tlvs->stats_per_channel_list,
 		     response->channel_stats_array_len);
 
@@ -1061,7 +1061,7 @@
 	qdf_status = cds_mq_post_message(QDF_MODULE_ID_SME, &msg);
 	if (!QDF_IS_STATUS_SUCCESS(qdf_status))	{
 		WMA_LOGE(FL("Failed to post msg to SME"));
-		cdf_mem_free(response);
+		qdf_mem_free(response);
 		return -EINVAL;
 	}
 
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 =
diff --git a/core/wma/src/wma_scan_roam.c b/core/wma/src/wma_scan_roam.c
index 5558670..138d4ea 100644
--- a/core/wma/src/wma_scan_roam.c
+++ b/core/wma/src/wma_scan_roam.c
@@ -49,7 +49,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"
 
@@ -126,7 +126,7 @@
 static inline void wma_reset_p2p_scan_info(tp_wma_handle wma_handle,
 				       uint8_t vdev_id)
 {
-	cdf_mem_zero((void *)&(wma_handle->interfaces[vdev_id].p2p_scan_info),
+	qdf_mem_zero((void *)&(wma_handle->interfaces[vdev_id].p2p_scan_info),
 		     sizeof(struct p2p_scan_param));
 }
 
@@ -484,7 +484,7 @@
 		ssid = (wmi_ssid *) (buf_ptr + WMI_TLV_HDR_SIZE);
 		for (i = 0; i < scan_req->numSsid; ++i) {
 			ssid->ssid_len = scan_req->ssId[i].length;
-			cdf_mem_copy(ssid->ssid, scan_req->ssId[i].ssId,
+			qdf_mem_copy(ssid->ssid, scan_req->ssId[i].ssId,
 				     scan_req->ssId[i].length);
 			ssid++;
 		}
@@ -513,7 +513,7 @@
 	ie_len_with_pad = roundup(scan_req->uIEFieldLen, sizeof(uint32_t));
 	WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_BYTE, ie_len_with_pad);
 	if (scan_req->uIEFieldLen) {
-		cdf_mem_copy(buf_ptr + WMI_TLV_HDR_SIZE,
+		qdf_mem_copy(buf_ptr + WMI_TLV_HDR_SIZE,
 			     (uint8_t *) scan_req +
 			     (scan_req->uIEFieldOffset), scan_req->uIEFieldLen);
 	}
@@ -522,7 +522,7 @@
 	*buf_len = len;
 	return QDF_STATUS_SUCCESS;
 error:
-	cdf_mem_free(*buf);
+	qdf_mem_free(*buf);
 	*buf = NULL;
 	return qdf_status;
 }
@@ -657,7 +657,7 @@
 	if (msg_type == WMA_START_SCAN_OFFLOAD_REQ) {
 		scan_event =
 			(tSirScanOffloadEvent *)
-			cdf_mem_malloc(sizeof(tSirScanOffloadEvent));
+			qdf_mem_malloc(sizeof(tSirScanOffloadEvent));
 		if (!scan_event) {
 			WMA_LOGP("%s: Failed to allocate memory for scan rsp",
 				 __func__);
@@ -922,7 +922,7 @@
 	roam_scan_mode_fp->vdev_id = vdev_id;
 	/* Fill in scan parameters suitable for roaming scan */
 	buf_ptr += sizeof(wmi_roam_scan_mode_fixed_param);
-	cdf_mem_copy(buf_ptr, scan_cmd_fp,
+	qdf_mem_copy(buf_ptr, scan_cmd_fp,
 		     sizeof(wmi_start_scan_cmd_fixed_param));
 	/* Ensure there is no additional IEs */
 	scan_cmd_fp->ie_len = 0;
@@ -971,10 +971,10 @@
 				buf_ptr += WMI_TLV_HDR_SIZE;
 				roam_offload_ese =
 					(wmi_roam_ese_offload_tlv_param *) buf_ptr;
-				cdf_mem_copy(roam_offload_ese->krk,
+				qdf_mem_copy(roam_offload_ese->krk,
 					     roam_req->KRK,
 					     sizeof(roam_req->KRK));
-				cdf_mem_copy(roam_offload_ese->btk,
+				qdf_mem_copy(roam_offload_ese->btk,
 					     roam_req->BTK,
 					     sizeof(roam_req->BTK));
 				WMITLV_SET_HDR(&roam_offload_ese->tlv_header,
@@ -997,10 +997,10 @@
 					(wmi_roam_11r_offload_tlv_param *) buf_ptr;
 				roam_offload_11r->r0kh_id_len =
 					roam_req->R0KH_ID_Length;
-				cdf_mem_copy(roam_offload_11r->r0kh_id,
+				qdf_mem_copy(roam_offload_11r->r0kh_id,
 					     roam_req->R0KH_ID,
 					     roam_offload_11r->r0kh_id_len);
-				cdf_mem_copy(roam_offload_11r->psk_msk,
+				qdf_mem_copy(roam_offload_11r->psk_msk,
 					     roam_req->PSK_PMK,
 					     sizeof(roam_req->PSK_PMK));
 				roam_offload_11r->psk_msk_len =
@@ -1040,7 +1040,7 @@
 					WMA_LOGE("LFR3:OKC Disabled");
 				}
 
-				cdf_mem_copy(roam_offload_11i->pmk,
+				qdf_mem_copy(roam_offload_11i->pmk,
 					     roam_req->PSK_PMK,
 					     sizeof(roam_req->PSK_PMK));
 				roam_offload_11i->pmk_len = roam_req->pmk_len;
@@ -1571,7 +1571,7 @@
 				   tSirRoamOffloadScanReq *roam_req,
 				   wmi_ap_profile *ap_profile_p)
 {
-	cdf_mem_zero(ap_profile_p, sizeof(wmi_ap_profile));
+	qdf_mem_zero(ap_profile_p, sizeof(wmi_ap_profile));
 	if (roam_req == NULL) {
 		ap_profile_p->ssid.ssid_len = 0;
 		ap_profile_p->ssid.ssid[0] = 0;
@@ -1583,7 +1583,7 @@
 	} else {
 		ap_profile_p->ssid.ssid_len =
 			roam_req->ConnectedNetwork.ssId.length;
-		cdf_mem_copy(ap_profile_p->ssid.ssid,
+		qdf_mem_copy(ap_profile_p->ssid.ssid,
 			     roam_req->ConnectedNetwork.ssId.ssId,
 			     ap_profile_p->ssid.ssid_len);
 		ap_profile_p->rsn_authmode =
@@ -1629,7 +1629,7 @@
 		return;
 	}
 
-	cdf_mem_zero(scan_params, sizeof(wmi_start_scan_cmd_fixed_param));
+	qdf_mem_zero(scan_params, sizeof(wmi_start_scan_cmd_fixed_param));
 	scan_params->scan_ctrl_flags = WMI_SCAN_ADD_CCK_RATES |
 				       WMI_SCAN_ADD_OFDM_RATES |
 				       WMI_SCAN_ADD_DS_IE_IN_PROBE_REQ;
@@ -1830,7 +1830,7 @@
 	roam_ap_profile_fp->id = 0;
 	buf_ptr += sizeof(wmi_roam_ap_profile_fixed_param);
 
-	cdf_mem_copy(buf_ptr, ap_profile_p, sizeof(wmi_ap_profile));
+	qdf_mem_copy(buf_ptr, ap_profile_p, sizeof(wmi_ap_profile));
 	WMITLV_SET_HDR(buf_ptr,
 		       WMITLV_TAG_STRUC_wmi_ap_profile,
 		       WMITLV_GET_STRUCT_TLVLEN(wmi_ap_profile));
@@ -2134,7 +2134,7 @@
 		/* roam scan offload is not enabled in firmware.
 		 * Cannot initialize it in the middle of connection.
 		 */
-		cdf_mem_free(roam_req);
+		qdf_mem_free(roam_req);
 		return QDF_STATUS_E_PERM;
 	}
 	switch (roam_req->Command) {
@@ -2265,11 +2265,11 @@
 			cds_msg_t cds_msg;
 			tSirRoamOffloadScanRsp *scan_offload_rsp;
 			scan_offload_rsp =
-				cdf_mem_malloc(sizeof(*scan_offload_rsp));
+				qdf_mem_malloc(sizeof(*scan_offload_rsp));
 			if (!scan_offload_rsp) {
 				WMA_LOGE("%s: Alloc failed for scan_offload_rsp",
 					__func__);
-				cdf_mem_free(roam_req);
+				qdf_mem_free(roam_req);
 				return QDF_STATUS_E_NOMEM;
 			}
 			cds_msg.type = eWNI_SME_ROAM_SCAN_OFFLOAD_RSP;
@@ -2284,7 +2284,7 @@
 			if (QDF_STATUS_SUCCESS !=
 			    cds_mq_post_message(CDS_MQ_ID_SME,
 						(cds_msg_t *) &cds_msg)) {
-				cdf_mem_free(scan_offload_rsp);
+				qdf_mem_free(scan_offload_rsp);
 				QDF_TRACE(QDF_MODULE_ID_WMA,
 					  QDF_TRACE_LEVEL_INFO,
 					  "%s: Failed to post Scan Offload Rsp to UMAC",
@@ -2417,7 +2417,7 @@
 	default:
 		break;
 	}
-	cdf_mem_free(roam_req);
+	qdf_mem_free(roam_req);
 	return qdf_status;
 }
 
@@ -2554,7 +2554,7 @@
 		roam_synch_ind_ptr->beaconProbeRespOffset;
 	roam_synch_ind_ptr->beaconProbeRespLength =
 		synch_event->bcn_probe_rsp_len;
-	cdf_mem_copy(bcn_probersp_ptr, param_buf->bcn_probe_rsp_frame,
+	qdf_mem_copy(bcn_probersp_ptr, param_buf->bcn_probe_rsp_frame,
 		     roam_synch_ind_ptr->beaconProbeRespLength);
 	/* ReAssoc Rsp data */
 	roam_synch_ind_ptr->reassocRespOffset =
@@ -2563,7 +2563,7 @@
 	roam_synch_ind_ptr->reassocRespLength = synch_event->reassoc_rsp_len;
 	reassoc_rsp_ptr = (uint8_t *) roam_synch_ind_ptr +
 			  roam_synch_ind_ptr->reassocRespOffset;
-	cdf_mem_copy(reassoc_rsp_ptr,
+	qdf_mem_copy(reassoc_rsp_ptr,
 		     param_buf->reassoc_rsp_frame,
 		     roam_synch_ind_ptr->reassocRespLength);
 
@@ -2575,18 +2575,18 @@
 	roam_synch_ind_ptr->reassoc_req_length = synch_event->reassoc_req_len;
 	reassoc_req_ptr = (uint8_t *) roam_synch_ind_ptr +
 			  roam_synch_ind_ptr->reassoc_req_offset;
-	cdf_mem_copy(reassoc_req_ptr, param_buf->reassoc_req_frame,
+	qdf_mem_copy(reassoc_req_ptr, param_buf->reassoc_req_frame,
 		     roam_synch_ind_ptr->reassoc_req_length);
 
 	chan = (wmi_channel *) param_buf->chan;
 	roam_synch_ind_ptr->chan_freq = chan->mhz;
 	key = (wmi_key_material *) param_buf->key;
 	if (key != NULL) {
-		cdf_mem_copy(roam_synch_ind_ptr->kck, key->kck,
+		qdf_mem_copy(roam_synch_ind_ptr->kck, key->kck,
 			     SIR_KCK_KEY_LEN);
-		cdf_mem_copy(roam_synch_ind_ptr->kek, key->kek,
+		qdf_mem_copy(roam_synch_ind_ptr->kek, key->kek,
 			     SIR_KEK_KEY_LEN);
-		cdf_mem_copy(roam_synch_ind_ptr->replay_ctr,
+		qdf_mem_copy(roam_synch_ind_ptr->replay_ctr,
 			     key->replay_counter, SIR_REPLAY_CTR_LEN);
 		WMA_LOGD("%s: KCK dump", __func__);
 		QDF_TRACE_HEX_DUMP(QDF_MODULE_ID_WMA, QDF_TRACE_LEVEL_DEBUG,
@@ -2620,33 +2620,33 @@
 	tAddStaParams *add_sta_params;
 	uint8_t vdev_id;
 
-	del_bss_params = cdf_mem_malloc(sizeof(*del_bss_params));
-	del_sta_params = cdf_mem_malloc(sizeof(*del_sta_params));
-	set_link_params = cdf_mem_malloc(sizeof(*set_link_params));
-	add_sta_params = cdf_mem_malloc(sizeof(*add_sta_params));
+	del_bss_params = qdf_mem_malloc(sizeof(*del_bss_params));
+	del_sta_params = qdf_mem_malloc(sizeof(*del_sta_params));
+	set_link_params = qdf_mem_malloc(sizeof(*set_link_params));
+	add_sta_params = qdf_mem_malloc(sizeof(*add_sta_params));
 	if (!del_bss_params || !del_sta_params ||
 		!set_link_params || !add_sta_params) {
 		WMA_LOGE("%s: failed to allocate memory", __func__);
 		return;
 	}
 	vdev_id = roam_synch_ind_ptr->roamedVdevId;
-	cdf_mem_zero(del_bss_params, sizeof(*del_bss_params));
-	cdf_mem_zero(del_sta_params, sizeof(*del_sta_params));
-	cdf_mem_zero(set_link_params, sizeof(*set_link_params));
-	cdf_mem_zero(add_sta_params, sizeof(*add_sta_params));
+	qdf_mem_zero(del_bss_params, sizeof(*del_bss_params));
+	qdf_mem_zero(del_sta_params, sizeof(*del_sta_params));
+	qdf_mem_zero(set_link_params, sizeof(*set_link_params));
+	qdf_mem_zero(add_sta_params, sizeof(*add_sta_params));
 
 	del_bss_params->smesessionId = vdev_id;
 	del_sta_params->smesessionId = vdev_id;
-	cdf_mem_copy(del_bss_params->bssid, wma->interfaces[vdev_id].bssid,
+	qdf_mem_copy(del_bss_params->bssid, wma->interfaces[vdev_id].bssid,
 			IEEE80211_ADDR_LEN);
 	set_link_params->state = eSIR_LINK_PREASSOC_STATE;
-	cdf_mem_copy(set_link_params->selfMacAddr, wma->myaddr,
+	qdf_mem_copy(set_link_params->selfMacAddr, wma->myaddr,
 			IEEE80211_ADDR_LEN);
-	cdf_mem_copy(set_link_params->bssid, roam_synch_ind_ptr->bssid.bytes,
+	qdf_mem_copy(set_link_params->bssid, roam_synch_ind_ptr->bssid.bytes,
 			IEEE80211_ADDR_LEN);
 	add_sta_params->staType = STA_ENTRY_SELF;
 	add_sta_params->smesessionId = vdev_id;
-	cdf_mem_copy(&add_sta_params->bssId, &roam_synch_ind_ptr->bssid.bytes,
+	qdf_mem_copy(&add_sta_params->bssId, &roam_synch_ind_ptr->bssid.bytes,
 			IEEE80211_ADDR_LEN);
 	add_sta_params->staIdx = STA_INVALID_IDX;
 	add_sta_params->assocId = roam_synch_ind_ptr->aid;
@@ -2657,12 +2657,12 @@
 	wma_add_bss(wma, (tpAddBssParams)roam_synch_ind_ptr->add_bss_params);
 	wma_add_sta(wma, add_sta_params);
 	wma->interfaces[vdev_id].vdev_up = true;
-	cdf_mem_copy(wma->interfaces[vdev_id].bssid,
+	qdf_mem_copy(wma->interfaces[vdev_id].bssid,
 			roam_synch_ind_ptr->bssid.bytes, IEEE80211_ADDR_LEN);
-	cdf_mem_free(del_bss_params);
-	cdf_mem_free(del_sta_params);
-	cdf_mem_free(set_link_params);
-	cdf_mem_free(add_sta_params);
+	qdf_mem_free(del_bss_params);
+	qdf_mem_free(del_sta_params);
+	qdf_mem_free(set_link_params);
+	qdf_mem_free(add_sta_params);
 }
 
 /**
@@ -2716,14 +2716,14 @@
 	      synch_event->bcn_probe_rsp_len + synch_event->reassoc_rsp_len +
 	      synch_event->reassoc_req_len;
 	roam_synch_ind_ptr =
-		(roam_offload_synch_ind *) cdf_mem_malloc(len);
+		(roam_offload_synch_ind *) qdf_mem_malloc(len);
 	if (!roam_synch_ind_ptr) {
 		WMA_LOGE("%s: failed to allocate memory for roam_synch_event",
 			 __func__);
 		QDF_ASSERT(roam_synch_ind_ptr != NULL);
 		return -ENOMEM;
 	}
-	cdf_mem_zero(roam_synch_ind_ptr, len);
+	qdf_mem_zero(roam_synch_ind_ptr, len);
 	wma_fill_roam_synch_buffer(wma, roam_synch_ind_ptr, param_buf);
 
 	 /* 24 byte MAC header and 12 byte to ssid IE */
@@ -2735,8 +2735,8 @@
 		WMA_LOGE("LFR3: Invalid Beacon Length");
 		goto cleanup_label;
 	}
-	bss_desc_ptr = cdf_mem_malloc(sizeof(tSirBssDescription) + ie_len);
-	roam_synch_ind_ptr->join_rsp = cdf_mem_malloc(sizeof(tSirSmeJoinRsp));
+	bss_desc_ptr = qdf_mem_malloc(sizeof(tSirBssDescription) + ie_len);
+	roam_synch_ind_ptr->join_rsp = qdf_mem_malloc(sizeof(tSirSmeJoinRsp));
 	if ((NULL == roam_synch_ind_ptr->join_rsp) || (NULL == bss_desc_ptr)) {
 		WMA_LOGE("LFR3: mem alloc failed!");
 		QDF_ASSERT(bss_desc_ptr != NULL);
@@ -2744,8 +2744,8 @@
 		status =  -ENOMEM;
 		goto cleanup_label;
 	}
-	cdf_mem_zero(roam_synch_ind_ptr->join_rsp, sizeof(tSirSmeJoinRsp));
-	cdf_mem_zero(bss_desc_ptr, sizeof(tSirBssDescription) + ie_len);
+	qdf_mem_zero(roam_synch_ind_ptr->join_rsp, sizeof(tSirSmeJoinRsp));
+	qdf_mem_zero(bss_desc_ptr, sizeof(tSirBssDescription) + ie_len);
 	wma->pe_roam_synch_cb((tpAniSirGlobal)wma->mac_context,
 			roam_synch_ind_ptr, bss_desc_ptr);
 	wma_roam_update_vdev(wma, roam_synch_ind_ptr);
@@ -2754,11 +2754,11 @@
 	wma_process_roam_synch_complete(wma, synch_event->vdev_id);
 cleanup_label:
 	if (roam_synch_ind_ptr->join_rsp)
-		cdf_mem_free(roam_synch_ind_ptr->join_rsp);
+		qdf_mem_free(roam_synch_ind_ptr->join_rsp);
 	if (roam_synch_ind_ptr)
-		cdf_mem_free(roam_synch_ind_ptr);
+		qdf_mem_free(roam_synch_ind_ptr);
 	if (bss_desc_ptr)
-		cdf_mem_free(bss_desc_ptr);
+		qdf_mem_free(bss_desc_ptr);
 	wma->interfaces[synch_event->vdev_id].roam_synch_in_progress = false;
 
 	return 0;
@@ -2837,7 +2837,7 @@
 		tSirMacExtendedHTCapabilityInfo extHtCapInfo;
 	} uHTCapabilityInfo;
 
-	cdf_mem_set(&macQosInfoSta, sizeof(tSirMacQosInfoStation), 0);
+	qdf_mem_set(&macQosInfoSta, sizeof(tSirMacQosInfoStation), 0);
 	/* Roaming is done only for INFRA STA type.
 	 * So, ess will be one and ibss will be Zero */
 	pMac = cds_get_context(QDF_MODULE_ID_PE);
@@ -3045,10 +3045,10 @@
 
 	/* Fill the tsinfo in the format expected by firmware */
 #ifndef ANI_LITTLE_BIT_ENDIAN
-	cdf_mem_copy(((uint8_t *) &tspec_param->ts_info) + 1,
+	qdf_mem_copy(((uint8_t *) &tspec_param->ts_info) + 1,
 		     ((uint8_t *) &ptspecIE->tsinfo) + 1, 2);
 #else
-	cdf_mem_copy(((uint8_t *) &tspec_param->ts_info),
+	qdf_mem_copy(((uint8_t *) &tspec_param->ts_info),
 		     ((uint8_t *) &ptspecIE->tsinfo) + 1, 2);
 #endif /* ANI_LITTLE_BIT_ENDIAN */
 
@@ -3156,7 +3156,7 @@
 	cds_msg_t sme_msg = { 0 };
 	QDF_STATUS qdf_status;
 
-	ho_failure_ind = cdf_mem_malloc(sizeof(tSirSmeHOFailureInd));
+	ho_failure_ind = qdf_mem_malloc(sizeof(tSirSmeHOFailureInd));
 
 	if (NULL == ho_failure_ind) {
 		WMA_LOGE("%s: Memory allocation failure", __func__);
@@ -3170,7 +3170,7 @@
 	qdf_status = cds_mq_post_message(QDF_MODULE_ID_SME, &sme_msg);
 	if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
 		WMA_LOGE("Fail to post eWNI_SME_HO_FAIL_IND msg to SME");
-		cdf_mem_free(ho_failure_ind);
+		qdf_mem_free(ho_failure_ind);
 		return;
 	}
 	return;
@@ -3256,7 +3256,7 @@
 
 	peer = ol_txrx_find_peer_by_addr(pdev, intr[vdev_id].bssid, &peer_id);
 
-	cdf_mem_zero(&req, sizeof(req));
+	qdf_mem_zero(&req, sizeof(req));
 	req.vdev_id = vdev_id;
 	msg = wma_fill_vdev_req(wma, req.vdev_id, WMA_CHNL_SWITCH_REQ,
 				WMA_TARGET_REQ_TYPE_VDEV_START, params,
@@ -3441,7 +3441,7 @@
 		/* Copy ssid and it's length */
 		nlo_list[i].ssid.valid = true;
 		nlo_list[i].ssid.ssid.ssid_len = pno->aNetworks[i].ssId.length;
-		cdf_mem_copy(nlo_list[i].ssid.ssid.ssid,
+		qdf_mem_copy(nlo_list[i].ssid.ssid.ssid,
 			     pno->aNetworks[i].ssId.ssId,
 			     nlo_list[i].ssid.ssid.ssid_len);
 		WMA_LOGD("index: %d ssid: %.*s len: %d", i,
@@ -3604,7 +3604,7 @@
 
 	/* SME expects WMA to free tpSirPNOScanReq memory after
 	 * processing PNO request. */
-	cdf_mem_free(pno);
+	qdf_mem_free(pno);
 }
 
 #if defined(FEATURE_WLAN_ESE) && defined(FEATURE_WLAN_ESE_UPLOAD)
@@ -3795,7 +3795,7 @@
 
 	/* SME expects WMA to free tpSirPlmReq memory after
 	 * processing PLM request. */
-	cdf_mem_free(plm);
+	qdf_mem_free(plm);
 	plm = NULL;
 }
 #endif
@@ -3834,7 +3834,7 @@
 	WMA_LOGD("Posting PNO completion to umac");
 
 	len = sizeof(tSirPrefNetworkFoundInd);
-	nw_found_ind = (tSirPrefNetworkFoundInd *) cdf_mem_malloc(len);
+	nw_found_ind = (tSirPrefNetworkFoundInd *) qdf_mem_malloc(len);
 
 	if (NULL == nw_found_ind) {
 		WMA_LOGE("%s: Memory allocation failure", __func__);
@@ -3853,7 +3853,7 @@
 	if (status != QDF_STATUS_SUCCESS) {
 		WMA_LOGE("%s: Failed to post PNO completion match event to SME",
 			 __func__);
-		cdf_mem_free(nw_found_ind);
+		qdf_mem_free(nw_found_ind);
 	}
 }
 
@@ -4082,7 +4082,7 @@
 		WIFI_POWER_EVENT_WAKELOCK_PNO);
 	scan_event =
 		(tSirScanOffloadEvent *)
-		cdf_mem_malloc(sizeof(tSirScanOffloadEvent));
+		qdf_mem_malloc(sizeof(tSirScanOffloadEvent));
 	if (scan_event) {
 		/* Posting scan completion msg would take scan cache result
 		 * from LIM module and update in scan cache maintained in SME.*/
@@ -4090,7 +4090,7 @@
 		qdf_wake_lock_timeout_acquire(&wma->pno_wake_lock,
 				WMA_PNO_SCAN_COMPLETE_WAKE_LOCK_TIMEOUT,
 				WIFI_POWER_EVENT_WAKELOCK_PNO);
-		cdf_mem_zero(scan_event, sizeof(tSirScanOffloadEvent));
+		qdf_mem_zero(scan_event, sizeof(tSirScanOffloadEvent));
 		scan_event->reasonCode = eSIR_PNO_SCAN_SUCCESS;
 		scan_event->event = SCAN_EVENT_COMPLETED;
 		scan_event->sessionId = nlo_event->vdev_id;
@@ -4195,7 +4195,7 @@
 		return -EINVAL;
 	}
 	event = param_buf->fixed_param;
-	extscan_ind = cdf_mem_malloc(sizeof(*extscan_ind));
+	extscan_ind = qdf_mem_malloc(sizeof(*extscan_ind));
 	if (!extscan_ind) {
 		WMA_LOGE("%s: extscan memory allocation failed", __func__);
 		return -ENOMEM;
@@ -4250,14 +4250,14 @@
 	default:
 		WMA_LOGE("%s: Unknown event(%d) from target",
 			 __func__, event->status);
-		cdf_mem_free(extscan_ind);
+		qdf_mem_free(extscan_ind);
 		return -EINVAL;
 	}
 	pMac->sme.pExtScanIndCb(pMac->hHdd, event_type, extscan_ind);
 	WMA_LOGD("%s: sending event to umac for requestid %u"
 		 "with status %d", __func__,
 		 extscan_ind->request_id, extscan_ind->status);
-	cdf_mem_free(extscan_ind);
+	qdf_mem_free(extscan_ind);
 	return 0;
 }
 
@@ -4296,10 +4296,10 @@
 		return -EINVAL;
 	}
 	oprn_event = param_buf->fixed_param;
-	oprn_ind = cdf_mem_malloc(sizeof(*oprn_ind));
+	oprn_ind = qdf_mem_malloc(sizeof(*oprn_ind));
 	if (!oprn_ind) {
 		WMA_LOGE("%s: extscan memory allocation failed", __func__);
-		cdf_mem_free(oprn_ind);
+		qdf_mem_free(oprn_ind);
 		return -ENOMEM;
 	}
 
@@ -4326,14 +4326,14 @@
 	default:
 		WMA_LOGE("%s: Unknown event(%d) from target",
 			 __func__, oprn_event->event);
-		cdf_mem_free(oprn_ind);
+		qdf_mem_free(oprn_ind);
 		return -EINVAL;
 	}
 	pMac->sme.pExtScanIndCb(pMac->hHdd,
 				eSIR_EXTSCAN_SCAN_PROGRESS_EVENT_IND, oprn_ind);
 	WMA_LOGI("%s: sending scan progress event to hdd", __func__);
 exit_handler:
-	cdf_mem_free(oprn_ind);
+	qdf_mem_free(oprn_ind);
 	return 0;
 }
 
@@ -4371,7 +4371,7 @@
 		return -EINVAL;
 	}
 	event = param_buf->fixed_param;
-	tbl_usg_ind = cdf_mem_malloc(sizeof(*tbl_usg_ind));
+	tbl_usg_ind = qdf_mem_malloc(sizeof(*tbl_usg_ind));
 	if (!tbl_usg_ind) {
 		WMA_LOGE("%s: table usage allocation failed", __func__);
 		return -ENOMEM;
@@ -4383,7 +4383,7 @@
 				eSIR_EXTSCAN_SCAN_RES_AVAILABLE_IND,
 				tbl_usg_ind);
 	WMA_LOGI("%s: sending scan_res available event to hdd", __func__);
-	cdf_mem_free(tbl_usg_ind);
+	qdf_mem_free(tbl_usg_ind);
 	return 0;
 }
 
@@ -4433,7 +4433,7 @@
 		WMA_LOGE("%s: Invalid capabilities list", __func__);
 		return -EINVAL;
 	}
-	dest_capab = cdf_mem_malloc(sizeof(*dest_capab));
+	dest_capab = qdf_mem_malloc(sizeof(*dest_capab));
 	if (!dest_capab) {
 		WMA_LOGE("%s: Allocation failed for capabilities buffer",
 			 __func__);
@@ -4490,7 +4490,7 @@
 	pMac->sme.pExtScanIndCb(pMac->hHdd,
 				eSIR_EXTSCAN_GET_CAPABILITIES_IND, dest_capab);
 	WMA_LOGI("%s: sending capabilities event to hdd", __func__);
-	cdf_mem_free(dest_capab);
+	qdf_mem_free(dest_capab);
 	return 0;
 }
 
@@ -4539,7 +4539,7 @@
 		WMA_LOGE("%s: Hotlist AP's list invalid", __func__);
 		return -EINVAL;
 	}
-	dest_hotlist = cdf_mem_malloc(sizeof(*dest_hotlist) +
+	dest_hotlist = qdf_mem_malloc(sizeof(*dest_hotlist) +
 				      sizeof(*dest_ap) * numap);
 	if (!dest_hotlist) {
 		WMA_LOGE("%s: Allocation failed for hotlist buffer", __func__);
@@ -4575,7 +4575,7 @@
 		dest_ap->ieLength = src_hotlist->ie_length;
 		WMI_MAC_ADDR_TO_CHAR_ARRAY(&src_hotlist->bssid,
 					   dest_ap->bssid.bytes);
-		cdf_mem_copy(dest_ap->ssid, src_hotlist->ssid.ssid,
+		qdf_mem_copy(dest_ap->ssid, src_hotlist->ssid.ssid,
 			     src_hotlist->ssid.ssid_len);
 		dest_ap->ssid[src_hotlist->ssid.ssid_len] = '\0';
 		dest_ap++;
@@ -4585,7 +4585,7 @@
 	pMac->sme.pExtScanIndCb(pMac->hHdd,
 				eSIR_EXTSCAN_HOTLIST_MATCH_IND, dest_hotlist);
 	WMA_LOGI("%s: sending hotlist match event to hdd", __func__);
-	cdf_mem_free(dest_hotlist);
+	qdf_mem_free(dest_hotlist);
 	return 0;
 }
 
@@ -4720,10 +4720,10 @@
 	for (i = 0; i < t_cached_result->num_scan_ids; i++) {
 		WMA_LOGD("%s: num_results:%d", __func__,
 			t_scan_id_grp->num_results);
-		t_scan_id_grp->ap = cdf_mem_malloc(t_scan_id_grp->num_results *
+		t_scan_id_grp->ap = qdf_mem_malloc(t_scan_id_grp->num_results *
 						sizeof(*ap));
 		if (!t_scan_id_grp->ap) {
-			WMA_LOGD("%s: cdf_mem_malloc failed", __func__);
+			WMA_LOGD("%s: qdf_mem_malloc failed", __func__);
 			return -ENOMEM;
 		}
 
@@ -4746,7 +4746,7 @@
 			WMI_MAC_ADDR_TO_CHAR_ARRAY(&src_hotlist->bssid,
 						   ap->bssid.bytes);
 
-			cdf_mem_copy(ap->ssid, src_hotlist->ssid.ssid,
+			qdf_mem_copy(ap->ssid, src_hotlist->ssid.ssid,
 					src_hotlist->ssid.ssid_len);
 			ap->ssid[src_hotlist->ssid.ssid_len] = '\0';
 			ap++;
@@ -4814,12 +4814,12 @@
 	else
 		moredata = 0;
 
-	dest_cachelist = cdf_mem_malloc(sizeof(*dest_cachelist));
+	dest_cachelist = qdf_mem_malloc(sizeof(*dest_cachelist));
 	if (!dest_cachelist) {
-		WMA_LOGE("%s: cdf_mem_malloc failed", __func__);
+		WMA_LOGE("%s: qdf_mem_malloc failed", __func__);
 		return -ENOMEM;
 	}
-	cdf_mem_zero(dest_cachelist, sizeof(*dest_cachelist));
+	qdf_mem_zero(dest_cachelist, sizeof(*dest_cachelist));
 	dest_cachelist->request_id = event->request_id;
 	dest_cachelist->more_data = moredata;
 
@@ -4828,10 +4828,10 @@
 	dest_cachelist->num_scan_ids = scan_ids_cnt;
 
 	buf_len = sizeof(*dest_result) * scan_ids_cnt;
-	dest_cachelist->result = cdf_mem_malloc(buf_len);
+	dest_cachelist->result = qdf_mem_malloc(buf_len);
 	if (!dest_cachelist->result) {
 		WMA_LOGE("%s: Allocation failed for scanid grouping", __func__);
-		cdf_mem_free(dest_cachelist);
+		qdf_mem_free(dest_cachelist);
 		return -ENOMEM;
 	}
 
@@ -4845,11 +4845,11 @@
 	WMA_LOGI("%s: sending cached results event", __func__);
 	dest_result = dest_cachelist->result;
 	for (i = 0; i < dest_cachelist->num_scan_ids; i++) {
-		cdf_mem_free(dest_result->ap);
+		qdf_mem_free(dest_result->ap);
 		dest_result++;
 	}
-	cdf_mem_free(dest_cachelist->result);
-	cdf_mem_free(dest_cachelist);
+	qdf_mem_free(dest_cachelist->result);
+	qdf_mem_free(dest_cachelist);
 	return 0;
 
 noresults:
@@ -4924,7 +4924,7 @@
 	} else {
 		moredata = 0;
 	}
-	dest_chglist = cdf_mem_malloc(sizeof(*dest_chglist) +
+	dest_chglist = qdf_mem_malloc(sizeof(*dest_chglist) +
 				      sizeof(*dest_ap) * numap +
 				      sizeof(int32_t) * rssi_num);
 	if (!dest_chglist) {
@@ -4954,7 +4954,7 @@
 				eSIR_EXTSCAN_SIGNIFICANT_WIFI_CHANGE_RESULTS_IND,
 				dest_chglist);
 	WMA_LOGI("%s: sending change monitor results", __func__);
-	cdf_mem_free(dest_chglist);
+	qdf_mem_free(dest_chglist);
 	return 0;
 }
 
@@ -4998,10 +4998,10 @@
 	event = param_buf->fixed_param;
 	buf_ptr = (uint8_t *)param_buf->fixed_param;
 
-	dest_match = cdf_mem_malloc(sizeof(*dest_match) +
+	dest_match = qdf_mem_malloc(sizeof(*dest_match) +
 				event->ie_length + event->anqp_length);
 	if (!dest_match) {
-		WMA_LOGE("%s: cdf_mem_malloc failed", __func__);
+		WMA_LOGE("%s: qdf_mem_malloc failed", __func__);
 		return -EINVAL;
 	}
 	dest_ap = &dest_match->ap;
@@ -5020,12 +5020,12 @@
 	dest_ap->capability = event->capability;
 	dest_ap->ieLength = event->ie_length;
 	WMI_MAC_ADDR_TO_CHAR_ARRAY(&event->bssid, dest_ap->bssid.bytes);
-	cdf_mem_copy(dest_ap->ssid, event->ssid.ssid,
+	qdf_mem_copy(dest_ap->ssid, event->ssid.ssid,
 				event->ssid.ssid_len);
 	dest_ap->ssid[event->ssid.ssid_len] = '\0';
-	cdf_mem_copy(dest_ap->ieData, buf_ptr + sizeof(*event) +
+	qdf_mem_copy(dest_ap->ieData, buf_ptr + sizeof(*event) +
 			WMI_TLV_HDR_SIZE, dest_ap->ieLength);
-	cdf_mem_copy(dest_match->anqp, buf_ptr + sizeof(*event) +
+	qdf_mem_copy(dest_match->anqp, buf_ptr + sizeof(*event) +
 			WMI_TLV_HDR_SIZE + dest_ap->ieLength,
 			dest_match->anqp_len);
 
@@ -5033,7 +5033,7 @@
 				eSIR_PASSPOINT_NETWORK_FOUND_IND,
 				dest_match);
 	WMA_LOGI("%s: sending passpoint match event to hdd", __func__);
-	cdf_mem_free(dest_match);
+	qdf_mem_free(dest_match);
 	return 0;
 }
 
@@ -5085,7 +5085,7 @@
 		return -EINVAL;
 	}
 
-	dest_hotlist = cdf_mem_malloc(sizeof(*dest_hotlist) +
+	dest_hotlist = qdf_mem_malloc(sizeof(*dest_hotlist) +
 					sizeof(*dest_ap) * numap);
 	if (!dest_hotlist) {
 		WMA_LOGE("%s: Allocation failed for hotlist buffer",
@@ -5117,7 +5117,7 @@
 		dest_ap->ieLength = src_hotlist->ie_length;
 		WMI_MAC_ADDR_TO_CHAR_ARRAY(&src_hotlist->bssid,
 					   dest_ap->bssid.bytes);
-		cdf_mem_copy(dest_ap->ssid, src_hotlist->ssid.ssid,
+		qdf_mem_copy(dest_ap->ssid, src_hotlist->ssid.ssid,
 					src_hotlist->ssid.ssid_len);
 		dest_ap->ssid[src_hotlist->ssid.ssid_len] = '\0';
 		dest_ap++;
@@ -5129,7 +5129,7 @@
 			       eSIR_EXTSCAN_HOTLIST_SSID_MATCH_IND,
 			       dest_hotlist);
 	WMA_LOGI("%s: sending hotlist ssid match event", __func__);
-	cdf_mem_free(dest_hotlist);
+	qdf_mem_free(dest_hotlist);
 	return 0;
 }
 
@@ -6190,7 +6190,7 @@
 		/* Copy ssid and it's length */
 		nlo_list[i].ssid.valid = true;
 		nlo_list[i].ssid.ssid.ssid_len = req->networks[i].ssid.length;
-		cdf_mem_copy(nlo_list[i].ssid.ssid.ssid,
+		qdf_mem_copy(nlo_list[i].ssid.ssid.ssid,
 			     req->networks[i].ssid.ssId,
 			     nlo_list[i].ssid.ssid.ssid_len);
 		WMA_LOGD("index: %d ssid: %.*s len: %d", i,
@@ -6288,7 +6288,7 @@
 			wmi_passpoint_config_cmd_fixed_param));
 		cmd->id = req->networks[i].id;
 		WMA_LOGD("%s: network id: %u", __func__, cmd->id);
-		cdf_mem_copy(cmd->realm, req->networks[i].realm,
+		qdf_mem_copy(cmd->realm, req->networks[i].realm,
 			strlen(req->networks[i].realm) + 1);
 		WMA_LOGD("%s: realm: %s", __func__, cmd->realm);
 		for (j = 0; j < PASSPOINT_ROAMING_CONSORTIUM_ID_NUM; j++) {
@@ -6297,11 +6297,11 @@
 				j, bytes[0], bytes[1], bytes[2], bytes[3],
 				bytes[4], bytes[5], bytes[6], bytes[7]);
 
-			cdf_mem_copy(&cmd->roaming_consortium_ids[j],
+			qdf_mem_copy(&cmd->roaming_consortium_ids[j],
 				&req->networks[i].roaming_consortium_ids[j],
 				PASSPOINT_ROAMING_CONSORTIUM_ID_LEN);
 		}
-		cdf_mem_copy(cmd->plmn, req->networks[i].plmn,
+		qdf_mem_copy(cmd->plmn, req->networks[i].plmn,
 				PASSPOINT_PLMN_ID_LEN);
 		WMA_LOGD("%s: plmn: %02x:%02x:%02x", __func__,
 			cmd->plmn[0], cmd->plmn[1], cmd->plmn[2]);
@@ -6463,7 +6463,7 @@
 				 WMITLV_GET_STRUCT_TLVLEN
 					(wmi_extscan_hotlist_ssid_entry));
 			entry->ssid.ssid_len = request->ssids[i].ssid.length;
-			cdf_mem_copy(entry->ssid.ssid,
+			qdf_mem_copy(entry->ssid.ssid,
 				     request->ssids[i].ssid.ssId,
 				     request->ssids[i].ssid.length);
 			entry->band = request->ssids[i].band;
@@ -6522,7 +6522,7 @@
 			       (wmi_scan_prob_req_oui_cmd_fixed_param));
 
 	oui_buf = &cmd->prob_req_oui;
-	cdf_mem_zero(oui_buf, sizeof(cmd->prob_req_oui));
+	qdf_mem_zero(oui_buf, sizeof(cmd->prob_req_oui));
 	*oui_buf = psetoui->oui[0] << 16 | psetoui->oui[1] << 8
 		   | psetoui->oui[2];
 	WMA_LOGD("%s: wma:oui received from hdd %08x", __func__,
@@ -6563,7 +6563,7 @@
 	vdev_id = wmi_event->vdev_id;
 	scan_id = wma_handle->interfaces[vdev_id].scan_info.scan_id;
 
-	scan_event = (tSirScanOffloadEvent *) cdf_mem_malloc
+	scan_event = (tSirScanOffloadEvent *) qdf_mem_malloc
 			     (sizeof(tSirScanOffloadEvent));
 	if (!scan_event) {
 		WMA_LOGE("Memory allocation failed for tSirScanOffloadEvent");
@@ -6658,7 +6658,7 @@
 		wma_stop_scan(wma, &abortScan);
 	}
 
-	candidate_ind = cdf_mem_malloc(sizeof(tSirSmeCandidateFoundInd));
+	candidate_ind = qdf_mem_malloc(sizeof(tSirSmeCandidateFoundInd));
 	if (!candidate_ind) {
 		WMA_LOGE("%s: Alloc failed for tSirSmeCandidateFoundInd",
 			__func__);
@@ -6676,7 +6676,7 @@
 
 	if (QDF_STATUS_SUCCESS != cds_mq_post_message(CDS_MQ_ID_SME,
 						(cds_msg_t *) &cds_msg)) {
-		cdf_mem_free(candidate_ind);
+		qdf_mem_free(candidate_ind);
 		QDF_TRACE(QDF_MODULE_ID_WMA, QDF_TRACE_LEVEL_ERROR,
 			  FL("Failed to post candidate ind to SME"));
 	}
@@ -6862,9 +6862,9 @@
 			wmi_roam_subnet_change_config_fixed_param));
 
 	cmd->vdev_id = req->session_id;
-	cdf_mem_copy(&cmd->inet_gw_ip_v4_addr, req->ipv4_addr,
+	qdf_mem_copy(&cmd->inet_gw_ip_v4_addr, req->ipv4_addr,
 		QDF_IPV4_ADDR_SIZE);
-	cdf_mem_copy(&cmd->inet_gw_ip_v6_addr, req->ipv6_addr,
+	qdf_mem_copy(&cmd->inet_gw_ip_v6_addr, req->ipv6_addr,
 		QDF_IPV6_ADDR_SIZE);
 	WMI_CHAR_ARRAY_TO_MAC_ADDR(req->gw_mac_addr.bytes,
 		&cmd->inet_gw_mac_addr);
diff --git a/core/wma/src/wma_utils.c b/core/wma/src/wma_utils.c
index 907b50b..6f6af9b 100644
--- a/core/wma/src/wma_utils.c
+++ b/core/wma/src/wma_utils.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"
 
@@ -356,7 +356,7 @@
 	alloc_len = sizeof(tSirStatsExtEvent);
 	alloc_len += stats_ext_info->data_len;
 
-	stats_ext_event = (tSirStatsExtEvent *) cdf_mem_malloc(alloc_len);
+	stats_ext_event = (tSirStatsExtEvent *) qdf_mem_malloc(alloc_len);
 	if (NULL == stats_ext_event) {
 		WMA_LOGE("%s: Memory allocation failure", __func__);
 		return -ENOMEM;
@@ -366,7 +366,7 @@
 
 	stats_ext_event->vdev_id = stats_ext_info->vdev_id;
 	stats_ext_event->event_data_len = stats_ext_info->data_len;
-	cdf_mem_copy(stats_ext_event->event_data,
+	qdf_mem_copy(stats_ext_event->event_data,
 		     buf_ptr, stats_ext_event->event_data_len);
 
 	cds_msg.type = eWNI_SME_STATS_EXT_EVENT;
@@ -376,7 +376,7 @@
 	status = cds_mq_post_message(CDS_MQ_ID_SME, &cds_msg);
 	if (status != QDF_STATUS_SUCCESS) {
 		WMA_LOGE("%s: Failed to post stats ext event to SME", __func__);
-		cdf_mem_free(stats_ext_event);
+		qdf_mem_free(stats_ext_event);
 		return -EFAULT;
 	}
 
@@ -535,7 +535,7 @@
 		(fixed_param->num_peers * peer_info_size) +
 		(num_rates * rate_stats_size);
 
-	link_stats_results = cdf_mem_malloc(link_stats_results_size);
+	link_stats_results = qdf_mem_malloc(link_stats_results_size);
 	if (NULL == link_stats_results) {
 		WMA_LOGD("%s: could not allocate mem for stats results-len %zu",
 			 __func__, link_stats_results_size);
@@ -548,7 +548,7 @@
 		 fixed_param->request_id, fixed_param->num_peers,
 		 fixed_param->peer_event_number, fixed_param->more_data);
 
-	cdf_mem_zero(link_stats_results, link_stats_results_size);
+	qdf_mem_zero(link_stats_results, link_stats_results_size);
 
 	link_stats_results->paramId = WMI_LINK_STATS_ALL_PEER;
 	link_stats_results->rspId = fixed_param->request_id;
@@ -557,7 +557,7 @@
 	link_stats_results->peer_event_number = fixed_param->peer_event_number;
 	link_stats_results->moreResultToFollow = fixed_param->more_data;
 
-	cdf_mem_copy(link_stats_results->results,
+	qdf_mem_copy(link_stats_results->results,
 		     &fixed_param->num_peers, peer_stats_size);
 
 	results = (uint8_t *) link_stats_results->results;
@@ -572,7 +572,7 @@
 			 peer_stats->peer_type, peer_stats->capabilities,
 			 peer_stats->num_rates);
 
-		cdf_mem_copy(results + next_res_offset,
+		qdf_mem_copy(results + next_res_offset,
 			     t_peer_stats + next_peer_offset, peer_info_size);
 		next_res_offset += peer_info_size;
 
@@ -588,7 +588,7 @@
 				 rate_stats->retries_long);
 			rate_stats++;
 
-			cdf_mem_copy(results + next_res_offset,
+			qdf_mem_copy(results + next_res_offset,
 				     t_rate_stats + next_rate_offset,
 				     rate_stats_size);
 			next_res_offset += rate_stats_size;
@@ -606,7 +606,7 @@
 					     WMA_LINK_LAYER_STATS_RESULTS_RSP,
 					     link_stats_results);
 	WMA_LOGD("%s: Peer Stats event posted to HDD", __func__);
-	cdf_mem_free(link_stats_results);
+	qdf_mem_free(link_stats_results);
 
 	return 0;
 }
@@ -674,7 +674,7 @@
 	link_stats_results_size = sizeof(*link_stats_results) +
 				  radio_stats_size + (radio_stats->num_channels * chan_stats_size);
 
-	link_stats_results = cdf_mem_malloc(link_stats_results_size);
+	link_stats_results = qdf_mem_malloc(link_stats_results_size);
 	if (NULL == link_stats_results) {
 		WMA_LOGD("%s: could not allocate mem for stats results-len %zu",
 			 __func__, link_stats_results_size);
@@ -699,7 +699,7 @@
 		 radio_stats->on_time_pno_scan,
 		 radio_stats->on_time_hs20, radio_stats->num_channels);
 
-	cdf_mem_zero(link_stats_results, link_stats_results_size);
+	qdf_mem_zero(link_stats_results, link_stats_results_size);
 
 	link_stats_results->paramId = WMI_LINK_STATS_RADIO;
 	link_stats_results->rspId = fixed_param->request_id;
@@ -712,7 +712,7 @@
 	t_radio_stats = (uint8_t *) radio_stats;
 	t_channel_stats = (uint8_t *) channel_stats;
 
-	cdf_mem_copy(results, t_radio_stats + WMI_TLV_HDR_SIZE,
+	qdf_mem_copy(results, t_radio_stats + WMI_TLV_HDR_SIZE,
 		     radio_stats_size);
 
 	next_res_offset = radio_stats_size;
@@ -729,7 +729,7 @@
 			 channel_stats->cca_busy_time);
 		channel_stats++;
 
-		cdf_mem_copy(results + next_res_offset,
+		qdf_mem_copy(results + next_res_offset,
 			     t_channel_stats + next_chan_offset,
 			     chan_stats_size);
 		next_res_offset += chan_stats_size;
@@ -744,7 +744,7 @@
 					     WMA_LINK_LAYER_STATS_RESULTS_RSP,
 					     link_stats_results);
 	WMA_LOGD("%s: Radio Stats event posted to HDD", __func__);
-	cdf_mem_free(link_stats_results);
+	qdf_mem_free(link_stats_results);
 
 	return 0;
 }
@@ -807,7 +807,7 @@
 	}
 
 	buf_ptr = (uint8_t *) wmi_buf_data(buf);
-	cdf_mem_zero(buf_ptr, len);
+	qdf_mem_zero(buf_ptr, len);
 	cmd = (wmi_clear_link_stats_cmd_fixed_param *) buf_ptr;
 
 	WMITLV_SET_HDR(&cmd->tlv_header,
@@ -871,7 +871,7 @@
 	}
 
 	buf_ptr = (uint8_t *) wmi_buf_data(buf);
-	cdf_mem_zero(buf_ptr, len);
+	qdf_mem_zero(buf_ptr, len);
 	cmd = (wmi_start_link_stats_cmd_fixed_param *) buf_ptr;
 
 	WMITLV_SET_HDR(&cmd->tlv_header,
@@ -929,7 +929,7 @@
 	}
 
 	buf_ptr = (uint8_t *) wmi_buf_data(buf);
-	cdf_mem_zero(buf_ptr, len);
+	qdf_mem_zero(buf_ptr, len);
 	cmd = (wmi_request_link_stats_cmd_fixed_param *) buf_ptr;
 
 	WMITLV_SET_HDR(&cmd->tlv_header,
@@ -1024,7 +1024,7 @@
 	ac_stats_size = sizeof(tSirWifiWmmAcStat);
 	link_stats_results_size = sizeof(*link_stats_results) + link_stats_size;
 
-	link_stats_results = cdf_mem_malloc(link_stats_results_size);
+	link_stats_results = qdf_mem_malloc(link_stats_results_size);
 	if (!link_stats_results) {
 		WMA_LOGD("%s: could not allocate mem for stats results-len %zu",
 			 __func__, link_stats_results_size);
@@ -1057,7 +1057,7 @@
 		 link_stats->avg_rx_frms_leaked,
 		 link_stats->rx_leak_window);
 
-	cdf_mem_zero(link_stats_results, link_stats_results_size);
+	qdf_mem_zero(link_stats_results, link_stats_results_size);
 
 	link_stats_results->paramId = WMI_LINK_STATS_IFACE;
 	link_stats_results->rspId = fixed_param->request_id;
@@ -1074,10 +1074,10 @@
 	roaming_offset = offsetof(tSirWifiInterfaceInfo, roaming);
 	roaming_size = member_size(tSirWifiInterfaceInfo, roaming);
 
-	cdf_mem_copy(results + roaming_offset, &link_stats->roam_state,
+	qdf_mem_copy(results + roaming_offset, &link_stats->roam_state,
 		     roaming_size);
 
-	cdf_mem_copy(results + iface_info_size,
+	qdf_mem_copy(results + iface_info_size,
 		     t_link_stats + WMI_TLV_HDR_SIZE,
 		     link_stats_size - iface_info_size -
 		     WIFI_AC_MAX * ac_stats_size);
@@ -1103,7 +1103,7 @@
 			 ac_stats->contention_num_samples);
 		ac_stats++;
 
-		cdf_mem_copy(results + next_res_offset,
+		qdf_mem_copy(results + next_res_offset,
 			     t_ac_stats + next_ac_offset, ac_stats_size);
 		next_res_offset += ac_stats_size;
 		next_ac_offset += sizeof(*ac_stats);
@@ -1117,7 +1117,7 @@
 					     WMA_LINK_LAYER_STATS_RESULTS_RSP,
 					     link_stats_results);
 	WMA_LOGD("%s: Iface Stats event posted to HDD", __func__);
-	cdf_mem_free(link_stats_results);
+	qdf_mem_free(link_stats_results);
 
 	return 0;
 }
@@ -1250,7 +1250,7 @@
 						pGetRssiReq->pDevContext);
 		}
 
-		cdf_mem_free(pGetRssiReq);
+		qdf_mem_free(pGetRssiReq);
 		wma->pGetRssiReq = NULL;
 	}
 
@@ -1271,7 +1271,7 @@
 		qdf_status = cds_mq_post_message(QDF_MODULE_ID_SME, &sme_msg);
 		if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
 			WMA_LOGE("%s: Fail to post snr ind msg", __func__);
-			cdf_mem_free(p_snr_req);
+			qdf_mem_free(p_snr_req);
 		}
 
 		node->psnr_req = NULL;
@@ -1389,7 +1389,7 @@
 	qdf_status = cds_mq_post_message(QDF_MODULE_ID_SME, &sme_msg);
 	if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
 		WMA_LOGE("%s: Fail to post link status ind msg", __func__);
-		cdf_mem_free(pGetLinkStatus);
+		qdf_mem_free(pGetLinkStatus);
 	}
 }
 
@@ -1527,7 +1527,7 @@
 	QDF_STATUS qdf_status = QDF_STATUS_SUCCESS;
 	cds_msg_t sme_msg = { 0 };
 	tSirLinkSpeedInfo *ls_ind =
-		(tSirLinkSpeedInfo *) cdf_mem_malloc(sizeof(tSirLinkSpeedInfo));
+		(tSirLinkSpeedInfo *) qdf_mem_malloc(sizeof(tSirLinkSpeedInfo));
 	if (!ls_ind) {
 		WMA_LOGE("%s: Memory allocation failed.", __func__);
 		qdf_status = QDF_STATUS_E_NOMEM;
@@ -1541,7 +1541,7 @@
 		if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
 			WMA_LOGE("%s: Fail to post linkspeed ind  msg",
 				 __func__);
-			cdf_mem_free(ls_ind);
+			qdf_mem_free(ls_ind);
 		}
 	}
 	return qdf_status;
@@ -1832,7 +1832,7 @@
 		WMA_LOGE("%s:Invalid vdev handle", __func__);
 		return -EINVAL;
 	}
-	cdf_mem_zero(&req, sizeof(req));
+	qdf_mem_zero(&req, sizeof(req));
 	req.stats_type_reset_mask = value;
 	ol_txrx_fw_stats_get(vdev, &req, false);
 
@@ -1867,7 +1867,7 @@
 		WMA_LOGE("%s:Invalid vdev handle", __func__);
 		return -EINVAL;
 	}
-	cdf_mem_zero(&req, sizeof(req));
+	qdf_mem_zero(&req, sizeof(req));
 	req.print.verbose = 1;
 
 	switch (value) {
@@ -2035,14 +2035,14 @@
 		temp_mask >>= 1;
 	}
 
-	stats_rsp_params = (tAniGetPEStatsRsp *) cdf_mem_malloc(len);
+	stats_rsp_params = (tAniGetPEStatsRsp *) qdf_mem_malloc(len);
 	if (!stats_rsp_params) {
 		WMA_LOGE("memory allocation failed for tAniGetPEStatsRsp");
 		QDF_ASSERT(0);
 		return NULL;
 	}
 
-	cdf_mem_zero(stats_rsp_params, len);
+	qdf_mem_zero(stats_rsp_params, len);
 	stats_rsp_params->staId = get_stats_param->staId;
 	stats_rsp_params->statsMask = get_stats_param->statsMask;
 	stats_rsp_params->msgType = WMA_GET_STATISTICS_RSP;
@@ -2081,7 +2081,7 @@
 				 get_stats_param->statsMask);
 			goto end;
 		} else {
-			cdf_mem_free(node->stats_rsp);
+			qdf_mem_free(node->stats_rsp);
 			node->stats_rsp = NULL;
 			node->fw_stats_set = 0;
 		}
@@ -2128,7 +2128,7 @@
 	wma_send_msg(wma_handle, WMA_GET_STATISTICS_RSP, pGetPEStatsRspParams,
 		     0);
 end:
-	cdf_mem_free(get_stats_param);
+	qdf_mem_free(get_stats_param);
 	WMA_LOGD("%s: Exit", __func__);
 	return;
 }
@@ -2173,7 +2173,7 @@
 	qdf_spin_lock_bh(&beacon->lock);
 
 	buf_size = cdf_nbuf_len(beacon->buf);
-	buf = cdf_mem_malloc(buf_size);
+	buf = qdf_mem_malloc(buf_size);
 
 	if (!buf) {
 		qdf_spin_unlock_bh(&beacon->lock);
@@ -2181,7 +2181,7 @@
 		return NULL;
 	}
 
-	cdf_mem_copy(buf, cdf_nbuf_data(beacon->buf), buf_size);
+	qdf_mem_copy(buf, cdf_nbuf_data(beacon->buf), buf_size);
 
 	qdf_spin_unlock_bh(&beacon->lock);
 
@@ -2276,7 +2276,7 @@
 		 * The first 4 bytes holds the payload size
 		 * and the actual payload sits next to it
 		 */
-		*payload = (uint8_t *) cdf_mem_malloc((uint32_t) payload_len
+		*payload = (uint8_t *) qdf_mem_malloc((uint32_t) payload_len
 						      + sizeof(A_UINT32));
 		*(A_UINT32 *) &(*payload[0]) =
 			wma_handle->utf_event_info.length;
@@ -2317,7 +2317,7 @@
 
 	if (status != QDF_STATUS_SUCCESS) {
 		WMA_LOGE("failed to post ftm response to SYS");
-		cdf_mem_free(payload);
+		qdf_mem_free(payload);
 	}
 }
 
@@ -2399,7 +2399,7 @@
 void wma_utf_detach(tp_wma_handle wma_handle)
 {
 	if (wma_handle->utf_event_info.data) {
-		cdf_mem_free(wma_handle->utf_event_info.data);
+		qdf_mem_free(wma_handle->utf_event_info.data);
 		wma_handle->utf_event_info.data = NULL;
 		wma_handle->utf_event_info.length = 0;
 		wmi_unified_unregister_event_handler(wma_handle->wmi_handle,
@@ -2418,7 +2418,7 @@
 	int ret;
 
 	wma_handle->utf_event_info.data = (unsigned char *)
-					  cdf_mem_malloc(MAX_UTF_EVENT_LENGTH);
+					  qdf_mem_malloc(MAX_UTF_EVENT_LENGTH);
 	wma_handle->utf_event_info.length = 0;
 
 	ret = wmi_unified_register_event_handler(wma_handle->wmi_handle,
@@ -2552,8 +2552,8 @@
 
 	if (cds_get_conparam() != QDF_GLOBAL_FTM_MODE) {
 		WMA_LOGE("FTM command issued in non-FTM mode");
-		cdf_mem_free(msg_buffer->data);
-		cdf_mem_free(msg_buffer);
+		qdf_mem_free(msg_buffer->data);
+		qdf_mem_free(msg_buffer);
 		return QDF_STATUS_E_NOSUPPORT;
 	}
 
@@ -2562,8 +2562,8 @@
 
 	ret = wma_utf_cmd(wma_handle, data, len);
 
-	cdf_mem_free(msg_buffer->data);
-	cdf_mem_free(msg_buffer);
+	qdf_mem_free(msg_buffer->data);
+	qdf_mem_free(msg_buffer);
 
 	if (ret)
 		return QDF_STATUS_E_FAILURE;
diff --git a/core/wma/src/wma_utils_ut.c b/core/wma/src/wma_utils_ut.c
index 845a39b..45db586 100644
--- a/core/wma/src/wma_utils_ut.c
+++ b/core/wma/src/wma_utils_ut.c
@@ -62,7 +62,7 @@
 	if (wma->hw_mode.hw_mode_list == NULL) {
 		wma->num_dbs_hw_modes = 1;
 		wma->hw_mode.hw_mode_list =
-			cdf_mem_malloc(sizeof(*wma->hw_mode.hw_mode_list) *
+			qdf_mem_malloc(sizeof(*wma->hw_mode.hw_mode_list) *
 					wma->num_dbs_hw_modes);
 		if (!wma->hw_mode.hw_mode_list) {
 			WMA_LOGE("%s: Memory allocation failed for UT-DBS",
diff --git a/core/wmi/wmi_tlv_platform.c b/core/wmi/wmi_tlv_platform.c
index 3351b01..5e0795c 100644
--- a/core/wmi/wmi_tlv_platform.c
+++ b/core/wmi/wmi_tlv_platform.c
@@ -30,7 +30,7 @@
  */
 
 #include "ol_if_athvar.h"
-#include <cdf_memory.h>         /* cdf_mem_malloc,free, etc. */
+#include <qdf_mem.h>         /* qdf_mem_malloc,free, etc. */
 #include <osdep.h>
 #include "htc_api.h"
 #include "wmi.h"
@@ -54,5 +54,5 @@
 	{ \
 		(ptr) = os_malloc(NULL, (numBytes), GFP_ATOMIC); \
 	}
-#define wmi_tlv_os_mem_free   cdf_mem_free
+#define wmi_tlv_os_mem_free   qdf_mem_free
 #endif
diff --git a/core/wmi/wmi_unified.c b/core/wmi/wmi_unified.c
index e80a029..b081a5d 100644
--- a/core/wmi/wmi_unified.c
+++ b/core/wmi/wmi_unified.c
@@ -68,7 +68,7 @@
 		if (WMI_EVENT_DEBUG_MAX_ENTRY <= g_wmi_command_buf_idx)		\
 			g_wmi_command_buf_idx = 0;				\
 		wmi_command_log_buffer[g_wmi_command_buf_idx].command = a;	\
-		cdf_mem_copy(wmi_command_log_buffer[g_wmi_command_buf_idx].data, b, 16); \
+		qdf_mem_copy(wmi_command_log_buffer[g_wmi_command_buf_idx].data, b, 16); \
 		wmi_command_log_buffer[g_wmi_command_buf_idx].time =		\
 			qdf_get_log_timestamp();					\
 		g_wmi_command_buf_idx++;					\
@@ -78,7 +78,7 @@
 		if (WMI_EVENT_DEBUG_MAX_ENTRY <= g_wmi_command_tx_cmp_buf_idx)	\
 			g_wmi_command_tx_cmp_buf_idx = 0;			\
 		wmi_command_tx_cmp_log_buffer[g_wmi_command_tx_cmp_buf_idx].command = a; \
-		cdf_mem_copy(wmi_command_tx_cmp_log_buffer			\
+		qdf_mem_copy(wmi_command_tx_cmp_log_buffer			\
 			     [g_wmi_command_tx_cmp_buf_idx].data, b, 16);	     \
 		wmi_command_tx_cmp_log_buffer[g_wmi_command_tx_cmp_buf_idx].time = \
 			qdf_get_log_timestamp();					\
@@ -89,7 +89,7 @@
 		if (WMI_EVENT_DEBUG_MAX_ENTRY <= g_wmi_event_buf_idx)		\
 			g_wmi_event_buf_idx = 0;				\
 		wmi_event_log_buffer[g_wmi_event_buf_idx].event = a;		\
-		cdf_mem_copy(wmi_event_log_buffer[g_wmi_event_buf_idx].data, b, 16); \
+		qdf_mem_copy(wmi_event_log_buffer[g_wmi_event_buf_idx].data, b, 16); \
 		wmi_event_log_buffer[g_wmi_event_buf_idx].time =		\
 			qdf_get_log_timestamp();					\
 		g_wmi_event_buf_idx++;						\
@@ -99,7 +99,7 @@
 		if (WMI_EVENT_DEBUG_MAX_ENTRY <= g_wmi_rx_event_buf_idx)	\
 			g_wmi_rx_event_buf_idx = 0;					\
 		wmi_rx_event_log_buffer[g_wmi_rx_event_buf_idx].event = a;	\
-		cdf_mem_copy(wmi_rx_event_log_buffer[g_wmi_rx_event_buf_idx].data, b, 16); \
+		qdf_mem_copy(wmi_rx_event_log_buffer[g_wmi_rx_event_buf_idx].data, b, 16); \
 		wmi_rx_event_log_buffer[g_wmi_rx_event_buf_idx].time =		\
 			qdf_get_log_timestamp();					\
 		g_wmi_rx_event_buf_idx++;					\
@@ -126,7 +126,7 @@
 		g_wmi_mgmt_command_buf_idx)				     \
 		g_wmi_mgmt_command_buf_idx = 0;				     \
 	wmi_mgmt_command_log_buffer[g_wmi_mgmt_command_buf_idx].command = a; \
-	cdf_mem_copy(							     \
+	qdf_mem_copy(							     \
 		wmi_mgmt_command_log_buffer[g_wmi_mgmt_command_buf_idx].data,\
 		b, 16);							     \
 	wmi_mgmt_command_log_buffer[g_wmi_mgmt_command_buf_idx].time =	     \
@@ -140,7 +140,7 @@
 		g_wmi_mgmt_command_tx_cmp_buf_idx = 0;			     \
 	wmi_mgmt_command_tx_cmp_log_buffer[g_wmi_mgmt_command_tx_cmp_buf_idx].\
 								command = a; \
-	cdf_mem_copy(wmi_mgmt_command_tx_cmp_log_buffer			     \
+	qdf_mem_copy(wmi_mgmt_command_tx_cmp_log_buffer			     \
 		     [g_wmi_mgmt_command_tx_cmp_buf_idx].data, b, 16);	     \
 	wmi_mgmt_command_tx_cmp_log_buffer[g_wmi_mgmt_command_tx_cmp_buf_idx].\
 									time =\
@@ -152,7 +152,7 @@
 	if (WMI_MGMT_EVENT_DEBUG_MAX_ENTRY <= g_wmi_mgmt_event_buf_idx)       \
 		g_wmi_mgmt_event_buf_idx = 0;				      \
 	wmi_mgmt_event_log_buffer[g_wmi_mgmt_event_buf_idx].event = a;	      \
-	cdf_mem_copy(wmi_mgmt_event_log_buffer[g_wmi_mgmt_event_buf_idx].data,\
+	qdf_mem_copy(wmi_mgmt_event_log_buffer[g_wmi_mgmt_event_buf_idx].data,\
 		     b, 16);						      \
 	wmi_mgmt_event_log_buffer[g_wmi_mgmt_event_buf_idx].time =	      \
 		qdf_get_log_timestamp();				      \
@@ -844,7 +844,7 @@
 		return -EBUSY;
 	}
 
-	pkt = cdf_mem_malloc(sizeof(*pkt));
+	pkt = qdf_mem_malloc(sizeof(*pkt));
 	if (!pkt) {
 		qdf_atomic_dec(&wmi_handle->pending_cmds);
 		pr_err("%s, Failed to alloc htc packet %x, no memory\n",
@@ -1312,7 +1312,7 @@
 	qdf_spin_unlock_bh(&wmi_handle->wmi_record_lock);
 #endif
 	cdf_nbuf_free(wmi_cmd_buf);
-	cdf_mem_free(htc_pkt);
+	qdf_mem_free(htc_pkt);
 	qdf_atomic_dec(&wmi_handle->pending_cmds);
 }