Kaynağa Gözat

qcacld-3.0: Align structure to reduce Data Segment

Aligning structure variables properly can reduce memory requirement
of data segment. Thereby reduces over all memory requirement.

Change-Id: I8b1a704cb6ed852d23111b6ee9d14c883b889a78
CRs-Fixed: 2203674
Rachit Kankane 7 yıl önce
ebeveyn
işleme
0247191755

+ 16 - 16
core/mac/inc/ani_global.h

@@ -905,50 +905,50 @@ typedef struct sAniSirGlobal {
 
 	tRrmContext rrm;
 
-	uint8_t isCoalesingInIBSSAllowed;
 
 	csr_readyToSuspendCallback readyToSuspendCallback;
 	void *readyToSuspendContext;
+	uint8_t isCoalesingInIBSSAllowed;
 	uint8_t lteCoexAntShare;
 	uint8_t beacon_offload;
 	bool pmf_offload;
 	bool is_fils_roaming_supported;
-	uint32_t fEnableDebugLog;
-	uint16_t mgmtSeqNum;
 	bool enable5gEBT;
-	/* Miracast session 0-Disabled, 1-Source, 2-sink */
 	uint8_t fMiracastSessionPresent;
+	uint8_t f_prefer_non_dfs_on_radar;
+	uint32_t fEnableDebugLog;
+	uint32_t f_sta_miracast_mcc_rest_time_val;
+	/* Miracast session 0-Disabled, 1-Source, 2-sink */
 #ifdef WLAN_FEATURE_EXTWOW_SUPPORT
 	csr_readyToExtWoWCallback readyToExtWoWCallback;
 	void *readyToExtWoWContext;
 #endif
-	uint32_t f_sta_miracast_mcc_rest_time_val;
-	uint8_t f_prefer_non_dfs_on_radar;
 	hdd_ftm_msg_processor ftm_msg_processor_callback;
 	struct vdev_type_nss vdev_type_nss_2g;
 	struct vdev_type_nss vdev_type_nss_5g;
 
+	uint16_t mgmtSeqNum;
 	/* 802.11p enable */
 	bool enable_dot11p;
-
 	/* DBS capability based on INI and FW capability */
 	uint8_t hw_dbs_capable;
-	/* Based on INI parameter */
-	uint32_t dual_mac_feature_disable;
 	uint32_t sta_sap_scc_on_dfs_chan;
 	sir_mgmt_frame_ind_callback mgmt_frame_ind_cb;
-	bool first_scan_done;
-	int8_t first_scan_bucket_threshold;
-	enum auth_tx_ack_status auth_ack_status;
-	uint8_t user_configured_nss;
-	bool sta_prefer_80MHz_over_160MHz;
 	struct wlan_objmgr_psoc *psoc;
 	struct wlan_objmgr_pdev *pdev;
-	enum  country_src reg_hint_src;
-	bool snr_monitor_enabled;
 	void (*chan_info_cb)(struct scan_chan_info *chan_info);
+	/* Based on INI parameter */
+	uint32_t dual_mac_feature_disable;
+
+	enum  country_src reg_hint_src;
 	uint32_t rx_packet_drop_counter;
+	enum auth_tx_ack_status auth_ack_status;
+	uint8_t user_configured_nss;
+	bool snr_monitor_enabled;
 	bool ignore_assoc_disallowed;
+	bool sta_prefer_80MHz_over_160MHz;
+	bool first_scan_done;
+	int8_t first_scan_bucket_threshold;
 	uint32_t peer_rssi;
 	uint32_t peer_txrate;
 	uint32_t peer_rxrate;

+ 3 - 4
core/mac/src/include/cfg_global.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011-2015 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2018 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -75,6 +75,8 @@ typedef struct sAniSirCfgStatic {
 typedef struct sAniSirCfg {
 	/* CFG module status */
 	uint8_t gCfgStatus;
+	uint16_t gCfgMaxIBufSize;
+	uint16_t gCfgMaxSBufSize;
 
 	tCfgCtl *gCfgEntry;
 
@@ -83,9 +85,6 @@ typedef struct sAniSirCfg {
 	uint32_t *gCfgIBufMin;
 	uint32_t *gCfgIBufMax;
 
-	uint16_t gCfgMaxIBufSize;
-	uint16_t gCfgMaxSBufSize;
-
 	/* Static buffer for string parameter (must be word-aligned) */
 	uint8_t *gSBuffer;
 

+ 16 - 16
core/mac/src/include/dph_global.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011-2017 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2018 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -159,16 +159,18 @@ typedef struct sDphHashNode {
 	uint8_t staAuthenticated:1;
 	uint8_t fAniCount:1;
 	uint8_t rmfEnabled:1;
+	/* Number of Tim to wait if the STA doesn't respond / fetch data */
+	uint8_t timWaitCount;
 	/* Fragmentation size */
 	uint16_t fragSize;
+	/* Taurus capabilities */
+	uint16_t baPolicyFlag;  /* BA Policy for each TID. */
 	/* LIM state */
 	tLimMlmStaContext mlmStaContext;
-	/* Number of Tim to wait if the STA doesn't respond / fetch data */
-	uint8_t timWaitCount;
-	/* Number of Successful MPDU's being sent */
-	uint32_t curTxMpduCnt;
 	/* number of consecutive TIMs sent without response */
 	uint8_t numTimSent;
+	/* Number of Successful MPDU's being sent */
+	uint32_t curTxMpduCnt;
 	/* qos parameter info */
 	tDphQosParams qos;
 	/* station version info - valid only if versionPresent is set */
@@ -177,12 +179,12 @@ typedef struct sDphHashNode {
 	uint8_t wdsIndex;
 	uint8_t wdsPeerBeaconSeen;
 #endif
-	/* Taurus capabilities */
-	uint16_t baPolicyFlag;  /* BA Policy for each TID. */
 	/*
 	 * All the legacy and airgo supported rates.
 	 */
 	tSirSupportedRates supportedRates;
+	/* MIMO Power Save */
+	tSirMacHTMIMOPowerSaveState htMIMOPSState;
 	uint8_t htGreenfield:1;
 	uint8_t htShortGI40Mhz:1;
 	uint8_t htShortGI20Mhz:1;
@@ -205,8 +207,6 @@ typedef struct sDphHashNode {
 	/* Set to 0 for 3839 octets */
 	/* Set to 1 for 7935 octets */
 	uint8_t htMaxAmsduLength;
-	/* MIMO Power Save */
-	tSirMacHTMIMOPowerSaveState htMIMOPSState;
 	/* */
 	/* Maximum Rx A-MPDU factor */
 	uint8_t htMaxRxAMpduFactor:3;
@@ -221,12 +221,12 @@ typedef struct sDphHashNode {
 	/* DPH HASH ENTRY FIELDS NEEDED IN HAL ONLY */
 	uint8_t dpuSig:4;       /* DPU signiture */
 	uint8_t staSig:4;       /* STA signature */
-	uint8_t staType;
 	uint16_t bssId;         /* BSSID */
 	uint16_t assocId;       /* Association ID */
 	/* This is the real sta index generated by HAL */
 	uint16_t staIndex;
 	uint8_t staAddr[6];
+	uint8_t staType;
 	/*
 	 * The DPU signatures will be sent eventually to TL to help
 	 * it determine the association to which a packet belongs to
@@ -241,14 +241,14 @@ typedef struct sDphHashNode {
 	uint8_t vhtBeamFormerCapable;
 	uint8_t vht_su_bfee_capable;
 #ifdef WLAN_FEATURE_11W
-	uint8_t pmfSaQueryState;
-	uint8_t pmfSaQueryRetryCount;
+	unsigned long last_unprot_deauth_disassoc;
+	unsigned long last_assoc_received_time;
+	TX_TIMER pmfSaQueryTimer;
 	uint16_t pmfSaQueryCurrentTransId;
 	uint16_t pmfSaQueryStartTransId;
-	TX_TIMER pmfSaQueryTimer;
-	unsigned long last_unprot_deauth_disassoc;
+	uint8_t pmfSaQueryState;
+	uint8_t pmfSaQueryRetryCount;
 	uint8_t proct_deauh_disassoc_cnt;
-	unsigned long last_assoc_received_time;
 #endif
 	uint8_t htLdpcCapable;
 	uint8_t vhtLdpcCapable;
@@ -264,9 +264,9 @@ typedef struct sDphHashNode {
 	uint8_t nss;
 	int8_t del_sta_ctx_rssi;
 	bool sta_deletion_in_progress;
-	struct parsed_ies parsed_ies;
 	/* Flag indicating connected STA doesn't support ECSA */
 	uint8_t non_ecsa_capable;
+	struct parsed_ies parsed_ies;
 
 #ifdef WLAN_FEATURE_11AX
 	tDot11fIEhe_cap he_config;

+ 3 - 3
core/mac/src/pe/include/lim_global.h

@@ -299,19 +299,19 @@ typedef struct sLimMlmStaContext {
 	tAniAuthType authType;
 	uint16_t listenInterval;
 	tSirMacCapabilityInfo capabilityInfo;
-	tSirMacPropRateSet propRateSet;
 	tSirMacReasonCodes disassocReason;
-	uint16_t cleanupTrigger;
 
 	tSirResultCodes resultCode;
-	uint16_t protStatusCode;
 
+	tSirMacPropRateSet propRateSet;
 	uint8_t subType:1;      /* Indicates ASSOC (0) or REASSOC (1) */
 	uint8_t updateContext:1;
 	uint8_t schClean:1;
 	/* 802.11n HT Capability in Station: Enabled 1 or DIsabled 0 */
 	uint8_t htCapability:1;
 	uint8_t vhtCapability:1;
+	uint16_t cleanupTrigger;
+	uint16_t protStatusCode;
 #ifdef WLAN_FEATURE_11AX
 	bool he_capable;
 #endif

+ 3 - 3
core/mac/src/sys/legacy/src/platform/inc/sys_wrapper.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011-2016 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2018 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -105,9 +105,10 @@ typedef struct TX_TIMER_STRUCT {
 #define TIMER_MAX_NAME_LEN 50
 	char timerName[TIMER_MAX_NAME_LEN];
 #endif
+	uint8_t sessionId;
+	uint32_t expireInput;
 	uint64_t tmrSignature;
 	void (*pExpireFunc)(void *, uint32_t);
-	uint32_t expireInput;
 	uint64_t initScheduleTimeInMsecs;
 	uint64_t rescheduleTimeInMsecs;
 	qdf_mc_timer_t qdf_timer;
@@ -115,7 +116,6 @@ typedef struct TX_TIMER_STRUCT {
 	/* Pointer to the MAC global structure, which stores the context for the NIC, */
 	/* for which this timer is supposed to operate. */
 	void *pMac;
-	uint8_t sessionId;
 
 } TX_TIMER;
 

+ 3 - 3
core/sme/inc/csr_api.h

@@ -938,7 +938,9 @@ typedef struct tagCsrRoamConnectedProfile {
 	tSirMacSSid SSID;
 	bool handoffPermitted;
 	bool ssidHidden;
+	uint8_t operationChannel;
 	struct qdf_mac_addr bssid;
+	uint16_t beaconInterval;
 	eCsrRoamBssType BSSType;
 	eCsrAuthType AuthType;
 	tCsrAuthList AuthInfo;
@@ -946,9 +948,7 @@ typedef struct tagCsrRoamConnectedProfile {
 	tCsrEncryptionList EncryptionInfo;
 	eCsrEncryptionType mcEncryptionType;
 	tCsrEncryptionList mcEncryptionInfo;
-	uint8_t operationChannel;
 	uint32_t vht_channel_width;
-	uint16_t beaconInterval;
 	tCsrKeys Keys;
 	/*
 	 * meaningless on connect. It's an OUT param from CSR's point of view
@@ -958,6 +958,7 @@ typedef struct tagCsrRoamConnectedProfile {
 	 */
 	uint8_t acm_mask;
 	tCsrRoamModifyProfileFields modifyProfileFields;
+	bool qosConnection;     /* A connection is QoS enabled */
 	uint32_t nAddIEAssocLength;
 	/*
 	 * If not null,it's IE byte stream for additional IE,
@@ -966,7 +967,6 @@ typedef struct tagCsrRoamConnectedProfile {
 	uint8_t *pAddIEAssoc;
 	tSirBssDescription *pBssDesc;
 	bool qap;               /* AP supports QoS */
-	bool qosConnection;     /* A connection is QoS enabled */
 	tCsrMobilityDomainInfo MDID;
 #ifdef FEATURE_WLAN_ESE
 	tCsrEseCckmInfo eseCckmInfo;