[PATCH 3/8] staging: rtl8192e: Remove typedefs - Part III

Larry Finger Larry.Finger at lwfinger.net
Sun Jul 17 03:10:38 UTC 2011


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

Signed-off-by: Larry Finger <Larry.Finger at lwfinger.net>
---
 drivers/staging/rtl8192e/r8190P_rtl8256.c |   65 +++++++++++++++++++++--------
 drivers/staging/rtl8192e/r8192E_cmdpkt.c  |   37 ++++++++---------
 drivers/staging/rtl8192e/r8192E_cmdpkt.h  |   55 +++++++++---------------
 drivers/staging/rtl8192e/r8192E_hw.h      |    4 +-
 drivers/staging/rtl8192e/r8192E_phy.c     |   65 ++++++++++++++++++-----------
 drivers/staging/rtl8192e/r8192E_phy.h     |   33 +++++++++------
 drivers/staging/rtl8192e/rtl819x_BA.h     |   21 +++++----
 drivers/staging/rtl8192e/rtl819x_BAProc.c |   58 +++++++++++++++-----------
 drivers/staging/rtl8192e/rtl819x_HT.h     |    4 +-
 drivers/staging/rtl8192e/rtl819x_TS.h     |    6 +-
 drivers/staging/rtl8192e/rtl_debug.c      |   16 +++++--
 drivers/staging/rtl8192e/rtllib.h         |    2 +-
 12 files changed, 209 insertions(+), 157 deletions(-)

