소스 검색

qcacld-3.0: Consolidate multiple MAC_ADDR_LEN to QDF_MAC_ADDR_SIZE

Consolidate multiple (redundant) MAC_ADDR_LEN to QDF_MAC_ADDR_SIZE
PMO_80211_ADDR_LEN
IEEE80211_ADDR_LEN
ETHER_ADDR_LEN
HTT_MAC_ADDR_LEN
ETHERNET_ADDR_LEN
DEFRAG_IEEE80211_ADDR_LEN
OL_TXRX_MAC_ADDR_LEN
QCSAP_ADDR_LEN

CRs-Fixed: 2406592
Change-Id: I829c5799e4724f81af996b23fdd4ea03f4728bc4
Srinivas Girigowda 6 년 전
부모
커밋
a47b45f94f

+ 9 - 9
components/pmo/core/src/wlan_pmo_static_config.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2017-2019 The Linux Foundation. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -117,7 +117,7 @@ static QDF_STATUS pmo_configure_wow_ap(struct wlan_objmgr_vdev *vdev)
 {
 	QDF_STATUS ret;
 	uint8_t arp_offset = 20;
-	uint8_t mac_mask[PMO_80211_ADDR_LEN];
+	uint8_t mac_mask[QDF_MAC_ADDR_SIZE];
 	struct pmo_vdev_priv_obj *vdev_ctx;
 
 	vdev_ctx = pmo_vdev_get_priv(vdev);
@@ -127,12 +127,12 @@ static QDF_STATUS pmo_configure_wow_ap(struct wlan_objmgr_vdev *vdev)
 	 * WoW pattern id should be unique for each vdev
 	 * WoW pattern id can be same on 2 different VDEVs
 	 */
-	qdf_mem_set(&mac_mask, PMO_80211_ADDR_LEN, 0xFF);
+	qdf_mem_set(&mac_mask, QDF_MAC_ADDR_SIZE, 0xFF);
 	ret = pmo_tgt_send_wow_patterns_to_fw(vdev,
 			pmo_get_and_increment_wow_default_ptrn(vdev_ctx),
 			wlan_vdev_mlme_get_macaddr(vdev),
-			PMO_80211_ADDR_LEN, 0, mac_mask,
-			PMO_80211_ADDR_LEN, false);
+			QDF_MAC_ADDR_SIZE, 0, mac_mask,
+			QDF_MAC_ADDR_SIZE, false);
 	if (ret != QDF_STATUS_SUCCESS) {
 		pmo_err("Failed to add WOW unicast pattern ret %d", ret);
 		return ret;
@@ -253,13 +253,13 @@ static QDF_STATUS pmo_configure_ssdp(struct wlan_objmgr_vdev *vdev)
 static QDF_STATUS pmo_configure_wow_sta(struct wlan_objmgr_vdev *vdev)
 {
 	uint8_t arp_offset = 12;
-	uint8_t mac_mask[PMO_80211_ADDR_LEN];
+	uint8_t mac_mask[QDF_MAC_ADDR_SIZE];
 	QDF_STATUS ret = QDF_STATUS_SUCCESS;
 	struct pmo_vdev_priv_obj *vdev_ctx;
 
 	vdev_ctx = pmo_vdev_get_priv(vdev);
 
-	qdf_mem_set(&mac_mask, PMO_80211_ADDR_LEN, 0xFF);
+	qdf_mem_set(&mac_mask, QDF_MAC_ADDR_SIZE, 0xFF);
 	/*
 	 * Set up unicast wow pattern
 	 * WoW pattern ID should be unique for each vdev
@@ -268,8 +268,8 @@ static QDF_STATUS pmo_configure_wow_sta(struct wlan_objmgr_vdev *vdev)
 	ret = pmo_tgt_send_wow_patterns_to_fw(vdev,
 			pmo_get_and_increment_wow_default_ptrn(vdev_ctx),
 			wlan_vdev_mlme_get_macaddr(vdev),
-			PMO_80211_ADDR_LEN, 0, mac_mask,
-			PMO_80211_ADDR_LEN, false);
+			QDF_MAC_ADDR_SIZE, 0, mac_mask,
+			QDF_MAC_ADDR_SIZE, false);
 	if (ret != QDF_STATUS_SUCCESS) {
 		pmo_err("Failed to add WOW unicast pattern ret %d", ret);
 		return ret;

+ 0 - 1
components/pmo/dispatcher/inc/wlan_pmo_common_public_struct.h

@@ -54,7 +54,6 @@
 #define PMO_IPV6_ADDR_UC_TYPE                 0
 #define PMO_IPV6_ADDR_AC_TYPE                 1
 
-#define PMO_80211_ADDR_LEN  6  /* size of 802.11 address */
 
 #define PMO_WOW_REQUIRED_CREDITS 1
 

+ 22 - 22
core/cds/inc/cds_ieee80211_common.h

@@ -33,26 +33,26 @@ struct ieee80211_frame {
 	uint8_t i_dur[2];
 	union {
 		struct {
-			uint8_t i_addr1[IEEE80211_ADDR_LEN];
-			uint8_t i_addr2[IEEE80211_ADDR_LEN];
-			uint8_t i_addr3[IEEE80211_ADDR_LEN];
+			uint8_t i_addr1[QDF_MAC_ADDR_SIZE];
+			uint8_t i_addr2[QDF_MAC_ADDR_SIZE];
+			uint8_t i_addr3[QDF_MAC_ADDR_SIZE];
 		};
-		uint8_t i_addr_all[3 * IEEE80211_ADDR_LEN];
+		uint8_t i_addr_all[3 * QDF_MAC_ADDR_SIZE];
 	};
 	uint8_t i_seq[2];
-	/* possibly followed by addr4[IEEE80211_ADDR_LEN]; */
+	/* possibly followed by addr4[QDF_MAC_ADDR_SIZE]; */
 	/* see below */
 } __packed;
 
 struct ieee80211_qosframe {
 	uint8_t i_fc[2];
 	uint8_t i_dur[2];
-	uint8_t i_addr1[IEEE80211_ADDR_LEN];
-	uint8_t i_addr2[IEEE80211_ADDR_LEN];
-	uint8_t i_addr3[IEEE80211_ADDR_LEN];
+	uint8_t i_addr1[QDF_MAC_ADDR_SIZE];
+	uint8_t i_addr2[QDF_MAC_ADDR_SIZE];
+	uint8_t i_addr3[QDF_MAC_ADDR_SIZE];
 	uint8_t i_seq[2];
 	uint8_t i_qos[2];
-	/* possibly followed by addr4[IEEE80211_ADDR_LEN]; */
+	/* possibly followed by addr4[QDF_MAC_ADDR_SIZE]; */
 	/* see below */
 } __packed;
 
@@ -63,21 +63,21 @@ struct ieee80211_qoscntl {
 struct ieee80211_frame_addr4 {
 	uint8_t i_fc[2];
 	uint8_t i_dur[2];
-	uint8_t i_addr1[IEEE80211_ADDR_LEN];
-	uint8_t i_addr2[IEEE80211_ADDR_LEN];
-	uint8_t i_addr3[IEEE80211_ADDR_LEN];
+	uint8_t i_addr1[QDF_MAC_ADDR_SIZE];
+	uint8_t i_addr2[QDF_MAC_ADDR_SIZE];
+	uint8_t i_addr3[QDF_MAC_ADDR_SIZE];
 	uint8_t i_seq[2];
-	uint8_t i_addr4[IEEE80211_ADDR_LEN];
+	uint8_t i_addr4[QDF_MAC_ADDR_SIZE];
 } __packed;
 
 struct ieee80211_qosframe_addr4 {
 	uint8_t i_fc[2];
 	uint8_t i_dur[2];
-	uint8_t i_addr1[IEEE80211_ADDR_LEN];
-	uint8_t i_addr2[IEEE80211_ADDR_LEN];
-	uint8_t i_addr3[IEEE80211_ADDR_LEN];
+	uint8_t i_addr1[QDF_MAC_ADDR_SIZE];
+	uint8_t i_addr2[QDF_MAC_ADDR_SIZE];
+	uint8_t i_addr3[QDF_MAC_ADDR_SIZE];
 	uint8_t i_seq[2];
-	uint8_t i_addr4[IEEE80211_ADDR_LEN];
+	uint8_t i_addr4[QDF_MAC_ADDR_SIZE];
 	uint8_t i_qos[2];
 } __packed;
 
@@ -86,17 +86,17 @@ struct ieee80211_qosframe_addr4 {
 struct ieee80211_frame_min_one {
 	uint8_t i_fc[2];
 	uint8_t i_dur[2];
-	uint8_t i_addr1[IEEE80211_ADDR_LEN];
+	uint8_t i_addr1[QDF_MAC_ADDR_SIZE];
 } __packed;                     /* For TxBF RC */
 
 struct ieee80211_qosframe_htc_addr4 {
 	uint8_t i_fc[2];
 	uint8_t i_dur[2];
-	uint8_t i_addr1[IEEE80211_ADDR_LEN];
-	uint8_t i_addr2[IEEE80211_ADDR_LEN];
-	uint8_t i_addr3[IEEE80211_ADDR_LEN];
+	uint8_t i_addr1[QDF_MAC_ADDR_SIZE];
+	uint8_t i_addr2[QDF_MAC_ADDR_SIZE];
+	uint8_t i_addr3[QDF_MAC_ADDR_SIZE];
 	uint8_t i_seq[2];
-	uint8_t i_addr4[IEEE80211_ADDR_LEN];
+	uint8_t i_addr4[QDF_MAC_ADDR_SIZE];
 	uint8_t i_qos[2];
 	uint8_t i_htc[4];
 } __packed;

+ 0 - 2
core/cds/inc/cds_if_upperproto.h

@@ -19,8 +19,6 @@
 #ifndef _NET_IF_UPPERPROTO_H_
 #define _NET_IF_UPPERPROTO_H_
 
-#define ETHER_ADDR_LEN    6     /* length of an Ethernet address */
-
 #define ETHERTYPE_OCB_TX   0x8151
 #define ETHERTYPE_OCB_RX   0x8152
 

+ 0 - 2
core/cds/src/cds_ieee80211_common_i.h

@@ -130,8 +130,6 @@ enum ieee80211_protmode {
 /* flagext */
 #define IEEE80211_CHAN_DFS              0x0002  /* DFS required on channel */
 
-#define IEEE80211_ADDR_LEN  6   /* size of 802.11 address */
-
 #define IEEE80211_SEQ_MASK      0xfff   /* sequence generator mask */
 #define MIN_SW_SEQ              0x100   /* minimum sequence for SW generate packect */
 

+ 5 - 5
core/cds/src/cds_utils.c

@@ -313,7 +313,7 @@ cds_attach_mmie(uint8_t *igtk, uint8_t *ipn, uint16_t key_id,
 	aad[1] = wh->i_fc[1] & ~(IEEE80211_FC1_RETRY | IEEE80211_FC1_PWR_MGT |
 				 IEEE80211_FC1_MORE_DATA);
 	/* A1 || A2 || A3 */
-	qdf_mem_copy(aad + 2, wh->i_addr_all, 3 * IEEE80211_ADDR_LEN);
+	qdf_mem_copy(aad + 2, wh->i_addr_all, 3 * QDF_MAC_ADDR_SIZE);
 
 	/* MIC = AES-128-CMAC(IGTK, AAD || Management Frame Body || MMIE, 64) */
 	nBytes = AAD_LEN + (frmLen - sizeof(struct ieee80211_frame));
@@ -415,7 +415,7 @@ cds_is_mmie_valid(uint8_t *igtk, uint8_t *ipn, uint8_t *frm, uint8_t *efrm)
 	aad[1] = wh->i_fc[1] & ~(IEEE80211_FC1_RETRY | IEEE80211_FC1_PWR_MGT |
 				 IEEE80211_FC1_MORE_DATA);
 	/* A1 || A2 || A3 */
-	qdf_mem_copy(aad + 2, wh->i_addr_all, 3 * IEEE80211_ADDR_LEN);
+	qdf_mem_copy(aad + 2, wh->i_addr_all, 3 * QDF_MAC_ADDR_SIZE);
 
 	/* MIC = AES-128-CMAC(IGTK, AAD || Management Frame Body || MMIE, 64) */
 	nBytes = AAD_LEN + (efrm - (uint8_t *) (wh + 1));
@@ -540,13 +540,13 @@ bool cds_is_gmac_mmie_valid(uint8_t *igtk, uint8_t *ipn, uint8_t *frm,
 	aad[1] = wh->i_fc[1] & ~(IEEE80211_FC1_RETRY | IEEE80211_FC1_PWR_MGT |
 				 IEEE80211_FC1_MORE_DATA);
 	/* A1 || A2 || A3 */
-	qdf_mem_copy(aad + 2, wh->i_addr_all, 3 * IEEE80211_ADDR_LEN);
+	qdf_mem_copy(aad + 2, wh->i_addr_all, 3 * QDF_MAC_ADDR_SIZE);
 
 	data_len = efrm - (uint8_t *) (wh + 1) - IEEE80211_MMIE_GMAC_MICLEN;
 
 	/* IV */
-	qdf_mem_copy(gmac_nonce, wh->i_addr2, IEEE80211_ADDR_LEN);
-	qdf_mem_copy(gmac_nonce + IEEE80211_ADDR_LEN, rx_ipn,
+	qdf_mem_copy(gmac_nonce, wh->i_addr2, QDF_MAC_ADDR_SIZE);
+	qdf_mem_copy(gmac_nonce + QDF_MAC_ADDR_SIZE, rx_ipn,
 		     IEEE80211_MMIE_IPNLEN);
 	qdf_mem_copy(iv, gmac_nonce, GMAC_NONCE_LEN);
 	iv[AES_BLOCK_SIZE - 1] = 0x01;

+ 0 - 2
core/dp/htt/htt_internal.h

@@ -424,8 +424,6 @@ static inline void htt_print_rx_desc(struct htt_host_rx_desc_base *rx_desc)
 #define HTT_ASSERT3(condition)
 #endif
 
-#define HTT_MAC_ADDR_LEN 6
-
 /*
  * HTT_MAX_SEND_QUEUE_DEPTH -
  * How many packets HTC should allow to accumulate in a send queue

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

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2019 The Linux Foundation. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -325,7 +325,7 @@ static void htt_t2h_lp_msg_handler(void *context, qdf_nbuf_t htt_t2h_msg,
 	}
 	case HTT_T2H_MSG_TYPE_PEER_MAP:
 	{
-		uint8_t mac_addr_deswizzle_buf[HTT_MAC_ADDR_LEN];
+		uint8_t mac_addr_deswizzle_buf[QDF_MAC_ADDR_SIZE];
 		uint8_t *peer_mac_addr;
 		uint16_t peer_id;
 		uint8_t vdev_id;
@@ -599,14 +599,14 @@ static void htt_t2h_lp_msg_handler(void *context, qdf_nbuf_t htt_t2h_msg,
 				(*(msg_word + 1));
 			qdf_mem_copy(err_info.u.mic_err.da,
 				 (uint8_t *)(msg_word + 2),
-				 OL_TXRX_MAC_ADDR_LEN);
+				 QDF_MAC_ADDR_SIZE);
 			qdf_mem_copy(err_info.u.mic_err.sa,
 				 (uint8_t *)(msg_word + 4),
-				 OL_TXRX_MAC_ADDR_LEN);
+				 QDF_MAC_ADDR_SIZE);
 			qdf_mem_copy(&err_info.u.mic_err.pn,
 				 (uint8_t *)(msg_word + 6), 6);
 			qdf_mem_copy(err_info.u.mic_err.ta,
-				 peer->mac_addr.raw, OL_TXRX_MAC_ADDR_LEN);
+				 peer->mac_addr.raw, QDF_MAC_ADDR_SIZE);
 
 			wma_indicate_err(OL_RX_ERR_TKIP_MIC, &err_info);
 			break;

+ 2 - 3
core/dp/txrx/ol_ctrl_txrx_api.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011-2017 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2017, 2019 The Linux Foundation. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -23,12 +23,11 @@
 #ifndef _OL_CTRL_TXRX_API__H_
 #define _OL_CTRL_TXRX_API__H_
 
-/* #include <osapi_linux.h>      / * uint8_t * / */
 #include <osdep.h>              /* uint8_t */
 #include <qdf_nbuf.h>           /* qdf_nbuf_t */
 
 #include <cdp_txrx_cmn.h>           /* ol_txrx_pdev_handle */
-#include <ol_txrx_types.h>          /* OL_TXRX_MAC_ADDR_LEN */
+#include <ol_txrx_types.h>
 #include <cds_ieee80211_common.h>   /* ieee80211_frame */
 #include <cdp_txrx_handle.h>
 #ifdef SUPPORT_HOST_STATISTICS

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

@@ -266,7 +266,7 @@ void ol_rx_update_histogram_stats(uint32_t msdu_count, uint8_t frag_ind,
 static void ol_rx_process_inv_peer(ol_txrx_pdev_handle pdev,
 				   void *rx_mpdu_desc, qdf_nbuf_t msdu)
 {
-	uint8_t a1[IEEE80211_ADDR_LEN];
+	uint8_t a1[QDF_MAC_ADDR_SIZE];
 	htt_pdev_handle htt_pdev = pdev->htt_pdev;
 	struct ol_txrx_vdev_t *vdev = NULL;
 	struct ieee80211_frame *wh;
@@ -288,9 +288,9 @@ static void ol_rx_process_inv_peer(ol_txrx_pdev_handle pdev,
 		return;
 
 	/* ignore frames for non-existent bssids */
-	qdf_mem_copy(a1, wh->i_addr1, IEEE80211_ADDR_LEN);
+	qdf_mem_copy(a1, wh->i_addr1, QDF_MAC_ADDR_SIZE);
 	TAILQ_FOREACH(vdev, &pdev->vdev_list, vdev_list_elem) {
-		if (qdf_mem_cmp(a1, vdev->mac_addr.raw, IEEE80211_ADDR_LEN))
+		if (qdf_mem_cmp(a1, vdev->mac_addr.raw, QDF_MAC_ADDR_SIZE))
 			break;
 	}
 	if (!vdev)
@@ -884,7 +884,7 @@ ol_rx_inspect(struct ol_txrx_vdev_t *vdev,
 		offset = SIZEOF_80211_HDR + LLC_SNAP_HDR_OFFSET_ETHERTYPE;
 		l3_hdr = data + SIZEOF_80211_HDR + LLC_SNAP_HDR_LEN;
 	} else {
-		offset = ETHERNET_ADDR_LEN * 2;
+		offset = QDF_MAC_ADDR_SIZE * 2;
 		l3_hdr = data + ETHERNET_HDR_LEN;
 	}
 	ethertype = (data[offset] << 8) | data[offset + 1];
@@ -1019,7 +1019,7 @@ ol_rx_filter(struct ol_txrx_vdev_t *vdev,
 			offset = SIZEOF_80211_HDR +
 				LLC_SNAP_HDR_OFFSET_ETHERTYPE;
 		} else {
-			offset = ETHERNET_ADDR_LEN * 2;
+			offset = QDF_MAC_ADDR_SIZE * 2;
 		}
 		/* get header info from msdu */
 		wh = qdf_nbuf_data(msdu);
@@ -1706,7 +1706,7 @@ void ol_ath_add_vow_extstats(htt_pdev_handle pdev, qdf_nbuf_t msdu)
 
 	data = qdf_nbuf_data(msdu);
 
-	offset = ETHERNET_ADDR_LEN * 2;
+	offset = QDF_MAC_ADDR_SIZE * 2;
 	l3_hdr = data + ETHERNET_HDR_LEN;
 	ethertype = (data[offset] << 8) | data[offset + 1];
 	if (ethertype == ETHERTYPE_IPV4) {

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

@@ -60,10 +60,10 @@
 #include <qdf_time.h>           /* qdf_system_time */
 
 #define DEFRAG_IEEE80211_ADDR_EQ(a1, a2) \
-	(!qdf_mem_cmp(a1, a2, IEEE80211_ADDR_LEN))
+	(!qdf_mem_cmp(a1, a2, QDF_MAC_ADDR_SIZE))
 
 #define DEFRAG_IEEE80211_ADDR_COPY(dst, src) \
-	qdf_mem_copy(dst, src, IEEE80211_ADDR_LEN)
+	qdf_mem_copy(dst, src, QDF_MAC_ADDR_SIZE)
 
 #define DEFRAG_IEEE80211_QOS_HAS_SEQ(wh) \
 	(((wh)->i_fc[0] & \
@@ -946,22 +946,22 @@ void ol_rx_defrag_michdr(const struct ieee80211_frame *wh0, uint8_t hdr[])
 	switch (wh->i_fc[1] & IEEE80211_FC1_DIR_MASK) {
 	case IEEE80211_FC1_DIR_NODS:
 		DEFRAG_IEEE80211_ADDR_COPY(hdr, wh->i_addr1);   /* DA */
-		DEFRAG_IEEE80211_ADDR_COPY(hdr + IEEE80211_ADDR_LEN,
+		DEFRAG_IEEE80211_ADDR_COPY(hdr + QDF_MAC_ADDR_SIZE,
 					   wh->i_addr2);
 		break;
 	case IEEE80211_FC1_DIR_TODS:
 		DEFRAG_IEEE80211_ADDR_COPY(hdr, wh->i_addr3);   /* DA */
-		DEFRAG_IEEE80211_ADDR_COPY(hdr + IEEE80211_ADDR_LEN,
+		DEFRAG_IEEE80211_ADDR_COPY(hdr + QDF_MAC_ADDR_SIZE,
 					   wh->i_addr2);
 		break;
 	case IEEE80211_FC1_DIR_FROMDS:
 		DEFRAG_IEEE80211_ADDR_COPY(hdr, wh->i_addr1);   /* DA */
-		DEFRAG_IEEE80211_ADDR_COPY(hdr + IEEE80211_ADDR_LEN,
+		DEFRAG_IEEE80211_ADDR_COPY(hdr + QDF_MAC_ADDR_SIZE,
 					   wh->i_addr3);
 		break;
 	case IEEE80211_FC1_DIR_DSTODS:
 		DEFRAG_IEEE80211_ADDR_COPY(hdr, wh->i_addr3);   /* DA */
-		DEFRAG_IEEE80211_ADDR_COPY(hdr + IEEE80211_ADDR_LEN,
+		DEFRAG_IEEE80211_ADDR_COPY(hdr + QDF_MAC_ADDR_SIZE,
 					   wh->i_addr4);
 		break;
 	}
@@ -1119,7 +1119,7 @@ uint16_t ol_rx_frag_hdrsize(const void *data)
 	uint16_t size = sizeof(struct ieee80211_frame);
 
 	if ((wh->i_fc[1] & IEEE80211_FC1_DIR_MASK) == IEEE80211_FC1_DIR_DSTODS)
-		size += IEEE80211_ADDR_LEN;
+		size += QDF_MAC_ADDR_SIZE;
 
 	if (DEFRAG_IEEE80211_QOS_HAS_SEQ(wh)) {
 		size += sizeof(uint16_t);
@@ -1199,18 +1199,18 @@ void ol_rx_defrag_nwifi_to_8023(ol_txrx_pdev_handle pdev, qdf_nbuf_t msdu)
 	switch (wh.i_fc[1] & IEEE80211_FC1_DIR_MASK) {
 	case IEEE80211_FC1_DIR_NODS:
 		qdf_mem_copy(eth_hdr->dest_addr, wh.i_addr1,
-			     IEEE80211_ADDR_LEN);
-		qdf_mem_copy(eth_hdr->src_addr, wh.i_addr2, IEEE80211_ADDR_LEN);
+			     QDF_MAC_ADDR_SIZE);
+		qdf_mem_copy(eth_hdr->src_addr, wh.i_addr2, QDF_MAC_ADDR_SIZE);
 		break;
 	case IEEE80211_FC1_DIR_TODS:
 		qdf_mem_copy(eth_hdr->dest_addr, wh.i_addr3,
-			     IEEE80211_ADDR_LEN);
-		qdf_mem_copy(eth_hdr->src_addr, wh.i_addr2, IEEE80211_ADDR_LEN);
+			     QDF_MAC_ADDR_SIZE);
+		qdf_mem_copy(eth_hdr->src_addr, wh.i_addr2, QDF_MAC_ADDR_SIZE);
 		break;
 	case IEEE80211_FC1_DIR_FROMDS:
 		qdf_mem_copy(eth_hdr->dest_addr, wh.i_addr1,
-			     IEEE80211_ADDR_LEN);
-		qdf_mem_copy(eth_hdr->src_addr, wh.i_addr3, IEEE80211_ADDR_LEN);
+			     QDF_MAC_ADDR_SIZE);
+		qdf_mem_copy(eth_hdr->src_addr, wh.i_addr3, QDF_MAC_ADDR_SIZE);
 		break;
 	case IEEE80211_FC1_DIR_DSTODS:
 		break;

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

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011-2017 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2017, 2019 The Linux Foundation. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -27,7 +27,6 @@
 #include <ol_txrx_internal.h>
 #include <ol_txrx_dbg.h>
 
-#define DEFRAG_IEEE80211_ADDR_LEN    6
 #define DEFRAG_IEEE80211_KEY_LEN     8
 #define DEFRAG_IEEE80211_FCS_LEN     4
 

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

@@ -43,7 +43,7 @@
 static inline void ol_ap_fwd_check(struct ol_txrx_vdev_t *vdev, qdf_nbuf_t msdu)
 {
 	struct ieee80211_frame *mac_header;
-	unsigned char tmp_addr[IEEE80211_ADDR_LEN];
+	unsigned char tmp_addr[QDF_MAC_ADDR_SIZE];
 	unsigned char type;
 	unsigned char subtype;
 	unsigned char fromds;
@@ -69,7 +69,7 @@ static inline void ol_ap_fwd_check(struct ol_txrx_vdev_t *vdev, qdf_nbuf_t msdu)
 	    ((tods != 1) || (fromds != 0)) ||
 	    qdf_mem_cmp
 		     (mac_header->i_addr3, vdev->mac_addr.raw,
-		     IEEE80211_ADDR_LEN)) {
+		     QDF_MAC_ADDR_SIZE)) {
 		ol_txrx_dbg("Exit | Unnecessary to adjust mac header");
 	} else {
 		/* Flip the ToDs bit to FromDs */

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

@@ -189,13 +189,13 @@ ol_tx_set_ether_type(
 		}
 	} else if (tx_msdu_info->htt.info.l2_hdr_type ==
 					htt_pkt_type_ethernet) {
-		ptr = (datap + ETHERNET_ADDR_LEN * 2);
+		ptr = (datap + QDF_MAC_ADDR_SIZE * 2);
 		typeorlength = (ptr[0] << 8) | ptr[1];
 		/*ETHERNET_HDR_LEN;*/
 		l3_data_ptr = datap + sizeof(struct ethernet_hdr_t);
 
 		if (typeorlength == ETHERTYPE_VLAN) {
-			ptr = (datap + ETHERNET_ADDR_LEN * 2
+			ptr = (datap + QDF_MAC_ADDR_SIZE * 2
 					+ ETHERTYPE_VLAN_LEN);
 			typeorlength = (ptr[0] << 8) | ptr[1];
 			l3_data_ptr += ETHERTYPE_VLAN_LEN;
@@ -676,7 +676,7 @@ ol_tx_classify_mgmt(
 
 				qdf_mem_copy(
 					&local_mac_addr_aligned.raw[0],
-					dest_addr, OL_TXRX_MAC_ADDR_LEN);
+					dest_addr, QDF_MAC_ADDR_SIZE);
 				mac_addr = &local_mac_addr_aligned;
 				if (ol_txrx_peer_find_mac_addr_cmp
 						(mac_addr,

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

@@ -743,10 +743,10 @@ void ol_txrx_copy_mac_addr_raw(struct cdp_vdev *pvdev, uint8_t *bss_addr)
 	if (bss_addr && vdev->last_real_peer &&
 	    !qdf_mem_cmp((u8 *)bss_addr,
 			     vdev->last_real_peer->mac_addr.raw,
-			     IEEE80211_ADDR_LEN))
+			     QDF_MAC_ADDR_SIZE))
 		qdf_mem_copy(vdev->hl_tdls_ap_mac_addr.raw,
 			     vdev->last_real_peer->mac_addr.raw,
-			     OL_TXRX_MAC_ADDR_LEN);
+			     QDF_MAC_ADDR_SIZE);
 	qdf_spin_unlock_bh(&vdev->pdev->last_real_peer_mutex);
 }
 

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

@@ -1642,7 +1642,7 @@ ol_txrx_vdev_attach(struct cdp_pdev *ppdev,
 	ol_txrx_vdev_per_vdev_tx_desc_init(vdev);
 
 	qdf_mem_copy(&vdev->mac_addr.raw[0], vdev_mac_addr,
-		     OL_TXRX_MAC_ADDR_LEN);
+		     QDF_MAC_ADDR_SIZE);
 
 	TAILQ_INIT(&vdev->peer_list);
 	vdev->last_real_peer = NULL;
@@ -2176,7 +2176,7 @@ ol_txrx_peer_attach(struct cdp_vdev *pvdev, uint8_t *peer_mac_addr,
 	peer->vdev = vdev;
 	peer->ctrl_peer = peer->ctrl_peer;
 	qdf_mem_copy(&peer->mac_addr.raw[0], peer_mac_addr,
-		     OL_TXRX_MAC_ADDR_LEN);
+		     QDF_MAC_ADDR_SIZE);
 
 	ol_txrx_peer_txqs_init(pdev, peer);
 
@@ -2235,7 +2235,7 @@ ol_txrx_peer_attach(struct cdp_vdev *pvdev, uint8_t *peer_mac_addr,
 	 * For every peer MAp message search and set if bss_peer
 	 */
 	if (qdf_mem_cmp(peer->mac_addr.raw, vdev->mac_addr.raw,
-				OL_TXRX_MAC_ADDR_LEN))
+				QDF_MAC_ADDR_SIZE))
 		peer->bss_peer = 1;
 
 	/*

+ 25 - 25
core/dp/txrx/ol_txrx_encap.c

@@ -167,34 +167,34 @@ ol_tx_encap_from_8023(struct ol_txrx_vdev_t *vdev,
 	case wlan_op_mode_ap:
 		/* DA , BSSID , SA */
 		qdf_mem_copy(wh->i_addr1, eth_hdr->dest_addr,
-			     IEEE80211_ADDR_LEN);
+			     QDF_MAC_ADDR_SIZE);
 		qdf_mem_copy(wh->i_addr2, &vdev->mac_addr.raw,
-			     IEEE80211_ADDR_LEN);
+			     QDF_MAC_ADDR_SIZE);
 		qdf_mem_copy(wh->i_addr3, eth_hdr->src_addr,
-			     IEEE80211_ADDR_LEN);
+			     QDF_MAC_ADDR_SIZE);
 		wh->i_fc[1] = IEEE80211_FC1_DIR_FROMDS;
 		new_hdsize = sizeof(struct ieee80211_frame);
 		break;
 	case wlan_op_mode_ibss:
 		/* DA, SA, BSSID */
 		qdf_mem_copy(wh->i_addr1, eth_hdr->dest_addr,
-			     IEEE80211_ADDR_LEN);
+			     QDF_MAC_ADDR_SIZE);
 		qdf_mem_copy(wh->i_addr2, eth_hdr->src_addr,
-			     IEEE80211_ADDR_LEN);
+			     QDF_MAC_ADDR_SIZE);
 		/* need to check the bssid behaviour for IBSS vdev */
 		qdf_mem_copy(wh->i_addr3, &vdev->mac_addr.raw,
-			     IEEE80211_ADDR_LEN);
+			     QDF_MAC_ADDR_SIZE);
 		wh->i_fc[1] = IEEE80211_FC1_DIR_NODS;
 		new_hdsize = sizeof(struct ieee80211_frame);
 		break;
 	case wlan_op_mode_sta:
 		/* BSSID, SA , DA */
 		qdf_mem_copy(wh->i_addr1, &peer->mac_addr.raw,
-			     IEEE80211_ADDR_LEN);
+			     QDF_MAC_ADDR_SIZE);
 		qdf_mem_copy(wh->i_addr2, eth_hdr->src_addr,
-			     IEEE80211_ADDR_LEN);
+			     QDF_MAC_ADDR_SIZE);
 		qdf_mem_copy(wh->i_addr3, eth_hdr->dest_addr,
-			     IEEE80211_ADDR_LEN);
+			     QDF_MAC_ADDR_SIZE);
 		wh->i_fc[1] = IEEE80211_FC1_DIR_TODS;
 		new_hdsize = sizeof(struct ieee80211_frame);
 		break;
@@ -307,27 +307,27 @@ ol_rx_decap_to_native_wifi(struct ol_txrx_vdev_t *vdev,
 		switch (wh->i_fc[1] & IEEE80211_FC1_DIR_MASK) {
 		case IEEE80211_FC1_DIR_NODS:
 			qdf_mem_copy(wh->i_addr1, ethr_hdr->dest_addr,
-				     ETHERNET_ADDR_LEN);
+				     QDF_MAC_ADDR_SIZE);
 			qdf_mem_copy(wh->i_addr2, ethr_hdr->src_addr,
-				     ETHERNET_ADDR_LEN);
+				     QDF_MAC_ADDR_SIZE);
 			break;
 		case IEEE80211_FC1_DIR_TODS:
 			qdf_mem_copy(wh->i_addr2, ethr_hdr->src_addr,
-				     ETHERNET_ADDR_LEN);
+				     QDF_MAC_ADDR_SIZE);
 			qdf_mem_copy(wh->i_addr3, ethr_hdr->dest_addr,
-				     ETHERNET_ADDR_LEN);
+				     QDF_MAC_ADDR_SIZE);
 			break;
 		case IEEE80211_FC1_DIR_FROMDS:
 			qdf_mem_copy(wh->i_addr1, ethr_hdr->dest_addr,
-				     ETHERNET_ADDR_LEN);
+				     QDF_MAC_ADDR_SIZE);
 			qdf_mem_copy(wh->i_addr3, ethr_hdr->src_addr,
-				     ETHERNET_ADDR_LEN);
+				     QDF_MAC_ADDR_SIZE);
 			break;
 		case IEEE80211_FC1_DIR_DSTODS:
 			qdf_mem_copy(wh->i_addr3, ethr_hdr->dest_addr,
-				     ETHERNET_ADDR_LEN);
+				     QDF_MAC_ADDR_SIZE);
 			qdf_mem_copy(wh->i_addr4, ethr_hdr->src_addr,
-				     ETHERNET_ADDR_LEN);
+				     QDF_MAC_ADDR_SIZE);
 			break;
 		}
 	}
