[PATCH 2/8 V2] staging: rtl8192e: Remove typedefs - Part II

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

 



As part of the cleanup of the driver, typedef statements are removed.

Signed-off-by: Larry Finger <Larry.Finger@xxxxxxxxxxxx>
---
 drivers/staging/rtl8192e/r8190P_def.h     |   69 +++++++++++++---------------
 drivers/staging/rtl8192e/r8190P_rtl8256.c |    2 +-
 drivers/staging/rtl8192e/r8192E_cmdpkt.c  |    6 +-
 drivers/staging/rtl8192e/r8192E_dev.c     |   55 ++++++++++++-----------
 drivers/staging/rtl8192e/r8192E_dev.h     |   12 +++--
 drivers/staging/rtl8192e/r8192E_phy.c     |    4 +-
 drivers/staging/rtl8192e/rtl_core.c       |   29 ++++++------
 drivers/staging/rtl8192e/rtl_core.h       |   28 ++++++++----
 8 files changed, 108 insertions(+), 97 deletions(-)

diff --git a/drivers/staging/rtl8192e/r8190P_def.h b/drivers/staging/rtl8192e/r8190P_def.h
index 52c00a1..7df1596 100644
--- a/drivers/staging/rtl8192e/r8190P_def.h
+++ b/drivers/staging/rtl8192e/r8190P_def.h
@@ -29,12 +29,12 @@
 #define RX_CMD_QUEUE				1
 
 
-typedef enum _rtl819x_loopback{
+enum rtl819x_loopback {
 	RTL819X_NO_LOOPBACK = 0,
 	RTL819X_MAC_LOOPBACK = 1,
 	RTL819X_DMA_LOOPBACK = 2,
 	RTL819X_CCK_LOOPBACK = 3,
-}rtl819x_loopback_e;
+};
 
 
 #define RESET_DELAY_8185			20
