diff --git a/wmi_tlv_platform.c b/wmi_tlv_platform.c
index 3a24a97..22e0bef 100644
--- a/wmi_tlv_platform.c
+++ b/wmi_tlv_platform.c
@@ -34,7 +34,6 @@
 #include <osdep.h>
 #include "htc_api.h"
 #include "wmi.h"
-#include "wma.h"
 
 
 /* Following macro definitions use OS or platform specific functions */
diff --git a/wmi_unified_tlv.c b/wmi_unified_tlv.c
index 43d60f3..10864c4 100644
--- a/wmi_unified_tlv.c
+++ b/wmi_unified_tlv.c
@@ -28,8 +28,8 @@
 #include "wmi_unified_tlv.h"
 #include "wmi_unified_api.h"
 #include "wmi.h"
+#include "wmi_version.h"
 #include "wmi_unified_priv.h"
-#include "wma.h"
 #include "wmi_version_whitelist.h"
 
 /**
@@ -78,7 +78,7 @@
 			(num_bands * sizeof(wmi_vdev_txrx_streams)));
 	buf_ptr += WMI_TLV_HDR_SIZE;
 
-	WMA_LOGD("%s: type %d, subtype %d, nss_2g %d, nss_5g %d", __func__,
+	WMI_LOGD("%s: type %d, subtype %d, nss_2g %d, nss_5g %d", __func__,
 			param->type, param->subtype,
 			param->nss_2g, param->nss_5g);
 	txrx_streams = (wmi_vdev_txrx_streams *)buf_ptr;
@@ -1601,7 +1601,6 @@
 	wmi_mgmt_tx_send_cmd_fixed_param *cmd;
 	int32_t cmd_len;
 	uint64_t dma_addr;
-	struct wmi_desc_t *wmi_desc = NULL;
 	void *qdf_ctx = param->qdf_ctx;
 	uint8_t *bufp;
 	int32_t bufp_len = (param->frm_len < mgmt_tx_dl_frm_len) ? param->frm_len :
@@ -1625,16 +1624,7 @@
 
 	cmd->vdev_id = param->vdev_id;
 
-	wmi_desc = param->wmi_desc;
-	if (!wmi_desc) {
-		WMI_LOGE("%s: Failed to get wmi_desc", __func__);
-		goto err1;
-	}
-	wmi_desc->nbuf = param->tx_frame;
-	wmi_desc->tx_cmpl_cb = param->tx_complete_cb;
-	wmi_desc->ota_post_proc_cb = param->tx_ota_post_proc_cb;
-
-	cmd->desc_id = wmi_desc->desc_id;
+	cmd->desc_id = param->desc_id;
 	cmd->chanfreq = param->chanfreq;
 	bufp += sizeof(wmi_mgmt_tx_send_cmd_fixed_param);
 	WMITLV_SET_HDR(bufp, WMITLV_TAG_ARRAY_BYTE, roundup(bufp_len,
@@ -3229,12 +3219,6 @@
 
 	WMI_LOGD("%s: Enter", __func__);
 
-	if (params->timeperiod > WNI_CFG_INFRA_STA_KEEP_ALIVE_PERIOD_STAMAX) {
-		WMI_LOGE("Invalid period %d Max limit %d", params->timeperiod,
-			WNI_CFG_INFRA_STA_KEEP_ALIVE_PERIOD_STAMAX);
-		return QDF_STATUS_E_FAILURE;
-	}
-
 	len = sizeof(*cmd) + sizeof(*arp_rsp);
 	buf = wmi_buf_alloc(wmi_handle, len);
 	if (!buf) {
@@ -5103,7 +5087,7 @@
 	cmd->base_period = pstart->basePeriod;
 	cmd->num_buckets = nbuckets;
 	cmd->configuration_flags = 0;
-	if (pstart->configuration_flags & EXTSCAN_LP_EXTENDED_BATCHING)
+	if (pstart->configuration_flags & WMI_EXTSCAN_LP_EXTENDED_BATCHING)
 		cmd->configuration_flags |= WMI_EXTSCAN_EXTENDED_BATCHING_EN;
 	WMI_LOGI("%s: configuration_flags: 0x%x", __func__,
 			cmd->configuration_flags);
@@ -7345,7 +7329,7 @@
 				       (wmi_vdev_wmm_addts_cmd_fixed_param));
 			cmd->vdev_id = aggr_qos_rsp_msg->sessionId;
 			cmd->ac =
-				TID_TO_WME_AC(aggr_qos_rsp_msg->tspec[i].tsinfo.
+				WMI_TID_TO_AC(aggr_qos_rsp_msg->tspec[i].tsinfo.
 					      traffic.userPrio);
 			cmd->medium_time_us =
 				aggr_qos_rsp_msg->tspec[i].mediumTime * 32;
@@ -7586,8 +7570,7 @@
 	}
 	WMI_LOGD("Action:%d; vdev_id:%d; clearList:%d",
 		 cmd->action, vdev_id, clearList);
-	WMI_LOGD("MCBC MAC Addr: "MAC_ADDRESS_STR,
-		 MAC_ADDR_ARRAY(multicast_addr.bytes));
+	WMI_LOGD("MCBC MAC Addr: %pM", multicast_addr.bytes);
 
 	return 0;
 }
@@ -8669,7 +8652,7 @@
 {
 	wmi_get_fw_mem_dump_fixed_param *cmd;
 	wmi_fw_mem_dump *dump_params;
-	struct fw_dump_seg_req *seg_req;
+	struct wmi_fw_dump_seg_req *seg_req;
 	int32_t len;
 	wmi_buf_t buf;
 	u_int8_t *buf_ptr;
@@ -8712,7 +8695,7 @@
 	WMI_LOGI(FL("request_id:%d num_seg:%d"),
 		    mem_dump_req->request_id, mem_dump_req->num_seg);
 	for (loop = 0; loop < cmd->num_fw_mem_dump_segs; loop++) {
-		seg_req = (struct fw_dump_seg_req *)
+		seg_req = (struct wmi_fw_dump_seg_req *)
 			  ((uint8_t *)(mem_dump_req->segment) +
 			    loop * sizeof(*seg_req));
 		WMITLV_SET_HDR(&dump_params->tlv_header,
@@ -9326,7 +9309,7 @@
 
 	cmd_args = (uint32_t *) (buf_ptr + WMI_TLV_HDR_SIZE);
 
-	if (start_log->verbose_level >= LOG_LEVEL_ACTIVE)
+	if (start_log->verbose_level >= WMI_LOG_LEVEL_ACTIVE)
 		log_level = 1;
 	else
 		log_level = 0;
@@ -9652,7 +9635,7 @@
 
 		/* Fill data only for NS offload in the first ARP tuple for LA */
 		if (!arp_only &&
-		    ((param->enableOrDisable & SIR_OFFLOAD_ENABLE))) {
+		    ((param->enableOrDisable & WMI_OFFLOAD_ENABLE))) {
 			ns_tuple->flags |= WMI_NSOFF_FLAGS_VALID;
 
 #ifdef WLAN_NS_OFFLOAD
@@ -9697,13 +9680,13 @@
 			       WMITLV_GET_STRUCT_TLVLEN(WMI_ARP_OFFLOAD_TUPLE));
 
 		/* Fill data for ARP and NS in the first tupple for LA */