@@ -392,27 +392,27 @@ ol_rx_decap_to_8023(struct ol_txrx_vdev_t *vdev,
 		switch (wh->i_fc[1] & IEEE80211_FC1_DIR_MASK) {
 		case IEEE80211_FC1_DIR_NODS:
 			qdf_mem_copy(ethr_hdr->dest_addr, wh->i_addr1,
-				     ETHERNET_ADDR_LEN);
+				     QDF_MAC_ADDR_SIZE);
 			qdf_mem_copy(ethr_hdr->src_addr, wh->i_addr2,
-				     ETHERNET_ADDR_LEN);
+				     QDF_MAC_ADDR_SIZE);
 			break;
 		case IEEE80211_FC1_DIR_TODS:
 			qdf_mem_copy(ethr_hdr->dest_addr, wh->i_addr3,
-				     ETHERNET_ADDR_LEN);
+				     QDF_MAC_ADDR_SIZE);
 			qdf_mem_copy(ethr_hdr->src_addr, wh->i_addr2,
-				     ETHERNET_ADDR_LEN);
+				     QDF_MAC_ADDR_SIZE);
 			break;
 		case IEEE80211_FC1_DIR_FROMDS:
 			qdf_mem_copy(ethr_hdr->dest_addr, wh->i_addr1,
-				     ETHERNET_ADDR_LEN);
+				     QDF_MAC_ADDR_SIZE);
 			qdf_mem_copy(ethr_hdr->src_addr, wh->i_addr3,
-				     ETHERNET_ADDR_LEN);
+				     QDF_MAC_ADDR_SIZE);
 			break;
 		case IEEE80211_FC1_DIR_DSTODS:
 			qdf_mem_copy(ethr_hdr->dest_addr, wh->i_addr3,
-				     ETHERNET_ADDR_LEN);
+				     QDF_MAC_ADDR_SIZE);
 			qdf_mem_copy(ethr_hdr->src_addr, wh->i_addr4,
-				     ETHERNET_ADDR_LEN);
+				     QDF_MAC_ADDR_SIZE);
 			break;
 		}
 	}

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