@@ -129,37 +129,35 @@ typedef enum _rtl819x_loopback{
 #define HAL_PRIME_CHNL_OFFSET_UPPER		2
 
 
-typedef enum _VERSION_8190{
+enum version_8190 {
 	VERSION_8190_BD=0x3,
 	VERSION_8190_BE
-}VERSION_8190,*PVERSION_8190;
+};
 
 #define IC_VersionCut_C	0x2
 #define IC_VersionCut_D	0x3
 #define IC_VersionCut_E	0x4
 
-typedef enum tag_Rf_OpType
-{
+enum Rf_OpType {
     RF_OP_By_SW_3wire = 0,
     RF_OP_By_FW,
     RF_OP_MAX
-}RF_OpType_E;
+};
 
 
-typedef	enum _POWER_SAVE_MODE
-{
+enum power_save_mode {
 	POWER_SAVE_MODE_ACTIVE,
 	POWER_SAVE_MODE_SAVE,
-}POWER_SAVE_MODE;
+};
 
-typedef	enum _INTERFACE_SELECT_8190PCI{
+enum interface_select_8190pci {
 	INTF_SEL1_MINICARD		= 0,
 	INTF_SEL0_PCIE			= 1,
 	INTF_SEL2_RSV			= 2,
 	INTF_SEL3_RSV			= 3,
-} INTERFACE_SELECT_8190PCI, *PINTERFACE_SELECT_8190PCI;
+};
 
-typedef struct _BB_REGISTER_DEFINITION{
+struct bb_register_definition {
 	u32 rfintfs;
 	u32 rfintfi;
 	u32 rfintfo;
@@ -178,9 +176,9 @@ typedef struct _BB_REGISTER_DEFINITION{
 	u32 rfTxAFE;
 	u32 rfLSSIReadBack;
 	u32 rfLSSIReadBackPi;
-}BB_REGISTER_DEFINITION_T, *PBB_REGISTER_DEFINITION_T;
+};
 
-typedef struct _TX_FWINFO_STRUCUTRE{
+struct tx_fwinfo {
 	u8			TxRate:7;
 	u8			CtsEnable:1;
 	u8			RtsRate:7;
@@ -205,9 +203,9 @@ typedef struct _TX_FWINFO_STRUCUTRE{
 	u32			TxAGCSign:1;
 	u32			Tx_INFO_RSVD:6;
 	u32			PacketID:13;
-}TX_FWINFO_T;
+};
 
-typedef struct _TX_FWINFO_8190PCI{
+struct tx_fwinfo_8190pci {
 	u8			TxRate:7;
 	u8			CtsEnable:1;
 	u8			RtsRate:7;
@@ -237,7 +235,7 @@ typedef struct _TX_FWINFO_8190PCI{
 	u32			PacketID:13;
 
 
-}TX_FWINFO_8190PCI, *PTX_FWINFO_8190PCI;
+};
 
 
 #define TX_DESC_SIZE			32
@@ -256,8 +254,7 @@ typedef struct _TX_FWINFO_8190PCI{
 
 #define RX_DRIVER_INFO_SIZE	8
 
-typedef struct _LOG_INTERRUPT_8190
-{
+struct log_interrupt_8190 {
 	u32	nIMR_COMDOK;
 	u32	nIMR_MGNTDOK;
 	u32	nIMR_HIGH;
@@ -270,17 +267,16 @@ typedef struct _LOG_INTERRUPT_8190
 	u32	nIMR_TBDOK;
 	u32	nIMR_BDOK;
 	u32	nIMR_RXFOVW;
-} LOG_INTERRUPT_8190_T, *PLOG_INTERRUPT_8190_T;
+};
 
-typedef struct _phy_ofdm_rx_status_rxsc_sgien_exintfflag{
+struct phy_ofdm_rx_status_flag {
 	u8			reserved:4;
 	u8			rxsc:2;
 	u8			sgi_en:1;
 	u8			ex_intf_flag:1;
-}phy_ofdm_rx_status_rxsc_sgien_exintfflag;
+};
 
-typedef struct _phy_ofdm_rx_status_report_819xpci
-{
+struct phy_sts_ofdm_819xpci {
 	u8	trsw_gain_X[4];
 	u8	pwdb_all;
 	u8	cfosho_X[4];
@@ -294,20 +290,19 @@ typedef struct _phy_ofdm_rx_status_report_819xpci
 	u8	max_ex_pwr;
 	u8	sgi_en;
 	u8	rxsc_sgien_exflg;
-}phy_sts_ofdm_819xpci_t;
+};
 
-typedef struct _phy_cck_rx_status_report_819xpci
-{
+struct phy_sts_cck_819xpci {
 	u8	adc_pwdb_X[4];
 	u8	sq_rpt;
 	u8	cck_agc_rpt;
-}phy_sts_cck_819xpci_t, phy_sts_cck_8192s_t;
+};
 
 
 #define		PHY_RSSI_SLID_WIN_MAX				100
 #define		PHY_Beacon_RSSI_SLID_WIN_MAX		10
 
-typedef struct _tx_desc_819x_pci {
+struct tx_desc {
         u16	PktSize;
         u8	Offset;
         u8	Reserved1:3;
@@ -343,10 +338,10 @@ typedef struct _tx_desc_819x_pci {
         u32	Reserved5;
         u32	Reserved6;
         u32	Reserved7;
-}tx_desc, *ptx_desc;
+};
 
 
-typedef struct _tx_desc_cmd_819x_pci {
+struct tx_desc_cmd {
 	u16	PktSize;
 	u8	Reserved1;
 	u8	CmdType:3;
@@ -367,9 +362,9 @@ typedef struct _tx_desc_cmd_819x_pci {
 	u32	Reserved4;
 	u32	Reserved5;
 	u32	Reserved6;
-}tx_desc_cmd, *ptx_desc_cmd;
+};
 
-typedef struct _rx_desc_819x_pci{
+struct rx_desc {
 	u16			Length:14;
 	u16			CRC32:1;
 	u16			ICV:1;
@@ -388,10 +383,10 @@ typedef struct _rx_desc_819x_pci{
 
 	u32	BufferAddress;
 
-}rx_desc, *prx_desc;
+};
 
 
-typedef struct _rx_fwinfo_819x_pci{
+struct rx_fwinfo {
 	u16			Reserved1:12;
 	u16			PartAggr:1;
 	u16			FirstAGGR:1;
@@ -410,6 +405,6 @@ typedef struct _rx_fwinfo_819x_pci{
 
 	u32			TSFL;
 
-}rx_fwinfo, *prx_fwinfo;
+};
 
 #endif
diff --git a/drivers/staging/rtl8192e/r8190P_rtl8256.c b/drivers/staging/rtl8192e/r8190P_rtl8256.c
index b658700..2dca494 100644
--- a/drivers/staging/rtl8192e/r8190P_rtl8256.c
+++ b/drivers/staging/rtl8192e/r8190P_rtl8256.c
@@ -79,7 +79,7 @@ bool phy_RF8256_Config_ParaFile(struct net_device* dev)
 	u32	u4RegValue = 0;
 	u8	eRFPath;
 	bool rtStatus = true;
-	BB_REGISTER_DEFINITION_T	*pPhyReg;
+	struct bb_register_definition *pPhyReg;
 	struct r8192_priv *priv = rtllib_priv(dev);
 	u32	RegOffSetToBeCheck = 0x3;
 	u32	RegValueToBeCheck = 0x7f1;
diff --git a/drivers/staging/rtl8192e/r8192E_cmdpkt.c b/drivers/staging/rtl8192e/r8192E_cmdpkt.c
index 1aa6973..2852099 100644
--- a/drivers/staging/rtl8192e/r8192E_cmdpkt.c
+++ b/drivers/staging/rtl8192e/r8192E_cmdpkt.c
@@ -51,7 +51,7 @@
 	cb_desc			*tcb_desc;
 	u8				bLastIniPkt;
 
-	PTX_FWINFO_8190PCI      pTxFwInfo = NULL;
+	struct tx_fwinfo_8190pci *pTxFwInfo = NULL;
 
 	RT_TRACE(COMP_CMDPKT,"%s(),buffer_len is %d\n",__func__,buffer_len);
 	firmware_init_param(dev);
@@ -82,8 +82,8 @@
 		tcb_desc->pkt_size = frag_length;
 
 		seg_ptr = skb_put(skb, priv->rtllib->tx_headroom);
-		pTxFwInfo = (PTX_FWINFO_8190PCI)seg_ptr;
-		memset(pTxFwInfo,0,sizeof(TX_FWINFO_8190PCI));
+		pTxFwInfo = (struct tx_fwinfo_8190pci *)seg_ptr;
+		memset(pTxFwInfo, 0, sizeof(struct tx_fwinfo_8190pci));
 		memset(pTxFwInfo,0x12,8);
 
 		seg_ptr = skb_put(skb, frag_length);
diff --git a/drivers/staging/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/r8192E_dev.c
index d441a54..f1e1c03 100644
--- a/drivers/staging/rtl8192e/r8192E_dev.c
+++ b/drivers/staging/rtl8192e/r8192E_dev.c
@@ -1155,13 +1155,14 @@ u8 rtl8192_MapHwQueueToFirmwareQueue(u8 QueueID, u8 priority)
 }
 
 
-void  rtl8192_tx_fill_desc(struct net_device* dev, tx_desc * pdesc, cb_desc * cb_desc, struct sk_buff* skb)
+void  rtl8192_tx_fill_desc(struct net_device *dev, struct tx_desc *pdesc,
+			   cb_desc *cb_desc, struct sk_buff *skb)
 {
     struct r8192_priv *priv = rtllib_priv(dev);
     dma_addr_t mapping = pci_map_single(priv->pdev, skb->data, skb->len, PCI_DMA_TODEVICE);
-    TX_FWINFO_8190PCI *pTxFwInfo = NULL;
-    pTxFwInfo = (PTX_FWINFO_8190PCI)skb->data;
-    memset(pTxFwInfo,0,sizeof(TX_FWINFO_8190PCI));
+	struct tx_fwinfo_8190pci *pTxFwInfo = NULL;
+	pTxFwInfo = (struct tx_fwinfo_8190pci *)skb->data;
+	memset(pTxFwInfo, 0, sizeof(struct tx_fwinfo_8190pci));
     pTxFwInfo->TxHT = (cb_desc->data_rate&0x80)?1:0;
     pTxFwInfo->TxRate = MRateToHwRate8190Pci((u8)cb_desc->data_rate);
     pTxFwInfo->EnableCPUDur = cb_desc->bTxEnableFwCalcDur;
@@ -1205,8 +1206,8 @@ void  rtl8192_tx_fill_desc(struct net_device* dev, tx_desc * pdesc, cb_desc * cb
     memset((u8*)pdesc,0,12);
     pdesc->LINIP = 0;
     pdesc->CmdInit = 1;
-    pdesc->Offset = sizeof(TX_FWINFO_8190PCI) + 8;
-    pdesc->PktSize = (u16)skb->len-sizeof(TX_FWINFO_8190PCI);
+	pdesc->Offset = sizeof(struct tx_fwinfo_8190pci) + 8;
+	pdesc->PktSize = (u16)skb->len-sizeof(struct tx_fwinfo_8190pci);
 
     pdesc->SecCAMID= 0;
     pdesc->RATid = cb_desc->RATRIndex;
@@ -1244,7 +1245,7 @@ void  rtl8192_tx_fill_desc(struct net_device* dev, tx_desc * pdesc, cb_desc * cb
     pdesc->PktId = 0x0;
 
     pdesc->QueueSelect = rtl8192_MapHwQueueToFirmwareQueue(cb_desc->queue_index, cb_desc->priority);
-    pdesc->TxFWInfoSize = sizeof(TX_FWINFO_8190PCI);
+	pdesc->TxFWInfoSize = sizeof(struct tx_fwinfo_8190pci);
 
     pdesc->DISFB = cb_desc->bTxDisableRateFallBack;
     pdesc->USERATE = cb_desc->bTxUseDriverAssingedRate;
@@ -1256,7 +1257,8 @@ void  rtl8192_tx_fill_desc(struct net_device* dev, tx_desc * pdesc, cb_desc * cb
     pdesc->TxBuffAddr = cpu_to_le32(mapping);
 }
 
-void  rtl8192_tx_fill_cmd_desc(struct net_device* dev, tx_desc_cmd * entry,
+void  rtl8192_tx_fill_cmd_desc(struct net_device* dev,
+			       struct tx_desc_cmd *entry,
 		cb_desc * cb_desc, struct sk_buff* skb)
 {
     struct r8192_priv *priv = rtllib_priv(dev);
@@ -1269,9 +1271,9 @@ void  rtl8192_tx_fill_cmd_desc(struct net_device* dev, tx_desc_cmd * entry,
     if (cb_desc->bCmdOrInit == DESC_PACKET_TYPE_INIT) {
         entry->CmdInit = DESC_PACKET_TYPE_INIT;
     } else {
-	tx_desc* entry_tmp = (tx_desc*)entry;
+	struct tx_desc *entry_tmp = (struct tx_desc *)entry;
         entry_tmp->CmdInit = DESC_PACKET_TYPE_NORMAL;
-        entry_tmp->Offset = sizeof(TX_FWINFO_8190PCI) + 8;
+        entry_tmp->Offset = sizeof(struct tx_fwinfo_8190pci) + 8;
         entry_tmp->PktSize = (u16)(cb_desc->pkt_size + entry_tmp->Offset);
         entry_tmp->QueueSelect = QSLT_CMD;
         entry_tmp->TxFWInfoSize = 0x08;
@@ -1396,8 +1398,8 @@ rtl8192_signal_scale_mapping(struct r8192_priv * priv,
 void rtl8192_query_rxphystatus(
 	struct r8192_priv * priv,
 	struct rtllib_rx_stats * pstats,
-	prx_desc  pdesc,
-	prx_fwinfo   pdrvinfo,
+	struct rx_desc *pdesc,
+	struct rx_fwinfo *pdrvinfo,
 	struct rtllib_rx_stats * precord_stats,
 	bool bpacket_match_bssid,
 	bool bpacket_toself,
@@ -1405,9 +1407,9 @@ void rtl8192_query_rxphystatus(
 	bool bToSelfBA
 	)
 {
-	phy_sts_ofdm_819xpci_t* pofdm_buf;
-	phy_sts_cck_819xpci_t	*	pcck_buf;
-	phy_ofdm_rx_status_rxsc_sgien_exintfflag* prxsc;
+	struct phy_sts_ofdm_819xpci *pofdm_buf;
+	struct phy_sts_cck_819xpci *pcck_buf;
+	struct phy_ofdm_rx_status_flag *prxsc;
 	u8				*prxpkt;
 	u8				i,max_spatial_stream, tmp_rxsnr, tmp_rxevm, rxsc_sgien_exflg;
 	char				rx_pwr[4], rx_pwr_all=0;
@@ -1439,10 +1441,10 @@ void rtl8192_query_rxphystatus(
 
 	prxpkt = (u8*)pdrvinfo;
 
-	prxpkt += sizeof(rx_fwinfo);
+	prxpkt += sizeof(struct rx_fwinfo);
 
-	pcck_buf = (phy_sts_cck_819xpci_t *)prxpkt;
-	pofdm_buf = (phy_sts_ofdm_819xpci_t *)prxpkt;
+	pcck_buf = (struct phy_sts_cck_819xpci *)prxpkt;
+	pofdm_buf = (struct phy_sts_ofdm_819xpci *)prxpkt;
 
 	pstats->RxMIMOSignalQuality[0] = -1;
 	pstats->RxMIMOSignalQuality[1] = -1;
@@ -1580,7 +1582,7 @@ void rtl8192_query_rxphystatus(
 
 
 		rxsc_sgien_exflg = pofdm_buf->rxsc_sgien_exflg;
-		prxsc = (phy_ofdm_rx_status_rxsc_sgien_exintfflag *)&rxsc_sgien_exflg;
+		prxsc = (struct phy_ofdm_rx_status_flag *)&rxsc_sgien_exflg;
 		if (pdrvinfo->BW)
 			priv->stats.received_bwtype[1+prxsc->rxsc]++;
 		else
@@ -1768,8 +1770,8 @@ void rtl8192_process_phyinfo(struct r8192_priv * priv, u8* buffer,struct rtllib_
 void rtl8192_TranslateRxSignalStuff(struct net_device *dev,
         struct sk_buff *skb,
         struct rtllib_rx_stats * pstats,
-        prx_desc pdesc,
-        prx_fwinfo pdrvinfo)
+        struct rx_desc *pdesc,
+        struct rx_fwinfo *pdrvinfo)
 {
     struct r8192_priv *priv = (struct r8192_priv *)rtllib_priv(dev);
     bool bpacket_match_bssid, bpacket_toself;
@@ -1870,8 +1872,9 @@ void rtl8192_UpdateReceivedRateHistogramStatistics(
 	priv->stats.received_rate_histogram[rcvType][rateIndex]++;
 }
 
-bool rtl8192_rx_query_status_desc(struct net_device* dev, struct rtllib_rx_stats*  stats,
-		rx_desc *pdesc, struct sk_buff* skb)
+bool rtl8192_rx_query_status_desc(struct net_device *dev,
+				  struct rtllib_rx_stats *stats,
+				  struct rx_desc *pdesc, struct sk_buff* skb)
 {
 	struct r8192_priv *priv = rtllib_priv(dev);
 
@@ -1896,12 +1899,12 @@ bool rtl8192_rx_query_status_desc(struct net_device* dev, struct rtllib_rx_stats
 		}
 		return false;
 	} else {
-		prx_fwinfo pDrvInfo = NULL;
+		struct rx_fwinfo *pDrvInfo = NULL;
 		stats->RxDrvInfoSize = pdesc->RxDrvInfoSize;
 		stats->RxBufShift = ((pdesc->Shift)&0x03);
 		stats->Decrypted = !pdesc->SWDec;
 
-		pDrvInfo = (rx_fwinfo *)(skb->data + stats->RxBufShift);
+		pDrvInfo = (struct rx_fwinfo *)(skb->data + stats->RxBufShift);
 
 		stats->rate = HwRateToMRate90((bool)pDrvInfo->RxHT, (u8)pDrvInfo->RxRate);
 		stats->bShortPreamble = pDrvInfo->SPLCP;
@@ -2057,7 +2060,7 @@ rtl8192_InitializeVariables(struct net_device  *dev)
 		IEEE_SOFTMAC_PROBERS | IEEE_SOFTMAC_TX_QUEUE /* |
 		IEEE_SOFTMAC_BEACONS*/;
 
-	priv->rtllib->tx_headroom = sizeof(TX_FWINFO_8190PCI);
+	priv->rtllib->tx_headroom = sizeof(struct tx_fwinfo_8190pci);
 
 	priv->ShortRetryLimit = 0x30;
 	priv->LongRetryLimit = 0x30;
diff --git a/drivers/staging/rtl8192e/r8192E_dev.h b/drivers/staging/rtl8192e/r8192E_dev.h
index f8021c7..bb64efc 100644
--- a/drivers/staging/rtl8192e/r8192E_dev.h
+++ b/drivers/staging/rtl8192e/r8192E_dev.h
@@ -45,12 +45,14 @@ void rtl8192_get_eeprom_size(struct net_device* dev);
 bool rtl8192_adapter_start(struct net_device *dev);
 void rtl8192_link_change(struct net_device *dev);
 void rtl8192_AllowAllDestAddr(struct net_device* dev, bool bAllowAllDA, bool WriteIntoReg);
-void  rtl8192_tx_fill_desc(struct net_device* dev, tx_desc * pdesc, cb_desc * cb_desc,
-		           struct sk_buff* skb);
-void  rtl8192_tx_fill_cmd_desc(struct net_device* dev, tx_desc_cmd * entry,
+void  rtl8192_tx_fill_desc(struct net_device *dev, struct tx_desc *pdesc,
+			   cb_desc * cb_desc, struct sk_buff* skb);
+void  rtl8192_tx_fill_cmd_desc(struct net_device* dev,
+			       struct tx_desc_cmd *entry,
 			       cb_desc * cb_desc, struct sk_buff* skb);
-bool rtl8192_rx_query_status_desc(struct net_device* dev, struct rtllib_rx_stats *stats,
-				  rx_desc *pdesc, struct sk_buff* skb);
+bool rtl8192_rx_query_status_desc(struct net_device *dev,
+				  struct rtllib_rx_stats *stats,
+				  struct rx_desc *pdesc, struct sk_buff* skb);
 void rtl8192_halt_adapter(struct net_device *dev, bool reset);
 void rtl8192_update_ratr_table(struct net_device* dev);
 #endif
diff --git a/drivers/staging/rtl8192e/r8192E_phy.c b/drivers/staging/rtl8192e/r8192E_phy.c
index c462d74..5a907a9 100644
--- a/drivers/staging/rtl8192e/r8192E_phy.c
+++ b/drivers/staging/rtl8192e/r8192E_phy.c
@@ -104,7 +104,7 @@ u32 rtl8192_phy_RFSerialRead(struct net_device* dev, RF90_RADIO_PATH_E eRFPath,
 	struct r8192_priv *priv = rtllib_priv(dev);
 	u32 ret = 0;
 	u32 NewOffset = 0;
-	BB_REGISTER_DEFINITION_T* pPhyReg = &priv->PHYRegDef[eRFPath];
+	struct bb_register_definition *pPhyReg = &priv->PHYRegDef[eRFPath];
 	Offset &= 0x3f;
 
 	if (priv->rf_chip == RF_8256)
@@ -164,7 +164,7 @@ void rtl8192_phy_RFSerialWrite(struct net_device* dev, RF90_RADIO_PATH_E eRFPath
 {
 	struct r8192_priv *priv = rtllib_priv(dev);
 	u32 DataAndAddr = 0, NewOffset = 0;
-	BB_REGISTER_DEFINITION_T	*pPhyReg = &priv->PHYRegDef[eRFPath];
+	struct bb_register_definition *pPhyReg = &priv->PHYRegDef[eRFPath];
 
 	Offset &= 0x3f;
 	if (priv->rf_chip == RF_8256)
diff --git a/drivers/staging/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl_core.c
index bc9378a..ece05ba 100644
--- a/drivers/staging/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl_core.c
@@ -800,7 +800,7 @@ void rtl8192_prepare_beacon(struct r8192_priv *priv)
 	struct sk_buff *pskb = NULL, *pnewskb = NULL;
 	cb_desc *tcb_desc = NULL;
 	struct rtl8192_tx_ring *ring = NULL;
-	tx_desc *pdesc = NULL;
+	struct tx_desc *pdesc = NULL;
 
 	ring = &priv->tx_ring[BEACON_QUEUE];
 	pskb = __skb_dequeue(&ring->queue);
@@ -1226,7 +1226,7 @@ static void rtl8192_init_priv_variable(struct net_device* dev)
 	priv->force_reset = false;
 	memset(priv->rtllib->swcamtable,0,sizeof(SW_CAM_TABLE)*32);
 
-	memset(&priv->InterruptLog,0,sizeof(LOG_INTERRUPT_8190_T));
+	memset(&priv->InterruptLog,0,sizeof(struct log_interrupt_8190));
 	priv->RxCounter = 0;
         priv->rtllib->wx_set_enc = 0;
 	priv->bHwRadioOff = false;
@@ -1884,7 +1884,7 @@ static void rtl8192_free_tx_ring(struct net_device *dev, unsigned int prio)
     struct rtl8192_tx_ring *ring = &priv->tx_ring[prio];
 
     while (skb_queue_len(&ring->queue)) {
-        tx_desc *entry = &ring->desc[ring->idx];
+        struct tx_desc *entry = &ring->desc[ring->idx];
         struct sk_buff *skb = __skb_dequeue(&ring->queue);
 
         pci_unmap_single(priv->pdev, le32_to_cpu(entry->TxBuffAddr),
@@ -1982,7 +1982,7 @@ void rtl8192_tx_isr(struct net_device *dev, int prio)
     struct rtl8192_tx_ring *ring = &priv->tx_ring[prio];
 
     while (skb_queue_len(&ring->queue)) {
-        tx_desc *entry = &ring->desc[ring->idx];
+        struct tx_desc *entry = &ring->desc[ring->idx];
         struct sk_buff *skb;
 
         if (prio != BEACON_QUEUE) {
@@ -2007,7 +2007,7 @@ void rtl8192_tx_cmd(struct net_device *dev, struct sk_buff *skb)
 {
     struct r8192_priv *priv = rtllib_priv(dev);
     struct rtl8192_tx_ring *ring;
-    tx_desc_cmd* entry;
+    struct tx_desc_cmd *entry;
     unsigned int idx;
     cb_desc *tcb_desc;
     unsigned long flags;
@@ -2016,7 +2016,7 @@ void rtl8192_tx_cmd(struct net_device *dev, struct sk_buff *skb)
     ring = &priv->tx_ring[TXCMD_QUEUE];
 
     idx = (ring->idx + skb_queue_len(&ring->queue)) % ring->entries;
-    entry = (tx_desc_cmd*) &ring->desc[idx];
+	entry = (struct tx_desc_cmd *) &ring->desc[idx];
 
     tcb_desc = (cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE);
 
@@ -2034,7 +2034,7 @@ short rtl8192_tx(struct net_device *dev, struct sk_buff* skb)
 	struct rtl8192_tx_ring  *ring;
 	unsigned long flags;
 	cb_desc *tcb_desc = (cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE);
-	tx_desc *pdesc = NULL;
+	struct tx_desc *pdesc = NULL;
 	struct rtllib_hdr_1addr * header = NULL;
 	u16 fc=0, type=0,stype=0;
 	bool  multi_addr=false,broad_addr=false,uni_addr=false;
@@ -2049,7 +2049,7 @@ short rtl8192_tx(struct net_device *dev, struct sk_buff* skb)
 
 	priv->rtllib->bAwakePktSent = true;
 
-	fwinfo_size = sizeof(TX_FWINFO_8190PCI);
+	fwinfo_size = sizeof(struct tx_fwinfo_8190pci);
 
 	header = (struct rtllib_hdr_1addr *)(((u8*)skb->data) + fwinfo_size);
 	fc = header->frame_ctl;
@@ -2108,7 +2108,7 @@ short rtl8192_tx(struct net_device *dev, struct sk_buff* skb)
 short rtl8192_alloc_rx_desc_ring(struct net_device *dev)
 {
 	struct r8192_priv *priv = rtllib_priv(dev);
-	rx_desc *entry = NULL;
+	struct rx_desc *entry = NULL;
 	int i, rx_queue_idx;
 
 	for (rx_queue_idx = 0; rx_queue_idx < MAX_RX_QUEUE; rx_queue_idx ++){
@@ -2150,7 +2150,7 @@ static int rtl8192_alloc_tx_desc_ring(struct net_device *dev,
         unsigned int prio, unsigned int entries)
 {
     struct r8192_priv *priv = (struct r8192_priv *)rtllib_priv(dev);
-    tx_desc *ring;
+	struct tx_desc *ring;
     dma_addr_t dma;
     int i;
 
@@ -2181,7 +2181,7 @@ short rtl8192_pci_initdescring(struct net_device *dev)
     int i;
     struct r8192_priv *priv = rtllib_priv(dev);
 
-    ret = rtl8192_alloc_rx_desc_ring(dev);
+	ret = rtl8192_alloc_rx_desc_ring(dev);
     if (ret) {
         return ret;
     }
@@ -2210,7 +2210,7 @@ void rtl8192_pci_resetdescring(struct net_device *dev)
 
 	for (rx_queue_idx = 0; rx_queue_idx < MAX_RX_QUEUE; rx_queue_idx ++){
 		if (priv->rx_ring[rx_queue_idx]) {
-			rx_desc *entry = NULL;
+			struct rx_desc *entry = NULL;
 			for (i = 0; i < priv->rxringcount; i++) {
 				entry = &priv->rx_ring[rx_queue_idx][i];
 				entry->OWN = 1;
@@ -2225,7 +2225,7 @@ void rtl8192_pci_resetdescring(struct net_device *dev)
             struct rtl8192_tx_ring *ring = &priv->tx_ring[i];
 
             while (skb_queue_len(&ring->queue)) {
-                tx_desc *entry = &ring->desc[ring->idx];
+                struct tx_desc *entry = &ring->desc[ring->idx];
                 struct sk_buff *skb = __skb_dequeue(&ring->queue);
 
                 pci_unmap_single(priv->pdev, le32_to_cpu(entry->TxBuffAddr),
@@ -2363,7 +2363,8 @@ void rtl8192_rx_normal(struct net_device *dev)
 	stats.nic_type = NIC_8192E;
 
 	while (count--) {
-		rx_desc *pdesc = &priv->rx_ring[rx_queue_idx][priv->rx_idx[rx_queue_idx]];
+		struct rx_desc *pdesc = &priv->rx_ring[rx_queue_idx]
+					[priv->rx_idx[rx_queue_idx]];
 		struct sk_buff *skb = priv->rx_buf[rx_queue_idx][priv->rx_idx[rx_queue_idx]];
 
 		if (pdesc->OWN) {
diff --git a/drivers/staging/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl_core.h
index 0eecb79..5e8e989 100644
--- a/drivers/staging/rtl8192e/rtl_core.h
+++ b/drivers/staging/rtl8192e/rtl_core.h
@@ -518,7 +518,7 @@ typedef struct _tx_ring{
 }__attribute__ ((packed)) tx_ring, * ptx_ring;
 
 struct rtl8192_tx_ring {
-    tx_desc *desc;
+    struct tx_desc *desc;
     dma_addr_t dma;
     unsigned int idx;
     unsigned int entries;
@@ -534,10 +534,20 @@ struct rtl819x_ops{
 	void (* init_before_adapter_start)(struct net_device* dev);
 	bool (* initialize_adapter)(struct net_device* dev);
 	void (*link_change)(struct net_device* dev);
-	void (* tx_fill_descriptor)(struct net_device* dev, tx_desc * tx_desc, cb_desc * cb_desc, struct sk_buff *skb);
-	void (* tx_fill_cmd_descriptor)(struct net_device* dev, tx_desc_cmd * entry, cb_desc * cb_desc, struct sk_buff *skb);
-	bool (* rx_query_status_descriptor)(struct net_device* dev, struct rtllib_rx_stats*  stats, rx_desc *pdesc, struct sk_buff* skb);
-	bool (* rx_command_packet_handler)(struct net_device *dev, struct sk_buff* skb, rx_desc *pdesc);
+	void (*tx_fill_descriptor)(struct net_device *dev,
+				   struct tx_desc *tx_desc,
+				   cb_desc * cb_desc, struct sk_buff *skb);
+	void (* tx_fill_cmd_descriptor)(struct net_device* dev,
+				        struct tx_desc_cmd *entry,
+					cb_desc * cb_desc,
+					struct sk_buff *skb);
+	bool (*rx_query_status_descriptor)(struct net_device *dev,
+					   struct rtllib_rx_stats *stats,
+					   struct rx_desc *pdesc,
+					   struct sk_buff* skb);
+	bool (*rx_command_packet_handler)(struct net_device *dev,
+					  struct sk_buff* skb,
+					  struct rx_desc *pdesc);
 	void (* stop_adapter)(struct net_device *dev, bool reset);
 	void (* update_ratr_table)(struct net_device* dev);
 	void (* irq_enable)(struct net_device* dev);
@@ -587,7 +597,7 @@ typedef struct r8192_priv
 
 	work_struct_rsl				reset_wq;
 
-	LOG_INTERRUPT_8190_T	InterruptLog;
+	struct log_interrupt_8190 InterruptLog;
 
 	RT_CUSTOMER_ID			CustomerID;
 
@@ -595,7 +605,7 @@ typedef struct r8192_priv
 	RT_RF_TYPE_819xU		rf_chip;
 	IC_INFERIORITY_8192S		IC_Class;
 	HT_CHANNEL_WIDTH		CurrentChannelBW;
-	BB_REGISTER_DEFINITION_T	PHYRegDef[4];
+	struct bb_register_definition PHYRegDef[4];
 	rate_adaptive				rate_adaptive;
 
 	ccktxbbgain_struct			cck_txbbgain_table[CCKTxBBGainTableLength];
@@ -606,7 +616,7 @@ typedef struct r8192_priv
 	ACM_METHOD				AcmMethod;
 
 	struct rt_firmware *pFirmware;
-	rtl819x_loopback_e			LoopbackMode;
+	enum rtl819x_loopback LoopbackMode;
 	enum firmware_source firmware_source;
 
 	struct timer_list			watch_dog_timer;
@@ -643,7 +653,7 @@ typedef struct r8192_priv
 	void (*rf_close)(struct net_device *dev);
 	void (*rf_init)(struct net_device *dev);
 
-	rx_desc			*rx_ring[MAX_RX_QUEUE];
+	struct rx_desc *rx_ring[MAX_RX_QUEUE];
 	struct sk_buff	*rx_buf[MAX_RX_QUEUE][MAX_RX_COUNT];
 	dma_addr_t	rx_ring_dma[MAX_RX_QUEUE];
 	unsigned int	rx_idx[MAX_RX_QUEUE];
-- 
1.7.3.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