wlan: Fix MACROS for 32bit to 64bit conversion
This will fix the MACRO GET_IE_LEN_IN_BSS, GET_IE_LEN_IN_BSS_DESC,
and GET_FIELD_OFFSET. Also removing redundant macro definition
from files to have only definition through out the code.
Change-Id: I00634a7ffb17b649de50143816b3ebc5a8920491
CRs-fixed: 582104
diff --git a/CORE/BAP/src/btampFsm.c b/CORE/BAP/src/btampFsm.c
index 75f8419..d311fab 100644
--- a/CORE/BAP/src/btampFsm.c
+++ b/CORE/BAP/src/btampFsm.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2013 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2014 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -1527,7 +1527,6 @@
tANI_U8 pRSNOui04[ WLANBAP_RSN_OUI_SIZE ] = { 0x00, 0x0F, 0xAC, 0x04 }; // AES-CCMP
tANI_U8 pRSNOui05[ WLANBAP_RSN_OUI_SIZE ] = { 0x00, 0x0F, 0xAC, 0x05 }; // WEP-104
-#define GET_IE_LEN_IN_BSS(lenInBss) ( lenInBss + sizeof(lenInBss) - ((int) OFFSET_OF( tSirBssDescription, ieFields)))
/* Incoming Association indication validation predicate */
v_U32_t
validAssocInd
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index 76a115b..2b8b6d8 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -100,7 +100,7 @@
#define MAX_SCAN_SSID 9
#define MAX_PENDING_LOG 5
#define GET_IE_LEN_IN_BSS_DESC(lenInBss) ( lenInBss + sizeof(lenInBss) - \
- ((int) OFFSET_OF( tSirBssDescription, ieFields)))
+ ((uintptr_t)OFFSET_OF( tSirBssDescription, ieFields)))
#define HDD2GHZCHAN(freq, chan, flag) { \
.band = IEEE80211_BAND_2GHZ, \
diff --git a/CORE/HDD/src/wlan_hdd_scan.c b/CORE/HDD/src/wlan_hdd_scan.c
index 4a2d2c9..4366fef 100644
--- a/CORE/HDD/src/wlan_hdd_scan.c
+++ b/CORE/HDD/src/wlan_hdd_scan.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2013 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2014 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -71,8 +71,6 @@
#include <linux/wireless.h>
#include <net/cfg80211.h>
-#define GET_IE_LEN_IN_BSS(lenInBss) ( lenInBss + sizeof(lenInBss) - \
- ((int) OFFSET_OF( tSirBssDescription, ieFields)))
#define WEXT_CSCAN_HEADER "CSCAN S\x01\x00\x00S\x00"
#define WEXT_CSCAN_HEADER_SIZE 12
diff --git a/CORE/MAC/inc/sirApi.h b/CORE/MAC/inc/sirApi.h
index 9d41bf9..e03cca1 100644
--- a/CORE/MAC/inc/sirApi.h
+++ b/CORE/MAC/inc/sirApi.h
@@ -665,7 +665,7 @@
} tSirSmeStartBssReq, *tpSirSmeStartBssReq;
#define GET_IE_LEN_IN_BSS(lenInBss) ( lenInBss + sizeof(lenInBss) - \
- ((int) OFFSET_OF( tSirBssDescription, ieFields)))
+ ((uintptr_t)OFFSET_OF( tSirBssDescription, ieFields)))
#define WSCIE_PROBE_RSP_LEN (317 + 2)
diff --git a/CORE/SME/inc/csrLinkList.h b/CORE/SME/inc/csrLinkList.h
index 162d26c..58912cf 100644
--- a/CORE/SME/inc/csrLinkList.h
+++ b/CORE/SME/inc/csrLinkList.h
@@ -73,7 +73,7 @@
(tANI_U8 *)(&((type *)0)->field)))
//To get the offset of (field) inside structure (type)
-#define GET_FIELD_OFFSET(type, field) ((tANI_U32_OR_PTR)(&(((type *)0)->field)))
+#define GET_FIELD_OFFSET(type, field) ((uintptr_t)(&(((type *)0)->field)))
#define GET_ROUND_UP( _Field, _Boundary ) (((_Field) + ((_Boundary) - 1)) & ~((_Boundary) - 1))
#define BITS_ON( _Field, _Bitmask ) ( (_Field) |= (_Bitmask) )
diff --git a/CORE/WDA/src/wlan_qct_wda.c b/CORE/WDA/src/wlan_qct_wda.c
index 7eece40..60981f1 100644
--- a/CORE/WDA/src/wlan_qct_wda.c
+++ b/CORE/WDA/src/wlan_qct_wda.c
@@ -82,7 +82,6 @@
#define WDA_2_4_GHZ_MAX_FREQ 3000
#define VOS_GET_WDA_CTXT(a) vos_get_context(VOS_MODULE_ID_WDA, a)
#define VOS_GET_MAC_CTXT(a) vos_get_context(VOS_MODULE_ID_PE, a)
-#define OFFSET_OF(structType,fldName) (&((structType*)0)->fldName)
#define WDA_BA_TX_FRM_THRESHOLD (5)
#define CONVERT_WDI2SIR_STATUS(x) \
((WDI_STATUS_SUCCESS != (x)) ? eSIR_FAILURE : eSIR_SUCCESS)
diff --git a/CORE/WDI/CP/src/wlan_qct_wdi.c b/CORE/WDI/CP/src/wlan_qct_wdi.c
index 36638e4..8e07504 100644
--- a/CORE/WDI/CP/src/wlan_qct_wdi.c
+++ b/CORE/WDI/CP/src/wlan_qct_wdi.c
@@ -17371,7 +17371,6 @@
@see
@return Result of the function call
*/
-#define OFFSET_OF(structType,fldName) (&((structType*)0)->fldName)
WDI_Status
WDI_ProcessStartOemDataRsp