From d65dc5a905cf91fc52abf50f6326fa20e75a2a5d Mon Sep 17 00:00:00 2001 From: Srinivas Girigowda Date: Thu, 14 Jan 2016 17:08:26 -0800 Subject: [PATCH] qcacld-3.0: Remove obsolete and duplicate macros Remove obsolete and duplicate macros. Change-Id: I19010da3b40af1e65ec9a9a5e1fc01ecac56b0df CRs-Fixed: 898864 --- core/hdd/inc/wlan_hdd_wext.h | 8 +---- core/hdd/src/wlan_hdd_assoc.c | 2 +- core/hdd/src/wlan_hdd_cfg80211.c | 4 +-- core/mac/inc/sir_api.h | 2 +- core/mac/inc/sir_mac_prot_def.h | 34 +------------------ core/mac/src/pe/include/lim_api.h | 2 -- core/mac/src/pe/include/lim_ft_defs.h | 3 +- core/mac/src/pe/include/lim_global.h | 6 ---- core/mac/src/pe/include/lim_session.h | 7 ++-- core/mac/src/pe/lim/lim_ibss_peer_mgmt.h | 4 +-- .../src/pe/lim/lim_send_sme_rsp_messages.c | 3 -- 11 files changed, 12 insertions(+), 63 deletions(-) diff --git a/core/hdd/inc/wlan_hdd_wext.h b/core/hdd/inc/wlan_hdd_wext.h index 0636c3262fe4..428e4f76160c 100644 --- a/core/hdd/inc/wlan_hdd_wext.h +++ b/core/hdd/inc/wlan_hdd_wext.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2015 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2016 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -143,12 +143,6 @@ typedef enum { /** Maximum Length of WPA/RSN IE */ #define MAX_WPA_RSN_IE_LEN 40 -/** Maximum Number of WEP KEYS */ -#define MAX_WEP_KEYS 4 - -/** Ether Address Length */ -#define ETHER_ADDR_LEN 6 - /** Enable 11d */ #define ENABLE_11D 1 diff --git a/core/hdd/src/wlan_hdd_assoc.c b/core/hdd/src/wlan_hdd_assoc.c index cdd34a79f3a7..15b7f8bc53ef 100644 --- a/core/hdd/src/wlan_hdd_assoc.c +++ b/core/hdd/src/wlan_hdd_assoc.c @@ -4449,7 +4449,7 @@ static int32_t hdd_process_genie(hdd_adapter_t *pAdapter, * in the bssid. */ cdf_mem_copy(PMKIDCache[i].BSSID.bytes, - bssid, ETHER_ADDR_LEN); + bssid, CDF_MAC_ADDR_SIZE); cdf_mem_copy(PMKIDCache[i].PMKID, dot11RSNIE.pmkid[i], CSR_RSN_PMKID_SIZE); } diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index d25e9ff99d6f..09ba705be76c 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -9871,7 +9871,7 @@ int __wlan_hdd_cfg80211_del_station(struct wiphy *wiphy, mac, pAdapter->aStaInfo[i]. macAddrSTA.bytes, - ETHER_ADDR_LEN); + CDF_MAC_ADDR_SIZE); if (hdd_ipa_uc_is_enabled(pHddCtx)) { hdd_ipa_wlan_evt(pAdapter, pAdapter-> @@ -10161,7 +10161,7 @@ static int __wlan_hdd_cfg80211_set_pmksa(struct wiphy *wiphy, halHandle = WLAN_HDD_GET_HAL_CTX(pAdapter); - cdf_mem_copy(pmk_id.BSSID.bytes, pmksa->bssid, ETHER_ADDR_LEN); + cdf_mem_copy(pmk_id.BSSID.bytes, pmksa->bssid, CDF_MAC_ADDR_SIZE); cdf_mem_copy(pmk_id.PMKID, pmksa->pmkid, CSR_RSN_PMKID_SIZE); /* Add to the PMKSA ID Cache in CSR */ diff --git a/core/mac/inc/sir_api.h b/core/mac/inc/sir_api.h index 5de6302bd66d..68bc6ff9c0ef 100644 --- a/core/mac/inc/sir_api.h +++ b/core/mac/inc/sir_api.h @@ -49,7 +49,7 @@ #define SIR_MAX_SUPPORTED_CHANNEL_LIST 96 #define SIR_MDIE_ELEMENT_ID 54 -#define SIR_MDIE_SIZE 3 +#define SIR_MDIE_SIZE 3 /* MD ID(2 bytes), Capability(1 byte) */ /* Increase dwell time for P2P search in ms */ #define P2P_SEARCH_DWELL_TIME_INCREASE 20 diff --git a/core/mac/inc/sir_mac_prot_def.h b/core/mac/inc/sir_mac_prot_def.h index bf90279c001f..d6494dacec6e 100644 --- a/core/mac/inc/sir_mac_prot_def.h +++ b/core/mac/inc/sir_mac_prot_def.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2015 The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2016 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -493,39 +493,7 @@ #define SIR_MAC_IPV6_ADDR_LEN 16 #define SIR_IPV6_ADDR_VALID 1 #endif /* WLAN_NS_OFFLOAD */ -#define SIR_MAC_ARP_OFFLOAD_SIZE 1 -/* total length of an Info element including T/L fields */ -#define EID_LEN(eid) (2 + (eid)) - -/* support for radar Detect, Channel Switch */ -#define CHANNEL_SWITCH_MAX_FRAME_SIZE 256 - -/* Length of Channel Switch related message */ -#define SIR_SME_CHANNEL_SWITCH_SIZE \ - (sizeof(uint8_t) + 2 * sizeof(uint16_t) + sizeof(uint32_t) +\ - sizeof(ePhyChanBondState)) -#define SIR_CHANNEL_SWITCH_IE_SIZE EID_LEN(SIR_MAC_CHNL_SWITCH_ANN_EID_MIN) - -/* Measurement Request/Report messages */ -#define SIR_MEAS_REQ_FIELD_SIZE 11 -#define SIR_MEAS_REQ_IE_SIZE (5 + SIR_MEAS_REQ_FIELD_SIZE) -#define SIR_MEAS_REQ_ACTION_FRAME_SIZE (3 + SIR_MEAS_REQ_IE_SIZE) -#define SIR_MEAS_MAX_FRAME_SIZE 256 -#define SIR_MEAS_REPORT_MIN_FRAME_SIZE (3 + EID_LEN(SIR_MAC_MEAS_RPT_EID_MIN)) - -#define SIR_MAC_SET_MEAS_REQ_ENABLE(x) (((uint8_t) x) | 2) -#define SIR_MAC_SET_MEAS_REQ_REQUEST(x) (((uint8_t) x) | 4) -#define SIR_MAC_SET_MEAS_REQ_REPORT(x) (((uint8_t) x) | 8) - -#define SIR_MAC_SET_MEAS_REPORT_LATE(x) (((uint8_t) x) | 1) -#define SIR_MAC_SET_MEAS_REPORT_INCAPABLE(x) (((uint8_t) x) | 2) -#define SIR_MAC_SET_MEAS_REPORT_REFUSE(x) (((uint8_t) x) | 4) - -/* Length of TPC Request Action Frame */ -#define SIR_TPC_REQ_ACTION_FRAME_SIZE (3 + EID_LEN(SIR_MAC_TPC_REQ_EID_MIN)) -#define SIR_TPC_REPORT_ACTION_FRAME_SIZE (3 + EID_LEN(SIR_MAC_TPC_RPT_EID_MIN)) -#define SIR_TPC_MAX_FRAME_SIZE 256 /* ----------------------------------------------------------------------------- */ /* OFFSET definitions for fixed fields in Management frames */ diff --git a/core/mac/src/pe/include/lim_api.h b/core/mac/src/pe/include/lim_api.h index bf612454958f..d1d52cf2ad81 100644 --- a/core/mac/src/pe/include/lim_api.h +++ b/core/mac/src/pe/include/lim_api.h @@ -81,8 +81,6 @@ #define GET_LIM_PROCESS_DEFD_MESGS(pMac) (pMac->lim.gLimProcessDefdMsgs) #define SET_LIM_PROCESS_DEFD_MESGS(pMac, val) (pMac->lim.gLimProcessDefdMsgs = val) /* LIM exported function templates */ -#define LIM_IS_RADAR_DETECTED(pMac) (pMac->lim.gLimSpecMgmt.fRadarDetCurOperChan) -#define LIM_SET_RADAR_DETECTED(pMac, val) (pMac->lim.gLimSpecMgmt.fRadarDetCurOperChan = val) #define LIM_MIN_BCN_PR_LENGTH 12 #define LIM_BCN_PR_CAPABILITY_OFFSET 10 typedef enum eMgmtFrmDropReason { diff --git a/core/mac/src/pe/include/lim_ft_defs.h b/core/mac/src/pe/include/lim_ft_defs.h index 34c0ba68570f..599da6fa34df 100644 --- a/core/mac/src/pe/include/lim_ft_defs.h +++ b/core/mac/src/pe/include/lim_ft_defs.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2015 The Linux Foundation. All rights reserved. + * Copyright (c) 2013-2016 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -41,7 +41,6 @@ /*-------------------------------------------------------------------------- Preprocessor definitions and constants ------------------------------------------------------------------------*/ -#define SIR_MDIE_SIZE 3 /* MD ID(2 bytes), Capability(1 byte) */ #define MAX_FTIE_SIZE 384 /* Max size limited to 384, on acct. of IW custom events */ /*-------------------------------------------------------------------------- diff --git a/core/mac/src/pe/include/lim_global.h b/core/mac/src/pe/include/lim_global.h index a7747a1e67f6..3969a17599ca 100644 --- a/core/mac/src/pe/include/lim_global.h +++ b/core/mac/src/pe/include/lim_global.h @@ -51,9 +51,6 @@ #include "dot11f.h" #include "wma_if.h" -/* / Maximum number of scan hash table entries */ -#define LIM_MAX_NUM_OF_SCAN_RESULTS 256 - /* Sending Disassociate frames threshold */ #define LIM_SEND_DISASSOC_FRAME_THRESHOLD 2 #define LIM_HASH_MISS_TIMER_MS 10000 @@ -74,9 +71,6 @@ ((LIntrvl * LIM_TIM_WAIT_COUNT_FACTOR) > LIM_MIN_TIM_WAIT_COUNT ? \ (LIntrvl * LIM_TIM_WAIT_COUNT_FACTOR) : LIM_MIN_TIM_WAIT_COUNT) -#define IS_5G_BAND(__rfBand) ((__rfBand & 0x3) == 0x2) -#define IS_24G_BAND(__rfBand) ((__rfBand & 0x3) == 0x1) - #define LIM_MAX_CSA_IE_UPDATES (5) /* enums exported by LIM are as follows */ diff --git a/core/mac/src/pe/include/lim_session.h b/core/mac/src/pe/include/lim_session.h index 14cee56b5a70..16ebd4dd5bf5 100644 --- a/core/mac/src/pe/include/lim_session.h +++ b/core/mac/src/pe/include/lim_session.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2015 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2016 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -65,7 +65,8 @@ typedef struct tagComebackTimerInfo { /*-------------------------------------------------------------------------- Preprocessor definitions and constants ------------------------------------------------------------------------*/ -#define NUM_WEP_KEYS 4 +/* Maximum Number of WEP KEYS */ +#define MAX_WEP_KEYS 4 /* Maximum allowable size of a beacon frame */ #define SCH_MAX_BEACON_SIZE 512 @@ -251,7 +252,7 @@ typedef struct sPESession /* Added to Support BT-AMP */ uint8_t privacy; tAniAuthType authType; - tSirKeyMaterial WEPKeyMaterial[NUM_WEP_KEYS]; + tSirKeyMaterial WEPKeyMaterial[MAX_WEP_KEYS]; tDot11fIERSN gStartBssRSNIe; tDot11fIEWPA gStartBssWPAIe; diff --git a/core/mac/src/pe/lim/lim_ibss_peer_mgmt.h b/core/mac/src/pe/lim/lim_ibss_peer_mgmt.h index 0c97919c3d9f..9051fa2ddde9 100644 --- a/core/mac/src/pe/lim/lim_ibss_peer_mgmt.h +++ b/core/mac/src/pe/lim/lim_ibss_peer_mgmt.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2012, 2014 The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2012, 2014, 2016 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -39,8 +39,6 @@ #include "sir_common.h" #include "lim_utils.h" -#define IBSS_STATIONS_USED_DURING_INIT 4 /* (broadcast + self + p2p + softap) */ - void lim_ibss_init(tpAniSirGlobal); void lim_ibss_delete(tpAniSirGlobal, tpPESession psessionEntry); tSirRetStatus lim_ibss_coalesce(tpAniSirGlobal, tpSirMacMgmtHdr, diff --git a/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c b/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c index ec9f22e98332..491f97931308 100644 --- a/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c +++ b/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c @@ -698,9 +698,6 @@ lim_send_sme_start_bss_rsp(tpAniSirGlobal pMac, lim_sys_process_mmh_msg_api(pMac, &mmhMsg, ePROT); } /*** end lim_send_sme_start_bss_rsp() ***/ -#define LIM_MAX_NUM_OF_SCAN_RESULTS_REPORTED 20 -#define LIM_SIZE_OF_EACH_BSS 400 /* this is a rough estimate */ - /** * lim_send_sme_scan_rsp() - Send scan response to SME * @pMac: Pointer to Global MAC structure