-		if ((wmi_handle->arp_info.enableOrDisable & SIR_OFFLOAD_ENABLE)
+		if ((wmi_handle->arp_info.enableOrDisable & WMI_OFFLOAD_ENABLE)
 		    && (i == 0)) {
 			/*Copy the target ip addr and flags */
 			arp_tuple->flags = WMI_ARPOFF_FLAGS_VALID;
 			A_MEMCPY(&arp_tuple->target_ipaddr,
 				 wmi_handle->arp_info.params.hostIpv4Addr,
-				 SIR_IPV4_ADDR_LEN);
+				 WMI_IPV4_ADDR_LEN);
 			WMI_LOGD("ARPOffload IP4 address: %pI4",
 				 wmi_handle->arp_info.params.hostIpv4Addr);
 		}
@@ -9724,7 +9707,8 @@
 
 			/* Fill data only for NS offload in the first ARP tuple for LA */
 			if (!arp_only  &&
-				((param->enableOrDisable & SIR_OFFLOAD_ENABLE))) {
+				((param->enableOrDisable &
+					WMI_OFFLOAD_ENABLE))) {
 				ns_tuple->flags |= WMI_NSOFF_FLAGS_VALID;
 #ifdef WLAN_NS_OFFLOAD
 				/*Copy the target/solicitation/remote ip addr */
@@ -10226,7 +10210,7 @@
 			       (wmi_roam_chan_list_fixed_param));
 	chan_list_fp->vdev_id = vdev_id;
 	chan_list_fp->num_chan = chan_count;
-	if (chan_count > 0 && list_type == CHANNEL_LIST_STATIC) {
+	if (chan_count > 0 && list_type == WMI_CHANNEL_LIST_STATIC) {
 		/* external app is controlling channel list */
 		chan_list_fp->chan_list_type =
 			WMI_ROAM_SCAN_CHAN_LIST_TYPE_STATIC;