diff --git a/drivers/staging/rtl8192e/r8190P_rtl8256.c b/drivers/staging/rtl8192e/r8190P_rtl8256.c
index 2dca494..9bb9c52 100644
--- a/drivers/staging/rtl8192e/r8190P_rtl8256.c
+++ b/drivers/staging/rtl8192e/r8190P_rtl8256.c
@@ -34,9 +34,15 @@ void PHY_SetRF8256Bandwidth(struct net_device* dev , HT_CHANNEL_WIDTH Bandwidth)
 		switch (Bandwidth) {
 		case HT_CHANNEL_WIDTH_20:
 			if (priv->card_8192_version == VERSION_8190_BD || priv->card_8192_version == VERSION_8190_BE) {
-				rtl8192_phy_SetRFReg(dev, (RF90_RADIO_PATH_E)eRFPath, 0x0b, bMask12Bits, 0x100);
-				rtl8192_phy_SetRFReg(dev, (RF90_RADIO_PATH_E)eRFPath, 0x2c, bMask12Bits, 0x3d7);
-				rtl8192_phy_SetRFReg(dev, (RF90_RADIO_PATH_E)eRFPath, 0x0e, bMask12Bits, 0x021);
+				rtl8192_phy_SetRFReg(dev,
+						(enum RF90_RADIO_PATH)eRFPath,
+						0x0b, bMask12Bits, 0x100);
+				rtl8192_phy_SetRFReg(dev,
+						(enum RF90_RADIO_PATH)eRFPath,
+						0x2c, bMask12Bits, 0x3d7);
+				rtl8192_phy_SetRFReg(dev,
+						(enum RF90_RADIO_PATH)eRFPath,
+						0x0e, bMask12Bits, 0x021);
 
 			} else {
 				RT_TRACE(COMP_ERR, "PHY_SetRF8256Bandwidth(): unknown hardware version\n");
@@ -45,9 +51,15 @@ void PHY_SetRF8256Bandwidth(struct net_device* dev , HT_CHANNEL_WIDTH Bandwidth)
 			break;
 		case HT_CHANNEL_WIDTH_20_40:
 			if (priv->card_8192_version == VERSION_8190_BD ||priv->card_8192_version == VERSION_8190_BE) {
-				rtl8192_phy_SetRFReg(dev, (RF90_RADIO_PATH_E)eRFPath, 0x0b, bMask12Bits, 0x300);
-				rtl8192_phy_SetRFReg(dev, (RF90_RADIO_PATH_E)eRFPath, 0x2c, bMask12Bits, 0x3ff);
-				rtl8192_phy_SetRFReg(dev, (RF90_RADIO_PATH_E)eRFPath, 0x0e, bMask12Bits, 0x0e1);
+				rtl8192_phy_SetRFReg(dev,
+						(enum RF90_RADIO_PATH)eRFPath,
+						0x0b, bMask12Bits, 0x300);
+				rtl8192_phy_SetRFReg(dev,
+						(enum RF90_RADIO_PATH)eRFPath,
+						0x2c, bMask12Bits, 0x3ff);
+				rtl8192_phy_SetRFReg(dev,
+						(enum RF90_RADIO_PATH)eRFPath,
+						0x0e, bMask12Bits, 0x0e1);
 
 			} else {
 				RT_TRACE(COMP_ERR, "PHY_SetRF8256Bandwidth(): unknown hardware version\n");
@@ -87,7 +99,8 @@ bool phy_RF8256_Config_ParaFile(struct net_device* dev)
 	u8	ConstRetryTimes = 5, RetryTimes = 5;
 	u8 ret = 0;
 
-	for (eRFPath = (RF90_RADIO_PATH_E)RF90_PATH_A; eRFPath <priv->NumTotalRFPath; eRFPath++) {
+	for (eRFPath = (enum RF90_RADIO_PATH)RF90_PATH_A;
+	     eRFPath <priv->NumTotalRFPath; eRFPath++) {
 		if (!rtl8192_phy_CheckIsLegalRFPath(dev, eRFPath))
 				continue;
 
@@ -112,9 +125,11 @@ bool phy_RF8256_Config_ParaFile(struct net_device* dev)
 		rtl8192_setBBreg(dev, pPhyReg->rfHSSIPara2, b3WireAddressLength, 0x0);
 		rtl8192_setBBreg(dev, pPhyReg->rfHSSIPara2, b3WireDataLength, 0x0);
 
-		rtl8192_phy_SetRFReg(dev, (RF90_RADIO_PATH_E) eRFPath, 0x0, bMask12Bits, 0xbf);
+		rtl8192_phy_SetRFReg(dev, (enum RF90_RADIO_PATH) eRFPath,
+				     0x0, bMask12Bits, 0xbf);
 
-		rtStatus = rtl8192_phy_checkBBAndRF(dev, HW90_BLOCK_RF, (RF90_RADIO_PATH_E)eRFPath);
+		rtStatus = rtl8192_phy_checkBBAndRF(dev, HW90_BLOCK_RF,
+					(enum RF90_RADIO_PATH)eRFPath);
 		if (rtStatus!= true) {
 			RT_TRACE(COMP_ERR, "PHY_RF8256_Config():Check Radio[%d] Fail!!\n", eRFPath);
 			goto phy_RF8256_Config_ParaFile_Fail;
@@ -125,32 +140,46 @@ bool phy_RF8256_Config_ParaFile(struct net_device* dev)
 		switch (eRFPath) {
 		case RF90_PATH_A:
 			while (RF3_Final_Value!=RegValueToBeCheck && RetryTimes != 0) {
-				ret = rtl8192_phy_ConfigRFWithHeaderFile(dev,(RF90_RADIO_PATH_E)eRFPath);
-				RF3_Final_Value = rtl8192_phy_QueryRFReg(dev, (RF90_RADIO_PATH_E)eRFPath, RegOffSetToBeCheck, bMask12Bits);
+				ret = rtl8192_phy_ConfigRFWithHeaderFile(dev,
+							(enum RF90_RADIO_PATH)eRFPath);
+				RF3_Final_Value = rtl8192_phy_QueryRFReg(dev,
+						  (enum RF90_RADIO_PATH)eRFPath,
+						  RegOffSetToBeCheck, bMask12Bits);
 				RT_TRACE(COMP_RF, "RF %d %d register final value: %x\n", eRFPath, RegOffSetToBeCheck, RF3_Final_Value);
 				RetryTimes--;
 			}
 			break;
 		case RF90_PATH_B:
-			while (RF3_Final_Value!=RegValueToBeCheck && RetryTimes != 0) {
-				ret = rtl8192_phy_ConfigRFWithHeaderFile(dev,(RF90_RADIO_PATH_E)eRFPath);
-				RF3_Final_Value = rtl8192_phy_QueryRFReg(dev, (RF90_RADIO_PATH_E)eRFPath, RegOffSetToBeCheck, bMask12Bits);
+			while (RF3_Final_Value!=RegValueToBeCheck &&
+			       RetryTimes != 0) {
+				ret = rtl8192_phy_ConfigRFWithHeaderFile(dev,
+						(enum RF90_RADIO_PATH)eRFPath);
+				RF3_Final_Value = rtl8192_phy_QueryRFReg(dev,
+						 (enum RF90_RADIO_PATH)eRFPath,
+						 RegOffSetToBeCheck, bMask12Bits);
 				RT_TRACE(COMP_RF, "RF %d %d register final value: %x\n", eRFPath, RegOffSetToBeCheck, RF3_Final_Value);
 				RetryTimes--;
 			}
 			break;
 		case RF90_PATH_C:
 			while (RF3_Final_Value!=RegValueToBeCheck && RetryTimes != 0) {
-				ret = rtl8192_phy_ConfigRFWithHeaderFile(dev,(RF90_RADIO_PATH_E)eRFPath);
-				RF3_Final_Value = rtl8192_phy_QueryRFReg(dev, (RF90_RADIO_PATH_E)eRFPath, RegOffSetToBeCheck, bMask12Bits);
+				ret = rtl8192_phy_ConfigRFWithHeaderFile(dev,
+				     (enum RF90_RADIO_PATH)eRFPath);
+				RF3_Final_Value = rtl8192_phy_QueryRFReg(dev,
+						  (enum RF90_RADIO_PATH)eRFPath,
+						  RegOffSetToBeCheck, bMask12Bits);
 				RT_TRACE(COMP_RF, "RF %d %d register final value: %x\n", eRFPath, RegOffSetToBeCheck, RF3_Final_Value);
 				RetryTimes--;
 			}
 			break;
 		case RF90_PATH_D:
 			while (RF3_Final_Value!=RegValueToBeCheck && RetryTimes != 0) {
-				ret = rtl8192_phy_ConfigRFWithHeaderFile(dev,(RF90_RADIO_PATH_E)eRFPath);
-				RF3_Final_Value = rtl8192_phy_QueryRFReg(dev, (RF90_RADIO_PATH_E)eRFPath, RegOffSetToBeCheck, bMask12Bits);
+				ret = rtl8192_phy_ConfigRFWithHeaderFile(dev,
+				      (enum RF90_RADIO_PATH)eRFPath);
+				RF3_Final_Value = rtl8192_phy_QueryRFReg(dev,
+						  (enum RF90_RADIO_PATH)eRFPath,
+						  RegOffSetToBeCheck,
+						  bMask12Bits);
 				RT_TRACE(COMP_RF, "RF %d %d register final value: %x\n", eRFPath, RegOffSetToBeCheck, RF3_Final_Value);
 				RetryTimes--;
 			}
diff --git a/drivers/staging/rtl8192e/r8192E_cmdpkt.c b/drivers/staging/rtl8192e/r8192E_cmdpkt.c
index 2852099..4d006ad 100644
--- a/drivers/staging/rtl8192e/r8192E_cmdpkt.c
+++ b/drivers/staging/rtl8192e/r8192E_cmdpkt.c
@@ -102,9 +102,8 @@ Failed:
 }	/* CMPK_Message_Handle_Tx */
 
 static	void
-cmpk_count_txstatistic(
-	struct net_device *dev,
-	cmpk_txfb_t	*pstx_fb)
+cmpk_count_txstatistic(struct net_device *dev,
+		       struct cmpk_txfb *pstx_fb)
 {
 	struct r8192_priv *priv = rtllib_priv(dev);
 #ifdef ENABLE_PS
@@ -152,18 +151,16 @@ cmpk_count_txstatistic(
 
 
 
-static	void
-cmpk_handle_tx_feedback(
-	struct net_device *dev,
-	u8	*	pmsg)
+static	void cmpk_handle_tx_feedback(struct net_device *dev,
+				     u8	*pmsg)
 {
 	struct r8192_priv *priv = rtllib_priv(dev);
-	cmpk_txfb_t		rx_tx_fb;	/* */
+	struct cmpk_txfb rx_tx_fb;
 
 	priv->stats.txfeedback++;
 
 
-	memcpy((u8*)&rx_tx_fb, pmsg, sizeof(cmpk_txfb_t));
+	memcpy((u8*)&rx_tx_fb, pmsg, sizeof(struct cmpk_txfb));
 	cmpk_count_txstatistic(dev, &rx_tx_fb);
 
 }	/* cmpk_Handle_Tx_Feedback */
@@ -199,14 +196,14 @@ cmpk_handle_interrupt_status(
 	struct net_device *dev,
 	u8*	pmsg)
 {
-	cmpk_intr_sta_t		rx_intr_status;	/* */
+	struct cmpk_intr_sta rx_intr_status;
 	struct r8192_priv *priv = rtllib_priv(dev);
 
 	DMESG("---> cmpk_Handle_Interrupt_Status()\n");
 
 
 	rx_intr_status.length = pmsg[1];
-	if (rx_intr_status.length != (sizeof(cmpk_intr_sta_t) - 2))
+	if (rx_intr_status.length != (sizeof(struct cmpk_intr_sta) - 2))
 	{
 		DMESG("cmpk_Handle_Interrupt_Status: wrong length!\n");
 		return;
@@ -249,7 +246,7 @@ cmpk_handle_query_config_rx(
 	struct net_device *dev,
 	u8*	   pmsg)
 {
-	cmpk_query_cfg_t	rx_query_cfg;	/* */
+	struct cmpk_query_cfg rx_query_cfg;
 
 
 	rx_query_cfg.cfg_action		= (pmsg[4] & 0x80000000)>>31;
@@ -265,8 +262,8 @@ cmpk_handle_query_config_rx(
 }	/* cmpk_Handle_Query_Config_Rx */
 
 
-static	void	cmpk_count_tx_status(	struct net_device *dev,
-									cmpk_tx_status_t	*pstx_status)
+static void cmpk_count_tx_status(struct net_device *dev,
+				 struct cmpk_tx_status *pstx_status)
 {
 	struct r8192_priv *priv = rtllib_priv(dev);
 
@@ -314,9 +311,9 @@ cmpk_handle_tx_status(
 	struct net_device *dev,
 	u8*	   pmsg)
 {
-	cmpk_tx_status_t	rx_tx_sts;	/* */
+	struct cmpk_tx_status rx_tx_sts;
 
-	memcpy((void*)&rx_tx_sts, (void*)pmsg, sizeof(cmpk_tx_status_t));
+	memcpy((void*)&rx_tx_sts, (void*)pmsg, sizeof(struct cmpk_tx_status));
 	cmpk_count_tx_status(dev, &rx_tx_sts);
 
 }
@@ -327,9 +324,9 @@ cmpk_handle_tx_rate_history(
 	struct net_device *dev,
 	u8*	   pmsg)
 {
-	cmpk_tx_rahis_t	*ptxrate;
+	struct cmpk_tx_rahis	*ptxrate;
 	u8				i, j;
-	u16				length = sizeof(cmpk_tx_rahis_t);
+	u16 length = sizeof(struct cmpk_tx_rahis);
 	u32				*ptemp;
 	struct r8192_priv *priv = rtllib_priv(dev);
 
@@ -354,7 +351,7 @@ cmpk_handle_tx_rate_history(
 		ptemp[i] = (temp1<<16)|temp2;
 	}
 
-	ptxrate = (cmpk_tx_rahis_t *)pmsg;
+	ptxrate = (struct cmpk_tx_rahis *)pmsg;
 
 	if (ptxrate == NULL )
 	{
@@ -416,7 +413,7 @@ cmpk_message_handle_rx(
 		case RX_INTERRUPT_STATUS:
 			RT_TRACE(COMP_CMDPKT, "---->cmpk_message_handle_rx():RX_INTERRUPT_STATUS\n");
 			cmpk_handle_interrupt_status(dev, pcmd_buff);
-			cmd_length = sizeof(cmpk_intr_sta_t);
+			cmd_length = sizeof(struct cmpk_intr_sta);
 			break;
 		case BOTH_QUERY_CONFIG:
 			RT_TRACE(COMP_CMDPKT, "---->cmpk_message_handle_rx():BOTH_QUERY_CONFIG\n");
diff --git a/drivers/staging/rtl8192e/r8192E_cmdpkt.h b/drivers/staging/rtl8192e/r8192E_cmdpkt.h
index 7873370..be52ded 100644
--- a/drivers/staging/rtl8192e/r8192E_cmdpkt.h
+++ b/drivers/staging/rtl8192e/r8192E_cmdpkt.h
@@ -18,20 +18,19 @@
 ******************************************************************************/
 #ifndef R819XUSB_CMDPKT_H
 #define R819XUSB_CMDPKT_H
-#define		CMPK_RX_TX_FB_SIZE					sizeof(cmpk_txfb_t)
-#define		CMPK_TX_SET_CONFIG_SIZE				sizeof(cmpk_set_cfg_t)
-#define		CMPK_BOTH_QUERY_CONFIG_SIZE			sizeof(cmpk_set_cfg_t)
-#define		CMPK_RX_TX_STS_SIZE					sizeof(cmpk_tx_status_t)
-#define		CMPK_RX_DBG_MSG_SIZE			sizeof(cmpk_rx_dbginfo_t)
-#define		CMPK_TX_RAHIS_SIZE			sizeof(cmpk_tx_rahis_t)
+#define	CMPK_RX_TX_FB_SIZE		sizeof(struct cmpk_txfb)
+#define	CMPK_TX_SET_CONFIG_SIZE		sizeof(struct cmpk_set_cfg)
+#define	CMPK_BOTH_QUERY_CONFIG_SIZE	sizeof(struct cmpk_set_cfg)
+#define CMPK_RX_TX_STS_SIZE		sizeof(struct cmpk_tx_status)
+#define CMPK_RX_DBG_MSG_SIZE		sizeof(struct cmpk_rx_dbginfo)
+#define CMPK_TX_RAHIS_SIZE		sizeof(struct cmpk_tx_rahis)
 
 #define ISR_TxBcnOk					BIT27
 #define ISR_TxBcnErr				BIT26
 #define ISR_BcnTimerIntr			BIT13
 
 
-typedef struct tag_cmd_pkt_tx_feedback
-{
+struct  cmpk_txfb {
 	u8	element_id;
 	u8	length;
 	u8	TID:4;				/* */
@@ -56,19 +55,17 @@ typedef struct tag_cmd_pkt_tx_feedback
 
 	u16	reserve3;			/* */
 	u16	duration;			/* */
-}cmpk_txfb_t;
+};
 
-typedef struct tag_cmd_pkt_interrupt_status
-{
+struct cmpk_intr_sta {
 	u8	element_id;
 	u8	length;
 	u16	reserve;
 	u32	interrupt_status;
-}cmpk_intr_sta_t;
+};
 
 
-typedef struct tag_cmd_pkt_set_configuration
-{
+struct cmpk_set_cfg {
 	u8	element_id;
 	u8	length;
 	u16	reserve1;
@@ -82,12 +79,11 @@ typedef struct tag_cmd_pkt_set_configuration
 	u8	cfg_offset;
 	u32	value;
 	u32	mask;
-}cmpk_set_cfg_t;
+};
 
-#define		cmpk_query_cfg_t	cmpk_set_cfg_t
+#define cmpk_query_cfg	cmpk_set_cfg
 
-typedef struct tag_tx_stats_feedback
-{
+struct cmpk_tx_status {
 	u16	reserve1;
 	u8	length;
 	u8	element_id;
@@ -114,19 +110,15 @@ typedef struct tag_tx_stats_feedback
 	u16	reserve3_23;
 	u8	reserve3_1;
 	u8	rate;
-}__attribute__((packed)) cmpk_tx_status_t;
+}__packed;
 
-typedef struct tag_rx_debug_message_feedback
-{
+struct cmpk_rx_dbginfo {
 	u16	reserve1;
 	u8	length;
 	u8	element_id;
+};
 
-
-}cmpk_rx_dbginfo_t;
-
-typedef struct tag_tx_rate_history
-{
+struct cmpk_tx_rahis {
 	u8	element_id;
 	u8	length;
 	u16	reserved1;
@@ -135,16 +127,11 @@ typedef struct tag_tx_rate_history
 
 	u16	ofdm[8];
 
-
-
-
-
 	u16	ht_mcs[4][16];
 
-}__attribute__((packed)) cmpk_tx_rahis_t;
+}__packed;
 
-typedef enum tag_command_packet_directories
-{
+enum cmpk_element {
     RX_TX_FEEDBACK = 0,
     RX_INTERRUPT_STATUS		= 1,
     TX_SET_CONFIG				= 2,
@@ -154,7 +141,7 @@ typedef enum tag_command_packet_directories
     RX_TX_PER_PKT_FEEDBACK		= 6,
     RX_TX_RATE_HISTORY		= 7,
     RX_CMD_ELE_MAX
-}cmpk_element_e;
+};
 
 extern  u32 cmpk_message_handle_rx(struct net_device *dev, struct rtllib_rx_stats * pstats);
 extern bool cmpk_message_handle_tx(struct net_device *dev, u8* codevirtualaddress, u32 packettype, u32 buffer_len);
diff --git a/drivers/staging/rtl8192e/r8192E_hw.h b/drivers/staging/rtl8192e/r8192E_hw.h
index ec1e746..6099183 100644
--- a/drivers/staging/rtl8192e/r8192E_hw.h
+++ b/drivers/staging/rtl8192e/r8192E_hw.h
@@ -21,10 +21,10 @@
 #ifndef R8180_HW
 #define R8180_HW
 
-typedef enum _BaseBand_Config_Type {
+enum BaseBand_Config_Type {
 	BaseBand_Config_PHY_REG = 0,
 	BaseBand_Config_AGC_TAB = 1,
-} BaseBand_Config_Type, *PBaseBand_Config_Type;
+};
 
 #define	RTL8187_REQT_READ	0xc0
 #define	RTL8187_REQT_WRITE	0x40
diff --git a/drivers/staging/rtl8192e/r8192E_phy.c b/drivers/staging/rtl8192e/r8192E_phy.c
index 5a907a9..e0c9a13 100644
--- a/drivers/staging/rtl8192e/r8192E_phy.c
+++ b/drivers/staging/rtl8192e/r8192E_phy.c
@@ -47,8 +47,11 @@ static u32 RF_CHANNEL_TABLE_ZEBRA[] = {
 
 /*************************Define local function prototype**********************/
 
-static u32 phy_FwRFSerialRead(struct net_device* dev,RF90_RADIO_PATH_E	eRFPath,u32 Offset);
-static void phy_FwRFSerialWrite(struct net_device* dev,RF90_RADIO_PATH_E eRFPath,u32 Offset,u32	Data);
+static u32 phy_FwRFSerialRead(struct net_device *dev,
+			      enum RF90_RADIO_PATH eRFPath, u32 Offset);
+static void phy_FwRFSerialWrite(struct net_device *dev,
+				enum RF90_RADIO_PATH eRFPath,
+				u32 Offset, u32 Data);
 u32 rtl8192_CalculateBitShift(u32 dwBitMask)
 {
 	u32 i;
@@ -99,7 +102,8 @@ u32 rtl8192_QueryBBReg(struct net_device* dev, u32 dwRegAddr, u32 dwBitMask)
 
 	return (Ret);
 }
-u32 rtl8192_phy_RFSerialRead(struct net_device* dev, RF90_RADIO_PATH_E eRFPath, u32 Offset)
+u32 rtl8192_phy_RFSerialRead(struct net_device *dev,
+			     enum RF90_RADIO_PATH eRFPath, u32 Offset)
 {
 	struct r8192_priv *priv = rtllib_priv(dev);
 	u32 ret = 0;
@@ -160,7 +164,9 @@ u32 rtl8192_phy_RFSerialRead(struct net_device* dev, RF90_RADIO_PATH_E eRFPath,
 
 }
 
-void rtl8192_phy_RFSerialWrite(struct net_device* dev, RF90_RADIO_PATH_E eRFPath, u32 Offset, u32 Data)
+void rtl8192_phy_RFSerialWrite(struct net_device *dev,
+			       enum RF90_RADIO_PATH eRFPath, u32 Offset,
+			       u32 Data)
 {
 	struct r8192_priv *priv = rtllib_priv(dev);
 	u32 DataAndAddr = 0, NewOffset = 0;
@@ -218,7 +224,8 @@ void rtl8192_phy_RFSerialWrite(struct net_device* dev, RF90_RADIO_PATH_E eRFPath
 	return;
 }
 
-void rtl8192_phy_SetRFReg(struct net_device* dev, RF90_RADIO_PATH_E eRFPath, u32 RegAddr, u32 BitMask, u32 Data)
+void rtl8192_phy_SetRFReg(struct net_device *dev, enum RF90_RADIO_PATH eRFPath,
+			  u32 RegAddr, u32 BitMask, u32 Data)
 {
 	struct r8192_priv *priv = rtllib_priv(dev);
 	u32 Original_Value, BitShift, New_Value;
@@ -258,7 +265,8 @@ void rtl8192_phy_SetRFReg(struct net_device* dev, RF90_RADIO_PATH_E eRFPath, u32
 	return;
 }
 
-u32 rtl8192_phy_QueryRFReg(struct net_device* dev, RF90_RADIO_PATH_E eRFPath, u32 RegAddr, u32 BitMask)
+u32 rtl8192_phy_QueryRFReg(struct net_device* dev, enum RF90_RADIO_PATH eRFPath,
+			   u32 RegAddr, u32 BitMask)
 {
 	u32 Original_Value, Readback_Value, BitShift;
 	struct r8192_priv *priv = rtllib_priv(dev);
@@ -283,10 +291,9 @@ u32 rtl8192_phy_QueryRFReg(struct net_device* dev, RF90_RADIO_PATH_E eRFPath, u3
 	return (Readback_Value);
 }
 
-static u32 phy_FwRFSerialRead(
-	struct net_device* dev,
-	RF90_RADIO_PATH_E	eRFPath,
-	u32				Offset	)
+static u32 phy_FwRFSerialRead(struct net_device *dev,
+			      enum RF90_RADIO_PATH eRFPath,
+			      u32 Offset)
 {
 	u32		retValue = 0;
 	u32		Data = 0;
@@ -321,8 +328,8 @@ static u32 phy_FwRFSerialRead(
 
 static void
 phy_FwRFSerialWrite(
-		struct net_device* dev,
-		RF90_RADIO_PATH_E	eRFPath,
+		struct net_device *dev,
+		enum RF90_RADIO_PATH eRFPath,
 		u32				Offset,
 		u32				Data	)
 {
@@ -510,7 +517,9 @@ void rtl8192_InitBBRFRegDef(struct net_device* dev)
 	priv->PHYRegDef[RF90_PATH_D].rfLSSIReadBack = rFPGA0_XD_LSSIReadBack;
 
 }
-bool rtl8192_phy_checkBBAndRF(struct net_device* dev, HW90_BLOCK_E CheckBlock, RF90_RADIO_PATH_E eRFPath)
+bool rtl8192_phy_checkBBAndRF(struct net_device *dev,
+			      enum HW90_BLOCK CheckBlock,
+			      enum RF90_RADIO_PATH eRFPath)
 {
 	bool ret = true;
 	u32 i, CheckTimes = 4, dwRegRead = 0;
@@ -576,9 +585,11 @@ bool rtl8192_BB_Config_ParaFile(struct net_device* dev)
 	dwRegValue = read_nic_dword(dev, CPU_GEN);
 	write_nic_dword(dev, CPU_GEN, (dwRegValue&(~CPU_GEN_BB_RST)));
 
-	for (eCheckItem=(HW90_BLOCK_E)HW90_BLOCK_PHY0; eCheckItem<=HW90_BLOCK_PHY1; eCheckItem++)
-	{
-		rtStatus  = rtl8192_phy_checkBBAndRF(dev, (HW90_BLOCK_E)eCheckItem, (RF90_RADIO_PATH_E)0);
+	for (eCheckItem = (enum HW90_BLOCK)HW90_BLOCK_PHY0;
+	     eCheckItem <= HW90_BLOCK_PHY1; eCheckItem++) {
+		rtStatus  = rtl8192_phy_checkBBAndRF(dev,
+				 (enum HW90_BLOCK)eCheckItem,
+				 (enum RF90_RADIO_PATH)0);
 		if (rtStatus != true)
 		{
 			RT_TRACE((COMP_ERR | COMP_PHY), "PHY_RF8256_Config():Check PHY%d Fail!!\n", eCheckItem-1);
@@ -741,7 +752,8 @@ void rtl8192_phy_updateInitGain(struct net_device* dev)
 	return;
 }
 
-u8 rtl8192_phy_ConfigRFWithHeaderFile(struct net_device* dev, RF90_RADIO_PATH_E	eRFPath)
+u8 rtl8192_phy_ConfigRFWithHeaderFile(struct net_device *dev,
+				      enum RF90_RADIO_PATH eRFPath)
 {
 
 	int i;
@@ -824,16 +836,16 @@ void rtl8192_SetTxPowerLevel(struct net_device *dev, u8 channel)
 	return;
 }
 u8 rtl8192_phy_SetSwChnlCmdArray(
-	SwChnlCmd*		CmdTable,
+	struct SwChnlCmd *CmdTable,
 	u32			CmdTableIdx,
 	u32			CmdTableSz,
-	SwChnlCmdID		CmdID,
+	enum SwChnlCmdID 	CmdID,
 	u32			Para1,
 	u32			Para2,
 	u32			msDelay
 	)
 {
-	SwChnlCmd* pCmd;
+	struct SwChnlCmd *pCmd;
 
 	if (CmdTable == NULL)
 	{
@@ -858,13 +870,13 @@ u8 rtl8192_phy_SetSwChnlCmdArray(
 u8 rtl8192_phy_SwChnlStepByStep(struct net_device *dev, u8 channel, u8* stage, u8* step, u32* delay)
 {
 	struct r8192_priv *priv = rtllib_priv(dev);
-	SwChnlCmd				PreCommonCmd[MAX_PRECMD_CNT];
+	struct SwChnlCmd PreCommonCmd[MAX_PRECMD_CNT];
 	u32					PreCommonCmdCnt;
-	SwChnlCmd				PostCommonCmd[MAX_POSTCMD_CNT];
+	struct SwChnlCmd PostCommonCmd[MAX_POSTCMD_CNT];
 	u32					PostCommonCmdCnt;
-	SwChnlCmd				RfDependCmd[MAX_RFDEPENDCMD_CNT];
+	struct SwChnlCmd RfDependCmd[MAX_RFDEPENDCMD_CNT];
 	u32					RfDependCmdCnt;
-	SwChnlCmd				*CurrentCmd = NULL;
+	struct SwChnlCmd *CurrentCmd = NULL;
 	u8		eRFPath;
 
 	RT_TRACE(COMP_TRACE, "====>%s()====stage:%d, step:%d, channel:%d\n", __func__, *stage, *step, channel);
@@ -969,7 +981,10 @@ u8 rtl8192_phy_SwChnlStepByStep(struct net_device *dev, u8 channel, u8* stage, u
 				break;
 			case CmdID_RF_WriteReg:
 				for (eRFPath = 0; eRFPath <priv->NumTotalRFPath; eRFPath++)
-					rtl8192_phy_SetRFReg(dev, (RF90_RADIO_PATH_E)eRFPath, CurrentCmd->Para1, bMask12Bits, CurrentCmd->Para2<<7);
+					rtl8192_phy_SetRFReg(dev,
+						 (enum RF90_RADIO_PATH)eRFPath,
+						 CurrentCmd->Para1, bMask12Bits,
+						 CurrentCmd->Para2<<7);
 				break;
 			default:
 				break;
diff --git a/drivers/staging/rtl8192e/r8192E_phy.h b/drivers/staging/rtl8192e/r8192E_phy.h
index d6020c0..2ebe300 100644
--- a/drivers/staging/rtl8192e/r8192E_phy.h
+++ b/drivers/staging/rtl8192e/r8192E_phy.h
@@ -47,7 +47,7 @@
 
 
 
-typedef enum _SwChnlCmdID {
+enum SwChnlCmdID {
 	CmdID_End,
 	CmdID_SetTxPowerLevel,
 	CmdID_BBRegWrite10,
@@ -55,15 +55,15 @@ typedef enum _SwChnlCmdID {
 	CmdID_WritePortUshort,
 	CmdID_WritePortUchar,
 	CmdID_RF_WriteReg,
-} SwChnlCmdID;
+};
 
 /*--------------------------------Define structure--------------------------------*/
-typedef struct _SwChnlCmd {
-	SwChnlCmdID	CmdID;
+struct SwChnlCmd {
+	enum SwChnlCmdID CmdID;
 	u32			Para1;
 	u32			Para2;
 	u32			msDelay;
-} __attribute__ ((packed)) SwChnlCmd;
+} __packed;
 
 extern u32 rtl819XMACPHY_Array_PG[];
 extern u32 rtl819XPHY_REG_1T2RArray[];
@@ -73,21 +73,21 @@ extern u32 rtl819XRadioB_Array[];
 extern u32 rtl819XRadioC_Array[];
 extern u32 rtl819XRadioD_Array[];
 
-typedef enum _HW90_BLOCK {
+enum HW90_BLOCK {
 	HW90_BLOCK_MAC = 0,
 	HW90_BLOCK_PHY0 = 1,
 	HW90_BLOCK_PHY1 = 2,
 	HW90_BLOCK_RF = 3,
 	HW90_BLOCK_MAXIMUM = 4,
-} HW90_BLOCK_E, *PHW90_BLOCK_E;
+};
 
-typedef enum _RF90_RADIO_PATH{
+enum RF90_RADIO_PATH {
 	RF90_PATH_A = 0,
 	RF90_PATH_B = 1,
 	RF90_PATH_C = 2,
 	RF90_PATH_D = 3,
 	RF90_PATH_MAX
-}RF90_RADIO_PATH_E, *PRF90_RADIO_PATH_E;
+};
 
 #define bMaskByte0                0xff
 #define bMaskByte1                0xff00
@@ -100,17 +100,24 @@ typedef enum _RF90_RADIO_PATH{
 extern u8 rtl8192_phy_CheckIsLegalRFPath(struct net_device* dev, u32 eRFPath);
 extern void rtl8192_setBBreg(struct net_device* dev, u32 dwRegAddr, u32 dwBitMask, u32 dwData);
 extern u32 rtl8192_QueryBBReg(struct net_device* dev, u32 dwRegAddr, u32 dwBitMask);
-extern void rtl8192_phy_SetRFReg(struct net_device* dev, RF90_RADIO_PATH_E eRFPath, u32 RegAddr, u32 BitMask, u32 Data);
-extern u32 rtl8192_phy_QueryRFReg(struct net_device* dev, RF90_RADIO_PATH_E eRFPath, u32 RegAddr, u32 BitMask);
+extern void rtl8192_phy_SetRFReg(struct net_device *dev,
+				 enum RF90_RADIO_PATH eRFPath,
+				 u32 RegAddr, u32 BitMask, u32 Data);
+extern u32 rtl8192_phy_QueryRFReg(struct net_device *dev,
+				  enum RF90_RADIO_PATH eRFPath,
+				  u32 RegAddr, u32 BitMask);
 extern void rtl8192_phy_configmac(struct net_device* dev);
 extern void rtl8192_phyConfigBB(struct net_device* dev, u8 ConfigType);
-extern bool rtl8192_phy_checkBBAndRF(struct net_device* dev, HW90_BLOCK_E CheckBlock, RF90_RADIO_PATH_E eRFPath);
+extern bool rtl8192_phy_checkBBAndRF(struct net_device *dev,
+				     enum HW90_BLOCK CheckBlock,
+				     enum RF90_RADIO_PATH eRFPath);
 extern bool rtl8192_BBConfig(struct net_device* dev);
 extern void rtl8192_phy_getTxPower(struct net_device* dev);
 extern void rtl8192_phy_setTxPower(struct net_device* dev, u8 channel);
 extern bool rtl8192_phy_RFConfig(struct net_device* dev);
 extern void rtl8192_phy_updateInitGain(struct net_device* dev);
-extern u8 rtl8192_phy_ConfigRFWithHeaderFile(struct net_device* dev, RF90_RADIO_PATH_E	eRFPath);
+extern u8 rtl8192_phy_ConfigRFWithHeaderFile(struct net_device *dev,
+					     enum RF90_RADIO_PATH eRFPath);
 
 extern u8 rtl8192_phy_SwChnl(struct net_device* dev, u8 channel);
 extern void rtl8192_SetBWMode(struct net_device *dev, HT_CHANNEL_WIDTH	Bandwidth, HT_EXTCHNL_OFFSET Offset);
diff --git a/drivers/staging/rtl8192e/rtl819x_BA.h b/drivers/staging/rtl8192e/rtl819x_BA.h
index bf8fdea..e550be9 100644
--- a/drivers/staging/rtl8192e/rtl819x_BA.h
+++ b/drivers/staging/rtl8192e/rtl819x_BA.h
@@ -36,16 +36,17 @@
 #define	DELBA_REASON_END_BA			37
 #define	DELBA_REASON_UNKNOWN_BA	38
 #define	DELBA_REASON_TIMEOUT			39
-typedef union _SEQUENCE_CONTROL{
+
+union SEQUENCE_CONTROL {
 	u16 ShortData;
 	struct
 	{
 		u16	FragNum:4;
 		u16	SeqNum:12;
 	}field;
-}SEQUENCE_CONTROL, *PSEQUENCE_CONTROL;
+};
 
-typedef union _BA_PARAM_SET {
+union BA_PARAM_SET {
 	u8 charData[2];
 	u16 shortData;
 	struct {
@@ -54,9 +55,9 @@ typedef union _BA_PARAM_SET {
 		u16 TID:4;
 		u16 BufferSize:10;
 	} field;
-} BA_PARAM_SET, *PBA_PARAM_SET;
+};
 
-typedef union _DELBA_PARAM_SET {
+union DELBA_PARAM_SET {
 	u8 charData[2];
 	u16 shortData;
 	struct {
@@ -64,15 +65,15 @@ typedef union _DELBA_PARAM_SET {
 		u16 Initiator:1;
 		u16 TID:4;
 	} field;
-} DELBA_PARAM_SET, *PDELBA_PARAM_SET;
+};
 
-typedef struct _BA_RECORD {
+struct BA_RECORD {
 	struct timer_list		Timer;
 	u8				bValid;
 	u8				DialogToken;
-	BA_PARAM_SET		BaParamSet;
+	union BA_PARAM_SET BaParamSet;
 	u16				BaTimeoutValue;
-	SEQUENCE_CONTROL	BaStartSeqCtrl;
-} BA_RECORD, *PBA_RECORD;
+	union SEQUENCE_CONTROL BaStartSeqCtrl;
+};
 
 #endif
diff --git a/drivers/staging/rtl8192e/rtl819x_BAProc.c b/drivers/staging/rtl8192e/rtl819x_BAProc.c
index ce5343e..cf0209b 100644
--- a/drivers/staging/rtl8192e/rtl819x_BAProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_BAProc.c
@@ -20,22 +20,23 @@
 #include "rtl819x_BA.h"
 #include "rtl_core.h"
 
-void ActivateBAEntry(struct rtllib_device* ieee, PBA_RECORD pBA, u16 Time)
+void ActivateBAEntry(struct rtllib_device* ieee, struct BA_RECORD *pBA,
+		     u16 Time)
 {
 	pBA->bValid = true;
 	if (Time != 0)
 		mod_timer(&pBA->Timer, jiffies + MSECS(Time));
 }
 
-void DeActivateBAEntry( struct rtllib_device* ieee, PBA_RECORD pBA)
+void DeActivateBAEntry( struct rtllib_device* ieee, struct BA_RECORD *pBA)
 {
 	pBA->bValid = false;
 	del_timer_sync(&pBA->Timer);
 }
 u8 TxTsDeleteBA( struct rtllib_device* ieee, PTX_TS_RECORD	pTxTs)
 {
-	PBA_RECORD		pAdmittedBa = &pTxTs->TxAdmittedBARecord;
-	PBA_RECORD		pPendingBa = &pTxTs->TxPendingBARecord;
+	struct BA_RECORD *pAdmittedBa = &pTxTs->TxAdmittedBARecord;
+	struct BA_RECORD *pPendingBa = &pTxTs->TxPendingBARecord;
 	u8			bSendDELBA = false;
 
 	if (pPendingBa->bValid)
@@ -55,7 +56,7 @@ u8 TxTsDeleteBA( struct rtllib_device* ieee, PTX_TS_RECORD	pTxTs)
 
 u8 RxTsDeleteBA( struct rtllib_device* ieee, PRX_TS_RECORD	pRxTs)
 {
-	PBA_RECORD		pBa = &pRxTs->RxAdmittedBARecord;
+	struct BA_RECORD *pBa = &pRxTs->RxAdmittedBARecord;
 	u8			bSendDELBA = false;
 
 	if (pBa->bValid)
@@ -67,7 +68,7 @@ u8 RxTsDeleteBA( struct rtllib_device* ieee, PRX_TS_RECORD	pRxTs)
 	return bSendDELBA;
 }
 
-void ResetBaEntry( PBA_RECORD pBA)
+void ResetBaEntry(struct BA_RECORD *pBA)
 {
 	pBA->bValid			= false;
 	pBA->BaParamSet.shortData	= 0;
@@ -75,7 +76,10 @@ void ResetBaEntry( PBA_RECORD pBA)
 	pBA->DialogToken		= 0;
 	pBA->BaStartSeqCtrl.ShortData	= 0;
 }
-static struct sk_buff* rtllib_ADDBA(struct rtllib_device* ieee, u8* Dst, PBA_RECORD pBA, u16 StatusCode, u8 type)
+
+static struct sk_buff* rtllib_ADDBA(struct rtllib_device* ieee, u8* Dst,
+				    struct BA_RECORD *pBA,
+				    u16 StatusCode, u8 type)
 {
 	struct sk_buff *skb = NULL;
 	 struct rtllib_hdr_3addr* BAReq = NULL;
@@ -139,12 +143,12 @@ static struct sk_buff* rtllib_ADDBA(struct rtllib_device* ieee, u8* Dst, PBA_REC
 static struct sk_buff* rtllib_DELBA(
 	struct rtllib_device* ieee,
 	u8*		         dst,
-	PBA_RECORD		 pBA,
+	struct BA_RECORD *pBA,
 	TR_SELECT		 TxRxSelect,
 	u16			 ReasonCode
 	)
 {
-	DELBA_PARAM_SET	DelbaParamSet;
+	union DELBA_PARAM_SET DelbaParamSet;
 	struct sk_buff *skb = NULL;
 	 struct rtllib_hdr_3addr* Delba = NULL;
 	u8* tag = NULL;
@@ -193,7 +197,8 @@ static struct sk_buff* rtllib_DELBA(
 	return skb;
 }
 
-void rtllib_send_ADDBAReq(struct rtllib_device* ieee, u8*	dst, PBA_RECORD	pBA)
+void rtllib_send_ADDBAReq(struct rtllib_device *ieee, u8 *dst,
+			  struct BA_RECORD *pBA)
 {
 	struct sk_buff *skb = NULL;
 	skb = rtllib_ADDBA(ieee, dst, pBA, 0, ACT_ADDBAREQ);
@@ -207,7 +212,8 @@ void rtllib_send_ADDBAReq(struct rtllib_device* ieee, u8*	dst, PBA_RECORD	pBA)
 	return;
 }
 
-void rtllib_send_ADDBARsp(struct rtllib_device* ieee, u8* dst, PBA_RECORD pBA, u16 StatusCode)
+void rtllib_send_ADDBARsp(struct rtllib_device *ieee, u8 *dst,
+			  struct BA_RECORD *pBA, u16 StatusCode)
 {
 	struct sk_buff *skb = NULL;
 	skb = rtllib_ADDBA(ieee, dst, pBA, StatusCode, ACT_ADDBARSP);
@@ -220,7 +226,9 @@ void rtllib_send_ADDBARsp(struct rtllib_device* ieee, u8* dst, PBA_RECORD pBA, u
 
 }
 
-void rtllib_send_DELBA(struct rtllib_device* ieee, u8* dst, PBA_RECORD pBA, TR_SELECT TxRxSelect, u16 ReasonCode)
+void rtllib_send_DELBA(struct rtllib_device *ieee, u8 *dst,
+		       struct BA_RECORD *pBA, TR_SELECT TxRxSelect,
+		       u16 ReasonCode)
 {
 	struct sk_buff *skb = NULL;
 	skb = rtllib_DELBA(ieee, dst, pBA, TxRxSelect, ReasonCode);
@@ -240,10 +248,10 @@ int rtllib_rx_ADDBAReq( struct rtllib_device* ieee, struct sk_buff *skb)
 	 struct rtllib_hdr_3addr* req = NULL;
 	u16 rc = 0;
 	u8 * dst = NULL, *pDialogToken = NULL, *tag = NULL;
-	PBA_RECORD pBA = NULL;
-	PBA_PARAM_SET	pBaParamSet = NULL;
+	struct BA_RECORD *pBA = NULL;
+	union BA_PARAM_SET *pBaParamSet = NULL;
 	u16* pBaTimeoutVal = NULL;
-	PSEQUENCE_CONTROL pBaStartSeqCtrl = NULL;
+	union SEQUENCE_CONTROL *pBaStartSeqCtrl = NULL;
 	PRX_TS_RECORD	pTS = NULL;
 
 	if (skb->len < sizeof( struct rtllib_hdr_3addr) + 9)
@@ -259,9 +267,9 @@ int rtllib_rx_ADDBAReq( struct rtllib_device* ieee, struct sk_buff *skb)
 	dst = (u8*)(&req->addr2[0]);
 	tag += sizeof( struct rtllib_hdr_3addr);
 	pDialogToken = tag + 2;
-	pBaParamSet = (PBA_PARAM_SET)(tag + 3);
+	pBaParamSet = (union BA_PARAM_SET *)(tag + 3);
 	pBaTimeoutVal = (u16*)(tag + 5);
-	pBaStartSeqCtrl = (PSEQUENCE_CONTROL)(req + 7);
+	pBaStartSeqCtrl = (union SEQUENCE_CONTROL *)(req + 7);
 
 	RT_TRACE(COMP_DBG, "====>rx ADDBAREQ from :"MAC_FMT"\n", MAC_ARG(dst));
 	if (ieee->current_network.qos_data.active == 0  ||
@@ -314,7 +322,7 @@ int rtllib_rx_ADDBAReq( struct rtllib_device* ieee, struct sk_buff *skb)
 
 OnADDBAReq_Fail:
 	{
-		BA_RECORD	BA;
+		struct BA_RECORD BA;
 		BA.BaParamSet = *pBaParamSet;
 		BA.BaTimeoutValue = *pBaTimeoutVal;
 		BA.DialogToken = *pDialogToken;
@@ -328,11 +336,11 @@ OnADDBAReq_Fail:
 int rtllib_rx_ADDBARsp( struct rtllib_device* ieee, struct sk_buff *skb)
 {
 	 struct rtllib_hdr_3addr* rsp = NULL;
-	PBA_RECORD		pPendingBA, pAdmittedBA;
+	struct BA_RECORD *pPendingBA, *pAdmittedBA;
 	PTX_TS_RECORD		pTS = NULL;
 	u8* dst = NULL, *pDialogToken = NULL, *tag = NULL;
 	u16* pStatusCode = NULL, *pBaTimeoutVal = NULL;
-	PBA_PARAM_SET		pBaParamSet = NULL;
+	union BA_PARAM_SET *pBaParamSet = NULL;
 	u16			ReasonCode;
 
 	if (skb->len < sizeof( struct rtllib_hdr_3addr) + 9)
@@ -346,7 +354,7 @@ int rtllib_rx_ADDBARsp( struct rtllib_device* ieee, struct sk_buff *skb)
 	tag += sizeof( struct rtllib_hdr_3addr);
 	pDialogToken = tag + 2;
 	pStatusCode = (u16*)(tag + 3);
-	pBaParamSet = (PBA_PARAM_SET)(tag + 5);
+	pBaParamSet = (union BA_PARAM_SET *)(tag + 5);
 	pBaTimeoutVal = (u16*)(tag + 7);
 
 	RT_TRACE(COMP_DBG, "====>rx ADDBARSP from :"MAC_FMT"\n", MAC_ARG(dst));
@@ -419,7 +427,7 @@ int rtllib_rx_ADDBARsp( struct rtllib_device* ieee, struct sk_buff *skb)
 
 OnADDBARsp_Reject:
 	{
-		BA_RECORD	BA;
+		struct BA_RECORD BA;
 		BA.BaParamSet = *pBaParamSet;
 		rtllib_send_DELBA(ieee, dst, &BA, TX_DIR, ReasonCode);
 		return 0;
@@ -430,7 +438,7 @@ OnADDBARsp_Reject:
 int rtllib_rx_DELBA(struct rtllib_device* ieee,struct sk_buff *skb)
 {
 	 struct rtllib_hdr_3addr* delba = NULL;
-	PDELBA_PARAM_SET	pDelBaParamSet = NULL;
+	union DELBA_PARAM_SET *pDelBaParamSet = NULL;
 	u16*			pReasonCode = NULL;
 	u8*			dst = NULL;
 
@@ -452,7 +460,7 @@ int rtllib_rx_DELBA(struct rtllib_device* ieee,struct sk_buff *skb)
 	delba = ( struct rtllib_hdr_3addr*)skb->data;
 	dst = (u8*)(&delba->addr2[0]);
 	delba += sizeof( struct rtllib_hdr_3addr);
-	pDelBaParamSet = (PDELBA_PARAM_SET)(delba+2);
+	pDelBaParamSet = (union DELBA_PARAM_SET *)(delba+2);
 	pReasonCode = (u16*)(delba+4);
 
 	if (pDelBaParamSet->field.Initiator == 1)
@@ -506,7 +514,7 @@ TsInitAddBA(
 	u8		bOverwritePending
 	)
 {
-	PBA_RECORD			pBA = &pTS->TxPendingBARecord;
+	struct BA_RECORD *pBA = &pTS->TxPendingBARecord;
 
 	if (pBA->bValid==true && bOverwritePending==false)
 		return;
diff --git a/drivers/staging/rtl8192e/rtl819x_HT.h b/drivers/staging/rtl8192e/rtl819x_HT.h
index 3918705..8f049f8 100644
--- a/drivers/staging/rtl8192e/rtl819x_HT.h
+++ b/drivers/staging/rtl8192e/rtl819x_HT.h
@@ -39,7 +39,7 @@
 #define HT_SUPPORTED_MCS_1SS_2SS_BITMAP			HT_MCS_1SS_BITMAP|HT_MCS_1SS_2SS_BITMAP
 
 
-typedef enum _HT_MCS_RATE{
+enum HT_MCS_RATE {
 	HT_MCS0   = 0x00000001,
 	HT_MCS1   = 0x00000002,
 	HT_MCS2   = 0x00000004,
@@ -56,7 +56,7 @@ typedef enum _HT_MCS_RATE{
 	HT_MCS13 = 0x00002000,
 	HT_MCS14 = 0x00004000,
 	HT_MCS15 = 0x00008000,
-}HT_MCS_RATE,*PHT_MCS_RATE;
+};
 
 typedef enum _HT_CHANNEL_WIDTH{
 	HT_CHANNEL_WIDTH_20 = 0,
diff --git a/drivers/staging/rtl8192e/rtl819x_TS.h b/drivers/staging/rtl8192e/rtl819x_TS.h
index 095edfd..4587b24 100644
--- a/drivers/staging/rtl8192e/rtl819x_TS.h
+++ b/drivers/staging/rtl8192e/rtl819x_TS.h
@@ -45,8 +45,8 @@ typedef struct _TS_COMMON_INFO{
 typedef struct _TX_TS_RECORD{
 	TS_COMMON_INFO		TsCommonInfo;
 	u16				TxCurSeq;
-	BA_RECORD			TxPendingBARecord;
-	BA_RECORD			TxAdmittedBARecord;
+	struct BA_RECORD TxPendingBARecord;
+	struct BA_RECORD TxAdmittedBARecord;
 	u8				bAddBaReqInProgress;
 	u8				bAddBaReqDelayed;
 	u8				bUsingBa;
@@ -61,7 +61,7 @@ typedef struct _RX_TS_RECORD {
 	u16				RxTimeoutIndicateSeq;
 	struct list_head		RxPendingPktList;
 	struct timer_list		RxPktPendingTimer;
-	BA_RECORD			RxAdmittedBARecord;
+	struct BA_RECORD RxAdmittedBARecord;
 	u16				RxLastSeqNum;
 	u8				RxLastFragNum;
 	u8				num;
diff --git a/drivers/staging/rtl8192e/rtl_debug.c b/drivers/staging/rtl8192e/rtl_debug.c
index 91b2daa..54f3301 100644
--- a/drivers/staging/rtl8192e/rtl_debug.c
+++ b/drivers/staging/rtl8192e/rtl_debug.c
@@ -589,7 +589,9 @@ static int proc_get_reg_rf_a(char *page, char **start,
 		len += snprintf(page + len, count - len, "\nD:  %2x > ",n);
 		for (i=0;i<4 && n<=max;n+=4,i++)
 			len += snprintf(page + len, count - len,
-					"%8.8x ",rtl8192_phy_QueryRFReg(dev, (RF90_RADIO_PATH_E)RF90_PATH_A,n, bMaskDWord));
+					"%8.8x ", rtl8192_phy_QueryRFReg(dev,
+					(enum RF90_RADIO_PATH)RF90_PATH_A, n,
+					bMaskDWord));
 	}
 	len += snprintf(page + len, count - len,"\n");
 	*eof = 1;
@@ -615,7 +617,9 @@ static int proc_get_reg_rf_b(char *page, char **start,
 		len += snprintf(page + len, count - len, "\nD:  %2x > ",n);
 		for (i=0;i<4 && n<=max;n+=4,i++)
 			len += snprintf(page + len, count - len,
-					"%8.8x ",rtl8192_phy_QueryRFReg(dev, (RF90_RADIO_PATH_E)RF90_PATH_B, n, bMaskDWord));
+					"%8.8x ", rtl8192_phy_QueryRFReg(dev,
+					(enum RF90_RADIO_PATH)RF90_PATH_B, n,
+					bMaskDWord));
 	}
 	len += snprintf(page + len, count - len,"\n");
 	*eof = 1;
@@ -641,7 +645,9 @@ static int proc_get_reg_rf_c(char *page, char **start,
 		len += snprintf(page + len, count - len, "\nD:  %2x > ",n);
 		for (i=0;i<4 && n<=max;n+=4,i++)
 			len += snprintf(page + len, count - len,
-					"%8.8x ",rtl8192_phy_QueryRFReg(dev, (RF90_RADIO_PATH_E)RF90_PATH_C, n, bMaskDWord));
+					"%8.8x ", rtl8192_phy_QueryRFReg(dev,
+					(enum RF90_RADIO_PATH)RF90_PATH_C, n,
+					bMaskDWord));
 	}
 	len += snprintf(page + len, count - len,"\n");
 	*eof = 1;
@@ -667,7 +673,9 @@ static int proc_get_reg_rf_d(char *page, char **start,
 		len += snprintf(page + len, count - len, "\nD:  %2x > ",n);
 		for (i=0;i<4 && n<=max;n+=4,i++)
 			len += snprintf(page + len, count - len,
-					"%8.8x ",rtl8192_phy_QueryRFReg(dev, (RF90_RADIO_PATH_E)RF90_PATH_D, n, bMaskDWord));
+					"%8.8x ", rtl8192_phy_QueryRFReg(dev,
+					(enum RF90_RADIO_PATH)RF90_PATH_D, n,
+					bMaskDWord));
 	}
 	len += snprintf(page + len, count - len,"\n");
 	*eof = 1;
diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index cad03a9..0c161ed 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -2917,7 +2917,7 @@ extern void TsInitDelBA( struct rtllib_device* ieee, PTS_COMMON_INFO pTsCommonIn
 extern void BaSetupTimeOut(unsigned long data);
 extern void TxBaInactTimeout(unsigned long data);
 extern void RxBaInactTimeout(unsigned long data);
-extern void ResetBaEntry( PBA_RECORD pBA);
+extern void ResetBaEntry(struct BA_RECORD *pBA);
 extern bool GetTs(
         struct rtllib_device*        ieee,
         PTS_COMMON_INFO                 *ppTS,
-- 
1.7.3.4




More information about the devel mailing list