[PATCH 10/17] rtl8192e: Remove unused power control struct members

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Mike McCormack <mikem@xxxxxxxxxx>
---
 drivers/staging/rtl8192e/ieee80211/ieee80211.h |   13 ------
 drivers/staging/rtl8192e/r8192E.h              |   51 ++++++------------------
 drivers/staging/rtl8192e/r8192E_core.c         |    5 +--
 3 files changed, 14 insertions(+), 55 deletions(-)

diff --git a/drivers/staging/rtl8192e/ieee80211/ieee80211.h b/drivers/staging/rtl8192e/ieee80211/ieee80211.h
index 6b11a97..0bdf790 100644
--- a/drivers/staging/rtl8192e/ieee80211/ieee80211.h
+++ b/drivers/staging/rtl8192e/ieee80211/ieee80211.h
@@ -2200,19 +2200,6 @@ struct ieee80211_device {
 	void *priv;
 };
 
-#define	RT_RF_OFF_LEVL_ASPM			BIT0	// PCI ASPM
-#define	RT_RF_OFF_LEVL_CLK_REQ		BIT1	// PCI clock request
-#define	RT_RF_OFF_LEVL_PCI_D3			BIT2	// PCI D3 mode
-#define	RT_RF_OFF_LEVL_HALT_NIC		BIT3	// NIC halt, re-initialize hw parameters
-#define	RT_RF_OFF_LEVL_FREE_FW		BIT4	// FW free, re-download the FW
-#define	RT_RF_OFF_LEVL_FW_32K		BIT5	// FW in 32k
-#define	RT_RF_PS_LEVEL_ALWAYS_ASPM	BIT6	// Always enable ASPM and Clock Req in initialization.
-#define	RT_RF_LPS_DISALBE_2R			BIT30	// When LPS is on, disable 2R if no packet is received or transmittd.
-#define	RT_RF_LPS_LEVEL_ASPM			BIT31	// LPS with ASPM
-#define	RT_IN_PS_LEVEL(pPSC, _PS_FLAG)	((pPSC->CurPsLevel & _PS_FLAG) ? true : false)
-#define	RT_CLEAR_PS_LEVEL(pPSC, _PS_FLAG)	(pPSC->CurPsLevel &= (~(_PS_FLAG)))
-#define	RT_SET_PS_LEVEL(pPSC, _PS_FLAG)	(pPSC->CurPsLevel |= _PS_FLAG)
-
 #define IEEE_A            (1<<0)
 #define IEEE_B            (1<<1)
 #define IEEE_G            (1<<2)