@@ -339,7 +339,7 @@ static inline int ol_txrx_ieee80211_hdrsize(const void *data)
 		     IEEE80211_FC0_TYPE_CTL);
 	if ((wh->i_fc[1] & IEEE80211_FC1_DIR_MASK) ==
 	    IEEE80211_FC1_DIR_DSTODS)
-		size += IEEE80211_ADDR_LEN;
+		size += QDF_MAC_ADDR_SIZE;
 	if (IEEE80211_QOS_HAS_SEQ(wh)) {
 		size += sizeof(uint16_t);
 		/* Qos frame with Order bit set indicates an HTC frame */

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

@@ -183,7 +183,7 @@ struct ol_txrx_peer_t *ol_txrx_peer_vdev_find_hash(struct ol_txrx_pdev_t *pdev,
 		mac_addr = (union ol_txrx_align_mac_addr_t *)peer_mac_addr;
 	} else {
 		qdf_mem_copy(&local_mac_addr_aligned.raw[0],
-			     peer_mac_addr, OL_TXRX_MAC_ADDR_LEN);
+			     peer_mac_addr, QDF_MAC_ADDR_SIZE);
 		mac_addr = &local_mac_addr_aligned;
 	}
 	index = ol_txrx_peer_find_hash_index(pdev, mac_addr);
