lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1433278095-13988-11-git-send-email-mateusz.kulikowski@gmail.com>
Date:	Tue,  2 Jun 2015 22:48:14 +0200
From:	Mateusz Kulikowski <mateusz.kulikowski@...il.com>
To:	gregkh@...uxfoundation.org
Cc:	Mateusz Kulikowski <mateusz.kulikowski@...il.com>,
	dan.carpenter@...cle.com, joe@...ches.com,
	devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: [PATCH 10/11] staging: rtl8192e: Remove dead code: r8192_priv members

Remove unused members of rtl8192_priv structure.
Some of them are never used, other are just initialized and
never accessed.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@...il.com>
---
 drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c |  11 --
 drivers/staging/rtl8192e/rtl8192e/rtl_core.c   |  32 ----
 drivers/staging/rtl8192e/rtl8192e/rtl_core.h   | 206 +------------------------
 3 files changed, 1 insertion(+), 248 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
index b5e4d35..f6661bb 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
@@ -2199,14 +2199,6 @@ rtl8192_InitializeVariables(struct net_device  *dev)
 	priv->ShortRetryLimit = 0x30;
 	priv->LongRetryLimit = 0x30;
 
-	priv->EarlyRxThreshold = 7;
-	priv->pwrGroupCnt = 0;
-
-	priv->bIgnoreSilentReset = false;
-	priv->enable_gpio0 = 0;
-
-	priv->TransmitConfig = 0;
-
 	priv->ReceiveConfig = RCR_ADD3	|
 		RCR_AMF | RCR_ADF |
 		RCR_AICV |
@@ -2221,9 +2213,6 @@ rtl8192_InitializeVariables(struct net_device  *dev)
 			    IMR_RDU | IMR_RXFOVW | IMR_TXFOVW |
 			    IMR_BcnInt | IMR_TBDOK | IMR_TBDER);
 
-
-	priv->MidHighPwrTHR_L1 = 0x3B;
-	priv->MidHighPwrTHR_L2 = 0x40;
 	priv->PwrDomainProtect = false;
 
 	priv->bfirst_after_down = false;
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index fcc9188..4c53c87 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -1087,16 +1087,6 @@ static void rtl8192_init_priv_constant(struct net_device *dev)
 					&(priv->rtllib->PowerSaveControl);
 
 	pPSC->RegMaxLPSAwakeIntvl = 5;
-
-	priv->RegPciASPM = 2;
-
-	priv->RegDevicePciASPMSetting = 0x03;
-
-	priv->RegHostPciASPMSetting = 0x02;
-
-	priv->RegHwSwRfOffD3 = 2;
-
-	priv->RegSupportPciASPM = 2;
 }
 
 
@@ -1109,9 +1099,6 @@ static void rtl8192_init_priv_variable(struct net_device *dev)
 	priv->dot11CurrentPreambleMode = PREAMBLE_AUTO;
 	priv->rtllib->hwscan_sem_up = 1;
 	priv->rtllib->status = 0;
-	priv->H2CTxCmdSeq = 0;
-	priv->bDisableFrameBursting = false;
-	priv->bDMInitialGainEnable = true;
 	priv->polling_timer_on = 0;
 	priv->up_first_time = 1;
 	priv->blinked_ingpio = false;
@@ -1125,12 +1112,7 @@ static void rtl8192_init_priv_variable(struct net_device *dev)
 	priv->rxringcount = MAX_RX_COUNT;
 	priv->irq_enabled = 0;
 	priv->chan = 1;
-	priv->RegWirelessMode = WIRELESS_MODE_AUTO;
 	priv->RegChannelPlan = 0xf;
-	priv->nrxAMPDU_size = 0;
-	priv->nrxAMPDU_aggr_num = 0;
-	priv->last_rxdesc_tsf_high = 0;
-	priv->last_rxdesc_tsf_low = 0;
 	priv->rtllib->mode = WIRELESS_MODE_AUTO;
 	priv->rtllib->iw_mode = IW_MODE_INFRA;
 	priv->rtllib->bNetPromiscuousMode = false;