diff --git a/drivers/staging/rtl8192e/r8192E.h b/drivers/staging/rtl8192e/r8192E.h
index 0229031..30a0b8a 100644
--- a/drivers/staging/rtl8192e/r8192E.h
+++ b/drivers/staging/rtl8192e/r8192E.h
@@ -222,57 +222,32 @@ typedef enum _IPS_CALLBACK_FUNCION {
 typedef struct _RT_POWER_SAVE_CONTROL {
 	/* Inactive Power Save(IPS) : Disable RF when disconnected */
 	bool			bInactivePs;
-	bool			bIPSModeBackup;
 	bool			bSwRfProcessing;
 	RT_RF_POWER_STATE	eInactivePowerState;
-	struct work_struct 	InactivePsWorkItem;
-	struct timer_list	InactivePsTimer;
-
-	/* Return point for join action */
-	IPS_CALLBACK_FUNCION	ReturnPoint;
-
-	/* Recored Parameters for rescheduled JoinRequest */
-	bool			bTmpBssDesc;
-	RT_JOIN_ACTION		tmpJoinAction;
-	struct ieee80211_network tmpBssDesc;
-
-	/* Recored Parameters for rescheduled MgntLinkRequest */
-	bool			bTmpScanOnly;
-	bool			bTmpActiveScan;
-	bool			bTmpFilterHiddenAP;
-	bool			bTmpUpdateParms;
-	u8			tmpSsidBuf[33];
-	OCTET_STRING		tmpSsid2Scan;
-	bool			bTmpSsid2Scan;
-	u8			tmpNetworkType;
-	u8			tmpChannelNumber;
-	u16			tmpBcnPeriod;
-	u8			tmpDtimPeriod;
-	u16			tmpmCap;
-	OCTET_STRING		tmpSuppRateSet;
-	u8			tmpSuppRateBuf[MAX_NUM_RATES];
-	bool			bTmpSuppRate;
-	IbssParms		tmpIbpm;
-	bool			bTmpIbpm;
 
 	/*
 	 * Leisure Power Save:
 	 * Disable RF if connected but traffic is not busy
 	 */
 	bool			bLeisurePs;
-	u32			PowerProfile;
 	u8			LpsIdleCount;
-
 	u32			CurPsLevel;
 	u32			RegRfPsLevel;
-
-	bool			bFwCtrlLPS;
-	u8			FWCtrlPSMode;
-
-	bool			LinkReqInIPSRFOffPgs;
-	bool			BufConnectinfoBefore;
 } RT_POWER_SAVE_CONTROL, *PRT_POWER_SAVE_CONTROL;
 
+#define	RT_RF_OFF_LEVL_ASPM		BIT0	/* PCI ASPM */
+#define	RT_RF_OFF_LEVL_CLK_REQ		BIT1	/* PCI clock request */
+#define	RT_RF_OFF_LEVL_PCI_D3		BIT2	/* PCI D3 mode */
+#define	RT_RF_OFF_LEVL_HALT_NIC		BIT3	/* NIC halt, re-initialize hw parameters */
+#define	RT_RF_OFF_LEVL_FREE_FW		BIT4	/* FW free, re-download the FW */
+#define	RT_RF_OFF_LEVL_FW_32K		BIT5	/* FW in 32k */
+#define	RT_RF_PS_LEVEL_ALWAYS_ASPM	BIT6	/* Always enable ASPM and Clock Req in initialization. */
+#define	RT_RF_LPS_DISALBE_2R		BIT30	/* When LPS is on, disable 2R if no packet is received or transmittd. */
+#define	RT_RF_LPS_LEVEL_ASPM		BIT31	/* LPS with ASPM */
+#define	RT_IN_PS_LEVEL(pPSC, _PS_FLAG)	((pPSC->CurPsLevel & _PS_FLAG) ? true : false)
+#define	RT_CLEAR_PS_LEVEL(pPSC, _PS_FLAG)	(pPSC->CurPsLevel &= (~(_PS_FLAG)))
+#define	RT_SET_PS_LEVEL(pPSC, _PS_FLAG)	(pPSC->CurPsLevel |= _PS_FLAG)
+
 /* For rtl819x */
 typedef struct _tx_desc_819x_pci {
         //DWORD 0
diff --git a/drivers/staging/rtl8192e/r8192E_core.c b/drivers/staging/rtl8192e/r8192E_core.c
index 6956748..0e73c25 100644
--- a/drivers/staging/rtl8192e/r8192E_core.c
+++ b/drivers/staging/rtl8192e/r8192E_core.c
@@ -1912,7 +1912,6 @@ static void rtl8192_init_priv_variable(struct r8192_priv *priv)
 	priv->RfOffReason = 0;
 	priv->bHwRfOffAction = 0;
 	priv->PowerSaveControl.bInactivePs = true;
-	priv->PowerSaveControl.bIPSModeBackup = false;
 
 	priv->ieee80211->current_network.beacon_interval = DEFAULT_BEACONINTERVAL;
 	priv->ieee80211->iw_mode = IW_MODE_INFRA;
@@ -3248,9 +3247,7 @@ static void rtl819x_watchdog_wqcallback(struct work_struct *work)
 		if((ieee->iw_mode == IW_MODE_INFRA) && (ieee->state == IEEE80211_NOLINK) &&
 		    (priv->eRFPowerState == eRfOn) && !ieee->is_set_key &&
 		    (!ieee->proto_stoppping) && !ieee->wx_set_enc){
-			if (priv->PowerSaveControl.ReturnPoint == IPS_CALLBACK_NONE){
-				IPSEnter(priv);
-			}
+			IPSEnter(priv);
 		}
 	}
 #endif
-- 
1.7.0.4


_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux