Browse Source

qcacld-3.0: Add QDF utils

Replace CDF utils with QDF utils.

Change-Id: Ib6b3ad56b3268b1be438f3204f91d995f8bb3900
CRs-Fixed: 981188
Anurag Chouhan 9 years ago
parent
commit
c554842327
79 changed files with 429 additions and 893 deletions
  1. 1 1
      core/bmi/src/ol_fw.c
  2. 3 3
      core/cdf/inc/cdf_nbuf.h
  3. 0 355
      core/cdf/inc/cdf_util.h
  4. 1 1
      core/cdf/inc/osdep.h
  5. 7 7
      core/cdf/src/cdf_nbuf.c
  6. 2 2
      core/cdf/src/i_cdf_nbuf.h
  7. 0 110
      core/cdf/src/i_cdf_util.h
  8. 4 4
      core/cds/src/cds_concurrency.c
  9. 6 6
      core/dp/htt/htt_internal.h
  10. 14 14
      core/dp/htt/htt_rx.c
  11. 6 6
      core/dp/htt/htt_t2h.c
  12. 3 3
      core/dp/htt/htt_tx.c
  13. 4 4
      core/dp/ol/inc/ol_htt_tx_api.h
  14. 1 1
      core/dp/ol/inc/ol_txrx_ctrl_api.h
  15. 1 1
      core/dp/ol/inc/ol_txrx_htt_api.h
  16. 5 5
      core/dp/txrx/ol_rx.c
  17. 12 12
      core/dp/txrx/ol_rx_defrag.c
  18. 1 1
      core/dp/txrx/ol_rx_defrag.h
  19. 1 1
      core/dp/txrx/ol_rx_pn.c
  20. 3 3
      core/dp/txrx/ol_rx_reorder.c
  21. 16 16
      core/dp/txrx/ol_tx.c
  22. 10 10
      core/dp/txrx/ol_tx_desc.c
  23. 2 2
      core/dp/txrx/ol_tx_queue.c
  24. 12 12
      core/dp/txrx/ol_tx_send.c
  25. 15 15
      core/dp/txrx/ol_txrx.c
  26. 1 1
      core/dp/txrx/ol_txrx.h
  27. 3 3
      core/dp/txrx/ol_txrx_flow_control.c
  28. 5 5
      core/dp/txrx/ol_txrx_internal.h
  29. 1 1
      core/dp/txrx/ol_txrx_peer_find.c
  30. 11 11
      core/hdd/src/wlan_hdd_assoc.c
  31. 1 1
      core/hdd/src/wlan_hdd_cfg.c
  32. 10 10
      core/hdd/src/wlan_hdd_cfg80211.c
  33. 2 2
      core/hdd/src/wlan_hdd_debugfs.c
  34. 2 2
      core/hdd/src/wlan_hdd_driver_ops.c
  35. 1 1
      core/hdd/src/wlan_hdd_ftm.c
  36. 11 11
      core/hdd/src/wlan_hdd_hostapd.c
  37. 4 4
      core/hdd/src/wlan_hdd_ioctl.c
  38. 4 4
      core/hdd/src/wlan_hdd_main.c
  39. 4 4
      core/hdd/src/wlan_hdd_ocb.c
  40. 1 1
      core/hdd/src/wlan_hdd_oemdata.c
  41. 2 2
      core/hdd/src/wlan_hdd_power.c
  42. 1 1
      core/hdd/src/wlan_hdd_scan.c
  43. 4 4
      core/hdd/src/wlan_hdd_softap_tx_rx.c
  44. 2 2
      core/hdd/src/wlan_hdd_stats.c
  45. 3 3
      core/hdd/src/wlan_hdd_tx_rx.c
  46. 7 7
      core/hdd/src/wlan_hdd_wext.c
  47. 1 1
      core/hdd/src/wlan_hdd_wmm.c
  48. 1 1
      core/hdd/src/wlan_hdd_wowl.c
  49. 1 1
      core/mac/src/pe/lim/lim_assoc_utils.c
  50. 2 2
      core/mac/src/pe/lim/lim_ft.c
  51. 2 2
      core/mac/src/pe/lim/lim_p2p.c
  52. 8 8
      core/mac/src/pe/lim/lim_process_mlm_req_messages.c
  53. 2 2
      core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c
  54. 3 3
      core/mac/src/pe/lim/lim_process_probe_req_frame.c
  55. 8 8
      core/mac/src/pe/lim/lim_process_sme_req_messages.c
  56. 2 2
      core/mac/src/pe/lim/lim_process_tdls.c
  57. 9 8
      core/mac/src/pe/lim/lim_security_utils.c
  58. 1 1
      core/mac/src/pe/lim/lim_send_management_frames.c
  59. 2 2
      core/mac/src/pe/lim/lim_send_sme_rsp_messages.c
  60. 8 8
      core/mac/src/pe/lim/lim_sme_req_utils.c
  61. 1 1
      core/mac/src/pe/rrm/rrm_api.c
  62. 1 1
      core/sap/dfs/inc/dfs.h
  63. 6 6
      core/sap/src/sap_fsm.c
  64. 2 2
      core/sap/src/sap_module.c
  65. 15 15
      core/sme/src/common/sme_api.c
  66. 1 1
      core/sme/src/common/sme_ft_api.c
  67. 3 3
      core/sme/src/common/sme_power_save.c
  68. 53 53
      core/sme/src/csr/csr_api_roam.c
  69. 14 14
      core/sme/src/csr/csr_api_scan.c
  70. 7 7
      core/sme/src/csr/csr_neighbor_roam.c
  71. 9 9
      core/sme/src/csr/csr_tdls_process.c
  72. 8 8
      core/sme/src/csr/csr_util.c
  73. 2 2
      core/sme/src/oem_data/oem_data_api.c
  74. 1 1
      core/sme/src/p2p/p2p_api.c
  75. 9 9
      core/utils/pktlog/pktlog_internal.c
  76. 3 3
      core/wma/src/wma_data.c
  77. 8 8
      core/wma/src/wma_dev_if.c
  78. 2 2
      core/wma/src/wma_main.c
  79. 24 24
      target/inc/htt_isoc.h

+ 1 - 1
core/bmi/src/ol_fw.c