@@ -1176,12 +1158,6 @@ static void rtl8192_init_priv_variable(struct net_device *dev)
 	priv->rtllib->sta_sleep = LPS_IS_WAKE;
 	priv->rtllib->eRFPowerState = eRfOn;
 
-	priv->txpower_checkcnt = 0;
-	priv->thermal_readback_index = 0;
-	priv->txpower_tracking_callback_cnt = 0;
-	priv->ccktxpower_adjustcnt_ch14 = 0;
-	priv->ccktxpower_adjustcnt_not_ch14 = 0;
-
 	priv->rtllib->current_network.beacon_interval = DEFAULT_BEACONINTERVAL;
 	priv->rtllib->iw_mode = IW_MODE_INFRA;
 	priv->rtllib->active_scan = 1;
@@ -1198,13 +1174,11 @@ static void rtl8192_init_priv_variable(struct net_device *dev)
 
 	priv->card_type = PCI;
 
-	priv->AcmControl = 0;
 	priv->pFirmware = vzalloc(sizeof(struct rt_firmware));
 	if (!priv->pFirmware)
 		netdev_err(dev,
 			   "rtl8192e: Unable to allocate space for firmware\n");
 
-	skb_queue_head_init(&priv->rx_queue);
 	skb_queue_head_init(&priv->skb_queue);
 
 	for (i = 0; i < MAX_QUEUE_SIZE; i++)
@@ -1215,14 +1189,10 @@ static void rtl8192_init_priv_variable(struct net_device *dev)
 
 static void rtl8192_init_priv_lock(struct r8192_priv *priv)
 {
-	spin_lock_init(&priv->fw_scan_lock);
 	spin_lock_init(&priv->tx_lock);
-	spin_lock_init(&priv->irq_lock);
 	spin_lock_init(&priv->irq_th_lock);
 	spin_lock_init(&priv->rf_ps_lock);
 	spin_lock_init(&priv->ps_lock);
-	spin_lock_init(&priv->rf_lock);
-	spin_lock_init(&priv->rt_h2c_lock);
 	sema_init(&priv->wx_sem, 1);
 	sema_init(&priv->rf_sem, 1);
 	mutex_init(&priv->mutex);
@@ -2994,8 +2964,6 @@ static void rtl8192_pci_disconnect(struct pci_dev *pdev)
 		}
 		free_rtllib(dev);
 