@@ -218,7 +218,7 @@ struct ol_txrx_peer_t *
 		mac_addr = (union ol_txrx_align_mac_addr_t *)peer_mac_addr;
 	} else {
 		qdf_mem_copy(&local_mac_addr_aligned.raw[0],
-			     peer_mac_addr, OL_TXRX_MAC_ADDR_LEN);
+			     peer_mac_addr, QDF_MAC_ADDR_SIZE);
 		mac_addr = &local_mac_addr_aligned;
 	}
 	index = ol_txrx_peer_find_hash_index(pdev, mac_addr);

+ 2 - 2
core/dp/txrx/ol_txrx_types.h

@@ -217,7 +217,7 @@ union ol_tx_desc_list_elem_t {
 };
 
 union ol_txrx_align_mac_addr_t {
-	uint8_t raw[OL_TXRX_MAC_ADDR_LEN];
+	uint8_t raw[QDF_MAC_ADDR_SIZE];
 	struct {
 		uint16_t bytes_ab;
 		uint16_t bytes_cd;
@@ -380,7 +380,7 @@ struct ol_tx_log_queue_add_t {
 };
 
 struct ol_mac_addr {
-	uint8_t mac_addr[OL_TXRX_MAC_ADDR_LEN];
+	uint8_t mac_addr[QDF_MAC_ADDR_SIZE];
 };
 
 struct ol_tx_sched_t;

+ 0 - 4
core/hdd/inc/qc_sap_ioctl.h

@@ -23,10 +23,6 @@
  * QCSAP ioctls.
  */
 
-#define QCSAP_ADDR_LEN  6
-
-typedef uint8_t qcmacaddr[QCSAP_ADDR_LEN];
-
 /*
  * Channel List Info
  */

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

@@ -20562,7 +20562,7 @@ static int __wlan_hdd_cfg80211_set_mac_acl(struct wiphy *wiphy,
 
 				qdf_mem_copy(&config->accept_mac[i],
 					     params->mac_addrs[i].addr,
-					     sizeof(qcmacaddr));
+					     QDF_MAC_ADDR_SIZE);
 			}
 		} else if (eSAP_ACCEPT_UNLESS_DENIED == config->SapMacaddr_acl) {
 			config->num_deny_mac = params->n_acl_entries;
@@ -20574,7 +20574,7 @@ static int __wlan_hdd_cfg80211_set_mac_acl(struct wiphy *wiphy,
 
 				qdf_mem_copy(&config->deny_mac[i],
 					     params->mac_addrs[i].addr,
-					     sizeof(qcmacaddr));
+					     QDF_MAC_ADDR_SIZE);
 			}
 		}
 		qdf_status = wlansap_set_mac_acl(

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

@@ -282,7 +282,7 @@ hdd_fill_encrypt_decrypt_params(struct disa_encrypt_decrypt_req_params
 	fc[0] = *(tmp + 1);
 	if ((fc[0] & 0x03) == 0x03) {
 		hdd_err("Address 4 is present");
-		mac_hdr_len += IEEE80211_ADDR_LEN;
+		mac_hdr_len += QDF_MAC_ADDR_SIZE;
 	}
 
 	/*

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

@@ -5225,7 +5225,7 @@ QDF_STATUS wlan_hdd_get_rssi(struct hdd_adapter *adapter, int8_t *rssi_value)
 	for (i = 0; i < rssi_info->num_peer_stats; i++) {
 		if (!qdf_mem_cmp(rssi_info->peer_stats[i].peer_macaddr,
 				 sta_ctx->conn_info.bssid.bytes,
-				 WLAN_MACADDR_LEN)) {
+				 QDF_MAC_ADDR_SIZE)) {
 			*rssi_value = rssi_info->peer_stats[i].peer_rssi;
 			hdd_debug("RSSI = %d", *rssi_value);
 			wlan_cfg80211_mc_cp_stats_free_stats_event(rssi_info);

+ 6 - 6
core/wma/inc/wma.h

@@ -806,8 +806,8 @@ struct roam_synch_frame_ind {
  */
 struct wma_txrx_node {
 	struct wlan_objmgr_vdev *vdev;
-	uint8_t addr[IEEE80211_ADDR_LEN];
-	uint8_t bssid[IEEE80211_ADDR_LEN];
+	uint8_t addr[QDF_MAC_ADDR_SIZE];
+	uint8_t bssid[QDF_MAC_ADDR_SIZE];
 	struct cdp_vdev *handle;
 	struct beacon_info *beacon;
 	vdev_restart_params_t vdev_restart_params;
@@ -1113,8 +1113,8 @@ typedef struct {
 	qdf_event_t recovery_event;
 	uint16_t max_station;
 	uint16_t max_bssid;
-	uint8_t myaddr[IEEE80211_ADDR_LEN];
-	uint8_t hwaddr[IEEE80211_ADDR_LEN];
+	uint8_t myaddr[QDF_MAC_ADDR_SIZE];
+	uint8_t hwaddr[QDF_MAC_ADDR_SIZE];
 #ifdef WLAN_FEATURE_LPSS
 	uint8_t lpss_support;
 #endif
@@ -1380,7 +1380,7 @@ struct wma_set_key_params {
 	/* def_key_idx can be used to see if we have to read the key from cfg */
 	uint32_t def_key_idx;
 	uint16_t key_len;
-	uint8_t peer_mac[IEEE80211_ADDR_LEN];
+	uint8_t peer_mac[QDF_MAC_ADDR_SIZE];
 	uint8_t singl_tid_rc;
 	enum eAniEdType key_type;
 	uint32_t key_idx;
@@ -1665,7 +1665,7 @@ enum uapsd_up {
  */
 struct wma_roam_invoke_cmd {
 	uint32_t vdev_id;
-	uint8_t bssid[IEEE80211_ADDR_LEN];
+	uint8_t bssid[QDF_MAC_ADDR_SIZE];
 	uint32_t channel;
 	uint32_t frame_len;
 	uint8_t *frame_buf;

+ 3 - 3
core/wma/inc/wma_internal.h

@@ -591,7 +591,7 @@ QDF_STATUS wma_peer_unmap_conf_send(tp_wma_handle wma,
 
 QDF_STATUS wma_create_peer(tp_wma_handle wma, struct cdp_pdev *pdev,
 			  struct cdp_vdev *vdev,
-			  uint8_t peer_addr[IEEE80211_ADDR_LEN],
+			  uint8_t peer_addr[QDF_MAC_ADDR_SIZE],
 			  uint32_t peer_type, uint8_t vdev_id,
 			  bool roam_synch_in_progress);
 
@@ -1320,7 +1320,7 @@ int wma_unified_beacon_debug_stats_event_handler(void *handle,
 /**
  * wma_sta_kickout_event()- send sta kickout event
  * @kickout_reason - reasoncode for kickout
- * @macaddr[IEEE80211_ADDR_LEN]: Peer mac address
+ * @macaddr[QDF_MAC_ADDR_SIZE]: Peer mac address
  * @vdev_id: Unique id for identifying the VDEV
  *
  * This function sends sta kickout diag event
@@ -1419,7 +1419,7 @@ int wma_get_arp_stats_handler(void *handle, uint8_t *data, uint32_t data_len);
  */
 QDF_STATUS wma_send_vdev_up_to_fw(t_wma_handle *wma,
 				  struct vdev_up_params *params,
-				  uint8_t bssid[IEEE80211_ADDR_LEN]);
+				  uint8_t bssid[QDF_MAC_ADDR_SIZE]);
 
 /**
  * wma_send_vdev_down_to_fw() - send the vdev down command to firmware

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

@@ -2146,7 +2146,7 @@ int wma_ibss_peer_info_event_handler(void *handle, uint8_t *data,
 	tSirIbssGetPeerInfoRspParams *pRsp;
 	WMI_PEER_INFO_EVENTID_param_tlvs *param_tlvs;
 	wmi_peer_info_event_fixed_param *fix_param;
-	uint8_t peer_mac[IEEE80211_ADDR_LEN];
+	uint8_t peer_mac[QDF_MAC_ADDR_SIZE];
 	tp_wma_handle wma = (tp_wma_handle)handle;
 
 	if (!wma) {
@@ -2247,7 +2247,7 @@ int wma_fast_tx_fail_event_handler(void *handle, uint8_t *data,
 					  uint32_t len)
 {
 	uint8_t tx_fail_cnt;
-	uint8_t peer_mac[IEEE80211_ADDR_LEN];
+	uint8_t peer_mac[QDF_MAC_ADDR_SIZE];
 	tp_wma_handle wma = (tp_wma_handle) handle;
 	WMI_PEER_TX_FAIL_CNT_THR_EVENTID_param_tlvs *param_tlvs;
 	wmi_peer_tx_fail_cnt_thr_event_fixed_param *fix_param;
@@ -2321,27 +2321,27 @@ static void wma_decap_to_8023(qdf_nbuf_t msdu, struct wma_decap_info_t *info)
 	switch (wh->i_fc[1] & IEEE80211_FC1_DIR_MASK) {
 	case IEEE80211_FC1_DIR_NODS:
 		qdf_mem_copy(ethr_hdr->dest_addr, wh->i_addr1,
-			     ETHERNET_ADDR_LEN);
+			     QDF_MAC_ADDR_SIZE);
 		qdf_mem_copy(ethr_hdr->src_addr, wh->i_addr2,
-			     ETHERNET_ADDR_LEN);
+			     QDF_MAC_ADDR_SIZE);
 		break;
 	case IEEE80211_FC1_DIR_TODS:
 		qdf_mem_copy(ethr_hdr->dest_addr, wh->i_addr3,
-			     ETHERNET_ADDR_LEN);
+			     QDF_MAC_ADDR_SIZE);
 		qdf_mem_copy(ethr_hdr->src_addr, wh->i_addr2,
-			     ETHERNET_ADDR_LEN);
+			     QDF_MAC_ADDR_SIZE);
 		break;
 	case IEEE80211_FC1_DIR_FROMDS:
 		qdf_mem_copy(ethr_hdr->dest_addr, wh->i_addr1,
-			     ETHERNET_ADDR_LEN);
+			     QDF_MAC_ADDR_SIZE);
 		qdf_mem_copy(ethr_hdr->src_addr, wh->i_addr3,
-			     ETHERNET_ADDR_LEN);
+			     QDF_MAC_ADDR_SIZE);
 		break;
 	case IEEE80211_FC1_DIR_DSTODS:
 		qdf_mem_copy(ethr_hdr->dest_addr, wh->i_addr3,
-			     ETHERNET_ADDR_LEN);
+			     QDF_MAC_ADDR_SIZE);
 		qdf_mem_copy(ethr_hdr->src_addr, wh->i_addr4,
-			     ETHERNET_ADDR_LEN);
+			     QDF_MAC_ADDR_SIZE);
 		break;
 	}
 
@@ -2371,7 +2371,7 @@ static int32_t wma_ieee80211_hdrsize(const void *data)
 	int32_t size = sizeof(struct ieee80211_frame);
 
 	if ((wh->i_fc[1] & IEEE80211_FC1_DIR_MASK) == IEEE80211_FC1_DIR_DSTODS)
-		size += IEEE80211_ADDR_LEN;
+		size += QDF_MAC_ADDR_SIZE;
 	if (IEEE80211_QOS_HAS_SEQ(wh))
 		size += sizeof(uint16_t);
 	return size;
@@ -3267,8 +3267,8 @@ void wma_rx_mic_error_ind(void *scn_handle, uint16_t vdev_id, void *wh)
 	struct ol_error_info err_info;
 
 	err_info.u.mic_err.vdev_id = vdev_id;
-	qdf_mem_copy(err_info.u.mic_err.da, w->i_addr1, OL_TXRX_MAC_ADDR_LEN);
-	qdf_mem_copy(err_info.u.mic_err.ta, w->i_addr2, OL_TXRX_MAC_ADDR_LEN);
+	qdf_mem_copy(err_info.u.mic_err.da, w->i_addr1, QDF_MAC_ADDR_SIZE);
+	qdf_mem_copy(err_info.u.mic_err.ta, w->i_addr2, QDF_MAC_ADDR_SIZE);
 
 	WMA_LOGD("MIC vdev_id %d\n", vdev_id);
 	WMA_LOGD("MIC DA: %02x:%02x:%02x:%02x:%02x:%02x\n",
@@ -3300,8 +3300,8 @@ uint8_t wma_rx_invalid_peer_ind(uint8_t vdev_id, void *wh)
 		return -ENOMEM;
 
 	rx_inv_msg->vdev_id = vdev_id;
-	qdf_mem_copy(rx_inv_msg->ra, wh_l->i_addr1, OL_TXRX_MAC_ADDR_LEN);
-	qdf_mem_copy(rx_inv_msg->ta, wh_l->i_addr2, OL_TXRX_MAC_ADDR_LEN);
+	qdf_mem_copy(rx_inv_msg->ra, wh_l->i_addr1, QDF_MAC_ADDR_SIZE);
+	qdf_mem_copy(rx_inv_msg->ta, wh_l->i_addr2, QDF_MAC_ADDR_SIZE);
 
 	WMA_LOGD("%s: vdev_id %d", __func__, vdev_id);
 	WMA_LOGD("%s: RA:" MAC_ADDRESS_STR,

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

@@ -1568,7 +1568,7 @@ int wma_vdev_start_resp_handler(void *handle, uint8_t *cmd_param_info,
 		tpAddBssParams bssParams = (tpAddBssParams) req_msg->user_data;
 
 		qdf_mem_copy(iface->bssid, bssParams->bssId,
-				IEEE80211_ADDR_LEN);
+				QDF_MAC_ADDR_SIZE);
 		wma_vdev_start_rsp(wma, bssParams, resp_event);
 	} else if (req_msg->msg_type == WMA_OCB_SET_CONFIG_CMD) {
 		param.vdev_id = resp_event->vdev_id;
@@ -1995,7 +1995,7 @@ static int wma_get_obj_mgr_peer_type(tp_wma_handle wma, uint8_t vdev_id,
 		return WLAN_PEER_TDLS;
 
 	if (!qdf_mem_cmp(wma->interfaces[vdev_id].addr, peer_addr,
-					IEEE80211_ADDR_LEN)) {
+					QDF_MAC_ADDR_SIZE)) {
 		obj_peer_type = WLAN_PEER_SELF;
 	} else if (wma->interfaces[vdev_id].type == WMI_VDEV_TYPE_STA) {
 		if (wma->interfaces[vdev_id].sub_type ==
@@ -2081,7 +2081,7 @@ static struct wlan_objmgr_peer *wma_create_objmgr_peer(tp_wma_handle wma,
  */
 QDF_STATUS wma_create_peer(tp_wma_handle wma, struct cdp_pdev *pdev,
 			  struct cdp_vdev *vdev,
-			  uint8_t peer_addr[IEEE80211_ADDR_LEN],
+			  uint8_t peer_addr[QDF_MAC_ADDR_SIZE],
 			  uint32_t peer_type, uint8_t vdev_id,
 			  bool roam_synch_in_progress)
 {
@@ -2196,7 +2196,7 @@ QDF_STATUS wma_create_peer(tp_wma_handle wma, struct cdp_pdev *pdev,
 
 	/* for each remote ibss peer, clear its keys */
 	if (wma_is_vdev_in_ibss_mode(wma, vdev_id) &&
-	    qdf_mem_cmp(peer_addr, mac_addr_raw, IEEE80211_ADDR_LEN)) {
+	    qdf_mem_cmp(peer_addr, mac_addr_raw, QDF_MAC_ADDR_SIZE)) {
 		tSetStaKeyParams key_info;
 
 		WMA_LOGD("%s: remote ibss peer %pM key clearing\n", __func__,
@@ -2204,7 +2204,7 @@ QDF_STATUS wma_create_peer(tp_wma_handle wma, struct cdp_pdev *pdev,
 		qdf_mem_zero(&key_info, sizeof(key_info));
 		key_info.smesessionId = vdev_id;
 		qdf_mem_copy(key_info.peer_macaddr.bytes, peer_addr,
-				IEEE80211_ADDR_LEN);
+				QDF_MAC_ADDR_SIZE);
 		key_info.sendRsp = false;
 
 		wma_set_stakey(wma, &key_info);
@@ -3534,7 +3534,7 @@ int wma_peer_assoc_conf_handler(void *handle, uint8_t *cmd_param_info,
 	WMI_PEER_ASSOC_CONF_EVENTID_param_tlvs *param_buf;
 	wmi_peer_assoc_conf_event_fixed_param *event;
 	struct wma_target_req *req_msg;
-	uint8_t macaddr[IEEE80211_ADDR_LEN];
+	uint8_t macaddr[QDF_MAC_ADDR_SIZE];
 	int status = 0;
 
 	WMA_LOGD(FL("Enter"));
@@ -3678,7 +3678,7 @@ int wma_peer_delete_handler(void *handle, uint8_t *cmd_param_info,
 	wmi_peer_delete_cmd_fixed_param *event;
 	struct wma_target_req *req_msg;
 	tDeleteStaParams *del_sta;
-	uint8_t macaddr[IEEE80211_ADDR_LEN];
+	uint8_t macaddr[QDF_MAC_ADDR_SIZE];
 	int status = 0;
 
 	param_buf = (WMI_PEER_DELETE_RESP_EVENTID_param_tlvs *)cmd_param_info;
@@ -5002,7 +5002,7 @@ static void wma_add_bss_sta_mode(tp_wma_handle wma, tpAddBssParams add_bss)
 		 * Store the bssid in interface table, bssid will
 		 * be used during group key setting sta mode.
 		 */
-		qdf_mem_copy(iface->bssid, add_bss->bssId, IEEE80211_ADDR_LEN);
+		qdf_mem_copy(iface->bssid, add_bss->bssId, QDF_MAC_ADDR_SIZE);
 
 	}
 send_bss_resp:
@@ -6191,7 +6191,7 @@ void wma_delete_bss_ho_fail(tp_wma_handle wma, tpDeleteBssParams params)
 				__func__, params->smesessionId);
 		goto fail_del_bss_ho_fail;
 	}
-	qdf_mem_zero(iface->bssid, IEEE80211_ADDR_LEN);
+	qdf_mem_zero(iface->bssid, QDF_MAC_ADDR_SIZE);
 
 	txrx_vdev = wma_find_vdev_by_id(wma, params->smesessionId);
 	if (!txrx_vdev) {
@@ -6369,7 +6369,7 @@ void wma_delete_bss(tp_wma_handle wma, tpDeleteBssParams params)
 	}
 
 	qdf_mem_zero(wma->interfaces[params->smesessionId].bssid,
-			IEEE80211_ADDR_LEN);
+			QDF_MAC_ADDR_SIZE);
 
 	txrx_vdev = wma_find_vdev_by_id(wma, params->smesessionId);
 	if (!txrx_vdev) {

+ 9 - 9
core/wma/src/wma_features.c

@@ -1187,7 +1187,7 @@ int wma_csa_offload_handler(void *handle, uint8_t *event, uint32_t len)
 	tp_wma_handle wma = (tp_wma_handle) handle;
 	WMI_CSA_HANDLING_EVENTID_param_tlvs *param_buf;
 	wmi_csa_event_fixed_param *csa_event;
-	uint8_t bssid[IEEE80211_ADDR_LEN];
+	uint8_t bssid[QDF_MAC_ADDR_SIZE];
 	uint8_t vdev_id = 0;
 	uint8_t cur_chan = 0;
 	struct ieee80211_channelswitch_ie *csa_ie;
@@ -1224,7 +1224,7 @@ int wma_csa_offload_handler(void *handle, uint8_t *event, uint32_t len)
 	}
 
 	qdf_mem_zero(csa_offload_event, sizeof(*csa_offload_event));
-	qdf_mem_copy(csa_offload_event->bssId, &bssid, IEEE80211_ADDR_LEN);
+	qdf_mem_copy(csa_offload_event->bssId, &bssid, QDF_MAC_ADDR_SIZE);
 
 	if (csa_event->ies_present_flag & WMI_CSA_IE_PRESENT) {
 		csa_ie = (struct ieee80211_channelswitch_ie *)
@@ -2813,8 +2813,8 @@ static int wma_wake_event_piggybacked(
 		del_sta_ctx->is_tdls = false;
 		del_sta_ctx->vdev_id = event_param->fixed_param->vdev_id;
 		del_sta_ctx->staId = peer_id;
-		qdf_mem_copy(del_sta_ctx->addr2, bssid, IEEE80211_ADDR_LEN);
-		qdf_mem_copy(del_sta_ctx->bssId, bssid, IEEE80211_ADDR_LEN);
+		qdf_mem_copy(del_sta_ctx->addr2, bssid, QDF_MAC_ADDR_SIZE);
+		qdf_mem_copy(del_sta_ctx->bssId, bssid, QDF_MAC_ADDR_SIZE);
 		del_sta_ctx->reasonCode = HAL_DEL_STA_REASON_CODE_KEEP_ALIVE;
 		wma_send_msg(wma, SIR_LIM_DELETE_STA_CONTEXT_IND, del_sta_ctx,
 			     0);
@@ -3221,10 +3221,10 @@ QDF_STATUS wma_process_get_peer_info_req
 	struct cdp_pdev *pdev;
 	void *peer;
 	void *soc = cds_get_context(QDF_MODULE_ID_SOC);
-	uint8_t peer_mac[IEEE80211_ADDR_LEN];
+	uint8_t peer_mac[QDF_MAC_ADDR_SIZE];
 	uint8_t *peer_mac_raw;
 	wmi_peer_info_req_cmd_fixed_param *p_get_peer_info_cmd;
-	uint8_t bcast_mac[IEEE80211_ADDR_LEN] = { 0xff, 0xff, 0xff,
+	uint8_t bcast_mac[QDF_MAC_ADDR_SIZE] = { 0xff, 0xff, 0xff,
 						  0xff, 0xff, 0xff };
 
 	if (!soc) {
@@ -3247,7 +3247,7 @@ QDF_STATUS wma_process_get_peer_info_req
 
 	if (0xFF == pReq->staIdx) {
 		/*get info for all peers */
-		qdf_mem_copy(peer_mac, bcast_mac, IEEE80211_ADDR_LEN);
+		qdf_mem_copy(peer_mac, bcast_mac, QDF_MAC_ADDR_SIZE);
 	} else {
 		/*get info for a single peer */
 		peer = cdp_peer_find_by_local_id(soc,
@@ -3268,7 +3268,7 @@ QDF_STATUS wma_process_get_peer_info_req
 			peer_mac_raw[1], peer_mac_raw[2],
 			peer_mac_raw[3], peer_mac_raw[4],
 			peer_mac_raw[5]);
-		qdf_mem_copy(peer_mac, peer_mac_raw, IEEE80211_ADDR_LEN);
+		qdf_mem_copy(peer_mac, peer_mac_raw, QDF_MAC_ADDR_SIZE);
 	}
 
 	len = sizeof(wmi_peer_info_req_cmd_fixed_param);
@@ -5437,7 +5437,7 @@ int wma_pdev_div_info_evt_handler(void *handle, u_int8_t *event_buf,
 	wmi_pdev_div_rssi_antid_event_fixed_param *event;
 	struct chain_rssi_result chain_rssi_result;
 	u_int32_t i;
-	u_int8_t macaddr[IEEE80211_ADDR_LEN];
+	u_int8_t macaddr[QDF_MAC_ADDR_SIZE];
 	tp_wma_handle wma = (tp_wma_handle)handle;
 
 	struct mac_context *pmac = (struct mac_context *)cds_get_context(

+ 14 - 14
core/wma/src/wma_mgmt.c

@@ -318,7 +318,7 @@ void wma_sta_kickout_event(uint32_t kickout_reason, uint8_t vdev_id,
 	sta_kickout.vdev_id = vdev_id;
 	if (macaddr)
 		qdf_mem_copy(sta_kickout.peer_mac, macaddr,
-							IEEE80211_ADDR_LEN);
+							QDF_MAC_ADDR_SIZE);
 	WLAN_HOST_DIAG_EVENT_REPORT(&sta_kickout, EVENT_WLAN_STA_KICKOUT);
 }
 #endif
@@ -341,7 +341,7 @@ int wma_peer_sta_kickout_event_handler(void *handle, uint8_t *event,
 	tp_wma_handle wma = (tp_wma_handle) handle;
 	WMI_PEER_STA_KICKOUT_EVENTID_param_tlvs *param_buf = NULL;
 	wmi_peer_sta_kickout_event_fixed_param *kickout_event = NULL;
-	uint8_t vdev_id, peer_id, macaddr[IEEE80211_ADDR_LEN];
+	uint8_t vdev_id, peer_id, macaddr[QDF_MAC_ADDR_SIZE];
 	void *peer;
 	struct cdp_pdev *pdev;
 	tpDeleteStaContext del_sta_ctx;
@@ -386,7 +386,7 @@ int wma_peer_sta_kickout_event_handler(void *handle, uint8_t *event,
 
 		inactivity->staIdx = peer_id;
 		qdf_mem_copy(inactivity->peer_addr.bytes, macaddr,
-			     IEEE80211_ADDR_LEN);
+			     QDF_MAC_ADDR_SIZE);
 		wma_send_msg(wma, WMA_IBSS_PEER_INACTIVITY_IND,
 			     inactivity, 0);
 		goto exit_handler;
@@ -403,9 +403,9 @@ int wma_peer_sta_kickout_event_handler(void *handle, uint8_t *event,
 		del_sta_ctx->is_tdls = true;
 		del_sta_ctx->vdev_id = vdev_id;
 		del_sta_ctx->staId = peer_id;
-		qdf_mem_copy(del_sta_ctx->addr2, macaddr, IEEE80211_ADDR_LEN);
+		qdf_mem_copy(del_sta_ctx->addr2, macaddr, QDF_MAC_ADDR_SIZE);
 		qdf_mem_copy(del_sta_ctx->bssId, wma->interfaces[vdev_id].bssid,
-			     IEEE80211_ADDR_LEN);
+			     QDF_MAC_ADDR_SIZE);
 		del_sta_ctx->reasonCode = HAL_DEL_STA_REASON_CODE_KEEP_ALIVE;
 		wma_send_msg(wma, SIR_LIM_DELETE_STA_CONTEXT_IND,
 			     (void *)del_sta_ctx, 0);
@@ -417,7 +417,7 @@ int wma_peer_sta_kickout_event_handler(void *handle, uint8_t *event,
 		     wma->interfaces[vdev_id].sub_type ==
 		     WMI_UNIFIED_VDEV_SUBTYPE_P2P_CLIENT) &&
 		    !qdf_mem_cmp(wma->interfaces[vdev_id].bssid,
-				    macaddr, IEEE80211_ADDR_LEN)) {
+				    macaddr, QDF_MAC_ADDR_SIZE)) {
 			wma_sta_kickout_event(HOST_STA_KICKOUT_REASON_XRETRY,
 							vdev_id, macaddr);
 			/*
@@ -446,7 +446,7 @@ int wma_peer_sta_kickout_event_handler(void *handle, uint8_t *event,
 		     wma->interfaces[vdev_id].sub_type ==
 		     WMI_UNIFIED_VDEV_SUBTYPE_P2P_CLIENT) &&
 		    !qdf_mem_cmp(wma->interfaces[vdev_id].bssid,
-				    macaddr, IEEE80211_ADDR_LEN)) {
+				    macaddr, QDF_MAC_ADDR_SIZE)) {
 			wma_sta_kickout_event(
 			HOST_STA_KICKOUT_REASON_UNSPECIFIED, vdev_id, macaddr);
 			/*
@@ -489,9 +489,9 @@ int wma_peer_sta_kickout_event_handler(void *handle, uint8_t *event,
 	del_sta_ctx->is_tdls = false;
 	del_sta_ctx->vdev_id = vdev_id;
 	del_sta_ctx->staId = peer_id;
-	qdf_mem_copy(del_sta_ctx->addr2, macaddr, IEEE80211_ADDR_LEN);
+	qdf_mem_copy(del_sta_ctx->addr2, macaddr, QDF_MAC_ADDR_SIZE);
 	qdf_mem_copy(del_sta_ctx->bssId, wma->interfaces[vdev_id].addr,
-		     IEEE80211_ADDR_LEN);
+		     QDF_MAC_ADDR_SIZE);
 	del_sta_ctx->reasonCode = HAL_DEL_STA_REASON_CODE_KEEP_ALIVE;
 	if (wmi_service_enabled(wma->wmi_handle,
 				wmi_service_hw_db2dbm_support))
@@ -1969,7 +1969,7 @@ static QDF_STATUS wma_setup_install_key_cmd(tp_wma_handle wma_handle,
 
 	params.vdev_id = key_params->vdev_id;
 	params.key_idx = key_params->key_idx;
-	qdf_mem_copy(params.peer_mac, key_params->peer_mac, IEEE80211_ADDR_LEN);
+	qdf_mem_copy(params.peer_mac, key_params->peer_mac, QDF_MAC_ADDR_SIZE);
 
 #ifdef FEATURE_WLAN_WAPI
 	qdf_mem_zero(params.tx_iv, 16);
@@ -2299,7 +2299,7 @@ void wma_set_bsskey(tp_wma_handle wma_handle, tpSetBssKeyParams key_info)
 	if (wlan_opmode == wlan_op_mode_sta) {
 		qdf_mem_copy(key_params.peer_mac,
 			wma_handle->interfaces[key_info->smesessionId].bssid,
-			IEEE80211_ADDR_LEN);
+			QDF_MAC_ADDR_SIZE);
 	} else {
 		mac_addr = cdp_get_vdev_mac_addr(soc,
 					txrx_vdev);
@@ -2310,7 +2310,7 @@ void wma_set_bsskey(tp_wma_handle wma_handle, tpSetBssKeyParams key_info)
 		}
 		/* vdev mac address will be passed for all other modes */
 		qdf_mem_copy(key_params.peer_mac, mac_addr,
-			     IEEE80211_ADDR_LEN);
+			     QDF_MAC_ADDR_SIZE);
 		WMA_LOGD("BSS Key setup with vdev_mac %pM\n",
 			 mac_addr);
 	}
@@ -2424,7 +2424,7 @@ static void wma_set_ibsskey_helper(tp_wma_handle wma_handle,
 	ASSERT(wlan_op_mode_ibss == opmode);
 
 	qdf_mem_copy(key_params.peer_mac, peer_macaddr.bytes,
-			IEEE80211_ADDR_LEN);
+			QDF_MAC_ADDR_SIZE);
 
 	if (key_info->numKeys == 0 &&
 	    (key_info->encType == eSIR_ED_WEP40 ||
@@ -2550,7 +2550,7 @@ void wma_set_stakey(tp_wma_handle wma_handle, tpSetStaKeyParams key_info)
 	key_params.def_key_idx = key_info->defWEPIdx;
 	qdf_mem_copy((void *)key_params.peer_mac,
 		     (const void *)key_info->peer_macaddr.bytes,
-		     IEEE80211_ADDR_LEN);
+		     QDF_MAC_ADDR_SIZE);
 	for (i = 0; i < num_keys; i++) {
 		if (key_params.key_type != eSIR_ED_NONE &&
 		    !key_info->key[i].keyLength)

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

@@ -979,7 +979,7 @@ void wma_disable_uapsd_mode(tp_wma_handle wma,
  */
 static QDF_STATUS wma_set_sta_uapsd_auto_trig_cmd(wmi_unified_t wmi_handle,
 					uint32_t vdevid,
-					uint8_t peer_addr[IEEE80211_ADDR_LEN],
+					uint8_t peer_addr[QDF_MAC_ADDR_SIZE],
 					struct sta_uapsd_params *trig_param,
 					uint32_t num_ac)
 {
@@ -991,7 +991,7 @@ static QDF_STATUS wma_set_sta_uapsd_auto_trig_cmd(wmi_unified_t wmi_handle,
 	cmd.num_ac = num_ac;
 
 	qdf_mem_copy((uint8_t *) cmd.peer_addr, (uint8_t *) peer_addr,
-		     sizeof(uint8_t) * IEEE80211_ADDR_LEN);
+		     sizeof(uint8_t) * QDF_MAC_ADDR_SIZE);
 	ret = wmi_unified_set_sta_uapsd_auto_trig_cmd(wmi_handle,
 				   &cmd);
 	if (QDF_IS_STATUS_ERROR(ret))

+ 5 - 5
core/wma/src/wma_scan_roam.c

@@ -2341,16 +2341,16 @@ static void wma_roam_update_vdev(tp_wma_handle wma,
 	del_bss_params->smesessionId = vdev_id;
 	del_sta_params->smesessionId = vdev_id;
 	qdf_mem_copy(del_bss_params->bssid, wma->interfaces[vdev_id].bssid,
-			IEEE80211_ADDR_LEN);
+			QDF_MAC_ADDR_SIZE);
 	set_link_params->state = eSIR_LINK_PREASSOC_STATE;
 	qdf_mem_copy(set_link_params->selfMacAddr,
-		roam_synch_ind_ptr->self_mac.bytes, IEEE80211_ADDR_LEN);
+		roam_synch_ind_ptr->self_mac.bytes, QDF_MAC_ADDR_SIZE);
 	qdf_mem_copy(set_link_params->bssid, roam_synch_ind_ptr->bssid.bytes,
-			IEEE80211_ADDR_LEN);
+			QDF_MAC_ADDR_SIZE);
 	add_sta_params->staType = STA_ENTRY_SELF;
 	add_sta_params->smesessionId = vdev_id;
 	qdf_mem_copy(&add_sta_params->bssId, &roam_synch_ind_ptr->bssid.bytes,
-			IEEE80211_ADDR_LEN);
+			QDF_MAC_ADDR_SIZE);
 	add_sta_params->staIdx = STA_INVALID_IDX;
 	add_sta_params->assocId = roam_synch_ind_ptr->aid;
 
@@ -2361,7 +2361,7 @@ static void wma_roam_update_vdev(tp_wma_handle wma,
 	wma_add_sta(wma, add_sta_params);
 	wma_vdev_set_mlme_state_run(wma, vdev_id);
 	qdf_mem_copy(wma->interfaces[vdev_id].bssid,
-			roam_synch_ind_ptr->bssid.bytes, IEEE80211_ADDR_LEN);
+			roam_synch_ind_ptr->bssid.bytes, QDF_MAC_ADDR_SIZE);
 	qdf_mem_free(del_bss_params);
 	qdf_mem_free(set_link_params);
 	qdf_mem_free(add_sta_params);

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

@@ -2673,7 +2673,7 @@ static void wma_update_peer_stats(tp_wma_handle wma,
 	tAniGetPEStatsRsp *stats_rsp_params;
 	tCsrGlobalClassAStatsInfo *classa_stats = NULL;
 	struct wma_txrx_node *node;
-	uint8_t *stats_buf, vdev_id, macaddr[IEEE80211_ADDR_LEN], mcsRateFlags;
+	uint8_t *stats_buf, vdev_id, macaddr[QDF_MAC_ADDR_SIZE], mcsRateFlags;
 	uint32_t temp_mask;
 	uint8_t nss;
 
@@ -4548,7 +4548,7 @@ static void wma_update_roam_offload_flag(tp_wma_handle wma, uint8_t vdev_id,
 #ifdef CONFIG_VDEV_SM
 QDF_STATUS wma_send_vdev_up_to_fw(t_wma_handle *wma,
 				  struct vdev_up_params *params,
-				  uint8_t bssid[IEEE80211_ADDR_LEN])
+				  uint8_t bssid[QDF_MAC_ADDR_SIZE])
 {
 	QDF_STATUS status;
 	struct wma_txrx_node *vdev;
@@ -4568,7 +4568,7 @@ QDF_STATUS wma_send_vdev_up_to_fw(t_wma_handle *wma,
 #else
 QDF_STATUS wma_send_vdev_up_to_fw(t_wma_handle *wma,
 				  struct vdev_up_params *params,
-				  uint8_t bssid[IEEE80211_ADDR_LEN])
+				  uint8_t bssid[QDF_MAC_ADDR_SIZE])
 {
 	QDF_STATUS status;
 	struct wma_txrx_node *vdev;