@@ -1428,7 +1428,7 @@ static int ol_ath_get_reg_table(uint32_t target_version,
 	int section_len = 0;
 
 	if (!reg_table) {
-		cdf_assert(0);
+		qdf_assert(0);
 		return section_len;
 	}
 

+ 3 - 3
core/cdf/inc/cdf_nbuf.h

@@ -32,7 +32,7 @@
 
 #ifndef _CDF_NBUF_H
 #define _CDF_NBUF_H
-#include <cdf_util.h>
+#include <qdf_util.h>
 #include <qdf_types.h>
 #include <qdf_net_types.h>
 #include <qdf_lock.h>
@@ -347,7 +347,7 @@ cdf_nbuf_alloc_debug(qdf_device_t osdev, qdf_size_t size, int reserve,
 	net_buf = __cdf_nbuf_alloc(osdev, size, reserve, align, prio);
 
 	/* Store SKB in internal CDF tracking table */
-	if (cdf_likely(net_buf))
+	if (qdf_likely(net_buf))
 		cdf_net_buf_debug_add_node(net_buf, size, file_name, line_num);
 
 	return net_buf;
@@ -362,7 +362,7 @@ cdf_nbuf_alloc_debug(qdf_device_t osdev, qdf_size_t size, int reserve,
 static inline void cdf_nbuf_free(cdf_nbuf_t net_buf)
 {
 	/* Remove SKB from internal CDF tracking table */
-	if (cdf_likely(net_buf))
+	if (qdf_likely(net_buf))
 		cdf_net_buf_debug_delete_node(net_buf);
 
 	__cdf_nbuf_free(net_buf);

+ 0 - 355
core/cdf/inc/cdf_util.h

@@ -1,355 +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.
- */
-
-/**
- * DOC: cdf_util.h
- *
- * This file defines utility functions.
- */
-
-#ifndef _CDF_UTIL_H
-#define _CDF_UTIL_H
-
-#include <i_cdf_util.h>
-
-/**
- * cdf_unlikely - Compiler-dependent macro denoting code likely to execute
- * @_expr: expression to be checked
- */
-#define cdf_unlikely(_expr)     __cdf_unlikely(_expr)
-
-/**
- * cdf_likely - Compiler-dependent macro denoting code unlikely to execute
- * @_expr: expression to be checked
- */
-#define cdf_likely(_expr)       __cdf_likely(_expr)
-
-static inline int cdf_status_to_os_return(QDF_STATUS status)
-{
-	return __cdf_status_to_os_return(status);
-}
-
-/**
- * cdf_assert - assert "expr" evaluates to false
- * @expr: assert expression
- */
-#ifdef CDF_OS_DEBUG
-#define cdf_assert(expr)         __cdf_assert(expr)
-#else
-#define cdf_assert(expr)
-#endif /* CDF_OS_DEBUG */
-
-/**
- * @cdf_assert_always- alway assert "expr" evaluates to false
- * @expr: assert expression
- */
-#define cdf_assert_always(expr)  __cdf_assert(expr)
-
-/**
- * cdf_os_cpu_to_le64 - Convert a 64-bit value from CPU byte order to
- *			little-endian byte order
- * @x: value to be converted
- */
-#define cdf_os_cpu_to_le64(x)                   __cdf_os_cpu_to_le64(x)
-
-/**
- * cdf_le16_to_cpu - Convert a 16-bit value from little-endian byte order
- *			to CPU byte order
- * @x: value to be converted
- */
-#define cdf_le16_to_cpu(x)                   __cdf_le16_to_cpu(x)
-
-/**
- * cdf_le32_to_cpu - Convert a 32-bit value from little-endian byte order to
- *			CPU byte order
- * @x: value to be converted
- */
-#define cdf_le32_to_cpu(x)                   __cdf_le32_to_cpu(x)
-
-/**
- * cdf_in_interrupt - returns true if in interrupt context
- */
-#define cdf_in_interrupt          in_interrupt
-
-/**
- * cdf_container_of - cast a member of a structure out to the containing
- *                    structure
- * @ptr:        the pointer to the member.
- * @type:       the type of the container struct this is embedded in.
- * @member:     the name of the member within the struct.
- *
- */
-#define cdf_container_of(ptr, type, member) \
-	 __cdf_container_of(ptr, type, member)
-
-/**
- * cdf_is_pwr2 - test input value is power of 2 integer
- *
- * @value: input integer
- *
- */
-#define CDF_IS_PWR2(value) (((value) ^ ((value)-1)) == ((value) << 1) - 1)
-
-/**
- * cdf_is_macaddr_equal() - compare two CDF MacAddress
- * @pMacAddr1: Pointer to one cdf MacAddress to compare
- * @pMacAddr2: Pointer to the other cdf MacAddress to compare
- *
- * This function returns a bool that tells if a two CDF MacAddress'
- * are equivalent.
- *
- * Return: true if the MacAddress's are equal
- *	not true if the MacAddress's are not equal
- */
-static inline bool cdf_is_macaddr_equal(struct qdf_mac_addr *pMacAddr1,
-					struct qdf_mac_addr *pMacAddr2)
-{
-	return 0 == memcmp(pMacAddr1, pMacAddr2, QDF_MAC_ADDR_SIZE);
-}
-
-/**
- * cdf_is_macaddr_zero() - check for a MacAddress of all zeros.
- * @pMacAddr - pointer to the struct qdf_mac_addr to check.
- *
- * This function returns a bool that tells if a MacAddress is made up of
- * all zeros.
- *
- *
- * Return:  true if the MacAddress is all Zeros
- *	false if the MacAddress is not all Zeros.
- *
- */
-static inline bool cdf_is_macaddr_zero(struct qdf_mac_addr *pMacAddr)
-{
-	struct qdf_mac_addr zeroMacAddr = QDF_MAC_ADDR_ZERO_INITIALIZER;
-
-	return cdf_is_macaddr_equal(pMacAddr, &zeroMacAddr);
-}
-
-/**
- * cdf_zero_macaddr() - zero out a MacAddress
- * @pMacAddr: pointer to the struct qdf_mac_addr to zero.
- *
- * This function zeros out a CDF MacAddress type.
- *
- * Return: nothing
- */
-static inline void cdf_zero_macaddr(struct qdf_mac_addr *pMacAddr)
-{
-	memset(pMacAddr, 0, QDF_MAC_ADDR_SIZE);
-}
-
-/**
- * cdf_is_macaddr_group() - check for a MacAddress is a 'group' address
- * @pMacAddr1: pointer to the cdf MacAddress to check
- *
- * This function returns a bool that tells if a the input CDF MacAddress
- * is a "group" address.  Group addresses have the 'group address bit' turned
- * on in the MacAddress.  Group addresses are made up of Broadcast and
- * Multicast addresses.
- *
- * Return:  true if the input MacAddress is a Group address
- *	false if the input MacAddress is not a Group address
- */
-static inline bool cdf_is_macaddr_group(struct qdf_mac_addr *pMacAddr)
-{
-	return pMacAddr->bytes[0] & 0x01;
-}
-
-/**
- * cdf_is_macaddr_broadcast() - check for a MacAddress is a broadcast address
- *
- * This function returns a bool that tells if a the input CDF MacAddress
- * is a "broadcast" address.
- *
- * @pMacAddr: Pointer to the cdf MacAddress to check
- *
- * Return:  true if the input MacAddress is a broadcast address
- *	false if the input MacAddress is not a broadcast address
- */
-static inline bool cdf_is_macaddr_broadcast(struct qdf_mac_addr *pMacAddr)
-{
-	struct qdf_mac_addr broadcastMacAddr =
-					QDF_MAC_ADDR_BROADCAST_INITIALIZER;
-
-	return cdf_is_macaddr_equal(pMacAddr, &broadcastMacAddr);
-}
-
-/**
- * cdf_copy_macaddr() - copy a CDF MacAddress
- * @pDst - pointer to the cdf MacAddress to copy TO (the destination)
- * @pSrc - pointer to the cdf MacAddress to copy FROM (the source)
- *
- * This function copies a CDF MacAddress into another CDF MacAddress.
- *
- *
- * Return: nothing
- */
-static inline void cdf_copy_macaddr(struct qdf_mac_addr *pDst,
-				    struct qdf_mac_addr *pSrc)
-{
-	*pDst = *pSrc;
-}
-
-/**
- * cdf_set_macaddr_broadcast() - set a CDF MacAddress to the 'broadcast'
- * @pMacAddr: pointer to the cdf MacAddress to set to broadcast
- *
- * This function sets a CDF MacAddress to the 'broadcast' MacAddress. Broadcast
- * MacAddress contains all 0xFF bytes.
- *
- * Return: nothing
- */
-static inline void cdf_set_macaddr_broadcast(struct qdf_mac_addr *pMacAddr)
-{
-	memset(pMacAddr, 0xff, QDF_MAC_ADDR_SIZE);
-}
-
-#if defined(ANI_LITTLE_BYTE_ENDIAN)
-
-/**
- * i_cdf_htonl() - convert from host byte order to network byte order
- * @ul: input to be converted
- *
- * Return: converted network byte order
- */
-static inline unsigned long i_cdf_htonl(unsigned long ul)
-{
-	return ((ul & 0x000000ff) << 24) |
-		((ul & 0x0000ff00) << 8) |
-		((ul & 0x00ff0000) >> 8) | ((ul & 0xff000000) >> 24);
-}
-
-/**
- * i_cdf_ntohl() - convert network byte order to host byte order
- * @ul: input to be converted
- *
- * Return: converted host byte order
- */
-static inline unsigned long i_cdf_ntohl(unsigned long ul)
-{
-	return i_cdf_htonl(ul);
-}
-
-#endif
-
-/**
- * cdf_set_u16() - Assign 16-bit unsigned value to a byte array base on CPU's
- *			endianness.
- * @ptr: Starting address of a byte array
- * @value: The value to assign to the byte array
- *
- * Caller must validate the byte array has enough space to hold the vlaue
- *
- * Return: The address to the byte after the assignment. This may or may not
- *	be valid. Caller to verify.
- */
-static inline uint8_t *cdf_set_u16(uint8_t *ptr, uint16_t value)
-{
-#if defined(ANI_BIG_BYTE_ENDIAN)
-	*(ptr) = (uint8_t) (value >> 8);
-	*(ptr + 1) = (uint8_t) (value);
-#else
-	*(ptr + 1) = (uint8_t) (value >> 8);
-	*(ptr) = (uint8_t) (value);
-#endif
-
-	return ptr + 2;
-}
-
-/**
- * cdf_get_u16() - Retrieve a 16-bit unsigned value from a byte array base on
- *			CPU's endianness.
- * @ptr: Starting address of a byte array
- * @pValue: Pointer to a caller allocated buffer for 16 bit value. Value is to
- *		assign to this location.
- *
- * Caller must validate the byte array has enough space to hold the vlaue
- *
- * Return: The address to the byte after the assignment. This may or may not
- *	be valid. Caller to verify.
- */
-static inline uint8_t *cdf_get_u16(uint8_t *ptr, uint16_t *pValue)
-{
-#if defined(ANI_BIG_BYTE_ENDIAN)
-	*pValue = (((uint16_t) (*ptr << 8)) | ((uint16_t) (*(ptr + 1))));
-#else
-	*pValue = (((uint16_t) (*(ptr + 1) << 8)) | ((uint16_t) (*ptr)));
-#endif
-
-	return ptr + 2;
-}
-
-/**
- * cdf_get_u32() - retrieve a 32-bit unsigned value from a byte array base on
- *			CPU's endianness.
- * @ptr: Starting address of a byte array
- * @pValue: Pointer to a caller allocated buffer for 32 bit value. Value is to
- *		assign to this location.
- *
- * Caller must validate the byte array has enough space to hold the vlaue
- *
- * Return: The address to the byte after the assignment. This may or may not
- *		be valid. Caller to verify.
- */
-static inline uint8_t *cdf_get_u32(uint8_t *ptr, uint32_t *pValue)
-{
-#if defined(ANI_BIG_BYTE_ENDIAN)
-	*pValue = ((uint32_t) (*(ptr) << 24) |
-		   (uint32_t) (*(ptr + 1) << 16) |
-		   (uint32_t) (*(ptr + 2) << 8) | (uint32_t) (*(ptr + 3)));
-#else
-	*pValue = ((uint32_t) (*(ptr + 3) << 24) |
-		   (uint32_t) (*(ptr + 2) << 16) |
-		   (uint32_t) (*(ptr + 1) << 8) | (uint32_t) (*(ptr)));
-#endif
-	return ptr + 4;
-}
-
-/**
- * cdf_get_pwr2() - get next power of 2 integer from input value
- * @value: input value to find next power of 2 integer
- *
- * Get next power of 2 integer from input value
- *
- * Return: Power of 2 integer
- */
-static inline int cdf_get_pwr2(int value)
-{
-	int log2;
-	if (CDF_IS_PWR2(value))
-		return value;
-
-	log2 = 0;
-	while (value) {
-		value >>= 1;
-		log2++;
-	}
-	return 1 << log2;
-}
-
-#endif /*_CDF_UTIL_H*/

+ 1 - 1
core/cdf/inc/osdep.h

@@ -77,7 +77,7 @@ typedef struct hal_bus_context {
 
 #if ATH_DEBUG
 #ifndef ASSERT
-#define ASSERT(expr)  cdf_assert(expr)
+#define ASSERT(expr)  qdf_assert(expr)
 #endif
 #else
 #define ASSERT(expr)

+ 7 - 7
core/cdf/src/cdf_nbuf.c

@@ -238,7 +238,7 @@ __cdf_nbuf_map(qdf_device_t osdev, struct sk_buff *skb, qdf_dma_dir_t dir)
 #ifdef CDF_OS_DEBUG
 	struct skb_shared_info *sh = skb_shinfo(skb);
 #endif
-	cdf_assert((dir == QDF_DMA_TO_DEVICE)
+	qdf_assert((dir == QDF_DMA_TO_DEVICE)
 		   || (dir == QDF_DMA_FROM_DEVICE));
 
 	/*
@@ -248,7 +248,7 @@ __cdf_nbuf_map(qdf_device_t osdev, struct sk_buff *skb, qdf_dma_dir_t dir)
 	 * (including the bus address for each fragment) and a pointer
 	 * to the underlying sk_buff.
 	 */
-	cdf_assert(sh->nr_frags == 0);
+	qdf_assert(sh->nr_frags == 0);
 
 	return __cdf_nbuf_map_single(osdev, skb, dir);
 
@@ -266,10 +266,10 @@ __cdf_nbuf_map(qdf_device_t osdev, struct sk_buff *skb, qdf_dma_dir_t dir)
 void
 __cdf_nbuf_unmap(qdf_device_t osdev, struct sk_buff *skb, qdf_dma_dir_t dir)
 {
-	cdf_assert((dir == QDF_DMA_TO_DEVICE)
+	qdf_assert((dir == QDF_DMA_TO_DEVICE)
 		   || (dir == QDF_DMA_FROM_DEVICE));
 
-	cdf_assert(((dir == QDF_DMA_TO_DEVICE)
+	qdf_assert(((dir == QDF_DMA_TO_DEVICE)
 		    || (dir == QDF_DMA_FROM_DEVICE)));
 	/*
 	 * Assume there's a single fragment.
@@ -346,7 +346,7 @@ __cdf_nbuf_set_rx_cksum(struct sk_buff *skb, qdf_nbuf_rx_cksum_t *cksum)
 		break;
 	default:
 		pr_err("ADF_NET:Unknown checksum type\n");
-		cdf_assert(0);
+		qdf_assert(0);
 		return QDF_STATUS_E_NOSUPPORT;
 	}
 	return QDF_STATUS_SUCCESS;
@@ -770,7 +770,7 @@ uint8_t __cdf_nbuf_get_tso_cmn_seg_info(struct sk_buff *skb,
 		tso_info->ip_id = ntohs(ipv4_hdr->id);
 		tso_info->ipv4_csum_en = 1;
 		tso_info->tcp_ipv4_csum_en = 1;
-		if (cdf_unlikely(ipv4_hdr->protocol != IPPROTO_TCP)) {
+		if (qdf_unlikely(ipv4_hdr->protocol != IPPROTO_TCP)) {
 			qdf_print("TSO IPV4 proto 0x%x not TCP\n",
 				 ipv4_hdr->protocol);
 			return 1;
@@ -847,7 +847,7 @@ uint32_t __cdf_nbuf_get_tso_info(qdf_device_t osdev, struct sk_buff *skb,
 
 	memset(&tso_cmn_info, 0x0, sizeof(tso_cmn_info));
 
-	if (cdf_unlikely(__cdf_nbuf_get_tso_cmn_seg_info(skb, &tso_cmn_info))) {
+	if (qdf_unlikely(__cdf_nbuf_get_tso_cmn_seg_info(skb, &tso_cmn_info))) {
 		qdf_print("TSO: error getting common segment info\n");
 		return 0;
 	}

+ 2 - 2
core/cdf/src/i_cdf_nbuf.h

@@ -405,7 +405,7 @@ __cdf_nbuf_cat(struct sk_buff *dst, struct sk_buff *src)
 {
 	QDF_STATUS error = 0;
 
-	cdf_assert(dst && src);
+	qdf_assert(dst && src);
 
 	/*
 	 * Since pskb_expand_head unconditionally reallocates the skb->head
@@ -799,7 +799,7 @@ static inline void __cdf_nbuf_set_pktlen(struct sk_buff *skb, uint32_t len)
 				len - skb->len - skb_tailroom(skb),
 				GFP_ATOMIC))) {
 				dev_kfree_skb_any(skb);
-				cdf_assert(0);
+				qdf_assert(0);
 			}
 		}
 		skb_put(skb, (len - skb->len));

+ 0 - 110
core/cdf/src/i_cdf_util.h

@@ -1,110 +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.
- */
-
-#ifndef _I_CDF_UTIL_H
-#define _I_CDF_UTIL_H
-
-#include <linux/compiler.h>
-#include <linux/kernel.h>
-#include <linux/types.h>
-#include <errno.h>
-
-#include <linux/random.h>
-
-#include <qdf_types.h>
-#include <qdf_status.h>
-#include <asm/byteorder.h>
-/*
- * Generic compiler-dependent macros if defined by the OS
- */
-
-#define __cdf_unlikely(_expr)   unlikely(_expr)
-#define __cdf_likely(_expr)     likely(_expr)
-
-/**
- * cdf_status_to_os_return(): translates qdf_status types to linux return types
- * @status: status to translate
- *
- * Translates error types that linux may want to handle specially.
- *
- * return: 0 or the linux error code that most closely matches the QDF_STATUS.
- *	defaults to -1 (EPERM)
- */
-static inline int __cdf_status_to_os_return(QDF_STATUS status)
-{
-	switch (status) {
-	case QDF_STATUS_SUCCESS:
-		return 0;
-	case QDF_STATUS_E_NULL_VALUE:
-	case QDF_STATUS_E_FAULT:
-		return -EFAULT;
-	case QDF_STATUS_E_TIMEOUT:
-	case QDF_STATUS_E_BUSY:
-		return -EBUSY;
-	case QDF_STATUS_NOT_INITIALIZED:
-	case QDF_STATUS_E_AGAIN:
-		return -EAGAIN;
-	case QDF_STATUS_E_NOSUPPORT:
-		return -ENOSYS;
-	case QDF_STATUS_E_ALREADY:
-		return -EALREADY;
-	case QDF_STATUS_E_NOMEM:
-		return -ENOMEM;
-	case QDF_STATUS_E_FAILURE:
-	case QDF_STATUS_E_INVAL:
-		return -EINVAL;
-	default:
-		return -EPERM;
-	}
-}
-
-
-/**
- * @brief memory barriers.
- */
-
-#define __cdf_min(_a, _b)         ((_a) < (_b) ? _a : _b)
-#define __cdf_max(_a, _b)         ((_a) > (_b) ? _a : _b)
-
-/**
- * @brief Assert
- */
-#define __cdf_assert(expr)  do {    \
-		if (unlikely(!(expr))) {				\
-			pr_err("Assertion failed! %s:%s %s:%d\n",   \
-			       # expr, __func__, __FILE__, __LINE__);      \
-			dump_stack();					   \
-			BUG_ON(1);	   \
-		}     \
-} while (0)
-
-#define __cdf_os_cpu_to_le64                cpu_to_le64
-#define __cdf_le16_to_cpu                le16_to_cpu
-#define __cdf_le32_to_cpu                le32_to_cpu
-#define __cdf_container_of(ptr, type, member) container_of(ptr, type, member)
-
-#endif /*_I_CDF_UTIL_H*/

+ 4 - 4
core/cds/src/cds_concurrency.c

@@ -3121,7 +3121,7 @@ void cds_dump_concurrency_info(void)
 			    pHddStaCtx->conn_info.connState) {
 				staChannel =
 					pHddStaCtx->conn_info.operationChannel;
-				cdf_copy_macaddr(&staBssid,
+				qdf_copy_macaddr(&staBssid,
 						 &pHddStaCtx->conn_info.bssId);
 #ifdef QCA_LL_LEGACY_TX_FLOW_CONTROL
 				targetChannel = staChannel;
@@ -3134,7 +3134,7 @@ void cds_dump_concurrency_info(void)
 			    pHddStaCtx->conn_info.connState) {
 				p2pChannel =
 					pHddStaCtx->conn_info.operationChannel;
-				cdf_copy_macaddr(&p2pBssid,
+				qdf_copy_macaddr(&p2pBssid,
 						&pHddStaCtx->conn_info.bssId);
 				p2pMode = "CLI";
 #ifdef QCA_LL_LEGACY_TX_FLOW_CONTROL
@@ -3149,7 +3149,7 @@ void cds_dump_concurrency_info(void)
 			    && hostapd_state->qdf_status ==
 			    QDF_STATUS_SUCCESS) {
 				p2pChannel = hdd_ap_ctx->operatingChannel;
-				cdf_copy_macaddr(&p2pBssid,
+				qdf_copy_macaddr(&p2pBssid,
 						 &adapter->macAddressCurrent);
 #ifdef QCA_LL_LEGACY_TX_FLOW_CONTROL
 				targetChannel = p2pChannel;
@@ -3164,7 +3164,7 @@ void cds_dump_concurrency_info(void)
 			    && hostapd_state->qdf_status ==
 			    QDF_STATUS_SUCCESS) {
 				apChannel = hdd_ap_ctx->operatingChannel;
-				cdf_copy_macaddr(&apBssid,
+				qdf_copy_macaddr(&apBssid,
 						&adapter->macAddressCurrent);
 #ifdef QCA_LL_LEGACY_TX_FLOW_CONTROL
 				targetChannel = apChannel;

+ 6 - 6
core/dp/htt/htt_internal.h

@@ -30,7 +30,7 @@
 
 #include <athdefs.h>            /* A_STATUS */
 #include <cdf_nbuf.h>           /* cdf_nbuf_t */
-#include <cdf_util.h>           /* cdf_assert */
+#include <qdf_util.h>           /* qdf_assert */
 #include <htc_api.h>            /* HTC_PACKET */
 
 #include <htt_types.h>
@@ -286,23 +286,23 @@ static inline void htt_print_rx_desc(struct htt_host_rx_desc_base *rx_desc)
 #define HTT_ASSERT_LEVEL 3
 #endif
 
-#define HTT_ASSERT_ALWAYS(condition) cdf_assert_always((condition))
+#define HTT_ASSERT_ALWAYS(condition) qdf_assert_always((condition))
 
-#define HTT_ASSERT0(condition) cdf_assert((condition))
+#define HTT_ASSERT0(condition) qdf_assert((condition))
 #if HTT_ASSERT_LEVEL > 0
-#define HTT_ASSERT1(condition) cdf_assert((condition))
+#define HTT_ASSERT1(condition) qdf_assert((condition))
 #else
 #define HTT_ASSERT1(condition)
 #endif
 
 #if HTT_ASSERT_LEVEL > 1
-#define HTT_ASSERT2(condition) cdf_assert((condition))
+#define HTT_ASSERT2(condition) qdf_assert((condition))
 #else
 #define HTT_ASSERT2(condition)
 #endif
 
 #if HTT_ASSERT_LEVEL > 2
-#define HTT_ASSERT3(condition) cdf_assert((condition))
+#define HTT_ASSERT3(condition) qdf_assert((condition))
 #else
 #define HTT_ASSERT3(condition)
 #endif

+ 14 - 14
core/dp/htt/htt_rx.c

@@ -193,7 +193,7 @@ static int htt_rx_ring_size(struct htt_pdev_t *pdev)
 	else if (size > HTT_RX_RING_SIZE_MAX)
 		size = HTT_RX_RING_SIZE_MAX;
 
-	size = cdf_get_pwr2(size);
+	size = qdf_get_pwr2(size);
 	return size;
 }
 
@@ -290,7 +290,7 @@ void htt_rx_ring_fill_n(struct htt_pdev_t *pdev, int num)
 		}
 		paddr = cdf_nbuf_get_frag_paddr(rx_netbuf, 0);
 		if (pdev->cfg.is_full_reorder_offload) {
-			if (cdf_unlikely
+			if (qdf_unlikely
 				    (htt_rx_hash_list_insert(pdev, paddr,
 							     rx_netbuf))) {
 				qdf_print("%s: hash insert failed!\n",
@@ -812,7 +812,7 @@ htt_rx_amsdu_pop_ll(htt_pdev_handle pdev,
 
 	msg_type = HTT_T2H_MSG_TYPE_GET(*msg_word);
 
-	if (cdf_unlikely(HTT_T2H_MSG_TYPE_RX_FRAG_IND == msg_type)) {
+	if (qdf_unlikely(HTT_T2H_MSG_TYPE_RX_FRAG_IND == msg_type)) {
 		num_msdu_bytes = HTT_RX_FRAG_IND_FW_RX_DESC_BYTES_GET(
 			*(msg_word + HTT_RX_FRAG_IND_HDR_PREFIX_SIZE32));
 	} else {
@@ -867,7 +867,7 @@ htt_rx_amsdu_pop_ll(htt_pdev_handle pdev,
 		 */
 
 #ifdef DEBUG_DMA_DONE
-		if (cdf_unlikely(!((*(uint32_t *) &rx_desc->attention)
+		if (qdf_unlikely(!((*(uint32_t *) &rx_desc->attention)
 				   & RX_ATTENTION_0_MSDU_DONE_MASK))) {
 
 			int dbg_iter = MAX_DONE_BIT_CHECK_ITER;
@@ -890,7 +890,7 @@ htt_rx_amsdu_pop_ll(htt_pdev_handle pdev,
 				dbg_iter--;
 			}
 
-			if (cdf_unlikely(!((*(uint32_t *) &rx_desc->attention)
+			if (qdf_unlikely(!((*(uint32_t *) &rx_desc->attention)
 					   & RX_ATTENTION_0_MSDU_DONE_MASK))) {
 
 #ifdef HTT_RX_RESTORE
@@ -929,7 +929,7 @@ htt_rx_amsdu_pop_ll(htt_pdev_handle pdev,
 		 * upload.)
 		 */
 		if (pdev->rx_ind_msdu_byte_idx < num_msdu_bytes) {
-			if (cdf_unlikely
+			if (qdf_unlikely
 				    (HTT_T2H_MSG_TYPE_RX_FRAG_IND == msg_type))
 				byte_offset =
 					HTT_ENDIAN_BYTE_IDX_SWAP
@@ -957,7 +957,7 @@ htt_rx_amsdu_pop_ll(htt_pdev_handle pdev,
 			 * the RX_IND message format, then the following
 			 * assertion can be restored.
 			 */
-			/* cdf_assert((rx_ind_data[byte_offset] &
+			/* qdf_assert((rx_ind_data[byte_offset] &
 			   FW_RX_DESC_EXT_M) == 0); */
 			pdev->rx_ind_msdu_byte_idx += 1;
 			/* or more, if there's ext data */
@@ -1121,7 +1121,7 @@ htt_rx_offload_paddr_msdu_pop_ll(htt_pdev_handle pdev,
 	paddr = HTT_RX_IN_ORD_PADDR_IND_PADDR_GET(*curr_msdu);
 	*head_buf = *tail_buf = buf = htt_rx_in_order_netbuf_pop(pdev, paddr);
 
-	if (cdf_unlikely(NULL == buf)) {
+	if (qdf_unlikely(NULL == buf)) {
 		qdf_print("%s: netbuf pop failed!\n", __func__);
 		return 0;
 	}
@@ -1194,7 +1194,7 @@ htt_rx_amsdu_rx_in_order_pop_ll(htt_pdev_handle pdev,
 		pdev,
 		HTT_RX_IN_ORD_PADDR_IND_PADDR_GET(*msg_word));
 
-	if (cdf_unlikely(NULL == msdu)) {
+	if (qdf_unlikely(NULL == msdu)) {
 		qdf_print("%s: netbuf pop failed!\n", __func__);
 		*tail_msdu = NULL;
 		return 0;
@@ -1243,7 +1243,7 @@ htt_rx_amsdu_rx_in_order_pop_ll(htt_pdev_handle pdev,
 
 		msdu_count--;
 
-		if (cdf_unlikely((*((u_int8_t *) &rx_desc->fw_desc.u.val)) &
+		if (qdf_unlikely((*((u_int8_t *) &rx_desc->fw_desc.u.val)) &
 				    FW_RX_DESC_MIC_ERR_M)) {
 			u_int8_t tid =
 				HTT_RX_IN_ORD_PADDR_IND_EXT_TID_GET(
@@ -1273,7 +1273,7 @@ htt_rx_amsdu_rx_in_order_pop_ll(htt_pdev_handle pdev,
 					pdev,
 					HTT_RX_IN_ORD_PADDR_IND_PADDR_GET(
 						*msg_word));
-				if (cdf_unlikely(NULL == next)) {
+				if (qdf_unlikely(NULL == next)) {
 					qdf_print("%s: netbuf pop failed!\n",
 								 __func__);
 					*tail_msdu = NULL;
@@ -1305,7 +1305,7 @@ htt_rx_amsdu_rx_in_order_pop_ll(htt_pdev_handle pdev,
 			next = htt_rx_in_order_netbuf_pop(
 				pdev,
 				HTT_RX_IN_ORD_PADDR_IND_PADDR_GET(*msg_word));
-			if (cdf_unlikely(NULL == next)) {
+			if (qdf_unlikely(NULL == next)) {
 				qdf_print("%s: netbuf pop failed!\n",
 					  __func__);
 				*tail_msdu = NULL;
@@ -1960,7 +1960,7 @@ htt_rx_hash_list_insert(struct htt_pdev_t *pdev, uint32_t paddr,
 				(char *)
 				pdev->rx_ring.hash_table[i].freepool.next -
 				pdev->rx_ring.listnode_offset);
-		if (cdf_unlikely(NULL == hash_element)) {
+		if (qdf_unlikely(NULL == hash_element)) {
 			HTT_ASSERT_ALWAYS(0);
 			return 1;
 		}
@@ -1968,7 +1968,7 @@ htt_rx_hash_list_insert(struct htt_pdev_t *pdev, uint32_t paddr,
 		htt_list_remove(pdev->rx_ring.hash_table[i].freepool.next);
 	} else {
 		hash_element = cdf_mem_malloc(sizeof(struct htt_rx_hash_entry));
-		if (cdf_unlikely(NULL == hash_element)) {
+		if (qdf_unlikely(NULL == hash_element)) {
 			HTT_ASSERT_ALWAYS(0);
 			return 1;
 		}

+ 6 - 6
core/dp/htt/htt_t2h.c

@@ -155,7 +155,7 @@ void htt_t2h_lp_msg_handler(void *context, cdf_nbuf_t htt_t2h_msg)
 			qdf_print
 			      ("*** Incompatible host/target HTT versions!");
 		/* abort if the target is incompatible with the host */
-		cdf_assert(pdev->tgt_ver.major ==
+		qdf_assert(pdev->tgt_ver.major ==
 			   HTT_CURRENT_VERSION_MAJOR);
 		if (pdev->tgt_ver.minor != HTT_CURRENT_VERSION_MINOR) {
 			qdf_print("*** Warning: host/target HTT versions are ");
@@ -437,7 +437,7 @@ void htt_t2h_lp_msg_handler(void *context, cdf_nbuf_t htt_t2h_msg)
 			if (!peer) {
 				qdf_print("%s: invalid peer id %d\n",
 					 __func__, peer_id);
-				cdf_assert(0);
+				qdf_assert(0);
 				break;
 			}
 			vdev = peer->vdev;
@@ -496,7 +496,7 @@ void htt_t2h_msg_handler(void *context, HTC_PACKET *pkt)
 		return;
 	}
 #ifdef HTT_RX_RESTORE
-	if (cdf_unlikely(pdev->rx_ring.rx_reset)) {
+	if (qdf_unlikely(pdev->rx_ring.rx_reset)) {
 		qdf_print("rx restore ..\n");
 		cdf_nbuf_free(htt_t2h_msg);
 		return;
@@ -522,7 +522,7 @@ void htt_t2h_msg_handler(void *context, HTC_PACKET *pkt)
 		uint16_t peer_id;
 		uint8_t tid;
 
-		if (cdf_unlikely(pdev->cfg.is_full_reorder_offload)) {
+		if (qdf_unlikely(pdev->cfg.is_full_reorder_offload)) {
 			qdf_print("HTT_T2H_MSG_TYPE_RX_IND not supported ");
 			qdf_print("with full reorder offload\n");
 			break;
@@ -649,7 +649,7 @@ void htt_t2h_msg_handler(void *context, HTC_PACKET *pkt)
 		uint8_t tid;
 		uint8_t offload_ind, frag_ind;
 
-		if (cdf_unlikely(!pdev->cfg.is_full_reorder_offload)) {
+		if (qdf_unlikely(!pdev->cfg.is_full_reorder_offload)) {
 			qdf_print("HTT_T2H_MSG_TYPE_RX_IN_ORD_PADDR_IND not ");
 			qdf_print("supported when full reorder offload is ");
 			qdf_print("disabled in the configuration.\n");
@@ -666,7 +666,7 @@ void htt_t2h_msg_handler(void *context, HTC_PACKET *pkt)
 			  __func__, __LINE__, peer_id, tid, offload_ind,
 			  frag_ind);
 #endif
-		if (cdf_unlikely(frag_ind)) {
+		if (qdf_unlikely(frag_ind)) {
 			ol_rx_frag_indication_handler(pdev->txrx_pdev,
 						      htt_t2h_msg,
 						      peer_id, tid);

+ 3 - 3
core/dp/htt/htt_tx.c

@@ -417,7 +417,7 @@ static qdf_dma_addr_t htt_tx_get_paddr(htt_pdev_handle pdev,
 	for (i = 0; i < pdev->tx_descs.desc_pages.num_pages; i++) {
 		page_info = pdev->tx_descs.desc_pages.dma_pages + i;
 		if (!page_info->page_v_addr_start) {
-			cdf_assert(0);
+			qdf_assert(0);
 			return 0;
 		}
 		if ((target_vaddr >= page_info->page_v_addr_start) &&
@@ -647,7 +647,7 @@ cdf_nbuf_t
 htt_tx_send_batch(htt_pdev_handle pdev, cdf_nbuf_t head_msdu, int num_msdus)
 {
 	qdf_print("*** %s curently only applies for HL systems\n", __func__);
-	cdf_assert(0);
+	qdf_assert(0);
 	return head_msdu;
 
 }
@@ -670,7 +670,7 @@ htt_tx_send_nonstd(htt_pdev_handle pdev,
 		+ HTT_TX_HDR_SIZE_802_1Q
 		+ HTT_TX_HDR_SIZE_LLC_SNAP
 		+ ol_cfg_tx_download_size(pdev->ctrl_pdev);
-	cdf_assert(download_len <= pdev->download_len);
+	qdf_assert(download_len <= pdev->download_len);
 	return htt_tx_send_std(pdev, msdu, msdu_id);
 }
 

+ 4 - 4
core/dp/ol/inc/ol_htt_tx_api.h

@@ -565,8 +565,8 @@ htt_tx_desc_init(htt_pdev_handle pdev,
 
 	pkt_type = msdu_info->info.l2_hdr_type;
 
-	if (cdf_likely(pdev->cfg.ce_classify_enabled)) {
-		if (cdf_likely(pkt_type == htt_pkt_type_eth2 ||
+	if (qdf_likely(pdev->cfg.ce_classify_enabled)) {
+		if (qdf_likely(pkt_type == htt_pkt_type_eth2 ||
 			pkt_type == htt_pkt_type_ethernet))
 			cdf_nbuf_tx_info_get(msdu, pkt_type, pkt_subtype,
 				     hw_classify);
@@ -693,7 +693,7 @@ htt_tx_desc_init(htt_pdev_handle pdev,
 	 */
 	cdf_nbuf_set_frag_is_wordstream(msdu, 0, 1);
 
-	if (cdf_likely(pdev->cfg.ce_classify_enabled &&
+	if (qdf_likely(pdev->cfg.ce_classify_enabled &&
 		(msdu_info->info.l2_hdr_type != htt_pkt_type_mgmt))) {
 		uint32_t pkt_offset = cdf_nbuf_get_frag_len(msdu, 0);
 		data_attr = hw_classify << QDF_CE_TX_CLASSIFY_BIT_S;
@@ -830,7 +830,7 @@ htt_tx_desc_frag(htt_pdev_handle pdev,
 		*word32++ = 0;
 		*word32++ = 0;
 
-		cdf_assert_always(word32 == (uint32_t *)
+		qdf_assert_always(word32 == (uint32_t *)
 				&(((struct msdu_ext_desc_t *)desc)->frags[0]));
 
 		/* Each fragment consumes 2 DWORDS */

+ 1 - 1
core/dp/ol/inc/ol_txrx_ctrl_api.h

@@ -1044,7 +1044,7 @@ static inline void
 ol_tx_delay_hist(ol_txrx_pdev_handle pdev, uint16_t *bin_values, int category)
 {
 	/* no-op version if QCA_COMPUTE_TX_DELAY is not set */
-	cdf_assert(bin_values);
+	qdf_assert(bin_values);
 	cdf_mem_zero(bin_values,
 		     QCA_TX_DELAY_HIST_REPORT_BINS * sizeof(*bin_values));
 }

+ 1 - 1
core/dp/ol/inc/ol_txrx_htt_api.h

@@ -40,7 +40,7 @@
 
 static inline uint16_t *ol_tx_msdu_id_storage(cdf_nbuf_t msdu)
 {
-	cdf_assert(cdf_nbuf_headroom(msdu) >= (sizeof(uint16_t) * 2 - 1));
+	qdf_assert(cdf_nbuf_headroom(msdu) >= (sizeof(uint16_t) * 2 - 1));
 	return (uint16_t *) (((qdf_size_t) (cdf_nbuf_head(msdu) + 1)) & ~0x1);
 }
 

+ 5 - 5
core/dp/txrx/ol_rx.c

@@ -26,7 +26,7 @@
  */
 
 #include <cdf_nbuf.h>               /* cdf_nbuf_t, etc. */
-#include <cdf_util.h>               /* cdf_os_cpu_to_le64 */
+#include <qdf_util.h>               /* qdf_cpu_to_le64 */
 #include <qdf_types.h>              /* bool */
 #include <cds_ieee80211_common.h>   /* ieee80211_frame */
 
@@ -636,10 +636,10 @@ ol_rx_sec_ind_handler(ol_txrx_pdev_handle pdev,
 				     (uint8_t *) rx_pn,
 				     sizeof(union htt_rx_pn_t));
 			peer->tids_last_pn[i].pn128[1] =
-				cdf_os_cpu_to_le64(
+				qdf_cpu_to_le64(
 					peer->tids_last_pn[i].pn128[1]);
 			peer->tids_last_pn[i].pn128[0] =
-				cdf_os_cpu_to_le64(
+				qdf_cpu_to_le64(
 					peer->tids_last_pn[i].pn128[0]);
 		}
 	}
@@ -1243,7 +1243,7 @@ ol_rx_in_order_indication_handler(ol_txrx_pdev_handle pdev,
 	} else {
 		TXRX_PRINT(TXRX_PRINT_LEVEL_ERR,
 			   "%s: Invalid pdev passed!\n", __func__);
-		cdf_assert_always(pdev);
+		qdf_assert_always(pdev);
 		return;
 	}
 
@@ -1258,7 +1258,7 @@ ol_rx_in_order_indication_handler(ol_txrx_pdev_handle pdev,
 	 * corresponding rx MSDU network buffer.
 	 */
 	status = htt_rx_amsdu_pop(htt_pdev, rx_ind_msg, &head_msdu, &tail_msdu);
-	if (cdf_unlikely(0 == status)) {
+	if (qdf_unlikely(0 == status)) {
 		TXRX_PRINT(TXRX_PRINT_LEVEL_WARN,
 			   "%s: Pop status is 0, returning here\n", __func__);
 		return;

+ 12 - 12
core/dp/txrx/ol_rx_defrag.c

@@ -63,7 +63,7 @@
 #include <ol_txrx_peer_find.h>
 #include <cdf_nbuf.h>
 #include <ieee80211.h>
-#include <cdf_util.h>
+#include <qdf_util.h>
 #include <athdefs.h>
 #include <cdf_memory.h>
 #include <ol_rx_defrag.h>
@@ -160,7 +160,7 @@ ol_rx_frag_indication_handler(ol_txrx_pdev_handle pdev,
 	if (peer) {
 		htt_rx_frag_pop(htt_pdev, rx_frag_ind_msg, &head_msdu,
 				&tail_msdu);
-		cdf_assert(head_msdu == tail_msdu);
+		qdf_assert(head_msdu == tail_msdu);
 		if (ol_cfg_is_full_reorder_offload(pdev->ctrl_pdev)) {
 			rx_mpdu_desc =
 				htt_rx_mpdu_desc_list_next(htt_pdev, head_msdu);
@@ -222,14 +222,14 @@ ol_rx_reorder_store_frag(ol_txrx_pdev_handle pdev,
 	htt_pdev_handle htt_pdev = pdev->htt_pdev;
 
 	seq = seq_num & peer->tids_rx_reorder[tid].win_sz_mask;
-	cdf_assert(seq == 0);
+	qdf_assert(seq == 0);
 	rx_reorder_array_elem = &peer->tids_rx_reorder[tid].array[seq];
 
 	mac_hdr = (struct ieee80211_frame *)
 		ol_rx_frag_get_mac_hdr(htt_pdev, frag);
-	rxseq = cdf_le16_to_cpu(*(uint16_t *) mac_hdr->i_seq) >>
+	rxseq = qdf_le16_to_cpu(*(uint16_t *) mac_hdr->i_seq) >>
 		IEEE80211_SEQ_SEQ_SHIFT;
-	fragno = cdf_le16_to_cpu(*(uint16_t *) mac_hdr->i_seq) &
+	fragno = qdf_le16_to_cpu(*(uint16_t *) mac_hdr->i_seq) &
 		IEEE80211_SEQ_FRAG_MASK;
 	more_frag = mac_hdr->i_fc[1] & IEEE80211_FC1_MORE_FRAG;
 
@@ -246,7 +246,7 @@ ol_rx_reorder_store_frag(ol_txrx_pdev_handle pdev,
 		fmac_hdr = (struct ieee80211_frame *)
 			ol_rx_frag_get_mac_hdr(htt_pdev,
 					       rx_reorder_array_elem->head);
-		frxseq = cdf_le16_to_cpu(*(uint16_t *) fmac_hdr->i_seq) >>
+		frxseq = qdf_le16_to_cpu(*(uint16_t *) fmac_hdr->i_seq) >>
 			IEEE80211_SEQ_SEQ_SHIFT;
 		if (rxseq != frxseq
 		    || !DEFRAG_IEEE80211_ADDR_EQ(mac_hdr->i_addr1,
@@ -302,13 +302,13 @@ ol_rx_fraglist_insert(htt_pdev_handle htt_pdev,
 	uint8_t last_morefrag = 1, count = 0;
 	cdf_nbuf_t frag_clone;
 
-	cdf_assert(frag);
+	qdf_assert(frag);
 	frag_clone = OL_RX_FRAG_CLONE(frag);
 	frag = frag_clone ? frag_clone : frag;
 
 	mac_hdr = (struct ieee80211_frame *)
 		ol_rx_frag_get_mac_hdr(htt_pdev, frag);
-	fragno = cdf_le16_to_cpu(*(uint16_t *) mac_hdr->i_seq) &
+	fragno = qdf_le16_to_cpu(*(uint16_t *) mac_hdr->i_seq) &
 		IEEE80211_SEQ_FRAG_MASK;
 
 	if (!(*head_addr)) {
@@ -320,7 +320,7 @@ ol_rx_fraglist_insert(htt_pdev_handle htt_pdev,
 	/* For efficiency, compare with tail first */
 	lmac_hdr = (struct ieee80211_frame *)
 		ol_rx_frag_get_mac_hdr(htt_pdev, *tail_addr);
-	lfragno = cdf_le16_to_cpu(*(uint16_t *) lmac_hdr->i_seq) &
+	lfragno = qdf_le16_to_cpu(*(uint16_t *) lmac_hdr->i_seq) &
 		  IEEE80211_SEQ_FRAG_MASK;
 	if (fragno > lfragno) {
 		cdf_nbuf_set_next(*tail_addr, frag);
@@ -331,7 +331,7 @@ ol_rx_fraglist_insert(htt_pdev_handle htt_pdev,
 			cmac_hdr = (struct ieee80211_frame *)
 				ol_rx_frag_get_mac_hdr(htt_pdev, cur);
 			cur_fragno =
-				cdf_le16_to_cpu(*(uint16_t *) cmac_hdr->i_seq) &
+				qdf_le16_to_cpu(*(uint16_t *) cmac_hdr->i_seq) &
 				IEEE80211_SEQ_FRAG_MASK;
 			prev = cur;
 			cur = cdf_nbuf_next(cur);
@@ -356,7 +356,7 @@ ol_rx_fraglist_insert(htt_pdev_handle htt_pdev,
 				(struct ieee80211_frame *)
 				ol_rx_frag_get_mac_hdr(htt_pdev, next);
 			next_fragno =
-				cdf_le16_to_cpu(*(uint16_t *) next_hdr->i_seq) &
+				qdf_le16_to_cpu(*(uint16_t *) next_hdr->i_seq) &
 				IEEE80211_SEQ_FRAG_MASK;
 			count++;
 			if (next_fragno != count)
@@ -494,7 +494,7 @@ ol_rx_defrag(ol_txrx_pdev_handle pdev,
 	wh = (struct ieee80211_frame *)ol_rx_frag_get_mac_hdr(htt_pdev, cur);
 	hdr_space = ol_rx_frag_hdrsize(wh);
 	rx_desc = htt_rx_msdu_desc_retrieve(htt_pdev, frag_list);
-	cdf_assert(htt_rx_msdu_has_wlan_mcast_flag(htt_pdev, rx_desc));
+	qdf_assert(htt_rx_msdu_has_wlan_mcast_flag(htt_pdev, rx_desc));
 	index = htt_rx_msdu_is_wlan_mcast(htt_pdev, rx_desc) ?
 		txrx_sec_mcast : txrx_sec_ucast;
 

+ 1 - 1
core/dp/txrx/ol_rx_defrag.h

@@ -30,7 +30,7 @@
 
 #include <cdf_nbuf.h>
 #include <cds_ieee80211_common.h>
-#include <cdf_util.h>
+#include <qdf_util.h>
 #include <qdf_types.h>
 #include <cdf_memory.h>
 #include <ol_txrx_internal.h>

+ 1 - 1
core/dp/txrx/ol_rx_pn.c

@@ -103,7 +103,7 @@ ol_rx_pn_check_base(struct ol_txrx_vdev_t *vdev,
 
 	/* First, check whether the PN check applies */
 	rx_desc = htt_rx_msdu_desc_retrieve(pdev->htt_pdev, msdu_list);
-	cdf_assert(htt_rx_msdu_has_wlan_mcast_flag(pdev->htt_pdev, rx_desc));
+	qdf_assert(htt_rx_msdu_has_wlan_mcast_flag(pdev->htt_pdev, rx_desc));
 	index = htt_rx_msdu_is_wlan_mcast(pdev->htt_pdev, rx_desc) ?
 		txrx_sec_mcast : txrx_sec_ucast;
 	pn_len = pdev->rx_pn[peer->security[index].sec_type].len;

+ 3 - 3
core/dp/txrx/ol_rx_reorder.c

@@ -178,13 +178,13 @@ ol_rx_seq_num_check(struct ol_txrx_pdev_t *pdev,
 
 	 /* For mcast packets, we only the dup-detection, not re-order check */
 
-	if (cdf_unlikely(OL_RX_MCAST_TID == tid)) {
+	if (qdf_unlikely(OL_RX_MCAST_TID == tid)) {
 
 		pkt_tid = htt_rx_mpdu_desc_tid(pdev->htt_pdev, rx_mpdu_desc);
 
 		/* Invalid packet TID, expected only for HL */
 		/* Pass the packet on */
-		if (cdf_unlikely(pkt_tid >= OL_TXRX_NUM_EXT_TIDS))
+		if (qdf_unlikely(pkt_tid >= OL_TXRX_NUM_EXT_TIDS))
 			return htt_rx_status_ok;
 
 		retry = htt_rx_mpdu_desc_retry(pdev->htt_pdev, rx_mpdu_desc);
@@ -197,7 +197,7 @@ ol_rx_seq_num_check(struct ol_txrx_pdev_t *pdev,
 		 * or out-of-order check for multicast frames as per discussions & spec
 		 * Hence "seq_num <= last_seq_num" check is not necessary.
 		 */
-		if (cdf_unlikely(retry &&
+		if (qdf_unlikely(retry &&
 			(seq_num == peer->tids_mcast_last_seq[pkt_tid]))) {/* drop mcast */
 			TXRX_STATS_INCR(pdev, priv.rx.err.msdu_mc_dup_drop);
 			return htt_rx_status_err_replay;

+ 16 - 16
core/dp/txrx/ol_tx.c

@@ -28,7 +28,7 @@
 /* OS abstraction libraries */
 #include <cdf_nbuf.h>           /* cdf_nbuf_t, etc. */
 #include <qdf_atomic.h>         /* qdf_atomic_read, etc. */
-#include <cdf_util.h>           /* cdf_unlikely */
+#include <qdf_util.h>           /* qdf_unlikely */
 
 /* APIs for other modules */
 #include <htt.h>                /* HTT_TX_EXT_TID_MGMT */
@@ -73,7 +73,7 @@ int ce_send_fast(struct CE_handle *copyeng, cdf_nbuf_t *msdus,
 		struct ol_txrx_pdev_t *pdev = vdev->pdev;		\
 		(msdu_info)->htt.info.frame_type = pdev->htt_pkt_type;	\
 		tx_desc = ol_tx_desc_ll(pdev, vdev, msdu, msdu_info);	\
-		if (cdf_unlikely(!tx_desc)) {				\
+		if (qdf_unlikely(!tx_desc)) {				\
 			TXRX_STATS_MSDU_LIST_INCR(			\
 				pdev, tx.dropped.host_reject, msdu);	\
 			return msdu; /* the list of unaccepted MSDUs */	\
@@ -151,12 +151,12 @@ cdf_nbuf_t ol_tx_send_data_frame(uint8_t sta_id, cdf_nbuf_t skb,
 	cdf_nbuf_t ret;
 	QDF_STATUS status;
 
-	if (cdf_unlikely(!pdev)) {
+	if (qdf_unlikely(!pdev)) {
 		CDF_TRACE(QDF_MODULE_ID_TXRX, CDF_TRACE_LEVEL_WARN,
 			"%s:pdev is null", __func__);
 		return skb;
 	}
-	if (cdf_unlikely(!cdf_ctx)) {
+	if (qdf_unlikely(!cdf_ctx)) {
 		TXRX_PRINT(TXRX_PRINT_LEVEL_ERR,
 			"%s:cdf_ctx is null", __func__);
 		return skb;
@@ -182,7 +182,7 @@ cdf_nbuf_t ol_tx_send_data_frame(uint8_t sta_id, cdf_nbuf_t skb,
 	}
 
 	status = cdf_nbuf_map_single(cdf_ctx, skb, QDF_DMA_TO_DEVICE);
-	if (cdf_unlikely(status != QDF_STATUS_SUCCESS)) {
+	if (qdf_unlikely(status != QDF_STATUS_SUCCESS)) {
 		CDF_TRACE(QDF_MODULE_ID_TXRX, CDF_TRACE_LEVEL_WARN,
 			"%s: nbuf map failed", __func__);
 		return skb;
@@ -222,7 +222,7 @@ cdf_nbuf_t ol_tx_send_ipa_data_frame(void *vdev,
 	ol_txrx_pdev_handle pdev = cds_get_context(QDF_MODULE_ID_TXRX);
 	cdf_nbuf_t ret;
 
-	if (cdf_unlikely(!pdev)) {
+	if (qdf_unlikely(!pdev)) {
 		TXRX_PRINT(TXRX_PRINT_LEVEL_ERR,
 			"%s: pdev is NULL", __func__);
 		return skb;
@@ -269,7 +269,7 @@ cdf_nbuf_t ol_tx_ll(ol_txrx_vdev_handle vdev, cdf_nbuf_t msdu_list)
 		msdu_info.htt.info.ext_tid = cdf_nbuf_get_tid(msdu);
 		msdu_info.peer = NULL;
 
-		if (cdf_unlikely(ol_tx_prepare_tso(vdev, msdu, &msdu_info))) {
+		if (qdf_unlikely(ol_tx_prepare_tso(vdev, msdu, &msdu_info))) {
 			qdf_print("ol_tx_prepare_tso failed\n");
 			TXRX_STATS_MSDU_LIST_INCR(vdev->pdev,
 				 tx.dropped.host_reject, msdu);
@@ -404,7 +404,7 @@ ol_tx_prepare_ll_fast(struct ol_txrx_pdev_t *pdev,
 	u_int32_t num_frags, i;
 
 	tx_desc = ol_tx_desc_alloc_wrapper(pdev, vdev, msdu_info);
-	if (cdf_unlikely(!tx_desc))
+	if (qdf_unlikely(!tx_desc))
 		return NULL;
 
 	tx_desc->netbuf = msdu;
@@ -491,7 +491,7 @@ ol_tx_prepare_ll_fast(struct ol_txrx_pdev_t *pdev,
 	/*
 	 * TODO : Can we remove this check and always download a fixed length ?
 	 * */
-	if (cdf_unlikely(cdf_nbuf_len(msdu) < pkt_download_len))
+	if (qdf_unlikely(cdf_nbuf_len(msdu) < pkt_download_len))
 		pkt_download_len = cdf_nbuf_len(msdu);
 
 	/* Fill the HTC header information */
@@ -539,7 +539,7 @@ ol_tx_ll_fast(ol_txrx_vdev_handle vdev, cdf_nbuf_t msdu_list)
 		msdu_info.htt.info.ext_tid = cdf_nbuf_get_tid(msdu);
 		msdu_info.peer = NULL;
 
-		if (cdf_unlikely(ol_tx_prepare_tso(vdev, msdu, &msdu_info))) {
+		if (qdf_unlikely(ol_tx_prepare_tso(vdev, msdu, &msdu_info))) {
 			qdf_print("ol_tx_prepare_tso failed\n");
 			TXRX_STATS_MSDU_LIST_INCR(vdev->pdev,
 				 tx.dropped.host_reject, msdu);
@@ -588,7 +588,7 @@ ol_tx_ll_fast(ol_txrx_vdev_handle vdev, cdf_nbuf_t msdu_list)
 				break;
 			default:
 				msdu_info.htt.action.do_encrypt = 1;
-				cdf_assert(0);
+				qdf_assert(0);
 				break;
 			}
 
@@ -596,7 +596,7 @@ ol_tx_ll_fast(ol_txrx_vdev_handle vdev, cdf_nbuf_t msdu_list)
 						  pkt_download_len, ep_id,
 						  &msdu_info);
 
-			if (cdf_likely(tx_desc)) {
+			if (qdf_likely(tx_desc)) {
 				/*
 				 * If debug display is enabled, show the meta
 				 * data being downloaded to the target via the
@@ -682,7 +682,7 @@ ol_tx_ll_fast(ol_txrx_vdev_handle vdev, cdf_nbuf_t msdu_list)
 			break;
 		default:
 			msdu_info.htt.action.do_encrypt = 1;
-			cdf_assert(0);
+			qdf_assert(0);
 			break;
 		}
 
@@ -690,7 +690,7 @@ ol_tx_ll_fast(ol_txrx_vdev_handle vdev, cdf_nbuf_t msdu_list)
 					  pkt_download_len, ep_id,
 					  &msdu_info);
 
-		if (cdf_likely(tx_desc)) {
+		if (qdf_likely(tx_desc)) {
 			/*
 			 * If debug display is enabled, show the meta-data being
 			 * downloaded to the target via the HTT tx descriptor.
@@ -734,7 +734,7 @@ ol_tx_ll_wrapper(ol_txrx_vdev_handle vdev, cdf_nbuf_t msdu_list)
 	struct hif_opaque_softc *hif_device =
 		(struct hif_opaque_softc *)cds_get_context(QDF_MODULE_ID_HIF);
 
-	if (cdf_likely(hif_device && hif_is_fastpath_mode_enabled(hif_device)))
+	if (qdf_likely(hif_device && hif_is_fastpath_mode_enabled(hif_device)))
 		msdu_list = ol_tx_ll_fast(vdev, msdu_list);
 	else
 		msdu_list = ol_tx_ll(vdev, msdu_list);
@@ -870,7 +870,7 @@ cdf_nbuf_t ol_tx_ll_queue(ol_txrx_vdev_handle vdev, cdf_nbuf_t msdu_list)
 
 	paused_reason = vdev->ll_pause.paused_reason;
 	if (paused_reason) {
-		if (cdf_unlikely((paused_reason &
+		if (qdf_unlikely((paused_reason &
 				  OL_TXQ_PAUSE_REASON_PEER_UNAUTHORIZED) ==
 				 paused_reason)) {
 			eth_type = (((struct ethernet_hdr_t *)

+ 10 - 10
core/dp/txrx/ol_tx_desc.c

@@ -27,7 +27,7 @@
 
 #include <qdf_net_types.h>      /* QDF_NBUF_EXEMPT_NO_EXEMPTION, etc. */
 #include <cdf_nbuf.h>           /* cdf_nbuf_t, etc. */
-#include <cdf_util.h>           /* cdf_assert */
+#include <qdf_util.h>           /* qdf_assert */
 #include <qdf_lock.h>           /* cdf_spinlock */
 #ifdef QCA_COMPUTE_TX_DELAY
 #include <qdf_time.h>           /* qdf_system_ticks */
@@ -55,7 +55,7 @@ static inline void ol_tx_desc_sanity_checks(struct ol_txrx_pdev_t *pdev,
 		TXRX_PRINT(TXRX_PRINT_LEVEL_ERR,
 				   "%s Potential tx_desc corruption pkt_type:0x%x pdev:0x%p",
 				   __func__, tx_desc->pkt_type, pdev);
-		cdf_assert(0);
+		qdf_assert(0);
 	}
 	if ((uint32_t *) tx_desc->htt_tx_desc <
 		    g_dbg_htt_desc_start_addr
@@ -64,7 +64,7 @@ static inline void ol_tx_desc_sanity_checks(struct ol_txrx_pdev_t *pdev,
 			TXRX_PRINT(TXRX_PRINT_LEVEL_ERR,
 				   "%s Potential htt_desc curruption:0x%p pdev:0x%p\n",
 				   __func__, tx_desc->htt_tx_desc, pdev);
-			cdf_assert(0);
+			qdf_assert(0);
 	}
 }
 static inline void ol_tx_desc_reset_pkt_type(struct ol_tx_desc_t *tx_desc)
@@ -77,7 +77,7 @@ static inline void ol_tx_desc_compute_delay(struct ol_tx_desc_t *tx_desc)
 	if (tx_desc->entry_timestamp_ticks != 0xffffffff) {
 		TXRX_PRINT(TXRX_PRINT_LEVEL_ERR, "%s Timestamp:0x%x\n",
 				   __func__, tx_desc->entry_timestamp_ticks);
-		cdf_assert(0);
+		qdf_assert(0);
 	}
 	tx_desc->entry_timestamp_ticks = qdf_system_ticks();
 }
@@ -166,7 +166,7 @@ struct ol_tx_desc_t *ol_tx_desc_alloc(struct ol_txrx_pdev_t *pdev,
 		qdf_spin_lock_bh(&pool->flow_pool_lock);
 		if (pool->avail_desc) {
 			tx_desc = ol_tx_get_desc_flow_pool(pool);
-			if (cdf_unlikely(pool->avail_desc < pool->stop_th)) {
+			if (qdf_unlikely(pool->avail_desc < pool->stop_th)) {
 				pool->status = FLOW_POOL_ACTIVE_PAUSED;
 				qdf_spin_unlock_bh(&pool->flow_pool_lock);
 				/* pause network queues */
@@ -203,7 +203,7 @@ ol_tx_desc_alloc_wrapper(struct ol_txrx_pdev_t *pdev,
 			 struct ol_txrx_vdev_t *vdev,
 			 struct ol_txrx_msdu_info_t *msdu_info)
 {
-	if (cdf_unlikely(msdu_info->htt.info.frame_type == htt_pkt_type_mgmt))
+	if (qdf_unlikely(msdu_info->htt.info.frame_type == htt_pkt_type_mgmt))
 		return ol_tx_desc_alloc(pdev, vdev, pdev->mgmt_pool);
 	else
 		return ol_tx_desc_alloc(pdev, vdev, vdev->pool);
@@ -232,10 +232,10 @@ void ol_tx_desc_free(struct ol_txrx_pdev_t *pdev, struct ol_tx_desc_t *tx_desc)
 	qdf_spin_lock_bh(&pdev->tx_mutex);
 
 	if (tx_desc->pkt_type == ol_tx_frm_tso) {
-		if (cdf_unlikely(tx_desc->tso_desc == NULL)) {
+		if (qdf_unlikely(tx_desc->tso_desc == NULL)) {
 			qdf_print("%s %d TSO desc is NULL!\n",
 				 __func__, __LINE__);
-			cdf_assert(0);
+			qdf_assert(0);
 		} else {
 			ol_tso_free_segment(pdev, tx_desc->tso_desc);
 		}
@@ -261,7 +261,7 @@ void ol_tx_desc_free(struct ol_txrx_pdev_t *pdev, struct ol_tx_desc_t *tx_desc)
 
 #if defined(FEATURE_TSO)
 	if (tx_desc->pkt_type == ol_tx_frm_tso) {
-		if (cdf_unlikely(tx_desc->tso_desc == NULL))
+		if (qdf_unlikely(tx_desc->tso_desc == NULL))
 			qdf_print("%s %d TSO desc is NULL!\n",
 				 __func__, __LINE__);
 		else
@@ -346,7 +346,7 @@ struct ol_tx_desc_t *ol_tx_desc_ll(struct ol_txrx_pdev_t *pdev,
 		msdu_info->htt.action.do_encrypt = 0;
 		break;
 	default:
-		cdf_assert(0);
+		qdf_assert(0);
 		break;
 	}
 

+ 2 - 2
core/dp/txrx/ol_tx_queue.c

@@ -150,7 +150,7 @@ void ol_txrx_vdev_pause(ol_txrx_vdev_handle vdev, uint32_t reason)
 	struct ol_txrx_pdev_t *pdev = vdev->pdev;
 	enum netif_reason_type netif_reason;
 
-	if (cdf_unlikely((!pdev) || (!pdev->pause_cb))) {
+	if (qdf_unlikely((!pdev) || (!pdev->pause_cb))) {
 		TXRX_PRINT(TXRX_PRINT_LEVEL_ERR,
 				   "%s: invalid pdev\n", __func__);
 		return;
@@ -175,7 +175,7 @@ void ol_txrx_vdev_unpause(ol_txrx_vdev_handle vdev, uint32_t reason)
 	struct ol_txrx_pdev_t *pdev = vdev->pdev;
 	enum netif_reason_type netif_reason;
 
-	if (cdf_unlikely((!pdev) || (!pdev->pause_cb))) {
+	if (qdf_unlikely((!pdev) || (!pdev->pause_cb))) {
 		TXRX_PRINT(TXRX_PRINT_LEVEL_ERR,
 				   "%s: invalid pdev\n", __func__);
 		return;

+ 12 - 12
core/dp/txrx/ol_tx_send.c

@@ -187,7 +187,7 @@ ol_tx_send(struct ol_txrx_pdev_t *pdev,
 				(uint8_t *)(cdf_nbuf_data(msdu)),
 				sizeof(cdf_nbuf_data(msdu))));
 	failed = htt_tx_send_std(pdev->htt_pdev, msdu, id);
-	if (cdf_unlikely(failed)) {
+	if (qdf_unlikely(failed)) {
 		OL_TX_TARGET_CREDIT_INCR_INT(pdev, msdu_credit_consumed);
 		ol_tx_desc_frame_free_nonstd(pdev, tx_desc, 1 /* had error */);
 	}
@@ -201,7 +201,7 @@ ol_tx_send_batch(struct ol_txrx_pdev_t *pdev,
 	OL_TX_CREDIT_RECLAIM(pdev);
 
 	rejected = htt_tx_send_batch(pdev->htt_pdev, head_msdu, num_msdus);
-	while (cdf_unlikely(rejected)) {
+	while (qdf_unlikely(rejected)) {
 		struct ol_tx_desc_t *tx_desc;
 		uint16_t *msdu_id_storage;
 		cdf_nbuf_t next;
@@ -245,7 +245,7 @@ ol_tx_download_done_base(struct ol_txrx_pdev_t *pdev,
 	struct ol_tx_desc_t *tx_desc;
 
 	tx_desc = ol_tx_desc_find(pdev, msdu_id);
-	cdf_assert(tx_desc);
+	qdf_assert(tx_desc);
 
 	/*
 	 * If the download is done for
@@ -306,7 +306,7 @@ ol_tx_download_done_hl_free(void *txrx_pdev,
 	struct ol_tx_desc_t *tx_desc;
 
 	tx_desc = ol_tx_desc_find(pdev, msdu_id);
-	cdf_assert(tx_desc);
+	qdf_assert(tx_desc);
 
 	ol_tx_download_done_base(pdev, status, msdu, msdu_id);
 
@@ -367,7 +367,7 @@ ol_tx_delay_compute(struct ol_txrx_pdev_t *pdev,
 		cdf_nbuf_free((_netbuf));				\
 		((union ol_tx_desc_list_elem_t *)(_tx_desc))->next =	\
 			(_lcl_freelist);				\
-		if (cdf_unlikely(!lcl_freelist)) {			\
+		if (qdf_unlikely(!lcl_freelist)) {			\
 			(_tx_desc_last) = (union ol_tx_desc_list_elem_t *)\
 				(_tx_desc);				\
 		}							\
@@ -383,7 +383,7 @@ ol_tx_delay_compute(struct ol_txrx_pdev_t *pdev,
 		cdf_nbuf_free((_netbuf));				\
 		((union ol_tx_desc_list_elem_t *)(_tx_desc))->next =	\
 			(_lcl_freelist);				\
-		if (cdf_unlikely(!lcl_freelist)) {			\
+		if (qdf_unlikely(!lcl_freelist)) {			\
 			(_tx_desc_last) = (union ol_tx_desc_list_elem_t *)\
 				(_tx_desc);				\
 		}							\
@@ -405,7 +405,7 @@ ol_tx_delay_compute(struct ol_txrx_pdev_t *pdev,
 			    _netbuf, _lcl_freelist,			\
 			    _tx_desc_last, _status)			\
 	do {								\
-		if (cdf_likely((_tx_desc)->pkt_type == ol_tx_frm_std)) { \
+		if (qdf_likely((_tx_desc)->pkt_type == ol_tx_frm_std)) { \
 			ol_tx_msdu_complete_single((_pdev), (_tx_desc),\
 						   (_netbuf), (_lcl_freelist), \
 						   (_tx_desc_last));	\
@@ -427,7 +427,7 @@ ol_tx_delay_compute(struct ol_txrx_pdev_t *pdev,
 			    _netbuf, _lcl_freelist,			\
 			    _tx_desc_last, _status)			\
 	do {								\
-		if (cdf_likely((_tx_desc)->pkt_type == ol_tx_frm_std)) { \
+		if (qdf_likely((_tx_desc)->pkt_type == ol_tx_frm_std)) { \
 			ol_tx_msdu_complete_batch((_pdev), (_tx_desc),	\
 						  (_tx_descs), (_status)); \
 		} else {						\
@@ -695,7 +695,7 @@ ol_tx_delay(ol_txrx_pdev_handle pdev,
 	uint32_t avg_delay_ticks;
 	struct ol_tx_delay_data *data;
 
-	cdf_assert(category >= 0 && category < QCA_TX_DELAY_NUM_CATEGORIES);
+	qdf_assert(category >= 0 && category < QCA_TX_DELAY_NUM_CATEGORIES);
 
 	qdf_spin_lock_bh(&pdev->tx_delay.mutex);
 	index = 1 - pdev->tx_delay.cats[category].in_progress_idx;
@@ -739,7 +739,7 @@ ol_tx_delay_hist(ol_txrx_pdev_handle pdev,
 	int index, i, j;
 	struct ol_tx_delay_data *data;
 
-	cdf_assert(category >= 0 && category < QCA_TX_DELAY_NUM_CATEGORIES);
+	qdf_assert(category >= 0 && category < QCA_TX_DELAY_NUM_CATEGORIES);
 
 	qdf_spin_lock_bh(&pdev->tx_delay.mutex);
 	index = 1 - pdev->tx_delay.cats[category].in_progress_idx;
@@ -779,7 +779,7 @@ static inline uint8_t *ol_tx_dest_addr_find(struct ol_txrx_pdev_t *pdev,
 		CDF_TRACE(QDF_MODULE_ID_TXRX, CDF_TRACE_LEVEL_ERROR,
 			  "Invalid standard frame type: %d",
 			  pdev->frame_format);
-		cdf_assert(0);
+		qdf_assert(0);
 		hdr_ptr = NULL;
 	}
 	return hdr_ptr;
@@ -894,7 +894,7 @@ ol_tx_delay_compute(struct ol_txrx_pdev_t *pdev,
 	uint32_t avg_time_ticks;
 	struct ol_tx_delay_data *data;
 
-	cdf_assert(num_msdus > 0);
+	qdf_assert(num_msdus > 0);
 
 	/*
 	 * keep static counters for total packet and lost packets

+ 15 - 15
core/dp/txrx/ol_txrx.c

@@ -550,7 +550,7 @@ ol_txrx_pdev_attach(ol_txrx_pdev_handle pdev)
 			goto uc_attach_fail;
 
 	/* Calculate single element reserved size power of 2 */
-	pdev->tx_desc.desc_reserved_size = cdf_get_pwr2(desc_element_size);
+	pdev->tx_desc.desc_reserved_size = qdf_get_pwr2(desc_element_size);
 	cdf_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) ||
@@ -1272,7 +1272,7 @@ void ol_txrx_flush_rx_frames(struct ol_txrx_peer_t *peer,
 		return;
 	}
 
-	cdf_assert(cds_ctx);
+	qdf_assert(cds_ctx);
 	qdf_spin_lock_bh(&peer->peer_info_lock);
 	if (peer->state >= ol_txrx_peer_state_conn)
 		data_rx = peer->osif_rx;
@@ -1472,9 +1472,9 @@ ol_txrx_peer_state_update(struct ol_txrx_pdev_t *pdev, uint8_t *peer_mac,
 {
 	struct ol_txrx_peer_t *peer;
 
-	if (cdf_unlikely(!pdev)) {
+	if (qdf_unlikely(!pdev)) {
 		TXRX_PRINT(TXRX_PRINT_LEVEL_ERR, "Pdev is NULL");
-		cdf_assert(0);
+		qdf_assert(0);
 		return QDF_STATUS_E_INVAL;
 	}
 
@@ -1686,7 +1686,7 @@ void ol_txrx_peer_unref_delete(ol_txrx_peer_handle peer)
 	if (0 == qdf_atomic_read(&(peer->ref_cnt))) {
 		TXRX_PRINT(TXRX_PRINT_LEVEL_ERR,
 			   "The Peer is not present anymore\n");
-		cdf_assert(0);
+		qdf_assert(0);
 		return;
 	}
 
@@ -2537,7 +2537,7 @@ A_STATUS
 ol_txrx_peer_stats_copy(ol_txrx_pdev_handle pdev,
 			ol_txrx_peer_handle peer, ol_txrx_peer_stats_t *stats)
 {
-	cdf_assert(pdev && peer && stats);
+	qdf_assert(pdev && peer && stats);
 	qdf_spin_lock_bh(&pdev->peer_stat_mutex);
 	cdf_mem_copy(stats, &peer->stats, sizeof(*stats));
 	qdf_spin_unlock_bh(&pdev->peer_stat_mutex);
@@ -2831,7 +2831,7 @@ void ol_txrx_ipa_uc_fw_op_event_handler(void *context,
 {
 	ol_txrx_pdev_handle pdev = (ol_txrx_pdev_handle)context;
 
-	if (cdf_unlikely(!pdev)) {
+	if (qdf_unlikely(!pdev)) {
 		CDF_TRACE(QDF_MODULE_ID_TXRX, CDF_TRACE_LEVEL_ERROR,
 			      "%s: Invalid context", __func__);
 		cdf_mem_free(rxpkt);
@@ -2860,11 +2860,11 @@ void ol_txrx_ipa_uc_op_response(ol_txrx_pdev_handle pdev, uint8_t *op_msg)
 	p_cds_sched_context sched_ctx = get_cds_sched_ctxt();
 	struct cds_ol_rx_pkt *pkt;
 
-	if (cdf_unlikely(!sched_ctx))
+	if (qdf_unlikely(!sched_ctx))
 		return;
 
 	pkt = cds_alloc_ol_rx_pkt(sched_ctx);
-	if (cdf_unlikely(!pkt)) {
+	if (qdf_unlikely(!pkt)) {
 		CDF_TRACE(QDF_MODULE_ID_TXRX, CDF_TRACE_LEVEL_ERROR,
 			      "%s: Not able to allocate context", __func__);
 		return;
@@ -2992,11 +2992,11 @@ static void ol_rx_data_cb(struct ol_txrx_peer_t *peer,
 	QDF_STATUS ret;
 	ol_rx_callback_fp data_rx = NULL;
 
-	if (cdf_unlikely(!cds_ctx))
+	if (qdf_unlikely(!cds_ctx))
 		goto free_buf;
 
 	qdf_spin_lock_bh(&peer->peer_info_lock);
-	if (cdf_unlikely(!(peer->state >= ol_txrx_peer_state_conn))) {
+	if (qdf_unlikely(!(peer->state >= ol_txrx_peer_state_conn))) {
 		qdf_spin_unlock_bh(&peer->peer_info_lock);
 		goto free_buf;
 	}
@@ -3354,10 +3354,10 @@ void ol_txrx_lro_flush_handler(void *context,
 {
 	ol_txrx_pdev_handle pdev = (ol_txrx_pdev_handle)context;
 
-	if (cdf_unlikely(!pdev)) {
+	if (qdf_unlikely(!pdev)) {
 		CDF_TRACE(QDF_MODULE_ID_TXRX, CDF_TRACE_LEVEL_ERROR,
 			 "%s: Invalid context", __func__);
-		cdf_assert(0);
+		qdf_assert(0);
 		return;
 	}
 
@@ -3383,14 +3383,14 @@ void ol_txrx_lro_flush(void *data)
 	struct cds_ol_rx_pkt *pkt;
 	ol_txrx_pdev_handle pdev = (ol_txrx_pdev_handle)data;
 
-	if (cdf_unlikely(!sched_ctx))
+	if (qdf_unlikely(!sched_ctx))
 		return;
 
 	if (!ol_cfg_is_rx_thread_enabled(pdev->ctrl_pdev)) {
 		ol_txrx_lro_flush_handler((void *)pdev, NULL, 0);
 	} else {
 		pkt = cds_alloc_ol_rx_pkt(sched_ctx);
-		if (cdf_unlikely(!pkt)) {
+		if (qdf_unlikely(!pkt)) {
 			CDF_TRACE(QDF_MODULE_ID_TXRX, CDF_TRACE_LEVEL_ERROR,
 				 "%s: Not able to allocate context", __func__);
 			return;

+ 1 - 1
core/dp/txrx/ol_txrx.h

@@ -51,7 +51,7 @@ static inline ol_txrx_vdev_handle ol_txrx_get_vdev_from_vdev_id(uint8_t vdev_id)
 	ol_txrx_pdev_handle pdev = cds_get_context(QDF_MODULE_ID_TXRX);
 	ol_txrx_vdev_handle vdev = NULL;
 
-	if (cdf_unlikely(!pdev)) {
+	if (qdf_unlikely(!pdev)) {
 		return NULL;
 	}
 

+ 3 - 3
core/dp/txrx/ol_txrx_flow_control.c

@@ -28,7 +28,7 @@
 /* OS abstraction libraries */
 #include <cdf_nbuf.h>           /* cdf_nbuf_t, etc. */
 #include <cdf_atomic.h>         /* qdf_atomic_read, etc. */
-#include <cdf_util.h>           /* cdf_unlikely */
+#include <qdf_util.h>           /* qdf_unlikely */
 
 /* APIs for other modules */
 #include <htt.h>                /* HTT_TX_EXT_TID_MGMT */
@@ -601,7 +601,7 @@ void ol_tx_flow_pool_map_handler(uint8_t flow_id, uint8_t flow_type,
 		"%s: flow_id %d flow_type %d flow_pool_id %d flow_pool_size %d\n",
 		__func__, flow_id, flow_type, flow_pool_id, flow_pool_size);
 
-	if (cdf_unlikely(!pdev)) {
+	if (qdf_unlikely(!pdev)) {
 		TXRX_PRINT(TXRX_PRINT_LEVEL_ERR,
 			"%s: pdev is NULL", __func__);
 		return;
@@ -659,7 +659,7 @@ void ol_tx_flow_pool_unmap_handler(uint8_t flow_id, uint8_t flow_type,
 		"%s: flow_id %d flow_type %d flow_pool_id %d\n",
 		__func__, flow_id, flow_type, flow_pool_id);
 
-	if (cdf_unlikely(!pdev)) {
+	if (qdf_unlikely(!pdev)) {
 		TXRX_PRINT(TXRX_PRINT_LEVEL_ERR,
 			"%s: pdev is NULL", __func__);
 		return;

+ 5 - 5
core/dp/txrx/ol_txrx_internal.h

@@ -28,7 +28,7 @@
 #ifndef _OL_TXRX_INTERNAL__H_
 #define _OL_TXRX_INTERNAL__H_
 
-#include <cdf_util.h>               /* cdf_assert */
+#include <qdf_util.h>               /* qdf_assert */
 #include <cdf_nbuf.h>               /* cdf_nbuf_t */
 #include <cdf_memory.h>             /* cdf_mem_set */
 #include <cds_ieee80211_common.h>   /* ieee80211_frame */
@@ -63,13 +63,13 @@
 #else                           /* #ifdef __KLOCWORK__ */
 
 #if TXRX_ASSERT_LEVEL > 0
-#define TXRX_ASSERT1(condition) cdf_assert((condition))
+#define TXRX_ASSERT1(condition) qdf_assert((condition))
 #else
 #define TXRX_ASSERT1(condition)
 #endif
 
 #if TXRX_ASSERT_LEVEL > 1
-#define TXRX_ASSERT2(condition) cdf_assert((condition))
+#define TXRX_ASSERT2(condition) qdf_assert((condition))
 #else
 #define TXRX_ASSERT2(condition)
 #endif
@@ -632,10 +632,10 @@ NOT_IP_TCP:
 				dest_addr = (uint8_t *) &(frm->i_addr3[0]); \
 			} \
 		} \
-		if (cdf_unlikely(IEEE80211_IS_BROADCAST(dest_addr))) { \
+		if (qdf_unlikely(IEEE80211_IS_BROADCAST(dest_addr))) { \
 			OL_TXRX_PEER_STATS_UPDATE_BASE(peer, tx_or_rx,	\
 						       bcast, msdu);	\
-		} else if (cdf_unlikely(IEEE80211_IS_MULTICAST(dest_addr))) { \
+		} else if (qdf_unlikely(IEEE80211_IS_MULTICAST(dest_addr))) { \
 			OL_TXRX_PEER_STATS_UPDATE_BASE(peer, tx_or_rx,	\
 						       mcast, msdu);	\
 		} else { \

+ 1 - 1
core/dp/txrx/ol_txrx_peer_find.c

@@ -359,7 +359,7 @@ ol_txrx_peer_find_add_id(struct ol_txrx_pdev_t *pdev,
 		}
 		if (ol_txrx_peer_find_add_id_to_obj(peer, peer_id)) {
 			/* TBDXXX: assert for now */
-			cdf_assert(0);
+			qdf_assert(0);
 		}
 		return;
 	}

+ 11 - 11
core/hdd/src/wlan_hdd_assoc.c

@@ -330,7 +330,7 @@ hdd_conn_save_connect_info(hdd_adapter_t *pAdapter, tCsrRoamInfo *pRoamInfo,
 		/* Save the BSSID for the connection */
 		if (eCSR_BSS_TYPE_INFRASTRUCTURE == eBssType) {
 			CDF_ASSERT(pRoamInfo->pBssDesc);
-			cdf_copy_macaddr(&pHddStaCtx->conn_info.bssId,
+			qdf_copy_macaddr(&pHddStaCtx->conn_info.bssId,
 					 &pRoamInfo->bssid);
 
 			/*
@@ -345,7 +345,7 @@ hdd_conn_save_connect_info(hdd_adapter_t *pAdapter, tCsrRoamInfo *pRoamInfo,
 					pRoamInfo->staId;
 			}
 		} else if (eCSR_BSS_TYPE_IBSS == eBssType) {
-			cdf_copy_macaddr(&pHddStaCtx->conn_info.bssId,
+			qdf_copy_macaddr(&pHddStaCtx->conn_info.bssId,
 					 &pRoamInfo->bssid);
 		} else {
 			/*
@@ -771,7 +771,7 @@ static void hdd_send_association_event(struct net_device *dev,
 		}
 		if (pAdapter->device_mode == WLAN_HDD_P2P_CLIENT) {
 			tSirSmeChanInfo chan_info;
-			cdf_copy_macaddr(&peerMacAddr,
+			qdf_copy_macaddr(&peerMacAddr,
 					 &pHddStaCtx->conn_info.bssId);
 			chan_info.chan_id = pCsrRoamInfo->chan_info.chan_id;
 			chan_info.mhz = pCsrRoamInfo->chan_info.mhz;
@@ -824,7 +824,7 @@ static void hdd_send_association_event(struct net_device *dev,
 #endif
 
 		if (pAdapter->device_mode == WLAN_HDD_P2P_CLIENT) {
-			cdf_copy_macaddr(&peerMacAddr,
+			qdf_copy_macaddr(&peerMacAddr,
 					 &pHddStaCtx->conn_info.bssId);
 
 			/* send peer status indication to oem app */
@@ -1575,7 +1575,7 @@ static QDF_STATUS hdd_roam_set_key_complete_handler(hdd_adapter_t *pAdapter,
 		if (WLAN_HDD_IBSS == pAdapter->device_mode) {
 			uint8_t staId;
 
-			if (cdf_is_macaddr_broadcast(&pRoamInfo->peerMac)) {
+			if (qdf_is_macaddr_broadcast(&pRoamInfo->peerMac)) {
 				pHddStaCtx->roam_info.roamingState =
 					HDD_ROAM_STATE_NONE;
 			} else {
@@ -2473,7 +2473,7 @@ static bool roam_save_ibss_station(hdd_station_ctx_t *pHddStaCtx, uint8_t staId,
 		if (0 == pHddStaCtx->conn_info.staId[idx]) {
 			pHddStaCtx->conn_info.staId[idx] = staId;
 
-			cdf_copy_macaddr(&pHddStaCtx->conn_info.
+			qdf_copy_macaddr(&pHddStaCtx->conn_info.
 					 peerMacAddress[idx], peerMacAddress);
 
 			fSuccess = true;
@@ -2506,7 +2506,7 @@ static bool roam_remove_ibss_station(hdd_adapter_t *pAdapter, uint8_t staId)
 		if (staId == pHddStaCtx->conn_info.staId[idx]) {
 			pHddStaCtx->conn_info.staId[idx] = 0;
 
-			cdf_zero_macaddr(&pHddStaCtx->conn_info.
+			qdf_zero_macaddr(&pHddStaCtx->conn_info.
 					 peerMacAddress[idx]);
 
 			fSuccess = true;
@@ -2540,13 +2540,13 @@ static bool roam_remove_ibss_station(hdd_adapter_t *pAdapter, uint8_t staId)
 			if (pHddStaCtx->conn_info.staId[valid_idx] != 0) {
 				pHddStaCtx->conn_info.staId[0] =
 					pHddStaCtx->conn_info.staId[valid_idx];
-				cdf_copy_macaddr(&pHddStaCtx->conn_info.
+				qdf_copy_macaddr(&pHddStaCtx->conn_info.
 						 peerMacAddress[0],
 						 &pHddStaCtx->conn_info.
 						 peerMacAddress[valid_idx]);
 
 				pHddStaCtx->conn_info.staId[valid_idx] = 0;
-				cdf_zero_macaddr(&pHddStaCtx->conn_info.
+				qdf_zero_macaddr(&pHddStaCtx->conn_info.
 						 peerMacAddress[valid_idx]);
 			}
 		}
@@ -2731,7 +2731,7 @@ roam_roam_connect_status_update_handler(hdd_adapter_t *pAdapter,
 		    pHddStaCtx->ibss_enc_key.encType) {
 			pHddStaCtx->ibss_enc_key.keyDirection =
 				eSIR_TX_RX;
-			cdf_copy_macaddr(&pHddStaCtx->ibss_enc_key.peerMac,
+			qdf_copy_macaddr(&pHddStaCtx->ibss_enc_key.peerMac,
 					 &pRoamInfo->peerMac);
 
 			hddLog(LOG2, "New peer joined set PTK encType=%d",
@@ -2972,7 +2972,7 @@ hdd_roam_tdls_status_update_handler(hdd_adapter_t *pAdapter,
 						  MAC_ADDR_ARRAY
 							  (pRoamInfo->peerMac.bytes));
 
-					cdf_copy_macaddr(&pHddCtx->
+					qdf_copy_macaddr(&pHddCtx->
 							 tdlsConnInfo
 							 [staIdx].
 							 peerMac,

+ 1 - 1
core/hdd/src/wlan_hdd_cfg.c

@@ -3943,7 +3943,7 @@ static void update_mac_from_string(hdd_context_t *pHddCtx,
 			if (res < 0)
 				break;
 		}
-		if (res == 0 && !cdf_is_macaddr_zero(&macaddr[i])) {
+		if (res == 0 && !qdf_is_macaddr_zero(&macaddr[i])) {
 			cdf_mem_copy((uint8_t *) &pHddCtx->config->
 				     intfMacAddr[i].bytes[0],
 				     (uint8_t *) &macaddr[i].bytes[0],

+ 10 - 10
core/hdd/src/wlan_hdd_cfg80211.c

@@ -3603,7 +3603,7 @@ wlan_hdd_add_tx_ptrn(hdd_adapter_t *adapter, hdd_context_t *hdd_ctx,
 	hddLog(LOG1, "input src mac address: "MAC_ADDRESS_STR,
 			MAC_ADDR_ARRAY(add_req->mac_address.bytes));
 
-	if (!cdf_is_macaddr_equal(&add_req->mac_address,
+	if (!qdf_is_macaddr_equal(&add_req->mac_address,
 				  &adapter->macAddressCurrent)) {
 		hdd_err("input src mac address and connected ap bssid are different");
 		goto fail;
@@ -3718,7 +3718,7 @@ wlan_hdd_del_tx_ptrn(hdd_adapter_t *adapter, hdd_context_t *hdd_ctx,
 		return -ENOMEM;
 	}
 
-	cdf_copy_macaddr(&del_req->mac_address, &adapter->macAddressCurrent);
+	qdf_copy_macaddr(&del_req->mac_address, &adapter->macAddressCurrent);
 	hdd_info(MAC_ADDRESS_STR, MAC_ADDR_ARRAY(del_req->mac_address.bytes));
 	del_req->ucPtrnId = pattern_id;
 	hddLog(LOG1, FL("Request Id: %u Pattern id: %d"),
@@ -4376,7 +4376,7 @@ static int __wlan_hdd_cfg80211_get_link_properties(struct wiphy *wiphy,
 
 		for (sta_id = 0; sta_id < WLAN_MAX_STA_COUNT; sta_id++) {
 			if (adapter->aStaInfo[sta_id].isUsed &&
-			    !cdf_is_macaddr_broadcast(
+			    !qdf_is_macaddr_broadcast(
 				&adapter->aStaInfo[sta_id].macAddrSTA) &&
 			    cdf_mem_compare(
 				&adapter->aStaInfo[sta_id].macAddrSTA.bytes,
@@ -5681,7 +5681,7 @@ void wlan_hdd_cfg80211_set_key_wapi(hdd_adapter_t *pAdapter, uint8_t key_index,
 	setKey.keyDirection = eSIR_TX_RX;       /* Key Directionn both TX and RX */
 	setKey.paeRole = 0;     /* the PAE role */
 	if (!mac_addr || is_broadcast_ether_addr(mac_addr)) {
-		cdf_set_macaddr_broadcast(&setKey.peerMac);
+		qdf_set_macaddr_broadcast(&setKey.peerMac);
 	} else {
 		cdf_mem_copy(setKey.peerMac.bytes, mac_addr, QDF_MAC_ADDR_SIZE);
 	}
@@ -6725,7 +6725,7 @@ static int __wlan_hdd_cfg80211_add_key(struct wiphy *wiphy,
 		CDF_TRACE(QDF_MODULE_ID_HDD, CDF_TRACE_LEVEL_INFO,
 			  "%s- %d: setting Broadcast key", __func__, __LINE__);
 		setKey.keyDirection = eSIR_RX_ONLY;
-		cdf_set_macaddr_broadcast(&setKey.peerMac);
+		qdf_set_macaddr_broadcast(&setKey.peerMac);
 	} else {
 		/* set pairwise key */
 		CDF_TRACE(QDF_MODULE_ID_HDD, CDF_TRACE_LEVEL_INFO,
@@ -6867,7 +6867,7 @@ static int __wlan_hdd_cfg80211_add_key(struct wiphy *wiphy,
 			)
 		    ) {
 			setKey.keyDirection = eSIR_RX_ONLY;
-			cdf_set_macaddr_broadcast(&setKey.peerMac);
+			qdf_set_macaddr_broadcast(&setKey.peerMac);
 
 			hddLog(LOG2,
 			       FL("Set key peerMac "MAC_ADDRESS_STR" direction %d"),
@@ -7128,7 +7128,7 @@ static int __wlan_hdd_cfg80211_set_default_key(struct wiphy *wiphy,
 
 			setKey.keyDirection = eSIR_TX_RX;
 
-			cdf_copy_macaddr(&setKey.peerMac,
+			qdf_copy_macaddr(&setKey.peerMac,
 					 &pHddStaCtx->conn_info.bssId);
 
 			if (Keys->KeyLength[key_index] == CSR_WEP40_KEY_LEN &&
@@ -9433,7 +9433,7 @@ static int __wlan_hdd_cfg80211_join_ibss(struct wiphy *wiphy,
 				FL("ccmCfgStInt failed for WNI_CFG_IBSS_AUTO_BSSID"));
 			return -EIO;
 		}
-		cdf_copy_macaddr(&bssid, &pHddCtx->config->IbssBssid);
+		qdf_copy_macaddr(&bssid, &pHddCtx->config->IbssBssid);
 	}
 	if ((params->beacon_interval > CFG_BEACON_INTERVAL_MIN)
 	    && (params->beacon_interval <= CFG_BEACON_INTERVAL_MAX))
@@ -9863,7 +9863,7 @@ int __wlan_hdd_cfg80211_del_station(struct wiphy *wiphy,
 			return 0;
 		}
 
-		if (cdf_is_macaddr_broadcast((struct qdf_mac_addr *) mac)) {
+		if (qdf_is_macaddr_broadcast((struct qdf_mac_addr *) mac)) {
 			uint16_t i;
 			for (i = 0; i < WLAN_MAX_STA_COUNT; i++) {
 				if ((pAdapter->aStaInfo[i].isUsed) &&
@@ -10525,7 +10525,7 @@ int __wlan_hdd_cfg80211_set_rekey_data(struct wiphy *wiphy,
 	       NL80211_KCK_LEN);
 	memcpy(pHddStaCtx->gtkOffloadReqParams.aKEK, data->kek,
 	       NL80211_KEK_LEN);
-	cdf_copy_macaddr(&pHddStaCtx->gtkOffloadReqParams.bssid,
+	qdf_copy_macaddr(&pHddStaCtx->gtkOffloadReqParams.bssid,
 			 &pHddStaCtx->conn_info.bssId);
 	{
 		/* changing from big to little endian since driver

+ 2 - 2
core/hdd/src/wlan_hdd_debugfs.c

@@ -405,7 +405,7 @@ static ssize_t __wcnss_patterngen_write(struct file *file,
 		}
 		delPeriodicTxPtrnParams->ucPtrnId = pattern_idx;
 		delPeriodicTxPtrnParams->ucPatternIdBitmap = 1 << pattern_idx;
-		cdf_copy_macaddr(&delPeriodicTxPtrnParams->mac_address,
+		qdf_copy_macaddr(&delPeriodicTxPtrnParams->mac_address,
 				 &pAdapter->macAddressCurrent);
 
 		/* Delete pattern */
@@ -473,7 +473,7 @@ static ssize_t __wcnss_patterngen_write(struct file *file,
 	addPeriodicTxPtrnParams->ucPtrnId = pattern_idx;
 	addPeriodicTxPtrnParams->usPtrnIntervalMs = pattern_duration * 500;
 	addPeriodicTxPtrnParams->ucPtrnSize = pattern_len;
-	cdf_copy_macaddr(&addPeriodicTxPtrnParams->mac_address,
+	qdf_copy_macaddr(&addPeriodicTxPtrnParams->mac_address,
 			 &pAdapter->macAddressCurrent);
 
 	/* Extract the pattern */

+ 2 - 2
core/hdd/src/wlan_hdd_driver_ops.c

@@ -261,7 +261,7 @@ static int hdd_hif_open(struct device *dev, void *bdev, const hif_bus_id *bid,
 	if (!QDF_IS_STATUS_SUCCESS(status)) {
 		hdd_err("hif_enable error = %d, reinit = %d",
 			status, reinit);
-		ret = cdf_status_to_os_return(status);
+		ret = qdf_status_to_os_return(status);
 		goto err_napi_destroy;
 	}
 
@@ -563,7 +563,7 @@ static int __wlan_hdd_bus_suspend(pm_message_t state)
 	if (err)
 		goto done;
 
-	err = cdf_status_to_os_return(
+	err = qdf_status_to_os_return(
 			ol_txrx_bus_suspend());
 	if (err)
 		goto done;

+ 1 - 1
core/hdd/src/wlan_hdd_ftm.c

@@ -127,7 +127,7 @@ static void wlan_hdd_ftm_update_tgt_cfg(void *context, void *param)
 	hdd_context_t *hdd_ctx = (hdd_context_t *) context;
 	struct wma_tgt_cfg *cfg = (struct wma_tgt_cfg *)param;
 
-	if (!cdf_is_macaddr_zero(&cfg->hw_macaddr)) {
+	if (!qdf_is_macaddr_zero(&cfg->hw_macaddr)) {
 		hdd_update_macaddr(hdd_ctx->config, cfg->hw_macaddr);
 	} else {
 		hddLog(CDF_TRACE_LEVEL_ERROR,

+ 11 - 11
core/hdd/src/wlan_hdd_hostapd.c

@@ -1577,7 +1577,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent,
 			     WPSPBCProbeReq.probeReqIE,
 			     pHddApCtx->WPSPBCProbeReq.probeReqIELen);
 
-		cdf_copy_macaddr(&pHddApCtx->WPSPBCProbeReq.peer_macaddr,
+		qdf_copy_macaddr(&pHddApCtx->WPSPBCProbeReq.peer_macaddr,
 			     &pSapEvent->sapevt.sapPBCProbeReqEvent.
 			     WPSPBCProbeReq.peer_macaddr);
 		hddLog(LOG1, "WPS PBC probe req " MAC_ADDRESS_STR,
@@ -2453,7 +2453,7 @@ static __iw_softap_setparam(struct net_device *dev,
 		struct hdd_config *pConfig = hdd_ctx->config;
 
 		hddLog(LOG1, "MC Target rate %d", set_value);
-		cdf_copy_macaddr(&rateUpdate.bssid,
+		qdf_copy_macaddr(&rateUpdate.bssid,
 				 &pHostapdAdapter->macAddressCurrent);
 		rateUpdate.nss = (pConfig->enable2x2 == 0) ? 0 : 1;
 		rateUpdate.dev_mode = pHostapdAdapter->device_mode;
@@ -3360,8 +3360,8 @@ static __iw_softap_set_max_tx_power(struct net_device *dev,
 		return ret;
 
 	/* Assign correct slef MAC address */
-	cdf_copy_macaddr(&bssid, &pHostapdAdapter->macAddressCurrent);
-	cdf_copy_macaddr(&selfMac, &pHostapdAdapter->macAddressCurrent);
+	qdf_copy_macaddr(&bssid, &pHostapdAdapter->macAddressCurrent);
+	qdf_copy_macaddr(&selfMac, &pHostapdAdapter->macAddressCurrent);
 
 	set_value = value[0];
 	if (QDF_STATUS_SUCCESS !=
@@ -3410,7 +3410,7 @@ static __iw_softap_set_tx_power(struct net_device *dev,
 	if (NULL == value)
 		return -ENOMEM;
 
-	cdf_copy_macaddr(&bssid, &pHostapdAdapter->macAddressCurrent);
+	qdf_copy_macaddr(&bssid, &pHostapdAdapter->macAddressCurrent);
 
 	set_value = value[0];
 	if (QDF_STATUS_SUCCESS !=
@@ -3857,7 +3857,7 @@ int __iw_get_wpspbc_probe_req_ies(struct net_device *dev,
 	cdf_mem_copy(&WPSPBCProbeReqIEs.probeReqIE,
 		     pHddApCtx->WPSPBCProbeReq.probeReqIE,
 		     WPSPBCProbeReqIEs.probeReqIELen);
-	cdf_copy_macaddr(&WPSPBCProbeReqIEs.macaddr,
+	qdf_copy_macaddr(&WPSPBCProbeReqIEs.macaddr,
 			 &pHddApCtx->WPSPBCProbeReq.peer_macaddr);
 	if (copy_to_user(wrqu->data.pointer,
 			 (void *)&WPSPBCProbeReqIEs,
@@ -4036,7 +4036,7 @@ static int __iw_set_ap_encodeext(struct net_device *dev,
 	if (ext->ext_flags & IW_ENCODE_EXT_GROUP_KEY) {
 		/*Key direction for group is RX only */
 		setKey.keyDirection = eSIR_RX_ONLY;
-		cdf_set_macaddr_broadcast(&setKey.peerMac);
+		qdf_set_macaddr_broadcast(&setKey.peerMac);
 	} else {
 
 		setKey.keyDirection = eSIR_TX_RX;
@@ -5362,9 +5362,9 @@ int __iw_get_softap_linkspeed(struct net_device *dev,
 	if (wrqu->data.length < 17 || !QDF_IS_STATUS_SUCCESS(status)) {
 		for (i = 0; i < WLAN_MAX_STA_COUNT; i++) {
 			if (pHostapdAdapter->aStaInfo[i].isUsed &&
-			    (!cdf_is_macaddr_broadcast
+			    (!qdf_is_macaddr_broadcast
 				  (&pHostapdAdapter->aStaInfo[i].macAddrSTA))) {
-				cdf_copy_macaddr(
+				qdf_copy_macaddr(
 					&macAddress,
 					&pHostapdAdapter->aStaInfo[i].
 					 macAddrSTA);
@@ -6907,7 +6907,7 @@ int wlan_hdd_cfg80211_update_apies(hdd_adapter_t *adapter)
 					      WLAN_EID_OVERLAP_BSS_SCAN_PARAM);
 	}
 #endif
-	cdf_copy_macaddr(&updateIE.bssid, &adapter->macAddressCurrent);
+	qdf_copy_macaddr(&updateIE.bssid, &adapter->macAddressCurrent);
 	updateIE.smeSessionId = adapter->sessionId;
 
 	if (test_bit(SOFTAP_BSS_STARTED, &adapter->event_flags)) {
@@ -7993,7 +7993,7 @@ static int __wlan_hdd_cfg80211_stop_ap(struct wiphy *wiphy,
 		return -EINVAL;
 	}
 
-	cdf_copy_macaddr(&updateIE.bssid, &pAdapter->macAddressCurrent);
+	qdf_copy_macaddr(&updateIE.bssid, &pAdapter->macAddressCurrent);
 	updateIE.smeSessionId = pAdapter->sessionId;
 	updateIE.ieBufferlength = 0;
 	updateIE.pAdditionIEBuffer = NULL;

+ 4 - 4
core/hdd/src/wlan_hdd_ioctl.c

@@ -1723,7 +1723,7 @@ static int hdd_set_app_type1_parser(hdd_adapter_t *adapter,
 
 	memset(&params, 0, sizeof(tSirAppType1Params));
 	params.vdev_id = adapter->sessionId;
-	cdf_copy_macaddr(&params.wakee_mac_addr, &adapter->macAddressCurrent);
+	qdf_copy_macaddr(&params.wakee_mac_addr, &adapter->macAddressCurrent);
 
 	params.id_length = strlen(id);
 	cdf_mem_copy(params.identification_id, id, params.id_length);
@@ -2426,7 +2426,7 @@ int wlan_hdd_set_mc_rate(hdd_adapter_t *pAdapter, int targetRate)
 	rateUpdate.mcastDataRate24GHzTxFlag = 1;
 	rateUpdate.mcastDataRate5GHz = targetRate;
 	rateUpdate.bcastDataRate = -1;
-	cdf_copy_macaddr(&rateUpdate.bssid, &pAdapter->macAddressCurrent);
+	qdf_copy_macaddr(&rateUpdate.bssid, &pAdapter->macAddressCurrent);
 	hddLog(LOG1,
 		FL("MC Target rate %d, mac = %pM, dev_mode %s(%d)"),
 		rateUpdate.mcastDataRate24GHz, rateUpdate.bssid.bytes,
@@ -4982,9 +4982,9 @@ static int drv_cmd_max_tx_power(hdd_adapter_t *adapter,
 	       && QDF_STATUS_SUCCESS == qdf_status) {
 		adapter = pAdapterNode->pAdapter;
 		/* Assign correct self MAC address */
-		cdf_copy_macaddr(&bssid,
+		qdf_copy_macaddr(&bssid,
 				 &adapter->macAddressCurrent);
-		cdf_copy_macaddr(&selfMac,
+		qdf_copy_macaddr(&selfMac,
 				 &adapter->macAddressCurrent);
 
 		hddLog(CDF_TRACE_LEVEL_INFO,

+ 4 - 4
core/hdd/src/wlan_hdd_main.c

@@ -1299,7 +1299,7 @@ void hdd_update_tgt_cfg(void *context, void *param)
 
 	/* This can be extended to other configurations like ht, vht cap... */
 
-	if (!cdf_is_macaddr_zero(&cfg->hw_macaddr)) {
+	if (!qdf_is_macaddr_zero(&cfg->hw_macaddr)) {
 		hdd_update_macaddr(hdd_ctx->config, cfg->hw_macaddr);
 	} else {
 		hddLog(CDF_TRACE_LEVEL_ERROR,
@@ -2767,7 +2767,7 @@ void wlan_hdd_reset_prob_rspies(hdd_adapter_t *pHostapdAdapter)
 		return;
 	}
 
-	cdf_copy_macaddr(&updateIE.bssid, bssid);
+	qdf_copy_macaddr(&updateIE.bssid, bssid);
 	updateIE.smeSessionId = pHostapdAdapter->sessionId;
 	updateIE.ieBufferlength = 0;
 	updateIE.pAdditionIEBuffer = NULL;
@@ -2942,7 +2942,7 @@ QDF_STATUS hdd_stop_adapter(hdd_context_t *hdd_ctx, hdd_adapter_t *adapter,
 						     adapter->device_mode,
 							adapter->sessionId);
 
-			cdf_copy_macaddr(&updateIE.bssid,
+			qdf_copy_macaddr(&updateIE.bssid,
 					 &adapter->macAddressCurrent);
 			updateIE.smeSessionId = adapter->sessionId;
 			updateIE.ieBufferlength = 0;
@@ -5389,7 +5389,7 @@ static int hdd_init_thermal_info(hdd_context_t *hdd_ctx)
 	status = sme_init_thermal_info(hdd_ctx->hHal, thermal_param);
 
 	if (!QDF_IS_STATUS_SUCCESS(status))
-		return cdf_status_to_os_return(status);
+		return qdf_status_to_os_return(status);
 
 	sme_add_set_thermal_level_callback(hdd_ctx->hHal,
 					   hdd_set_thermal_level_cb);

+ 4 - 4
core/hdd/src/wlan_hdd_ocb.c

@@ -274,7 +274,7 @@ static int hdd_ocb_register_sta(hdd_adapter_t *adapter)
 	}
 
 	pHddStaCtx->conn_info.staId[0] = peer_id;
-	cdf_copy_macaddr(&pHddStaCtx->conn_info.peerMacAddress[0],
+	qdf_copy_macaddr(&pHddStaCtx->conn_info.peerMacAddress[0],
 			 &adapter->macAddressCurrent);
 
 	return 0;
@@ -531,7 +531,7 @@ static int __iw_set_dot11p_channel_sched(struct net_device *dev,
 		 * First channel uses the adapter's address.
 		 */
 		if (i == 0) {
-			cdf_copy_macaddr(&curr_chan->mac_address,
+			qdf_copy_macaddr(&curr_chan->mac_address,
 				     &adapter->macAddressCurrent);
 		} else {
 			mac_addr = wlan_hdd_get_intf_addr(adapter->pHddCtx);
@@ -877,7 +877,7 @@ static int __wlan_hdd_cfg80211_ocb_set_config(struct wiphy *wiphy,
 	 */
 	for (i = 0; i < config->channel_count; i++) {
 		if (i == 0) {
-			cdf_copy_macaddr(&config->channels[i].mac_address,
+			qdf_copy_macaddr(&config->channels[i].mac_address,
 				&adapter->macAddressCurrent);
 		} else {
 			mac_addr = wlan_hdd_get_intf_addr(adapter->pHddCtx);
@@ -888,7 +888,7 @@ static int __wlan_hdd_cfg80211_ocb_set_config(struct wiphy *wiphy,
 			cdf_mem_copy(config->channels[i].mac_address.bytes,
 				mac_addr, QDF_MAC_ADDR_SIZE);
 			/* Save the mac address to release later */
-			cdf_copy_macaddr(&adapter->ocb_mac_address[
+			qdf_copy_macaddr(&adapter->ocb_mac_address[
 				     adapter->ocb_mac_addr_count],
 				     &config->channels[i].mac_address);
 			adapter->ocb_mac_addr_count++;

+ 1 - 1
core/hdd/src/wlan_hdd_oemdata.c

@@ -554,7 +554,7 @@ static int oem_process_set_cap_req_msg(int oem_cap_len,
 					(struct sme_oem_capability *)oem_cap);
 	if (!QDF_IS_STATUS_SUCCESS(status))
 		hdd_err("error updating rm capability, status: %d", status);
-	error_code = cdf_status_to_os_return(status);
+	error_code = qdf_status_to_os_return(status);
 
 	skb = alloc_skb(NLMSG_SPACE(WLAN_NL_MAX_PAYLOAD), GFP_KERNEL);
 	if (skb == NULL) {

+ 2 - 2
core/hdd/src/wlan_hdd_power.c

@@ -135,7 +135,7 @@ static void hdd_conf_gtk_offload(hdd_adapter_t *pAdapter, bool fenable)
 	} else {
 		if ((eConnectionState_Associated ==
 		     pHddStaCtx->conn_info.connState)
-		    && (cdf_is_macaddr_equal(&pHddStaCtx->gtkOffloadReqParams.bssid,
+		    && (qdf_is_macaddr_equal(&pHddStaCtx->gtkOffloadReqParams.bssid,
 			       &pHddStaCtx->conn_info.bssId))
 		    && (GTK_OFFLOAD_ENABLE ==
 			pHddStaCtx->gtkOffloadReqParams.ulFlags)) {
@@ -387,7 +387,7 @@ static void hdd_conf_ns_offload(hdd_adapter_t *pAdapter, bool fenable)
 			}
 			offLoadRequest.offloadType =  SIR_IPV6_NS_OFFLOAD;
 			offLoadRequest.enableOrDisable = SIR_OFFLOAD_ENABLE;
-			cdf_copy_macaddr(&offLoadRequest.nsOffloadInfo.self_macaddr,
+			qdf_copy_macaddr(&offLoadRequest.nsOffloadInfo.self_macaddr,
 					 &pAdapter->macAddressCurrent);
 			/* set number of ns offload address count */
 			offLoadRequest.num_ns_offload_count = count;

+ 1 - 1
core/hdd/src/wlan_hdd_scan.c

@@ -787,7 +787,7 @@ static int __iw_set_scan(struct net_device *dev, struct iw_request_info *info,
 			scanRequest.scanType = eSIR_PASSIVE_SCAN;
 		}
 
-		cdf_set_macaddr_broadcast(&scanRequest.bssid);
+		qdf_set_macaddr_broadcast(&scanRequest.bssid);
 
 		/* set min and max channel time to zero */
 		scanRequest.minChnTime = 0;

+ 4 - 4
core/hdd/src/wlan_hdd_softap_tx_rx.c

@@ -200,8 +200,8 @@ int hdd_softap_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
 
 	pDestMacAddress = (struct qdf_mac_addr *) skb->data;
 
-	if (cdf_is_macaddr_broadcast(pDestMacAddress) ||
-	    cdf_is_macaddr_group(pDestMacAddress)) {
+	if (qdf_is_macaddr_broadcast(pDestMacAddress) ||
+	    qdf_is_macaddr_group(pDestMacAddress)) {
 		/* The BC/MC station ID is assigned during BSS
 		 * starting phase.  SAP will return the station ID
 		 * used for BC/MC traffic.
@@ -450,7 +450,7 @@ QDF_STATUS hdd_softap_init_tx_rx_sta(hdd_adapter_t *pAdapter, uint8_t STAId,
 
 	pAdapter->aStaInfo[STAId].isUsed = true;
 	pAdapter->aStaInfo[STAId].isDeauthInProgress = false;
-	cdf_copy_macaddr(&pAdapter->aStaInfo[STAId].macAddrSTA, pmacAddrSTA);
+	qdf_copy_macaddr(&pAdapter->aStaInfo[STAId].macAddrSTA, pmacAddrSTA);
 
 	spin_unlock_bh(&pAdapter->staInfo_lock);
 	return QDF_STATUS_SUCCESS;
@@ -866,7 +866,7 @@ QDF_STATUS hdd_softap_change_sta_state(hdd_adapter_t *pAdapter,
 	}
 
 	if (false ==
-	    cdf_is_macaddr_equal(&pAdapter->aStaInfo[ucSTAId].macAddrSTA,
+	    qdf_is_macaddr_equal(&pAdapter->aStaInfo[ucSTAId].macAddrSTA,
 				 pDestMacAddress)) {
 		CDF_TRACE(QDF_MODULE_ID_HDD_SAP_DATA, CDF_TRACE_LEVEL_ERROR,
 			  "%s: Station MAC address does not matching",

+ 2 - 2
core/hdd/src/wlan_hdd_stats.c

@@ -553,7 +553,7 @@ static bool hdd_get_interface_info(hdd_adapter_t *pAdapter,
 
 	pInfo->mode = hdd_map_device_to_ll_iface_mode(pAdapter->device_mode);
 
-	cdf_copy_macaddr(&pInfo->macAddr, &pAdapter->macAddressCurrent);
+	qdf_copy_macaddr(&pInfo->macAddr, &pAdapter->macAddressCurrent);
 
 	if (((WLAN_HDD_INFRA_STATION == pAdapter->device_mode) ||
 	     (WLAN_HDD_P2P_CLIENT == pAdapter->device_mode) ||
@@ -585,7 +585,7 @@ static bool hdd_get_interface_info(hdd_adapter_t *pAdapter,
 		if (eConnectionState_Associated ==
 		    pHddStaCtx->conn_info.connState) {
 			pInfo->state = WIFI_ASSOCIATED;
-			cdf_copy_macaddr(&pInfo->bssid,
+			qdf_copy_macaddr(&pInfo->bssid,
 					 &pHddStaCtx->conn_info.bssId);
 			cdf_mem_copy(pInfo->ssid,
 				     pHddStaCtx->conn_info.SSID.SSID.ssId,

+ 3 - 3
core/hdd/src/wlan_hdd_tx_rx.c

@@ -132,7 +132,7 @@ void hdd_tx_resume_cb(void *adapter_context, bool tx_resume)
 						   tx_flow_control_timer)) {
 			cdf_mc_timer_stop(&pAdapter->tx_flow_control_timer);
 		}
-		if (cdf_unlikely(hdd_sta_ctx->hdd_ReassocScenario)) {
+		if (qdf_unlikely(hdd_sta_ctx->hdd_ReassocScenario)) {
 			hddLog(LOGW,
 			       FL("flow control, tx queues un-pause avoided as we are in REASSOCIATING state"));
 			       return;
@@ -331,8 +331,8 @@ int hdd_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
 			STAId = HDD_WLAN_INVALID_STA_ID;
 
 		if ((STAId == HDD_WLAN_INVALID_STA_ID) &&
-		    (cdf_is_macaddr_broadcast(pDestMacAddress) ||
-		     cdf_is_macaddr_group(pDestMacAddress))) {
+		    (qdf_is_macaddr_broadcast(pDestMacAddress) ||
+		     qdf_is_macaddr_group(pDestMacAddress))) {
 			STAId = pHddStaCtx->broadcast_ibss_staid;
 			CDF_TRACE(QDF_MODULE_ID_HDD_DATA,
 				  CDF_TRACE_LEVEL_INFO_LOW, "%s: BC/MC packet",

+ 7 - 7
core/hdd/src/wlan_hdd_wext.c

@@ -1350,7 +1350,7 @@ QDF_STATUS wlan_hdd_get_linkspeed_for_peermac(hdd_adapter_t *pAdapter,
 	context.pAdapter = pAdapter;
 	context.magic = LINK_CONTEXT_MAGIC;
 
-	cdf_copy_macaddr(&linkspeed_req->peer_macaddr, &macAddress);
+	qdf_copy_macaddr(&linkspeed_req->peer_macaddr, &macAddress);
 	status = sme_get_link_speed(WLAN_HDD_GET_HAL_CTX(pAdapter),
 				    linkspeed_req,
 				    &context, hdd_get_link_speed_cb);
@@ -1421,7 +1421,7 @@ int wlan_hdd_get_link_speed(hdd_adapter_t *sta_adapter, uint32_t *link_speed)
 		QDF_STATUS status;
 		struct qdf_mac_addr bssid;
 
-		cdf_copy_macaddr(&bssid, &hdd_stactx->conn_info.bssId);
+		qdf_copy_macaddr(&bssid, &hdd_stactx->conn_info.bssId);
 
 		status = wlan_hdd_get_linkspeed_for_peermac(sta_adapter, bssid);
 		if (!QDF_IS_STATUS_SUCCESS(status)) {
@@ -1554,7 +1554,7 @@ void hdd_clear_roam_profile_ie(hdd_adapter_t *pAdapter)
 	pAdapter->wapi_info.nWapiMode = 0;
 #endif
 
-	cdf_zero_macaddr(&pWextState->req_bssId);
+	qdf_zero_macaddr(&pWextState->req_bssId);
 
 }
 
@@ -4107,7 +4107,7 @@ static int __iw_set_encodeext(struct net_device *dev,
 	if (ext->ext_flags & IW_ENCODE_EXT_GROUP_KEY) {
 		/*Key direction for group is RX only */
 		setKey.keyDirection = eSIR_RX_ONLY;
-		cdf_set_macaddr_broadcast(&setKey.peerMac);
+		qdf_set_macaddr_broadcast(&setKey.peerMac);
 	} else {
 
 		setKey.keyDirection = eSIR_TX_RX;
@@ -5072,7 +5072,7 @@ static int __iw_setint_getnone(struct net_device *dev,
 	{
 		struct qdf_mac_addr bssid;
 
-		cdf_copy_macaddr(&bssid, &pHddStaCtx->conn_info.bssId);
+		qdf_copy_macaddr(&bssid, &pHddStaCtx->conn_info.bssId);
 		if (sme_set_tx_power
 			    (hHal, pAdapter->sessionId, bssid,
 			    pAdapter->device_mode,
@@ -5091,8 +5091,8 @@ static int __iw_setint_getnone(struct net_device *dev,
 		hddLog(CDF_TRACE_LEVEL_INFO,
 		       "%s: Setting maximum tx power %d dBm", __func__,
 		       set_value);
-		cdf_copy_macaddr(&bssid, &pHddStaCtx->conn_info.bssId);
-		cdf_copy_macaddr(&selfMac, &pHddStaCtx->conn_info.bssId);
+		qdf_copy_macaddr(&bssid, &pHddStaCtx->conn_info.bssId);
+		qdf_copy_macaddr(&selfMac, &pHddStaCtx->conn_info.bssId);
 
 		if (sme_set_max_tx_power(hHal, bssid, selfMac, set_value)
 		    != QDF_STATUS_SUCCESS) {

+ 1 - 1
core/hdd/src/wlan_hdd_wmm.c

@@ -1656,7 +1656,7 @@ void hdd_wmm_classify_pkt(hdd_adapter_t *adapter,
 static
 uint16_t hdd_get_queue_index(uint16_t up, bool is_eapol)
 {
-	if (cdf_unlikely(is_eapol == true))
+	if (qdf_unlikely(is_eapol == true))
 		return HDD_LINUX_AC_HI_PRIO;
 	else
 		return hdd_linux_up_to_ac_map[up];

+ 1 - 1
core/hdd/src/wlan_hdd_wowl.c

@@ -522,7 +522,7 @@ bool hdd_enter_wowl(hdd_adapter_t *pAdapter, bool enable_mp, bool enable_pbm)
 	wowParams.ucMagicPktEnable = enable_mp;
 	wowParams.sessionId = pAdapter->sessionId;
 	if (enable_mp) {
-		cdf_copy_macaddr(&wowParams.magic_ptrn,
+		qdf_copy_macaddr(&wowParams.magic_ptrn,
 				 &pAdapter->macAddressCurrent);
 	}
 #ifdef WLAN_WAKEUP_EVENTS

+ 1 - 1
core/mac/src/pe/lim/lim_assoc_utils.c

@@ -755,7 +755,7 @@ lim_send_del_sta_cnf(tpAniSirGlobal pMac, struct qdf_mac_addr sta_dsaddr,
 		lim_log(pMac, LOGW,
 			FL("Lim Posting DEAUTH_CNF to Sme. Trigger: %d"),
 			mlmStaContext.cleanupTrigger);
-		cdf_copy_macaddr(&mlmDeauthCnf.peer_macaddr, &sta_dsaddr);
+		qdf_copy_macaddr(&mlmDeauthCnf.peer_macaddr, &sta_dsaddr);
 		mlmDeauthCnf.resultCode = statusCode;
 		mlmDeauthCnf.deauthTrigger = mlmStaContext.cleanupTrigger;
 		/* PE session Id */

+ 2 - 2
core/mac/src/pe/lim/lim_ft.c

@@ -1494,7 +1494,7 @@ bool lim_process_ft_update_key(tpAniSirGlobal pMac, uint32_t *pMsgBuf)
 			extSetStaKeyParam;
 
 		cdf_mem_zero(pMlmSetKeysReq, sizeof(tLimMlmSetKeysReq));
-		cdf_copy_macaddr(&pMlmSetKeysReq->peer_macaddr,
+		qdf_copy_macaddr(&pMlmSetKeysReq->peer_macaddr,
 				 &pKeyInfo->bssid);
 		pMlmSetKeysReq->sessionId = psessionEntry->peSessionId;
 		pMlmSetKeysReq->smesessionId = psessionEntry->smeSessionId;
@@ -1545,7 +1545,7 @@ bool lim_process_ft_update_key(tpAniSirGlobal pMac, uint32_t *pMsgBuf)
 			       FL("BSSID = " MAC_ADDRESS_STR),
 			       MAC_ADDR_ARRAY(pKeyInfo->bssid.bytes));)
 
-		cdf_copy_macaddr(&pAddBssParams->extSetStaKeyParam.peer_macaddr,
+		qdf_copy_macaddr(&pAddBssParams->extSetStaKeyParam.peer_macaddr,
 				 &pKeyInfo->bssid);
 
 		pAddBssParams->extSetStaKeyParam.sendRsp = false;

+ 2 - 2
core/mac/src/pe/lim/lim_p2p.c

@@ -98,10 +98,10 @@ static QDF_STATUS lim_send_hal_req_remain_on_chan_offload(tpAniSirGlobal pMac,
 	msg.bodyptr = pScanOffloadReq;
 	msg.bodyval = 0;
 
-	cdf_copy_macaddr(&pScanOffloadReq->selfMacAddr,
+	qdf_copy_macaddr(&pScanOffloadReq->selfMacAddr,
 			 &pRemOnChnReq->selfMacAddr);
 
-	cdf_set_macaddr_broadcast(&pScanOffloadReq->bssId);
+	qdf_set_macaddr_broadcast(&pScanOffloadReq->bssId);
 	pScanOffloadReq->scanType = eSIR_PASSIVE_SCAN;
 	pScanOffloadReq->p2pScanType = P2P_SCAN_TYPE_LISTEN;
 	pScanOffloadReq->minChannelTime = pRemOnChnReq->duration;

+ 8 - 8
core/mac/src/pe/lim/lim_process_mlm_req_messages.c

@@ -389,7 +389,7 @@ void lim_send_hal_oem_data_req(tpAniSirGlobal mac_ctx)
 	}
 
 	/* Now copy over the information to the OEM DATA REQ to HAL */
-	cdf_copy_macaddr(&start_oem_data_req->selfMacAddr,
+	qdf_copy_macaddr(&start_oem_data_req->selfMacAddr,
 			 &mac_ctx->lim.gpLimMlmOemDataReq->selfMacAddr);
 
 	start_oem_data_req->data_len =
@@ -1618,7 +1618,7 @@ lim_process_mlm_disassoc_req_ntf(tpAniSirGlobal mac_ctx,
 	switch (GET_LIM_SYSTEM_ROLE(session)) {
 	case eLIM_STA_ROLE:
 	case eLIM_BT_AMP_STA_ROLE:
-		if (!cdf_is_macaddr_equal(&mlm_disassocreq->peer_macaddr,
+		if (!qdf_is_macaddr_equal(&mlm_disassocreq->peer_macaddr,
 				     &curr_bssid)) {
 			lim_log(mac_ctx, LOGW,
 			  FL("received MLM_DISASSOC_REQ with invalid BSS id"));
@@ -1650,7 +1650,7 @@ lim_process_mlm_disassoc_req_ntf(tpAniSirGlobal mac_ctx,
 			sme_disassoc_rsp->transactionId = 0;
 			sme_disassoc_rsp->statusCode = eSIR_SME_DEAUTH_STATUS;
 
-			cdf_copy_macaddr(&sme_disassoc_rsp->peer_macaddr,
+			qdf_copy_macaddr(&sme_disassoc_rsp->peer_macaddr,
 					 &mlm_disassocreq->peer_macaddr);
 			msg = (uint32_t *)sme_disassoc_rsp;
 
@@ -2147,7 +2147,7 @@ lim_process_mlm_deauth_req_ntf(tpAniSirGlobal mac_ctx,
 				   session, true);
 	return;
 end:
-	cdf_copy_macaddr(&mlm_deauth_cnf.peer_macaddr,
+	qdf_copy_macaddr(&mlm_deauth_cnf.peer_macaddr,
 			 &mlm_deauth_req->peer_macaddr);
 	mlm_deauth_cnf.deauthTrigger = mlm_deauth_req->deauthTrigger;
 	mlm_deauth_cnf.aid = mlm_deauth_req->aid;
@@ -2271,9 +2271,9 @@ lim_process_mlm_set_keys_req(tpAniSirGlobal mac_ctx, uint32_t *msg_buf)
 		 * check if TDLS is enabled.
 		 */
 #ifndef FEATURE_WLAN_TDLS
-		if ((!cdf_is_macaddr_broadcast(
+		if ((!qdf_is_macaddr_broadcast(
 				&mlm_set_keys_req->peer_macaddr)) &&
-		    (!cdf_is_macaddr_equal(&mlm_set_keys_req->peer_macaddr,
+		    (!qdf_is_macaddr_equal(&mlm_set_keys_req->peer_macaddr,
 					   &curr_bssid))) {
 			lim_log(mac_ctx, LOGW,
 				FL("Received MLM_SETKEYS_REQ with invalid BSSID"
@@ -2306,7 +2306,7 @@ lim_process_mlm_set_keys_req(tpAniSirGlobal mac_ctx, uint32_t *msg_buf)
 	 * mlm_set_keys_req->key.unicast = 0 -> Multicast/broadcast
 	 * mlm_set_keys_req->key.unicast - 1 -> Unicast keys are being set
 	 */
-	if (cdf_is_macaddr_broadcast(&mlm_set_keys_req->peer_macaddr)) {
+	if (qdf_is_macaddr_broadcast(&mlm_set_keys_req->peer_macaddr)) {
 		lim_log(mac_ctx, LOG1, FL("Trying to set Group Keys...%d "),
 			mlm_set_keys_req->sessionId);
 		/*
@@ -2379,7 +2379,7 @@ lim_process_mlm_set_keys_req(tpAniSirGlobal mac_ctx, uint32_t *msg_buf)
 		FL("Trying to set keys for STA Index [%d], using default_key_id [%d]"),
 		sta_idx, default_key_id);
 
-	if (cdf_is_macaddr_broadcast(&mlm_set_keys_req->peer_macaddr)) {
+	if (qdf_is_macaddr_broadcast(&mlm_set_keys_req->peer_macaddr)) {
 		session->limPrevMlmState = session->limMlmState;
 		session->limMlmState = eLIM_MLM_WT_SET_BSS_KEY_STATE;
 		MTRACE(mac_trace(mac_ctx, TRACE_CODE_MLM_STATE,

+ 2 - 2
core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c

@@ -3260,7 +3260,7 @@ void lim_process_mlm_set_sta_key_rsp(tpAniSirGlobal mac_ctx,
 			(tpLimMlmSetKeysReq) mac_ctx->lim.gpLimMlmSetKeysReq;
 		/* Prepare and Send LIM_MLM_SETKEYS_CNF */
 		if (NULL != lpLimMlmSetKeysReq) {
-			cdf_copy_macaddr(&mlm_set_key_cnf.peer_macaddr,
+			qdf_copy_macaddr(&mlm_set_key_cnf.peer_macaddr,
 					 &lpLimMlmSetKeysReq->peer_macaddr);
 			/*
 			 * Free the buffer cached for the global
@@ -3348,7 +3348,7 @@ void lim_process_mlm_set_bss_key_rsp(tpAniSirGlobal mac_ctx,
 
 	/* Prepare and Send LIM_MLM_SETKEYS_CNF */
 	if (NULL != set_key_req) {
-		cdf_copy_macaddr(&set_key_cnf.peer_macaddr,
+		qdf_copy_macaddr(&set_key_cnf.peer_macaddr,
 				 &set_key_req->peer_macaddr);
 		/*
 		 * Free the buffer cached for the

+ 3 - 3
core/mac/src/pe/lim/lim_process_probe_req_frame.c

@@ -81,7 +81,7 @@ void lim_get_wpspbc_sessions(tpAniSirGlobal mac_ctx, struct qdf_mac_addr addr,
 
 	cur_time = (uint32_t) (cdf_mc_timer_get_system_ticks() /
 						QDF_TICKS_PER_SECOND);
-	cdf_zero_macaddr(&addr);
+	qdf_zero_macaddr(&addr);
 	cdf_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)
@@ -89,7 +89,7 @@ void lim_get_wpspbc_sessions(tpAniSirGlobal mac_ctx, struct qdf_mac_addr addr,
 		count++;
 		if (count > 1)
 			break;
-		cdf_copy_macaddr(&addr, &pbc->addr);
+		qdf_copy_macaddr(&addr, &pbc->addr);
 		cdf_mem_copy((uint8_t *) uuid_e, (uint8_t *) pbc->uuid_e,
 				SIR_WPS_UUID_LEN);
 	}
@@ -159,7 +159,7 @@ void lim_remove_pbc_sessions(tpAniSirGlobal mac, struct qdf_mac_addr remove_mac,
 	prev = pbc = session_entry->pAPWPSPBCSession;
 
 	while (pbc) {
-		if (cdf_is_macaddr_equal(&pbc->addr, &remove_mac)) {
+		if (qdf_is_macaddr_equal(&pbc->addr, &remove_mac)) {
 			prev->next = pbc->next;
 			if (pbc == session_entry->pAPWPSPBCSession)
 				session_entry->pAPWPSPBCSession = pbc->next;

+ 8 - 8
core/mac/src/pe/lim/lim_process_sme_req_messages.c

@@ -358,7 +358,7 @@ __lim_fresh_scan_reqd(tpAniSirGlobal mac_ctx, uint8_t return_fresh_results)
 
 static inline uint8_t __lim_is_sme_assoc_cnf_valid(tpSirSmeAssocCnf pAssocCnf)
 {
-	if (cdf_is_macaddr_group(&pAssocCnf->peer_macaddr))
+	if (qdf_is_macaddr_group(&pAssocCnf->peer_macaddr))
 		return false;
 	else
 		return true;
@@ -1232,7 +1232,7 @@ static QDF_STATUS lim_send_hal_start_scan_offload_req(tpAniSirGlobal pMac,
 	msg.bodyptr = pScanOffloadReq;
 	msg.bodyval = 0;
 
-	cdf_copy_macaddr(&pScanOffloadReq->bssId, &pScanReq->bssId);
+	qdf_copy_macaddr(&pScanOffloadReq->bssId, &pScanReq->bssId);
 
 	if (pScanReq->numSsid > SIR_SCAN_MAX_NUM_SSID) {
 		lim_log(pMac, LOGE,
@@ -1251,7 +1251,7 @@ static QDF_STATUS lim_send_hal_start_scan_offload_req(tpAniSirGlobal pMac,
 	}
 
 	pScanOffloadReq->hiddenSsid = pScanReq->hiddenSsid;
-	cdf_copy_macaddr(&pScanOffloadReq->selfMacAddr, &pScanReq->selfMacAddr);
+	qdf_copy_macaddr(&pScanOffloadReq->selfMacAddr, &pScanReq->selfMacAddr);
 	pScanOffloadReq->bssType = pScanReq->bssType;
 	pScanOffloadReq->dot11mode = pScanReq->dot11mode;
 	pScanOffloadReq->scanType = pScanReq->scanType;
@@ -1461,7 +1461,7 @@ static void __lim_process_sme_oem_data_req(tpAniSirGlobal pMac, uint32_t *pMsgBu
 		return;
 	}
 
-	cdf_copy_macaddr(&pMlmOemDataReq->selfMacAddr,
+	qdf_copy_macaddr(&pMlmOemDataReq->selfMacAddr,
 			 &pOemDataReq->selfMacAddr);
 	pMlmOemDataReq->data_len = pOemDataReq->data_len;
 	cdf_mem_copy(pMlmOemDataReq->data, pOemDataReq->data,
@@ -2538,7 +2538,7 @@ static void __lim_process_sme_disassoc_req(tpAniSirGlobal pMac, uint32_t *pMsgBu
 		return;
 	}
 
-	cdf_copy_macaddr(&pMlmDisassocReq->peer_macaddr,
+	qdf_copy_macaddr(&pMlmDisassocReq->peer_macaddr,
 			 &smeDisassocReq.peer_macaddr);
 
 	pMlmDisassocReq->reasonCode = reasonCode;
@@ -2874,7 +2874,7 @@ static void __lim_process_sme_deauth_req(tpAniSirGlobal mac_ctx,
 		return;
 	}
 
-	cdf_copy_macaddr(&mlm_deauth_req->peer_macaddr,
+	qdf_copy_macaddr(&mlm_deauth_req->peer_macaddr,
 			 &sme_deauth_req.peer_macaddr);
 
 	mlm_deauth_req->reasonCode = reason_code;
@@ -2990,7 +2990,7 @@ __lim_process_sme_set_context_req(tpAniSirGlobal mac_ctx, uint32_t *msg_buf)
 				"no.of keys exceeded max num of default keys limit"));
 			goto end;
 		}
-		cdf_copy_macaddr(&mlm_set_key_req->peer_macaddr,
+		qdf_copy_macaddr(&mlm_set_key_req->peer_macaddr,
 				 &set_context_req->peer_macaddr);
 
 		cdf_mem_copy((uint8_t *) &mlm_set_key_req->key,
@@ -3211,7 +3211,7 @@ void lim_process_sme_get_wpspbc_sessions(tpAniSirGlobal mac_ctx,
 	sap_event.sapHddEventCode = eSAP_GET_WPSPBC_SESSION_EVENT;
 	sap_get_wpspbc_event->module = QDF_MODULE_ID_PE;
 
-	if (cdf_is_macaddr_zero(&get_wps_pbc_sessions_req.remove_mac)) {
+	if (qdf_is_macaddr_zero(&get_wps_pbc_sessions_req.remove_mac)) {
 		lim_get_wpspbc_sessions(mac_ctx,
 				sap_get_wpspbc_event->addr,
 				sap_get_wpspbc_event->UUID_E,

+ 2 - 2
core/mac/src/pe/lim/lim_process_tdls.c

@@ -2862,7 +2862,7 @@ void lim_send_sme_tdls_link_establish_req_rsp(tpAniSirGlobal pMac,
 	}
 	pTdlsLinkEstablishReqRsp->statusCode = status;
 	if (peermac)
-		cdf_copy_macaddr(&pTdlsLinkEstablishReqRsp->peermac, peermac);
+		qdf_copy_macaddr(&pTdlsLinkEstablishReqRsp->peermac, peermac);
 
 	pTdlsLinkEstablishReqRsp->sessionId = sessionId;
 	mmhMsg.type = eWNI_SME_TDLS_LINK_ESTABLISH_RSP;
@@ -2898,7 +2898,7 @@ static QDF_STATUS lim_send_sme_tdls_del_sta_rsp(tpAniSirGlobal pMac,
 	} else
 		pDelSta->staId = STA_INVALID_IDX;
 
-	cdf_copy_macaddr(&pDelSta->peermac, &peerMac);
+	qdf_copy_macaddr(&pDelSta->peermac, &peerMac);
 
 	pDelSta->length = sizeof(tSirTdlsDelStaRsp);
 	pDelSta->messageType = eWNI_SME_TDLS_DEL_STA_RSP;

+ 9 - 8
core/mac/src/pe/lim/lim_security_utils.c

@@ -108,7 +108,7 @@ lim_is_auth_algo_supported(tpAniSirGlobal pMac, tAniAuthType authType,
 
 			return false;
 		} else
-			return ((algoEnable > 0 ? true : false));
+			return algoEnable > 0 ? true : false;
 	} else {
 
 		if (LIM_IS_AP_ROLE(psessionEntry)) {
@@ -138,8 +138,7 @@ lim_is_auth_algo_supported(tpAniSirGlobal pMac, tAniAuthType authType,
 		} else
 
 		if (wlan_cfg_get_int(pMac, WNI_CFG_PRIVACY_ENABLED,
-				     &privacyOptImp) != eSIR_SUCCESS)
-		{
+				     &privacyOptImp) != eSIR_SUCCESS) {
 			/**
 			 * Could not get PrivacyOptionImplemented value
 			 * from CFG. Log error.
@@ -150,7 +149,7 @@ lim_is_auth_algo_supported(tpAniSirGlobal pMac, tAniAuthType authType,
 
 			return false;
 		}
-		return (algoEnable && privacyOptImp);
+		return algoEnable && privacyOptImp;
 	}
 } /****** end lim_is_auth_algo_supported() ******/
 
@@ -775,7 +774,7 @@ void lim_post_sme_set_keys_cnf(tpAniSirGlobal pMac,
 			       tLimMlmSetKeysCnf *mlmSetKeysCnf)
 {
 	/* Prepare and Send LIM_MLM_SETKEYS_CNF */
-	cdf_copy_macaddr(&mlmSetKeysCnf->peer_macaddr,
+	qdf_copy_macaddr(&mlmSetKeysCnf->peer_macaddr,
 			 &pMlmSetKeysReq->peer_macaddr);
 
 	/* Free up buffer allocated for mlmSetKeysReq */
@@ -882,7 +881,8 @@ void lim_send_set_bss_key_req(tpAniSirGlobal pMac,
 
 	lim_log(pMac, LOGW, FL("Sending WMA_SET_BSSKEY_REQ..."));
 	MTRACE(mac_trace_msg_tx(pMac, psessionEntry->peSessionId, msgQ.type));
-	if (eSIR_SUCCESS != (retCode = wma_post_ctrl_msg(pMac, &msgQ))) {
+	retCode = wma_post_ctrl_msg(pMac, &msgQ);
+	if (eSIR_SUCCESS != retCode) {
 		lim_log(pMac, LOGE,
 			FL("Posting SET_BSSKEY to HAL failed, reason=%X"),
 			retCode);
@@ -964,7 +964,7 @@ void lim_send_set_sta_key_req(tpAniSirGlobal pMac,
 	pSetStaKeyParams->defWEPIdx = defWEPIdx;
 
 	pSetStaKeyParams->smesessionId = pMlmSetKeysReq->smesessionId;
-	cdf_copy_macaddr(&pSetStaKeyParams->peer_macaddr,
+	qdf_copy_macaddr(&pSetStaKeyParams->peer_macaddr,
 			 &pMlmSetKeysReq->peer_macaddr);
 
 	if (sendRsp == true) {
@@ -1056,7 +1056,8 @@ void lim_send_set_sta_key_req(tpAniSirGlobal pMac,
 
 	lim_log(pMac, LOG1, FL("Sending WMA_SET_STAKEY_REQ..."));
 	MTRACE(mac_trace_msg_tx(pMac, sessionEntry->peSessionId, msgQ.type));
-	if (eSIR_SUCCESS != (retCode = wma_post_ctrl_msg(pMac, &msgQ))) {
+	retCode = wma_post_ctrl_msg(pMac, &msgQ);
+	if (eSIR_SUCCESS != retCode) {
 		lim_log(pMac, LOGE,
 			FL("Posting SET_STAKEY to HAL failed, reason=%X"),
 			retCode);

+ 1 - 1
core/mac/src/pe/lim/lim_send_management_frames.c

@@ -3111,7 +3111,7 @@ QDF_STATUS lim_send_deauth_cnf(tpAniSirGlobal pMac)
 	}
 	return QDF_STATUS_SUCCESS;
 end:
-	cdf_copy_macaddr(&mlmDeauthCnf.peer_macaddr,
+	qdf_copy_macaddr(&mlmDeauthCnf.peer_macaddr,
 			 &pMlmDeauthReq->peer_macaddr);
 	mlmDeauthCnf.deauthTrigger = pMlmDeauthReq->deauthTrigger;
 	mlmDeauthCnf.aid = pMlmDeauthReq->aid;

+ 2 - 2
core/mac/src/pe/lim/lim_send_sme_rsp_messages.c

@@ -1581,7 +1581,7 @@ lim_send_sme_set_context_rsp(tpAniSirGlobal pMac,
 	pSirSmeSetContextRsp->length = sizeof(tSirSmeSetContextRsp);
 	pSirSmeSetContextRsp->statusCode = resultCode;
 
-	cdf_copy_macaddr(&pSirSmeSetContextRsp->peer_macaddr, &peer_macaddr);
+	qdf_copy_macaddr(&pSirSmeSetContextRsp->peer_macaddr, &peer_macaddr);
 
 	/* Update SME session and transaction Id */
 	pSirSmeSetContextRsp->sessionId = smesessionId;
@@ -1769,7 +1769,7 @@ lim_send_sme_delts_rsp(tpAniSirGlobal pMac, tpSirDeltsReq delts, uint32_t status
 	if (psessionEntry != NULL) {
 
 		rsp->aid = delts->aid;
-		cdf_copy_macaddr(&rsp->macaddr, &delts->macaddr);
+		qdf_copy_macaddr(&rsp->macaddr, &delts->macaddr);
 		cdf_mem_copy((uint8_t *) &rsp->rsp, (uint8_t *) &delts->req,
 			     sizeof(tSirDeltsReqInfo));
 	}

+ 8 - 8
core/mac/src/pe/lim/lim_sme_req_utils.c

@@ -585,8 +585,8 @@ lim_is_sme_disassoc_req_valid(tpAniSirGlobal pMac,
 			      tpSirSmeDisassocReq pDisassocReq,
 			      tpPESession psessionEntry)
 {
-	if (cdf_is_macaddr_group(&pDisassocReq->peer_macaddr) &&
-	    !cdf_is_macaddr_broadcast(&pDisassocReq->peer_macaddr))
+	if (qdf_is_macaddr_group(&pDisassocReq->peer_macaddr) &&
+	    !qdf_is_macaddr_broadcast(&pDisassocReq->peer_macaddr))
 		return false;
 
 	return true;
@@ -618,7 +618,7 @@ lim_is_sme_disassoc_cnf_valid(tpAniSirGlobal pMac,
 			      tpSirSmeDisassocCnf pDisassocCnf,
 			      tpPESession psessionEntry)
 {
-	if (cdf_is_macaddr_group(&pDisassocCnf->peer_macaddr))
+	if (qdf_is_macaddr_group(&pDisassocCnf->peer_macaddr))
 		return false;
 
 	return true;
@@ -648,8 +648,8 @@ uint8_t
 lim_is_sme_deauth_req_valid(tpAniSirGlobal pMac, tpSirSmeDeauthReq pDeauthReq,
 			    tpPESession psessionEntry)
 {
-	if (cdf_is_macaddr_group(&pDeauthReq->peer_macaddr) &&
-	    !cdf_is_macaddr_broadcast(&pDeauthReq->peer_macaddr))
+	if (qdf_is_macaddr_group(&pDeauthReq->peer_macaddr) &&
+	    !qdf_is_macaddr_broadcast(&pDeauthReq->peer_macaddr))
 		return false;
 
 	return true;
@@ -699,8 +699,8 @@ uint8_t lim_is_sme_scan_req_valid(tpAniSirGlobal pMac, tpSirSmeScanReq pScanReq)
 		lim_log(pMac, LOGE, FL("Invalid BSS Type"));
 		valid = false;
 	}
-	if (cdf_is_macaddr_group(&pScanReq->bssId) &&
-		!cdf_is_macaddr_broadcast(&pScanReq->bssId)) {
+	if (qdf_is_macaddr_group(&pScanReq->bssId) &&
+		!qdf_is_macaddr_broadcast(&pScanReq->bssId)) {
 		valid = false;
 		lim_log(pMac, LOGE,
 			FL("BSSID is group addr and is not Broadcast Addr"));
@@ -923,5 +923,5 @@ uint8_t *lim_get_bss_id_from_sme_join_req_msg(uint8_t *pBuf)
 
 	pBuf += sizeof(uint16_t);       /* skip length of BSS description */
 
-	return (pBuf);
+	return pBuf;
 } /*** end lim_get_bss_id_from_sme_join_req_msg() ***/

+ 1 - 1
core/mac/src/pe/rrm/rrm_api.c

@@ -216,7 +216,7 @@ tSirRetStatus rrm_set_max_tx_power_rsp(tpAniSirGlobal pMac, tpSirMsgQ limMsgQ)
 	tpPESession pSessionEntry;
 	uint8_t sessionId, i;
 
-	if (cdf_is_macaddr_broadcast(&pMaxTxParams->bssId)) {
+	if (qdf_is_macaddr_broadcast(&pMaxTxParams->bssId)) {
 		for (i = 0; i < pMac->lim.maxBssId; i++) {
 			if ((pMac->lim.gpSession[i].valid == true)) {
 				pSessionEntry = &pMac->lim.gpSession[i];

+ 1 - 1
core/sap/dfs/inc/dfs.h

@@ -50,7 +50,7 @@
 
 #include <qdf_net_types.h>      /* QDF_NBUF_EXEMPT_NO_EXEMPTION, etc. */
 #include <cdf_nbuf.h>           /* cdf_nbuf_t, etc. */
-#include <cdf_util.h>           /* cdf_assert */
+#include <qdf_util.h>           /* qdf_assert */
 #include <qdf_lock.h>           /* cdf_spinlock */
 #include <cds_queue.h>          /* TAILQ */
 #include <qdf_time.h>

+ 6 - 6
core/sap/src/sap_fsm.c

@@ -49,7 +49,7 @@
 #include "cds_utils.h"
 #include "cds_ieee80211_common_i.h"
 #include "cds_reg_service.h"
-#include "cdf_util.h"
+#include "qdf_util.h"
 #include "cds_concurrency.h"
 
 /*----------------------------------------------------------------------------
@@ -2488,7 +2488,7 @@ QDF_STATUS sap_signal_hdd_event(ptSapContext sap_ctx,
 		sap_ap_event.sapHddEventCode = eSAP_STA_ASSOC_IND;
 		assoc_ind = &sap_ap_event.sapevt.sapAssocIndication;
 
-		cdf_copy_macaddr(&assoc_ind->staMac, &csr_roaminfo->peerMac);
+		qdf_copy_macaddr(&assoc_ind->staMac, &csr_roaminfo->peerMac);
 		assoc_ind->staId = csr_roaminfo->staId;
 		assoc_ind->status = 0;
 		/* Required for indicating the frames to upper layer */
@@ -2569,7 +2569,7 @@ QDF_STATUS sap_signal_hdd_event(ptSapContext sap_ctx,
 		else
 			sap_ap_event.sapHddEventCode = eSAP_STA_ASSOC_EVENT;
 
-		cdf_copy_macaddr(&reassoc_complete->staMac,
+		qdf_copy_macaddr(&reassoc_complete->staMac,
 				 &csr_roaminfo->peerMac);
 		reassoc_complete->staId = csr_roaminfo->staId;
 		reassoc_complete->statusCode = csr_roaminfo->statusCode;
@@ -2621,7 +2621,7 @@ QDF_STATUS sap_signal_hdd_event(ptSapContext sap_ctx,
 		disassoc_comp =
 			&sap_ap_event.sapevt.sapStationDisassocCompleteEvent;
 
-		cdf_copy_macaddr(&disassoc_comp->staMac,
+		qdf_copy_macaddr(&disassoc_comp->staMac,
 				 &csr_roaminfo->peerMac);
 		disassoc_comp->staId = csr_roaminfo->staId;
 		if (csr_roaminfo->reasonCode == eCSR_ROAM_RESULT_FORCED)
@@ -2638,7 +2638,7 @@ QDF_STATUS sap_signal_hdd_event(ptSapContext sap_ctx,
 		key_complete =
 			&sap_ap_event.sapevt.sapStationSetKeyCompleteEvent;
 		key_complete->status = (eSapStatus) context;
-		cdf_copy_macaddr(&key_complete->peerMacAddr,
+		qdf_copy_macaddr(&key_complete->peerMacAddr,
 				 &csr_roaminfo->peerMac);
 		break;
 
@@ -2707,7 +2707,7 @@ QDF_STATUS sap_signal_hdd_event(ptSapContext sap_ctx,
 
 	case eSAP_MAX_ASSOC_EXCEEDED:
 		sap_ap_event.sapHddEventCode = eSAP_MAX_ASSOC_EXCEEDED;
-		cdf_copy_macaddr(&sap_ap_event.sapevt.
+		qdf_copy_macaddr(&sap_ap_event.sapevt.
 				 sapMaxAssocExceeded.macaddr,
 				 &csr_roaminfo->peerMac);
 		break;

+ 2 - 2
core/sap/src/sap_module.c

@@ -43,7 +43,7 @@
  * Include Files
  * -------------------------------------------------------------------------*/
 #include "cdf_trace.h"
-#include "cdf_util.h"
+#include "qdf_util.h"
 /* Pick up the sme callback registration API */
 #include "sme_api.h"
 
@@ -3103,7 +3103,7 @@ void wlansap_populate_del_sta_params(const uint8_t *mac,
 				     struct tagCsrDelStaParams *pDelStaParams)
 {
 	if (NULL == mac)
-		cdf_set_macaddr_broadcast(&pDelStaParams->peerMacAddr);
+		qdf_set_macaddr_broadcast(&pDelStaParams->peerMacAddr);
 	else
 		cdf_mem_copy(pDelStaParams->peerMacAddr.bytes, mac,
 			     QDF_MAC_ADDR_SIZE);

+ 15 - 15
core/sme/src/common/sme_api.c

@@ -1455,7 +1455,7 @@ QDF_STATUS sme_update_roam_params(tHalHandle hal,
 		roam_params_dst->num_bssid_avoid_list =
 			roam_params_src.num_bssid_avoid_list;
 		for (i = 0; i < roam_params_dst->num_bssid_avoid_list; i++) {
-			cdf_copy_macaddr(&roam_params_dst->bssid_avoid_list[i],
+			qdf_copy_macaddr(&roam_params_dst->bssid_avoid_list[i],
 					&roam_params_src.bssid_avoid_list[i]);
 		}
 		break;
@@ -5187,7 +5187,7 @@ QDF_STATUS sme_dhcp_start_ind(tHalHandle hHal,
 		pMsg->device_mode = device_mode;
 		cdf_mem_copy(pMsg->adapterMacAddr.bytes, macAddr,
 			     QDF_MAC_ADDR_SIZE);
-		cdf_copy_macaddr(&pMsg->peerMacAddr,
+		qdf_copy_macaddr(&pMsg->peerMacAddr,
 				 &pSession->connectedProfile.bssid);
 
 		cds_message.type = WMA_DHCP_START_IND;
@@ -5258,7 +5258,7 @@ QDF_STATUS sme_dhcp_stop_ind(tHalHandle hHal,
 		pMsg->device_mode = device_mode;
 		cdf_mem_copy(pMsg->adapterMacAddr.bytes, macAddr,
 			     QDF_MAC_ADDR_SIZE);
-		cdf_copy_macaddr(&pMsg->peerMacAddr,
+		qdf_copy_macaddr(&pMsg->peerMacAddr,
 				 &pSession->connectedProfile.bssid);
 
 		cds_message.type = WMA_DHCP_STOP_IND;
@@ -5808,7 +5808,7 @@ QDF_STATUS sme_set_gtk_offload(tHalHandle hHal,
 		return QDF_STATUS_E_NOMEM;
 	}
 
-	cdf_copy_macaddr(&pGtkOffload->bssid,
+	qdf_copy_macaddr(&pGtkOffload->bssid,
 			 &pSession->connectedProfile.bssid);
 
 	*request_buf = *pGtkOffload;
@@ -5861,7 +5861,7 @@ QDF_STATUS sme_get_gtk_offload(tHalHandle hHal,
 		return QDF_STATUS_E_NOMEM;
 	}
 
-	cdf_copy_macaddr(&request_buf->bssid,
+	qdf_copy_macaddr(&request_buf->bssid,
 			 &pSession->connectedProfile.bssid);
 
 	msg.type = WMA_GTK_OFFLOAD_GETINFO_REQ;
@@ -5925,7 +5925,7 @@ QDF_STATUS sme_set_keep_alive(tHalHandle hHal, uint8_t session_id,
 		return QDF_STATUS_E_NOMEM;
 	}
 
-	cdf_copy_macaddr(&request->bssid, &pSession->connectedProfile.bssid);
+	qdf_copy_macaddr(&request->bssid, &pSession->connectedProfile.bssid);
 	cdf_mem_copy(request_buf, request, sizeof(tSirKeepAliveReq));
 
 	CDF_TRACE(QDF_MODULE_ID_SME, CDF_TRACE_LEVEL_INFO_LOW,
@@ -7308,8 +7308,8 @@ QDF_STATUS sme_8023_multicast_list(tHalHandle hHal, uint8_t sessionId,
 	cdf_mem_copy(request_buf, pMulticastAddrs,
 		     sizeof(tSirRcvFltMcAddrList));
 
-	cdf_copy_macaddr(&request_buf->self_macaddr, &pSession->selfMacAddr);
-	cdf_copy_macaddr(&request_buf->bssid,
+	qdf_copy_macaddr(&request_buf->self_macaddr, &pSession->selfMacAddr);
+	qdf_copy_macaddr(&request_buf->bssid,
 			 &pSession->connectedProfile.bssid);
 
 	msg.type = WMA_8023_MULTICAST_LIST_REQ;
@@ -7361,9 +7361,9 @@ QDF_STATUS sme_receive_filter_set_filter(tHalHandle hHal,
 		return QDF_STATUS_E_FAILURE;
 	}
 
-	cdf_copy_macaddr(&pRcvPktFilterCfg->self_macaddr,
+	qdf_copy_macaddr(&pRcvPktFilterCfg->self_macaddr,
 			 &pSession->selfMacAddr);
-	cdf_copy_macaddr(&pRcvPktFilterCfg->bssid,
+	qdf_copy_macaddr(&pRcvPktFilterCfg->bssid,
 			 &pSession->connectedProfile.bssid);
 	cdf_mem_copy(request_buf, pRcvPktFilterCfg, allocSize);
 
@@ -7449,9 +7449,9 @@ QDF_STATUS sme_receive_filter_clear_filter(tHalHandle hHal,
 		return QDF_STATUS_E_NOMEM;
 	}
 
-	cdf_copy_macaddr(&pRcvFltPktClearParam->self_macaddr,
+	qdf_copy_macaddr(&pRcvFltPktClearParam->self_macaddr,
 			 &pSession->selfMacAddr);
-	cdf_copy_macaddr(&pRcvFltPktClearParam->bssid,
+	qdf_copy_macaddr(&pRcvFltPktClearParam->bssid,
 			 &pSession->connectedProfile.bssid);
 
 	cdf_mem_copy(request_buf, pRcvFltPktClearParam,
@@ -7617,8 +7617,8 @@ QDF_STATUS sme_set_max_tx_power(tHalHandle hHal, struct qdf_mac_addr pBssid,
 		return QDF_STATUS_E_NOMEM;
 	}
 
-	cdf_copy_macaddr(&pMaxTxParams->bssId, &pBssid);
-	cdf_copy_macaddr(&pMaxTxParams->selfStaMacAddr, &pSelfMacAddress);
+	qdf_copy_macaddr(&pMaxTxParams->bssId, &pBssid);
+	qdf_copy_macaddr(&pMaxTxParams->selfStaMacAddr, &pSelfMacAddress);
 	pMaxTxParams->power = dB;
 
 	msg.type = WMA_SET_MAX_TX_POWER_REQ;
@@ -7711,7 +7711,7 @@ QDF_STATUS sme_set_tx_power(tHalHandle hHal, uint8_t sessionId,
 		return QDF_STATUS_E_NOMEM;
 	}
 
-	cdf_copy_macaddr(&pTxParams->bssId, &pBSSId);
+	qdf_copy_macaddr(&pTxParams->bssId, &pBSSId);
 	pTxParams->power = power;       /* unit is dBm */
 	pTxParams->dev_mode = dev_mode;
 	msg.type = WMA_SET_TX_POWER_REQ;

+ 1 - 1
core/sme/src/common/sme_ft_api.c

@@ -329,7 +329,7 @@ QDF_STATUS sme_ft_send_update_key_ind(tHalHandle hal, uint32_t session_id,
 		}
 	}
 
-	cdf_copy_macaddr(&msg->bssid, &ftkey_info->peerMac);
+	qdf_copy_macaddr(&msg->bssid, &ftkey_info->peerMac);
 	msg->smeSessionId = session_id;
 	sms_log(mac_ctx, LOG1, "BSSID = " MAC_ADDRESS_STR,
 		MAC_ADDR_ARRAY(msg->bssid.bytes));

+ 3 - 3
core/sme/src/common/sme_power_save.c

@@ -257,7 +257,7 @@ QDF_STATUS sme_ps_enter_wowl_req_params(tpAniSirGlobal mac_ctx,
 	hal_wowl_params->ucMagicPktEnable = sme_wowl_params->ucMagicPktEnable;
 	hal_wowl_params->ucPatternFilteringEnable =
 		sme_wowl_params->ucPatternFilteringEnable;
-	cdf_copy_macaddr(&hal_wowl_params->magic_ptrn,
+	qdf_copy_macaddr(&hal_wowl_params->magic_ptrn,
 			 &sme_wowl_params->magic_ptrn);
 
 #ifdef WLAN_WAKEUP_EVENTS
@@ -989,7 +989,7 @@ QDF_STATUS sme_set_ps_host_offload(tHalHandle hal_ctx,
 		return QDF_STATUS_E_NOMEM;
 	}
 
-	cdf_copy_macaddr(&request->bssid, &session->connectedProfile.bssid);
+	qdf_copy_macaddr(&request->bssid, &session->connectedProfile.bssid);
 
 	cdf_mem_copy(request_buf, request, sizeof(tSirHostOffloadReq));
 
@@ -1031,7 +1031,7 @@ QDF_STATUS sme_set_ps_ns_offload(tHalHandle hal_ctx,
 		return QDF_STATUS_E_FAILURE;
 	}
 
-	cdf_copy_macaddr(&request->bssid, &session->connectedProfile.bssid);
+	qdf_copy_macaddr(&request->bssid, &session->connectedProfile.bssid);
 
 	request_buf = cdf_mem_malloc(sizeof(*request_buf));
 	if (NULL == request_buf) {

+ 53 - 53
core/sme/src/csr/csr_api_roam.c

@@ -3051,7 +3051,7 @@ QDF_STATUS csr_roam_issue_disassociate(tpAniSirGlobal pMac, uint32_t sessionId,
 	    (NewSubstate != eCSR_ROAM_SUBSTATE_DISASSOC_HANDOFF)) {
 		tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
 			&pMac->roam.neighborRoamInfo[sessionId];
-		cdf_copy_macaddr(&bssId,
+		qdf_copy_macaddr(&bssId,
 			      pNeighborRoamInfo->csrNeighborRoamProfile.BSSIDs.
 			      bssid);
 	} else if (pSession->pConnectBssDesc) {
@@ -3189,7 +3189,7 @@ csr_send_mb_tkip_counter_measures_req_msg(tpAniSirGlobal pMac,
 		pMsg->length = sizeof(tSirSmeTkipCntrMeasReq);
 		pMsg->sessionId = sessionId;
 		pMsg->transactionId = 0;
-		cdf_copy_macaddr(&pMsg->bssId, bssId);
+		qdf_copy_macaddr(&pMsg->bssId, bssId);
 		pMsg->bEnable = bEnable;
 		status = cds_send_mb_message_to_mac(pMsg);
 	} while (0);
@@ -6860,7 +6860,7 @@ QDF_STATUS csr_roam_copy_connected_profile(tpAniSirGlobal pMac,
 		goto end;
 	}
 	pDstProfile->BSSIDs.numOfBSSIDs = 1;
-	cdf_copy_macaddr(pDstProfile->BSSIDs.bssid, &pSrcProfile->bssid);
+	qdf_copy_macaddr(pDstProfile->BSSIDs.bssid, &pSrcProfile->bssid);
 
 	if (pSrcProfile->SSID.ssId) {
 		pDstProfile->SSIDs.SSIDList =
@@ -8836,7 +8836,7 @@ void csr_roam_roaming_state_disassoc_rsp_processor(tpAniSirGlobal pMac,
 		/* notify HDD about handoff and provide the BSSID too */
 		roamInfo.reasonCode = eCsrRoamReasonBetterAP;
 
-		cdf_copy_macaddr(&roamInfo.bssid,
+		qdf_copy_macaddr(&roamInfo.bssid,
 			pNeighborRoamInfo->csrNeighborRoamProfile.BSSIDs.bssid);
 
 		csr_roam_call_callback(pMac, sessionId, &roamInfo, 0,
@@ -9046,7 +9046,7 @@ void csr_roaming_state_msg_processor(tpAniSirGlobal pMac, void *pMsgBuf)
 		roamInfo.staId = (uint8_t) pIbssPeerInd->staId;
 		roamInfo.ucastSig = (uint8_t) pIbssPeerInd->ucastSig;
 		roamInfo.bcastSig = (uint8_t) pIbssPeerInd->bcastSig;
-		cdf_copy_macaddr(&roamInfo.peerMac, &pIbssPeerInd->peer_addr);
+		qdf_copy_macaddr(&roamInfo.peerMac, &pIbssPeerInd->peer_addr);
 		csr_roam_call_callback(pMac, pSmeRsp->sessionId, &roamInfo, 0,
 				       eCSR_ROAM_CONNECT_STATUS_UPDATE,
 				       eCSR_ROAM_RESULT_IBSS_PEER_DEPARTED);
@@ -9408,7 +9408,7 @@ static QDF_STATUS csr_roam_issue_set_key_command(tpAniSirGlobal pMac,
 		pCommand->u.setKeyCmd.roamId = roamId;
 		pCommand->u.setKeyCmd.encType = pSetKey->encType;
 		pCommand->u.setKeyCmd.keyDirection = pSetKey->keyDirection;
-		cdf_copy_macaddr(&pCommand->u.setKeyCmd.peermac,
+		qdf_copy_macaddr(&pCommand->u.setKeyCmd.peermac,
 				 &pSetKey->peerMac);
 		/* 0 for supplicant */
 		pCommand->u.setKeyCmd.paeRole = pSetKey->paeRole;
@@ -9463,7 +9463,7 @@ QDF_STATUS csr_roam_process_set_key_command(tpAniSirGlobal pMac, tSmeCmd *pComma
 	if (eSIR_ED_NONE != edType) {
 		cdf_mem_set(&setKeyEvent,
 			    sizeof(host_event_wlan_security_payload_type), 0);
-		if (cdf_is_macaddr_group(&pCommand->u.setKeyCmd.peermac)) {
+		if (qdf_is_macaddr_group(&pCommand->u.setKeyCmd.peermac)) {
 			setKeyEvent.eventId = WLAN_SECURITY_EVENT_SET_GTK_REQ;
 			setKeyEvent.encryptionModeMulticast =
 				(uint8_t) diag_enc_type_from_csr_type(pCommand->u.
@@ -9532,7 +9532,7 @@ QDF_STATUS csr_roam_process_set_key_command(tpAniSirGlobal pMac, tSmeCmd *pComma
 				       eCSR_ROAM_RESULT_FAILURE);
 #ifdef FEATURE_WLAN_DIAG_SUPPORT_CSR
 		if (eSIR_ED_NONE != edType) {
-			if (cdf_is_macaddr_group(
+			if (qdf_is_macaddr_group(
 					&pCommand->u.setKeyCmd.peermac)) {
 				setKeyEvent.eventId =
 					WLAN_SECURITY_EVENT_SET_GTK_RSP;
@@ -9936,7 +9936,7 @@ static QDF_STATUS csr_send_reset_ap_caps_changed(tpAniSirGlobal pMac,
 		cdf_mem_set(pMsg, sizeof(tSirResetAPCapsChange), 0);
 		pMsg->messageType = eWNI_SME_RESET_AP_CAPS_CHANGED;
 		pMsg->length = len;
-		cdf_copy_macaddr(&pMsg->bssId, bssId);
+		qdf_copy_macaddr(&pMsg->bssId, bssId);
 		sms_log(pMac, LOG1,
 			FL("CSR reset caps change for Bssid= " MAC_ADDRESS_STR),
 			MAC_ADDR_ARRAY(pMsg->bssId.bytes));
@@ -10112,9 +10112,9 @@ csr_roam_chk_lnk_disassoc_ind(tpAniSirGlobal mac_ctx, tSirSmeRsp *msg_ptr)
 		roam_info_ptr->reasonCode = pDisassocInd->reasonCode;
 		roam_info_ptr->u.pConnectedProfile = &session->connectedProfile;
 		roam_info_ptr->staId = (uint8_t) pDisassocInd->staId;
-		cdf_copy_macaddr(&roam_info_ptr->peerMac,
+		qdf_copy_macaddr(&roam_info_ptr->peerMac,
 				 &pDisassocInd->peer_macaddr);
-		cdf_copy_macaddr(&roam_info_ptr->bssid,
+		qdf_copy_macaddr(&roam_info_ptr->bssid,
 				 &pDisassocInd->bssid);
 		status = csr_roam_call_callback(mac_ctx, sessionId,
 						roam_info_ptr, 0,
@@ -10194,9 +10194,9 @@ csr_roam_chk_lnk_deauth_ind(tpAniSirGlobal mac_ctx, tSirSmeRsp *msg_ptr)
 		roam_info_ptr->reasonCode = pDeauthInd->reasonCode;
 		roam_info_ptr->u.pConnectedProfile = &session->connectedProfile;
 		roam_info_ptr->staId = (uint8_t) pDeauthInd->staId;
-		cdf_copy_macaddr(&roam_info_ptr->peerMac,
+		qdf_copy_macaddr(&roam_info_ptr->peerMac,
 				 &pDeauthInd->peer_macaddr);
-		cdf_copy_macaddr(&roam_info_ptr->bssid,
+		qdf_copy_macaddr(&roam_info_ptr->bssid,
 				 &pDeauthInd->bssid);
 		status = csr_roam_call_callback(mac_ctx, sessionId,
 						roam_info_ptr, 0,
@@ -10256,7 +10256,7 @@ csr_roam_chk_lnk_deauth_rsp(tpAniSirGlobal mac_ctx, tSirSmeRsp *msg_ptr)
 	if (CSR_IS_INFRA_AP(&session->connectedProfile)) {
 		roam_info_ptr = &roam_info;
 		roam_info_ptr->u.pConnectedProfile = &session->connectedProfile;
-		cdf_copy_macaddr(&roam_info_ptr->peerMac,
+		qdf_copy_macaddr(&roam_info_ptr->peerMac,
 				 &pDeauthRsp->peer_macaddr);
 		roam_info_ptr->reasonCode = eCSR_ROAM_RESULT_FORCED;
 		roam_info_ptr->statusCode = pDeauthRsp->statusCode;
@@ -10290,7 +10290,7 @@ csr_roam_chk_lnk_disassoc_rsp(tpAniSirGlobal mac_ctx, tSirSmeRsp *msg_ptr)
 	if (CSR_IS_INFRA_AP(&session->connectedProfile)) {
 		roam_info_ptr = &roam_info;
 		roam_info_ptr->u.pConnectedProfile = &session->connectedProfile;
-		cdf_copy_macaddr(&roam_info_ptr->peerMac,
+		qdf_copy_macaddr(&roam_info_ptr->peerMac,
 				 &pDisassocRsp->peer_macaddr);
 		roam_info_ptr->reasonCode = eCSR_ROAM_RESULT_FORCED;
 		roam_info_ptr->statusCode = pDisassocRsp->statusCode;
@@ -10394,7 +10394,7 @@ csr_roam_diag_joined_new_bss(tpAniSirGlobal mac_ctx,
 		return;
 	pIbssLog->eventId = WLAN_IBSS_EVENT_COALESCING;
 	if (pNewBss) {
-		cdf_copy_macaddr(&pIbssLog->bssid, &pNewBss->bssId);
+		qdf_copy_macaddr(&pIbssLog->bssid, &pNewBss->bssId);
 		if (pNewBss->ssId.length)
 			cdf_mem_copy(pIbssLog->ssid, pNewBss->ssId.ssId,
 				     pNewBss->ssId.length);
@@ -10583,7 +10583,7 @@ csr_roam_chk_lnk_ibss_new_peer_ind(tpAniSirGlobal mac_ctx, tSirSmeRsp *msg_ptr)
 				 LOG_WLAN_IBSS_C);
 	if (pIbssLog) {
 		pIbssLog->eventId = WLAN_IBSS_EVENT_PEER_JOIN;
-		cdf_copy_macaddr(&pIbssLog->peer_macaddr,
+		qdf_copy_macaddr(&pIbssLog->peer_macaddr,
 				 &pIbssPeerInd->peer_addr);
 		WLAN_HOST_DIAG_LOG_REPORT(pIbssLog);
 	}
@@ -10606,7 +10606,7 @@ csr_roam_chk_lnk_ibss_new_peer_ind(tpAniSirGlobal mac_ctx, tSirSmeRsp *msg_ptr)
 		sms_log(mac_ctx, LOGW, FL("CSR: connected BSS is empty"));
 		goto callback_and_free;
 	}
-	cdf_copy_macaddr(&roam_info.peerMac, &pIbssPeerInd->peer_addr);
+	qdf_copy_macaddr(&roam_info.peerMac, &pIbssPeerInd->peer_addr);
 	cdf_mem_copy(&roam_info.bssid, session->pConnectBssDesc->bssId,
 		     sizeof(struct qdf_mac_addr));
 	if (pIbssPeerInd->mesgLen > sizeof(tSmeIbssPeerInd)) {
@@ -10692,7 +10692,7 @@ csr_roam_chk_lnk_ibss_peer_departed_ind(tpAniSirGlobal mac_ctx,
 		if (pIbssLog) {
 			pIbssLog->eventId = WLAN_IBSS_EVENT_PEER_LEAVE;
 			if (pIbssPeerInd) {
-				cdf_copy_macaddr(&pIbssLog->peer_macaddr,
+				qdf_copy_macaddr(&pIbssLog->peer_macaddr,
 						 &pIbssPeerInd->peer_addr);
 			}
 			WLAN_HOST_DIAG_LOG_REPORT(pIbssLog);
@@ -10703,7 +10703,7 @@ csr_roam_chk_lnk_ibss_peer_departed_ind(tpAniSirGlobal mac_ctx,
 		roam_info.staId = (uint8_t) pIbssPeerInd->staId;
 		roam_info.ucastSig = (uint8_t) pIbssPeerInd->ucastSig;
 		roam_info.bcastSig = (uint8_t) pIbssPeerInd->bcastSig;
-		cdf_copy_macaddr(&roam_info.peerMac, &pIbssPeerInd->peer_addr);
+		qdf_copy_macaddr(&roam_info.peerMac, &pIbssPeerInd->peer_addr);
 		csr_roam_call_callback(mac_ctx, sessionId, &roam_info, 0,
 				       eCSR_ROAM_CONNECT_STATUS_UPDATE,
 				       eCSR_ROAM_RESULT_IBSS_PEER_DEPARTED);
@@ -10723,7 +10723,7 @@ csr_roam_diag_set_ctx_rsp(tpAniSirGlobal mac_ctx,
 		return;
 	cdf_mem_set(&setKeyEvent,
 		    sizeof(host_event_wlan_security_payload_type), 0);
-	if (cdf_is_macaddr_group(&pRsp->peer_macaddr))
+	if (qdf_is_macaddr_group(&pRsp->peer_macaddr))
 		setKeyEvent.eventId = WLAN_SECURITY_EVENT_SET_GTK_RSP;
 	else
 		setKeyEvent.eventId = WLAN_SECURITY_EVENT_SET_PTK_RSP;
@@ -10792,12 +10792,12 @@ csr_roam_chk_lnk_set_ctx_rsp(tpAniSirGlobal mac_ctx, tSirSmeRsp *msg_ptr)
 					 session->connectedProfile.bssid);
 	}
 	if (eSIR_SME_SUCCESS == pRsp->statusCode) {
-		cdf_copy_macaddr(&roam_info.peerMac, &pRsp->peer_macaddr);
+		qdf_copy_macaddr(&roam_info.peerMac, &pRsp->peer_macaddr);
 		/* Make sure we install the GTK before indicating to HDD as
 		 * authenticated. This is to prevent broadcast packets go out
 		 * after PTK and before GTK.
 		 */
-		if (cdf_is_macaddr_broadcast(&pRsp->peer_macaddr)) {
+		if (qdf_is_macaddr_broadcast(&pRsp->peer_macaddr)) {
 			tpSirSetActiveModeSetBncFilterReq pMsg;
 			pMsg = cdf_mem_malloc(
 				    sizeof(tSirSetActiveModeSetBncFilterReq));
@@ -10859,7 +10859,7 @@ csr_roam_chk_lnk_max_assoc_exceeded(tpAniSirGlobal mac_ctx, tSirSmeRsp *msg_ptr)
 		FL("max assoc have been reached, new peer cannot be accepted"));
 	sessionId = pSmeMaxAssocInd->sessionId;
 	roam_info.sessionId = sessionId;
-	cdf_copy_macaddr(&roam_info.peerMac, &pSmeMaxAssocInd->peer_mac);
+	qdf_copy_macaddr(&roam_info.peerMac, &pSmeMaxAssocInd->peer_mac);
 	csr_roam_call_callback(mac_ctx, sessionId, &roam_info, 0,
 			       eCSR_ROAM_INFRA_IND,
 			       eCSR_ROAM_RESULT_MAX_ASSOC_EXCEEDED);
@@ -11342,13 +11342,13 @@ QDF_STATUS csr_roam_lost_link(tpAniSirGlobal pMac, uint32_t sessionId,
 	roamInfo.reasonCode = pSession->joinFailStatusCode.reasonCode;
 	if (eWNI_SME_DISASSOC_IND == type) {
 		/* staMacAddr */
-		cdf_copy_macaddr(&roamInfo.peerMac,
+		qdf_copy_macaddr(&roamInfo.peerMac,
 				 &pDisassocIndMsg->peer_macaddr);
 		roamInfo.staId = (uint8_t) pDisassocIndMsg->staId;
 		roamInfo.reasonCode = pDisassocIndMsg->reasonCode;
 	} else if (eWNI_SME_DEAUTH_IND == type) {
 		/* staMacAddr */
-		cdf_copy_macaddr(&roamInfo.peerMac,
+		qdf_copy_macaddr(&roamInfo.peerMac,
 				 &pDeauthIndMsg->peer_macaddr);
 		roamInfo.staId = (uint8_t) pDeauthIndMsg->staId;
 		roamInfo.reasonCode = pDeauthIndMsg->reasonCode;
@@ -12838,7 +12838,7 @@ csr_roam_set_pmkid_cache(tpAniSirGlobal pMac, uint32_t sessionId,
 				pmksa->BSSID.bytes, false);
 
 		/* Add entry to the cache */
-		cdf_copy_macaddr(
+		qdf_copy_macaddr(
 		    &pSession->PmkidCacheInfo[pSession->curr_cache_idx].BSSID,
 		    &pmksa->BSSID);
 		cdf_mem_copy(
@@ -12981,7 +12981,7 @@ QDF_STATUS csr_roam_get_pmkid_cache(tpAniSirGlobal pMac, uint32_t sessionId,
 		(i < CSR_MAX_PMKID_ALLOWED)); i++) {
 		/* Fill the valid entries */
 		pmksa = &pSession->PmkidCacheInfo[i];
-		if (!cdf_is_macaddr_zero(&pmksa->BSSID)) {
+		if (!qdf_is_macaddr_zero(&pmksa->BSSID)) {
 			cdf_mem_copy(pPmkidCache, pmksa,
 				     sizeof(tPmkidCacheInfo));
 			pPmkidCache++;
@@ -13127,8 +13127,8 @@ csr_roam_remove_connected_bss_from_scan_cache(tpAniSirGlobal pMac,
 	tDot11fBeaconIEs *pIes;
 	bool fMatch;
 
-	if ((cdf_is_macaddr_zero(&pConnProfile->bssid) ||
-	     cdf_is_macaddr_broadcast(&pConnProfile->bssid)))
+	if ((qdf_is_macaddr_zero(&pConnProfile->bssid) ||
+	     qdf_is_macaddr_broadcast(&pConnProfile->bssid)))
 		return status;
 	/*
 	 * Prepare the filter. Only fill in the necessary fields. Not all fields
@@ -13248,7 +13248,7 @@ static QDF_STATUS csr_roam_start_wds(tpAniSirGlobal pMac, uint32_t sessionId,
 		}
 		cdf_mem_set(&bssConfig, sizeof(tBssConfigParam), 0);
 		/* Assume HDD provide bssid in profile */
-		cdf_copy_macaddr(&pSession->bssParams.bssid,
+		qdf_copy_macaddr(&pSession->bssParams.bssid,
 				 pProfile->BSSIDs.bssid);
 		/* there is no Bss description before we start an WDS so we need */
 		/* to adopt all Bss configuration parameters from the Profile. */
@@ -14055,7 +14055,7 @@ csr_send_mb_get_associated_stas_req_msg(tpAniSirGlobal pMac, uint32_t sessionId,
 		return QDF_STATUS_E_NOMEM;
 
 	pMsg->messageType = eWNI_SME_GET_ASSOC_STAS_REQ;
-	cdf_copy_macaddr(&pMsg->bssid, &bssid);
+	qdf_copy_macaddr(&pMsg->bssid, &bssid);
 	pMsg->modId = modId;
 	cdf_mem_copy(pMsg->pUsrContext, pUsrContext, sizeof(void *));
 	cdf_mem_copy(pMsg->pSapEventCallback,
@@ -14089,8 +14089,8 @@ csr_send_mb_get_wpspbc_sessions(tpAniSirGlobal pMac, uint32_t sessionId,
 		cdf_mem_copy(pMsg->pUsrContext, pUsrContext, sizeof(void *));
 		cdf_mem_copy(pMsg->pSapEventCallback, pfnSapEventCallback,
 			     sizeof(void *));
-		cdf_copy_macaddr(&pMsg->bssid, &bssid);
-		cdf_copy_macaddr(&pMsg->remove_mac, &remove_mac);
+		qdf_copy_macaddr(&pMsg->bssid, &bssid);
+		qdf_copy_macaddr(&pMsg->remove_mac, &remove_mac);
 		pMsg->length = sizeof(struct sSirSmeGetWPSPBCSessionsReq);
 		status = cds_send_mb_message_to_mac(pMsg);
 	} while (0);
@@ -14127,7 +14127,7 @@ QDF_STATUS csr_send_chng_mcc_beacon_interval(tpAniSirGlobal pMac, uint32_t sessi
 		pMsg->messageType = eWNI_SME_CHNG_MCC_BEACON_INTERVAL;
 		pMsg->length = len;
 
-		cdf_copy_macaddr(&pMsg->bssid, &pSession->selfMacAddr);
+		qdf_copy_macaddr(&pMsg->bssid, &pSession->selfMacAddr);
 		sms_log(pMac, LOG1,
 			FL("CSR Attempting to change BI for Bssid= "
 			   MAC_ADDRESS_STR), MAC_ADDR_ARRAY(pMsg->bssid.bytes));
@@ -14169,7 +14169,7 @@ QDF_STATUS csr_set_ht2040_mode(tpAniSirGlobal pMac, uint32_t sessionId,
 		pMsg->messageType = eWNI_SME_SET_HT_2040_MODE;
 		pMsg->length = len;
 
-		cdf_copy_macaddr(&pMsg->bssid, &pSession->selfMacAddr);
+		qdf_copy_macaddr(&pMsg->bssid, &pSession->selfMacAddr);
 		sms_log(pMac, LOG1,
 			FL("CSR Attempting to set HT20/40 mode for Bssid= "
 			   MAC_ADDRESS_STR), MAC_ADDR_ARRAY(pMsg->bssid.bytes));
@@ -14237,7 +14237,7 @@ QDF_STATUS csr_send_mb_disassoc_cnf_msg(tpAniSirGlobal pMac,
 		pMsg->messageType = eWNI_SME_DISASSOC_CNF;
 		pMsg->statusCode = eSIR_SME_SUCCESS;
 		pMsg->length = sizeof(tSirSmeDisassocCnf);
-		cdf_copy_macaddr(&pMsg->peer_macaddr,
+		qdf_copy_macaddr(&pMsg->peer_macaddr,
 				 &pDisassocInd->peer_macaddr);
 		status = QDF_STATUS_SUCCESS;
 		if (!QDF_IS_STATUS_SUCCESS(status)) {
@@ -14245,7 +14245,7 @@ QDF_STATUS csr_send_mb_disassoc_cnf_msg(tpAniSirGlobal pMac,
 			break;
 		}
 
-		cdf_copy_macaddr(&pMsg->bssid, &pDisassocInd->bssid);
+		qdf_copy_macaddr(&pMsg->bssid, &pDisassocInd->bssid);
 		status = QDF_STATUS_SUCCESS;
 		if (!QDF_IS_STATUS_SUCCESS(status)) {
 			cdf_mem_free(pMsg);
@@ -14274,13 +14274,13 @@ QDF_STATUS csr_send_mb_deauth_cnf_msg(tpAniSirGlobal pMac,
 		pMsg->messageType = eWNI_SME_DEAUTH_CNF;
 		pMsg->statusCode = eSIR_SME_SUCCESS;
 		pMsg->length = sizeof(tSirSmeDeauthCnf);
-		cdf_copy_macaddr(&pMsg->bssid, &pDeauthInd->bssid);
+		qdf_copy_macaddr(&pMsg->bssid, &pDeauthInd->bssid);
 		status = QDF_STATUS_SUCCESS;
 		if (!QDF_IS_STATUS_SUCCESS(status)) {
 			cdf_mem_free(pMsg);
 			break;
 		}
-		cdf_copy_macaddr(&pMsg->peer_macaddr,
+		qdf_copy_macaddr(&pMsg->peer_macaddr,
 				 &pDeauthInd->peer_macaddr);
 		status = QDF_STATUS_SUCCESS;
 		if (!QDF_IS_STATUS_SUCCESS(status)) {
@@ -14446,8 +14446,8 @@ QDF_STATUS csr_send_mb_set_context_req_msg(tpAniSirGlobal pMac,
 		pMsg->length = msgLen;
 		pMsg->sessionId = (uint8_t) sessionId;
 		pMsg->transactionId = 0;
-		cdf_copy_macaddr(&pMsg->peer_macaddr, &peer_macaddr);
-		cdf_copy_macaddr(&pMsg->bssid,
+		qdf_copy_macaddr(&pMsg->peer_macaddr, &peer_macaddr);
+		qdf_copy_macaddr(&pMsg->bssid,
 				 &pSession->connectedProfile.bssid);
 
 		/**
@@ -14511,9 +14511,9 @@ QDF_STATUS csr_send_mb_start_bss_req_msg(tpAniSirGlobal pMac, uint32_t sessionId
 	pMsg->sessionId = sessionId;
 	pMsg->length = sizeof(tSirSmeStartBssReq);
 	pMsg->transactionId = 0;
-	cdf_copy_macaddr(&pMsg->bssid, &pParam->bssid);
+	qdf_copy_macaddr(&pMsg->bssid, &pParam->bssid);
 	/* selfMacAddr */
-	cdf_copy_macaddr(&pMsg->self_macaddr, &pSession->selfMacAddr);
+	qdf_copy_macaddr(&pMsg->self_macaddr, &pSession->selfMacAddr);
 	/* beaconInterval */
 	if (pBssDesc && pBssDesc->beaconInterval)
 		wTmp = pBssDesc->beaconInterval;
@@ -14622,7 +14622,7 @@ QDF_STATUS csr_send_mb_stop_bss_req_msg(tpAniSirGlobal pMac, uint32_t sessionId)
 	pMsg->length = sizeof(tSirSmeStopBssReq);
 	pMsg->transactionId = 0;
 	pMsg->reasonCode = 0;
-	cdf_copy_macaddr(&pMsg->bssid, &pSession->connectedProfile.bssid);
+	qdf_copy_macaddr(&pMsg->bssid, &pSession->connectedProfile.bssid);
 	return cds_send_mb_message_to_mac(pMsg);
 }
 
@@ -15155,7 +15155,7 @@ QDF_STATUS csr_roam_get_session_id_from_bssid(tpAniSirGlobal pMac,
 	uint32_t i;
 	for (i = 0; i < CSR_ROAM_SESSION_MAX; i++) {
 		if (CSR_IS_SESSION_VALID(pMac, i)) {
-			if (cdf_is_macaddr_equal(bssid,
+			if (qdf_is_macaddr_equal(bssid,
 				    &pMac->roam.roamSession[i].connectedProfile.
 				    bssid)) {
 				/* Found it */
@@ -15867,7 +15867,7 @@ QDF_STATUS csr_get_tsm_stats(tpAniSirGlobal pMac,
 	pMsg->msgLen = (uint16_t) sizeof(tAniGetTsmStatsReq);
 	pMsg->staId = staId;
 	pMsg->tid = tid;
-	cdf_copy_macaddr(&pMsg->bssId, &bssId);
+	qdf_copy_macaddr(&pMsg->bssId, &bssId);
 	pMsg->tsmStatsCallback = callback;
 	pMsg->pDevContext = pContext;
 	pMsg->p_cds_context = p_cds_context;
@@ -17577,7 +17577,7 @@ QDF_STATUS csr_roam_update_apwpsie(tpAniSirGlobal pMac, uint32_t sessionId,
 
 	pMsg->messageType = eWNI_SME_UPDATE_APWPSIE_REQ;
 	pMsg->transactionId = 0;
-	cdf_copy_macaddr(&pMsg->bssid, &pSession->selfMacAddr);
+	qdf_copy_macaddr(&pMsg->bssid, &pSession->selfMacAddr);
 	pMsg->sessionId = sessionId;
 	cdf_mem_copy(&pMsg->APWPSIEs, pAPWPSIES, sizeof(tSirAPWPSIEs));
 	pMsg->length = sizeof(*pMsg);
@@ -17605,7 +17605,7 @@ QDF_STATUS csr_roam_update_wparsni_es(tpAniSirGlobal pMac, uint32_t sessionId,
 		cdf_mem_set(pMsg, sizeof(tSirUpdateAPWPARSNIEsReq), 0);
 		pMsg->messageType = eWNI_SME_SET_APWPARSNIEs_REQ;
 		pMsg->transactionId = 0;
-		cdf_copy_macaddr(&pMsg->bssid, &pSession->selfMacAddr);
+		qdf_copy_macaddr(&pMsg->bssid, &pSession->selfMacAddr);
 		pMsg->sessionId = sessionId;
 		cdf_mem_copy(&pMsg->APWPARSNIEs, pAPSirRSNie,
 			     sizeof(tSirRSNie));
@@ -17838,9 +17838,9 @@ static void csr_ser_des_unpack_diassoc_rsp(uint8_t *pBuf, tSirSmeDisassocRsp *pR
 	if (pBuf && pRsp) {
 		pBuf += 4;      /* skip type and length */
 		pRsp->sessionId = *pBuf++;
-		cdf_get_u16(pBuf, (uint16_t *) &pRsp->transactionId);
+		qdf_get_u16(pBuf, (uint16_t *) &pRsp->transactionId);
 		pBuf += 2;
-		cdf_get_u32(pBuf, (uint32_t *) &pRsp->statusCode);
+		qdf_get_u32(pBuf, (uint32_t *) &pRsp->statusCode);
 		pBuf += 4;
 		cdf_mem_copy(pRsp->peer_macaddr.bytes, pBuf, QDF_MAC_ADDR_SIZE);
 	}
@@ -18086,7 +18086,7 @@ csr_roam_modify_add_ies(tpAniSirGlobal pMac,
 	pModifyAddIEInd->msgType = eWNI_SME_MODIFY_ADDITIONAL_IES;
 	pModifyAddIEInd->msgLen = sizeof(tSirModifyIEsInd);
 
-	cdf_copy_macaddr(&pModifyAddIEInd->modifyIE.bssid, &pModifyIE->bssid);
+	qdf_copy_macaddr(&pModifyAddIEInd->modifyIE.bssid, &pModifyIE->bssid);
 
 	pModifyAddIEInd->modifyIE.smeSessionId = pModifyIE->smeSessionId;
 	pModifyAddIEInd->modifyIE.notify = pModifyIE->notify;
@@ -18152,7 +18152,7 @@ csr_roam_update_add_ies(tpAniSirGlobal pMac,
 	pUpdateAddIEs->msgType = eWNI_SME_UPDATE_ADDITIONAL_IES;
 	pUpdateAddIEs->msgLen = sizeof(tSirUpdateIEsInd);
 
-	cdf_copy_macaddr(&pUpdateAddIEs->updateIE.bssid, &pUpdateIE->bssid);
+	qdf_copy_macaddr(&pUpdateAddIEs->updateIE.bssid, &pUpdateIE->bssid);
 
 	pUpdateAddIEs->updateIE.smeSessionId = pUpdateIE->smeSessionId;
 	pUpdateAddIEs->updateIE.append = pUpdateIE->append;

+ 14 - 14
core/sme/src/csr/csr_api_scan.c

@@ -1118,7 +1118,7 @@ csr_scan_request_lost_link3(tpAniSirGlobal mac_ctx, uint32_t session_id)
 			csr_scan_active_list_timeout_handle, &cmd);
 		cmd->u.scanCmd.u.scanRequest.scan_id =
 			cmd->u.scanCmd.scanID;
-		cdf_set_macaddr_broadcast(&cmd->u.scanCmd.u.scanRequest.bssid);
+		qdf_set_macaddr_broadcast(&cmd->u.scanCmd.u.scanRequest.bssid);
 		/* Put to the head of pending queue */
 		status = csr_queue_sme_command(mac_ctx, cmd, true);
 		if (!QDF_IS_STATUS_SUCCESS(status)) {
@@ -1427,7 +1427,7 @@ static int csr_get_altered_rssi(tpAniSirGlobal mac_ctx, int rssi,
 			cdf_mem_copy(fav_bssid.bytes,
 					&roam_params->bssid_favored[i],
 					QDF_MAC_ADDR_SIZE);
-			if (!cdf_is_macaddr_equal(&fav_bssid, bssid))
+			if (!qdf_is_macaddr_equal(&fav_bssid, bssid))
 				continue;
 			modified_rssi += roam_params->bssid_favored_factor[i];
 			sms_log(mac_ctx, LOG2,
@@ -4308,7 +4308,7 @@ bool csr_is_duplicate_bss_description(tpAniSirGlobal pMac,
 		goto free_ies;
 
 	if (pCap1->ess &&
-	    cdf_is_macaddr_equal((struct qdf_mac_addr *) pSirBssDesc1->bssId,
+	    qdf_is_macaddr_equal((struct qdf_mac_addr *) pSirBssDesc1->bssId,
 				 (struct qdf_mac_addr *) pSirBssDesc2->bssId)
 	    && (fForced
 		|| (cds_chan_to_band(pSirBssDesc1->channelId) ==
@@ -4358,7 +4358,7 @@ bool csr_is_duplicate_bss_description(tpAniSirGlobal pMac,
 	}
 	/* In case of P2P devices, ess and ibss will be set to zero */
 	else if (!pCap1->ess &&
-		cdf_is_macaddr_equal(
+		qdf_is_macaddr_equal(
 			(struct qdf_mac_addr *) pSirBssDesc1->bssId,
 			(struct qdf_mac_addr *) pSirBssDesc2->bssId)) {
 		fMatch = true;
@@ -4782,7 +4782,7 @@ bool csr_scan_age_out_bss(tpAniSirGlobal pMac, tCsrScanResult *pResult)
 	 */
 	if (csr_ll_remove_entry(&pMac->scan.scanResultList, &pResult->Link,
 				LL_ACCESS_NOLOCK)) {
-		if (cdf_is_macaddr_equal(
+		if (qdf_is_macaddr_equal(
 			(struct qdf_mac_addr *) &pResult->Result.BssDescriptor.bssId,
 			(struct qdf_mac_addr *) &pMac->scan.currentCountryBssid)) {
 			sms_log(pMac, LOGW,
@@ -4904,7 +4904,7 @@ QDF_STATUS csr_send_mb_scan_req(tpAniSirGlobal pMac, uint16_t sessionId,
 	pMsg->bssType = csr_translate_bsstype_to_mac_type(pScanReq->BSSType);
 
 	if (CSR_IS_SESSION_VALID(pMac, sessionId)) {
-		cdf_copy_macaddr(&selfmac,
+		qdf_copy_macaddr(&selfmac,
 			&pMac->roam.roamSession[sessionId].selfMacAddr);
 	} else {
 		/*
@@ -4913,7 +4913,7 @@ QDF_STATUS csr_send_mb_scan_req(tpAniSirGlobal pMac, uint16_t sessionId,
 		 */
 		for (i = 0; i < CSR_ROAM_SESSION_MAX; i++) {
 			if (CSR_IS_SESSION_VALID(pMac, i)) {
-				cdf_copy_macaddr(&selfmac,
+				qdf_copy_macaddr(&selfmac,
 					&pMac->roam.roamSession[i].selfMacAddr);
 				break;
 			}
@@ -4933,13 +4933,13 @@ QDF_STATUS csr_send_mb_scan_req(tpAniSirGlobal pMac, uint16_t sessionId,
 			}
 		}
 	}
-	cdf_copy_macaddr(&pMsg->selfMacAddr, &selfmac);
+	qdf_copy_macaddr(&pMsg->selfMacAddr, &selfmac);
 
-	cdf_copy_macaddr(&pMsg->bssId, &pScanReq->bssid);
-	if (cdf_is_macaddr_zero(&pScanReq->bssid))
-		cdf_set_macaddr_broadcast(&pMsg->bssId);
+	qdf_copy_macaddr(&pMsg->bssId, &pScanReq->bssid);
+	if (qdf_is_macaddr_zero(&pScanReq->bssid))
+		qdf_set_macaddr_broadcast(&pMsg->bssId);
 	else
-		cdf_copy_macaddr(&pMsg->bssId, &pScanReq->bssid);
+		qdf_copy_macaddr(&pMsg->bssId, &pScanReq->bssid);
 	minChnTime = pScanReq->minChnTime;
 	maxChnTime = pScanReq->maxChnTime;
 
@@ -6228,10 +6228,10 @@ QDF_STATUS csr_scan_for_ssid(tpAniSirGlobal mac_ctx, uint32_t session_id,
 	}
 
 	if (profile->BSSIDs.numOfBSSIDs == 1)
-		cdf_copy_macaddr(&scan_req->bssid,
+		qdf_copy_macaddr(&scan_req->bssid,
 				profile->BSSIDs.bssid);
 	else
-		cdf_set_macaddr_broadcast(&scan_req->bssid);
+		qdf_set_macaddr_broadcast(&scan_req->bssid);
 
 	if (profile->ChannelInfo.numOfChannels) {
 		scan_req->ChannelInfo.ChannelList =

+ 7 - 7
core/sme/src/csr/csr_neighbor_roam.c

@@ -698,7 +698,7 @@ void csr_neighbor_roam_reset_report_scan_state_control_info(tpAniSirGlobal pMac,
 	tpCsrNeighborRoamControlInfo pNeighborRoamInfo =
 		&pMac->roam.neighborRoamInfo[sessionId];
 
-	cdf_zero_macaddr(&pNeighborRoamInfo->currAPbssid);
+	qdf_zero_macaddr(&pNeighborRoamInfo->currAPbssid);
 #ifdef FEATURE_WLAN_ESE
 	pNeighborRoamInfo->isESEAssoc = false;
 	pNeighborRoamInfo->isVOAdmitted = false;
@@ -1228,7 +1228,7 @@ csr_neighbor_roam_prepare_scan_profile_filter(tpAniSirGlobal pMac,
 
 		/* Populate the BSSID from handoff info received from HDD */
 		for (i = 0; i < pScanFilter->BSSIDs.numOfBSSIDs; i++) {
-			cdf_copy_macaddr(&pScanFilter->BSSIDs.bssid[i],
+			qdf_copy_macaddr(&pScanFilter->BSSIDs.bssid[i],
 				 &nbr_roam_info->handoffReqInfo.bssid);
 		}
 	}
@@ -2279,7 +2279,7 @@ QDF_STATUS csr_neighbor_roam_indicate_disconnect(tpAniSirGlobal pMac,
 			cdf_mem_copy(&pSession->prevApSSID,
 				&pSession->connectedProfile.SSID,
 				sizeof(tSirMacSSid));
-			cdf_copy_macaddr(&pSession->prevApBssid,
+			qdf_copy_macaddr(&pSession->prevApBssid,
 					&pSession->connectedProfile.bssid);
 			pSession->prevOpChannel =
 				pSession->connectedProfile.operationChannel;
@@ -2392,7 +2392,7 @@ static void csr_neighbor_roam_info_ctx_init(
 	CSR_NEIGHBOR_ROAM_STATE_TRANSITION
 		(pMac, eCSR_NEIGHBOR_ROAM_STATE_CONNECTED, session_id);
 
-	cdf_copy_macaddr(&ngbr_roam_info->currAPbssid,
+	qdf_copy_macaddr(&ngbr_roam_info->currAPbssid,
 			&session->connectedProfile.bssid);
 	ngbr_roam_info->currAPoperationChannel =
 		session->connectedProfile.operationChannel;
@@ -2547,7 +2547,7 @@ QDF_STATUS csr_neighbor_roam_indicate_connect(
 		msg->length = sizeof(uint8_t);
 		msg->seesionId = session_id;
 		status = cds_send_mb_message_to_mac(msg);
-		cdf_copy_macaddr(&roamInfo.peerMac,
+		qdf_copy_macaddr(&roamInfo.peerMac,
 			&session->connectedProfile.bssid);
 		roamInfo.roamSynchInProgress =
 			session->roam_synch_in_progress;
@@ -2764,7 +2764,7 @@ QDF_STATUS csr_neighbor_roam_init(tpAniSirGlobal pMac, uint8_t sessionId)
 		pMac->roam.configParam.neighborRoamConfig.
 			nhi_rssi_scan_rssi_ub;
 
-	cdf_zero_macaddr(&pNeighborRoamInfo->currAPbssid);
+	qdf_zero_macaddr(&pNeighborRoamInfo->currAPbssid);
 	pNeighborRoamInfo->currentNeighborLookupThreshold =
 		pNeighborRoamInfo->cfgParams.neighborLookupThreshold;
 	pNeighborRoamInfo->currentOpportunisticThresholdDiff =
@@ -3281,7 +3281,7 @@ QDF_STATUS csr_neighbor_roam_process_handoff_req(
 
 	/* Populate the BSSID from handoff info received from HDD */
 	for (i = 0; i < profile->BSSIDs.numOfBSSIDs; i++) {
-		cdf_copy_macaddr(&profile->BSSIDs.bssid[i],
+		qdf_copy_macaddr(&profile->BSSIDs.bssid[i],
 				&roam_ctrl_info->handoffReqInfo.bssid);
 	}
 

+ 9 - 9
core/sme/src/csr/csr_tdls_process.c

@@ -478,7 +478,7 @@ QDF_STATUS csr_tdls_process_add_sta(tpAniSirGlobal pMac, tSmeCmd *cmd)
 	cdf_mem_copy(tdlsAddStaReq->bssid.bytes,
 		     pSession->pConnectBssDesc->bssId, QDF_MAC_ADDR_SIZE);
 
-	cdf_copy_macaddr(&tdlsAddStaReq->peermac,
+	qdf_copy_macaddr(&tdlsAddStaReq->peermac,
 			 &tdlsAddStaCmdInfo->peermac);
 
 	tdlsAddStaReq->capability = tdlsAddStaCmdInfo->capability;
@@ -548,7 +548,7 @@ QDF_STATUS csr_tdls_process_del_sta(tpAniSirGlobal pMac, tSmeCmd *cmd)
 	cdf_mem_copy(tdlsDelStaReq->bssid.bytes,
 		     pSession->pConnectBssDesc->bssId, QDF_MAC_ADDR_SIZE);
 
-	cdf_copy_macaddr(&tdlsDelStaReq->peermac,
+	qdf_copy_macaddr(&tdlsDelStaReq->peermac,
 			 &tdlsDelStaCmdInfo->peermac);
 
 	/* Send the request to PE. */
@@ -637,7 +637,7 @@ QDF_STATUS csr_tdls_process_link_establish(tpAniSirGlobal pMac, tSmeCmd *cmd)
 	tdlsLinkEstablishReq->sessionId = cmd->sessionId;
 	/* Using dialog as transactionId. This can be used to match response with request */
 	tdlsLinkEstablishReq->transactionId = 0;
-	cdf_copy_macaddr(&tdlsLinkEstablishReq->peermac,
+	qdf_copy_macaddr(&tdlsLinkEstablishReq->peermac,
 			 &tdlsLinkEstablishCmdInfo->peermac);
 	cdf_mem_copy(tdlsLinkEstablishReq->bssid.bytes,
 		     pSession->pConnectBssDesc->bssId, QDF_MAC_ADDR_SIZE);
@@ -695,7 +695,7 @@ QDF_STATUS tdls_msg_processor(tpAniSirGlobal pMac, uint16_t msgType,
 		csr_tdls_remove_sme_cmd(pMac, eSmeCommandTdlsSendMgmt);
 		break;
 	case eWNI_SME_TDLS_ADD_STA_RSP:
-		cdf_copy_macaddr(&roamInfo.peerMac, &addStaRsp->peermac);
+		qdf_copy_macaddr(&roamInfo.peerMac, &addStaRsp->peermac);
 		roamInfo.staId = addStaRsp->staId;
 		roamInfo.ucastSig = addStaRsp->ucastSig;
 		roamInfo.bcastSig = addStaRsp->bcastSig;
@@ -716,7 +716,7 @@ QDF_STATUS tdls_msg_processor(tpAniSirGlobal pMac, uint16_t msgType,
 		csr_tdls_remove_sme_cmd(pMac, eSmeCommandTdlsAddPeer);
 		break;
 	case eWNI_SME_TDLS_DEL_STA_RSP:
-		cdf_copy_macaddr(&roamInfo.peerMac, &delStaRsp->peermac);
+		qdf_copy_macaddr(&roamInfo.peerMac, &delStaRsp->peermac);
 		roamInfo.staId = delStaRsp->staId;
 		roamInfo.statusCode = delStaRsp->statusCode;
 		/*
@@ -731,7 +731,7 @@ QDF_STATUS tdls_msg_processor(tpAniSirGlobal pMac, uint16_t msgType,
 		csr_tdls_remove_sme_cmd(pMac, eSmeCommandTdlsDelPeer);
 		break;
 	case eWNI_SME_TDLS_DEL_STA_IND:
-		cdf_copy_macaddr(&roamInfo.peerMac,
+		qdf_copy_macaddr(&roamInfo.peerMac,
 				 &pSirTdlsDelStaInd->peermac);
 		roamInfo.staId = pSirTdlsDelStaInd->staId;
 		roamInfo.reasonCode = pSirTdlsDelStaInd->reasonCode;
@@ -770,7 +770,7 @@ QDF_STATUS tdls_msg_processor(tpAniSirGlobal pMac, uint16_t msgType,
 		csr_tdls_remove_sme_cmd(pMac, eSmeCommandTdlsLinkEstablish);
 		break;
 	case eWNI_SME_TDLS_SHOULD_DISCOVER:
-		cdf_copy_macaddr(&roamInfo.peerMac, &tevent->peermac);
+		qdf_copy_macaddr(&roamInfo.peerMac, &tevent->peermac);
 		roamInfo.reasonCode = tevent->peer_reason;
 		CDF_TRACE(QDF_MODULE_ID_SME, CDF_TRACE_LEVEL_INFO,
 				"%s: eWNI_SME_TDLS_SHOULD_DISCOVER for peer mac: "
@@ -782,7 +782,7 @@ QDF_STATUS tdls_msg_processor(tpAniSirGlobal pMac, uint16_t msgType,
 				eCSR_ROAM_RESULT_TDLS_SHOULD_DISCOVER);
 		break;
 	case eWNI_SME_TDLS_SHOULD_TEARDOWN:
-		cdf_copy_macaddr(&roamInfo.peerMac, &tevent->peermac);
+		qdf_copy_macaddr(&roamInfo.peerMac, &tevent->peermac);
 		roamInfo.reasonCode = tevent->peer_reason;
 		CDF_TRACE(QDF_MODULE_ID_SME, CDF_TRACE_LEVEL_INFO,
 				"%s: eWNI_SME_TDLS_SHOULD_TEARDOWN for peer mac: "
@@ -794,7 +794,7 @@ QDF_STATUS tdls_msg_processor(tpAniSirGlobal pMac, uint16_t msgType,
 				eCSR_ROAM_RESULT_TDLS_SHOULD_TEARDOWN);
 		break;
 	case eWNI_SME_TDLS_PEER_DISCONNECTED:
-		cdf_copy_macaddr(&roamInfo.peerMac, &tevent->peermac);
+		qdf_copy_macaddr(&roamInfo.peerMac, &tevent->peermac);
 		roamInfo.reasonCode = tevent->peer_reason;
 		CDF_TRACE(QDF_MODULE_ID_SME, CDF_TRACE_LEVEL_INFO,
 				"%s: eWNI_SME_TDLS_PEER_DISCONNECTED for peer mac: "

+ 8 - 8
core/sme/src/csr/csr_util.c

@@ -282,7 +282,7 @@ bool csr_is_bss_id_equal(tHalHandle hHal, tSirBssDescription *pSirBssDesc1,
 		if (!csr_get_bss_id_bss_desc(pMac, pSirBssDesc2, &bssId2))
 			break;
 
-		fEqual = cdf_is_macaddr_equal(&bssId1, &bssId2);
+		fEqual = qdf_is_macaddr_equal(&bssId1, &bssId2);
 	} while (0);
 
 	return fEqual;
@@ -1030,7 +1030,7 @@ static tSirMacCapabilityInfo csr_get_bss_capabilities(tSirBssDescription *
 	tSirMacCapabilityInfo dot11Caps;
 
 	/* tSirMacCapabilityInfo is 16-bit */
-	cdf_get_u16((uint8_t *) &pSirBssDesc->capabilityInfo,
+	qdf_get_u16((uint8_t *) &pSirBssDesc->capabilityInfo,
 		    (uint16_t *) &dot11Caps);
 
 	return dot11Caps;
@@ -4344,13 +4344,13 @@ bool csr_is_bssid_match(tHalHandle hHal, struct qdf_mac_addr *pProfBssid,
 		/* Give the profile the benefit of the doubt... accept either all 0 or */
 		/* the real broadcast Bssid (all 0xff) as broadcast Bssids (meaning to */
 		/* match any Bssids). */
-		if (cdf_is_macaddr_zero(&ProfileBssid) ||
-		    cdf_is_macaddr_broadcast(&ProfileBssid)) {
+		if (qdf_is_macaddr_zero(&ProfileBssid) ||
+		    qdf_is_macaddr_broadcast(&ProfileBssid)) {
 			fMatch = true;
 			break;
 		}
 
-		if (cdf_is_macaddr_equal(BssBssid, &ProfileBssid)) {
+		if (qdf_is_macaddr_equal(BssBssid, &ProfileBssid)) {
 			fMatch = true;
 			break;
 		}
@@ -4724,7 +4724,7 @@ bool csr_match_bss(tHalHandle hal, tSirBssDescription *bss_descr,
 	/* Check for Blacklist BSSID's and avoid connections */
 	blacklist_check = false;
 	for (i = 0; i < roam_params->num_bssid_avoid_list; i++) {
-		if (cdf_is_macaddr_equal((struct qdf_mac_addr *)
+		if (qdf_is_macaddr_equal((struct qdf_mac_addr *)
 					&roam_params->bssid_avoid_list[i],
 				(struct qdf_mac_addr *)bss_descr->bssId)) {
 			blacklist_check = true;
@@ -5254,7 +5254,7 @@ tSirResultCodes csr_get_disassoc_rsp_status_code(tSirSmeDisassocRsp *
 	pBuffer += (sizeof(uint16_t) + sizeof(uint16_t) + sizeof(tSirMacAddr));
 	/* tSirResultCodes is an enum, assuming is 32bit */
 	/* If we cannot make this assumption, use copymemory */
-	cdf_get_u32(pBuffer, &ret);
+	qdf_get_u32(pBuffer, &ret);
 
 	return (tSirResultCodes) ret;
 }
@@ -5269,7 +5269,7 @@ tSirResultCodes csr_get_de_auth_rsp_status_code(tSirSmeDeauthRsp *pSmeRsp)
 		 sizeof(uint16_t));
 	/* tSirResultCodes is an enum, assuming is 32bit */
 	/* If we cannot make this assumption, use copymemory */
-	cdf_get_u32(pBuffer, &ret);
+	qdf_get_u32(pBuffer, &ret);
 
 	return (tSirResultCodes) ret;
 }

+ 2 - 2
core/sme/src/oem_data/oem_data_api.c

@@ -38,7 +38,7 @@
 #include "cds_mq.h"
 #include "sme_inside.h"
 #include "sms_debug.h"
-#include "cdf_util.h"
+#include "qdf_util.h"
 
 #include "csr_support.h"
 
@@ -229,7 +229,7 @@ QDF_STATUS oem_data_send_mb_oem_data_req(tpAniSirGlobal pMac,
 	msgLen = (uint16_t) (sizeof(*pMsg) + pOemDataReq->data_len);
 	pMsg->messageType = eWNI_SME_OEM_DATA_REQ;
 	pMsg->messageLen = msgLen;
-	cdf_copy_macaddr(&pMsg->selfMacAddr, &pSession->selfMacAddr);
+	qdf_copy_macaddr(&pMsg->selfMacAddr, &pSession->selfMacAddr);
 	pMsg->data_len = pOemDataReq->data_len;
 	pMsg->data = pOemDataReq->data;
 	/* Incoming buffer ptr saved, set to null to avoid free by caller */

+ 1 - 1
core/sme/src/p2p/p2p_api.c

@@ -79,7 +79,7 @@ QDF_STATUS p2p_process_remain_on_channel_cmd(tpAniSirGlobal pMac,
 		cdf_mem_set(pMsg, sizeof(tSirRemainOnChnReq), 0);
 		pMsg->messageType = eWNI_SME_REMAIN_ON_CHANNEL_REQ;
 		pMsg->length = (uint16_t) len;
-		cdf_copy_macaddr(&pMsg->selfMacAddr, &pSession->selfMacAddr);
+		qdf_copy_macaddr(&pMsg->selfMacAddr, &pSession->selfMacAddr);
 		pMsg->chnNum = p2pRemainonChn->u.remainChlCmd.chn;
 		pMsg->phyMode = p2pRemainonChn->u.remainChlCmd.phyMode;
 		pMsg->duration = p2pRemainonChn->u.remainChlCmd.duration;

+ 9 - 9
core/utils/pktlog/pktlog_internal.c

@@ -276,8 +276,8 @@ A_STATUS process_tx_info(struct ol_txrx_pdev_t *txrx_pdev, void *data)
 		printk("Invalid pdev in %s\n", __func__);
 		return A_ERROR;
 	}
-	cdf_assert(txrx_pdev->pl_dev);
-	cdf_assert(data);
+	qdf_assert(txrx_pdev->pl_dev);
+	qdf_assert(data);
 	pl_dev = txrx_pdev->pl_dev;
 
 	pl_tgt_hdr = (uint32_t *) data;
@@ -358,11 +358,11 @@ A_STATUS process_tx_info(struct ol_txrx_pdev_t *txrx_pdev, void *data)
 		 * Add capability to include the fmr hdr for remote frames
 		 */
 		txctl_log.priv.frm_hdr = frm_hdr;
-		cdf_assert(txctl_log.priv.txdesc_ctl);
+		qdf_assert(txctl_log.priv.txdesc_ctl);
 		cdf_mem_copy((void *)&txctl_log.priv.txdesc_ctl,
 			     ((void *)data + sizeof(struct ath_pktlog_hdr)),
 			     pl_hdr.size);
-		cdf_assert(txctl_log.txdesc_hdr_ctl);
+		qdf_assert(txctl_log.txdesc_hdr_ctl);
 		cdf_mem_copy(txctl_log.txdesc_hdr_ctl, &txctl_log.priv,
 			     sizeof(txctl_log.priv));
 		/* Add Protocol information and HT specific information */
@@ -370,8 +370,8 @@ A_STATUS process_tx_info(struct ol_txrx_pdev_t *txrx_pdev, void *data)
 		size_t log_size = sizeof(frm_hdr) + pl_hdr.size;
 		void *txdesc_hdr_ctl = (void *)
 		pktlog_getbuf(pl_dev, pl_info, log_size, &pl_hdr);
-		cdf_assert(txdesc_hdr_ctl);
-		cdf_assert(pl_hdr.size < (370 * sizeof(u_int32_t)));
+		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),
@@ -386,7 +386,7 @@ A_STATUS process_tx_info(struct ol_txrx_pdev_t *txrx_pdev, void *data)
 
 		txstat_log.ds_status = (void *)
 				       pktlog_getbuf(pl_dev, pl_info, log_size, &pl_hdr);
-		cdf_assert(txstat_log.ds_status);
+		qdf_assert(txstat_log.ds_status);
 		cdf_mem_copy(txstat_log.ds_status,
 			     ((void *)data + sizeof(struct ath_pktlog_hdr)),
 			     pl_hdr.size);
@@ -431,10 +431,10 @@ A_STATUS process_tx_info(struct ol_txrx_pdev_t *txrx_pdev, void *data)
 				msdu_id += 1;
 			}
 			tx_desc = ol_tx_desc_find(txrx_pdev, tx_desc_id);
-			cdf_assert(tx_desc);
+			qdf_assert(tx_desc);
 			netbuf = tx_desc->netbuf;
 			htt_tx_desc = (uint32_t *) tx_desc->htt_tx_desc;
-			cdf_assert(htt_tx_desc);
+			qdf_assert(htt_tx_desc);
 
 			cdf_nbuf_peek_header(netbuf, &addr, &len);
 

+ 3 - 3
core/wma/src/wma_data.c

@@ -2251,7 +2251,7 @@ int wmi_desc_pool_init(tp_wma_handle wma_handle, uint32_t pool_size)
 
 	if (!pool_size) {
 		WMA_LOGE("%s: failed to allocate desc pool", __func__);
-		cdf_assert_always(pool_size);
+		qdf_assert_always(pool_size);
 		return -EINVAL;
 	}
 	WMA_LOGE("%s: initialize desc pool of size %d", __func__, pool_size);
@@ -2923,7 +2923,7 @@ void ol_rx_err(ol_pdev_handle pdev, uint8_t vdev_id,
 	mic_err_ind->messageType = eWNI_SME_MIC_FAILURE_IND;
 	mic_err_ind->length = sizeof(*mic_err_ind);
 	mic_err_ind->sessionId = vdev_id;
-	cdf_copy_macaddr(&mic_err_ind->bssId,
+	qdf_copy_macaddr(&mic_err_ind->bssId,
 		     (struct qdf_mac_addr *) &wma->interfaces[vdev_id].bssid);
 	cdf_mem_copy(mic_err_ind->info.taMacAddr,
 		     (struct qdf_mac_addr *) peer_mac_addr,
@@ -3119,7 +3119,7 @@ wma_indicate_err(
 		mic_err_ind->messageType = eWNI_SME_MIC_FAILURE_IND;
 		mic_err_ind->length = sizeof(*mic_err_ind);
 		vdev_id = err_info->u.mic_err.vdev_id;
-		cdf_copy_macaddr(&mic_err_ind->bssId,
+		qdf_copy_macaddr(&mic_err_ind->bssId,
 		     (struct qdf_mac_addr *) &wma->interfaces[vdev_id].bssid);
 		WMA_LOGE("MIC error: BSSID:%02x:%02x:%02x:%02x:%02x:%02x\n",
 			 mic_err_ind->bssId.bytes[0], mic_err_ind->bssId.bytes[1],

+ 8 - 8
core/wma/src/wma_dev_if.c

@@ -86,7 +86,7 @@ void *wma_find_vdev_by_addr(tp_wma_handle wma, uint8_t *addr,
 	uint8_t i;
 
 	for (i = 0; i < wma->max_bssid; i++) {
-		if (cdf_is_macaddr_equal(
+		if (qdf_is_macaddr_equal(
 			(struct qdf_mac_addr *) wma->interfaces[i].addr,
 			(struct qdf_mac_addr *) addr) == true) {
 			*vdev_id = i;
@@ -167,7 +167,7 @@ void *wma_find_vdev_by_bssid(tp_wma_handle wma, uint8_t *bssid,
 	int i;
 
 	for (i = 0; i < wma->max_bssid; i++) {
-		if (cdf_is_macaddr_equal(
+		if (qdf_is_macaddr_equal(
 			(struct qdf_mac_addr *) wma->interfaces[i].bssid,
 			(struct qdf_mac_addr *) bssid) == true) {
 			*vdev_id = i;
@@ -320,7 +320,7 @@ static struct wma_target_req *wma_find_req(tp_wma_handle wma,
 
 	do {
 		node1 = node2;
-		req_msg = cdf_container_of(node1, struct wma_target_req, node);
+		req_msg = qdf_container_of(node1, struct wma_target_req, node);
 		if (req_msg->vdev_id != vdev_id)
 			continue;
 		if (req_msg->type != type)
@@ -381,7 +381,7 @@ static struct wma_target_req *wma_find_remove_req_msgtype(tp_wma_handle wma,
 
 	do {
 		node1 = node2;
-		req_msg = cdf_container_of(node1, struct wma_target_req, node);
+		req_msg = qdf_container_of(node1, struct wma_target_req, node);
 		if (req_msg->vdev_id != vdev_id)
 			continue;
 		if (req_msg->msg_type != msg_type)
@@ -440,7 +440,7 @@ static struct wma_target_req *wma_find_vdev_req(tp_wma_handle wma,
 
 	do {
 		node1 = node2;
-		req_msg = cdf_container_of(node1, struct wma_target_req, node);
+		req_msg = qdf_container_of(node1, struct wma_target_req, node);
 		if (req_msg->vdev_id != vdev_id)
 			continue;
 		if (req_msg->type != type)
@@ -1525,7 +1525,7 @@ static void wma_recreate_ibss_vdev_and_bss_peer(tp_wma_handle wma,
 		return;
 	}
 
-	cdf_copy_macaddr(
+	qdf_copy_macaddr(
 		(struct qdf_mac_addr *) &(add_sta_self_param.self_mac_addr),
 		(struct qdf_mac_addr *) &(vdev->mac_addr));
 	add_sta_self_param.session_id = vdev_id;
@@ -3234,7 +3234,7 @@ static void wma_add_bss_ibss_mode(tp_wma_handle wma, tpAddBssParams add_bss)
 		}
 
 		/* remove the non-ibss vdev */
-		cdf_copy_macaddr(
+		qdf_copy_macaddr(
 			(struct qdf_mac_addr *) &(del_sta_param.self_mac_addr),
 			(struct qdf_mac_addr *) &(vdev->mac_addr));
 		del_sta_param.session_id = vdev_id;
@@ -3243,7 +3243,7 @@ static void wma_add_bss_ibss_mode(tp_wma_handle wma, tpAddBssParams add_bss)
 		wma_vdev_detach(wma, &del_sta_param, 0);
 
 		/* create new vdev for ibss */
-		cdf_copy_macaddr((struct qdf_mac_addr *) &
+		qdf_copy_macaddr((struct qdf_mac_addr *) &
 			 (add_sta_self_param.self_mac_addr),
 			 (struct qdf_mac_addr *) &(add_bss->selfMacAddr));
 		add_sta_self_param.session_id = vdev_id;

+ 2 - 2
core/wma/src/wma_main.c

@@ -2927,7 +2927,7 @@ static void wma_cleanup_hold_req(tp_wma_handle wma)
 
 	while (QDF_STATUS_SUCCESS !=
 			qdf_list_peek_front(&wma->wma_hold_req_queue, &node1)) {
-		req_msg = cdf_container_of(node1, struct wma_target_req, node);
+		req_msg = qdf_container_of(node1, struct wma_target_req, node);
 		status = qdf_list_remove_node(&wma->wma_hold_req_queue, node1);
 		if (QDF_STATUS_SUCCESS != status) {
 			qdf_spin_unlock_bh(&wma->wma_hold_req_q_lock);
@@ -2962,7 +2962,7 @@ static void wma_cleanup_vdev_resp(tp_wma_handle wma)
 
 	while (QDF_STATUS_SUCCESS != qdf_list_peek_front(&wma->vdev_resp_queue,
 						      &node1)) {
-		req_msg = cdf_container_of(node1, struct wma_target_req, node);
+		req_msg = qdf_container_of(node1, struct wma_target_req, node);
 		status = qdf_list_remove_node(&wma->vdev_resp_queue, node1);
 		if (QDF_STATUS_SUCCESS != status) {
 			qdf_spin_unlock_bh(&wma->vdev_respq_lock);

+ 24 - 24
target/inc/htt_isoc.h

@@ -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.
  *
@@ -40,7 +40,7 @@
 #include <a_types.h>            /* A_UINT32, A_UINT8 */
 
 #ifdef ATHR_WIN_NWF
-#pragma warning( disable:4214 ) /* bit field types other than int */
+#pragma warning(disable:4214) /* bit field types other than int */
 #endif
 
 #include "htt_common.h"
@@ -102,7 +102,7 @@ htt_isoc_t2h_field_set(A_UINT32 *msg_addr32,
 		       unsigned mask, unsigned shift, unsigned value)
 {
 	/* sanity check: make sure the value fits within the field */
-	/* cdf_assert(value << shift == (value << shift) | mask); */
+	/* qdf_assert(value << shift == (value << shift) | mask); */
 
 	msg_addr32 += offset32;
 	/* clear the field */
@@ -245,13 +245,13 @@ enum {
  */
 typedef struct htt_isoc_t2h_peer_info_s {
 	/* word 0 */
-	A_UINT32 msg_type : 8,    /* HTT_ISOC_T2H_MSG_TYPE_PEER_INFO */
-		 dpu_idx : 8, bcast_dpu_idx : 8, mgmt_dpu_idx : 8;
+	A_UINT32 msg_type:8,    /* HTT_ISOC_T2H_MSG_TYPE_PEER_INFO */
+		 dpu_idx:8, bcast_dpu_idx:8, mgmt_dpu_idx:8;
 	/* word 1 */
-	A_UINT32 peer_id : 11, dpu_sig : 7, bcast_dpu_sig : 7, mgmt_dpu_sig : 7;
+	A_UINT32 peer_id:11, dpu_sig:7, bcast_dpu_sig:7, mgmt_dpu_sig:7;
 	/* word 2 */
 	A_UINT32
-		peer_type : 6, rmf_enabled : 1, reserved0 : 1, vdev_id : 8, mac_addr_l16 : 16;
+		peer_type:6, rmf_enabled:1, reserved0:1, vdev_id:8, mac_addr_l16:16;
 	/* word 3 */
 	A_UINT32 mac_addr_u32;
 } htt_isoc_t2h_peer_info_t;
@@ -422,8 +422,8 @@ typedef struct htt_isoc_t2h_peer_info_s {
  */
 typedef struct htt_isoc_t2h_peer_unmap_s {
 	/* word 0 */
-	A_UINT32 msg_type : 8,    /* HTT_ISOC_T2H_MSG_TYPE_PEER_UNMAP */
-		 peer_id : 11, reserved0 : 13;
+	A_UINT32 msg_type:8,    /* HTT_ISOC_T2H_MSG_TYPE_PEER_UNMAP */
+		 peer_id:11, reserved0:13;
 } htt_isoc_t2h_peer_unmap_t;
 
 /* word 0 */
@@ -512,10 +512,10 @@ enum {
  */
 typedef struct htt_isoc_t2h_addba_s {
 	/* word 0 */
-	A_UINT32 msg_type : 8,    /* HTT_ISOC_T2H_MSG_TYPE_ADDBA */
-		 win_size : 8, tid : 4, peer_id : 12;
+	A_UINT32 msg_type:8,    /* HTT_ISOC_T2H_MSG_TYPE_ADDBA */
+		 win_size:8, tid:4, peer_id:12;
 	/* word 1 */
-	A_UINT32 start_seq_num : 12, status : 1, reserved0 : 19;
+	A_UINT32 start_seq_num:12, status:1, reserved0:19;
 } htt_isoc_t2h_addba_t;
 
 /* word 0 */
@@ -623,8 +623,8 @@ typedef struct htt_isoc_t2h_addba_s {
  */
 typedef struct htt_isoc_t2h_delba_s {
 	/* word 0 */
-	A_UINT32 msg_type : 8,    /* HTT_ISOC_T2H_MSG_TYPE_DELBA */
-		 status : 1, reserved0 : 7, tid : 4, peer_id : 12;
+	A_UINT32 msg_type:8,    /* HTT_ISOC_T2H_MSG_TYPE_DELBA */
+		 status:1, reserved0:7, tid:4, peer_id:12;
 } htt_isoc_t2h_delba_t;
 
 /* word 0 */
@@ -725,8 +725,8 @@ typedef struct htt_isoc_t2h_delba_s {
  */
 typedef struct htt_isoc_t2h_sec_ind_s {
 	/* word 0 */
-	A_UINT32 msg_type : 8,    /* HTT_ISOC_T2H_MSG_TYPE_SEC_IND */
-		 peer_id : 8, sec_type : 8, is_unicast : 8;
+	A_UINT32 msg_type:8,    /* HTT_ISOC_T2H_MSG_TYPE_SEC_IND */
+		 peer_id:8, sec_type:8, is_unicast:8;
 	/* word 1 */
 	A_UINT32 mic_key1;
 	/* word 2 */
@@ -830,8 +830,8 @@ typedef struct htt_isoc_t2h_sec_ind_s {
  */
 typedef struct htt_isoc_t2h_peer_tx_ready_s {
 	/* word 0 */
-	A_UINT32 msg_type : 8,    /* HTT_ISOC_T2H_MSG_TYPE_PEER_TX_READY */
-		 peer_id : 11, reserved0 : 13;
+	A_UINT32 msg_type:8,    /* HTT_ISOC_T2H_MSG_TYPE_PEER_TX_READY */
+		 peer_id:11, reserved0:13;
 } htt_isoc_t2h_peer_tx_ready_t;
 
 /* word 0 */
@@ -950,14 +950,14 @@ typedef struct htt_isoc_t2h_peer_tx_ready_s {
  */
 typedef struct htt_isoc_t2h_rx_err_s {
 	/* word 0 */
-	A_UINT32 msg_type : 8,    /* HTT_ISOC_T2H_MSG_TYPE_RX_ERR */
-		 rx_err_type : 8, peer_id : 16;
+	A_UINT32 msg_type:8,    /* HTT_ISOC_T2H_MSG_TYPE_RX_ERR */
+		 rx_err_type:8, peer_id:16;
 	/* word 1 */
 	A_UINT32
-		ext_tid : 5,
-		reserved1 : 1,
-		mcast : 1,
-		l2_hdr_is_80211 : 1, l2_hdr_bytes : 8, sec_hdr_bytes : 8, rx_err_cnt : 8;
+		ext_tid:5,
+		reserved1:1,
+		mcast:1,
+		l2_hdr_is_80211:1, l2_hdr_bytes:8, sec_hdr_bytes:8, rx_err_cnt:8;
 	/* words 2 - M-1: L2 header */
 	/* words M - N: security header */
 } htt_isoc_t2h_rx_err_t;