-		kfree(priv->scan_cmd);
-
 		if (dev->mem_start != 0) {
 			iounmap((void __iomem *)dev->mem_start);
 			release_mem_region(pci_resource_start(pdev, 1),
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
index 71f0c02..e1686cb 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
@@ -339,10 +339,6 @@ struct r8192_priv {
 	struct delayed_work		txpower_tracking_wq;
 	struct delayed_work		rfpath_check_wq;
 	struct delayed_work		gpio_change_rf_wq;
-	struct delayed_work		initialgain_operate_wq;
-	struct delayed_work		check_hw_scan_wq;
-	struct delayed_work		hw_scan_simu_wq;
-	struct delayed_work		start_hw_scan_wq;
 
 	struct workqueue_struct		*priv_wq;
 
@@ -374,17 +370,11 @@ struct r8192_priv {
 	struct timer_list			fsync_timer;
 	struct timer_list			gpio_polling_timer;
 
-	spinlock_t				fw_scan_lock;
-	spinlock_t				irq_lock;
 	spinlock_t				irq_th_lock;
 	spinlock_t				tx_lock;
 	spinlock_t				rf_ps_lock;
-	spinlock_t				rw_lock;
-	spinlock_t				rt_h2c_lock;
-	spinlock_t				rf_lock;
 	spinlock_t				ps_lock;
 
-	struct sk_buff_head		rx_queue;
 	struct sk_buff_head		skb_queue;
 
 	struct tasklet_struct		irq_rx_tasklet;
@@ -397,12 +387,9 @@ struct r8192_priv {
 
 	struct rt_stats stats;
 	struct iw_statistics			wstats;
-	struct proc_dir_entry		*dir_dev;
 
 	short (*rf_set_sens)(struct net_device *dev, short sens);
 	u8 (*rf_set_chan)(struct net_device *dev, u8 ch);
-	void (*rf_close)(struct net_device *dev);
-	void (*rf_init)(struct net_device *dev);
 
 	struct rx_desc *rx_ring[MAX_RX_QUEUE];
 	struct sk_buff	*rx_buf[MAX_RX_QUEUE][MAX_RX_COUNT];
@@ -413,28 +400,19 @@ struct r8192_priv {
 
 	u64		LastRxDescTSF;
 
-	u16		EarlyRxThreshold;
 	u32		ReceiveConfig;
-	u8		AcmControl;
-	u8		RFProgType;
 	u8		retry_data;
 	u8		retry_rts;
 	u16		rts;
 
 	struct rtl8192_tx_ring tx_ring[MAX_TX_QUEUE_COUNT];
 	int		 txringcount;
-	int		txbuffsize;
-	int		txfwbuffersize;
 	atomic_t	tx_pending[0x10];
 
 	u16		ShortRetryLimit;
 	u16		LongRetryLimit;
-	u32		TransmitConfig;
-	u8		RegCWinMin;
-	u8		keepAliveLevel;
 
 	bool		bHwRadioOff;
-	bool		pwrdown;
 	bool		blinked_ingpio;
 	u8		polling_timer_on;
 
@@ -447,17 +425,11 @@ struct r8192_priv {
 
 	struct work_struct qos_activate;
 
-	u8 bIbssCoordinator;
-
 	short	promisc;
-	short	crcmon;
-
-	int txbeaconcount;
 
 	short	chan;
 	short	sens;
 	short	max_sens;
-	u32 rx_prevlen;
 
 	u8 ScanDelay;
 	bool ps_force;
@@ -468,114 +440,43 @@ struct r8192_priv {
 	enum nic_t card_8192;
 	u8 card_8192_version;
 
-	short	enable_gpio0;
-
 	u8 rf_type;
 	u8 IC_Cut;
 	char nick[IW_ESSID_MAX_SIZE + 1];
-
-	u8 RegBcnCtrlVal;
-	bool bHwAntDiv;
-
-	bool bTKIPinNmodeFromReg;
-	bool bWEPinNmodeFromReg;
-
-	bool bLedOpenDrain;
-
 	u8 check_roaming_cnt;
 
-	bool bIgnoreSilentReset;
-	u32 SilentResetRxSoltNum;
 	u32 SilentResetRxSlotIndex;
 	u32 SilentResetRxStuckEvent[MAX_SILENT_RESET_RX_SLOT_NUM];
 
-	void *scan_cmd;
-	u8 hwscan_bw_40;
-
-	u16 nrxAMPDU_size;
-	u8 nrxAMPDU_aggr_num;
-
-	u32 last_rxdesc_tsf_high;
-	u32 last_rxdesc_tsf_low;
-
 	u16 basic_rate;
 	u8 short_preamble;
 	u8 dot11CurrentPreambleMode;
 	u8 slot_time;
 	u16 SifsTime;
 
-	u8 RegWirelessMode;
-
-	u8 firmware_version;
-	u16 FirmwareSubVersion;
-	u16 rf_pathmap;
 	bool AutoloadFailFlag;
 
-	u8 RegPciASPM;
-	u8 RegAMDPciASPM;
-	u8 RegHwSwRfOffD3;
-	u8 RegSupportPciASPM;
-	bool bSupportASPM;
-
-	u32 RfRegChnlVal[2];
-
-	u8 ShowRateMode;
-	u8 RATRTableBitmap;
-
-	u8 EfuseMap[2][HWSET_MAX_SIZE_92S];
-	u16 EfuseUsedBytes;
-	u8 EfuseUsedPercentage;
-
 	short	epromtype;
 	u16 eeprom_vid;
 	u16 eeprom_did;
-	u16 eeprom_svid;
-	u16 eeprom_smid;
 	u8 eeprom_CustomerID;
 	u16 eeprom_ChannelPlan;
-	u8 eeprom_version;
-
-	u8 EEPROMRegulatory;
-	u8 EEPROMPwrGroup[2][3];
-	u8 EEPROMOptional;
 
 	u8 EEPROMTxPowerLevelCCK[14];
 	u8 EEPROMTxPowerLevelOFDM24G[14];
-	u8 EEPROMTxPowerLevelOFDM5G[24];
 	u8 EEPROMRfACCKChnl1TxPwLevel[3];
 	u8 EEPROMRfAOfdmChnlTxPwLevel[3];
 	u8 EEPROMRfCCCKChnl1TxPwLevel[3];
 	u8 EEPROMRfCOfdmChnlTxPwLevel[3];
-	u16 EEPROMTxPowerDiff;
 	u16 EEPROMAntPwDiff;
 	u8 EEPROMThermalMeter;
-	u8 EEPROMPwDiff;
 	u8 EEPROMCrystalCap;
 
-	u8 EEPROMBluetoothCoexist;
-	u8 EEPROMBluetoothType;
-	u8 EEPROMBluetoothAntNum;
-	u8 EEPROMBluetoothAntIsolation;
-	u8 EEPROMBluetoothRadioShared;
-
-
-	u8 EEPROMSupportWoWLAN;
-	u8 EEPROMBoardType;
-	u8 EEPROM_Def_Ver;
-	u8 EEPROMHT2T_TxPwr[6];
-	u8 EEPROMTSSI_A;
-	u8 EEPROMTSSI_B;
-	u8 EEPROMTxPowerLevelCCK_V1[3];
 	u8 EEPROMLegacyHTTxPowerDiff;
 
-	u8 BluetoothCoexist;
-
 	u8 CrystalCap;
 	u8 ThermalMeter[2];
 
-	u16 FwCmdIOMap;
-	u32 FwCmdIOParam;
-
 	u8 SwChnlInProgress;
 	u8 SwChnlStage;
 	u8 SwChnlStep;
@@ -591,59 +492,16 @@ struct r8192_priv {
 
 	u16 RegChannelPlan;
 	u16 ChannelPlan;
-	bool bChnlPlanFromHW;
 
 	bool RegRfOff;
 	bool isRFOff;
 	bool bInPowerSaveMode;
 	u8 bHwRfOffAction;
 
-	bool aspm_clkreq_enable;
-	u8 RegHostPciASPMSetting;
-	u8 RegDevicePciASPMSetting;
-
 	bool RFChangeInProgress;
 	bool SetRFPowerStateInProgress;
 	bool bdisable_nic;
 
-	u8 pwrGroupCnt;
-
-	u8 ThermalValue_LCK;
-	u8 ThermalValue_IQK;
-	bool bRfPiEnable;
-
-	u32 APKoutput[2][2];
-	bool bAPKdone;
-
-	long RegE94;
-	long RegE9C;
-	long RegEB4;
-	long RegEBC;
-
-	u32 RegC04;
-	u32 Reg874;
-	u32 RegC08;
-	u32 ADDA_backup[16];
-	u32 IQK_MAC_backup[3];
-
-	bool SetFwCmdInProgress;
-	u8 CurrentFwCmdIO;
-
-	u8 rssi_level;
-
-	bool bInformFWDriverControlDM;
-	u8 PwrGroupHT20[2][14];
-	u8 PwrGroupHT40[2][14];
-
-	u8 ThermalValue;
-	long EntryMinUndecoratedSmoothedPWDB;
-	long EntryMaxUndecoratedSmoothedPWDB;
-	u8 DynamicTxHighPowerLvl;
-	u8 LastDTPLvl;
-	u32 CurrentRATR0;
-	struct false_alarm_stats FalseAlmCnt;
-
-	u8 DMFlag;
 	u8 DM_Type;
 
 	u8 CckPwEnl;
@@ -653,54 +511,32 @@ struct r8192_priv {
 	u8 CCKPresentAttentuation_40Mdefault;
 	char CCKPresentAttentuation_difference;
 	char CCKPresentAttentuation;
-	u8 bCckHighPower;
 	long undecorated_smoothed_pwdb;
-	long undecorated_smoothed_cck_adc_pwdb[4];
 
 	u32 MCSTxPowerLevelOriginalOffset[6];
-	u32 CCKTxPowerLevelOriginalOffset;
 	u8 TxPowerLevelCCK[14];
 	u8 TxPowerLevelCCK_A[14];
 	u8 TxPowerLevelCCK_C[14];
 	u8		TxPowerLevelOFDM24G[14];
-	u8		TxPowerLevelOFDM5G[14];
 	u8		TxPowerLevelOFDM24G_A[14];
 	u8		TxPowerLevelOFDM24G_C[14];
 	u8		LegacyHTTxPowerDiff;
-	u8		TxPowerDiff;
 	s8		RF_C_TxPwDiff;
-	s8		RF_B_TxPwDiff;
-	u8		RfTxPwrLevelCck[2][14];
-	u8		RfTxPwrLevelOfdm1T[2][14];
-	u8		RfTxPwrLevelOfdm2T[2][14];
 	u8		AntennaTxPwDiff[3];
-	u8		TxPwrHt20Diff[2][14];
-	u8		TxPwrLegacyHtDiff[2][14];
-	u8		TxPwrSafetyFlag;
-	u8		HT2T_TxPwr_A[14];
-	u8		HT2T_TxPwr_B[14];
-	u8		CurrentCckTxPwrIdx;
-	u8		CurrentOfdm24GTxPwrIdx;
-
-	bool		bdynamic_txpower;
+
 	bool		bDynamicTxHighPower;
 	bool		bDynamicTxLowPower;
 	bool		bLastDTPFlag_High;
 	bool		bLastDTPFlag_Low;
 
-	bool		bstore_last_dtpflag;
-	bool		bstart_txctrl_bydtp;
-
 	u8		rfa_txpowertrackingindex;
 	u8		rfa_txpowertrackingindex_real;
 	u8		rfa_txpowertracking_default;
 	u8		rfc_txpowertrackingindex;
 	u8		rfc_txpowertrackingindex_real;
-	u8		rfc_txpowertracking_default;
 	bool		btxpower_tracking;
 	bool		bcck_in_ch14;
 
-	u8		TxPowerTrackControl;
 	u8		txpower_count;
 	bool		btxpower_trackingInit;
 
@@ -716,11 +552,6 @@ struct r8192_priv {
 	bool		bcurrent_turbo_EDCA;
 	bool		bis_cur_rdlstate;
 
-	bool		bCCKinCH14;
-
-	u8		MidHighPwrTHR_L1;
-	u8		MidHighPwrTHR_L2;
-
 	bool		bfsync_processing;
 	u32		rate_record;
 	u32		rateCountDiffRecord;
@@ -730,56 +561,21 @@ struct r8192_priv {
 	u32		framesyncC34;
 	u8		framesyncMonitor;
 
-	bool		bDMInitialGainEnable;
-	bool		MutualAuthenticationFail;
-
-	bool		bDisableFrameBursting;
-
 	u32		reset_count;
-	bool		bpbc_pressed;
-
-	u32		txpower_checkcnt;
-	u32		txpower_tracking_callback_cnt;
-	u8		thermal_read_val[40];
-	u8		thermal_readback_index;
-	u32		ccktxpower_adjustcnt_not_ch14;
-	u32		ccktxpower_adjustcnt_ch14;
 
 	enum reset_type ResetProgress;
 	bool		bForcedSilentReset;
 	bool		bDisableNormalResetCheck;
 	u16		TxCounter;
 	u16		RxCounter;
-	int		IrpPendingCount;
 	bool		bResetInProgress;
 	bool		force_reset;
 	bool		force_lps;
-	u8		InitialGainOperateType;
 
 	bool		chan_forced;
-	bool		bSingleCarrier;
-	bool		RegBoard;
-	bool		bCckContTx;
-	bool		bOfdmContTx;
-	bool		bStartContTx;
-	u8		RegPaModel;
-	u8		btMpCckTxPower;
-	u8		btMpOfdmTxPower;
-
-	u32		MptActType;
-	u32		MptIoOffset;
-	u32		MptIoValue;
-	u32		MptRfPath;
-
-	u32		MptBandWidth;
-	u32		MptRateIndex;
-	u8		MptChannelToSw;
-	u32	MptRCR;
 
 	u8		PwrDomainProtect;
 	u8		H2CTxCmdSeq;
-
-
 };
 
 extern const struct ethtool_ops rtl819x_ethtool_ops;
-- 
1.8.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