All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Fixing style errors in staging/drivers/rtl8192u
@ 2019-06-03 12:21 Christian Müller
  2019-06-03 12:21 ` [PATCH 1/3] drivers/staging/rtl8192u: Reformat comments Christian Müller
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Christian Müller @ 2019-06-03 12:21 UTC (permalink / raw)
  To: gregkh
  Cc: johnfwhitmore, devel, linux-kernel, linux-kernel, felix.trommer,
	Christian Müller

This series of patches fixes various style errors in the rtl8192u
staging driver. These fixes contain reformatting of code comments,
changing of indentations, cleaning up commented out code within the
source-code and fixes for individual errors indicated by the checkpatch tool.

Christian Müller (1):
  drivers/staging/rtl8192u: Fix of checkpatch-errors

Felix Trommer (2):
  drivers/staging/rtl8192u: Reformat comments
  drivers/staging/rtl8192u: Remove comment-out code

 drivers/staging/rtl8192u/ieee80211/dot11d.c   |   6 +-
 drivers/staging/rtl8192u/ieee80211/dot11d.h   |   2 +-
 .../staging/rtl8192u/ieee80211/ieee80211.h    | 311 +++---
 .../rtl8192u/ieee80211/ieee80211_crypt.c      |   3 +-
 .../rtl8192u/ieee80211/ieee80211_crypt.h      |  15 +-
 .../rtl8192u/ieee80211/ieee80211_crypt_ccmp.c |   7 +-
 .../rtl8192u/ieee80211/ieee80211_crypt_tkip.c |  13 +-
 .../rtl8192u/ieee80211/ieee80211_crypt_wep.c  |   9 +-
 .../rtl8192u/ieee80211/ieee80211_module.c     |   6 +-
 .../staging/rtl8192u/ieee80211/ieee80211_rx.c | 973 ++++++++----------
 .../rtl8192u/ieee80211/ieee80211_softmac.c    | 336 +++---
 .../rtl8192u/ieee80211/ieee80211_softmac_wx.c |  21 +-
 .../staging/rtl8192u/ieee80211/ieee80211_tx.c | 311 +++---
 .../staging/rtl8192u/ieee80211/ieee80211_wx.c | 115 +--
 .../staging/rtl8192u/ieee80211/rtl819x_BA.h   |   2 +-
 .../rtl8192u/ieee80211/rtl819x_BAProc.c       | 169 +--
 .../staging/rtl8192u/ieee80211/rtl819x_HT.h   | 111 +-
 .../rtl8192u/ieee80211/rtl819x_HTProc.c       | 264 ++---
 .../staging/rtl8192u/ieee80211/rtl819x_Qos.h  |  24 +-
 .../rtl8192u/ieee80211/rtl819x_TSProc.c       | 110 +-
 drivers/staging/rtl8192u/r8180_93cx6.c        |   3 +-
 drivers/staging/rtl8192u/r8180_93cx6.h        |   4 +-
 drivers/staging/rtl8192u/r8190_rtl8256.c      |  36 +-
 drivers/staging/rtl8192u/r8192U.h             |  47 +-
 drivers/staging/rtl8192u/r8192U_core.c        | 159 ++-
 drivers/staging/rtl8192u/r8192U_dm.c          | 232 ++---
 drivers/staging/rtl8192u/r8192U_dm.h          |  22 +-
 drivers/staging/rtl8192u/r8192U_hw.h          | 192 ++--
 drivers/staging/rtl8192u/r8192U_wx.c          |  17 +-
 drivers/staging/rtl8192u/r819xU_cmdpkt.c      |  77 +-
 drivers/staging/rtl8192u/r819xU_cmdpkt.h      |  14 +-
 drivers/staging/rtl8192u/r819xU_firmware.c    |  12 +-
 drivers/staging/rtl8192u/r819xU_phy.c         |  30 +-
 drivers/staging/rtl8192u/r819xU_phy.h         |   4 +-
 drivers/staging/rtl8192u/r819xU_phyreg.h      |   9 +-
 35 files changed, 1747 insertions(+), 1919 deletions(-)

--
2.17.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/3] drivers/staging/rtl8192u: Reformat comments
  2019-06-03 12:21 [PATCH 0/3] Fixing style errors in staging/drivers/rtl8192u Christian Müller
@ 2019-06-03 12:21 ` Christian Müller
  2019-06-03 13:04   ` Greg KH
  2019-06-03 12:21 ` [PATCH 2/3] drivers/staging/rtl8192u: Remove comment-out code Christian Müller
  2019-06-03 12:21 ` [PATCH 3/3] drivers/staging/rtl8192u: Fix of checkpatch-errors Christian Müller
  2 siblings, 1 reply; 8+ messages in thread
From: Christian Müller @ 2019-06-03 12:21 UTC (permalink / raw)
  To: gregkh
  Cc: johnfwhitmore, devel, linux-kernel, linux-kernel, felix.trommer,
	Christian Müller

From: Felix Trommer <felix.trommer@hotmail.de>

Replace C99-Style comments with C89-Style comments.

Signed-off-by: Felix Trommer <felix.trommer@hotmail.de>
Signed-off-by: Christian Müller <muellerch-privat@web.de>
---
 drivers/staging/rtl8192u/ieee80211/dot11d.c   |   6 +-
 .../staging/rtl8192u/ieee80211/ieee80211.h    | 276 ++++++++---------
 .../rtl8192u/ieee80211/ieee80211_crypt.c      |   3 +-
 .../rtl8192u/ieee80211/ieee80211_crypt.h      |  15 +-
 .../rtl8192u/ieee80211/ieee80211_crypt_ccmp.c |   6 +-
 .../rtl8192u/ieee80211/ieee80211_crypt_tkip.c |  12 +-
 .../rtl8192u/ieee80211/ieee80211_crypt_wep.c  |   9 +-
 .../rtl8192u/ieee80211/ieee80211_module.c     |   3 +-
 .../staging/rtl8192u/ieee80211/ieee80211_rx.c | 284 +++++++++++-------
 .../rtl8192u/ieee80211/ieee80211_softmac.c    | 197 ++++++------
 .../rtl8192u/ieee80211/ieee80211_softmac_wx.c |   8 +-
 .../staging/rtl8192u/ieee80211/ieee80211_tx.c | 124 ++++----
 .../staging/rtl8192u/ieee80211/ieee80211_wx.c |  45 +--
 .../staging/rtl8192u/ieee80211/rtl819x_BA.h   |   2 +-
 .../rtl8192u/ieee80211/rtl819x_BAProc.c       | 148 ++++-----
 .../staging/rtl8192u/ieee80211/rtl819x_HT.h   |  94 +++---
 .../rtl8192u/ieee80211/rtl819x_HTProc.c       | 196 ++++++------
 .../staging/rtl8192u/ieee80211/rtl819x_Qos.h  |  20 +-
 .../rtl8192u/ieee80211/rtl819x_TSProc.c       |  85 +++---
 drivers/staging/rtl8192u/r8180_93cx6.c        |   3 +-
 drivers/staging/rtl8192u/r8180_93cx6.h        |   4 +-
 drivers/staging/rtl8192u/r8190_rtl8256.c      |  33 +-
 drivers/staging/rtl8192u/r8192U.h             |  47 +--
 drivers/staging/rtl8192u/r8192U_core.c        | 154 ++++++----
 drivers/staging/rtl8192u/r8192U_dm.c          | 131 ++++----
 drivers/staging/rtl8192u/r8192U_dm.h          |  22 +-
 drivers/staging/rtl8192u/r8192U_hw.h          | 176 +++++------
 drivers/staging/rtl8192u/r8192U_wx.c          |  12 +-
 drivers/staging/rtl8192u/r819xU_cmdpkt.c      |  77 +++--
 drivers/staging/rtl8192u/r819xU_cmdpkt.h      |  14 +-
 drivers/staging/rtl8192u/r819xU_firmware.c    |   9 +-
 drivers/staging/rtl8192u/r819xU_phy.c         |  30 +-
 drivers/staging/rtl8192u/r819xU_phy.h         |   4 +-
 drivers/staging/rtl8192u/r819xU_phyreg.h      |   9 +-
 34 files changed, 1267 insertions(+), 991 deletions(-)

diff --git a/drivers/staging/rtl8192u/ieee80211/dot11d.c b/drivers/staging/rtl8192u/ieee80211/dot11d.c
index 130ddfe9868f..bbb1014007a4 100644
--- a/drivers/staging/rtl8192u/ieee80211/dot11d.c
+++ b/drivers/staging/rtl8192u/ieee80211/dot11d.c
@@ -63,14 +63,16 @@ void dot11d_update_country_ie(struct ieee80211_device *dev, u8 *pTaddr,
 	pTriple = (struct chnl_txpower_triple *)(pCoutryIe + 3);
 	for (i = 0; i < NumTriples; i++) {
 		if (MaxChnlNum >= pTriple->first_channel) {
-			/* It is not in a monotonically increasing order, so
+			/*
+			 * It is not in a monotonically increasing order, so
 			 * stop processing.
 			 */
 			netdev_err(dev->dev, "dot11d_update_country_ie(): Invalid country IE, skip it........1\n");
 			return;
 		}
 		if (MAX_CHANNEL_NUMBER < (pTriple->first_channel + pTriple->num_channels)) {
-			/* It is not a valid set of channel id, so stop
+			/*
+			 * It is not a valid set of channel id, so stop
 			 * processing.
 			 */
 			netdev_err(dev->dev, "dot11d_update_country_ie(): Invalid country IE, skip it........2\n");
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211.h b/drivers/staging/rtl8192u/ieee80211/ieee80211.h
index d36963469015..8be8a94a2253 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211.h
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211.h
@@ -54,9 +54,7 @@
 /* added for rtl819x tx procedure */
 #define MAX_QUEUE_SIZE		0x10

-//
-// 8190 queue mapping
-//
+/* 8190 queue mapping */
 #define BK_QUEUE                               0
 #define BE_QUEUE                               1
 #define VI_QUEUE                               2
@@ -70,13 +68,13 @@
 #define LOW_QUEUE                              BE_QUEUE
 #define NORMAL_QUEUE                           MGNT_QUEUE

-//added by amy for ps
+/* added by amy for ps */
 #define SWRF_TIMEOUT				50

-//added by amy for LEAP related
-#define IE_CISCO_FLAG_POSITION		0x08	// Flag byte: byte 8, numbered from 0.
-#define SUPPORT_CKIP_MIC			0x08	// bit3
-#define SUPPORT_CKIP_PK			0x10	// bit4
+/* added by amy for LEAP related */
+#define IE_CISCO_FLAG_POSITION		0x08	/* Flag byte: byte 8, numbered from 0. */
+#define SUPPORT_CKIP_MIC			0x08	/* bit3 */
+#define SUPPORT_CKIP_PK			0x10	/* bit4 */
 /* defined for skb cb field */
 /* At most 28 byte */
 struct cb_desc {
@@ -88,7 +86,7 @@ struct cb_desc {
 	u8 bEncrypt:1;
 	u8 bTxDisableRateFallBack:1;
 	u8 bTxUseDriverAssingedRate:1;
-	u8 bHwSec:1; //indicate whether use Hw security. WB
+	u8 bHwSec:1; /* indicate whether use Hw security. WB */

 	u8 reserved1;

@@ -108,17 +106,17 @@ struct cb_desc {
 	u8 bRTSUseShortGI:1;
 	u8 bMulticast:1;
 	u8 bBroadcast:1;
-	//u8 reserved2:2;
+	/* u8 reserved2:2; */
 	u8 drv_agg_enable:1;
 	u8 reserved2:1;

 	/* Tx Desc related element(12-19) */
 	u8 rata_index;
 	u8 queue_index;
-	//u8 reserved3;
-	//u8 reserved4;
+	/* u8 reserved3; */
+	/* u8 reserved4; */
 	u16 txbuf_size;
-	//u8 reserved5;
+	/* u8 reserved5; */
 	u8 RATRIndex;
 	u8 reserved6;
 	u8 reserved7;
@@ -129,9 +127,9 @@ struct cb_desc {
 	u8 rts_rate;
 	u8 ampdu_factor;
 	u8 ampdu_density;
-	//u8 reserved9;
-	//u8 reserved10;
-	//u8 reserved11;
+	/* u8 reserved9; */
+	/* u8 reserved10; */
+	/* u8 reserved11; */
 	u8 DrvAggrNum;
 	u16 pkt_size;
 	u8 reserved12;
@@ -187,15 +185,21 @@ struct cb_desc {
 #define IEEE_PARAM_PRIVACY_INVOKED		4
 #define IEEE_PARAM_AUTH_ALGS			5
 #define IEEE_PARAM_IEEE_802_1X			6
-//It should consistent with the driver_XXX.c
-//   David, 2006.9.26
+/*
+ * It should consistent with the driver_XXX.c
+ * David, 2006.9.26
+ */
 #define IEEE_PARAM_WPAX_SELECT			7
-//Added for notify the encryption type selection
-//   David, 2006.9.26
+/*
+ * Added for notify the encryption type selection
+ * David, 2006.9.26
+ */
 #define IEEE_PROTO_WPA				1
 #define IEEE_PROTO_RSN				2
-//Added for notify the encryption type selection
-//   David, 2006.9.26
+/*
+ * Added for notify the encryption type selection
+ * David, 2006.9.26
+ */
 #define IEEE_WPAX_USEGROUP			0
 #define IEEE_WPAX_WEP40				1
 #define IEEE_WPAX_TKIP				2
@@ -222,7 +226,7 @@ struct cb_desc {

 #define MAX_IE_LEN  0xff

-// added for kernel conflict
+/* added for kernel conflict */
 #define ieee80211_crypt_deinit_entries	ieee80211_crypt_deinit_entries_rsl
 #define ieee80211_crypt_deinit_handler	ieee80211_crypt_deinit_handler_rsl
 #define ieee80211_crypt_delayed_deinit	ieee80211_crypt_delayed_deinit_rsl
@@ -322,7 +326,7 @@ struct ieee_param {
 };


-// linux under 2.6.9 release may not support it, so modify it for common use
+/* linux under 2.6.9 release may not support it, so modify it for common use */
 #define IEEE80211_DATA_LEN		2304
 /* Maximum size for the MA-UNITDATA primitive, 802.11 standard section
  *   6.2.1.1.2.
@@ -354,7 +358,7 @@ struct ieee_param {
 #define IEEE80211_FCTL_FRAMETYPE	0x00fc
 #define IEEE80211_FCTL_TODS		0x0100
 #define IEEE80211_FCTL_FROMDS		0x0200
-#define IEEE80211_FCTL_DSTODS		0x0300 //added by david
+#define IEEE80211_FCTL_DSTODS		0x0300 /* added by david */
 #define IEEE80211_FCTL_MOREFRAGS	0x0400
 #define IEEE80211_FCTL_RETRY		0x0800
 #define IEEE80211_FCTL_PM		0x1000
@@ -398,7 +402,7 @@ struct ieee_param {
 #define IEEE80211_STYPE_CFACK		0x0050
 #define IEEE80211_STYPE_CFPOLL		0x0060
 #define IEEE80211_STYPE_CFACKPOLL	0x0070
-#define IEEE80211_STYPE_QOS_DATA	0x0080 //added for WMM 2006/8/2
+#define IEEE80211_STYPE_QOS_DATA	0x0080 /* added for WMM 2006/8/2 */
 #define IEEE80211_STYPE_QOS_NULL	0x00C0

 #define IEEE80211_SCTL_FRAG		0x000F
@@ -410,7 +414,7 @@ struct ieee_param {
 #define	FC_QOS_BIT					BIT(7)
 #define IsDataFrame(pdu)			(((pdu[0] & 0x0C) == 0x08) ? true : false)
 #define	IsLegacyDataFrame(pdu)	(IsDataFrame(pdu) && (!(pdu[0] & FC_QOS_BIT)))
-//added by wb. Is this right?
+/* added by wb. Is this right? */
 #define IsQoSDataFrame(pframe)  ((*(u16 *)pframe & (IEEE80211_STYPE_QOS_DATA | IEEE80211_FTYPE_DATA)) == (IEEE80211_STYPE_QOS_DATA | IEEE80211_FTYPE_DATA))
 #define Frame_Order(pframe)     (*(u16 *)pframe & IEEE80211_FCTL_ORDER)
 #define SN_LESS(a, b)		(((a - b) & 0x800) != 0)
@@ -450,8 +454,8 @@ extern u32 ieee80211_debug_level;
 #define IEEE80211_DEBUG(level, fmt, args...) \
 do { if (ieee80211_debug_level & (level)) \
   printk(KERN_DEBUG "ieee80211: " fmt, ## args); } while (0)
-//wb added to debug out data buf
-//if you want print DATA buffer related BA, please set ieee80211_debug_level to DATA|BA
+/* wb added to debug out data buf */
+/* if you want print DATA buffer related BA, please set ieee80211_debug_level to DATA|BA */
 #define IEEE80211_DEBUG_DATA(level, data, datalen)	\
 	do { if ((ieee80211_debug_level & (level)) == (level))	\
 		{	\
@@ -511,16 +515,16 @@ do { if (ieee80211_debug_level & (level)) \
 #define IEEE80211_DL_TX            (1<<8)
 #define IEEE80211_DL_RX            (1<<9)

-#define IEEE80211_DL_HT		   (1<<10)  //HT
-#define IEEE80211_DL_BA		   (1<<11)  //ba
-#define IEEE80211_DL_TS		   (1<<12)  //TS
+#define IEEE80211_DL_HT		   (1<<10)  /* HT */
+#define IEEE80211_DL_BA		   (1<<11)  /* ba */
+#define IEEE80211_DL_TS		   (1<<12)  /* TS */
 #define IEEE80211_DL_QOS           (1<<13)
 #define IEEE80211_DL_REORDER	   (1<<14)
 #define IEEE80211_DL_IOT	   (1<<15)
 #define IEEE80211_DL_IPS	   (1<<16)
-#define IEEE80211_DL_TRACE	   (1<<29)  //trace function, need to user net_ratelimit() together in order not to print too much to the screen
-#define IEEE80211_DL_DATA	   (1<<30)   //use this flag to control whether print data buf out.
-#define IEEE80211_DL_ERR	   (1<<31)   //always open
+#define IEEE80211_DL_TRACE	   (1<<29)  /* trace function, need to user net_ratelimit() together in order not to print too much to the screen */
+#define IEEE80211_DL_DATA	   (1<<30)   /* use this flag to control whether print data buf out. */
+#define IEEE80211_DL_ERR	   (1<<31)   /* always open */
 #define IEEE80211_ERROR(f, a...) printk(KERN_ERR "ieee80211: " f, ## a)
 #define IEEE80211_WARNING(f, a...) printk(KERN_WARNING "ieee80211: " f, ## a)
 #define IEEE80211_DEBUG_INFO(f, a...)   IEEE80211_DEBUG(IEEE80211_DL_INFO, f, ## a)
@@ -539,9 +543,9 @@ do { if (ieee80211_debug_level & (level)) \
 #include <linux/if_arp.h> /* ARPHRD_ETHER */

 #ifndef WIRELESS_SPY
-#define WIRELESS_SPY		// enable iwspy support
+#define WIRELESS_SPY		/* enable iwspy support */
 #endif
-#include <net/iw_handler.h>	// new driver API
+#include <net/iw_handler.h>	/* new driver API */

 #ifndef ETH_P_PAE
 #define ETH_P_PAE 0x888E /* Port Access Entity (IEEE 802.1X) */
@@ -660,7 +664,7 @@ struct ieee80211_snap_hdr {
 #define IEEE80211_OFDM_SHIFT_MASK_A         4


-/* this is stolen and modified from the madwifi driver*/
+/* this is stolen and modified from the madwifi driver */
 #define IEEE80211_FC0_TYPE_MASK		0x0c
 #define IEEE80211_FC0_TYPE_DATA		0x08
 #define IEEE80211_FC0_SUBTYPE_MASK	0xB0
@@ -700,28 +704,28 @@ struct ieee80211_rx_stats {
 	u8 nic_type;
 	u16       Length;
 	//      u8        DataRate;      // In 0.5 Mbps
-	u8        SignalQuality; // in 0-100 index.
-	s32       RecvSignalPower; // Real power in dBm for this packet, no beautification and aggregation.
-	s8        RxPower; // in dBm Translate from PWdB
-	u8        SignalStrength; // in 0-100 index.
+	u8        SignalQuality; /* in 0-100 index. */
+	s32       RecvSignalPower; /* Real power in dBm for this packet, no beautification and aggregation. */
+	s8        RxPower; /* in dBm Translate from PWdB */
+	u8        SignalStrength; /* in 0-100 index. */
 	u16       bHwError:1;
 	u16       bCRC:1;
 	u16       bICV:1;
 	u16       bShortPreamble:1;
-	u16       Antenna:1;      //for rtl8185
-	u16       Decrypted:1;    //for rtl8185, rtl8187
-	u16       Wakeup:1;       //for rtl8185
-	u16       Reserved0:1;    //for rtl8185
+	u16       Antenna:1;      /* for rtl8185 */
+	u16       Decrypted:1;    /* for rtl8185, rtl8187 */
+	u16       Wakeup:1;       /* for rtl8185 */
+	u16       Reserved0:1;    /* for rtl8185 */
 	u8        AGC;
 	u32       TimeStampLow;
 	u32       TimeStampHigh;
 	bool      bShift;
-	bool      bIsQosData;             // Added by Annie, 2005-12-22.
+	bool      bIsQosData;             /* Added by Annie, 2005-12-22. */
 	u8        UserPriority;

-	//1!!!!!!!!!!!!!!!!!!!!!!!!!!!
-	//1Attention Please!!!<11n or 8190 specific code should be put below this line>
-	//1!!!!!!!!!!!!!!!!!!!!!!!!!!!
+	/*
+	 * Attention Please!!!<11n or 8190 specific code should be put below this line>
+	 */

 	u8        RxDrvInfoSize;
 	u8        RxBufShift;
@@ -730,21 +734,21 @@ struct ieee80211_rx_stats {
 	bool      bContainHTC;
 	bool      RxIs40MHzPacket;
 	u32       RxPWDBAll;
-	u8        RxMIMOSignalStrength[4];        // in 0~100 index
+	u8        RxMIMOSignalStrength[4];        /* in 0~100 index */
 	s8        RxMIMOSignalQuality[2];
 	bool      bPacketMatchBSSID;
 	bool      bIsCCK;
 	bool      bPacketToSelf;
-	//added by amy
+	/* added by amy */
 	u8        *virtual_address;
-	u16          packetlength;              // Total packet length: Must equal to sum of all FragLength
-	u16          fraglength;                        // FragLength should equal to PacketLength in non-fragment case
-	u16          fragoffset;                        // Data offset for this fragment
+	u16          packetlength;              /* Total packet length: Must equal to sum of all FragLength */
+	u16          fraglength;                        /* FragLength should equal to PacketLength in non-fragment case */
+	u16          fragoffset;                        /* Data offset for this fragment */
 	u16          ntotalfrag;
 	bool		  bisrxaggrsubframe;
-	bool		  bPacketBeacon;	//cosa add for rssi
-	bool		  bToSelfBA;		//cosa add for rssi
-	s8		  cck_adc_pwdb[4];	//cosa add for rx path selection
+	bool		  bPacketBeacon;	/* cosa add for rssi */
+	bool		  bToSelfBA;		/* cosa add for rssi */
+	s8		  cck_adc_pwdb[4];	/* cosa add for rx path selection */
 	u16		  Seq_Num;

 };
@@ -1064,7 +1068,7 @@ typedef union _frameqos {

 #define MAX_CHANNEL_NUMBER                 161
 #define IEEE80211_SOFTMAC_SCAN_TIME	   100
-//(HZ / 2)
+/* (HZ / 2) */
 #define IEEE80211_SOFTMAC_ASSOC_RETRY_TIME (HZ * 2)

 #define CRC_LENGTH                 4U
@@ -1185,7 +1189,7 @@ static inline const char *eap_get_type(int type)
 {
 	return ((u32)type >= ARRAY_SIZE(eap_types)) ? "Unknown" : eap_types[type];
 }
-//added by amy for reorder
+/* added by amy for reorder */
 static inline u8 Frame_QoSTID(u8 *buf)
 {
 	struct rtl_80211_hdr_3addr *hdr;
@@ -1195,7 +1199,7 @@ static inline u8 Frame_QoSTID(u8 *buf)
 	return (u8)((frameqos *)(buf + (((fc & IEEE80211_FCTL_TODS) && (fc & IEEE80211_FCTL_FROMDS)) ? 30 : 24)))->field.tid;
 }

-//added by amy for reorder
+/* added by amy for reorder */

 struct eapol {
 	u8 snap[6];
@@ -1253,7 +1257,7 @@ struct ieee80211_info_element_hdr {
 */

 #define IEEE80211_DEFAULT_TX_ESSID "Penguin"
-#define IEEE80211_DEFAULT_BASIC_RATE 2 //1Mbps
+#define IEEE80211_DEFAULT_BASIC_RATE 2 /* 1Mbps */

 enum {WMM_all_frame, WMM_two_frame, WMM_four_frame, WMM_six_frame};
 #define MAX_SP_Len  (WMM_all_frame << 4)
@@ -1269,7 +1273,7 @@ enum {WMM_all_frame, WMM_two_frame, WMM_four_frame, WMM_six_frame};
 #define IEEE80211_PS_UNICAST IEEE80211_DTIM_UCAST
 #define IEEE80211_PS_MBCAST IEEE80211_DTIM_MBCAST

-//added by David for QoS 2006/6/30
+/* added by David for QoS 2006/6/30 */
 //#define WMM_Hang_8187
 #ifdef WMM_Hang_8187
 #undef WMM_Hang_8187
@@ -1285,7 +1289,7 @@ enum {WMM_all_frame, WMM_two_frame, WMM_four_frame, WMM_six_frame};

 #define MAX_RECEIVE_BUFFER_SIZE 9100

-//UP Mapping to AC, using in MgntQuery_SequenceNumber() and maybe for DSCP
+/* UP Mapping to AC, using in MgntQuery_SequenceNumber() and maybe for DSCP */
 //#define UP2AC(up)	((up<3) ? ((up==0)?1:0) : (up>>1))
 #define UP2AC(up) (		   \
 	((up) < 1) ? WME_AC_BE : \
@@ -1293,7 +1297,7 @@ enum {WMM_all_frame, WMM_two_frame, WMM_four_frame, WMM_six_frame};
 	((up) < 4) ? WME_AC_BE : \
 	((up) < 6) ? WME_AC_VI : \
 	WME_AC_VO)
-//AC Mapping to UP, using in Tx part for selecting the corresponding TX queue
+/* AC Mapping to UP, using in Tx part for selecting the corresponding TX queue */
 #define AC2UP(_ac)	(       \
 	((_ac) == WME_AC_VO) ? 6 : \
 	((_ac) == WME_AC_VI) ? 5 : \
@@ -1328,7 +1332,7 @@ struct ieee80211_network {
 	u8 bssid[ETH_ALEN];   /* u16 aligned! */
 	u8 channel;

-	// CCXv4 S59, MBSSID.
+	/* CCXv4 S59, MBSSID. */
 	bool	bMBssidValid;
 	u8	MBssid[ETH_ALEN];    /* u16 aligned! */
 	u8	MBssidMask;
@@ -1337,12 +1341,12 @@ struct ieee80211_network {
 	u8 ssid_len;
 	struct ieee80211_qos_data qos_data;

-	//added by amy for LEAP
+	/* added by amy for LEAP */
 	bool	bWithAironetIE;
 	bool	bCkipSupported;
 	bool	bCcxRmEnable;
 	u16	CcxRmState[2];
-	// CCX 2 S38, WLAN Device Version Number element. Annie, 2006-08-20.
+	/* CCX 2 S38, WLAN Device Version Number element. Annie, 2006-08-20. */
 	bool	bWithCcxVerNum;
 	u8	BssCcxVerNumber;
 	/* These are network statistics */
@@ -1371,18 +1375,18 @@ struct ieee80211_network {
 	u8  dtim_data;
 	u32 last_dtim_sta_time[2];

-	//appeded for QoS
+	/* appeded for QoS */
 	u8 wmm_info;
 	struct ieee80211_wmm_ac_param wmm_param[4];
 	u8 QoS_Enable;
 #ifdef THOMAS_TURBO
-	u8 Turbo_Enable;//enable turbo mode, added by thomas
+	u8 Turbo_Enable; /* enable turbo mode, added by thomas */
 #endif
 	u16 CountryIeLen;
 	u8 CountryIeBuf[MAX_IE_LEN];
-	// HT Related, by amy, 2008.04.29
+	/* HT Related, by amy, 2008.04.29 */
 	BSS_HT	bssht;
-	// Add to handle broadcom AP management frame CCK rate.
+	/* Add to handle broadcom AP management frame CCK rate. */
 	bool broadcom_cap_exist;
 	bool ralink_cap_exist;
 	bool atheros_cap_exist;
@@ -1391,7 +1395,7 @@ struct ieee80211_network {
 //	u8	berp_info;
 	bool	berp_info_valid;
 	bool buseprotection;
-	//put at the end of the structure.
+	/* put at the end of the structure. */
 	struct list_head list;
 };

@@ -1466,7 +1470,7 @@ struct bandwidth_autoswitch {
 };


-//added by amy for order
+/* added by amy for order */

 #define REORDER_WIN_SIZE	128
 #define REORDER_ENTRY_NUM	128
@@ -1475,18 +1479,18 @@ struct rx_reorder_entry {
 	u16			SeqNum;
 	struct ieee80211_rxb *prxb;
 };
-//added by amy for order
+/* added by amy for order */
 typedef enum _Fsync_State {
 	Default_Fsync,
 	HW_Fsync,
 	SW_Fsync
 } Fsync_State;

-// Power save mode configured.
+/* Power save mode configured. */
 typedef	enum _RT_PS_MODE {
-	eActive,	// Active/Continuous access.
-	eMaxPs,		// Max power save mode.
-	eFastPs		// Fast power save mode.
+	eActive,	/* Active/Continuous access. */
+	eMaxPs,		/* Max power save mode. */
+	eFastPs		/* Fast power save mode. */
 } RT_PS_MODE;

 typedef enum _IPS_CALLBACK_FUNCION {
@@ -1505,9 +1509,9 @@ typedef enum _RT_JOIN_ACTION {
 struct ibss_parms {
 	u16   atimWin;
 };
-#define MAX_NUM_RATES	264 // Max num of support rates element: 8,  Max num of ext. support rate: 255. 061122, by rcnjko.
+#define MAX_NUM_RATES	264 /* Max num of support rates element: 8,  Max num of ext. support rate: 255. 061122, by rcnjko. */

-// RF state.
+/* RF state. */
 typedef	enum _RT_RF_POWER_STATE {
 	eRfOn,
 	eRfSleep,
@@ -1516,9 +1520,9 @@ typedef	enum _RT_RF_POWER_STATE {

 struct rt_power_save_control {

-	//
-	// Inactive Power Save(IPS) : Disable RF when disconnected
-	//
+	/*
+	 * Inactive Power Save(IPS) : Disable RF when disconnected
+	 */
 	bool				bInactivePs;
 	bool				bIPSModeBackup;
 	bool				bSwRfProcessing;
@@ -1526,15 +1530,15 @@ struct rt_power_save_control {
 	struct work_struct	InactivePsWorkItem;
 	struct timer_list	InactivePsTimer;

-	// Return point for join action
+	/* Return point for join action */
 	IPS_CALLBACK_FUNCION	ReturnPoint;

-	// Recored Parameters for rescheduled JoinRequest
+	/* Recored Parameters for rescheduled JoinRequest */
 	bool				bTmpBssDesc;
 	RT_JOIN_ACTION		tmpJoinAction;
 	struct ieee80211_network tmpBssDesc;

-	// Recored Parameters for rescheduled MgntLinkRequest
+	/* Recored Parameters for rescheduled MgntLinkRequest */
 	bool				bTmpScanOnly;
 	bool				bTmpActiveScan;
 	bool				bTmpFilterHiddenAP;
@@ -1553,9 +1557,9 @@ struct rt_power_save_control {
 	struct ibss_parms			tmpIbpm;
 	bool				bTmpIbpm;

-	//
-	// Leisre Poswer Save : Disable RF if connected but traffic is not busy
-	//
+	/*
+	 * Leisre Poswer Save : Disable RF if connected but traffic is not busy
+	 */
 	bool				bLeisurePs;

 };
@@ -1565,7 +1569,7 @@ typedef u32 RT_RF_CHANGE_SOURCE;
 #define RF_CHANGE_BY_HW		BIT(30)
 #define RF_CHANGE_BY_PS		BIT(29)
 #define RF_CHANGE_BY_IPS	BIT(28)
-#define RF_CHANGE_BY_INIT	0	// Do not change the RFOff reason. Defined by Bruce, 2008-01-17.
+#define RF_CHANGE_BY_INIT	0	/* Do not change the RFOff reason. Defined by Bruce, 2008-01-17. */

 typedef enum {
 	COUNTRY_CODE_FCC = 0,
@@ -1587,9 +1591,9 @@ struct rt_link_detect {
 	u32				NumRecvBcnInPeriod;
 	u32				NumRecvDataInPeriod;

-	u32				RxBcnNum[RT_MAX_LD_SLOT_NUM];	// number of Rx beacon / CheckForHang_period  to determine link status
-	u32				RxDataNum[RT_MAX_LD_SLOT_NUM];	// number of Rx data / CheckForHang_period  to determine link status
-	u16				SlotNum;	// number of CheckForHang period to determine link status
+	u32				RxBcnNum[RT_MAX_LD_SLOT_NUM];	/* number of Rx beacon / CheckForHang_period  to determine link status */
+	u32				RxDataNum[RT_MAX_LD_SLOT_NUM];	/* number of Rx data / CheckForHang_period  to determine link status */
+	u16				SlotNum;	/* number of CheckForHang period to determine link status */
 	u16				SlotIndex;

 	u32				NumTxOkInPeriod;
@@ -1602,36 +1606,36 @@ struct ieee80211_device {
 	struct net_device *dev;
 	struct ieee80211_security sec;

-	//hw security related
+	/* hw security related */
 //	u8 hwsec_support; //support?
-	u8 hwsec_active;  //hw security active.
+	u8 hwsec_active;  /* hw security active. */
 	bool is_silent_reset;
 	bool ieee_up;
-	//added by amy
+	/* added by amy */
 	bool bSupportRemoteWakeUp;
-	RT_PS_MODE	dot11PowerSaveMode; // Power save mode configured.
+	RT_PS_MODE	dot11PowerSaveMode; /* Power save mode configured. */
 	bool actscanning;
 	bool beinretry;
 	RT_RF_POWER_STATE		eRFPowerState;
 	RT_RF_CHANGE_SOURCE	RfOffReason;
 	bool is_set_key;
-	//11n spec related I wonder if These info structure need to be moved out of ieee80211_device
+	/* 11n spec related I wonder if These info structure need to be moved out of ieee80211_device */

-	//11n HT below
+	/* 11n HT below */
 	PRT_HIGH_THROUGHPUT	pHTInfo;
 	//struct timer_list		SwBwTimer;
 //	spinlock_t chnlop_spinlock;
 	spinlock_t bw_spinlock;

 	spinlock_t reorder_spinlock;
-	// for HT operation rate set.  we use this one for HT data rate to separate different descriptors
-	//the way fill this is the same as in the IE
-	u8	Regdot11HTOperationalRateSet[16];		//use RATR format
-	u8	dot11HTOperationalRateSet[16];		//use RATR format
+	/* for HT operation rate set.  we use this one for HT data rate to separate different descriptors */
+	/* the way fill this is the same as in the IE */
+	u8	Regdot11HTOperationalRateSet[16];		/* use RATR format */
+	u8	dot11HTOperationalRateSet[16];		/* use RATR format */
 	u8	RegHTSuppRateSet[16];
 	u8				HTCurrentOperaRate;
 	u8				HTHighestOperaRate;
-	//wb added for rate operation mode to firmware
+	/* wb added for rate operation mode to firmware */
 	u8	bTxDisableRateFallBack;
 	u8	bTxUseDriverAssingedRate;
 	atomic_t	atm_chnlop;
@@ -1639,12 +1643,12 @@ struct ieee80211_device {
 //	u8	HTHighestOperaRate;
 //	u8	HTCurrentOperaRate;

-	// 802.11e and WMM Traffic Stream Info (TX)
+	/* 802.11e and WMM Traffic Stream Info (TX) */
 	struct list_head		Tx_TS_Admit_List;
 	struct list_head		Tx_TS_Pending_List;
 	struct list_head		Tx_TS_Unused_List;
 	struct tx_ts_record		TxTsRecord[TOTAL_TS_NUM];
-	// 802.11e and WMM Traffic Stream Info (RX)
+	/* 802.11e and WMM Traffic Stream Info (RX) */
 	struct list_head		Rx_TS_Admit_List;
 	struct list_head		Rx_TS_Pending_List;
 	struct list_head		Rx_TS_Unused_List;
@@ -1653,9 +1657,9 @@ struct ieee80211_device {
 	struct rx_reorder_entry	RxReorderEntry[128];
 	struct list_head		RxReorder_Unused_List;
 //#endif
-	// Qos related. Added by Annie, 2005-11-01.
+	/* Qos related. Added by Annie, 2005-11-01. */
 //	PSTA_QOS			pStaQos;
-	u8				ForcedPriority;		// Force per-packet priority 1~7. (default: 0, not to force it.)
+	u8				ForcedPriority;		/* Force per-packet priority 1~7. (default: 0, not to force it.) */


 	/* Bookkeeping structures */
@@ -1725,7 +1729,7 @@ struct ieee80211_device {
 			   */

 	/* Fragmentation structures */
-	// each streaming contain a entry
+	/* each streaming contain a entry */
 	struct ieee80211_frag_entry frag_cache[17][IEEE80211_FRAG_CACHE_LEN];
 	unsigned int frag_next_idx[17];
 	u16 fts; /* Fragmentation Threshold */
@@ -1767,12 +1771,12 @@ struct ieee80211_device {
 	u16 prev_seq_ctl;       /* used to drop duplicate frames */

 	/* map of allowed channels. 0 is dummy */
-	// FIXME: remember to default to a basic channel plan depending of the PHY type
+	/* FIXME: remember to default to a basic channel plan depending of the PHY type */
 	void *dot11d_info;
 	bool bGlobalDomain;
 	int rate;       /* current rate */
 	int basic_rate;
-	//FIXME: pleace callback, see if redundant with softmac_features
+	/* FIXME: pleace callback, see if redundant with softmac_features */
 	short active_scan;

 	/* this contains flags for selectively enable softmac support */
@@ -1813,8 +1817,8 @@ struct ieee80211_device {
 	short wap_set;
 	short ssid_set;

-	u8  wpax_type_set;    //{added by David, 2006.9.28}
-	u32 wpax_type_notify; //{added by David, 2006.9.26}
+	u8  wpax_type_set;    /* {added by David, 2006.9.28} */
+	u32 wpax_type_notify; /* {added by David, 2006.9.26} */

 	/* QoS related flag */
 	s8  init_wmmparam_flag;
@@ -1836,7 +1840,7 @@ struct ieee80211_device {
 	struct sk_buff *mgmt_queue_ring[MGMT_QUEUE_NUM];
 	int mgmt_queue_head;
 	int mgmt_queue_tail;
-//{ added for rtl819x
+/* { added for rtl819x */
 #define IEEE80211_QUEUE_LIMIT 128
 	u8 AsocRetryCount;
 	unsigned int hw_header;
@@ -1845,12 +1849,12 @@ struct ieee80211_device {
 	struct sk_buff_head  skb_drv_aggQ[MAX_QUEUE_SIZE];
 	u32	sta_edca_param[4];
 	bool aggregation;
-	// Enable/Disable Rx immediate BA capability.
+	/* Enable/Disable Rx immediate BA capability. */
 	bool enable_rx_imm_BA;
 	bool bibsscoordinator;

-	//+by amy for DM ,080515
-	//Dynamic Tx power for near/far range enable/Disable  , by amy , 2008-05-15
+	/* +by amy for DM ,080515 */
+	/* Dynamic Tx power for near/far range enable/Disable  , by amy , 2008-05-15 */
 	bool	bdynamic_txpower_enable;

 	bool bCTSToSelfEnable;
@@ -1861,21 +1865,21 @@ struct ieee80211_device {
 	u8	fsync_rssi_threshold;
 	bool	bfsync_enable;

-	u8	fsync_multiple_timeinterval;		// FsyncMultipleTimeInterval * FsyncTimeInterval
-	u32	fsync_firstdiff_ratethreshold;		// low threshold
-	u32	fsync_seconddiff_ratethreshold;	 // decrease threshold
+	u8	fsync_multiple_timeinterval;		/* FsyncMultipleTimeInterval * FsyncTimeInterval */
+	u32	fsync_firstdiff_ratethreshold;		/* low threshold */
+	u32	fsync_seconddiff_ratethreshold;	 /* decrease threshold */
 	Fsync_State			fsync_state;
 	bool		bis_any_nonbepkts;
-	//20Mhz 40Mhz AutoSwitch Threshold
+	/* 20Mhz 40Mhz AutoSwitch Threshold */
 	struct bandwidth_autoswitch bandwidth_auto_switch;
-	//for txpower tracking
+	/* for txpower tracking */
 	bool FwRWRF;

-	//added by amy for AP roaming
+	/* added by amy for AP roaming */
 	struct rt_link_detect LinkDetectInfo;
-	//added by amy for ps
+	/* added by amy for ps */
 	struct rt_power_save_control PowerSaveControl;
-//}
+/* } */
 	/* used if IEEE_SOFTMAC_TX_QUEUE is set */
 	struct  tx_pending tx_pending;

@@ -1891,11 +1895,11 @@ struct ieee80211_device {
 	 struct delayed_work start_ibss_wq;
 	struct work_struct wx_sync_scan_wq;
 	struct workqueue_struct *wq;
-	// Qos related. Added by Annie, 2005-11-01.
-	//STA_QOS  StaQos;
+	/* Qos related. Added by Annie, 2005-11-01. */
+	/* STA_QOS  StaQos; */

-	//u32 STA_EDCA_PARAM[4];
-	//CHANNEL_ACCESS_SETTING ChannelAccessSetting;
+	/* u32 STA_EDCA_PARAM[4]; */
+	/* CHANNEL_ACCESS_SETTING ChannelAccessSetting; */

 	struct ieee80211_rxb *stats_IndicateArray[REORDER_WIN_SIZE];

@@ -1997,7 +2001,7 @@ struct ieee80211_device {

 	/* check whether Tx hw resource available */
 	short (*check_nic_enough_desc)(struct net_device *dev, int queue_index);
-	//added by wb for HT related
+	/* added by wb for HT related */
 //	void (*SwChnlByTimerHandler)(struct net_device *dev, int channel);
 	void (*SetBWModeHandler)(struct net_device *dev, enum ht_channel_width Bandwidth, enum ht_extension_chan_offset Offset);
 //	void (*UpdateHalRATRTableHandler)(struct net_device* dev, u8* pMcsRate);
@@ -2349,8 +2353,8 @@ int ieee80211_wx_set_rts(struct ieee80211_device *ieee,
 int ieee80211_wx_get_rts(struct ieee80211_device *ieee,
 			 struct iw_request_info *info,
 			 union iwreq_data *wrqu, char *extra);
-//HT
-#define MAX_RECEIVE_BUFFER_SIZE 9100  //
+/* HT */
+#define MAX_RECEIVE_BUFFER_SIZE 9100
 void HTDebugHTCapability(u8 *CapIE, u8 *TitleString);
 void HTDebugHTInfo(u8 *InfoIE, u8 *TitleString);

@@ -2378,7 +2382,7 @@ u8 HTCCheck(struct ieee80211_device *ieee, u8 *pFrame);
 void HTResetIOTSetting(PRT_HIGH_THROUGHPUT pHTInfo);
 bool IsHTHalfNmodeAPs(struct ieee80211_device *ieee);
 u16 TxCountToDataRate(struct ieee80211_device *ieee, u8 nDataRate);
-//function in BAPROC.c
+/* function in BAPROC.c */
 int ieee80211_rx_ADDBAReq(struct ieee80211_device *ieee, struct sk_buff *skb);
 int ieee80211_rx_ADDBARsp(struct ieee80211_device *ieee, struct sk_buff *skb);
 int ieee80211_rx_DELBA(struct ieee80211_device *ieee, struct sk_buff *skb);
@@ -2390,13 +2394,13 @@ void BaSetupTimeOut(struct timer_list *t);
 void TxBaInactTimeout(struct timer_list *t);
 void RxBaInactTimeout(struct timer_list *t);
 void ResetBaEntry(struct ba_record *pBA);
-//function in TS.c
+/* function in TS.c */
 bool GetTs(
 	struct ieee80211_device		*ieee,
 	struct ts_common_info           **ppTS,
 	u8                              *Addr,
 	u8                              TID,
-	enum tr_select                  TxRxSelect,  //Rx:1, Tx:0
+	enum tr_select                  TxRxSelect,  /* Rx:1, Tx:0 */
 	bool                            bAddNewTs
 	);
 void TSInitialize(struct ieee80211_device *ieee);
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c
index 36987fccac5d..a47ba3607b78 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c
@@ -81,7 +81,8 @@ void ieee80211_crypt_delayed_deinit(struct ieee80211_device *ieee,
 	tmp = *crypt;
 	*crypt = NULL;

-	/* must not run ops->deinit() while there may be pending encrypt or
+	/*
+	 * must not run ops->deinit() while there may be pending encrypt or
 	 * decrypt operations. Use a list of delayed deinits to avoid needing
 	 * locking.
 	 */
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.h b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.h
index d3bd5598b25b..4fbc5241f7b5 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.h
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.h
@@ -24,7 +24,8 @@
 struct ieee80211_crypto_ops {
 	const char *name;

-	/* init new crypto context (e.g., allocate private data space,
+	/*
+	 * init new crypto context (e.g., allocate private data space,
 	 * select IV, etc.); returns NULL on failure or pointer to allocated
 	 * private data on success
 	 */
@@ -33,7 +34,8 @@ struct ieee80211_crypto_ops {
 	/* deinitialize crypto context and free allocated private data */
 	void (*deinit)(void *priv);

-	/* encrypt/decrypt return < 0 on error or >= 0 on success. The return
+	/*
+	 * encrypt/decrypt return < 0 on error or >= 0 on success. The return
 	 * value from decrypt_mpdu is passed as the keyidx value for
 	 * decrypt_msdu. skb must have enough head and tail room for the
 	 * encryption; if not, error will be returned; these functions are
@@ -42,7 +44,8 @@ struct ieee80211_crypto_ops {
 	int (*encrypt_mpdu)(struct sk_buff *skb, int hdr_len, void *priv);
 	int (*decrypt_mpdu)(struct sk_buff *skb, int hdr_len, void *priv);

-	/* These functions are called for full MSDUs, i.e. full frames.
+	/*
+	 * These functions are called for full MSDUs, i.e. full frames.
 	 * These can be NULL if full MSDU operations are not needed.
 	 */
 	int (*encrypt_msdu)(struct sk_buff *skb, int hdr_len, void *priv);
@@ -52,12 +55,14 @@ struct ieee80211_crypto_ops {
 	int (*set_key)(void *key, int len, u8 *seq, void *priv);
 	int (*get_key)(void *key, int len, u8 *seq, void *priv);

-	/* procfs handler for printing out key information and possible
+	/*
+	 * procfs handler for printing out key information and possible
 	 * statistics
 	 */
 	char * (*print_stats)(char *p, void *priv);

-	/* maximum number of bytes added by encryption; encrypt buf is
+	/*
+	 * maximum number of bytes added by encryption; encrypt buf is
 	 * allocated with extra_prefix_len bytes, copy of in_buf, and
 	 * extra_postfix_len; encrypt need not use all this space, but
 	 * the result must start at the beginning of the buffer and correct
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c
index d7188b3f3190..ad0b918ecf0d 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c
@@ -133,7 +133,8 @@ static void ccmp_init_blocks(struct crypto_tfm *tfm,
 		qc = *pos & 0x0f;
 		aad_len += 2;
 	}
-	/* CCM Initial Block:
+	/*
+	 * CCM Initial Block:
 	 * Flag (Include authentication header, M=3 (8-octet MIC),
 	 *       L=1 (2-octet Dlen))
 	 * Nonce: 0x00 | A2 | PN
@@ -146,7 +147,8 @@ static void ccmp_init_blocks(struct crypto_tfm *tfm,
 	b0[14] = (dlen >> 8) & 0xff;
 	b0[15] = dlen & 0xff;

-	/* AAD:
+	/*
+	 * AAD:
 	 * FC with bits 4..6 and 11..13 masked to zero; 14 is always one
 	 * A1 | A2 | A3
 	 * SC with bits 4..15 (seq#) masked to zero
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c
index 0927b2b15151..db4b640d1d8c 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c
@@ -567,11 +567,11 @@ static int ieee80211_michael_mic_add(struct sk_buff *skb, int hdr_len, void *pri

 	michael_mic_hdr(skb, tkey->tx_hdr);

-	// { david, 2006.9.1
-	// fix the wpa process with wmm enabled.
+	/* { david, 2006.9.1 */
+	/* fix the wpa process with wmm enabled. */
 	if (IEEE80211_QOS_HAS_SEQ(le16_to_cpu(hdr->frame_ctl)))
 		tkey->tx_hdr[12] = *(skb->data + hdr_len - 2) & 0x07;
-	// }
+	/* } */
 	pos = skb_put(skb, 8);

 	if (michael_mic(tkey->tx_tfm_michael, &tkey->key[16], tkey->tx_hdr,
@@ -615,11 +615,11 @@ static int ieee80211_michael_mic_verify(struct sk_buff *skb, int keyidx,
 		return -1;

 	michael_mic_hdr(skb, tkey->rx_hdr);
-	// { david, 2006.9.1
-	// fix the wpa process with wmm enabled.
+	/* { david, 2006.9.1 */
+	/* fix the wpa process with wmm enabled. */
 	if (IEEE80211_QOS_HAS_SEQ(le16_to_cpu(hdr->frame_ctl)))
 		tkey->rx_hdr[12] = *(skb->data + hdr_len - 2) & 0x07;
-	// }
+	/* } */

 	if (michael_mic(tkey->rx_tfm_michael, &tkey->key[24], tkey->rx_hdr,
 			skb->data + hdr_len, skb->len - 8 - hdr_len, mic))
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_wep.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_wep.c
index 805493a0870d..9cb386436377 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_wep.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_wep.c
@@ -72,7 +72,8 @@ static void prism2_wep_deinit(void *priv)
 	kfree(priv);
 }

-/* Perform WEP encryption on given skb that has at least 4 bytes of headroom
+/*
+ * Perform WEP encryption on given skb that has at least 4 bytes of headroom
  * for IV and 4 bytes of tailroom for ICV. Both IV and ICV will be transmitted,
  * so the payload length increases with 8 bytes.
  *
@@ -103,7 +104,8 @@ static int prism2_wep_encrypt(struct sk_buff *skb, int hdr_len, void *priv)

 	wep->iv++;

-	/* Fluhrer, Mantin, and Shamir have reported weaknesses in the key
+	/*
+	 * Fluhrer, Mantin, and Shamir have reported weaknesses in the key
 	 * scheduling algorithm of RC4. At least IVs (KeyByte + 3, 0xff, N)
 	 * can be used to speedup attacks, so avoid using them.
 	 */
@@ -150,7 +152,8 @@ static int prism2_wep_encrypt(struct sk_buff *skb, int hdr_len, void *priv)
 }


-/* Perform WEP decryption on given buffer. Buffer includes whole WEP part of
+/*
+ * Perform WEP decryption on given buffer. Buffer includes whole WEP part of
  * the frame: IV (4 bytes), encrypted payload (including SNAP header),
  * ICV (4 bytes). len includes both IV and ICV.
  *
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_module.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_module.c
index d7975aa335b2..dd7ff7e84bd0 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_module.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_module.c
@@ -158,7 +158,8 @@ struct net_device *alloc_ieee80211(int sizeof_priv)
 	if (ieee->pHTInfo == NULL) {
 		IEEE80211_DEBUG(IEEE80211_DL_ERR, "can't alloc memory for HTInfo\n");

-		/* By this point in code ieee80211_networks_allocate() has been
+		/*
+		 * By this point in code ieee80211_networks_allocate() has been
 		 * successfully called so the memory allocated should be freed
 		 */
 		ieee80211_networks_free(ieee);
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
index 0e762e559675..eebd8deb0087 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
@@ -143,8 +143,10 @@ ieee80211_frag_cache_get(struct ieee80211_device *ieee,
 		memcpy(entry->src_addr, hdr->addr2, ETH_ALEN);
 		memcpy(entry->dst_addr, hdr->addr1, ETH_ALEN);
 	} else {
-		/* received a fragment of a frame for which the head fragment
-		 * should have already been received */
+		/*
+		 * received a fragment of a frame for which the head fragment
+		 * should have already been received
+		 */
 		entry = ieee80211_frag_cache_find(ieee, seq, frag, tid,hdr->addr2,
 						  hdr->addr1);
 		if (entry) {
@@ -199,17 +201,20 @@ static int ieee80211_frag_cache_invalidate(struct ieee80211_device *ieee,



-/* ieee80211_rx_frame_mgtmt
+/*
+ * ieee80211_rx_frame_mgtmt
  *
  * Responsible for handling management control frames
  *
- * Called by ieee80211_rx */
+ * Called by ieee80211_rx
+ */
 static inline int
 ieee80211_rx_frame_mgmt(struct ieee80211_device *ieee, struct sk_buff *skb,
 			struct ieee80211_rx_stats *rx_stats, u16 type,
 			u16 stype)
 {
-	/* On the struct stats definition there is written that
+	/*
+	 * On the struct stats definition there is written that
 	 * this is not mandatory.... but seems that the probe
 	 * response parser uses it
 	 */
@@ -244,15 +249,19 @@ ieee80211_rx_frame_mgmt(struct ieee80211_device *ieee, struct sk_buff *skb,
 		if (stype == WLAN_FC_STYPE_BEACON &&
 		    ieee->iw_mode == IW_MODE_MASTER) {
 			struct sk_buff *skb2;
-			/* Process beacon frames also in kernel driver to
-			 * update STA(AP) table statistics */
+			/*
+			 * Process beacon frames also in kernel driver to
+			 * update STA(AP) table statistics
+			 */
 			skb2 = skb_clone(skb, GFP_ATOMIC);
 			if (skb2)
 				hostap_rx(skb2->dev, skb2, rx_stats);
 		}

-		/* send management frames to the user space daemon for
-		 * processing */
+		/*
+		 * send management frames to the user space daemon for
+		 * processing
+		 */
 		ieee->apdevstats.rx_packets++;
 		ieee->apdevstats.rx_bytes += skb->len;
 		prism2_rx_80211(ieee->apdev, skb, rx_stats, PRISM2_RX_MGMT);
@@ -425,18 +434,18 @@ static int is_duplicate_packet(struct ieee80211_device *ieee,
 	u8 tid;


-	//TO2DS and QoS
+	/* TO2DS and QoS */
 	if(((fc & IEEE80211_FCTL_DSTODS) == IEEE80211_FCTL_DSTODS)&&IEEE80211_QOS_HAS_SEQ(fc)) {
 	  hdr_4addrqos = (struct rtl_80211_hdr_4addrqos *)header;
 	  tid = le16_to_cpu(hdr_4addrqos->qos_ctl) & IEEE80211_QCTL_TID;
 	  tid = UP2AC(tid);
 	  tid++;
-	} else if(IEEE80211_QOS_HAS_SEQ(fc)) { //QoS
+	} else if (IEEE80211_QOS_HAS_SEQ(fc)) { /* QoS */
 	  hdr_3addrqos = (struct rtl_80211_hdr_3addrqos *)header;
 	  tid = le16_to_cpu(hdr_3addrqos->qos_ctl) & IEEE80211_QCTL_TID;
 	  tid = UP2AC(tid);
 	  tid++;
-	} else { // no QoS
+	} else { /* no QoS */
 	  tid = 0;
 	}

@@ -532,7 +541,7 @@ void ieee80211_indicate_packets(struct ieee80211_device *ieee, struct ieee80211_
 //		IEEE80211_DEBUG(IEEE80211_DL_REORDER,"%s(): hahahahhhh, We indicate packet from reorder list, index is %u\n",__func__,index);
 	for(j = 0; j<index; j++)
 	{
-//added by amy for reorder
+/* added by amy for reorder */
 		struct ieee80211_rxb *prxb = prxbIndicateArray[j];
 		for(i = 0; i<prxb->nr_subframes; i++) {
 			struct sk_buff *sub_skb = prxb->subframes[i];
@@ -543,8 +552,10 @@ void ieee80211_indicate_packets(struct ieee80211_device *ieee, struct ieee80211_
 				((memcmp(sub_skb->data, rfc1042_header, SNAP_SIZE) == 0 &&
 				  ethertype != ETH_P_AARP && ethertype != ETH_P_IPX) ||
 				 memcmp(sub_skb->data, bridge_tunnel_header, SNAP_SIZE) == 0)) {
-			/* remove RFC1042 or Bridge-Tunnel encapsulation and
-			 * replace EtherType */
+			/*
+			 * remove RFC1042 or Bridge-Tunnel encapsulation and
+			 * replace EtherType
+			 */
 				skb_pull(sub_skb, SNAP_SIZE);
 				memcpy(skb_push(sub_skb, ETH_ALEN), prxb->src, ETH_ALEN);
 				memcpy(skb_push(sub_skb, ETH_ALEN), prxb->dst, ETH_ALEN);
@@ -637,7 +648,8 @@ static void RxReorderIndicatePacket(struct ieee80211_device *ieee,
 	 * After Packet dropping and Sliding Window shifting as above, we can now just indicate the packets
 	 * with the SeqNum smaller than latest WinStart and buffer other packets.
 	 */
-	/* For Rx Reorder condition:
+	/*
+	 * For Rx Reorder condition:
 	 * 1. All packets with SeqNum smaller than WinStart => Indicate
 	 * 2. All packets with SeqNum larger than or equal to WinStart => Buffer it.
 	 */
@@ -650,7 +662,7 @@ static void RxReorderIndicatePacket(struct ieee80211_device *ieee,
 		index = 1;
 	} else {
 		/* Current packet is going to be inserted into pending list.*/
-		//IEEE80211_DEBUG(IEEE80211_DL_REORDER,"%s(): We RX no ordered packed, insert to ordered list\n",__func__);
+		/* IEEE80211_DEBUG(IEEE80211_DL_REORDER,"%s(): We RX no ordered packed, insert to ordered list\n",__func__); */
 		if(!list_empty(&ieee->RxReorder_Unused_List)) {
 			pReorderEntry = list_entry(ieee->RxReorder_Unused_List.next, struct rx_reorder_entry, List);
 			list_del_init(&pReorderEntry->List);
@@ -728,11 +740,11 @@ static void RxReorderIndicatePacket(struct ieee80211_device *ieee,

 	/* Handling pending timer. Set this timer to prevent from long time Rx buffering.*/
 	if (index>0) {
-		// Cancel previous pending timer.
+		/* Cancel previous pending timer. */
 	//	del_timer_sync(&pTS->rx_pkt_pending_timer);
 		pTS->rx_timeout_indicate_seq = 0xffff;

-		// Indicate packets
+		/* Indicate packets */
 		if(index>REORDER_WIN_SIZE){
 			IEEE80211_DEBUG(IEEE80211_DL_ERR, "RxReorderIndicatePacket(): Rx Reorder buffer full!! \n");
 			kfree(prxbIndicateArray);
@@ -742,7 +754,7 @@ static void RxReorderIndicatePacket(struct ieee80211_device *ieee,
 	}

 	if (bPktInBuf && pTS->rx_timeout_indicate_seq == 0xffff) {
-		// Set new pending timer.
+		/* Set new pending timer. */
 		IEEE80211_DEBUG(IEEE80211_DL_REORDER,"%s(): SET rx timeout timer\n", __func__);
 		pTS->rx_timeout_indicate_seq = pTS->rx_indicate_seq;
 		if(timer_pending(&pTS->rx_pkt_pending_timer))
@@ -785,7 +797,7 @@ static u8 parse_subframe(struct sk_buff *skb,
 	if (rx_stats->bContainHTC) {
 		LLCOffset += HTCLNG;
 	}
-	// Null packet, don't indicate it to upper layer
+	/* Null packet, don't indicate it to upper layer */
 	ChkLength = LLCOffset;/* + (Frame_WEP(frame)!=0 ?Adapter->MgntInfo.SecurityInfo.EncryptionHeadOverhead:0);*/

 	if (skb->len <= ChkLength)
@@ -812,7 +824,7 @@ static u8 parse_subframe(struct sk_buff *skb,
 		while(skb->len > ETHERNET_HEADER_SIZE) {
 			/* Offset 12 denote 2 mac address */
 			nSubframe_Length = *((u16 *)(skb->data + 12));
-			//==m==>change the length order
+			/* ==m==>change the length order */
 			nSubframe_Length = (nSubframe_Length>>8) + (nSubframe_Length<<8);

 			if (skb->len<(ETHERNET_HEADER_SIZE + nSubframe_Length)) {
@@ -869,9 +881,11 @@ static u8 parse_subframe(struct sk_buff *skb,
 	}
 }

-/* All received frames are sent to this function. @skb contains the frame in
+/*
+ * All received frames are sent to this function. @skb contains the frame in
  * IEEE 802.11 format, i.e., in the format it was sent over air.
- * This function is called only as a tasklet (software IRQ). */
+ * This function is called only as a tasklet (software IRQ).
+ */
 int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
 		 struct ieee80211_rx_stats *rx_stats)
 {
@@ -884,12 +898,12 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
 	struct net_device_stats *stats;
 	unsigned int frag;
 	u16 ethertype;
-	//added by amy for reorder
+	/* added by amy for reorder */
 	u8	TID = 0;
 	u16	SeqNum = 0;
 	struct rx_ts_record *pTS = NULL;
 	//bool bIsAggregateFrame = false;
-	//added by amy for reorder
+	/* added by amy for reorder */
 #ifdef NOT_YET
 	struct net_device *wds = NULL;
 	struct net_device *wds = NULL;
@@ -905,7 +919,7 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,

 	int i;
 	struct ieee80211_rxb *rxb = NULL;
-	// cheat the hdr type
+	/* cheat the hdr type */
 	hdr = (struct rtl_80211_hdr_4addr *)skb->data;
 	stats = &ieee->stats;

@@ -933,8 +947,10 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,

 	//IEEE80211_DEBUG_DATA(IEEE80211_DL_DATA, skb->data, skb->len);
 #ifdef NOT_YET
-	/* Put this code here so that we avoid duplicating it in all
-	 * Rx paths. - Jean II */
+	/*
+	 * Put this code here so that we avoid duplicating it in all
+	 * Rx paths. - Jean II
+	 */
 #ifdef IW_WIRELESS_SPY		/* defined in iw_handler.h */
 	/* If spy monitoring on */
 	if (iface->spy_data.spy_number > 0) {
@@ -964,28 +980,34 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
 #ifdef NOT_YET
 		sta = NULL;

-		/* Use station specific key to override default keys if the
+		/*
+		 * Use station specific key to override default keys if the
 		 * receiver address is a unicast address ("individual RA"). If
 		 * bcrx_sta_key parameter is set, station specific key is used
 		 * even with broad/multicast targets (this is against IEEE
 		 * 802.11, but makes it easier to use different keys with
-		 * stations that do not support WEP key mapping). */
+		 * stations that do not support WEP key mapping).
+		 */

 		if (!(hdr->addr1[0] & 0x01) || local->bcrx_sta_key)
 			(void) hostap_handle_sta_crypto(local, hdr, &crypt,
 							&sta);
 #endif

-		/* allow NULL decrypt to indicate an station specific override
-		 * for default encryption */
+		/*
+		 * allow NULL decrypt to indicate an station specific override
+		 * for default encryption
+		 */
 		if (crypt && (!crypt->ops || !crypt->ops->decrypt_mpdu))
 			crypt = NULL;

 		if (!crypt && (fc & IEEE80211_FCTL_WEP)) {
-			/* This seems to be triggered by some (multicast?)
+			/*
+			 * This seems to be triggered by some (multicast?)
 			 * frames from other than current BSS, so just drop the
 			 * frames silently instead of filling system log with
-			 * these reports. */
+			 * these reports.
+			 */
 			IEEE80211_DEBUG_DROP("Decryption failed (not set)"
 					     " (SA=%pM)\n",
 					     hdr->addr2);
@@ -997,7 +1019,7 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
 	if (skb->len < IEEE80211_DATA_HDR3_LEN)
 		goto rx_dropped;

-	// if QoS enabled, should check the sequence for each of the AC
+	/* if QoS enabled, should check the sequence for each of the AC */
 	if ((!ieee->pHTInfo->bCurRxReorderEnable) || !ieee->current_network.qos_data.active|| !IsDataFrame(skb->data) || IsLegacyDataFrame(skb->data)) {
 		if (is_duplicate_packet(ieee, hdr))
 		goto rx_dropped;
@@ -1104,13 +1126,15 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
 	}
 #endif
 	//IEEE80211_DEBUG_DATA(IEEE80211_DL_DATA, skb->data, skb->len);
-	/* Nullfunc frames may have PS-bit set, so they must be passed to
-	 * hostap_handle_sta_rx() before being dropped here. */
+	/*
+	 * Nullfunc frames may have PS-bit set, so they must be passed to
+	 * hostap_handle_sta_rx() before being dropped here.
+	 */
 	if (stype != IEEE80211_STYPE_DATA &&
 	    stype != IEEE80211_STYPE_DATA_CFACK &&
 	    stype != IEEE80211_STYPE_DATA_CFPOLL &&
 	    stype != IEEE80211_STYPE_DATA_CFACKPOLL&&
-	    stype != IEEE80211_STYPE_QOS_DATA//add by David,2006.8.4
+	    stype != IEEE80211_STYPE_QOS_DATA/* add by David,2006.8.4 */
 	    ) {
 		if (stype != IEEE80211_STYPE_NULLFUNC)
 			IEEE80211_DEBUG_DROP(
@@ -1136,7 +1160,7 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
 	hdr = (struct rtl_80211_hdr_4addr *) skb->data;

 	/* skb: hdr + (possibly fragmented) plaintext payload */
-	// PR: FIXME: hostap has additional conditions in the "if" below:
+	/* PR: FIXME: hostap has additional conditions in the "if" below: */
 	// ieee->host_decrypt && (fc & IEEE80211_FCTL_WEP) &&
 	if ((frag != 0 || (fc & IEEE80211_FCTL_MOREFRAGS))) {
 		int flen;
@@ -1164,33 +1188,43 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
 		}

 		if (frag == 0) {
-			/* copy first fragment (including full headers) into
-			 * beginning of the fragment cache skb */
+			/*
+			 * copy first fragment (including full headers) into
+			 * beginning of the fragment cache skb
+			 */
 			skb_put_data(frag_skb, skb->data, flen);
 		} else {
-			/* append frame payload to the end of the fragment
-			 * cache skb */
+			/*
+			 * append frame payload to the end of the fragment
+			 * cache skb
+			 */
 			skb_put_data(frag_skb, skb->data + hdrlen, flen);
 		}
 		dev_kfree_skb_any(skb);
 		skb = NULL;

 		if (fc & IEEE80211_FCTL_MOREFRAGS) {
-			/* more fragments expected - leave the skb in fragment
+			/*
+			 * more fragments expected - leave the skb in fragment
 			 * cache for now; it will be delivered to upper layers
-			 * after all fragments have been received */
+			 * after all fragments have been received
+			 */
 			goto rx_exit;
 		}

-		/* this was the last fragment and the frame will be
-		 * delivered, so remove skb from fragment cache */
+		/*
+		 * this was the last fragment and the frame will be
+		 * delivered, so remove skb from fragment cache
+		 */
 		skb = frag_skb;
 		hdr = (struct rtl_80211_hdr_4addr *) skb->data;
 		ieee80211_frag_cache_invalidate(ieee, hdr);
 	}

-	/* skb: hdr + (possible reassembled) full MSDU payload; possibly still
-	 * encrypted/authenticated */
+	/*
+	 * skb: hdr + (possible reassembled) full MSDU payload; possibly still
+	 * encrypted/authenticated
+	 */
 	if (ieee->host_decrypt && (fc & IEEE80211_FCTL_WEP) &&
 	    ieee80211_rx_frame_decrypt_msdu(ieee, skb, keyidx, crypt))
 	{
@@ -1198,7 +1232,7 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
 		goto rx_dropped;
 	}

-	//added by amy for AP roaming
+	/* added by amy for AP roaming */
 	ieee->LinkDetectInfo.NumRecvDataInPeriod++;
 	ieee->LinkDetectInfo.NumRxOkInPeriod++;

@@ -1208,8 +1242,10 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
 		    ieee80211_is_eapol_frame(ieee, skb, hdrlen)) {

 #ifdef CONFIG_IEEE80211_DEBUG
-			/* pass unencrypted EAPOL frames even if encryption is
-			 * configured */
+			/*
+			 * pass unencrypted EAPOL frames even if encryption is
+			 * configured
+			 */
 			struct eapol *eap = (struct eapol *)(skb->data +
 				24);
 			IEEE80211_DEBUG_EAP("RX: IEEE 802.1X EAPOL frame: %s\n",
@@ -1248,7 +1284,7 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
 		printk(KERN_WARNING "RX: IEEE802.1X EPAOL frame!\n");
 	}
 */
-//added by amy for reorder
+/* added by amy for reorder */
 	if (ieee->current_network.qos_data.active && IsQoSDataFrame(skb->data)
 		&& !is_multicast_ether_addr(hdr->addr1))
 	{
@@ -1260,7 +1296,7 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
 			ieee->bis_any_nonbepkts = true;
 		}
 	}
-//added by amy for reorder
+/* added by amy for reorder */
 	/* skb: hdr + (possible reassembled) full plaintext payload */
 	//ethertype = (payload[6] << 8) | payload[7];
 	rxb = kmalloc(sizeof(struct ieee80211_rxb), GFP_ATOMIC);
@@ -1278,9 +1314,9 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
 		goto rx_dropped;
 	}

-//added by amy for reorder
+/* added by amy for reorder */
 	if (!ieee->pHTInfo->bCurRxReorderEnable || !pTS) {
-//added by amy for reorder
+/* added by amy for reorder */
 		for(i = 0; i<rxb->nr_subframes; i++) {
 			struct sk_buff *sub_skb = rxb->subframes[i];

@@ -1291,8 +1327,10 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
 						((memcmp(sub_skb->data, rfc1042_header, SNAP_SIZE) == 0 &&
 						  ethertype != ETH_P_AARP && ethertype != ETH_P_IPX) ||
 						 memcmp(sub_skb->data, bridge_tunnel_header, SNAP_SIZE) == 0)) {
-					/* remove RFC1042 or Bridge-Tunnel encapsulation and
-					 * replace EtherType */
+					/*
+					 * remove RFC1042 or Bridge-Tunnel encapsulation and
+					 * replace EtherType
+					 */
 					skb_pull(sub_skb, SNAP_SIZE);
 					memcpy(skb_push(sub_skb, ETH_ALEN), src, ETH_ALEN);
 					memcpy(skb_push(sub_skb, ETH_ALEN), dst, ETH_ALEN);
@@ -1346,9 +1384,11 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
 	rxb = NULL;
 	stats->rx_dropped++;

-	/* Returning 0 indicates to caller that we have not handled the SKB--
+	/*
+	 * Returning 0 indicates to caller that we have not handled the SKB--
 	 * so it is still allocated and can be used again by underlying
-	 * hardware as a DMA target */
+	 * hardware as a DMA target
+	 */
 	return 0;
 }
 EXPORT_SYMBOL(ieee80211_rx);
@@ -1574,11 +1614,11 @@ static inline void ieee80211_extract_country_ie(
 			}
 		}

-		//
-		// 070305, rcnjko: I update country IE watch dog here because
-		// some AP (e.g. Cisco 1242) don't include country IE in their
-		// probe response frame.
-		//
+		/*
+		 * 070305, rcnjko: I update country IE watch dog here because
+		 * some AP (e.g. Cisco 1242) don't include country IE in their
+		 * probe response frame.
+		 */
 		if (IS_EQUAL_CIE_SRC(ieee, addr2) )
 		{
 			UPDATE_CIE_WATCHDOG(ieee);
@@ -1613,9 +1653,11 @@ int ieee80211_parse_info_param(struct ieee80211_device *ieee,
 					     info_element->len +
 					     sizeof(*info_element),
 					     length, info_element->id);
-			/* We stop processing but don't return an error here
+			/*
+			 * We stop processing but don't return an error here
 			 * because some misbehaviour APs break this rule. ie.
-			 * Orinoco AP1000. */
+			 * Orinoco AP1000.
+			 */
 			break;
 		}

@@ -1789,7 +1831,7 @@ int ieee80211_parse_info_param(struct ieee80211_device *ieee,
 			}
 #endif

-			//for HTcap and HTinfo parameters
+			/* for HTcap and HTinfo parameters */
 			if(tmp_htcap_len == 0){
 				if(info_element->len >= 4 &&
 				   info_element->data[0] == 0x00 &&
@@ -1883,7 +1925,7 @@ int ieee80211_parse_info_param(struct ieee80211_device *ieee,
 			}
 			else
 				network->ralink_cap_exist = false;
-			//added by amy for atheros AP
+			/* added by amy for atheros AP */
 			if((info_element->len >= 3 &&
 				info_element->data[0] == 0x00 &&
 				info_element->data[1] == 0x03 &&
@@ -1908,7 +1950,7 @@ int ieee80211_parse_info_param(struct ieee80211_device *ieee,
 			}
 			else
 				network->cisco_cap_exist = false;
-			//added by amy for LEAP of cisco
+			/* added by amy for LEAP of cisco */
 			if (info_element->len > 4 &&
 				info_element->data[0] == 0x00 &&
 				info_element->data[1] == 0x40 &&
@@ -1924,9 +1966,9 @@ int ieee80211_parse_info_param(struct ieee80211_device *ieee,
 					}
 					else
 						network->bCcxRmEnable = false;
-					//
-					// CCXv4 Table 59-1 MBSSID Masks.
-					//
+					/*
+					 * CCXv4 Table 59-1 MBSSID Masks.
+					 */
 					network->MBssidMask = network->CcxRmState[1] & 0x07;
 					if(network->MBssidMask != 0)
 					{
@@ -1973,7 +2015,7 @@ int ieee80211_parse_info_param(struct ieee80211_device *ieee,
 			       network->rsn_ie_len);
 			break;

-			//HT related element.
+			/* HT related element. */
 		case MFIE_TYPE_HT_CAP:
 			IEEE80211_DEBUG_SCAN("MFIE_TYPE_HT_CAP: %d bytes\n",
 					     info_element->len);
@@ -1984,9 +2026,11 @@ int ieee80211_parse_info_param(struct ieee80211_device *ieee,
 					sizeof(network->bssht.bdHTCapBuf):tmp_htcap_len;
 				memcpy(network->bssht.bdHTCapBuf,info_element->data,network->bssht.bdHTCapLen);

-				//If peer is HT, but not WMM, call QosSetLegacyWMMParamWithHT()
-				// windows driver will update WMM parameters each beacon received once connected
-				// Linux driver is a bit different.
+				/*
+				 * If peer is HT, but not WMM, call QosSetLegacyWMMParamWithHT()
+				 * windows driver will update WMM parameters each beacon received once connected
+				 * Linux driver is a bit different.
+				 */
 				network->bssht.bdSupportHT = true;
 			}
 			else
@@ -2013,9 +2057,11 @@ int ieee80211_parse_info_param(struct ieee80211_device *ieee,
 			{
 				network->bWithAironetIE = true;

-				// CCX 1 spec v1.13, A01.1 CKIP Negotiation (page23):
-				// "A Cisco access point advertises support for CKIP in beacon and probe response packets,
-				//  by adding an Aironet element and setting one or both of the CKIP negotiation bits."
+				/*
+				 * CCX 1 spec v1.13, A01.1 CKIP Negotiation (page23):
+				 * "A Cisco access point advertises support for CKIP in beacon and probe response packets,
+				 * by adding an Aironet element and setting one or both of the CKIP negotiation bits."
+				 */
 				if(	(info_element->data[IE_CISCO_FLAG_POSITION]&SUPPORT_CKIP_MIC)	||
 					(info_element->data[IE_CISCO_FLAG_POSITION]&SUPPORT_CKIP_PK)	)
 				{
@@ -2040,7 +2086,7 @@ int ieee80211_parse_info_param(struct ieee80211_device *ieee,
 		case MFIE_TYPE_COUNTRY:
 			IEEE80211_DEBUG_SCAN("MFIE_TYPE_COUNTRY: %d bytes\n",
 					     info_element->len);
-			ieee80211_extract_country_ie(ieee, info_element, network, network->bssid);//addr2 is same as addr3 when from an AP
+			ieee80211_extract_country_ie(ieee, info_element, network, network->bssid);/* addr2 is same as addr3 when from an AP */
 			break;
 /* TODO */
 		default:
@@ -2075,7 +2121,7 @@ static inline u8 ieee80211_SignalStrengthTranslate(
 {
 	u8 RetSS;

-	// Step 1. Scale mapping.
+	/* Step 1. Scale mapping. */
 	if(CurrSS >= 71 && CurrSS <= 100)
 	{
 		RetSS = 90 + ((CurrSS - 70) / 3);
@@ -2118,7 +2164,7 @@ static inline u8 ieee80211_SignalStrengthTranslate(
 	}
 	//RT_TRACE(COMP_DBG, DBG_LOUD, ("##### After Mapping:  LastSS: %d, CurrSS: %d, RetSS: %d\n", LastSS, CurrSS, RetSS));

-	// Step 2. Smoothing.
+	/* Step 2. Smoothing. */

 	//RT_TRACE(COMP_DBG, DBG_LOUD, ("$$$$$ After Smoothing:  LastSS: %d, CurrSS: %d, RetSS: %d\n", LastSS, CurrSS, RetSS));

@@ -2128,9 +2174,9 @@ static inline u8 ieee80211_SignalStrengthTranslate(
 /* 0-100 index */
 static long ieee80211_translate_todbm(u8 signal_strength_index)
 {
-	long	signal_power; // in dBm.
+	long	signal_power; /* in dBm. */

-	// Translate to dBm (x=0.5y-95).
+	/* Translate to dBm (x=0.5y-95). */
 	signal_power = (long)((signal_strength_index + 1) >> 1);
 	signal_power -= 95;

@@ -2180,7 +2226,7 @@ static inline int ieee80211_network_init(
 #endif
 	network->CountryIeLen = 0;
 	memset(network->CountryIeBuf, 0, MAX_IE_LEN);
-//Initialize HT parameters
+/* Initialize HT parameters */
 	//ieee80211_ht_initialize(&network->bssht);
 	HTInitializeBssDesc(&network->bssht);
 	if (stats->freq == IEEE80211_52GHZ_BAND) {
@@ -2236,10 +2282,12 @@ static inline int ieee80211_network_init(
 static inline int is_same_network(struct ieee80211_network *src,
 				  struct ieee80211_network *dst, struct ieee80211_device *ieee)
 {
-	/* A network is only a duplicate if the channel, BSSID, ESSID
+	/*
+	 * A network is only a duplicate if the channel, BSSID, ESSID
 	 * and the capability field (in particular IBSS and BSS) all match.
 	 * We treat all <hidden> with the same BSSID and channel
-	 * as one network */
+	 * as one network
+	 */
 	return //((src->ssid_len == dst->ssid_len) &&
 		(((src->ssid_len == dst->ssid_len) || (ieee->iw_mode == IW_MODE_INFRA)) &&
 		(src->channel == dst->channel) &&
@@ -2334,7 +2382,7 @@ static inline void update_network(struct ieee80211_network *dst,
 	dst->qos_data.old_param_count = old_param;

 	/* dst->last_associate is not overwritten */
-	dst->wmm_info = src->wmm_info; //sure to exist in beacon or probe response frame.
+	dst->wmm_info = src->wmm_info; /* sure to exist in beacon or probe response frame. */
 	if (src->wmm_param[0].aci_aifsn|| \
 	   src->wmm_param[1].aci_aifsn|| \
 	   src->wmm_param[2].aci_aifsn|| \
@@ -2349,7 +2397,7 @@ static inline void update_network(struct ieee80211_network *dst,
 	dst->CountryIeLen = src->CountryIeLen;
 	memcpy(dst->CountryIeBuf, src->CountryIeBuf, src->CountryIeLen);

-	//added by amy for LEAP
+	/* added by amy for LEAP */
 	dst->bWithAironetIE = src->bWithAironetIE;
 	dst->bCkipSupported = src->bCkipSupported;
 	memcpy(dst->CcxRmState, src->CcxRmState, 2);
@@ -2420,12 +2468,14 @@ static inline void ieee80211_process_probe_response(
 		goto out;
 	}

-	// For Asus EeePc request,
-	// (1) if wireless adapter receive get any 802.11d country code in AP beacon,
-	//	   wireless adapter should follow the country code.
-	// (2)  If there is no any country code in beacon,
-	//       then wireless adapter should do active scan from ch1~11 and
-	//       passive scan from ch12~14
+	/*
+	 * For Asus EeePc request,
+	 * (1) if wireless adapter receive get any 802.11d country code in AP beacon,
+	 * wireless adapter should follow the country code.
+	 * (2)  If there is no any country code in beacon,
+	 * then wireless adapter should do active scan from ch1~11 and
+	 * passive scan from ch12~14
+	 */

 	if (!is_legal_channel(ieee, network->channel))
 		goto out;
@@ -2433,7 +2483,7 @@ static inline void ieee80211_process_probe_response(
 	{
 		if (fc == IEEE80211_STYPE_PROBE_RESP)
 		{
-			// Case 1: Country code
+			/* Case 1: Country code */
 			if(IS_COUNTRY_IE_VALID(ieee) )
 			{
 				if (!is_legal_channel(ieee, network->channel)) {
@@ -2441,10 +2491,10 @@ static inline void ieee80211_process_probe_response(
 					goto out;
 				}
 			}
-			// Case 2: No any country code.
+			/* Case 2: No any country code. */
 			else
 			{
-				// Filter over channel ch12~14
+				/* Filter over channel ch12~14 */
 				if (network->channel > 11)
 				{
 					printk("GetScanInfo(): For Global Domain, filter probe response at channel(%d).\n", network->channel);
@@ -2454,7 +2504,7 @@ static inline void ieee80211_process_probe_response(
 		}
 		else
 		{
-			// Case 1: Country code
+			/* Case 1: Country code */
 			if(IS_COUNTRY_IE_VALID(ieee) )
 			{
 				if (!is_legal_channel(ieee, network->channel)) {
@@ -2462,10 +2512,10 @@ static inline void ieee80211_process_probe_response(
 					goto out;
 				}
 			}
-			// Case 2: No any country code.
+			/* Case 2: No any country code. */
 			else
 			{
-				// Filter over channel ch12~14
+				/* Filter over channel ch12~14 */
 				if (network->channel > 14)
 				{
 					printk("GetScanInfo(): For Global Domain, filter beacon at channel(%d).\n",network->channel);
@@ -2475,15 +2525,19 @@ static inline void ieee80211_process_probe_response(
 		}
 	}

-	/* The network parsed correctly -- so now we scan our known networks
+	/*
+	 * The network parsed correctly -- so now we scan our known networks
 	 * to see if we can find it in our list.
 	 *
 	 * NOTE:  This search is definitely not optimized.  Once its doing
 	 *        the "right thing" we'll optimize it for efficiency if
-	 *        necessary */
+	 *        necessary
+	 */

-	/* Search for this entry in the list and update it if it is
-	 * already there. */
+	/*
+	 * Search for this entry in the list and update it if it is
+	 * already there.
+	 */

 	spin_lock_irqsave(&ieee->lock, flags);

@@ -2500,8 +2554,7 @@ static inline void ieee80211_process_probe_response(
 		{
 			if(ieee->state == IEEE80211_LINKED)
 				ieee->LinkDetectInfo.NumRecvBcnInPeriod++;
-		}
-		else //hidden AP
+		} else /* hidden AP */
 			network->flags = (~NETWORK_EMPTY_ESSID & network->flags)|(NETWORK_EMPTY_ESSID & ieee->current_network.flags);
 	}

@@ -2513,8 +2566,10 @@ static inline void ieee80211_process_probe_response(
 			oldest = target;
 	}

-	/* If we didn't find a match, then get a new network slot to initialize
-	 * with this beacon's information */
+	/*
+	 * If we didn't find a match, then get a new network slot to initialize
+	 * with this beacon's information
+	 */
 	if (&target->list == &ieee->network_list) {
 		if (list_empty(&ieee->network_free_list)) {
 			/* If there are no more slots, expire the oldest */
@@ -2553,12 +2608,13 @@ static inline void ieee80211_process_probe_response(
 				     fc == IEEE80211_STYPE_PROBE_RESP ?
 				     "PROBE RESPONSE" : "BEACON");

-		/* we have an entry and we are going to update it. But this entry may
+		/*
+		 * we have an entry and we are going to update it. But this entry may
 		 * be already expired. In this case we do the same as we found a new
 		 * net and call the new_net handler
 		 */
 		renew = !time_after(target->last_scanned + ieee->scan_age, jiffies);
-		//YJ,add,080819,for hidden ap
+		/* YJ,add,080819,for hidden ap */
 		if(is_beacon(beacon->header.frame_ctl) == 0)
 			network->flags = (~NETWORK_EMPTY_ESSID & network->flags)|(NETWORK_EMPTY_ESSID & target->flags);
 		//if(strncmp(network->ssid, "linksys-c",9) == 0)
@@ -2567,7 +2623,7 @@ static inline void ieee80211_process_probe_response(
 		    && (((network->ssid_len > 0) && (strncmp(target->ssid, network->ssid, network->ssid_len)))\
 		    ||((ieee->current_network.ssid_len == network->ssid_len)&&(strncmp(ieee->current_network.ssid, network->ssid, network->ssid_len) == 0)&&(ieee->state == IEEE80211_NOLINK))))
 			renew = 1;
-		//YJ,add,080819,for hidden ap,end
+		/* YJ,add,080819,for hidden ap,end */

 		update_network(target, network);
 		if(renew && (ieee->softmac_features & IEEE_SOFTMAC_ASSOCIATE))
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
index 944c8894f9ff..27e81a1de51e 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
@@ -33,7 +33,8 @@ short ieee80211_is_shortslot(const struct ieee80211_network *net)
 }
 EXPORT_SYMBOL(ieee80211_is_shortslot);

-/* returns the total length needed for pleacing the RATE MFIE
+/*
+ * returns the total length needed for pleacing the RATE MFIE
  * tag and the EXTENDED RATE MFIE tag if needed.
  * It encludes two bytes per tag for the tag itself and its len
  */
@@ -50,7 +51,8 @@ static unsigned int ieee80211_MFIE_rate_len(struct ieee80211_device *ieee)
 	return rate_len;
 }

-/* pleace the MFIE rate, tag to the memory (double) poined.
+/*
+ * pleace the MFIE rate, tag to the memory (double) poined.
  * Then it updates the pointer so that
  * it points after the new MFIE tag added.
  */
@@ -263,9 +265,10 @@ inline void softmac_mgmt_xmit(struct sk_buff *skb, struct ieee80211_device *ieee
 		    (skb_queue_len(&ieee->skb_waitQ[tcb_desc->queue_index]) != 0) || \
 		    (ieee->queue_stop)) {
 			/* insert the skb packet to the management queue */
-			/* as for the completion function, it does not need
+			/*
+			 * as for the completion function, it does not need
 			 * to check it any more.
-			 * */
+			 */
 			printk("%s():insert to waitqueue!\n", __func__);
 			skb_queue_tail(&ieee->skb_waitQ[tcb_desc->queue_index], skb);
 		} else {
@@ -405,7 +408,8 @@ static void ieee80211_send_probe_requests(struct ieee80211_device *ieee)
 	}
 }

-/* this performs syncro scan blocking the caller until all channels
+/*
+ * this performs syncro scan blocking the caller until all channels
  * in the allowed channel map has been checked.
  */
 void ieee80211_softmac_scan_syncro(struct ieee80211_device *ieee)
@@ -423,7 +427,8 @@ void ieee80211_softmac_scan_syncro(struct ieee80211_device *ieee)
 				goto out; /* scan completed */
 		} while (!channel_map[ch]);

-		/* this function can be called in two situations
+		/*
+		 * this function can be called in two situations
 		 * 1- We have switched to ad-hoc mode and we are
 		 *    performing a complete syncro scan before conclude
 		 *    there are no interesting cell and to create a
@@ -448,7 +453,8 @@ void ieee80211_softmac_scan_syncro(struct ieee80211_device *ieee)
 		if (channel_map[ch] == 1)
 			ieee80211_send_probe_requests(ieee);

-		/* this prevent excessive time wait when we
+		/*
+		 * this prevent excessive time wait when we
 		 * need to wait for a syncro scan to end..
 		 */
 		if (ieee->state >= IEEE80211_LINKED && ieee->sync_scan_hurryup)
@@ -712,7 +718,7 @@ static struct sk_buff *ieee80211_probe_resp(struct ieee80211_device *ieee, u8 *d
 //	printk("===============>tmp_ht_cap_len is %d,tmp_ht_info_len is %d, tmp_generic_ie_len is %d\n",tmp_ht_cap_len,tmp_ht_info_len,tmp_generic_ie_len);
 	beacon_size = sizeof(struct ieee80211_probe_response) + 2
 		+ ssid_len
-		+ 3 //channel
+		+ 3 /* channel */
 		+ rate_len
 		+ rate_ex_len
 		+ atim_len
@@ -789,7 +795,7 @@ static struct sk_buff *ieee80211_probe_resp(struct ieee80211_device *ieee, u8 *d

 	if (wpa_ie_len) {
 		if (ieee->iw_mode == IW_MODE_ADHOC) {
-			//as Windows will set pairwise key same as the group key which is not allowed in Linux, so set this for IOT issue. WB 2008.07.07
+			/* as Windows will set pairwise key same as the group key which is not allowed in Linux, so set this for IOT issue. WB 2008.07.07 */
 			memcpy(&ieee->wpa_ie[14], &ieee->wpa_ie[8], 4);
 		}
 		memcpy(tag, ieee->wpa_ie, ieee->wpa_ie_len);
@@ -946,7 +952,7 @@ ieee80211_association_req(struct ieee80211_network *beacon,
 	//u16 suite_count = 0;
 	//u8 suit_select = 0;
 	//unsigned int wpa_len = beacon->wpa_ie_len;
-	//for HT
+	/* for HT */
 	u8 *ht_cap_buf = NULL;
 	u8 ht_cap_len = 0;
 	u8 *realtek_ie_buf = NULL;
@@ -1033,18 +1039,18 @@ ieee80211_association_req(struct ieee80211_network *beacon,
 	memcpy(hdr->header.addr2, ieee->dev->dev_addr, ETH_ALEN);
 	memcpy(hdr->header.addr3, beacon->bssid, ETH_ALEN);

-	memcpy(ieee->ap_mac_addr, beacon->bssid, ETH_ALEN);//for HW security, John
+	memcpy(ieee->ap_mac_addr, beacon->bssid, ETH_ALEN);/* for HW security, John */

 	hdr->capability = cpu_to_le16(WLAN_CAPABILITY_BSS);
 	if (beacon->capability & WLAN_CAPABILITY_PRIVACY)
 		hdr->capability |= cpu_to_le16(WLAN_CAPABILITY_PRIVACY);

 	if (beacon->capability & WLAN_CAPABILITY_SHORT_PREAMBLE)
-		hdr->capability |= cpu_to_le16(WLAN_CAPABILITY_SHORT_PREAMBLE); //add short_preamble here
+		hdr->capability |= cpu_to_le16(WLAN_CAPABILITY_SHORT_PREAMBLE); /* add short_preamble here */

 	if (ieee->short_slot)
 		hdr->capability |= cpu_to_le16(WLAN_CAPABILITY_SHORT_SLOT);
-	if (wmm_info_len) //QOS
+	if (wmm_info_len) /* QOS */
 		hdr->capability |= cpu_to_le16(WLAN_CAPABILITY_QOS);

 	hdr->listen_interval = cpu_to_le16(0xa);
@@ -1058,24 +1064,26 @@ ieee80211_association_req(struct ieee80211_network *beacon,

 	ieee80211_MFIE_Brate(ieee, &tag);
 	ieee80211_MFIE_Grate(ieee, &tag);
-	// For CCX 1 S13, CKIP. Added by Annie, 2006-08-14.
+	/* For CCX 1 S13, CKIP. Added by Annie, 2006-08-14. */
 	if (beacon->bCkipSupported) {
-		static u8	AironetIeOui[] = {0x00, 0x01, 0x66}; // "4500-client"
+		static u8	AironetIeOui[] = {0x00, 0x01, 0x66}; /* "4500-client" */
 		u8	CcxAironetBuf[30];
 		struct octet_string	osCcxAironetIE;

 		memset(CcxAironetBuf, 0, 30);
 		osCcxAironetIE.octet = CcxAironetBuf;
 		osCcxAironetIE.length = sizeof(CcxAironetBuf);
-		//
-		// Ref. CCX test plan v3.61, 3.2.3.1 step 13.
-		// We want to make the device type as "4500-client". 060926, by CCW.
-		//
+		/*
+		 * Ref. CCX test plan v3.61, 3.2.3.1 step 13.
+		 * We want to make the device type as "4500-client". 060926, by CCW.
+		 */
 		memcpy(osCcxAironetIE.octet, AironetIeOui, sizeof(AironetIeOui));

-		// CCX1 spec V1.13, A01.1 CKIP Negotiation (page23):
-		// "The CKIP negotiation is started with the associate request from the client to the access point,
-		//  containing an Aironet element with both the MIC and KP bits set."
+		/*
+		 * CCX1 spec V1.13, A01.1 CKIP Negotiation (page23):
+		 * "The CKIP negotiation is started with the associate request from the client to the access point,
+		 *  containing an Aironet element with both the MIC and KP bits set."
+		 */
 		osCcxAironetIE.octet[IE_CISCO_FLAG_POSITION] |= (SUPPORT_CKIP_PK | SUPPORT_CKIP_MIC);
 		tag = skb_put(skb, ckip_ie_len);
 		*tag++ = MFIE_TYPE_AIRONET;
@@ -1109,7 +1117,7 @@ ieee80211_association_req(struct ieee80211_network *beacon,
 		memcpy(tag, osCcxVerNum.octet, osCcxVerNum.length);
 		tag += osCcxVerNum.length;
 	}
-	//HT cap element
+	/* HT cap element */
 	if (ieee->pHTInfo->bCurrentHTSupport && ieee->pHTInfo->bEnableHT) {
 		if (ieee->pHTInfo->ePeerHTSpecVer != HT_SPEC_VER_EWC) {
 			tag = skb_put(skb, ht_cap_len);
@@ -1120,7 +1128,7 @@ ieee80211_association_req(struct ieee80211_network *beacon,
 		}
 	}

-	//choose what wpa_supplicant gives to associate.
+	/* choose what wpa_supplicant gives to associate. */
 	if (wpa_ie_len)
 		skb_put_data(skb, ieee->wpa_ie, wpa_ie_len);

@@ -1163,7 +1171,8 @@ void ieee80211_associate_abort(struct ieee80211_device *ieee)

 	ieee->associate_seq++;

-	/* don't scan, and avoid to have the RX path possibily
+	/*
+	 * don't scan, and avoid to have the RX path possibily
 	 * try again to associate. Even do not react to AUTH or
 	 * ASSOC response. Just wait for the retry wq to be scheduled.
 	 * Here we will check if there are good nets to associate
@@ -1208,7 +1217,7 @@ static void ieee80211_associate_step1(struct ieee80211_device *ieee)
 		ieee->state = IEEE80211_ASSOCIATING_AUTHENTICATING;
 		IEEE80211_DEBUG_MGMT("Sending authentication request\n");
 		softmac_mgmt_xmit(skb, ieee);
-		//BUGON when you try to add_timer twice, using mod_timer may be better, john0709
+		/* BUGON when you try to add_timer twice, using mod_timer may be better, john0709 */
 		if (!timer_pending(&ieee->associate_timer)) {
 			ieee->associate_timer.expires = jiffies + (HZ / 2);
 			add_timer(&ieee->associate_timer);
@@ -1289,7 +1298,7 @@ static void ieee80211_associate_complete_wq(struct work_struct *work)
 		//HTSetConnectBwMode(ieee, HT_CHANNEL_WIDTH_20, HT_EXTCHNL_OFFSET_NO_EXT);
 	}
 	ieee->LinkDetectInfo.SlotNum = 2 * (1 + ieee->current_network.beacon_interval / 500);
-	// To prevent the immediately calling watch_dog after association.
+	/* To prevent the immediately calling watch_dog after association. */
 	if (ieee->LinkDetectInfo.NumRecvBcnInPeriod == 0 || ieee->LinkDetectInfo.NumRecvDataInPeriod == 0) {
 		ieee->LinkDetectInfo.NumRecvBcnInPeriod = 1;
 		ieee->LinkDetectInfo.NumRecvDataInPeriod = 1;
@@ -1346,7 +1355,8 @@ inline void ieee80211_softmac_new_net(struct ieee80211_device *ieee, struct ieee

 	short apset, ssidset, ssidbroad, apmatch, ssidmatch;

-	/* we are interested in new new only if we are not associated
+	/*
+	 * we are interested in new new only if we are not associated
 	 * and we are not associating / authenticating
 	 */
 	if (ieee->state != IEEE80211_NOLINK)
@@ -1359,7 +1369,8 @@ inline void ieee80211_softmac_new_net(struct ieee80211_device *ieee, struct ieee
 		return;

 	if (ieee->iw_mode == IW_MODE_INFRA || ieee->iw_mode == IW_MODE_ADHOC) {
-		/* if the user specified the AP MAC, we need also the essid
+		/*
+		 * if the user specified the AP MAC, we need also the essid
 		 * This could be obtained by beacons or, if the network does not
 		 * broadcast it, it can be put manually.
 		 */
@@ -1370,18 +1381,21 @@ inline void ieee80211_softmac_new_net(struct ieee80211_device *ieee, struct ieee
 		ssidmatch = (ieee->current_network.ssid_len == net->ssid_len) &&
 			(!strncmp(ieee->current_network.ssid, net->ssid, net->ssid_len));

-		/* if the user set the AP check if match.
+		/*
+		 * if the user set the AP check if match.
 		 * if the network does not broadcast essid we check the user supplyed ANY essid
 		 * if the network does broadcast and the user does not set essid it is OK
 		 * if the network does broadcast and the user did set essid chech if essid match
 		 */
 		if ((apset && apmatch &&
 		     ((ssidset && ssidbroad && ssidmatch) || (ssidbroad && !ssidset) || (!ssidbroad && ssidset))) ||
-		    /* if the ap is not set, check that the user set the bssid
+		    /*
+		     * if the ap is not set, check that the user set the bssid
 		     * and the network does broadcast and that those two bssid matches
 		     */
 		    (!apset && ssidset && ssidbroad && ssidmatch)) {
-			/* if the essid is hidden replace it with the
+			/*
+			 * if the essid is hidden replace it with the
 			 * essid provided by the user.
 			 */
 			if (!ssidbroad) {
@@ -1404,7 +1418,7 @@ inline void ieee80211_softmac_new_net(struct ieee80211_device *ieee, struct ieee
 			if (ieee->iw_mode == IW_MODE_INFRA) {
 				/* Join the network for the first time */
 				ieee->AsocRetryCount = 0;
-				//for HT by amy 080514
+				/* for HT by amy 080514 */
 				if ((ieee->current_network.qos_data.supported == 1) &&
 				    // (ieee->pHTInfo->bEnableHT && ieee->current_network.bssht.bdSupportHT))
 				    ieee->current_network.bssht.bdSupportHT) {
@@ -1444,7 +1458,8 @@ void ieee80211_softmac_check_all_nets(struct ieee80211_device *ieee)
 	spin_lock_irqsave(&ieee->lock, flags);

 	list_for_each_entry(target, &ieee->network_list, list) {
-		/* if the state become different that NOLINK means
+		/*
+		 * if the state become different that NOLINK means
 		 * we had found what we are searching for
 		 */

@@ -1624,7 +1639,7 @@ ieee80211_rx_assoc_rq(struct ieee80211_device *ieee, struct sk_buff *skb)
 		ieee80211_resp_to_assoc_rq(ieee, dest);

 	printk(KERN_INFO"New client associated: %pM\n", dest);
-	//FIXME
+	/* FIXME */
 }

 static void ieee80211_sta_ps_send_null_frame(struct ieee80211_device *ieee,
@@ -1651,7 +1666,7 @@ static short ieee80211_sta_ps_sleep(struct ieee80211_device *ieee, u32 *time_h,
 	dtim = ieee->current_network.dtim_data;
 	if (!(dtim & IEEE80211_DTIM_VALID))
 		return 0;
-	timeout = ieee->current_network.beacon_interval; //should we use ps_timeout value or beacon_interval
+	timeout = ieee->current_network.beacon_interval; /* should we use ps_timeout value or beacon_interval */
 	ieee->current_network.dtim_data = IEEE80211_DTIM_INVALID;

 	if (dtim & ((IEEE80211_DTIM_UCAST | IEEE80211_DTIM_MBCAST) & ieee->ps))
@@ -1696,7 +1711,7 @@ static inline void ieee80211_sta_ps(struct ieee80211_device *ieee)
 	if ((ieee->ps == IEEE80211_PS_DISABLED ||
 	     ieee->iw_mode != IW_MODE_INFRA ||
 	     ieee->state != IEEE80211_LINKED)) {
-		//	#warning CHECK_LOCK_HERE
+		/* 	#warning CHECK_LOCK_HERE */
 		spin_lock_irqsave(&ieee->mgmt_tx_lock, flags2);

 		ieee80211_sta_wakeup(ieee, 1);
@@ -1729,7 +1744,7 @@ static inline void ieee80211_sta_ps(struct ieee80211_device *ieee)
 			spin_unlock_irqrestore(&ieee->mgmt_tx_lock, flags2);
 		}
 	} else if (sleep == 2) {
-//#warning CHECK_LOCK_HERE
+/* #warning CHECK_LOCK_HERE */
 		spin_lock_irqsave(&ieee->mgmt_tx_lock, flags2);

 		ieee80211_sta_wakeup(ieee, 1);
@@ -1774,7 +1789,8 @@ void ieee80211_ps_tx_ack(struct ieee80211_device *ieee, short success)
 			ieee->sta_sleep = 1;
 			ieee->enter_sleep_state(ieee->dev, ieee->ps_th, ieee->ps_tl);
 		}
-		/* if the card report not success we can't be sure the AP
+		/*
+		 * if the card report not success we can't be sure the AP
 		 * has not RXed so we can't assume the AP believe us awake
 		 */
 	} else {
@@ -1925,7 +1941,7 @@ ieee80211_rx_frame_softmac(struct ieee80211_device *ieee, struct sk_buff *skb,
 								       network, rx_stats)) {
 						return 1;
 					} else {
-						//filling the PeerHTCap. //maybe not necessary as we can get its info from current_network.
+						/* filling the PeerHTCap. maybe not necessary as we can get its info from current_network. */
 						memcpy(ieee->pHTInfo->PeerHTCapBuf, network->bssht.bdHTCapBuf, network->bssht.bdHTCapLen);
 						memcpy(ieee->pHTInfo->PeerHTInfoBuf, network->bssht.bdHTInfoBuf, network->bssht.bdHTInfoLen);
 					}
@@ -1978,9 +1994,10 @@ ieee80211_rx_frame_softmac(struct ieee80211_device *ieee, struct sk_buff *skb,

 	case IEEE80211_STYPE_DISASSOC:
 	case IEEE80211_STYPE_DEAUTH:
-		/* FIXME for now repeat all the association procedure
-		* both for disassociation and deauthentication
-		*/
+		/*
+		 * FIXME for now repeat all the association procedure
+		 * both for disassociation and deauthentication
+		 */
 		if ((ieee->softmac_features & IEEE_SOFTMAC_ASSOCIATE) &&
 		    ieee->state == IEEE80211_LINKED &&
 		    ieee->iw_mode == IW_MODE_INFRA) {
@@ -2004,7 +2021,8 @@ ieee80211_rx_frame_softmac(struct ieee80211_device *ieee, struct sk_buff *skb,
 	return 0;
 }

-/* The following are for a simpler TX queue management.
+/*
+ * The following are for a simpler TX queue management.
  * Instead of using netif_[stop/wake]_queue, the driver
  * will use these two functions (plus a reset one) that
  * will internally call the kernel netif_* and take care
@@ -2051,7 +2069,8 @@ void ieee80211_softmac_xmit(struct ieee80211_txb *txb, struct ieee80211_device *
 		    (!ieee->check_nic_enough_desc(ieee->dev, queue_index)) || \
 		    (ieee->queue_stop)) {
 			/* insert the skb packet to the wait queue */
-			/* as for the completion function, it does not need
+			/*
+			 * as for the completion function, it does not need
 			 * to check it any more.
 			 * */
 			//printk("error:no descriptor left@queue_index %d\n", queue_index);
@@ -2205,7 +2224,8 @@ static void ieee80211_start_ibss_wq(struct work_struct *work)
 {
 	struct delayed_work *dwork = to_delayed_work(work);
 	struct ieee80211_device *ieee = container_of(dwork, struct ieee80211_device, start_ibss_wq);
-	/* iwconfig mode ad-hoc will schedule this and return
+	/*
+	 * iwconfig mode ad-hoc will schedule this and return
 	 * on the other hand this will block further iwconfig SET
 	 * operations because of the wx_mutex hold.
 	 * Anyway some most set operations set a flag to speed-up
@@ -2230,7 +2250,8 @@ static void ieee80211_start_ibss_wq(struct work_struct *work)
 //	if((IS_DOT11D_ENABLE(ieee)) && (ieee->state == IEEE80211_NOLINK))
 	if (ieee->state == IEEE80211_NOLINK)
 		ieee->current_network.channel = 6;
-	/* if not then the state is not linked. Maybe the user switched to
+	/*
+	 * if not then the state is not linked. Maybe the user switched to
 	 * ad-hoc mode just after being in monitor mode, or just after
 	 * being very few time in managed mode (so the card have had no
 	 * time to scan all the chans..) or we have just run up the iface
@@ -2281,7 +2302,7 @@ static void ieee80211_start_ibss_wq(struct work_struct *work)
 			ieee->rate = 22;
 		}

-		// By default, WMM function will be disabled in IBSS mode
+		/* By default, WMM function will be disabled in IBSS mode */
 		ieee->current_network.QoS_Enable = 0;
 		ieee->SetWirelessMode(ieee->dev, IEEE_G);
 		ieee->current_network.atim_window = 0;
@@ -2315,22 +2336,24 @@ inline void ieee80211_start_ibss(struct ieee80211_device *ieee)
 void ieee80211_start_bss(struct ieee80211_device *ieee)
 {
 	unsigned long flags;
-	//
-	// Ref: 802.11d 11.1.3.3
-	// STA shall not start a BSS unless properly formed Beacon frame including a Country IE.
-	//
+	/*
+	 * Ref: 802.11d 11.1.3.3
+	 * STA shall not start a BSS unless properly formed Beacon frame including a Country IE.
+	 */
 	if (IS_DOT11D_ENABLE(ieee) && !IS_COUNTRY_IE_VALID(ieee)) {
 		if (!ieee->bGlobalDomain)
 			return;
 	}
-	/* check if we have already found the net we
+	/*
+	 * check if we have already found the net we
 	 * are interested in (if any).
 	 * if not (we are disassociated and we are not
 	 * in associating / authenticating phase) start the background scanning.
 	 */
 	ieee80211_softmac_check_all_nets(ieee);

-	/* ensure no-one start an associating process (thus setting
+	/*
+	 * ensure no-one start an associating process (thus setting
 	 * the ieee->state to ieee80211_ASSOCIATING) while we
 	 * have just cheked it and we are going to enable scan.
 	 * The ieee80211_new_net function is always called with
@@ -2378,19 +2401,20 @@ static void ieee80211_associate_retry_wq(struct work_struct *work)
 	if (ieee->state != IEEE80211_ASSOCIATING_RETRY)
 		goto exit;

-	/* until we do not set the state to IEEE80211_NOLINK
-	* there are no possibility to have someone else trying
-	* to start an association procedure (we get here with
-	* ieee->state = IEEE80211_ASSOCIATING).
-	* When we set the state to IEEE80211_NOLINK it is possible
-	* that the RX path run an attempt to associate, but
-	* both ieee80211_softmac_check_all_nets and the
-	* RX path works with ieee->lock held so there are no
-	* problems. If we are still disassociated then start a scan.
-	* the lock here is necessary to ensure no one try to start
-	* an association procedure when we have just checked the
-	* state and we are going to start the scan.
-	*/
+	/*
+	 * until we do not set the state to IEEE80211_NOLINK
+	 * there are no possibility to have someone else trying
+	 * to start an association procedure (we get here with
+	 * ieee->state = IEEE80211_ASSOCIATING).
+	 * When we set the state to IEEE80211_NOLINK it is possible
+	 * that the RX path run an attempt to associate, but
+	 * both ieee80211_softmac_check_all_nets and the
+	 * RX path works with ieee->lock held so there are no
+	 * problems. If we are still disassociated then start a scan.
+	 * the lock here is necessary to ensure no one try to start
+	 * an association procedure when we have just checked the
+	 * state and we are going to start the scan.
+	 */
 	ieee->state = IEEE80211_NOLINK;

 	ieee80211_softmac_check_all_nets(ieee);
@@ -2468,7 +2492,7 @@ void ieee80211_stop_protocol(struct ieee80211_device *ieee)
 	ieee80211_stop_scan(ieee);

 	ieee80211_disassociate(ieee);
-	RemoveAllTS(ieee); //added as we disconnect from the previous BSS, Remove all TS
+	RemoveAllTS(ieee); /* added as we disconnect from the previous BSS, Remove all TS */
 }

 void ieee80211_softmac_start_protocol(struct ieee80211_device *ieee)
@@ -2510,9 +2534,10 @@ void ieee80211_start_protocol(struct ieee80211_device *ieee)
 		ieee->last_packet_time[i] = 0;
 	}

-	ieee->init_wmmparam_flag = 0;//reinitialize AC_xx_PARAM registers.
+	ieee->init_wmmparam_flag = 0;/* reinitialize AC_xx_PARAM registers. */

-	/* if the user set the MAC of the ad-hoc cell and then
+	/*
+	 * if the user set the MAC of the ad-hoc cell and then
 	 * switch to managed mode, shall we  make sure that association
 	 * attempts does not fail just because the user provide the essid
 	 * and the nic is still checking for the AP MAC ??
@@ -2544,7 +2569,7 @@ void ieee80211_softmac_init(struct ieee80211_device *ieee)
 	ieee->dot11d_info = kzalloc(sizeof(struct rt_dot11d_info), GFP_KERNEL);
 	if (!ieee->dot11d_info)
 		IEEE80211_DEBUG(IEEE80211_DL_ERR, "can't alloc memory for DOT11D\n");
-	//added for  AP roaming
+	/* added for  AP roaming */
 	ieee->LinkDetectInfo.SlotNum = 2;
 	ieee->LinkDetectInfo.NumRecvBcnInPeriod = 0;
 	ieee->LinkDetectInfo.NumRecvDataInPeriod = 0;
@@ -2552,7 +2577,7 @@ void ieee80211_softmac_init(struct ieee80211_device *ieee)
 	ieee->assoc_id = 0;
 	ieee->queue_stop = 0;
 	ieee->scanning = 0;
-	ieee->softmac_features = 0; //so IEEE2100-like driver are happy
+	ieee->softmac_features = 0; /* so IEEE2100-like driver are happy */
 	ieee->wap_set = 0;
 	ieee->ssid_set = 0;
 	ieee->proto_started = 0;
@@ -2560,10 +2585,10 @@ void ieee80211_softmac_init(struct ieee80211_device *ieee)
 	ieee->rate = 22;
 	ieee->ps = IEEE80211_PS_DISABLED;
 	ieee->sta_sleep = 0;
-	ieee->Regdot11HTOperationalRateSet[0] = 0xff;//support MCS 0~7
-	ieee->Regdot11HTOperationalRateSet[1] = 0xff;//support MCS 8~15
+	ieee->Regdot11HTOperationalRateSet[0] = 0xff;/* support MCS 0~7 */
+	ieee->Regdot11HTOperationalRateSet[1] = 0xff;/* support MCS 8~15 */
 	ieee->Regdot11HTOperationalRateSet[4] = 0x01;
-	//added by amy
+	/* added by amy */
 	ieee->actscanning = false;
 	ieee->beinretry = false;
 	ieee->is_set_key = false;
@@ -2639,7 +2664,7 @@ static int ieee80211_wpa_mlme(struct ieee80211_device *ieee, int command, int re

 	switch (command) {
 	case IEEE_MLME_STA_DEAUTH:
-		// silently ignore
+		/* silently ignore */
 		break;

 	case IEEE_MLME_STA_DISASSOC:
@@ -2728,7 +2753,8 @@ static int ieee80211_wpa_set_param(struct ieee80211_device *ieee, u8 name, u32 v
 		break;

 	case IEEE_PARAM_DROP_UNENCRYPTED: {
-		/* HACK:
+		/*
+		 * HACK:
 		 *
 		 * wpa_supplicant calls set_wpa_enabled when the driver
 		 * is loaded and unloaded, regardless of if WPA is being
@@ -2744,7 +2770,8 @@ static int ieee80211_wpa_set_param(struct ieee80211_device *ieee, u8 name, u32 v
 			.enabled = value,
 		};
 		ieee->drop_unencrypted = value;
-		/* We only change SEC_LEVEL for open mode. Others
+		/*
+		 * We only change SEC_LEVEL for open mode. Others
 		 * are set by ipw_wpa_set_encryption.
 		 */
 		if (!value) {
@@ -2771,7 +2798,7 @@ static int ieee80211_wpa_set_param(struct ieee80211_device *ieee, u8 name, u32 v
 		ieee->ieee802_1x = value;
 		break;
 	case IEEE_PARAM_WPAX_SELECT:
-		// added for WPA2 mixed mode
+		/* added for WPA2 mixed mode */
 		spin_lock_irqsave(&ieee->wpax_suitlist_lock, flags);
 		ieee->wpax_type_set = 1;
 		ieee->wpax_type_notify = value;
@@ -2821,7 +2848,7 @@ static int ieee80211_wpa_set_encryption(struct ieee80211_device *ieee,
 	if (strcmp(param->u.crypt.alg, "none") == 0) {
 		if (crypt) {
 			sec.enabled = 0;
-			// FIXME FIXME
+			/* FIXME FIXME */
 			//sec.encrypt = 0;
 			sec.level = SEC_LEVEL_0;
 			sec.flags |= SEC_ENABLED | SEC_LEVEL;
@@ -2830,7 +2857,7 @@ static int ieee80211_wpa_set_encryption(struct ieee80211_device *ieee,
 		goto done;
 	}
 	sec.enabled = 1;
-// FIXME FIXME
+/* FIXME FIXME */
 //	sec.encrypt = 1;
 	sec.flags |= SEC_ENABLED;

@@ -2839,7 +2866,7 @@ static int ieee80211_wpa_set_encryption(struct ieee80211_device *ieee,
 	    strcmp(param->u.crypt.alg, "TKIP"))
 		goto skip_host_crypt;

-	//set WEP40 first, it will be modified according to WEP104 or WEP40 at other place
+	/* set WEP40 first, it will be modified according to WEP104 or WEP40 at other place */
 	if (!strcmp(param->u.crypt.alg, "WEP"))
 		module = "ieee80211_crypt_wep";
 	else if (!strcmp(param->u.crypt.alg, "TKIP"))
@@ -2919,11 +2946,13 @@ static int ieee80211_wpa_set_encryption(struct ieee80211_device *ieee,
 	if (ieee->set_security)
 		ieee->set_security(ieee->dev, &sec);

-	/* Do not reset port if card is in Managed mode since resetting will
+	/*
+	 * Do not reset port if card is in Managed mode since resetting will
 	 * generate new IEEE 802.11 authentication which may end up in looping
 	 * with IEEE 802.1X.  If your hardware requires a reset after WEP
 	 * configuration (for example... Prism2), implement the reset_port in
-	 * the callbacks structures used to initialize the 802.11 stack. */
+	 * the callbacks structures used to initialize the 802.11 stack.
+	 */
 	if (ieee->reset_on_keychange &&
 	    ieee->iw_mode != IW_MODE_INFRA &&
 	    ieee->reset_port &&
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac_wx.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac_wx.c
index aab1586fe0dd..2bf333c12bbc 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac_wx.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac_wx.c
@@ -112,7 +112,7 @@ int ieee80211_wx_get_wap(struct ieee80211_device *ieee,
 	if (ieee->iw_mode == IW_MODE_MONITOR)
 		return -1;

-	/* We want avoid to give to the user inconsistent infos*/
+	/* We want avoid to give to the user inconsistent infos */
 	spin_lock_irqsave(&ieee->lock, flags);

 	if (ieee->state != IEEE80211_LINKED &&
@@ -159,7 +159,8 @@ int ieee80211_wx_set_wap(struct ieee80211_device *ieee,
 	if (ifup)
 		ieee80211_stop_protocol(ieee);

-	/* just to avoid to give inconsistent infos in the
+	/*
+	 * just to avoid to give inconsistent infos in the
 	 * get wx method. not really needed otherwise
 	 */
 	spin_lock_irqsave(&ieee->lock, flags);
@@ -408,7 +409,8 @@ int ieee80211_wx_set_essid(struct ieee80211_device *ieee,
 		ieee80211_stop_protocol(ieee);


-	/* this is just to be sure that the GET wx callback
+	/*
+	 * this is just to be sure that the GET wx callback
 	 * has consisten infos. not needed otherwise
 	 */
 	spin_lock_irqsave(&ieee->lock, flags);
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c
index 8e1ec4409b4f..f5c991f6d34f 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c
@@ -188,12 +188,14 @@ int ieee80211_encrypt_fragment(
 		return -1;
 	}

-	/* To encrypt, frame format is:
+	/*
+	 * To encrypt, frame format is:
 	 * IV (4 bytes), clear payload (including SNAP), ICV (4 bytes)
 	 */

-	// PR: FIXME: Copied from hostap. Check fragmentation/MSDU/MPDU encryption.
-	/* Host-based IEEE 802.11 fragmentation for TX is not yet supported, so
+	/* PR: FIXME: Copied from hostap. Check fragmentation/MSDU/MPDU encryption. */
+	/*
+	 * Host-based IEEE 802.11 fragmentation for TX is not yet supported, so
 	 * call both MSDU and MPDU encryption functions from here.
 	 */
 	atomic_inc(&crypt->refcnt);
@@ -255,8 +257,8 @@ static struct ieee80211_txb *ieee80211_alloc_txb(int nr_frags, int txb_size,
 	return txb;
 }

-// Classify the to-be send data packet
-// Need to acquire the sent queue index.
+/* Classify the to-be send data packet */
+/* Need to acquire the sent queue index. */
 static int
 ieee80211_classify(struct sk_buff *skb, struct ieee80211_network *network)
 {
@@ -301,11 +303,11 @@ static void ieee80211_tx_query_agg_cap(struct ieee80211_device *ieee,

 	if (is_multicast_ether_addr(hdr->addr1))
 		return;
-	//check packet and mode later
+	/* check packet and mode later */
 #ifdef TO_DO_LIST
 	if (pTcb->PacketLength >= 4096)
 		return;
-	// For RTL819X, if pairwisekey = wep/tkip, we don't aggrregation.
+	/* For RTL819X, if pairwisekey = wep/tkip, we don't aggrregation. */
 	if (!Adapter->HalFunc.GetNmodeSupportBySecCfgHandler(Adapter))
 		return;
 #endif
@@ -366,8 +368,8 @@ static void ieee80211_qurey_ShortPreambleMode(struct ieee80211_device *ieee,
 					      struct cb_desc *tcb_desc)
 {
 	tcb_desc->bUseShortPreamble = false;
-	if (tcb_desc->data_rate == 2)
-	{//// 1M can only use Long Preamble. 11B spec
+	if (tcb_desc->data_rate == 2) {
+	/* 1M can only use Long Preamble. 11B spec */
 		return;
 	}
 	else if (ieee->current_network.capability & WLAN_CAPABILITY_SHORT_PREAMBLE)
@@ -411,9 +413,9 @@ static void ieee80211_query_BandwidthMode(struct ieee80211_device *ieee,
 	if (tcb_desc->bMulticast || tcb_desc->bBroadcast)
 		return;

-	if ((tcb_desc->data_rate & 0x80)==0) // If using legacy rate, it shall use 20MHz channel.
+	if ((tcb_desc->data_rate & 0x80) == 0) /* If using legacy rate, it shall use 20MHz channel. */
 		return;
-	//BandWidthAutoSwitch is for auto switch to 20 or 40 in long distance
+	/* BandWidthAutoSwitch is for auto switch to 20 or 40 in long distance */
 	if(pHTInfo->bCurBW40MHz && pHTInfo->bCurTxBW40MHz && !ieee->bandwidth_auto_switch.bforced_tx20Mhz)
 		tcb_desc->bPacketBW = true;
 	return;
@@ -423,25 +425,27 @@ static void ieee80211_query_protectionmode(struct ieee80211_device *ieee,
 					   struct cb_desc *tcb_desc,
 					   struct sk_buff *skb)
 {
-	// Common Settings
+	/* Common Settings */
 	tcb_desc->bRTSSTBC			= false;
-	tcb_desc->bRTSUseShortGI		= false; // Since protection frames are always sent by legacy rate, ShortGI will never be used.
-	tcb_desc->bCTSEnable			= false; // Most of protection using RTS/CTS
-	tcb_desc->RTSSC				= 0;		// 20MHz: Don't care;  40MHz: Duplicate.
-	tcb_desc->bRTSBW			= false; // RTS frame bandwidth is always 20MHz
+	tcb_desc->bRTSUseShortGI		= false; /* Since protection frames are always sent by legacy rate, ShortGI will never be used. */
+	tcb_desc->bCTSEnable			= false; /* Most of protection using RTS/CTS */
+	tcb_desc->RTSSC				= 0;		/* 20MHz: Don't care;  40MHz: Duplicate. */
+	tcb_desc->bRTSBW			= false; /* RTS frame bandwidth is always 20MHz */

-	if(tcb_desc->bBroadcast || tcb_desc->bMulticast)//only unicast frame will use rts/cts
+	if (tcb_desc->bBroadcast || tcb_desc->bMulticast)/* only unicast frame will use rts/cts */
 		return;

-	if (is_broadcast_ether_addr(skb->data+16))  //check addr3 as infrastructure add3 is DA.
+	if (is_broadcast_ether_addr(skb->data+16))  /* check addr3 as infrastructure add3 is DA. */
 		return;

-	if (ieee->mode < IEEE_N_24G) //b, g mode
+	if (ieee->mode < IEEE_N_24G) /* b, g mode */
 	{
-			// (1) RTS_Threshold is compared to the MPDU, not MSDU.
-			// (2) If there are more than one frag in  this MSDU, only the first frag uses protection frame.
-			//		Other fragments are protected by previous fragment.
-			//		So we only need to check the length of first fragment.
+			/*
+			 * (1) RTS_Threshold is compared to the MPDU, not MSDU.
+			 * (2) If there are more than one frag in  this MSDU, only the first frag uses protection frame.
+			 * 	Other fragments are protected by previous fragment.
+			 * 	So we only need to check the length of first fragment.
+			 */
 		if (skb->len > ieee->rts)
 		{
 			tcb_desc->bRTSEnable = true;
@@ -449,57 +453,54 @@ static void ieee80211_query_protectionmode(struct ieee80211_device *ieee,
 		}
 		else if (ieee->current_network.buseprotection)
 		{
-			// Use CTS-to-SELF in protection mode.
+			/* Use CTS-to-SELF in protection mode. */
 			tcb_desc->bRTSEnable = true;
 			tcb_desc->bCTSEnable = true;
 			tcb_desc->rts_rate = MGN_24M;
 		}
-		//otherwise return;
+		/* otherwise return; */
 		return;
-	}
-	else
-	{// 11n High throughput case.
+	} else {/* 11n High throughput case. */
 		PRT_HIGH_THROUGHPUT pHTInfo = ieee->pHTInfo;
 		while (true)
 		{
-			//check ERP protection
-			if (ieee->current_network.buseprotection)
-			{// CTS-to-SELF
+			/* check ERP protection */
+			if (ieee->current_network.buseprotection) {/* CTS-to-SELF */
 				tcb_desc->bRTSEnable = true;
 				tcb_desc->bCTSEnable = true;
 				tcb_desc->rts_rate = MGN_24M;
 				break;
 			}
-			//check HT op mode
+			/* check HT op mode */
 			if(pHTInfo->bCurrentHTSupport  && pHTInfo->bEnableHT)
 			{
 				u8 HTOpMode = pHTInfo->CurrentOpMode;
 				if((pHTInfo->bCurBW40MHz && (HTOpMode == 2 || HTOpMode == 3)) ||
 							(!pHTInfo->bCurBW40MHz && HTOpMode == 3) )
 				{
-					tcb_desc->rts_rate = MGN_24M; // Rate is 24Mbps.
+					tcb_desc->rts_rate = MGN_24M; /* Rate is 24Mbps. */
 					tcb_desc->bRTSEnable = true;
 					break;
 				}
 			}
-			//check rts
+			/* check rts */
 			if (skb->len > ieee->rts)
 			{
-				tcb_desc->rts_rate = MGN_24M; // Rate is 24Mbps.
+				tcb_desc->rts_rate = MGN_24M; /* Rate is 24Mbps. */
 				tcb_desc->bRTSEnable = true;
 				break;
 			}
-			//to do list: check MIMO power save condition.
-			//check AMPDU aggregation for TXOP
+			/* to do list: check MIMO power save condition. */
+			/* check AMPDU aggregation for TXOP */
 			if(tcb_desc->bAMPDUEnable)
 			{
-				tcb_desc->rts_rate = MGN_24M; // Rate is 24Mbps.
-				// According to 8190 design, firmware sends CF-End only if RTS/CTS is enabled. However, it degrads
-				// throughput around 10M, so we disable of this mechanism. 2007.08.03 by Emily
+				tcb_desc->rts_rate = MGN_24M; /* Rate is 24Mbps. */
+				/* According to 8190 design, firmware sends CF-End only if RTS/CTS is enabled. However, it degrads */
+				/* throughput around 10M, so we disable of this mechanism. 2007.08.03 by Emily */
 				tcb_desc->bRTSEnable = false;
 				break;
 			}
-			//check IOT action
+			/* check IOT action */
 			if(pHTInfo->IOTAction & HT_IOT_ACT_FORCED_CTS2SELF)
 			{
 				tcb_desc->bCTSEnable	= true;
@@ -507,11 +508,11 @@ static void ieee80211_query_protectionmode(struct ieee80211_device *ieee,
 				tcb_desc->bRTSEnable = true;
 				break;
 			}
-			// Totally no protection case!!
+			/* Totally no protection case!! */
 			goto NO_PROTECTION;
 		}
 		}
-	// For test , CTS replace with RTS
+	/* For test , CTS replace with RTS */
 	if (0) {
 		tcb_desc->bCTSEnable	= true;
 		tcb_desc->rts_rate = MGN_24M;
@@ -567,7 +568,7 @@ static void ieee80211_query_seqnum(struct ieee80211_device *ieee,
 {
 	if (is_multicast_ether_addr(dst))
 		return;
-	if (IsQoSDataFrame(skb->data)) //we deal qos data only
+	if (IsQoSDataFrame(skb->data)) /* we deal qos data only */
 	{
 		struct tx_ts_record *pTS = NULL;
 		if (!GetTs(ieee, (struct ts_common_info **)(&pTS), dst, skb->priority, TX_DIR, true))
@@ -603,7 +604,8 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev)

 	spin_lock_irqsave(&ieee->lock, flags);

-	/* If there is no driver handler to take the TXB, dont' bother
+	/*
+	 * If there is no driver handler to take the TXB, dont' bother
 	 * creating it...
 	 */
 	if ((!ieee->hard_start_xmit && !(ieee->softmac_features & IEEE_SOFTMAC_TX_QUEUE))||
@@ -667,14 +669,16 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev)

 		if (ieee->iw_mode == IW_MODE_INFRA) {
 			fc |= IEEE80211_FCTL_TODS;
-			/* To DS: Addr1 = BSSID, Addr2 = SA,
+			/*
+			 * To DS: Addr1 = BSSID, Addr2 = SA,
 			 * Addr3 = DA
 			 */
 			memcpy(&header.addr1, ieee->current_network.bssid, ETH_ALEN);
 			memcpy(&header.addr2, &src, ETH_ALEN);
 			memcpy(&header.addr3, &dest, ETH_ALEN);
 		} else if (ieee->iw_mode == IW_MODE_ADHOC) {
-			/* not From/To DS: Addr1 = DA, Addr2 = SA,
+			/*
+			 * not From/To DS: Addr1 = DA, Addr2 = SA,
 			 * Addr3 = BSSID
 			 */
 			memcpy(&header.addr1, dest, ETH_ALEN);
@@ -684,7 +688,8 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev)

 		header.frame_ctl = cpu_to_le16(fc);

-		/* Determine fragmentation size based on destination (multicast
+		/*
+		 * Determine fragmentation size based on destination (multicast
 		 * and broadcast are not fragmented)
 		 */
 		if (is_multicast_ether_addr(header.addr1)) {
@@ -692,7 +697,7 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev)
 			qos_ctl |= QOS_CTL_NOTCONTAIN_ACK;
 		}
 		else {
-			frag_size = ieee->fts;//default:392
+			frag_size = ieee->fts;/* default:392 */
 			qos_ctl = 0;
 		}

@@ -702,12 +707,13 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev)
 			hdr_len = IEEE80211_3ADDR_LEN + 2;

 			skb->priority = ieee80211_classify(skb, &ieee->current_network);
-			qos_ctl |= skb->priority; //set in the ieee80211_classify
+			qos_ctl |= skb->priority; /* set in the ieee80211_classify */
 			header.qos_ctl = cpu_to_le16(qos_ctl & IEEE80211_QOS_TID);
 		} else {
 			hdr_len = IEEE80211_3ADDR_LEN;
 		}
-		/* Determine amount of payload per fragment.  Regardless of if
+		/*
+		 * Determine amount of payload per fragment.  Regardless of if
 		 * this stack is providing the full 802.11 header, one will
 		 * eventually be affixed to this fragment -- so we must account for
 		 * it when determining the amount of payload space.
@@ -722,7 +728,8 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev)
 			bytes_per_frag -= crypt->ops->extra_prefix_len +
 				crypt->ops->extra_postfix_len;

-		/* Number of fragments is the total bytes_per_frag /
+		/*
+		 * Number of fragments is the total bytes_per_frag /
 		 * payload_per_fragment
 		 */
 		nr_frags = bytes / bytes_per_frag;
@@ -732,7 +739,8 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev)
 		else
 			bytes_last_frag = bytes_per_frag;

-		/* When we allocate the TXB we allocate enough space for the reserve
+		/*
+		 * When we allocate the TXB we allocate enough space for the reserve
 		 * and full fragment bytes (bytes_per_frag doesn't include prefix,
 		 * postfix, header, FCS, etc.)
 		 */
@@ -780,7 +788,8 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev)
 			}
 			frag_hdr = skb_put_data(skb_frag, &header, hdr_len);

-			/* If this is not the last fragment, then add the MOREFRAGS
+			/*
+			 * If this is not the last fragment, then add the MOREFRAGS
 			 * bit to the frame control
 			 */
 			if (i != nr_frags - 1) {
@@ -795,7 +804,7 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev)
 			//if(ieee->current_network.QoS_Enable)
 			if(qos_actived)
 			{
-				// add 1 only indicate to corresponding seq number control 2006/7/12
+				/* add 1 only indicate to corresponding seq number control 2006/7/12 */
 				frag_hdr->seq_ctl = cpu_to_le16(ieee->seq_ctrl[UP2AC(skb->priority)+1]<<4 | i);
 			} else {
 				frag_hdr->seq_ctl = cpu_to_le16(ieee->seq_ctrl[0]<<4 | i);
@@ -814,7 +823,8 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev)
 			/* Advance the SKB... */
 			skb_pull(skb, bytes);

-			/* Encryption routine will move the header forward in order
+			/*
+			 * Encryption routine will move the header forward in order
 			 * to insert the IV between the header and the payload
 			 */
 			if (encrypt)
@@ -856,7 +866,7 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev)
 	}

  success:
-//WB add to fill data tcb_desc here. only first fragment is considered, need to change, and you may remove to other place.
+/* WB add to fill data tcb_desc here. only first fragment is considered, need to change, and you may remove to other place. */
 	if (txb)
 	{
 		struct cb_desc *tcb_desc = (struct cb_desc *)(txb->fragments[0]->cb + MAX_DEV_ADDR_SIZE);
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c
index dead134f6de0..6cf9e25d6607 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c
@@ -130,7 +130,7 @@ static inline char *rtl819x_translate_scan(struct ieee80211_device *ieee,
 			max_rate = rate;
 	}

-	if (network->mode >= IEEE_N_24G)//add N rate here;
+	if (network->mode >= IEEE_N_24G)/* add N rate here; */
 	{
 		struct ht_capability_ele *ht_cap = NULL;
 		bool is40M = false, isShortGI = false;
@@ -211,8 +211,10 @@ static inline char *rtl819x_translate_scan(struct ieee80211_device *ieee,
 	}


-	/* Add EXTRA: Age to display seconds since last beacon/probe response
-	 * for given network. */
+	/*
+	 * Add EXTRA: Age to display seconds since last beacon/probe response
+	 * for given network.
+	 */
 	iwe.cmd = IWEVCUSTOM;
 	p = custom;
 	p += snprintf(p, MAX_CUSTOM_LEN - (p - custom),
@@ -233,7 +235,7 @@ int ieee80211_wx_get_scan(struct ieee80211_device *ieee,

 	char *ev = extra;
 //	char *stop = ev + IW_SCAN_MAX_DATA;
-	char *stop = ev + wrqu->data.length;//IW_SCAN_MAX_DATA;
+	char *stop = ev + wrqu->data.length;/* IW_SCAN_MAX_DATA; */
 	//char *stop = ev + IW_SCAN_MAX_DATA;
 	int i = 0;
 	int err = 0;
@@ -309,8 +311,10 @@ int ieee80211_wx_set_encode(struct ieee80211_device *ieee,
 		} else
 			IEEE80211_DEBUG_WX("Disabling encryption.\n");

-		/* Check all the keys to see if any are still configured,
-		 * and if no key index was provided, de-init them all */
+		/*
+		 * Check all the keys to see if any are still configured,
+		 * and if no key index was provided, de-init them all
+		 */
 		for (i = 0; i < WEP_KEYS; i++) {
 			if (ieee->crypt[i] != NULL) {
 				if (key_provided)
@@ -336,8 +340,10 @@ int ieee80211_wx_set_encode(struct ieee80211_device *ieee,

 	if (*crypt != NULL && (*crypt)->ops != NULL &&
 	    strcmp((*crypt)->ops->name, "WEP") != 0) {
-		/* changing to use WEP; deinit previously used algorithm
-		 * on this key */
+		/*
+		 * changing to use WEP; deinit previously used algorithm
+		 * on this key
+		 */
 		ieee80211_crypt_delayed_deinit(ieee, crypt);
 	}

@@ -380,7 +386,8 @@ int ieee80211_wx_set_encode(struct ieee80211_device *ieee,
 		(*crypt)->ops->set_key(sec.keys[key], len, NULL,
 				       (*crypt)->priv);
 		sec.flags |= BIT(key);
-		/* This ensures a key will be activated if no key is
+		/*
+		 * This ensures a key will be activated if no key is
 		 * explicitly set
 		 */
 		if (key == sec.active_key)
@@ -422,19 +429,23 @@ int ieee80211_wx_set_encode(struct ieee80211_device *ieee,
 	IEEE80211_DEBUG_WX("Auth: %s\n", sec.auth_mode == WLAN_AUTH_OPEN ?
 			   "OPEN" : "SHARED KEY");

-	/* For now we just support WEP, so only set that security level...
-	 * TODO: When WPA is added this is one place that needs to change */
+	/*
+	 * For now we just support WEP, so only set that security level...
+	 * TODO: When WPA is added this is one place that needs to change
+	 */
 	sec.flags |= SEC_LEVEL;
 	sec.level = SEC_LEVEL_1; /* 40 and 104 bit WEP */

 	if (ieee->set_security)
 		ieee->set_security(dev, &sec);

-	/* Do not reset port if card is in Managed mode since resetting will
+	/*
+	 * Do not reset port if card is in Managed mode since resetting will
 	 * generate new IEEE 802.11 authentication which may end up in looping
 	 * with IEEE 802.1X.  If your hardware requires a reset after WEP
 	 * configuration (for example... Prism2), implement the reset_port in
-	 * the callbacks structures used to initialize the 802.11 stack. */
+	 * the callbacks structures used to initialize the 802.11 stack.
+	 */
 	if (ieee->reset_on_keychange &&
 	    ieee->iw_mode != IW_MODE_INFRA &&
 	    ieee->reset_port && ieee->reset_port(dev)) {
@@ -612,7 +623,7 @@ int ieee80211_wx_set_encode_ext(struct ieee80211_device *ieee,
 		ret = -EINVAL;
 		goto done;
 	}
- //skip_host_crypt:
+ /* skip_host_crypt: */
 	if (ext->ext_flags & IW_ENCODE_EXT_SET_TX_KEY) {
 		ieee->tx_keyidx = idx;
 		sec.active_key = idx;
@@ -738,9 +749,9 @@ int ieee80211_wx_set_auth(struct ieee80211_device *ieee,
 	case IW_AUTH_CIPHER_GROUP:
 	case IW_AUTH_KEY_MGMT:
 		/*
- *                  * Host AP driver does not use these parameters and allows
- *                                   * wpa_supplicant to control them internally.
- *                                                    */
+		* Host AP driver does not use these parameters and allows
+		* wpa_supplicant to control them internally.
+		*/
 		break;
 	case IW_AUTH_TKIP_COUNTERMEASURES:
 		ieee->tkip_countermeasures = data->value;
diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h b/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h
index 1a727856ba53..215748895c2d 100644
--- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h
+++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h
@@ -51,4 +51,4 @@ struct ba_record {
 	union sequence_control	start_seq_ctrl;
 };

-#endif //end _BATYPE_H_
+#endif /* end _BATYPE_H_ */
diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c
index 53869b3c985c..adfe1878f36d 100644
--- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c
+++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c
@@ -42,17 +42,17 @@ static void DeActivateBAEntry(struct ieee80211_device *ieee, struct ba_record *p
  ********************************************************************************************************************/
 static u8 TxTsDeleteBA(struct ieee80211_device *ieee, struct tx_ts_record *pTxTs)
 {
-	struct ba_record *pAdmittedBa = &pTxTs->tx_admitted_ba_record;  //These two BA entries must exist in TS structure
+	struct ba_record *pAdmittedBa = &pTxTs->tx_admitted_ba_record;  /* These two BA entries must exist in TS structure */
 	struct ba_record *pPendingBa = &pTxTs->tx_pending_ba_record;
 	u8			bSendDELBA = false;

-	// Delete pending BA
+	/* Delete pending BA */
 	if (pPendingBa->valid) {
 		DeActivateBAEntry(ieee, pPendingBa);
 		bSendDELBA = true;
 	}

-	// Delete admitted BA
+	/* Delete admitted BA */
 	if (pAdmittedBa->valid) {
 		DeActivateBAEntry(ieee, pAdmittedBa);
 		bSendDELBA = true;
@@ -95,7 +95,7 @@ void ResetBaEntry(struct ba_record *pBA)
 	pBA->dialog_token		= 0;
 	pBA->start_seq_ctrl.short_data	= 0;
 }
-//These functions need porting here or not?
+/* These functions need porting here or not? */
 /*******************************************************************************************************************************
  *function:  construct ADDBAREQ and ADDBARSP frame here together.
  *   input:  u8*		Dst	//ADDBA frame's destination
@@ -117,11 +117,11 @@ static struct sk_buff *ieee80211_ADDBA(struct ieee80211_device *ieee, u8 *Dst, s
 		IEEE80211_DEBUG(IEEE80211_DL_ERR, "pBA is NULL\n");
 		return NULL;
 	}
-	skb = dev_alloc_skb(len + sizeof(struct rtl_80211_hdr_3addr)); //need to add something others? FIXME
+	skb = dev_alloc_skb(len + sizeof(struct rtl_80211_hdr_3addr)); /* need to add something others? FIXME */
 	if (!skb)
 		return NULL;

-	memset(skb->data, 0, sizeof(struct rtl_80211_hdr_3addr));	//I wonder whether it's necessary. Apparently kernel will not do it when alloc a skb.
+	memset(skb->data, 0, sizeof(struct rtl_80211_hdr_3addr));	/* I wonder whether it's necessary. Apparently kernel will not do it when alloc a skb. */
 	skb_reserve(skb, ieee->tx_headroom);

 	BAReq = skb_put(skb, sizeof(struct rtl_80211_hdr_3addr));
@@ -131,33 +131,33 @@ static struct sk_buff *ieee80211_ADDBA(struct ieee80211_device *ieee, u8 *Dst, s

 	memcpy(BAReq->addr3, ieee->current_network.bssid, ETH_ALEN);

-	BAReq->frame_ctl = cpu_to_le16(IEEE80211_STYPE_MANAGE_ACT); //action frame
+	BAReq->frame_ctl = cpu_to_le16(IEEE80211_STYPE_MANAGE_ACT); /* action frame */

 	//tag += sizeof( struct rtl_80211_hdr_3addr); //move to action field
 	tag = skb_put(skb, 9);
 	*tag++ = ACT_CAT_BA;
 	*tag++ = type;
-	// Dialog Token
+	/* Dialog Token */
 	*tag++ = pBA->dialog_token;

 	if (ACT_ADDBARSP == type) {
-		// Status Code
+		/* Status Code */
 		netdev_info(ieee->dev, "=====>to send ADDBARSP\n");

 		put_unaligned_le16(StatusCode, tag);
 		tag += 2;
 	}
-	// BA Parameter Set
+	/* BA Parameter Set */

 	put_unaligned_le16(pBA->param_set.short_data, tag);
 	tag += 2;
-	// BA Timeout Value
+	/* BA Timeout Value */

 	put_unaligned_le16(pBA->timeout_value, tag);
 	tag += 2;

 	if (ACT_ADDBAREQ == type) {
-	// BA Start SeqCtrl
+	/* BA Start SeqCtrl */
 		memcpy(tag, (u8 *)&(pBA->start_seq_ctrl), 2);
 		tag += 2;
 	}
@@ -202,7 +202,7 @@ static struct sk_buff *ieee80211_DELBA(
 	DelbaParamSet.field.initiator	= (TxRxSelect == TX_DIR) ? 1 : 0;
 	DelbaParamSet.field.tid	= pBA->param_set.field.tid;

-	skb = dev_alloc_skb(len + sizeof(struct rtl_80211_hdr_3addr)); //need to add something others? FIXME
+	skb = dev_alloc_skb(len + sizeof(struct rtl_80211_hdr_3addr)); /* need to add something others? FIXME */
 	if (!skb)
 		return NULL;
 //	memset(skb->data, 0, len+sizeof( struct rtl_80211_hdr_3addr));
@@ -213,18 +213,18 @@ static struct sk_buff *ieee80211_DELBA(
 	memcpy(Delba->addr1, dst, ETH_ALEN);
 	memcpy(Delba->addr2, ieee->dev->dev_addr, ETH_ALEN);
 	memcpy(Delba->addr3, ieee->current_network.bssid, ETH_ALEN);
-	Delba->frame_ctl = cpu_to_le16(IEEE80211_STYPE_MANAGE_ACT); //action frame
+	Delba->frame_ctl = cpu_to_le16(IEEE80211_STYPE_MANAGE_ACT); /* action frame */

 	tag = skb_put(skb, 6);

 	*tag++ = ACT_CAT_BA;
 	*tag++ = ACT_DELBA;

-	// DELBA Parameter Set
+	/* DELBA Parameter Set */

 	put_unaligned_le16(DelbaParamSet.short_data, tag);
 	tag += 2;
-	// Reason Code
+	/* Reason Code */

 	put_unaligned_le16(ReasonCode, tag);
 	tag += 2;
@@ -247,13 +247,15 @@ static void ieee80211_send_ADDBAReq(struct ieee80211_device *ieee,
 				    u8 *dst, struct ba_record *pBA)
 {
 	struct sk_buff *skb;
-	skb = ieee80211_ADDBA(ieee, dst, pBA, 0, ACT_ADDBAREQ); //construct ACT_ADDBAREQ frames so set statuscode zero.
+	skb = ieee80211_ADDBA(ieee, dst, pBA, 0, ACT_ADDBAREQ); /* construct ACT_ADDBAREQ frames so set statuscode zero. */

 	if (skb) {
 		softmac_mgmt_xmit(skb, ieee);
-		//add statistic needed here.
-		//and skb will be freed in softmac_mgmt_xmit(), so omit all dev_kfree_skb_any() outside softmac_mgmt_xmit()
-		//WB
+		/*
+		 * add statistic needed here.
+		 * and skb will be freed in softmac_mgmt_xmit(), so omit all dev_kfree_skb_any() outside softmac_mgmt_xmit()
+		 * WB
+		 */
 	} else {
 		IEEE80211_DEBUG(IEEE80211_DL_ERR, "alloc skb error in function %s()\n", __func__);
 	}
@@ -271,10 +273,10 @@ static void ieee80211_send_ADDBARsp(struct ieee80211_device *ieee, u8 *dst,
 				    struct ba_record *pBA, u16 StatusCode)
 {
 	struct sk_buff *skb;
-	skb = ieee80211_ADDBA(ieee, dst, pBA, StatusCode, ACT_ADDBARSP); //construct ACT_ADDBARSP frames
+	skb = ieee80211_ADDBA(ieee, dst, pBA, StatusCode, ACT_ADDBARSP); /* construct ACT_ADDBARSP frames */
 	if (skb) {
 		softmac_mgmt_xmit(skb, ieee);
-		//same above
+		/* same above */
 	} else {
 		IEEE80211_DEBUG(IEEE80211_DL_ERR, "alloc skb error in function %s()\n", __func__);
 	}
@@ -297,10 +299,10 @@ static void ieee80211_send_DELBA(struct ieee80211_device *ieee, u8 *dst,
 				 u16 ReasonCode)
 {
 	struct sk_buff *skb;
-	skb = ieee80211_DELBA(ieee, dst, pBA, TxRxSelect, ReasonCode); //construct ACT_ADDBARSP frames
+	skb = ieee80211_DELBA(ieee, dst, pBA, TxRxSelect, ReasonCode); /* construct ACT_ADDBARSP frames */
 	if (skb) {
 		softmac_mgmt_xmit(skb, ieee);
-		//same above
+		/* same above */
 	} else {
 		IEEE80211_DEBUG(IEEE80211_DL_ERR, "alloc skb error in function %s()\n", __func__);
 	}
@@ -337,13 +339,13 @@ int ieee80211_rx_ADDBAReq(struct ieee80211_device *ieee, struct sk_buff *skb)
 	tag = (u8 *)req;
 	dst = &req->addr2[0];
 	tag += sizeof(struct rtl_80211_hdr_3addr);
-	pDialogToken = tag + 2;  //category+action
-	pBaParamSet = (union ba_param_set *)(tag + 3);   //+DialogToken
+	pDialogToken = tag + 2;  /* category+action */
+	pBaParamSet = (union ba_param_set *)(tag + 3);   /* +DialogToken */
 	pBaTimeoutVal = (u16 *)(tag + 5);
 	pBaStartSeqCtrl = (union sequence_control *)(req + 7);

 	netdev_info(ieee->dev, "====================>rx ADDBAREQ from :%pM\n", dst);
-//some other capability is not ready now.
+	/* some other capability is not ready now. */
 	if ((ieee->current_network.qos_data.active == 0) ||
 		(!ieee->pHTInfo->bCurrentHTSupport)) //||
 	//	(!ieee->pStaQos->bEnableRxImmBA)	)
@@ -352,8 +354,8 @@ int ieee80211_rx_ADDBAReq(struct ieee80211_device *ieee, struct sk_buff *skb)
 		IEEE80211_DEBUG(IEEE80211_DL_ERR, "Failed to reply on ADDBA_REQ as some capability is not ready(%d, %d)\n", ieee->current_network.qos_data.active, ieee->pHTInfo->bCurrentHTSupport);
 		goto OnADDBAReq_Fail;
 	}
-	// Search for related traffic stream.
-	// If there is no matched TS, reject the ADDBA request.
+	/* Search for related traffic stream. */
+	/* If there is no matched TS, reject the ADDBA request. */
 	if (!GetTs(
 			ieee,
 			(struct ts_common_info **)(&pTS),
@@ -366,23 +368,23 @@ int ieee80211_rx_ADDBAReq(struct ieee80211_device *ieee, struct sk_buff *skb)
 		goto OnADDBAReq_Fail;
 	}
 	pBA = &pTS->rx_admitted_ba_record;
-	// To Determine the ADDBA Req content
-	// We can do much more check here, including buffer_size, AMSDU_Support, Policy, StartSeqCtrl...
-	// I want to check StartSeqCtrl to make sure when we start aggregation!!!
-	//
+	/*
+	 * To Determine the ADDBA Req content
+	 * We can do much more check here, including buffer_size, AMSDU_Support, Policy, StartSeqCtrl...
+	 * I want to check StartSeqCtrl to make sure when we start aggregation!!!
+	 */
 	if (pBaParamSet->field.ba_policy == BA_POLICY_DELAYED) {
 		rc = ADDBA_STATUS_INVALID_PARAM;
 		IEEE80211_DEBUG(IEEE80211_DL_ERR, "BA Policy is not correct in %s()\n", __func__);
 		goto OnADDBAReq_Fail;
 	}
-		// Admit the ADDBA Request
-	//
+		/* Admit the ADDBA Request */
 	DeActivateBAEntry(ieee, pBA);
 	pBA->dialog_token = *pDialogToken;
 	pBA->param_set = *pBaParamSet;
 	pBA->timeout_value = *pBaTimeoutVal;
 	pBA->start_seq_ctrl = *pBaStartSeqCtrl;
-	//for half N mode we only aggregate 1 frame
+	/* for half N mode we only aggregate 1 frame */
 	if (ieee->GetHalfNmodeSupportByAPsHandler(ieee->dev))
 		pBA->param_set.field.buffer_size = 1;
 	else
@@ -390,7 +392,7 @@ int ieee80211_rx_ADDBAReq(struct ieee80211_device *ieee, struct sk_buff *skb)
 	ActivateBAEntry(ieee, pBA, pBA->timeout_value);
 	ieee80211_send_ADDBARsp(ieee, dst, pBA, ADDBA_STATUS_SUCCESS);

-	// End of procedure.
+	/* End of procedure. */
 	return 0;

 OnADDBAReq_Fail:
@@ -401,7 +403,7 @@ int ieee80211_rx_ADDBAReq(struct ieee80211_device *ieee, struct sk_buff *skb)
 		BA.dialog_token = *pDialogToken;
 		BA.param_set.field.ba_policy = BA_POLICY_IMMEDIATE;
 		ieee80211_send_ADDBARsp(ieee, dst, &BA, rc);
-		return 0; //we send RSP out.
+		return 0; /* we send RSP out. */
 	}

 }
@@ -438,8 +440,10 @@ int ieee80211_rx_ADDBARsp(struct ieee80211_device *ieee, struct sk_buff *skb)
 	pBaParamSet = (union ba_param_set *)(tag + 5);
 	pBaTimeoutVal = (u16 *)(tag + 7);

-	// Check the capability
-	// Since we can always receive A-MPDU, we just check if it is under HT mode.
+	/*
+	 * Check the capability
+	 * Since we can always receive A-MPDU, we just check if it is under HT mode.
+	 */
 	if (ieee->current_network.qos_data.active == 0  ||
 	    !ieee->pHTInfo->bCurrentHTSupport ||
 	    !ieee->pHTInfo->bCurrentAMPDUEnable) {
@@ -449,10 +453,10 @@ int ieee80211_rx_ADDBARsp(struct ieee80211_device *ieee, struct sk_buff *skb)
 	}


-	//
-	// Search for related TS.
-	// If there is no TS found, we wil reject ADDBA Rsp by sending DELBA frame.
-	//
+	/*
+	 * Search for related TS.
+	 * If there is no TS found, we wil reject ADDBA Rsp by sending DELBA frame.
+	 */
 	if (!GetTs(
 			ieee,
 			(struct ts_common_info **)(&pTS),
@@ -470,12 +474,12 @@ int ieee80211_rx_ADDBARsp(struct ieee80211_device *ieee, struct sk_buff *skb)
 	pAdmittedBA = &pTS->tx_admitted_ba_record;


-	//
-	// Check if related BA is waiting for setup.
-	// If not, reject by sending DELBA frame.
-	//
+	/*
+	 * Check if related BA is waiting for setup.
+	 * If not, reject by sending DELBA frame.
+	 */
 	if (pAdmittedBA->valid) {
-		// Since BA is already setup, we ignore all other ADDBA Response.
+		/* Since BA is already setup, we ignore all other ADDBA Response. */
 		IEEE80211_DEBUG(IEEE80211_DL_BA, "OnADDBARsp(): Recv ADDBA Rsp. Drop because already admit it! \n");
 		return -1;
 	} else if ((!pPendingBA->valid) || (*pDialogToken != pPendingBA->dialog_token)) {
@@ -489,13 +493,13 @@ int ieee80211_rx_ADDBARsp(struct ieee80211_device *ieee, struct sk_buff *skb)


 	if (*pStatusCode == ADDBA_STATUS_SUCCESS) {
-		//
-		// Determine ADDBA Rsp content here.
-		// We can compare the value of BA parameter set that Peer returned and Self sent.
-		// If it is OK, then admitted. Or we can send DELBA to cancel BA mechanism.
-		//
+		/*
+		 * Determine ADDBA Rsp content here.
+		 * We can compare the value of BA parameter set that Peer returned and Self sent.
+		 * If it is OK, then admitted. Or we can send DELBA to cancel BA mechanism.
+		 */
 		if (pBaParamSet->field.ba_policy == BA_POLICY_DELAYED) {
-			// Since this is a kind of ADDBA failed, we delay next ADDBA process.
+			/* Since this is a kind of ADDBA failed, we delay next ADDBA process. */
 			pTS->add_ba_req_delayed = true;
 			DeActivateBAEntry(ieee, pAdmittedBA);
 			ReasonCode = DELBA_REASON_END_BA;
@@ -503,9 +507,9 @@ int ieee80211_rx_ADDBARsp(struct ieee80211_device *ieee, struct sk_buff *skb)
 		}


-		//
-		// Admitted condition
-		//
+		/*
+		 * Admitted condition
+		 */
 		pAdmittedBA->dialog_token = *pDialogToken;
 		pAdmittedBA->timeout_value = *pBaTimeoutVal;
 		pAdmittedBA->start_seq_ctrl = pPendingBA->start_seq_ctrl;
@@ -513,11 +517,11 @@ int ieee80211_rx_ADDBARsp(struct ieee80211_device *ieee, struct sk_buff *skb)
 		DeActivateBAEntry(ieee, pAdmittedBA);
 		ActivateBAEntry(ieee, pAdmittedBA, *pBaTimeoutVal);
 	} else {
-		// Delay next ADDBA process.
+		/* Delay next ADDBA process. */
 		pTS->add_ba_req_delayed = true;
 	}

-	// End of procedure
+	/* End of procedure */
 	return 0;

 OnADDBARsp_Reject:
@@ -600,9 +604,9 @@ int ieee80211_rx_DELBA(struct ieee80211_device *ieee, struct sk_buff *skb)
 	return 0;
 }

-//
-// ADDBA initiate. This can only be called by TX side.
-//
+/*
+ * ADDBA initiate. This can only be called by TX side.
+ */
 void
 TsInitAddBA(
 	struct ieee80211_device *ieee,
@@ -616,17 +620,17 @@ TsInitAddBA(
 	if (pBA->valid && !bOverwritePending)
 		return;

-	// Set parameters to "Pending" variable set
+	/* Set parameters to "Pending" variable set */
 	DeActivateBAEntry(ieee, pBA);

-	pBA->dialog_token++;						// DialogToken: Only keep the latest dialog token
-	pBA->param_set.field.amsdu_support = 0;	// Do not support A-MSDU with A-MPDU now!!
-	pBA->param_set.field.ba_policy = Policy;	// Policy: Delayed or Immediate
-	pBA->param_set.field.tid = pTS->ts_common_info.t_spec.ts_info.uc_tsid;	// TID
-	// buffer_size: This need to be set according to A-MPDU vector
-	pBA->param_set.field.buffer_size = 32;		// buffer_size: This need to be set according to A-MPDU vector
-	pBA->timeout_value = 0;					// Timeout value: Set 0 to disable Timer
-	pBA->start_seq_ctrl.field.seq_num = (pTS->tx_cur_seq + 3) % 4096;	// Block Ack will start after 3 packets later.
+	pBA->dialog_token++;						/* DialogToken: Only keep the latest dialog token */
+	pBA->param_set.field.amsdu_support = 0;	/* Do not support A-MSDU with A-MPDU now!! */
+	pBA->param_set.field.ba_policy = Policy;	/* Policy: Delayed or Immediate */
+	pBA->param_set.field.tid = pTS->ts_common_info.t_spec.ts_info.uc_tsid;	/* TID */
+	/* buffer_size: This need to be set according to A-MPDU vector */
+	pBA->param_set.field.buffer_size = 32;		/* buffer_size: This need to be set according to A-MPDU vector */
+	pBA->timeout_value = 0;					/* Timeout value: Set 0 to disable Timer */
+	pBA->start_seq_ctrl.field.seq_num = (pTS->tx_cur_seq + 3) % 4096;	/* Block Ack will start after 3 packets later. */

 	ActivateBAEntry(ieee, pBA, BA_SETUP_TIMEOUT);

diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h b/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h
index b7769bca9740..5691de03e740 100644
--- a/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h
+++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h
@@ -38,7 +38,7 @@ enum ht_extension_chan_offset {
 };

 struct ht_capability_ele {
-	//HT capability info
+	/* HT capability info */
 	u8	AdvCoding:1;
 	u8	ChlWidth:1;
 	u8	MimoPwrSave:2;
@@ -54,21 +54,21 @@ struct ht_capability_ele {
 	u8	Rsvd1:1;
 	u8	LSigTxopProtect:1;

-	//MAC HT parameters info
+	/* MAC HT parameters info */
 	u8	MaxRxAMPDUFactor:2;
 	u8	MPDUDensity:3;
 	u8	Rsvd2:3;

-	//Supported MCS set
+	/* Supported MCS set */
 	u8	MCS[16];

-	//Extended HT Capability Info
+	/* Extended HT Capability Info */
 	u16	ExtHTCapInfo;

-	//TXBF Capabilities
+	/* TXBF Capabilities */
 	u8	TxBFCap[4];

-	//Antenna Selection Capabilities
+	/* Antenna Selection Capabilities */
 	u8	ASCap;

 } __packed;
@@ -124,49 +124,49 @@ typedef struct _RT_HIGH_THROUGHPUT {
 	u8				bEnableHT;
 	u8				bCurrentHTSupport;

-	u8				bRegBW40MHz;				// Tx 40MHz channel capability
-	u8				bCurBW40MHz;				// Tx 40MHz channel capability
+	u8				bRegBW40MHz;				/* Tx 40MHz channel capability */
+	u8				bCurBW40MHz;				/* Tx 40MHz channel capability */

-	u8				bRegShortGI40MHz;			// Tx Short GI for 40Mhz
-	u8				bCurShortGI40MHz;			// Tx Short GI for 40MHz
+	u8				bRegShortGI40MHz;			/* Tx Short GI for 40Mhz */
+	u8				bCurShortGI40MHz;			/* Tx Short GI for 40MHz */

-	u8				bRegShortGI20MHz;			// Tx Short GI for 20MHz
-	u8				bCurShortGI20MHz;			// Tx Short GI for 20MHz
+	u8				bRegShortGI20MHz;			/* Tx Short GI for 20MHz */
+	u8				bCurShortGI20MHz;			/* Tx Short GI for 20MHz */

-	u8				bRegSuppCCK;				// Tx CCK rate capability
-	u8				bCurSuppCCK;				// Tx CCK rate capability
+	u8				bRegSuppCCK;				/* Tx CCK rate capability */
+	u8				bCurSuppCCK;				/* Tx CCK rate capability */

-	// 802.11n spec version for "peer"
+	/* 802.11n spec version for "peer" */
 	HT_SPEC_VER			ePeerHTSpecVer;

-	// HT related information for "Self"
-	struct ht_capability_ele	SelfHTCap;		// This is HT cap element sent to peer STA, which also indicate HT Rx capabilities.
-	HT_INFORMATION_ELE	SelfHTInfo;		// This is HT info element sent to peer STA, which also indicate HT Rx capabilities.
+	/* HT related information for "Self" */
+	struct ht_capability_ele	SelfHTCap;		/* This is HT cap element sent to peer STA, which also indicate HT Rx capabilities. */
+	HT_INFORMATION_ELE	SelfHTInfo;		/* This is HT info element sent to peer STA, which also indicate HT Rx capabilities. */

-	// HT related information for "Peer"
+	/* HT related information for "Peer" */
 	u8				PeerHTCapBuf[32];
 	u8				PeerHTInfoBuf[32];

-	// A-MSDU related
-	u8				bAMSDU_Support;			// This indicates Tx A-MSDU capability
-	u16				nAMSDU_MaxSize;			// This indicates Tx A-MSDU capability
-	u8				bCurrent_AMSDU_Support;	// This indicates Tx A-MSDU capability
-	u16				nCurrent_AMSDU_MaxSize;	// This indicates Tx A-MSDU capability
-
-	// AMPDU  related <2006.08.10 Emily>
-	u8				bAMPDUEnable;				// This indicate Tx A-MPDU capability
-	u8				bCurrentAMPDUEnable;		// This indicate Tx A-MPDU capability
-	u8				AMPDU_Factor;				// This indicate Tx A-MPDU capability
-	u8				CurrentAMPDUFactor;		// This indicate Tx A-MPDU capability
-	u8				MPDU_Density;				// This indicate Tx A-MPDU capability
-	u8				CurrentMPDUDensity;			// This indicate Tx A-MPDU capability
-
-	// Forced A-MPDU enable
+	/* A-MSDU related */
+	u8				bAMSDU_Support;			/* This indicates Tx A-MSDU capability */
+	u16				nAMSDU_MaxSize;			/* This indicates Tx A-MSDU capability */
+	u8				bCurrent_AMSDU_Support;	/* This indicates Tx A-MSDU capability */
+	u16				nCurrent_AMSDU_MaxSize;	/* This indicates Tx A-MSDU capability */
+
+	/* AMPDU  related <2006.08.10 Emily> */
+	u8				bAMPDUEnable;				/* This indicate Tx A-MPDU capability */
+	u8				bCurrentAMPDUEnable;		/* This indicate Tx A-MPDU capability */
+	u8				AMPDU_Factor;				/* This indicate Tx A-MPDU capability */
+	u8				CurrentAMPDUFactor;		/* This indicate Tx A-MPDU capability */
+	u8				MPDU_Density;				/* This indicate Tx A-MPDU capability */
+	u8				CurrentMPDUDensity;			/* This indicate Tx A-MPDU capability */
+
+	/* Forced A-MPDU enable */
 	HT_AGGRE_MODE_E	ForcedAMPDUMode;
 	u8				ForcedAMPDUFactor;
 	u8				ForcedMPDUDensity;

-	// Forced A-MSDU enable
+	/* Forced A-MSDU enable */
 	HT_AGGRE_MODE_E	ForcedAMSDUMode;
 	u16				ForcedAMSDUMaxSize;

@@ -174,27 +174,27 @@ typedef struct _RT_HIGH_THROUGHPUT {

 	u8				CurrentOpMode;

-	// MIMO PS related
+	/* MIMO PS related */
 	u8				SelfMimoPs;
 	u8				PeerMimoPs;

-	// 40MHz Channel Offset settings.
+	/* 40MHz Channel Offset settings. */
 	enum ht_extension_chan_offset	CurSTAExtChnlOffset;
-	u8				bCurTxBW40MHz;	// If we use 40 MHz to Tx
+	u8				bCurTxBW40MHz;	/* If we use 40 MHz to Tx */
 	u8				PeerBandwidth;

-	// For Bandwidth Switching
+	/* For Bandwidth Switching */
 	u8				bSwBwInProgress;
 	u8				SwBwStep;
 	//struct timer_list		SwBwTimer;  //moved to ieee80211_device. as timer_list need include some header file here.

-	// For Realtek proprietary A-MPDU factor for aggregation
+	/* For Realtek proprietary A-MPDU factor for aggregation */
 	u8				bRegRT2RTAggregation;
 	u8				bCurrentRT2RTAggregation;
 	u8				bCurrentRT2RTLongSlotTime;
 	u8				szRT2RTAggBuffer[10];

-	// Rx Reorder control
+	/* Rx Reorder control */
 	u8				bRegRxReorderEnable;
 	u8				bCurRxReorderEnable;
 	u8				RxReorderWinSize;
@@ -211,10 +211,10 @@ typedef struct _RT_HIGH_THROUGHPUT {
 	u8				UsbRxFwAggrTimeout;
 #endif

-	// Add for Broadcom(Linksys) IOT. Joseph
+	/* Add for Broadcom(Linksys) IOT. Joseph */
 	u8				bIsPeerBcm;

-	// For IOT issue.
+	/* For IOT issue. */
 	u8				IOTPeer;
 	u32				IOTAction;
 } __attribute__ ((packed)) RT_HIGH_THROUGHPUT, *PRT_HIGH_THROUGHPUT;
@@ -226,7 +226,7 @@ typedef struct _RT_HIGH_THROUGHPUT {
 typedef struct _BSS_HT {
 	u8				bdSupportHT;

-	// HT related elements
+	/* HT related elements */
 	u8					bdHTCapBuf[32];
 	u16					bdHTCapLen;
 	u8					bdHTInfoBuf[32];
@@ -258,9 +258,9 @@ extern u8 MCS_FILTER_1SS[16];
 						(LegacyRate) :\
 						(PICK_RATE(LegacyRate, HTRate))

-// MCS Bw 40 {1~7, 12~15,32}
+/* MCS Bw 40 {1~7, 12~15,32} */
 #define	RATE_ADPT_1SS_MASK		0xFF
-#define	RATE_ADPT_2SS_MASK		0xF0 //Skip MCS8~11 because mcs7 > mcs6, 9, 10, 11. 2007.01.16 by Emily
+#define	RATE_ADPT_2SS_MASK		0xF0 /* Skip MCS8~11 because mcs7 > mcs6, 9, 10, 11. 2007.01.16 by Emily */
 #define	RATE_ADPT_MCS32_MASK		0x01

 #define		IS_11N_MCS_RATE(rate)		(rate & 0x80)
@@ -300,4 +300,4 @@ typedef enum _HT_IOT_ACTION {
 	HT_IOT_ACT_FORCED_CTS2SELF = 0x00000200,
 }HT_IOT_ACTION_E, *PHT_IOT_ACTION_E;

-#endif //_RTL819XU_HTTYPE_H_
+#endif /* _RTL819XU_HTTYPE_H_ */
diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c
index c73a8058cf87..4359d6f5735c 100644
--- a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c
+++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c
@@ -15,29 +15,29 @@ u16 MCS_DATA_RATE[2][2][77] = {
 		 39, 78, 117, 234, 312, 351, 390, 52, 104, 156, 208, 312, 416, 468, 520,
 		 0, 78, 104, 130, 117, 156, 195, 104, 130, 130, 156, 182, 182, 208, 156, 195,
 		 195, 234, 273, 273, 312, 130, 156, 181, 156, 181, 208, 234, 208, 234, 260, 260,
-		 286, 195, 234, 273, 234, 273, 312, 351, 312, 351, 390, 390, 429},			// Long GI, 20MHz
+		 286, 195, 234, 273, 234, 273, 312, 351, 312, 351, 390, 390, 429},			/* Long GI, 20MHz */
 		{14, 29, 43, 58, 87, 116, 130, 144, 29, 58, 87, 116, 173, 231, 260, 289,
 		 43, 87, 130, 173, 260, 347, 390, 433, 58, 116, 173, 231, 347, 462, 520, 578,
 		 0, 87, 116, 144, 130, 173, 217, 116, 144, 144, 173, 202, 202, 231, 173, 217,
 		 217, 260, 303, 303, 347, 144, 173, 202, 173, 202, 231, 260, 231, 260, 289, 289,
-		 318, 217, 260, 303, 260, 303, 347, 390, 347, 390, 433, 433, 477}	},		// Short GI, 20MHz
+		 318, 217, 260, 303, 260, 303, 347, 390, 347, 390, 433, 433, 477}	},		/* Short GI, 20MHz */
 	{	{27, 54, 81, 108, 162, 216, 243, 270, 54, 108, 162, 216, 324, 432, 486, 540,
 		 81, 162, 243, 324, 486, 648, 729, 810, 108, 216, 324, 432, 648, 864, 972, 1080,
 		 12, 162, 216, 270, 243, 324, 405, 216, 270, 270, 324, 378, 378, 432, 324, 405,
 		 405, 486, 567, 567, 648, 270, 324, 378, 324, 378, 432, 486, 432, 486, 540, 540,
-		 594, 405, 486, 567, 486, 567, 648, 729, 648, 729, 810, 810, 891},	// Long GI, 40MHz
+		 594, 405, 486, 567, 486, 567, 648, 729, 648, 729, 810, 810, 891},	/* Long GI, 40MHz */
 		{30, 60, 90, 120, 180, 240, 270, 300, 60, 120, 180, 240, 360, 480, 540, 600,
 		 90, 180, 270, 360, 540, 720, 810, 900, 120, 240, 360, 480, 720, 960, 1080, 1200,
 		 13, 180, 240, 300, 270, 360, 450, 240, 300, 300, 360, 420, 420, 480, 360, 450,
 		 450, 540, 630, 630, 720, 300, 360, 420, 360, 420, 480, 540, 480, 540, 600, 600,
-		 660, 450, 540, 630, 540, 630, 720, 810, 720, 810, 900, 900, 990}	}	// Short GI, 40MHz
+		 660, 450, 540, 630, 540, 630, 720, 810, 720, 810, 900, 900, 990}	}	/* Short GI, 40MHz */
 };

 static u8 UNKNOWN_BORADCOM[3] = {0x00, 0x14, 0xbf};
 static u8 LINKSYSWRT330_LINKSYSWRT300_BROADCOM[3] = {0x00, 0x1a, 0x70};
 static u8 LINKSYSWRT350_LINKSYSWRT150_BROADCOM[3] = {0x00, 0x1d, 0x7e};
 static u8 NETGEAR834Bv2_BROADCOM[3] = {0x00, 0x1b, 0x2f};
-static u8 BELKINF5D8233V1_RALINK[3] = {0x00, 0x17, 0x3f};	//cosa 03202008
+static u8 BELKINF5D8233V1_RALINK[3] = {0x00, 0x17, 0x3f};	/* cosa 03202008 */
 static u8 BELKINF5D82334V3_RALINK[3] = {0x00, 0x1c, 0xdf};
 static u8 PCI_RALINK[3] = {0x00, 0x90, 0xcc};
 static u8 EDIMAX_RALINK[3] = {0x00, 0x0e, 0x2e};
@@ -63,47 +63,47 @@ void HTUpdateDefaultSetting(struct ieee80211_device *ieee)

 	//printk("pHTinfo:%p, &pHTinfo:%p, mptr:%p,  offsetof:%x\n", pHTInfo, &pHTInfo, __mptr, offsetof(struct ieee80211_device, pHTInfo));
 	//printk("===>ieee:%p,\n", ieee);
-	// ShortGI support
+	/* ShortGI support */
 	pHTInfo->bRegShortGI20MHz = 1;
 	pHTInfo->bRegShortGI40MHz = 1;

-	// 40MHz channel support
+	/* 40MHz channel support */
 	pHTInfo->bRegBW40MHz = 1;

-	// CCK rate support in 40MHz channel
+	/* CCK rate support in 40MHz channel */
 	if (pHTInfo->bRegBW40MHz)
 		pHTInfo->bRegSuppCCK = 1;
 	else
 		pHTInfo->bRegSuppCCK = true;

-	// AMSDU related
+	/* AMSDU related */
 	pHTInfo->nAMSDU_MaxSize = 7935UL;
 	pHTInfo->bAMSDU_Support = 0;

-	// AMPDU related
+	/* AMPDU related */
 	pHTInfo->bAMPDUEnable = 1;
-	pHTInfo->AMPDU_Factor = 2; //// 0: 2n13(8K), 1:2n14(16K), 2:2n15(32K), 3:2n16(64k)
-	pHTInfo->MPDU_Density = 0;// 0: No restriction, 1: 1/8usec, 2: 1/4usec, 3: 1/2usec, 4: 1usec, 5: 2usec, 6: 4usec, 7:8usec
+	pHTInfo->AMPDU_Factor = 2; /* // 0: 2n13(8K), 1:2n14(16K), 2:2n15(32K), 3:2n16(64k) */
+	pHTInfo->MPDU_Density = 0;/* 0: No restriction, 1: 1/8usec, 2: 1/4usec, 3: 1/2usec, 4: 1usec, 5: 2usec, 6: 4usec, 7:8usec */

-	// MIMO Power Save
-	pHTInfo->SelfMimoPs = 3;// 0: Static Mimo Ps, 1: Dynamic Mimo Ps, 3: No Limitation, 2: Reserved(Set to 3 automatically.)
+	/* MIMO Power Save */
+	pHTInfo->SelfMimoPs = 3;/* 0: Static Mimo Ps, 1: Dynamic Mimo Ps, 3: No Limitation, 2: Reserved(Set to 3 automatically.) */
 	if (pHTInfo->SelfMimoPs == 2)
 		pHTInfo->SelfMimoPs = 3;
-	// 8190 only. Assign rate operation mode to firmware
+	/* 8190 only. Assign rate operation mode to firmware */
 	ieee->bTxDisableRateFallBack = 0;
 	ieee->bTxUseDriverAssingedRate = 0;

 #ifdef	TO_DO_LIST
-	// 8190 only. Assign duration operation mode to firmware
+	/* 8190 only. Assign duration operation mode to firmware */
 	pMgntInfo->bTxEnableFwCalcDur = (BOOLEAN)pNdisCommon->bRegTxEnableFwCalcDur;
 #endif
 	/*
 	 * 8190 only, Realtek proprietary aggregation mode
 	 * Set MPDUDensity=2,   1: Set MPDUDensity=2(32k)  for Realtek AP and set MPDUDensity=0(8k) for others
 	 */
-	pHTInfo->bRegRT2RTAggregation = 1;//0: Set MPDUDensity=2,   1: Set MPDUDensity=2(32k)  for Realtek AP and set MPDUDensity=0(8k) for others
+	pHTInfo->bRegRT2RTAggregation = 1;/* 0: Set MPDUDensity=2,   1: Set MPDUDensity=2(32k)  for Realtek AP and set MPDUDensity=0(8k) for others */

-	// For Rx Reorder Control
+	/* For Rx Reorder Control */
 	pHTInfo->bRegRxReorderEnable = 1;
 	pHTInfo->RxReorderWinSize = 64;
 	pHTInfo->RxReorderPendingTime = 30;
@@ -115,7 +115,7 @@ void HTUpdateDefaultSetting(struct ieee80211_device *ieee)
 	pHTInfo->UsbRxFwAggrEn = 1;
 	pHTInfo->UsbRxFwAggrPageNum = 24;
 	pHTInfo->UsbRxFwAggrPacketNum = 8;
-	pHTInfo->UsbRxFwAggrTimeout = 16; ////usb rx FW aggregation timeout threshold.It's in units of 64us
+	pHTInfo->UsbRxFwAggrTimeout = 16; /* usb rx FW aggregation timeout threshold.It's in units of 64us */
 #endif
 }

@@ -130,11 +130,11 @@ void HTUpdateDefaultSetting(struct ieee80211_device *ieee)
  */
 void HTDebugHTCapability(u8 *CapIE, u8 *TitleString)
 {
-	static u8	          EWC11NHTCap[] = {0x00, 0x90, 0x4c, 0x33};	// For 11n EWC definition, 2007.07.17, by Emily
+	static u8	          EWC11NHTCap[] = {0x00, 0x90, 0x4c, 0x33};	/* For 11n EWC definition, 2007.07.17, by Emily */
 	struct ht_capability_ele *pCapELE;

 	if (!memcmp(CapIE, EWC11NHTCap, sizeof(EWC11NHTCap))) {
-		//EWC IE
+		/* EWC IE */
 		IEEE80211_DEBUG(IEEE80211_DL_HT, "EWC IE in %s()\n", __func__);
 		pCapELE = (struct ht_capability_ele *)(&CapIE[4]);
 	} else {
@@ -165,11 +165,11 @@ void HTDebugHTCapability(u8 *CapIE, u8 *TitleString)
  */
 void HTDebugHTInfo(u8 *InfoIE, u8 *TitleString)
 {
-	static u8	EWC11NHTInfo[] = {0x00, 0x90, 0x4c, 0x34};	// For 11n EWC definition, 2007.07.17, by Emily
+	static u8	EWC11NHTInfo[] = {0x00, 0x90, 0x4c, 0x34};	/* For 11n EWC definition, 2007.07.17, by Emily */
 	PHT_INFORMATION_ELE		pHTInfoEle;

 	if (!memcmp(InfoIE, EWC11NHTInfo, sizeof(EWC11NHTInfo))) {
-		// Not EWC IE
+		/* Not EWC IE */
 		IEEE80211_DEBUG(IEEE80211_DL_HT, "EWC IE in %s()\n", __func__);
 		pHTInfoEle = (PHT_INFORMATION_ELE)(&InfoIE[4]);
 	} else {
@@ -366,14 +366,14 @@ static bool HTIOTActIsDisableMCS15(struct ieee80211_device *ieee)
 	bool retValue = false;

 #ifdef TODO
-	// Apply for 819u only
+	/* Apply for 819u only */
 #if (HAL_CODE_BASE == RTL8192)

 #if (DEV_BUS_TYPE == USB_INTERFACE)
-	// Alway disable MCS15 by Jerry Chang's request.by Emily, 2008.04.15
+	/* Alway disable MCS15 by Jerry Chang's request.by Emily, 2008.04.15 */
 	retValue = true;
 #elif (DEV_BUS_TYPE == PCI_INTERFACE)
-	// Enable MCS15 if the peer is Cisco AP. by Emily, 2008.05.12
+	/* Enable MCS15 if the peer is Cisco AP. by Emily, 2008.05.12 */
 //	if(pBssDesc->bCiscoCapExist)
 //		retValue = false;
 //	else
@@ -381,7 +381,7 @@ static bool HTIOTActIsDisableMCS15(struct ieee80211_device *ieee)
 #endif
 #endif
 #endif
-	// Jerry Chang suggest that 8190 1x2 does not need to disable MCS15
+	/* Jerry Chang suggest that 8190 1x2 does not need to disable MCS15 */

 	return retValue;
 }
@@ -403,7 +403,7 @@ static bool HTIOTActIsDisableMCSTwoSpatialStream(struct ieee80211_device *ieee,
 						 u8 *PeerMacAddr)
 {
 #ifdef TODO
-	// Apply for 819u only
+	/* Apply for 819u only */
 #endif
 	return false;
 }
@@ -433,8 +433,8 @@ static u8 HTIOTActIsMgntUseCCK6M(struct ieee80211_network *network)
 {
 	u8	retValue = 0;

-	// 2008/01/25 MH Judeg if we need to use OFDM to sned MGNT frame for broadcom AP.
-	// 2008/01/28 MH We must prevent that we select null bssid to link.
+	/* 2008/01/25 MH Judeg if we need to use OFDM to sned MGNT frame for broadcom AP. */
+	/* 2008/01/28 MH We must prevent that we select null bssid to link. */

 	if (network->broadcom_cap_exist)
 		retValue = 1;
@@ -484,7 +484,7 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u
 	}
 	memset(posHTCap, 0, *len);
 	if (pHT->ePeerHTSpecVer == HT_SPEC_VER_EWC) {
-		u8	EWC11NHTCap[] = {0x00, 0x90, 0x4c, 0x33};	// For 11n EWC definition, 2007.07.17, by Emily
+		u8	EWC11NHTCap[] = {0x00, 0x90, 0x4c, 0x33};	/* For 11n EWC definition, 2007.07.17, by Emily */

 		memcpy(posHTCap, EWC11NHTCap, sizeof(EWC11NHTCap));
 		pCapELE = (struct ht_capability_ele *)&posHTCap[4];
@@ -492,8 +492,8 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u
 		pCapELE = (struct ht_capability_ele *)posHTCap;
 	}

-	//HT capability info
-	pCapELE->AdvCoding		= 0; // This feature is not supported now!!
+	/* HT capability info */
+	pCapELE->AdvCoding		= 0; /* This feature is not supported now!! */
 	if (ieee->GetHalfNmodeSupportByAPsHandler(ieee->dev))
 		pCapELE->ChlWidth = 0;
 	else
@@ -501,18 +501,18 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u

 //	pCapELE->ChlWidth		= (pHT->bRegBW40MHz?1:0);
 	pCapELE->MimoPwrSave		= pHT->SelfMimoPs;
-	pCapELE->GreenField		= 0; // This feature is not supported now!!
-	pCapELE->ShortGI20Mhz		= 1; // We can receive Short GI!!
-	pCapELE->ShortGI40Mhz		= 1; // We can receive Short GI!!
+	pCapELE->GreenField		= 0; /* This feature is not supported now!! */
+	pCapELE->ShortGI20Mhz		= 1; /* We can receive Short GI!! */
+	pCapELE->ShortGI40Mhz		= 1; /* We can receive Short GI!! */
 	//DbgPrint("TX HT cap/info ele BW=%d SG20=%d SG40=%d\n\r",
 	//pCapELE->ChlWidth, pCapELE->ShortGI20Mhz, pCapELE->ShortGI40Mhz);
 	pCapELE->TxSTBC			= 1;
 	pCapELE->RxSTBC			= 0;
-	pCapELE->DelayBA		= 0;	// Do not support now!!
+	pCapELE->DelayBA		= 0;	/* Do not support now!! */
 	pCapELE->MaxAMSDUSize	        = (MAX_RECEIVE_BUFFER_SIZE >= 7935) ? 1 : 0;
 	pCapELE->DssCCk			= ((pHT->bRegBW40MHz) ? (pHT->bRegSuppCCK ? 1 : 0) : 0);
-	pCapELE->PSMP			= 0; // Do not support now!!
-	pCapELE->LSigTxopProtect	= 0; // Do not support now!!
+	pCapELE->PSMP			= 0; /* Do not support now!! */
+	pCapELE->LSigTxopProtect	= 0; /* Do not support now!! */

 	/*
 	 * MAC HT parameters info
@@ -521,14 +521,14 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u
 	IEEE80211_DEBUG(IEEE80211_DL_HT, "TX HT cap/info ele BW=%d MaxAMSDUSize:%d DssCCk:%d\n", pCapELE->ChlWidth, pCapELE->MaxAMSDUSize, pCapELE->DssCCk);

 	if (IsEncrypt) {
-		pCapELE->MPDUDensity	= 7; // 8us
-		pCapELE->MaxRxAMPDUFactor = 2; // 2 is for 32 K and 3 is 64K
+		pCapELE->MPDUDensity	= 7; /* 8us */
+		pCapELE->MaxRxAMPDUFactor = 2; /* 2 is for 32 K and 3 is 64K */
 	} else {
-		pCapELE->MaxRxAMPDUFactor = 3; // 2 is for 32 K and 3 is 64K
-		pCapELE->MPDUDensity	= 0; // no density
+		pCapELE->MaxRxAMPDUFactor = 3; /* 2 is for 32 K and 3 is 64K */
+		pCapELE->MPDUDensity	= 0; /* no density */
 	}

-	//Supported MCS set
+	/* Supported MCS set */
 	memcpy(pCapELE->MCS, ieee->Regdot11HTOperationalRateSet, 16);
 	if (pHT->IOTAction & HT_IOT_ACT_DISABLE_MCS15)
 		pCapELE->MCS[1] &= 0x7f;
@@ -550,15 +550,15 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u
 			pCapELE->MCS[i] = 0;
 	}

-	//Extended HT Capability Info
+	/* Extended HT Capability Info */
 	memset(&pCapELE->ExtHTCapInfo, 0, 2);

-	//TXBF Capabilities
+	/* TXBF Capabilities */
 	memset(pCapELE->TxBFCap, 0, 4);

-	//Antenna Selection Capabilities
+	/* Antenna Selection Capabilities */
 	pCapELE->ASCap = 0;
-//add 2 to give space for element ID and len when construct frames
+/* add 2 to give space for element ID and len when construct frames */
 	if (pHT->ePeerHTSpecVer == HT_SPEC_VER_EWC)
 		*len = 30 + 2;
 	else
@@ -597,7 +597,7 @@ void HTConstructInfoElement(struct ieee80211_device *ieee, u8 *posHTInfo, u8 *le
 	}

 	memset(posHTInfo, 0, *len);
-	if ((ieee->iw_mode == IW_MODE_ADHOC) || (ieee->iw_mode == IW_MODE_MASTER)) { //ap mode is not currently supported
+	if ((ieee->iw_mode == IW_MODE_ADHOC) || (ieee->iw_mode == IW_MODE_MASTER)) { /* ap mode is not currently supported */
 		pHTInfoEle->ControlChl			= ieee->current_network.channel;
 		pHTInfoEle->ExtChlOffset		= ((!pHT->bRegBW40MHz) ? HT_EXTCHNL_OFFSET_NO_EXT :
 											(ieee->current_network.channel <= 6) ?
@@ -616,9 +616,9 @@ void HTConstructInfoElement(struct ieee80211_device *ieee, u8 *posHTInfo, u8 *le

 		memset(pHTInfoEle->BasicMSC, 0, 16);

-		*len = 22 + 2; //same above
+		*len = 22 + 2; /* same above */
 	} else {
-		//STA should not generate High Throughput Information Element
+		/* STA should not generate High Throughput Information Element */
 		*len = 0;
 	}
 	//IEEE80211_DEBUG_DATA(IEEE80211_DL_DATA | IEEE80211_DL_HT, posHTInfo, *len - 2);
@@ -688,7 +688,7 @@ void HTConstructRT2RTAggElement(struct ieee80211_device *ieee, u8 *posRT2RTAgg,
 	}
 	*/
 #else
-	// Do Nothing
+	/* Do Nothing */
 #endif

 	posRT2RTAgg->Length = 6;
@@ -715,25 +715,25 @@ static u8 HT_PickMCSRate(struct ieee80211_device *ieee, u8 *pOperateMCS)
 	case IEEE_A:
 	case IEEE_B:
 	case IEEE_G:
-		//legacy rate routine handled at selectedrate
+		/* legacy rate routine handled at selectedrate */

-		//no MCS rate
+		/* no MCS rate */
 		memset(pOperateMCS, 0, 16);
 		break;

-	case IEEE_N_24G:	//assume CCK rate ok
+	case IEEE_N_24G:	/* assume CCK rate ok */
 	case IEEE_N_5G:
-		// Legacy part we only use 6, 5.5,2,1 for N_24G and 6 for N_5G.
-		// Legacy part shall be handled at SelectRateSet().
+		/* Legacy part we only use 6, 5.5,2,1 for N_24G and 6 for N_5G. */
+		/* Legacy part shall be handled at SelectRateSet(). */

-		//HT part
-		// TODO: may be different if we have different number of antenna
-		pOperateMCS[0] &= RATE_ADPT_1SS_MASK;	//support MCS 0~7
+		/* HT part */
+		/* TODO: may be different if we have different number of antenna */
+		pOperateMCS[0] &= RATE_ADPT_1SS_MASK;	/* support MCS 0~7 */
 		pOperateMCS[1] &= RATE_ADPT_2SS_MASK;
 		pOperateMCS[3] &= RATE_ADPT_MCS32_MASK;
 		break;

-	//should never reach here
+	/* should never reach here */
 	default:
 		break;
 	}
@@ -811,11 +811,11 @@ static u8 HTFilterMCSRate(struct ieee80211_device *ieee, u8 *pSupportMCS,
 {
 	u8 i = 0;

-	// filter out operational rate set not supported by AP, the length of it is 16
+	/* filter out operational rate set not supported by AP, the length of it is 16 */
 	for (i = 0; i <= 15; i++)
 		pOperateMCS[i] = ieee->Regdot11HTOperationalRateSet[i] & pSupportMCS[i];

-	// TODO: adjust our operational rate set  according to our channel bandwidth, STBC and Antenna number
+	/* TODO: adjust our operational rate set  according to our channel bandwidth, STBC and Antenna number */
 	/*
 	 * TODO: fill suggested rate adaptive rate index and give firmware info
 	 * using Tx command packet we also shall suggested the first start rate
@@ -823,7 +823,7 @@ static u8 HTFilterMCSRate(struct ieee80211_device *ieee, u8 *pSupportMCS,
 	 */
 	HT_PickMCSRate(ieee, pOperateMCS);

-	// For RTL819X, if pairwisekey = wep/tkip, we support only MCS0~7.
+	/* For RTL819X, if pairwisekey = wep/tkip, we support only MCS0~7. */
 	if (ieee->GetHalfNmodeSupportByAPsHandler(ieee->dev))
 		pOperateMCS[1] = 0;

@@ -845,8 +845,8 @@ void HTOnAssocRsp(struct ieee80211_device *ieee)
 	u16	nMaxAMSDUSize = 0;
 	u8	*pMcsFilter = NULL;

-	static u8				EWC11NHTCap[] = {0x00, 0x90, 0x4c, 0x33};		// For 11n EWC definition, 2007.07.17, by Emily
-	static u8				EWC11NHTInfo[] = {0x00, 0x90, 0x4c, 0x34};	// For 11n EWC definition, 2007.07.17, by Emily
+	static u8				EWC11NHTCap[] = {0x00, 0x90, 0x4c, 0x33};		/* For 11n EWC definition, 2007.07.17, by Emily */
+	static u8				EWC11NHTInfo[] = {0x00, 0x90, 0x4c, 0x34};	/* For 11n EWC definition, 2007.07.17, by Emily */

 	if (!pHTInfo->bCurrentHTSupport) {
 		IEEE80211_DEBUG(IEEE80211_DL_ERR,
@@ -860,7 +860,6 @@ void HTOnAssocRsp(struct ieee80211_device *ieee)

 //	HTDebugHTCapability(pHTInfo->PeerHTCapBuf,"HTOnAssocRsp_wq");
 //	HTDebugHTInfo(pHTInfo->PeerHTInfoBuf,"HTOnAssocRsp_wq");
-	//
 	if (!memcmp(pHTInfo->PeerHTCapBuf, EWC11NHTCap, sizeof(EWC11NHTCap)))
 		pPeerHTCap = (struct ht_capability_ele *)(&pHTInfo->PeerHTCapBuf[4]);
 	else
@@ -871,13 +870,12 @@ void HTOnAssocRsp(struct ieee80211_device *ieee)
 	else
 		pPeerHTInfo = (PHT_INFORMATION_ELE)(pHTInfo->PeerHTInfoBuf);

-	////////////////////////////////////////////////////////
-	// Configurations:
-	////////////////////////////////////////////////////////
+	/*
+	 * Configurations:
+	 */
 	IEEE80211_DEBUG_DATA(IEEE80211_DL_DATA | IEEE80211_DL_HT, pPeerHTCap, sizeof(struct ht_capability_ele));
 //	IEEE80211_DEBUG_DATA(IEEE80211_DL_DATA|IEEE80211_DL_HT, pPeerHTInfo, sizeof(HT_INFORMATION_ELE));
 	// Config Supported Channel Width setting
-	//
 	HTSetConnectBwMode(ieee, (enum ht_channel_width)(pPeerHTCap->ChlWidth), (enum ht_extension_chan_offset)(pPeerHTInfo->ExtChlOffset));

 	pHTInfo->bCurTxBW40MHz = (pPeerHTInfo->RecommemdedTxWidth == 1);
@@ -927,7 +925,7 @@ void HTOnAssocRsp(struct ieee80211_device *ieee)
 	 * By Emily
 	 */
 	if (!pHTInfo->bRegRT2RTAggregation) {
-		// Decide AMPDU Factor according to protocol handshake
+		/* Decide AMPDU Factor according to protocol handshake */
 		if (pHTInfo->AMPDU_Factor > pPeerHTCap->MaxRxAMPDUFactor)
 			pHTInfo->CurrentAMPDUFactor = pPeerHTCap->MaxRxAMPDUFactor;
 		else
@@ -939,7 +937,7 @@ void HTOnAssocRsp(struct ieee80211_device *ieee)
 		 */
 		if (ieee->current_network.bssht.bdRT2RTAggregation) {
 			if (ieee->pairwise_key_type != KEY_TYPE_NA)
-				// Realtek may set 32k in security mode and 64k for others
+				/* Realtek may set 32k in security mode and 64k for others */
 				pHTInfo->CurrentAMPDUFactor = pPeerHTCap->MaxRxAMPDUFactor;
 			else
 				pHTInfo->CurrentAMPDUFactor = HT_AGG_SIZE_64K;
@@ -960,10 +958,10 @@ void HTOnAssocRsp(struct ieee80211_device *ieee)
 	else
 		pHTInfo->CurrentMPDUDensity = pPeerHTCap->MPDUDensity;
 	if (ieee->pairwise_key_type != KEY_TYPE_NA)
-		pHTInfo->CurrentMPDUDensity	= 7; // 8us
-	// Force TX AMSDU
+		pHTInfo->CurrentMPDUDensity	= 7; /* 8us */
+	/* Force TX AMSDU */

-	// Lanhsin: mark for tmp to avoid deauth by ap from  s3
+	/* Lanhsin: mark for tmp to avoid deauth by ap from  s3 */
 	//if(memcmp(pMgntInfo->Bssid, NETGEAR834Bv2_BROADCOM, 3)==0)
 	if (0) {
 		pHTInfo->bCurrentAMPDUEnable = false;
@@ -973,7 +971,7 @@ void HTOnAssocRsp(struct ieee80211_device *ieee)
 		pHTInfo->IOTAction |=  HT_IOT_ACT_TX_USE_AMSDU_8K;
 	}

-	// Rx Reorder Setting
+	/* Rx Reorder Setting */
 	pHTInfo->bCurRxReorderEnable = pHTInfo->bRegRxReorderEnable;

 	/*
@@ -1000,7 +998,7 @@ void HTOnAssocRsp(struct ieee80211_device *ieee)
 		pMcsFilter = MCS_FILTER_1SS;
 	else
 		pMcsFilter = MCS_FILTER_ALL;
-	//WB add for MCS8 bug
+	/* WB add for MCS8 bug */
 //	pMcsFilter = MCS_FILTER_1SS;
 	ieee->HTHighestOperaRate = HTGetHighestMCSRate(ieee, ieee->dot11HTOperationalRateSet, pMcsFilter);
 	ieee->HTCurrentOperaRate = ieee->HTHighestOperaRate;
@@ -1020,7 +1018,7 @@ void HTOnAssocRsp(struct ieee80211_device *ieee)
  *                                  *  (1) MPInitialization Phase
  *                                  *  (2) Receiving of Deauthentication from AP
  */
-// TODO: Should this funciton be called when receiving of Disassociation?
+/* TODO: Should this funciton be called when receiving of Disassociation? */
 void HTInitializeHTInfo(struct ieee80211_device *ieee)
 {
 	PRT_HIGH_THROUGHPUT pHTInfo = ieee->pHTInfo;
@@ -1031,11 +1029,11 @@ void HTInitializeHTInfo(struct ieee80211_device *ieee)
 	IEEE80211_DEBUG(IEEE80211_DL_HT, "===========>%s()\n", __func__);
 	pHTInfo->bCurrentHTSupport = false;

-	// 40MHz channel support
+	/* 40MHz channel support */
 	pHTInfo->bCurBW40MHz = false;
 	pHTInfo->bCurTxBW40MHz = false;

-	// Short GI support
+	/* Short GI support */
 	pHTInfo->bCurShortGI20MHz = false;
 	pHTInfo->bCurShortGI40MHz = false;
 	pHTInfo->bForcedShortGI = false;
@@ -1048,15 +1046,15 @@ void HTInitializeHTInfo(struct ieee80211_device *ieee)
 	 */
 	pHTInfo->bCurSuppCCK = true;

-	// AMSDU related
+	/* AMSDU related */
 	pHTInfo->bCurrent_AMSDU_Support = false;
 	pHTInfo->nCurrent_AMSDU_MaxSize = pHTInfo->nAMSDU_MaxSize;

-	// AMPUD related
+	/* AMPUD related */
 	pHTInfo->CurrentMPDUDensity = pHTInfo->MPDU_Density;
 	pHTInfo->CurrentAMPDUFactor = pHTInfo->AMPDU_Factor;

-	// Initialize all of the parameters related to 11n
+	/* Initialize all of the parameters related to 11n */
 	memset(&pHTInfo->SelfHTCap, 0, sizeof(pHTInfo->SelfHTCap));
 	memset(&pHTInfo->SelfHTInfo, 0, sizeof(pHTInfo->SelfHTInfo));
 	memset(&pHTInfo->PeerHTCapBuf, 0, sizeof(pHTInfo->PeerHTCapBuf));
@@ -1064,22 +1062,22 @@ void HTInitializeHTInfo(struct ieee80211_device *ieee)

 	pHTInfo->bSwBwInProgress = false;

-	// Set default IEEE spec for Draft N
+	/* Set default IEEE spec for Draft N */
 	pHTInfo->ePeerHTSpecVer = HT_SPEC_VER_IEEE;

-	// Realtek proprietary aggregation mode
+	/* Realtek proprietary aggregation mode */
 	pHTInfo->bCurrentRT2RTAggregation = false;
 	pHTInfo->bCurrentRT2RTLongSlotTime = false;
 	pHTInfo->IOTPeer = 0;
 	pHTInfo->IOTAction = 0;

-	//MCS rate initialized here
+	/* MCS rate initialized here */
 	{
 		u8 *RegHTSuppRateSets = &ieee->RegHTSuppRateSet[0];

-		RegHTSuppRateSets[0] = 0xFF;	//support MCS 0~7
-		RegHTSuppRateSets[1] = 0xFF;	//support MCS 8~15
-		RegHTSuppRateSets[4] = 0x01;	//support MCS 32
+		RegHTSuppRateSets[0] = 0xFF;	/* support MCS 0~7 */
+		RegHTSuppRateSets[1] = 0xFF;	/* support MCS 8~15 */
+		RegHTSuppRateSets[4] = 0x01;	/* support MCS 32 */
 	}
 }

@@ -1122,9 +1120,9 @@ void HTResetSelfAndSavePeerSetting(struct ieee80211_device *ieee,	struct ieee802
 //	u8*	pMcsFilter;
 	u8	bIOTAction = 0;

-	//
-	//  Save Peer Setting before Association
-	//
+	/*
+	 *  Save Peer Setting before Association
+	 */
 	IEEE80211_DEBUG(IEEE80211_DL_HT, "==============>%s()\n", __func__);
 	/*unmark bEnableHT flag here is the same reason why unmarked in function ieee80211_softmac_new_net. WB 2008.09.10*/
 //	if( pHTInfo->bEnableHT &&  pNetwork->bssht.bdSupportHT)
@@ -1132,14 +1130,14 @@ void HTResetSelfAndSavePeerSetting(struct ieee80211_device *ieee,	struct ieee802
 		pHTInfo->bCurrentHTSupport = true;
 		pHTInfo->ePeerHTSpecVer = pNetwork->bssht.bdHTSpecVer;

-		// Save HTCap and HTInfo information Element
+		/* Save HTCap and HTInfo information Element */
 		if (pNetwork->bssht.bdHTCapLen > 0 &&	pNetwork->bssht.bdHTCapLen <= sizeof(pHTInfo->PeerHTCapBuf))
 			memcpy(pHTInfo->PeerHTCapBuf, pNetwork->bssht.bdHTCapBuf, pNetwork->bssht.bdHTCapLen);

 		if (pNetwork->bssht.bdHTInfoLen > 0 && pNetwork->bssht.bdHTInfoLen <= sizeof(pHTInfo->PeerHTInfoBuf))
 			memcpy(pHTInfo->PeerHTInfoBuf, pNetwork->bssht.bdHTInfoBuf, pNetwork->bssht.bdHTInfoLen);

-		// Check whether RT to RT aggregation mode is enabled
+		/* Check whether RT to RT aggregation mode is enabled */
 		if (pHTInfo->bRegRT2RTAggregation) {
 			pHTInfo->bCurrentRT2RTAggregation = pNetwork->bssht.bdRT2RTAggregation;
 			pHTInfo->bCurrentRT2RTLongSlotTime = pNetwork->bssht.bdRT2RTLongSlotTime;
@@ -1148,7 +1146,7 @@ void HTResetSelfAndSavePeerSetting(struct ieee80211_device *ieee,	struct ieee802
 			pHTInfo->bCurrentRT2RTLongSlotTime = false;
 		}

-		// Determine the IOT Peer Vendor.
+		/* Determine the IOT Peer Vendor. */
 		HTIOTPeerDetermine(ieee);

 		/*
@@ -1261,7 +1259,7 @@ void HTSetConnectBwMode(struct ieee80211_device *ieee, enum ht_channel_width Ban
 	if (!pHTInfo->bRegBW40MHz)
 		return;

-	// To reduce dummy operation
+	/* To reduce dummy operation */
 //	if((pHTInfo->bCurBW40MHz==false && Bandwidth==HT_CHANNEL_WIDTH_20) ||
 //	   (pHTInfo->bCurBW40MHz==true && Bandwidth==HT_CHANNEL_WIDTH_20_40 && Offset==pHTInfo->CurSTAExtChnlOffset))
 //		return;
@@ -1271,9 +1269,9 @@ void HTSetConnectBwMode(struct ieee80211_device *ieee, enum ht_channel_width Ban
 //		spin_unlock_irqrestore(&(ieee->bw_spinlock), flags);
 		return;
 	}
-	//if in half N mode, set to 20M bandwidth please 09.08.2008 WB.
+	/* if in half N mode, set to 20M bandwidth please 09.08.2008 WB. */
 	if (Bandwidth == HT_CHANNEL_WIDTH_20_40 && (!ieee->GetHalfNmodeSupportByAPsHandler(ieee->dev))) {
-			// Handle Illegal extension channel offset!!
+			/* Handle Illegal extension channel offset!! */
 		if (ieee->current_network.channel < 2 && Offset == HT_EXTCHNL_OFFSET_LOWER)
 			Offset = HT_EXTCHNL_OFFSET_NO_EXT;
 		if (Offset == HT_EXTCHNL_OFFSET_UPPER || Offset == HT_EXTCHNL_OFFSET_LOWER) {
diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_Qos.h b/drivers/staging/rtl8192u/ieee80211/rtl819x_Qos.h
index 3052f53d2e7e..44418a284fe9 100644
--- a/drivers/staging/rtl8192u/ieee80211/rtl819x_Qos.h
+++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_Qos.h
@@ -19,10 +19,10 @@ struct aci_aifsn {
  * Ref: WMM spec 2.2.11: WME TSPEC Element, p.18.
  */
 enum direction_value {
-	DIR_UP			= 0,		// 0x00	// UpLink
-	DIR_DOWN		= 1,		// 0x01	// DownLink
-	DIR_DIRECT		= 2,		// 0x10	// DirectLink
-	DIR_BI_DIR		= 3,		// 0x11	// Bi-Direction
+	DIR_UP			= 0,		/* 0x00 UpLink */
+	DIR_DOWN		= 1,		/* 0x01	DownLink */
+	DIR_DIRECT		= 2,		/* 0x10	DirectLink */
+	DIR_BI_DIR		= 3,		/* 0x11	Bi-Direction */
 };

 /*
@@ -33,15 +33,15 @@ enum direction_value {
  * Note: sizeof 3 Bytes
  */
 struct qos_tsinfo {
-	u16		uc_traffic_type:1;	        //WMM is reserved
+	u16		uc_traffic_type:1;	        /* WMM is reserved */
 	u16		uc_tsid:4;
 	u16		uc_direction:2;
-	u16		uc_access_policy:2;	        //WMM: bit8=0, bit7=1
-	u16		uc_aggregation:1;	        //WMM is reserved
-	u16		uc_psb:1;		        //WMMSA is APSD
+	u16		uc_access_policy:2;	        /* WMM: bit8=0, bit7=1 */
+	u16		uc_aggregation:1;	        /* WMM is reserved */
+	u16		uc_psb:1;		        /* WMMSA is APSD */
 	u16		uc_up:3;
-	u16		uc_ts_info_ack_policy:2;	//WMM is reserved
-	u8		uc_schedule:1;		        //WMM is reserved
+	u16		uc_ts_info_ack_policy:2;	/* WMM is reserved */
+	u8		uc_schedule:1;		        /* WMM is reserved */
 	u8:7;
 };

diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c
index 7cac668bfb0b..469d6ab3dc8e 100644
--- a/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c
+++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c
@@ -6,15 +6,15 @@

 static void TsSetupTimeOut(struct timer_list *unused)
 {
-	// Not implement yet
-	// This is used for WMMSA and ACM , that would send ADDTSReq frame.
+	/* Not implement yet */
+	/* This is used for WMMSA and ACM , that would send ADDTSReq frame. */
 }

 static void TsInactTimeout(struct timer_list *unused)
 {
-	// Not implement yet
-	// This is used for WMMSA and ACM.
-	// This function would be call when TS is no Tx/Rx for some period of time.
+	/* Not implement yet */
+	/* This is used for WMMSA and ACM. */
+	/* This function would be call when TS is no Tx/Rx for some period of time. */
 }

 /********************************************************************************************************************
@@ -38,7 +38,7 @@ static void RxPktPendingTimeout(struct timer_list *t)
 	spin_lock_irqsave(&(ieee->reorder_spinlock), flags);
 	IEEE80211_DEBUG(IEEE80211_DL_REORDER, "==================>%s()\n", __func__);
 	if (pRxTs->rx_timeout_indicate_seq != 0xffff) {
-		// Indicate the pending packets sequentially according to SeqNum until meet the gap.
+		/* Indicate the pending packets sequentially according to SeqNum until meet the gap. */
 		while (!list_empty(&pRxTs->rx_pending_pkt_list)) {
 			pReorderEntry = list_entry(pRxTs->rx_pending_pkt_list.prev, struct rx_reorder_entry, List);
 			if (index == 0)
@@ -64,10 +64,10 @@ static void RxPktPendingTimeout(struct timer_list *t)
 	}

 	if (index > 0) {
-		// Set rx_timeout_indicate_seq to 0xffff to indicate no pending packets in buffer now.
+		/* Set rx_timeout_indicate_seq to 0xffff to indicate no pending packets in buffer now. */
 		pRxTs->rx_timeout_indicate_seq = 0xffff;

-		// Indicate packets
+		/* Indicate packets */
 		if (index > REORDER_WIN_SIZE) {
 			IEEE80211_DEBUG(IEEE80211_DL_ERR, "RxReorderIndicatePacket(): Rx Reorder buffer full!! \n");
 			spin_unlock_irqrestore(&(ieee->reorder_spinlock), flags);
@@ -117,16 +117,16 @@ static void ResetTxTsEntry(struct tx_ts_record *pTS)
 	pTS->add_ba_req_in_progress = false;
 	pTS->add_ba_req_delayed = false;
 	pTS->using_ba = false;
-	ResetBaEntry(&pTS->tx_admitted_ba_record); //For BA Originator
+	ResetBaEntry(&pTS->tx_admitted_ba_record); /* For BA Originator */
 	ResetBaEntry(&pTS->tx_pending_ba_record);
 }

 static void ResetRxTsEntry(struct rx_ts_record *pTS)
 {
 	ResetTsCommonInfo(&pTS->ts_common_info);
-	pTS->rx_indicate_seq = 0xffff; // This indicate the rx_indicate_seq is not used now!!
-	pTS->rx_timeout_indicate_seq = 0xffff; // This indicate the rx_timeout_indicate_seq is not used now!!
-	ResetBaEntry(&pTS->rx_admitted_ba_record);	  // For BA Recipient
+	pTS->rx_indicate_seq = 0xffff; /* This indicate the rx_indicate_seq is not used now!! */
+	pTS->rx_timeout_indicate_seq = 0xffff; /* This indicate the rx_timeout_indicate_seq is not used now!! */
+	ResetBaEntry(&pTS->rx_admitted_ba_record);	  /* For BA Recipient */
 }

 void TSInitialize(struct ieee80211_device *ieee)
@@ -136,16 +136,15 @@ void TSInitialize(struct ieee80211_device *ieee)
 	struct rx_reorder_entry	*pRxReorderEntry = ieee->RxReorderEntry;
 	u8				count = 0;
 	IEEE80211_DEBUG(IEEE80211_DL_TS, "==========>%s()\n", __func__);
-	// Initialize Tx TS related info.
+	/* Initialize Tx TS related info. */
 	INIT_LIST_HEAD(&ieee->Tx_TS_Admit_List);
 	INIT_LIST_HEAD(&ieee->Tx_TS_Pending_List);
 	INIT_LIST_HEAD(&ieee->Tx_TS_Unused_List);

 	for (count = 0; count < TOTAL_TS_NUM; count++) {
-		//
 		pTxTS->num = count;
-		// The timers for the operation of Traffic Stream and Block Ack.
-		// DLS related timer will be add here in the future!!
+		/* The timers for the operation of Traffic Stream and Block Ack. */
+		/* DLS related timer will be add here in the future!! */
 		timer_setup(&pTxTS->ts_common_info.setup_timer, TsSetupTimeOut,
 			    0);
 		timer_setup(&pTxTS->ts_common_info.inact_timer, TsInactTimeout,
@@ -160,7 +159,7 @@ void TSInitialize(struct ieee80211_device *ieee)
 		pTxTS++;
 	}

-	// Initialize Rx TS related info.
+	/* Initialize Rx TS related info. */
 	INIT_LIST_HEAD(&ieee->Rx_TS_Admit_List);
 	INIT_LIST_HEAD(&ieee->Rx_TS_Pending_List);
 	INIT_LIST_HEAD(&ieee->Rx_TS_Unused_List);
@@ -178,7 +177,7 @@ void TSInitialize(struct ieee80211_device *ieee)
 		list_add_tail(&pRxTS->ts_common_info.list, &ieee->Rx_TS_Unused_List);
 		pRxTS++;
 	}
-	// Initialize unused Rx Reorder List.
+	/* Initialize unused Rx Reorder List. */
 	INIT_LIST_HEAD(&ieee->RxReorder_Unused_List);
 //#ifdef TO_DO_LIST
 	for (count = 0; count < REORDER_ENTRY_NUM; count++) {
@@ -209,9 +208,9 @@ static struct ts_common_info *SearchAdmitTRStream(struct ieee80211_device *ieee,
 	//DIRECTION_VALUE	dir;
 	u8	dir;
 	bool				search_dir[4] = {0};
-	struct list_head		*psearch_list; //FIXME
+	struct list_head		*psearch_list; /* FIXME */
 	struct ts_common_info	*pRet = NULL;
-	if (ieee->iw_mode == IW_MODE_MASTER) { //ap mode
+	if (ieee->iw_mode == IW_MODE_MASTER) { /* ap mode */
 		if (TxRxSelect == TX_DIR) {
 			search_dir[DIR_DOWN] = true;
 			search_dir[DIR_BI_DIR] = true;
@@ -291,15 +290,15 @@ bool GetTs(
 	struct ts_common_info		**ppTS,
 	u8				*Addr,
 	u8				TID,
-	enum tr_select			TxRxSelect,  //Rx:1, Tx:0
+	enum tr_select			TxRxSelect,  /* Rx:1, Tx:0 */
 	bool				bAddNewTs
 	)
 {
 	u8	UP = 0;
-	//
-	// We do not build any TS for Broadcast or Multicast stream.
-	// So reject these kinds of search here.
-	//
+	/*
+	 * We do not build any TS for Broadcast or Multicast stream.
+	 * So reject these kinds of search here.
+	 */
 	if (is_multicast_ether_addr(Addr)) {
 		IEEE80211_DEBUG(IEEE80211_DL_ERR, "get TS for Broadcast or Multicast\n");
 		return false;
@@ -308,7 +307,7 @@ bool GetTs(
 	if (ieee->current_network.qos_data.supported == 0) {
 		UP = 0;
 	} else {
-		// In WMM case: we use 4 TID only
+		/* In WMM case: we use 4 TID only */
 		if (!is_ac_valid(TID)) {
 			IEEE80211_DEBUG(IEEE80211_DL_ERR, " in %s(), TID(%d) is not valid\n", __func__, TID);
 			return false;
@@ -349,11 +348,11 @@ bool GetTs(
 			IEEE80211_DEBUG(IEEE80211_DL_TS, "add new TS failed(tid:%d)\n", UP);
 			return false;
 		} else {
-			//
-			// Create a new Traffic stream for current Tx/Rx
-			// This is for EDCA and WMM to add a new TS.
-			// For HCCA or WMMSA, TS cannot be addmit without negotiation.
-			//
+			/*
+			 * Create a new Traffic stream for current Tx/Rx
+			 * This is for EDCA and WMM to add a new TS.
+			 * For HCCA or WMMSA, TS cannot be addmit without negotiation.
+			 */
 			struct tspec_body	TSpec;
 			struct qos_tsinfo	*pTSInfo = &TSpec.ts_info;
 			struct list_head	*pUnusedList =
@@ -382,21 +381,21 @@ bool GetTs(
 				}

 				IEEE80211_DEBUG(IEEE80211_DL_TS, "to init current TS, UP:%d, Dir:%d, addr:%pM\n", UP, Dir, Addr);
-				// Prepare TS Info releated field
-				pTSInfo->uc_traffic_type = 0;		// Traffic type: WMM is reserved in this field
-				pTSInfo->uc_tsid = UP;			// TSID
-				pTSInfo->uc_direction = Dir;		// Direction: if there is DirectLink, this need additional consideration.
-				pTSInfo->uc_access_policy = 1;		// Access policy
-				pTSInfo->uc_aggregation = 0;		// Aggregation
-				pTSInfo->uc_psb = 0;			// Aggregation
-				pTSInfo->uc_up = UP;			// User priority
-				pTSInfo->uc_ts_info_ack_policy = 0;	// Ack policy
-				pTSInfo->uc_schedule = 0;		// Schedule
+				/* Prepare TS Info releated field */
+				pTSInfo->uc_traffic_type = 0;		/* Traffic type: WMM is reserved in this field */
+				pTSInfo->uc_tsid = UP;			/* TSID */
+				pTSInfo->uc_direction = Dir;		/* Direction: if there is DirectLink, this need additional consideration. */
+				pTSInfo->uc_access_policy = 1;		/* Access policy */
+				pTSInfo->uc_aggregation = 0;		/* Aggregation */
+				pTSInfo->uc_psb = 0;			/* Aggregation */
+				pTSInfo->uc_up = UP;			/* User priority */
+				pTSInfo->uc_ts_info_ack_policy = 0;	/* Ack policy */
+				pTSInfo->uc_schedule = 0;		/* Schedule */

 				MakeTSEntry(*ppTS, Addr, &TSpec, NULL, 0, 0);
 				AdmitTS(ieee, *ppTS, 0);
 				list_add_tail(&((*ppTS)->list), pAddmitList);
-				// if there is DirectLink, we need to do additional operation here!!
+				/* if there is DirectLink, we need to do additional operation here!! */

 				return true;
 			} else {
@@ -530,7 +529,7 @@ void TsStartAddBaProcess(struct ieee80211_device *ieee, struct tx_ts_record *pTx
 				  jiffies + msecs_to_jiffies(TS_ADDBA_DELAY));
 		} else {
 			IEEE80211_DEBUG(IEEE80211_DL_BA, "TsStartAddBaProcess(): Immediately Start ADDBA now!!\n");
-			mod_timer(&pTxTS->ts_add_ba_timer, jiffies+10); //set 10 ticks
+			mod_timer(&pTxTS->ts_add_ba_timer, jiffies+10); /* set 10 ticks */
 		}
 	} else {
 		IEEE80211_DEBUG(IEEE80211_DL_ERR, "%s()==>BA timer is already added\n", __func__);
diff --git a/drivers/staging/rtl8192u/r8180_93cx6.c b/drivers/staging/rtl8192u/r8180_93cx6.c
index de83daa0c9ed..e76f1b2ea2e0 100644
--- a/drivers/staging/rtl8192u/r8180_93cx6.c
+++ b/drivers/staging/rtl8192u/r8180_93cx6.c
@@ -154,7 +154,8 @@ int eprom_read(struct net_device *dev, u32 addr)
 	eprom_w(dev, 0);

 	for (i = 0; i < 16; i++) {
-		/* eeprom needs a clk cycle between writing opcode&adr
+		/*
+		 * eeprom needs a clk cycle between writing opcode&adr
 		 * and reading data. (eeprom outs a dummy 0)
 		 */
 		eprom_ck_cycle(dev);
diff --git a/drivers/staging/rtl8192u/r8180_93cx6.h b/drivers/staging/rtl8192u/r8180_93cx6.h
index 0cdd00a4f7b8..3dc3cdb2194e 100644
--- a/drivers/staging/rtl8192u/r8180_93cx6.h
+++ b/drivers/staging/rtl8192u/r8180_93cx6.h
@@ -14,8 +14,8 @@
  *	project Authors.
  */

-/*This files contains card eeprom (93c46 or 93c56) programming routines*/
-/*memory is addressed by WORDS*/
+/* This files contains card eeprom (93c46 or 93c56) programming routines */
+/* memory is addressed by WORDS */

 #include "r8192U.h"
 #include "r8192U_hw.h"
diff --git a/drivers/staging/rtl8192u/r8190_rtl8256.c b/drivers/staging/rtl8192u/r8190_rtl8256.c
index 92de92a3325a..716be24bace6 100644
--- a/drivers/staging/rtl8192u/r8190_rtl8256.c
+++ b/drivers/staging/rtl8192u/r8190_rtl8256.c
@@ -19,14 +19,15 @@
  */
 static void phy_rf8256_config_para_file(struct net_device *dev);

-/*--------------------------------------------------------------------------
+/*
+ * --------------------------------------------------------------------------
  * Overview:	set RF band width (20M or 40M)
  * Input:       struct net_device*	dev
  *		WIRELESS_BANDWIDTH_E	Bandwidth	//20M or 40M
  * Output:      NONE
  * Return:      NONE
  * Note:	8226 support both 20M  and 40 MHz
- *--------------------------------------------------------------------------
+ * --------------------------------------------------------------------------
  */
 void phy_set_rf8256_bandwidth(struct net_device *dev, enum ht_channel_width Bandwidth)
 {
@@ -83,17 +84,19 @@ void phy_set_rf8256_bandwidth(struct net_device *dev, enum ht_channel_width Band
 		}
 	}
 }
-/*--------------------------------------------------------------------------
+/*
+ * --------------------------------------------------------------------------
  * Overview:    Interface to config 8256
  * Input:       struct net_device*	dev
  * Output:      NONE
  * Return:      NONE
- *--------------------------------------------------------------------------
+ * --------------------------------------------------------------------------
  */
 void phy_rf8256_config(struct net_device *dev)
 {
 	struct r8192_priv *priv = ieee80211_priv(dev);
-	/* Initialize general global value
+	/*
+	 * Initialize general global value
 	 *
 	 * TODO: Extend RF_PATH_C and RF_PATH_D in the future
 	 */
@@ -101,12 +104,13 @@ void phy_rf8256_config(struct net_device *dev)
 	/* Config BB and RF */
 	phy_rf8256_config_para_file(dev);
 }
-/*--------------------------------------------------------------------------
+/*
+ * --------------------------------------------------------------------------
  * Overview:    Interface to config 8256
  * Input:       struct net_device*	dev
  * Output:      NONE
  * Return:      NONE
- *--------------------------------------------------------------------------
+ * --------------------------------------------------------------------------
  */
 static void phy_rf8256_config_para_file(struct net_device *dev)
 {
@@ -126,7 +130,8 @@ static void phy_rf8256_config_para_file(struct net_device *dev)

 		pPhyReg = &priv->PHYRegDef[eRFPath];

-		/* Joseph test for shorten RF config
+		/*
+		 * Joseph test for shorten RF config
 		 * pHalData->RfReg0Value[eRFPath] =  rtl8192_phy_QueryRFReg(dev, (enum rf90_radio_path_e)eRFPath, rGlobalCtrl, bMaskDWord);
 		 * ----Store original RFENV control type
 		 */
@@ -153,7 +158,8 @@ static void phy_rf8256_config_para_file(struct net_device *dev)

 		rtl8192_phy_SetRFReg(dev, (enum rf90_radio_path_e) eRFPath, 0x0, bMask12Bits, 0xbf);

-		/* Check RF block (for FPGA platform only)----
+		/*
+		 * Check RF block (for FPGA platform only)----
 		 * TODO: this function should be removed on ASIC , Emily 2007.2.2
 		 */
 		if (rtl8192_phy_checkBBAndRF(dev, HW90_BLOCK_RF, (enum rf90_radio_path_e)eRFPath)) {
@@ -163,7 +169,7 @@ static void phy_rf8256_config_para_file(struct net_device *dev)

 		RetryTimes = ConstRetryTimes;
 		RF3_Final_Value = 0;
-		/*----Initialize RF fom connfiguration file----*/
+		/* ----Initialize RF fom connfiguration file---- */
 		switch (eRFPath) {
 		case RF90_PATH_A:
 			while (RF3_Final_Value != RegValueToBeCheck && RetryTimes != 0) {
@@ -199,7 +205,7 @@ static void phy_rf8256_config_para_file(struct net_device *dev)
 			break;
 		}

-		/*----Restore RFENV control type----*/
+		/* ----Restore RFENV control type---- */
 		switch (eRFPath) {
 		case RF90_PATH_A:
 		case RF90_PATH_C:
@@ -283,8 +289,9 @@ void phy_set_rf8256_ofdm_tx_power(struct net_device *dev, u8 powerlevel)
 		}

 		if (priv->bDynamicTxHighPower) {
-			/*Add by Jacken 2008/03/06
-			 *Emily, 20080613. Set low tx power for both MCS and legacy OFDM
+			/*
+			 * Add by Jacken 2008/03/06
+			 * Emily, 20080613. Set low tx power for both MCS and legacy OFDM
 			 */
 			writeVal = 0x03030303;
 		} else {
diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h
index ec33fb9122e9..610c23364e58 100644
--- a/drivers/staging/rtl8192u/r8192U.h
+++ b/drivers/staging/rtl8192u/r8192U.h
@@ -570,7 +570,8 @@ typedef struct Stats {
 	long signal_strength;
 	long signal_quality;
 	long last_signal_strength_inpercent;
-	/* Correct smoothed ss in dbm, only used in driver
+	/*
+	 * Correct smoothed ss in dbm, only used in driver
 	 * to report real power now
 	 */
 	long recv_signal_power;
@@ -615,38 +616,46 @@ typedef struct _BB_REGISTER_DEFINITION {
 	u32 rfLSSI_Select;
 	/* Tx gain stage:               0x80c~0x80f [4 bytes]  */
 	u32 rfTxGainStage;
-	/* wire parameter control1:     0x820~0x823, 0x828~0x82b,
+	/*
+	 * wire parameter control1:     0x820~0x823, 0x828~0x82b,
 	 *                              0x830~0x833, 0x838~0x83b [16 bytes]
 	 */
 	u32 rfHSSIPara1;
-	/* wire parameter control2:     0x824~0x827, 0x82c~0x82f,
+	/*
+	 * wire parameter control2:     0x824~0x827, 0x82c~0x82f,
 	 *                              0x834~0x837, 0x83c~0x83f [16 bytes]
 	 */
 	u32 rfHSSIPara2;
 	/* Tx Rx antenna control:       0x858~0x85f [16 bytes] */
 	u32 rfSwitchControl;
-	/* AGC parameter control1:	0xc50~0xc53, 0xc58~0xc5b,
+	/*
+	 * AGC parameter control1:	0xc50~0xc53, 0xc58~0xc5b,
 	 *                              0xc60~0xc63, 0xc68~0xc6b [16 bytes]
 	 */
 	u32 rfAGCControl1;
-	/* AGC parameter control2:      0xc54~0xc57, 0xc5c~0xc5f,
+	/*
+	 * AGC parameter control2:      0xc54~0xc57, 0xc5c~0xc5f,
 	 *                              0xc64~0xc67, 0xc6c~0xc6f [16 bytes]
 	 */
 	u32 rfAGCControl2;
-	/* OFDM Rx IQ imbalance matrix:	0xc14~0xc17, 0xc1c~0xc1f,
+	/*
+	 * OFDM Rx IQ imbalance matrix:	0xc14~0xc17, 0xc1c~0xc1f,
 	 *                              0xc24~0xc27, 0xc2c~0xc2f [16 bytes]
 	 */
 	u32 rfRxIQImbalance;
-	/* Rx IQ DC offset and Rx digital filter, Rx DC notch filter:
+	/*
+	 * Rx IQ DC offset and Rx digital filter, Rx DC notch filter:
 	 *                              0xc10~0xc13, 0xc18~0xc1b,
 	 *                              0xc20~0xc23, 0xc28~0xc2b [16 bytes]
 	 */
 	u32 rfRxAFE;
-	/* OFDM Tx IQ imbalance matrix:	0xc80~0xc83, 0xc88~0xc8b,
+	/*
+	 * OFDM Tx IQ imbalance matrix:	0xc80~0xc83, 0xc88~0xc8b,
 	 *                              0xc90~0xc93, 0xc98~0xc9b [16 bytes]
 	 */
 	u32 rfTxIQImbalance;
-	/* Tx IQ DC Offset and Tx DFIR type:
+	/*
+	 * Tx IQ DC Offset and Tx DFIR type:
 	 *                              0xc84~0xc87, 0xc8c~0xc8f,
 	 *                              0xc94~0xc97, 0xc9c~0xc9f [16 bytes]
 	 */
@@ -733,7 +742,8 @@ typedef struct _phy_ofdm_rx_status_report_819xusb {
 } phy_sts_ofdm_819xusb_t;

 typedef struct _phy_cck_rx_status_report_819xusb {
-	/* For CCK rate descriptor. This is an unsigned 8:1 variable.
+	/*
+	 * For CCK rate descriptor. This is an unsigned 8:1 variable.
 	 * LSB bit presend 0.5. And MSB 7 bts presend a signed value.
 	 * Range from -64~+63.5.
 	 */
@@ -800,12 +810,12 @@ typedef enum _tag_TxCmd_Config_Index {
 } DCMD_TXCMD_OP;

 enum version_819xu {
-	VERSION_819XU_A, // A-cut
-	VERSION_819XU_B, // B-cut
-	VERSION_819XU_C,// C-cut
+	VERSION_819XU_A, /* A-cut */
+	VERSION_819XU_B, /* B-cut */
+	VERSION_819XU_C,/* C-cut */
 };

-//added for different RF type
+/* added for different RF type */
 enum rt_rf_type {
 	RF_1T2R = 0,
 	RF_2T4R,
@@ -958,7 +968,8 @@ typedef struct r8192_priv {
 	/* 8190 40MHz mode */
 	/* Control channel sub-carrier */
 	u8	nCur40MhzPrimeSC;
-	/* Test for shorten RF configuration time.
+	/*
+	 * Test for shorten RF configuration time.
 	 * We save RF reg0 in this variable to reduce RF reading.
 	 */
 	u32					RfReg0Value[4];
@@ -977,12 +988,14 @@ typedef struct r8192_priv {
 	bool	bLastDTPFlag_Low;

 	bool	bstore_last_dtpflag;
-	/* Define to discriminate on High power State or
+	/*
+	 * Define to discriminate on High power State or
 	 * on sitesurvey to change Tx gain index
 	 */
 	bool	bstart_txctrl_bydtp;
 	rate_adaptive rate_adaptive;
-	/* TX power tracking
+	/*
+	 * TX power tracking
 	 * OPEN/CLOSE TX POWER TRACKING
 	 */
 	txbbgain_struct txbbgain_table[TxBBGainTableLength];
diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index 4065a4710142..410c8a3e56d7 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -194,7 +194,8 @@ static void rtl819x_set_channel_map(u8 channel_plan, struct r8192_priv *priv)
 		break;

 	case COUNTRY_CODE_GLOBAL_DOMAIN:
-		/* this flag enabled to follow 11d country IE setting,
+		/*
+		 * this flag enabled to follow 11d country IE setting,
 		 * otherwise, it shall follow global domain settings.
 		 */
 		GET_DOT11D_INFO(ieee)->dot11d_enabled = 0;
@@ -213,7 +214,8 @@ static void rtl819x_set_channel_map(u8 channel_plan, struct r8192_priv *priv)
 static void CamResetAllEntry(struct net_device *dev)
 {
 	u32 ulcommand = 0;
-	/* In static WEP, OID_ADD_KEY or OID_ADD_WEP are set before STA
+	/*
+	 * In static WEP, OID_ADD_KEY or OID_ADD_WEP are set before STA
 	 * associate to AP. However, ResetKey is called on
 	 * OID_802_11_INFRASTRUCTURE_MODE and MlmeAssociateRequest. In this
 	 * condition, Cam can not be reset because upper layer will not set
@@ -458,7 +460,8 @@ int read_nic_dword(struct net_device *dev, int indx, u32 *data)

 /* u8 read_phy_cck(struct net_device *dev, u8 adr); */
 /* u8 read_phy_ofdm(struct net_device *dev, u8 adr); */
-/* this might still called in what was the PHY rtl8185/rtl8192 common code
+/*
+ * this might still called in what was the PHY rtl8185/rtl8192 common code
  * plans are to possibility turn it again in one common code...
  */
 inline void force_pci_posting(struct net_device *dev)
@@ -669,7 +672,8 @@ void rtl8192_update_msr(struct net_device *dev)
 	read_nic_byte(dev, MSR, &msr);
 	msr &= ~MSR_LINK_MASK;

-	/* do not change in link_state != WLAN_LINK_ASSOCIATED.
+	/*
+	 * do not change in link_state != WLAN_LINK_ASSOCIATED.
 	 * msr must be updated if the state is ASSOCIATING.
 	 * this is intentional and make sense for ad-hoc and
 	 * master (see the create BSS/IBSS func)
@@ -921,7 +925,8 @@ static void rtl8192_data_hard_resume(struct net_device *dev)
 	/* FIXME !! */
 }

-/* this function TX data frames when the ieee80211 stack requires this.
+/*
+ * this function TX data frames when the ieee80211 stack requires this.
  * It checks also if we need to stop the ieee tx queue, eventually do it
  */
 static void rtl8192_hard_data_xmit(struct sk_buff *skb, struct net_device *dev,
@@ -946,7 +951,8 @@ static void rtl8192_hard_data_xmit(struct sk_buff *skb, struct net_device *dev,
 	spin_unlock_irqrestore(&priv->tx_lock, flags);
 }

-/* This is a rough attempt to TX a frame
+/*
+ * This is a rough attempt to TX a frame
  * This is called by the ieee 80211 stack to TX management frames.
  * If the ring is full packet are dropped (for data frame the queue
  * is stopped before this can happen).
@@ -1191,7 +1197,8 @@ static void rtl8192_net_update(struct net_device *dev)
 	}
 }

-/* temporary hw beacon is not used any more.
+/*
+ * temporary hw beacon is not used any more.
  * open it when necessary
  */
 void rtl819xusb_beacon_tx(struct net_device *dev, u16  tx_rate)
@@ -1225,9 +1232,10 @@ short rtl819xU_tx_cmd(struct net_device *dev, struct sk_buff *skb)
 	pdesc->OWN = 1;
 	pdesc->LINIP = tcb_desc->bLastIniPkt;

-	/*---------------------------------------------------------------------
+	/*
+	 * ---------------------------------------------------------------------
 	 * Fill up USB_OUT_CONTEXT.
-	 *---------------------------------------------------------------------
+	 * ---------------------------------------------------------------------
 	 */
 	idx_pipe = 0x04;
 	usb_fill_bulk_urb(tx_urb, priv->udev,
@@ -1435,7 +1443,8 @@ short rtl8192_tx(struct net_device *dev, struct sk_buff *skb)
 	unsigned int idx_pipe;

 	pend = atomic_read(&priv->tx_pending[tcb_desc->queue_index]);
-	/* we are locked here so the two atomic_read and inc are executed
+	/*
+	 * we are locked here so the two atomic_read and inc are executed
 	 * without interleaves
 	 * !!! For debug purpose
 	 */
@@ -1505,7 +1514,7 @@ short rtl8192_tx(struct net_device *dev, struct sk_buff *skb)
 	tx_desc->Offset =  sizeof(struct tx_fwinfo_819x_usb) + 8;
 	tx_desc->PktSize = (skb->len - TX_PACKET_SHIFT_BYTES) & 0xffff;

-	/*DWORD 1*/
+	/* DWORD 1 */
 	tx_desc->SecCAMID = 0;
 	tx_desc->RATid = tcb_desc->RATRIndex;
 	tx_desc->NoEnc = 1;
@@ -1538,7 +1547,8 @@ short rtl8192_tx(struct net_device *dev, struct sk_buff *skb)
 	tx_desc->DISFB = tcb_desc->bTxDisableRateFallBack;
 	tx_desc->USERATE = tcb_desc->bTxUseDriverAssingedRate;

-	/* Fill fields that are required to be initialized in
+	/*
+	 * Fill fields that are required to be initialized in
 	 * all of the descriptors
 	 */
 	/* DWORD 0 */
@@ -1557,7 +1567,8 @@ short rtl8192_tx(struct net_device *dev, struct sk_buff *skb)

 	status = usb_submit_urb(tx_urb, GFP_ATOMIC);
 	if (!status) {
-		/* We need to send 0 byte packet whenever
+		/*
+		 * We need to send 0 byte packet whenever
 		 * 512N bytes/64N(HIGN SPEED/NORMAL SPEED) bytes packet has
 		 * been transmitted. Otherwise, it will be halt to wait for
 		 * another packet.
@@ -1721,7 +1732,8 @@ static void rtl8192_link_change(struct net_device *dev)
 	if (ieee->state == IEEE80211_LINKED) {
 		rtl8192_net_update(dev);
 		rtl8192_update_ratr_table(dev);
-		/* Add this as in pure N mode, wep encryption will use software
+		/*
+		 * Add this as in pure N mode, wep encryption will use software
 		 * way, but there is no chance to set this as wep will not set
 		 * group key in wext.
 		 */
@@ -1729,7 +1741,7 @@ static void rtl8192_link_change(struct net_device *dev)
 		    ieee->pairwise_key_type == KEY_TYPE_WEP104)
 			EnableHWSecurityConfig8192(dev);
 	}
-	/*update timing params*/
+	/* update timing params */
 	if (ieee->iw_mode == IW_MODE_INFRA || ieee->iw_mode == IW_MODE_ADHOC) {
 		u32 reg = 0;

@@ -1791,7 +1803,8 @@ static void rtl8192_qos_activate(struct work_struct *work)
 		goto success;
 	RT_TRACE(COMP_QOS,
 		 "qos active process with associate response received\n");
-	/* It better set slot time at first
+	/*
+	 * It better set slot time at first
 	 *
 	 * For we just support b/g mode at present, let the slot time at
 	 * 9/20 selection
@@ -1994,7 +2007,8 @@ static bool GetNmodeSupportBySecCfg8192(struct net_device *dev)
 	int encrypt;

 	crypt = ieee->crypt[ieee->tx_keyidx];
-	/* we use connecting AP's capability instead of only security config
+	/*
+	 * we use connecting AP's capability instead of only security config
 	 * on our driver to distinguish whether it should use N mode or G mode
 	 */
 	encrypt = (network->capability & WLAN_CAPABILITY_PRIVACY) ||
@@ -2028,7 +2042,8 @@ static bool GetHalfNmodeSupportByAPs819xUsb(struct net_device *dev)
 static void rtl8192_refresh_supportrate(struct r8192_priv *priv)
 {
 	struct ieee80211_device *ieee = priv->ieee80211;
-	/* We do not consider set support rate for ABG mode, only
+	/*
+	 * We do not consider set support rate for ABG mode, only
 	 * HT MCS rate is set here.
 	 */
 	if (ieee->mode == WIRELESS_MODE_N_24G ||
@@ -2085,7 +2100,8 @@ static void rtl8192_SetWirelessMode(struct net_device *dev, u8 wireless_mode)
 		}
 	}
 #ifdef TO_DO_LIST
-	/* TODO: this function doesn't work well at this time,
+	/*
+	 * TODO: this function doesn't work well at this time,
 	 * we should wait for FPGA
 	 */
 	ActUpdateChannelAccessSetting(
@@ -2194,21 +2210,25 @@ static void rtl8192_init_priv_variable(struct net_device *dev)
 			pHalData->CSMethod |
 			/* accept management/data */
 			RCR_AMF | RCR_ADF |
-			/* accept control frame for SW
+			/*
+			 * accept control frame for SW
 			 * AP needs PS-poll
 			 */
 			RCR_ACF |
 			/* accept BC/MC/UC */
 			RCR_AB | RCR_AM | RCR_APM |
-			/* accept ICV/CRC error
+			/*
+			 * accept ICV/CRC error
 			 * packet
 			 */
 			RCR_AICV | RCR_ACRC32 |
-			/* Max DMA Burst Size per Tx
+			/*
+			 * Max DMA Burst Size per Tx
 			 * DMA Burst, 7: unlimited.
 			 */
 			((u32)7 << RCR_MXDMA_OFFSET) |
-			/* Rx FIFO Threshold,
+			/*
+			 * Rx FIFO Threshold,
 			 * 7: No Rx threshold.
 			 */
 			(pHalData->EarlyRxThreshold << RCR_FIFO_OFFSET) |
@@ -2300,7 +2320,8 @@ static void rtl8192_get_eeprom_size(struct net_device *dev)
 		 "<===========%s(), epromtype:%d\n", __func__, priv->epromtype);
 }

-/* used to swap endian. as ntohl & htonl are not necessary
+/*
+ * used to swap endian. as ntohl & htonl are not necessary
  * to swap endian, so use this instead.
  */
 static inline u16 endian_swap(u16 *data)
@@ -2526,7 +2547,8 @@ static int rtl8192_read_eeprom_info(struct net_device *dev)
 			(priv->EEPROMTxPowerDiff & 0xf0) >> 4;
 		/* CrystalCap, bit12~15 */
 		priv->CrystalCap = priv->EEPROMCrystalCap;
-		/* ThermalMeter, bit0~3 for RFIC1, bit4~7 for RFIC2
+		/*
+		 * ThermalMeter, bit0~3 for RFIC1, bit4~7 for RFIC2
 		 * 92U does not enable TX power tracking.
 		 */
 		priv->ThermalMeter[0] = priv->EEPROMThermalMeter;
@@ -2567,7 +2589,8 @@ static int rtl8192_read_eeprom_info(struct net_device *dev)
 	else
 		RT_TRACE(COMP_EPROM, "\n2T4R config\n");

-	/* We can only know RF type in the function. So we have to init
+	/*
+	 * We can only know RF type in the function. So we have to init
 	 * DIG RATR table again.
 	 */
 	init_rate_adaptive(dev);
@@ -2681,7 +2704,8 @@ static void rtl8192_hwconfig(struct net_device *dev)
 		}
 		break;
 	case WIRELESS_MODE_N_24G:
-		/* It support CCK rate by default. CCK rate will be filtered
+		/*
+		 * It support CCK rate by default. CCK rate will be filtered
 		 * out only when associated AP does not support it.
 		 */
 		regBwOpMode = BW_OPMODE_20MHZ;
@@ -2855,7 +2879,8 @@ static bool rtl8192_adapter_start(struct net_device *dev)
 			RT_TRACE((COMP_INIT | COMP_RF), DBG_LOUD,
 				 ("InitializeAdapter819xUsb(): Turn off RF for RegRfOff ----------\n"));
 			MgntActSet_RF_State(Adapter, eRfOff, RF_CHANGE_BY_SW);
-			/* Those actions will be discard in MgntActSet_RF_State
+			/*
+			 * Those actions will be discard in MgntActSet_RF_State
 			 * because of the same state
 			 */
 			for (eRFPath = 0; eRFPath < pHalData->NumTotalRFPath; eRFPath++)
@@ -2881,7 +2906,8 @@ static bool rtl8192_adapter_start(struct net_device *dev)
 			MgntActSet_RF_State(Adapter,
 					    eRfOff,
 					    pMgntInfo->RfOffReason);
-			/* Those actions will be discard in MgntActSet_RF_State
+			/*
+			 * Those actions will be discard in MgntActSet_RF_State
 			 * because of the same state
 			 */
 			for (eRFPath = 0; eRFPath < pHalData->NumTotalRFPath; eRFPath++)
@@ -2906,7 +2932,7 @@ static bool rtl8192_adapter_start(struct net_device *dev)


 	rtl8192_phy_updateInitGain(dev);
-	/*--set CCK and OFDM Block "ON"--*/
+	/* --set CCK and OFDM Block "ON"-- */
 	rtl8192_setBBreg(dev, rFPGA0_RFMOD, bCCKEn, 0x1);
 	rtl8192_setBBreg(dev, rFPGA0_RFMOD, bOFDMEn, 0x1);

@@ -2963,7 +2989,8 @@ static bool rtl8192_adapter_start(struct net_device *dev)
 	return init_status;
 }

-/* this configures registers for beacon tx and enables it via
+/*
+ * this configures registers for beacon tx and enables it via
  * rtl8192_beacon_tx_enable(). rtl8192_beacon_tx_disable() might
  * be used to stop beacon transmission
  */
@@ -3038,7 +3065,8 @@ static bool HalRxCheckStuck819xUsb(struct net_device *dev)
 	RT_TRACE(COMP_RESET,
 		 "%s(): RegRxCounter is %d,RxCounter is %d\n", __func__,
 		 RegRxCounter, priv->RxCounter);
-	/* If rssi is small, we should check rx for long time because of bad rx.
+	/*
+	 * If rssi is small, we should check rx for long time because of bad rx.
 	 * or maybe it will continuous silent reset every 2 seconds.
 	 */
 	rx_chk_cnt++;
@@ -3116,7 +3144,8 @@ static RESET_TYPE rtl819x_ifcheck_resetornot(struct net_device *dev)
 	TxResetType = TxCheckStuck(dev);
 	if (rfState != eRfOff ||
 	    (priv->ieee80211->iw_mode != IW_MODE_ADHOC)) {
-		/* If driver is in the status of firmware download failure,
+		/*
+		 * If driver is in the status of firmware download failure,
 		 * driver skips RF initialization and RF is in turned off
 		 * state. Driver should check whether Rx stuck and do silent
 		 * reset. And if driver is in firmware download failure status,
@@ -3216,7 +3245,8 @@ static void CamRestoreAllEntry(struct net_device *dev)
 	}
 }

-/* This function is used to fix Tx/Rx stop bug temporarily.
+/*
+ * This function is used to fix Tx/Rx stop bug temporarily.
  * This function will do "system reset" to NIC when Tx or Rx is stuck.
  * The method checking Tx/Rx stuck of this function is supported by FW,
  * which reports Tx and Rx counter to register 0x128 and 0x130.
@@ -3527,7 +3557,8 @@ int rtl8192_down(struct net_device *dev)
 	for (i = 0; i < MAX_QUEUE_SIZE; i++)
 		skb_queue_purge(&priv->ieee80211->skb_drv_aggQ[i]);

-	/* as cancel_delayed_work will del work->timer, so if work is not
+	/*
+	 * as cancel_delayed_work will del work->timer, so if work is not
 	 * defined as struct delayed_work, it will corrupt
 	 */
 	rtl8192_cancel_deferred_work(priv);
@@ -3652,7 +3683,8 @@ static int rtl8192_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
 				if (ieee->pairwise_key_type) {
 					memcpy((u8 *)key, ipw->u.crypt.key, 16);
 					EnableHWSecurityConfig8192(dev);
-					/* We fill both index entry and 4th
+					/*
+					 * We fill both index entry and 4th
 					 * entry for pairwise key as in IPW
 					 * interface, adhoc will only get here,
 					 * so we need index entry for its
@@ -3873,7 +3905,8 @@ static long rtl819x_translate_todbm(u8 signal_strength_index)
 }


-/* We can not declare RSSI/EVM total value of sliding window to
+/*
+ * We can not declare RSSI/EVM total value of sliding window to
  * be a local static. Otherwise, it may increase when we return from S3/S4. The
  * value will be kept in memory or disk. Declare the value in the adaptor
  * and it will be reinitialized when returned from S3/S4.
@@ -3936,7 +3969,8 @@ static void rtl8192_process_phyinfo(struct r8192_priv *priv, u8 *buffer,
 		return;


-	/* only rtl8190 supported
+	/*
+	 * only rtl8190 supported
 	 * rtl8190_process_cck_rxpathsel(priv,pprevious_stats);
 	 */

@@ -3946,7 +3980,8 @@ static void rtl8192_process_phyinfo(struct r8192_priv *priv, u8 *buffer,
 	/* record the general signal strength to the sliding window. */


-	/* <2> Showed on UI for engineering
+	/*
+	 * <2> Showed on UI for engineering
 	 * hardware does not provide rssi information for each rf path in CCK
 	 */
 	if (!pprevious_stats->bIsCCK &&
@@ -4069,7 +4104,8 @@ static void rtl8192_process_phyinfo(struct r8192_priv *priv, u8 *buffer,
 	}
 }

-/*-----------------------------------------------------------------------------
+/*
+ * -----------------------------------------------------------------------------
  * Function:	rtl819x_query_rxpwrpercentage()
  *
  * Overview:
@@ -4079,7 +4115,7 @@ static void rtl8192_process_phyinfo(struct r8192_priv *priv, u8 *buffer,
  * Output:		NONE
  *
  * Return:		0-100 percentage
- *---------------------------------------------------------------------------
+ * ---------------------------------------------------------------------------
  */
 static u8 rtl819x_query_rxpwrpercentage(s8 antpower)
 {
@@ -4208,7 +4244,8 @@ static void rtl8192_query_rxphystatus(struct r8192_priv *priv,
 	if (is_cck_rate) {
 		/* (1)Hardware does not provide RSSI for CCK */

-		/* (2)PWDB, Average PWDB calculated by hardware
+		/*
+		 * (2)PWDB, Average PWDB calculated by hardware
 		 * (for rate adaptive)
 		 */
 		u8 report;
@@ -4309,7 +4346,8 @@ static void rtl8192_query_rxphystatus(struct r8192_priv *priv,
 		}


-		/* (2)PWDB, Average PWDB calculated by hardware
+		/*
+		 * (2)PWDB, Average PWDB calculated by hardware
 		 * (for rate adaptive)
 		 */
 		rx_pwr_all = (((pofdm_buf->pwdb_all) >> 1) & 0x7f) - 106;
@@ -4331,7 +4369,8 @@ static void rtl8192_query_rxphystatus(struct r8192_priv *priv,
 			tmp_rxevm =	pofdm_buf->rxevm_X[i];
 			rx_evmX = (s8)(tmp_rxevm);

-			/* Do not use shift operation like "rx_evmX >>= 1"
+			/*
+			 * Do not use shift operation like "rx_evmX >>= 1"
 			 * because the compiler of free build environment will
 			 * set the most significant bit to "zero" when doing
 			 * shifting operation which may change a negative value
@@ -4342,7 +4381,8 @@ static void rtl8192_query_rxphystatus(struct r8192_priv *priv,

 			evm = rtl819x_evm_dbtopercentage(rx_evmX);
 			if (i == 0)
-				/* Fill value in RFD, Get the first spatial
+				/*
+				 * Fill value in RFD, Get the first spatial
 				 * stream only
 				 */
 				pstats->SignalQuality =
@@ -4364,7 +4404,8 @@ static void rtl8192_query_rxphystatus(struct r8192_priv *priv,
 			priv->stats.received_bwtype[0]++;
 	}

-	/* UI BSS List signal strength(in percentage), make it good looking,
+	/*
+	 * UI BSS List signal strength(in percentage), make it good looking,
 	 * from 0~100. It is assigned to the BSS List in
 	 * GetValueFromBeaconOrProbeRsp().
 	 */
@@ -4396,7 +4437,8 @@ static void TranslateRxSignalStuff819xUsb(struct sk_buff *skb,
 					  struct ieee80211_rx_stats *pstats,
 					  struct rx_drvinfo_819x_usb  *pdrvinfo)
 {
-	/* TODO: We must only check packet for current MAC address.
+	/*
+	 * TODO: We must only check packet for current MAC address.
 	 * Not finish
 	 */
 	struct rtl8192_rx_info *info = (struct rtl8192_rx_info *)skb->cb;
@@ -4441,7 +4483,8 @@ static void TranslateRxSignalStuff819xUsb(struct sk_buff *skb,
 		priv->stats.numpacket_matchbssid++;
 	if (bpacket_toself)
 		priv->stats.numpacket_toself++;
-	/* Process PHY information for previous packet (RSSI/PWDB/EVM)
+	/*
+	 * Process PHY information for previous packet (RSSI/PWDB/EVM)
 	 * Because phy information is contained in the last packet of AMPDU
 	 * only, so driver should process phy information of previous packet
 	 */
@@ -4616,7 +4659,8 @@ static void query_rxdesc_status(struct sk_buff *skb,
 	if (stats->Length < 24 || stats->Length > MAX_8192U_RX_SIZE)
 		stats->bHwError |= 1;
 	/* Get Driver Info */
-	/* TODO: Need to verify it on FGPA platform
+	/*
+	 * TODO: Need to verify it on FGPA platform
 	 * Driver info are written to the RxBuffer following rx desc
 	 */
 	if (stats->RxDrvInfoSize != 0) {
@@ -4633,7 +4677,8 @@ static void query_rxdesc_status(struct sk_buff *skb,
 			ret_rate = HwRateToMRate90(driver_info->RxHT,
 						   driver_info->RxRate);
 			if (ret_rate == 0xff) {
-				/* Abnormal Case: Receive CRC OK packet with Rx
+				/*
+				 * Abnormal Case: Receive CRC OK packet with Rx
 				 * descriptor indicating non supported rate.
 				 * Special Error Handling here
 				 */
@@ -4744,7 +4789,8 @@ static void rtl819xusb_process_received_packet(
 #endif
 #ifdef ENABLE_PS  /* for adding ps function in future */
 	RT_RF_POWER_STATE rtState;
-	/* When RF is off, we should not count the packet for hw/sw synchronize
+	/*
+	 * When RF is off, we should not count the packet for hw/sw synchronize
 	 * reason, ie. there may be a duration while sw switch is changed and
 	 * hw switch is being changed.
 	 */
@@ -4926,7 +4972,8 @@ static int rtl8192_usb_probe(struct usb_interface *intf,
 	return ret;
 }

-/* detach all the work and timer structure declared or inititialize
+/*
+ * detach all the work and timer structure declared or inititialize
  * in r8192U_init function.
  */
 static void rtl8192_cancel_deferred_work(struct r8192_priv *priv)
@@ -5023,7 +5070,8 @@ void EnableHWSecurityConfig8192(struct net_device *dev)
 		SECR_value |= SCR_RxUseDK;
 		SECR_value |= SCR_TxUseDK;
 	}
-	/* add HWSec active enable here.
+	/*
+	 * add HWSec active enable here.
 	 * default using hwsec. when peer AP is in N mode only and
 	 * pairwise_key_type is none_aes(which HT_IOT_ACT_PURE_N_MODE indicates
 	 * it), use software security. when peer AP is in b,g,n mode mixed and
diff --git a/drivers/staging/rtl8192u/r8192U_dm.c b/drivers/staging/rtl8192u/r8192U_dm.c
index 2ba01041406b..b15cf98281dd 100644
--- a/drivers/staging/rtl8192u/r8192U_dm.c
+++ b/drivers/staging/rtl8192u/r8192U_dm.c
@@ -21,7 +21,7 @@ Major Change History:
 #include "r819xU_phyreg.h"
 #include "r8190_rtl8256.h"
 #include "r819xU_cmdpkt.h"
-/*---------------------------Define Local Constant---------------------------*/
+/* ---------------------------Define Local Constant--------------------------- */
 /* Indicate different AP vendor for IOT issue. */
 static u32 edca_setting_DL[HT_IOT_PEER_MAX] = {
 	0x5e4322, 0x5e4322, 0x5e4322, 0x604322, 0x00a44f, 0x5ea44f
@@ -32,10 +32,10 @@ static u32 edca_setting_UL[HT_IOT_PEER_MAX] = {

 #define RTK_UL_EDCA 0xa44f
 #define RTK_DL_EDCA 0x5e4322
-/*---------------------------Define Local Constant---------------------------*/
+/* ---------------------------Define Local Constant--------------------------- */


-/*------------------------Define global variable-----------------------------*/
+/* ------------------------Define global variable----------------------------- */
 /* Debug variable ? */
 struct dig dm_digtable;
 /* Store current software write register content for MAC PHY. */
@@ -53,11 +53,11 @@ static	void	dm_init_bandwidth_autoswitch(struct net_device *dev);
 static	void	dm_bandwidth_autoswitch(struct net_device *dev);

 /* DM --> TX power control */
-/*static	void	dm_initialize_txpower_tracking(struct net_device *dev);*/
+/* static	void	dm_initialize_txpower_tracking(struct net_device *dev); */

 static	void	dm_check_txpower_tracking(struct net_device *dev);

-/*static	void	dm_txpower_reset_recovery(struct net_device *dev);*/
+/* static	void	dm_txpower_reset_recovery(struct net_device *dev); */

 /* DM --> Dynamic Init Gain by RSSI */
 static	void	dm_dig_init(struct net_device *dev);
@@ -89,16 +89,16 @@ static void dm_deInit_fsync(struct net_device *dev);
 /* Added by vivi, 20080522 */
 static	void	dm_check_txrateandretrycount(struct net_device *dev);

-/*---------------------Define local function prototype-----------------------*/
+/* ---------------------Define local function prototype----------------------- */

-/*---------------------Define of Tx Power Control For Near/Far Range --------*/   /*Add by Jacken 2008/02/18 */
+/* ---------------------Define of Tx Power Control For Near/Far Range -------- */   /* Add by Jacken 2008/02/18 */
 static	void	dm_init_dynamic_txpower(struct net_device *dev);
 static	void	dm_dynamic_txpower(struct net_device *dev);

 /* DM --> For rate adaptive and DIG, we must send RSSI to firmware */
 static	void dm_send_rssi_tofw(struct net_device *dev);
 static	void	dm_ctstoself(struct net_device *dev);
-/*---------------------------Define function prototype------------------------*/
+/* ---------------------------Define function prototype------------------------ */
 /*
  * ================================================================================
  *	HW Dynamic mechanism interface.
@@ -121,7 +121,7 @@ void init_hal_dm(struct net_device *dev)
 	/* Initial TX Power Control for near/far range , add by amy 2008/05/15, porting from windows code. */
 	dm_init_dynamic_txpower(dev);
 	init_rate_adaptive(dev);
-	/*dm_initialize_txpower_tracking(dev);*/
+	/* dm_initialize_txpower_tracking(dev); */
 	dm_dig_init(dev);
 	dm_init_edca_turbo(dev);
 	dm_init_bandwidth_autoswitch(dev);
@@ -195,11 +195,11 @@ void dm_CheckRxAggregation(struct net_device *dev)

 void hal_dm_watchdog(struct net_device *dev)
 {
-	/*struct r8192_priv *priv = ieee80211_priv(dev);*/
+	/* struct r8192_priv *priv = ieee80211_priv(dev); */

-	/*static u8	previous_bssid[6] ={0};*/
+	/* static u8	previous_bssid[6] ={0}; */

-	/*Add by amy 2008/05/15 ,porting from windows code.*/
+	/* Add by amy 2008/05/15 ,porting from windows code. */
 	dm_check_rate_adaptive(dev);
 	dm_dynamic_txpower(dev);
 	dm_check_txrateandretrycount(dev);
@@ -267,7 +267,8 @@ void init_rate_adaptive(struct net_device *dev)

 }	/* InitRateAdaptive */

-/*-----------------------------------------------------------------------------
+/*
+ * -----------------------------------------------------------------------------
  * Function:	dm_check_rate_adaptive()
  *
  * Overview:
@@ -282,7 +283,8 @@ void init_rate_adaptive(struct net_device *dev)
  *	When		Who		Remark
  *	05/26/08	amy	Create version 0 porting from windows code.
  *
- *---------------------------------------------------------------------------*/
+ * ---------------------------------------------------------------------------
+ */
 static void dm_check_rate_adaptive(struct net_device *dev)
 {
 	struct r8192_priv *priv = ieee80211_priv(dev);
@@ -335,10 +337,13 @@ static void dm_check_rate_adaptive(struct net_device *dev)
 				(pra->ping_rssi_ratr & (~BIT(31))) |
 				((bshort_gi_enabled) ? BIT(31) : 0);

-		/* 2007/10/08 MH We support RA smooth scheme now. When it is the first
-		   time to link with AP. We will not change upper/lower threshold. If
-		   STA stay in high or low level, we must change two different threshold
-		   to prevent jumping frequently. */
+		/*
+		 * 2007/10/08 MH We support RA smooth scheme now. When it is the first
+		 * time to link with AP. We will not change upper/lower threshold. If
+		 * STA stay in high or low level, we must change two different threshold
+		 * to prevent jumping frequently.
+		 *
+		 */
 		if (pra->ratr_state == DM_RATR_STA_HIGH) {
 			HighRSSIThreshForRA	= pra->high2low_rssi_thresh_for_ra;
 			LowRSSIThreshForRA	= (priv->CurrentChannelBW != HT_CHANNEL_WIDTH_20) ?
@@ -1601,7 +1606,8 @@ static void dm_bb_initialgain_backup(struct net_device *dev)
 }   /* dm_BBInitialGainBakcup */

 #endif
-/*-----------------------------------------------------------------------------
+/*
+ * -----------------------------------------------------------------------------
  * Function:	dm_dig_init()
  *
  * Overview:	Set DIG scheme init value.
@@ -1616,7 +1622,8 @@ static void dm_bb_initialgain_backup(struct net_device *dev)
  *	When		Who		Remark
  *	05/15/2008	amy		Create Version 0 porting from windows code.
  *
- *---------------------------------------------------------------------------*/
+ * ---------------------------------------------------------------------------
+ */
 static void dm_dig_init(struct net_device *dev)
 {
 	struct r8192_priv *priv = ieee80211_priv(dev);
@@ -1644,7 +1651,8 @@ static void dm_dig_init(struct net_device *dev)

 }	/* dm_dig_init */

-/*-----------------------------------------------------------------------------
+/*
+ * -----------------------------------------------------------------------------
  * Function:	dm_ctrl_initgain_byrssi()
  *
  * Overview:	Driver must monitor RSSI and notify firmware to change initial
@@ -1660,7 +1668,8 @@ static void dm_dig_init(struct net_device *dev)
  * Revised History:
  *	When		Who		Remark
  *	05/27/2008	amy		Create Version 0 porting from windows code.
- *---------------------------------------------------------------------------*/
+ * ---------------------------------------------------------------------------
+ */
 static void dm_ctrl_initgain_byrssi(struct net_device *dev)
 {
 	if (!dm_digtable.dig_enable_flag)
@@ -1747,11 +1756,15 @@ static void dm_ctrl_initgain_byrssi_by_fwfalse_alarm(
 	/*DbgPrint("DIG Check\n\r RSSI=%d LOW=%d HIGH=%d STATE=%d",
 	pHalData->UndecoratedSmoothedPWDB, DM_DigTable.RssiLowThresh,
 	DM_DigTable.RssiHighThresh, DM_DigTable.Dig_State);*/
-	/* 1. When RSSI decrease, We have to judge if it is smaller than a threshold
-		  and then execute the step below. */
+	/*
+	 * 1. When RSSI decrease, We have to judge if it is smaller than a threshold
+	 * and then execute the step below.
+	 */
 	if (priv->undecorated_smoothed_pwdb <= dm_digtable.rssi_low_thresh) {
-		/* 2008/02/05 MH When we execute silent reset, the DIG PHY parameters
-		   will be reset to init value. We must prevent the condition. */
+		/*
+		 * 2008/02/05 MH When we execute silent reset, the DIG PHY parameters
+		 * will be reset to init value. We must prevent the condition.
+		 */
 		if (dm_digtable.dig_state == DM_STA_DIG_OFF &&
 		    (priv->reset_count == reset_cnt)) {
 			return;
@@ -1796,8 +1809,10 @@ static void dm_ctrl_initgain_byrssi_by_fwfalse_alarm(

 	}

-	/* 2. When RSSI increase, We have to judge if it is larger than a threshold
-		  and then execute the step below.  */
+	/*
+	 * 2. When RSSI increase, We have to judge if it is larger than a threshold
+	 * and then execute the step below.
+	 */
 	if (priv->undecorated_smoothed_pwdb >= dm_digtable.rssi_high_thresh) {
 		u8 reset_flag = 0;

@@ -1865,7 +1880,8 @@ static void dm_ctrl_initgain_byrssi_by_fwfalse_alarm(

 }	/* dm_CtrlInitGainByRssi */

-/*-----------------------------------------------------------------------------
+/*
+ * -----------------------------------------------------------------------------
  * Function:	dm_ctrl_initgain_byrssi_highpwr()
  *
  * Overview:
@@ -1880,7 +1896,8 @@ static void dm_ctrl_initgain_byrssi_by_fwfalse_alarm(
  *	When		Who		Remark
  *	05/28/2008	amy		Create Version 0 porting from windows code.
  *
- *---------------------------------------------------------------------------*/
+ * ---------------------------------------------------------------------------
+ */
 static void dm_ctrl_initgain_byrssi_highpwr(
 	struct net_device *dev)
 {
@@ -2147,7 +2164,7 @@ static void dm_check_edca_turbo(
 {
 	struct r8192_priv *priv = ieee80211_priv(dev);
 	PRT_HIGH_THROUGHPUT	pHTInfo = priv->ieee80211->pHTInfo;
-	/*PSTA_QOS			pStaQos = pMgntInfo->pStaQos;*/
+	/* PSTA_QOS			pStaQos = pMgntInfo->pStaQos; */

 	/* Keep past Tx/Rx packet count for RT-to-RT EDCA turbo. */
 	static unsigned long			lastTxOkCnt;
@@ -2224,7 +2241,7 @@ static void dm_check_edca_turbo(
 			 * If it is set, immediately set ACM control bit to downgrading AC for passing WMM testplan. Annie, 2005-12-13.
 			 */
 			{
-				/*  TODO:  Modified this part and try to set acm control in only 1 IO processing!! */
+				/* TODO: Modified this part and try to set acm control in only 1 IO processing!! */

 				struct aci_aifsn *pAciAifsn = (struct aci_aifsn *)&(qos_parameters->aifs[0]);
 				u8		AcmCtrl;
@@ -2273,10 +2290,10 @@ static void dm_ctstoself(struct net_device *dev)
 		return;
 	}
 	/*
-	1. Uplink
-	2. Linksys350/Linksys300N
-	3. <50 disable, >55 enable
-	*/
+	 * 1. Uplink
+	 * 2. Linksys350/Linksys300N
+	 * 3. <50 disable, >55 enable
+	 */

 	if (pHTInfo->IOTPeer == HT_IOT_PEER_BROADCOM) {
 		curTxOkCnt = priv->stats.txbytesunicast - lastTxOkCnt;
@@ -2293,7 +2310,8 @@ static void dm_ctstoself(struct net_device *dev)
 	}
 }

-/*-----------------------------------------------------------------------------
+/*
+ * -----------------------------------------------------------------------------
  * Function:	dm_check_pbc_gpio()
  *
  * Overview:	Check if PBC button is pressed.
@@ -2308,7 +2326,8 @@ static void dm_ctstoself(struct net_device *dev)
  *	When		Who		Remark
  *	05/28/2008	amy	Create Version 0 porting from windows code.
  *
- *---------------------------------------------------------------------------*/
+ * ---------------------------------------------------------------------------
+ */
 static	void	dm_check_pbc_gpio(struct net_device *dev)
 {
 	struct r8192_priv *priv = ieee80211_priv(dev);
@@ -2329,7 +2348,8 @@ static	void	dm_check_pbc_gpio(struct net_device *dev)

 }

-/*-----------------------------------------------------------------------------
+/*
+ * -----------------------------------------------------------------------------
  * Function:	DM_RFPathCheckWorkItemCallBack()
  *
  * Overview:	Check if Current RF RX path is enabled
@@ -2344,7 +2364,8 @@ static	void	dm_check_pbc_gpio(struct net_device *dev)
  *	When		Who		Remark
  *	01/30/2008	MHC		Create Version 0.
  *
- *---------------------------------------------------------------------------*/
+ * ---------------------------------------------------------------------------
+ */
 void dm_rf_pathcheck_workitemcallback(struct work_struct *work)
 {
 	struct delayed_work *dwork = to_delayed_work(work);
@@ -2353,8 +2374,10 @@ void dm_rf_pathcheck_workitemcallback(struct work_struct *work)
 	/*bool bactually_set = false;*/
 	u8 rfpath = 0, i;

-	/* 2008/01/30 MH After discussing with SD3 Jerry, 0xc04/0xd04 register will
-	   always be the same. We only read 0xc04 now. */
+	/*
+	 * 2008/01/30 MH After discussing with SD3 Jerry, 0xc04/0xd04 register will
+	 * always be the same. We only read 0xc04 now.
+	 */
 	read_nic_byte(dev, 0xc04, &rfpath);

 	/* Check Bit 0-3, it means if RF A-D is enabled. */
@@ -2579,7 +2602,8 @@ static void dm_rxpath_sel_byrssi(struct net_device *dev)
 	}
 }

-/*-----------------------------------------------------------------------------
+/*
+ * -----------------------------------------------------------------------------
  * Function:	dm_check_rx_path_selection()
  *
  * Overview:	Call a workitem to check current RXRF path and Rx Path selection by RSSI.
@@ -2594,7 +2618,8 @@ static void dm_rxpath_sel_byrssi(struct net_device *dev)
  *	When		Who		Remark
  *	05/28/2008	amy		Create Version 0 porting from windows code.
  *
- *---------------------------------------------------------------------------*/
+ * ---------------------------------------------------------------------------
+ */
 static void dm_check_rx_path_selection(struct net_device *dev)
 {
 	struct r8192_priv *priv = ieee80211_priv(dev);
@@ -2901,7 +2926,8 @@ void dm_check_fsync(struct net_device *dev)
 	}
 }

-/*-----------------------------------------------------------------------------
+/*
+ * -----------------------------------------------------------------------------
  * Function:	dm_shadow_init()
  *
  * Overview:	Store all NIC MAC/BB register content.
@@ -2916,7 +2942,8 @@ void dm_check_fsync(struct net_device *dev)
  *	When		Who		Remark
  *	05/29/2008	amy		Create Version 0 porting from windows code.
  *
- *---------------------------------------------------------------------------*/
+ * ---------------------------------------------------------------------------
+ */
 void dm_shadow_init(struct net_device *dev)
 {
 	u8	page;
@@ -2938,12 +2965,13 @@ void dm_shadow_init(struct net_device *dev)

 }   /* dm_shadow_init */

-/*---------------------------Define function prototype------------------------*/
-/*-----------------------------------------------------------------------------
+/* ---------------------------Define function prototype------------------------ */
+/*
+ * -----------------------------------------------------------------------------
  * Function:	DM_DynamicTxPower()
  *
  * Overview:	Detect Signal strength to control TX Registry
-			Tx Power Control For Near/Far Range
+ *			Tx Power Control For Near/Far Range
  *
  * Input:		NONE
  *
@@ -2955,7 +2983,8 @@ void dm_shadow_init(struct net_device *dev)
  *	When		Who		Remark
  *	03/06/2008	Jacken	Create Version 0.
  *
- *---------------------------------------------------------------------------*/
+ * ---------------------------------------------------------------------------
+ */
 static void dm_init_dynamic_txpower(struct net_device *dev)
 {
 	struct r8192_priv *priv = ieee80211_priv(dev);
@@ -3057,4 +3086,4 @@ static void dm_send_rssi_tofw(struct net_device *dev)
 	write_nic_byte(dev, DRIVER_RSSI, (u8)priv->undecorated_smoothed_pwdb);
 }

-/*---------------------------Define function prototype------------------------*/
+/* ---------------------------Define function prototype------------------------ */
diff --git a/drivers/staging/rtl8192u/r8192U_dm.h b/drivers/staging/rtl8192u/r8192U_dm.h
index 0de0332906bd..d7ed0eb2fedb 100644
--- a/drivers/staging/rtl8192u/r8192U_dm.h
+++ b/drivers/staging/rtl8192u/r8192U_dm.h
@@ -21,7 +21,7 @@
 #ifndef	__R8192UDM_H__
 #define __R8192UDM_H__

-/*--------------------------Define Parameters-------------------------------*/
+/* --------------------------Define Parameters------------------------------- */
 #define         DM_DIG_THRESH_HIGH                      40
 #define         DM_DIG_THRESH_LOW                       35

@@ -59,9 +59,9 @@
 #define         INITIAL_TX_RATE_REG                  0x1b9
 #define         TX_RETRY_COUNT_REG                   0x1ac
 #define         REG_C38_TH                              20
-/*--------------------------Define Parameters-------------------------------*/
+/* --------------------------Define Parameters------------------------------- */

-/*------------------------------Define structure----------------------------*/
+/* ------------------------------Define structure---------------------------- */

 enum dig_algorithm {
 	DIG_ALGO_BY_FALSE_ALARM = 0,
@@ -143,18 +143,18 @@ struct tx_config_cmd {
 	u32     cmd_value;
 };

-/*------------------------------Define structure----------------------------*/
+/* ------------------------------Define structure---------------------------- */

-/*------------------------Export global variable----------------------------*/
+/* ------------------------Export global variable---------------------------- */
 extern struct dig dm_digtable;
 extern u8 dm_shadow[16][256];
-/*------------------------Export global variable----------------------------*/
+/* ------------------------Export global variable---------------------------- */

-/*------------------------Export Marco Definition---------------------------*/
+/* ------------------------Export Marco Definition--------------------------- */

-/*------------------------Export Marco Definition---------------------------*/
+/* ------------------------Export Marco Definition--------------------------- */

-/*--------------------------Exported Function prototype---------------------*/
+/* --------------------------Exported Function prototype--------------------- */
 void init_hal_dm(struct net_device *dev);
 void deinit_hal_dm(struct net_device *dev);
 void hal_dm_watchdog(struct net_device *dev);
@@ -171,8 +171,8 @@ void dm_fsync_timer_callback(struct timer_list *t);
 void dm_cck_txpower_adjust(struct net_device *dev, bool  binch14);
 void dm_shadow_init(struct net_device *dev);
 void dm_initialize_txpower_tracking(struct net_device *dev);
-/*--------------------------Exported Function prototype---------------------*/
+/* --------------------------Exported Function prototype--------------------- */

-#endif	/*__R8192UDM_H__ */
+#endif	/* __R8192UDM_H__ */

 /* End of r8192U_dm.h */
diff --git a/drivers/staging/rtl8192u/r8192U_hw.h b/drivers/staging/rtl8192u/r8192U_hw.h
index 95a2d2ee3c65..79d462894f1d 100644
--- a/drivers/staging/rtl8192u/r8192U_hw.h
+++ b/drivers/staging/rtl8192u/r8192U_hw.h
@@ -39,21 +39,21 @@

 #define EEPROM_TX_POWER_DIFF	0x1F
 #define EEPROM_THERMAL_METER	0x20
-#define EEPROM_PW_DIFF		0x21	//0x21
-#define EEPROM_CRYSTAL_CAP	0x22	//0x22
+#define EEPROM_PW_DIFF		0x21	/* 0x21 */
+#define EEPROM_CRYSTAL_CAP	0x22	/* 0x22 */

-#define EEPROM_TX_PW_INDEX_CCK	0x23	//0x23
-#define EEPROM_TX_PW_INDEX_OFDM_24G	0x24	//0x24~0x26
-#define EEPROM_TX_PW_INDEX_CCK_V1	0x29	//0x29~0x2B
-#define EEPROM_TX_PW_INDEX_OFDM_24G_V1	0x2C	//0x2C~0x2E
-#define EEPROM_TX_PW_INDEX_VER		0x27	//0x27
+#define EEPROM_TX_PW_INDEX_CCK	0x23	/* 0x23 */
+#define EEPROM_TX_PW_INDEX_OFDM_24G	0x24	/* 0x24~0x26 */
+#define EEPROM_TX_PW_INDEX_CCK_V1	0x29	/* 0x29~0x2B */
+#define EEPROM_TX_PW_INDEX_OFDM_24G_V1	0x2C	/* 0x2C~0x2E */
+#define EEPROM_TX_PW_INDEX_VER		0x27	/* 0x27 */

 #define EEPROM_DEFAULT_THERNAL_METER		0x7
 #define EEPROM_DEFAULT_PW_DIFF			0x4
 #define EEPROM_DEFAULT_CRYSTAL_CAP		0x5
 #define EEPROM_DEFAULT_TX_POWER		0x1010
-#define EEPROM_CUSTOMER_ID			0x7B	//0x7B:CustomerID
-#define EEPROM_CHANNEL_PLAN			0x16	//0x7C
+#define EEPROM_CUSTOMER_ID			0x7B	/* 0x7B:CustomerID */
+#define EEPROM_CHANNEL_PLAN			0x16	/* 0x7C */

 #define EEPROM_CID_RUNTOP				0x2
 #define EEPROM_CID_DLINK				0x8
@@ -63,25 +63,24 @@
 #define AC_PARAM_ECW_MIN_OFFSET		8
 #define AC_PARAM_AIFS_OFFSET		0

-//#endif
 enum _RTL8192Usb_HW {
 	MAC0			= 0x000,
 	MAC4			= 0x004,

 #define	BB_GLOBAL_RESET_BIT	0x1
-	BB_GLOBAL_RESET		= 0x020, // BasebandGlobal Reset Register
-	BSSIDR			= 0x02E, // BSSID Register
-	CMDR			= 0x037, // Command register
+	BB_GLOBAL_RESET		= 0x020, /* BasebandGlobal Reset Register */
+	BSSIDR			= 0x02E, /* BSSID Register */
+	CMDR			= 0x037, /* Command register */
 #define CR_RE			0x08
 #define CR_TE			0x04
-	SIFS			= 0x03E, // SIFS register
+	SIFS			= 0x03E, /* SIFS register */

 #define TCR_MXDMA_2048		7
 #define TCR_LRL_OFFSET		0
 #define TCR_SRL_OFFSET		8
 #define TCR_MXDMA_OFFSET	21
-#define TCR_SAT			BIT(24)	// Enable Rate depedent ack timeout timer
-	RCR			= 0x044, // Receive Configuration Register
+#define TCR_SAT			BIT(24)	/* Enable Rate depedent ack timeout timer */
+	RCR			= 0x044, /* Receive Configuration Register */
 #define MAC_FILTER_MASK (BIT(0) | BIT(1) | BIT(2) | BIT(3) | BIT(5) | \
 			 BIT(12) | BIT(18) | BIT(19) | BIT(20) | BIT(21) | \
 			 BIT(22) | BIT(23))
@@ -91,45 +90,47 @@ enum _RTL8192Usb_HW {
 #define MAX_RX_DMA_MASK 	(BIT(8) | BIT(9) | BIT(10))
 #define RCR_MXDMA_OFFSET	8
 #define RCR_FIFO_OFFSET		13
-#define RCR_ONLYERLPKT		BIT(31)			// Early Receiving based on Packet Size.
-#define RCR_CBSSID		BIT(23)			// Accept BSSID match packet
-#define RCR_APWRMGT		BIT(22)			// Accept power management packet
-#define RCR_AMF			BIT(20)			// Accept management type frame
-#define RCR_ACF			BIT(19)			// Accept control type frame
-#define RCR_ADF			BIT(18)			// Accept data type frame
-#define RCR_AICV		BIT(12)			// Accept ICV error packet
-#define	RCR_ACRC32		BIT(5)			// Accept CRC32 error packet
-#define	RCR_AB			BIT(3)			// Accept broadcast packet
-#define	RCR_AM			BIT(2)			// Accept multicast packet
-#define	RCR_APM			BIT(1)			// Accept physical match packet
-#define	RCR_AAP			BIT(0)			// Accept all unicast packet
-	SLOT_TIME		= 0x049, // Slot Time Register
-	ACK_TIMEOUT		= 0x04c, // Ack Timeout Register
-	EDCAPARA_BE		= 0x050, // EDCA Parameter of AC BE
-	EDCAPARA_BK		= 0x054, // EDCA Parameter of AC BK
-	EDCAPARA_VO		= 0x058, // EDCA Parameter of AC VO
-	EDCAPARA_VI		= 0x05C, // EDCA Parameter of AC VI
-	BCN_TCFG		= 0x062, // Beacon Time Configuration
+#define RCR_ONLYERLPKT		BIT(31)			/* Early Receiving based on Packet Size. */
+#define RCR_CBSSID		BIT(23)			/* Accept BSSID match packet */
+#define RCR_APWRMGT		BIT(22)			/* Accept power management packet */
+#define RCR_AMF			BIT(20)			/* Accept management type frame */
+#define RCR_ACF			BIT(19)			/* Accept control type frame */
+#define RCR_ADF			BIT(18)			/* Accept data type frame */
+#define RCR_AICV		BIT(12)			/* Accept ICV error packet */
+#define	RCR_ACRC32		BIT(5)			/* Accept CRC32 error packet */
+#define	RCR_AB			BIT(3)			/* Accept broadcast packet */
+#define	RCR_AM			BIT(2)			/* Accept multicast packet */
+#define	RCR_APM			BIT(1)			/* Accept physical match packet */
+#define	RCR_AAP			BIT(0)			/* Accept all unicast packet */
+	SLOT_TIME		= 0x049, /* Slot Time Register */
+	ACK_TIMEOUT		= 0x04c, /* Ack Timeout Register */
+	EDCAPARA_BE		= 0x050, /* EDCA Parameter of AC BE */
+	EDCAPARA_BK		= 0x054, /* EDCA Parameter of AC BK */
+	EDCAPARA_VO		= 0x058, /* EDCA Parameter of AC VO */
+	EDCAPARA_VI		= 0x05C, /* EDCA Parameter of AC VI */
+	BCN_TCFG		= 0x062, /* Beacon Time Configuration */
 #define BCN_TCFG_CW_SHIFT		8
 #define BCN_TCFG_IFS			0
-	BCN_INTERVAL		= 0x070, // Beacon Interval (TU)
-	ATIMWND			= 0x072, // ATIM Window Size (TU)
-	BCN_DRV_EARLY_INT	= 0x074, // Driver Early Interrupt Time (TU). Time to send interrupt to notify to change beacon content before TBTT
-	BCN_DMATIME		= 0x076, // Beacon DMA and ATIM interrupt time (US). Indicates the time before TBTT to perform beacon queue DMA
-	BCN_ERR_THRESH		= 0x078, // Beacon Error Threshold
-	RWCAM			= 0x0A0, //IN 8190 Data Sheet is called CAMcmd
-	WCAMI			= 0x0A4, // Software write CAM input content
-	SECR			= 0x0B0, //Security Configuration Register
-#define	SCR_TxUseDK		BIT(0)			//Force Tx Use Default Key
-#define SCR_RxUseDK		BIT(1)			//Force Rx Use Default Key
-#define SCR_TxEncEnable		BIT(2)			//Enable Tx Encryption
-#define SCR_RxDecEnable		BIT(3)			//Enable Rx Decryption
-#define SCR_SKByA2		BIT(4)			//Search kEY BY A2
-#define SCR_NoSKMC		BIT(5)			//No Key Search for Multicast
-
-//----------------------------------------------------------------------------
-//       8190 CPU General Register		(offset 0x100, 4 byte)
-//----------------------------------------------------------------------------
+	BCN_INTERVAL		= 0x070, /* Beacon Interval (TU) */
+	ATIMWND			= 0x072, /* ATIM Window Size (TU) */
+	BCN_DRV_EARLY_INT	= 0x074, /* Driver Early Interrupt Time (TU). Time to send interrupt to notify to change beacon content before TBTT */
+	BCN_DMATIME		= 0x076, /* Beacon DMA and ATIM interrupt time (US). Indicates the time before TBTT to perform beacon queue DMA */
+	BCN_ERR_THRESH		= 0x078, /* Beacon Error Threshold */
+	RWCAM			= 0x0A0, /* IN 8190 Data Sheet is called CAMcmd */
+	WCAMI			= 0x0A4, /* Software write CAM input content */
+	SECR			= 0x0B0, /* Security Configuration Register */
+#define	SCR_TxUseDK		BIT(0)			/* Force Tx Use Default Key */
+#define SCR_RxUseDK		BIT(1)			/* Force Rx Use Default Key */
+#define SCR_TxEncEnable		BIT(2)			/* Enable Tx Encryption */
+#define SCR_RxDecEnable		BIT(3)			/* Enable Rx Decryption */
+#define SCR_SKByA2		BIT(4)			/* Search kEY BY A2 */
+#define SCR_NoSKMC		BIT(5)			/* No Key Search for Multicast */
+
+/*
+ * ----------------------------------------------------------------------------
+ *       8190 CPU General Register		(offset 0x100, 4 byte)
+ * ----------------------------------------------------------------------------
+ */
 #define	CPU_CCK_LOOPBACK	0x00030000
 #define	CPU_GEN_SYSTEM_RESET	0x00000001
 #define	CPU_GEN_FIRMWARE_RESET	0x00000008
@@ -138,37 +139,38 @@ enum _RTL8192Usb_HW {
 #define	CPU_GEN_PUT_CODE_OK	0x00000080
 #define	CPU_GEN_BB_RST		0x00000100
 #define	CPU_GEN_PWR_STB_CPU	0x00000004
-#define CPU_GEN_NO_LOOPBACK_MSK	0xFFF8FFFF // Set bit18,17,16 to 0. Set bit19
-#define CPU_GEN_NO_LOOPBACK_SET	0x00080000 // Set BIT19 to 1
-	CPU_GEN			= 0x100, // CPU Reset Register
-
-	AcmHwCtrl		= 0x171, // ACM Hardware Control Register
-//----------------------------------------------------------------------------
-////
-////       8190 AcmHwCtrl bits                                    (offset 0x171, 1 byte)
-////----------------------------------------------------------------------------
-//
+#define CPU_GEN_NO_LOOPBACK_MSK	0xFFF8FFFF /* Set bit18,17,16 to 0. Set bit19 */
+#define CPU_GEN_NO_LOOPBACK_SET	0x00080000 /* Set BIT19 to 1 */
+	CPU_GEN			= 0x100, /* CPU Reset Register */
+
+	AcmHwCtrl		= 0x171, /* ACM Hardware Control Register */
+/*
+ * ----------------------------------------------------------------------------
+ *
+ *         8190 AcmHwCtrl bits                                    (offset 0x171, 1 byte)
+ * ----------------------------------------------------------------------------
+ */
 #define AcmHw_BeqEn             BIT(1)

-	RQPN1			= 0x180, // Reserved Queue Page Number , Vo Vi, Be, Bk
-	RQPN2			= 0x184, // Reserved Queue Page Number, HCCA, Cmd, Mgnt, High
-	RQPN3			= 0x188, // Reserved Queue Page Number, Bcn, Public,
-	QPNR			= 0x1D0, //0x1F0, // Queue Packet Number report per TID
+	RQPN1			= 0x180, /* Reserved Queue Page Number , Vo Vi, Be, Bk */
+	RQPN2			= 0x184, /* Reserved Queue Page Number, HCCA, Cmd, Mgnt, High */
+	RQPN3			= 0x188, /* Reserved Queue Page Number, Bcn, Public, */
+	QPNR			= 0x1D0, /* 0x1F0, Queue Packet Number report per TID */

 #define	BW_OPMODE_5G			BIT(1)
 #define	BW_OPMODE_20MHZ			BIT(2)
-	BW_OPMODE		= 0x300, // Bandwidth operation mode
-	MSR			= 0x303, // Media Status register
+	BW_OPMODE		= 0x300, /* Bandwidth operation mode */
+	MSR			= 0x303, /* Media Status register */
 #define MSR_LINK_MASK      (BIT(0)|BIT(1))
 #define MSR_LINK_MANAGED   2
 #define MSR_LINK_NONE      0
 #define MSR_LINK_SHIFT     0
 #define MSR_LINK_ADHOC     1
 #define MSR_LINK_MASTER    3
-	RETRY_LIMIT		= 0x304, // Retry Limit [15:8]-short, [7:0]-long
+	RETRY_LIMIT		= 0x304, /* Retry Limit [15:8]-short, [7:0]-long */
 #define RETRY_LIMIT_SHORT_SHIFT 8
 #define RETRY_LIMIT_LONG_SHIFT 0
-	RRSR			= 0x310, // Response Rate Set
+	RRSR			= 0x310, /* Response Rate Set */
 #define RRSR_1M						BIT(0)
 #define RRSR_2M						BIT(1)
 #define RRSR_5_5M					BIT(2)
@@ -181,19 +183,21 @@ enum _RTL8192Usb_HW {
 #define RRSR_36M					BIT(9)
 #define RRSR_48M					BIT(10)
 #define RRSR_54M					BIT(11)
-#define BRSR_AckShortPmb			BIT(23)		// CCK ACK: use Short Preamble or not.
+#define BRSR_AckShortPmb			BIT(23)		/* CCK ACK: use Short Preamble or not. */
 	UFWP			= 0x318,
-	RATR0			= 0x320, // Rate Adaptive Table register1
-	DRIVER_RSSI		= 0x32c,					// Driver tell Firmware current RSSI
-//----------------------------------------------------------------------------
-//       8190 Rate Adaptive Table Register	(offset 0x320, 4 byte)
-//----------------------------------------------------------------------------
-//CCK
+	RATR0			= 0x320, /* Rate Adaptive Table register1 */
+	DRIVER_RSSI		= 0x32c,					/* Driver tell Firmware current RSSI */
+/*
+ * ----------------------------------------------------------------------------
+ *        8190 Rate Adaptive Table Register	(offset 0x320, 4 byte)
+ * ----------------------------------------------------------------------------
+ */
+/* CCK */
 #define	RATR_1M			0x00000001
 #define	RATR_2M			0x00000002
 #define	RATR_55M		0x00000004
 #define	RATR_11M		0x00000008
-//OFDM
+/* OFDM */
 #define	RATR_6M			0x00000010
 #define	RATR_9M			0x00000020
 #define	RATR_12M		0x00000040
@@ -202,7 +206,7 @@ enum _RTL8192Usb_HW {
 #define	RATR_36M		0x00000200
 #define	RATR_48M		0x00000400
 #define	RATR_54M		0x00000800
-//MCS 1 Spatial Stream
+/* MCS 1 Spatial Stream */
 #define	RATR_MCS0		0x00001000
 #define	RATR_MCS1		0x00002000
 #define	RATR_MCS2		0x00004000
@@ -211,7 +215,7 @@ enum _RTL8192Usb_HW {
 #define	RATR_MCS5		0x00020000
 #define	RATR_MCS6		0x00040000
 #define	RATR_MCS7		0x00080000
-//MCS 2 Spatial Stream
+/* MCS 2 Spatial Stream */
 #define	RATR_MCS8		0x00100000
 #define	RATR_MCS9		0x00200000
 #define	RATR_MCS10		0x00400000
@@ -220,7 +224,7 @@ enum _RTL8192Usb_HW {
 #define	RATR_MCS13		0x02000000
 #define	RATR_MCS14		0x04000000
 #define	RATR_MCS15		0x08000000
-// ALL CCK Rate
+/* ALL CCK Rate */
 #define RATE_ALL_CCK		RATR_1M|RATR_2M|RATR_55M|RATR_11M
 #define RATE_ALL_OFDM_AG	RATR_6M|RATR_9M|RATR_12M|RATR_18M|RATR_24M\
 							|RATR_36M|RATR_48M|RATR_54M
@@ -239,8 +243,10 @@ enum _RTL8192Usb_HW {
 #define EPROM_W_BIT  BIT(1)
 #define EPROM_R_BIT  BIT(0)
 };
-//----------------------------------------------------------------------------
-//       818xB AnaParm & AnaParm2 Register
-//----------------------------------------------------------------------------
+/*
+ * ----------------------------------------------------------------------------
+ *       818xB AnaParm & AnaParm2 Register
+ * ----------------------------------------------------------------------------
+ */
 #define GPI 0x108
 #endif
diff --git a/drivers/staging/rtl8192u/r8192U_wx.c b/drivers/staging/rtl8192u/r8192U_wx.c
index 5822bb7984b9..adb9fe8a79da 100644
--- a/drivers/staging/rtl8192u/r8192U_wx.c
+++ b/drivers/staging/rtl8192u/r8192U_wx.c
@@ -200,7 +200,8 @@ static int r8192_wx_set_mode(struct net_device *dev, struct iw_request_info *a,
 struct  iw_range_with_scan_capa {
 	/* Informative stuff (to choose between different interface) */
 	__u32           throughput;     /* To give an idea... */
-	/* In theory this value should be the maximum benchmarked
+	/*
+	 * In theory this value should be the maximum benchmarked
 	 * TCP/IP throughput, because with most of these devices the
 	 * bit rate is meaningless (overhead an co) to estimate how
 	 * fast the connection will go and pick the fastest one.
@@ -231,11 +232,13 @@ static int rtl8180_wx_get_range(struct net_device *dev,
 	wrqu->data.length = sizeof(*range);
 	memset(range, 0, sizeof(*range));

-	/* Let's try to keep this struct in the same order as in
+	/*
+	 * Let's try to keep this struct in the same order as in
 	 * linux/include/wireless.h
 	 */

-	/* TODO: See what values we can set, and remove the ones we can't
+	/*
+	 * TODO: See what values we can set, and remove the ones we can't
 	 * set, or fill them with some default data.
 	 */

@@ -644,7 +647,8 @@ static int r8192_wx_set_retry(struct net_device *dev,
 		DMESG("Setting retry for non RTS/CTS data to %d", wrqu->retry.value);
 	}

-	/* FIXME !
+	/*
+	 * FIXME !
 	 * We might try to write directly the TX config register
 	 * or to restart just the (R)TX process.
 	 * I'm unsure if whole reset is really needed
diff --git a/drivers/staging/rtl8192u/r819xU_cmdpkt.c b/drivers/staging/rtl8192u/r819xU_cmdpkt.c
index e064f43fd8b6..1fd596f09241 100644
--- a/drivers/staging/rtl8192u/r819xU_cmdpkt.c
+++ b/drivers/staging/rtl8192u/r819xU_cmdpkt.c
@@ -33,7 +33,8 @@ rt_status SendTxCommandPacket(struct net_device *dev, void *pData, u32 DataLen)
 	struct sk_buff	    *skb;
 	struct cb_desc	    *tcb_desc;

-	/* Get TCB and local buffer from common pool.
+	/*
+	 * Get TCB and local buffer from common pool.
 	 * (It is shared by CmdQ, MgntQ, and USB coalesce DataQ)
 	 */
 	skb  = dev_alloc_skb(USB_HWDESC_HEADER_LEN + DataLen + 4);
@@ -69,7 +70,8 @@ static void cmpk_count_txstatistic(struct net_device *dev, struct cmd_pkt_tx_fee
 	pAdapter->HalFunc.GetHwRegHandler(pAdapter, HW_VAR_RF_STATE,
 					  (pu1Byte)(&rtState));

-	/* When RF is off, we should not count the packet for hw/sw synchronize
+	/*
+	 * When RF is off, we should not count the packet for hw/sw synchronize
 	 * reason, ie. there may be a duration while sw switch is changed and
 	 * hw switch is being changed.
 	 */
@@ -81,7 +83,8 @@ static void cmpk_count_txstatistic(struct net_device *dev, struct cmd_pkt_tx_fee
 	if (pAdapter->bInHctTest)
 		return;
 #endif
-	/* We can not know the packet length and transmit type:
+	/*
+	 * We can not know the packet length and transmit type:
 	 * broadcast or uni or multicast. So the relative statistics
 	 * must be collected in tx feedback info.
 	 */
@@ -120,7 +123,8 @@ static void cmpk_count_txstatistic(struct net_device *dev, struct cmd_pkt_tx_fee
 	priv->stats.txfeedbackretry += pstx_fb->retry_cnt;
 }

-/*-----------------------------------------------------------------------------
+/*
+ * -----------------------------------------------------------------------------
  * Function:    cmpk_handle_tx_feedback()
  *
  * Overview:	The function is responsible for extract the message inside TX
@@ -140,7 +144,7 @@ static void cmpk_count_txstatistic(struct net_device *dev, struct cmd_pkt_tx_fee
  *  When		Who	Remark
  *  05/08/2008		amy	Create Version 0 porting from windows code.
  *
- *---------------------------------------------------------------------------
+ * ---------------------------------------------------------------------------
  */
 static void cmpk_handle_tx_feedback(struct net_device *dev, u8 *pmsg)
 {
@@ -150,7 +154,8 @@ static void cmpk_handle_tx_feedback(struct net_device *dev, u8 *pmsg)
 	priv->stats.txfeedback++;

 	/* 1. Extract TX feedback info from RFD to temp structure buffer. */
-	/* It seems that FW use big endian(MIPS) and DRV use little endian in
+	/*
+	 * It seems that FW use big endian(MIPS) and DRV use little endian in
 	 * windows OS. So we have to read the content byte by byte or transfer
 	 * endian type before copy the message copy.
 	 */
@@ -160,7 +165,8 @@ static void cmpk_handle_tx_feedback(struct net_device *dev, u8 *pmsg)
 	cmpk_count_txstatistic(dev, &rx_tx_fb);
 	/* Comment previous method for TX statistic function. */
 	/* Collect info TX feedback packet to fill TCB. */
-	/* We can not know the packet length and transmit type: broadcast or uni
+	/*
+	 * We can not know the packet length and transmit type: broadcast or uni
 	 * or multicast.
 	 */
 }
@@ -184,7 +190,8 @@ static void cmdpkt_beacontimerinterrupt_819xusb(struct net_device *dev)
 		rtl819xusb_beacon_tx(dev, tx_rate); /* HW Beacon */
 }

-/*-----------------------------------------------------------------------------
+/*
+ * -----------------------------------------------------------------------------
  * Function:    cmpk_handle_interrupt_status()
  *
  * Overview:    The function is responsible for extract the message from
@@ -203,7 +210,7 @@ static void cmdpkt_beacontimerinterrupt_819xusb(struct net_device *dev)
  *  When		Who	Remark
  *  05/12/2008		amy	Add this for rtl8192 porting from windows code.
  *
- *---------------------------------------------------------------------------
+ * ---------------------------------------------------------------------------
  */
 static void cmpk_handle_interrupt_status(struct net_device *dev, u8 *pmsg)
 {
@@ -213,7 +220,8 @@ static void cmpk_handle_interrupt_status(struct net_device *dev, u8 *pmsg)
 	DMESG("---> cmpk_Handle_Interrupt_Status()\n");

 	/* 1. Extract TX feedback info from RFD to temp structure buffer. */
-	/* It seems that FW use big endian(MIPS) and DRV use little endian in
+	/*
+	 * It seems that FW use big endian(MIPS) and DRV use little endian in
 	 * windows OS. So we have to read the content byte by byte or transfer
 	 * endian type before copy the message copy.
 	 */
@@ -248,7 +256,8 @@ static void cmpk_handle_interrupt_status(struct net_device *dev, u8 *pmsg)
 	DMESG("<---- cmpk_handle_interrupt_status()\n");
 }

-/*-----------------------------------------------------------------------------
+/*
+ * -----------------------------------------------------------------------------
  * Function:    cmpk_handle_query_config_rx()
  *
  * Overview:    The function is responsible for extract the message from
@@ -266,14 +275,15 @@ static void cmpk_handle_interrupt_status(struct net_device *dev, u8 *pmsg)
  *  When		Who	Remark
  *  05/12/2008		amy	Create Version 0 porting from windows code.
  *
- *---------------------------------------------------------------------------
+ * ---------------------------------------------------------------------------
  */
 static void cmpk_handle_query_config_rx(struct net_device *dev, u8 *pmsg)
 {
 	struct cmpk_query_cfg	rx_query_cfg;

 	/* 1. Extract TX feedback info from RFD to temp structure buffer. */
-	/* It seems that FW use big endian(MIPS) and DRV use little endian in
+	/*
+	 * It seems that FW use big endian(MIPS) and DRV use little endian in
 	 * windows OS. So we have to read the content byte by byte or transfer
 	 * endian type before copy the message copy.
 	 */
@@ -288,7 +298,8 @@ static void cmpk_handle_query_config_rx(struct net_device *dev, u8 *pmsg)
 					  (pmsg[14] <<  8) | (pmsg[15] <<  0);
 }

-/*-----------------------------------------------------------------------------
+/*
+ * -----------------------------------------------------------------------------
  * Function:	cmpk_count_tx_status()
  *
  * Overview:	Count aggregated tx status from firmwar of one type rx command
@@ -304,7 +315,7 @@ static void cmpk_handle_query_config_rx(struct net_device *dev, u8 *pmsg)
  *	When		Who	Remark
  *	05/12/2008	amy	Create Version 0 porting from windows code.
  *
- *---------------------------------------------------------------------------
+ * ---------------------------------------------------------------------------
  */
 static void cmpk_count_tx_status(struct net_device *dev,
 				 cmpk_tx_status_t *pstx_status)
@@ -318,7 +329,8 @@ static void cmpk_count_tx_status(struct net_device *dev,
 	pAdapter->HalFunc.GetHwRegHandler(pAdapter, HW_VAR_RF_STATE,
 					  (pu1Byte)(&rtState));

-	/* When RF is off, we should not count the packet for hw/sw synchronize
+	/*
+	 * When RF is off, we should not count the packet for hw/sw synchronize
 	 * reason, ie. there may be a duration while sw switch is changed and
 	 * hw switch is being changed.
 	 */
@@ -351,7 +363,8 @@ static void cmpk_count_tx_status(struct net_device *dev,
 	priv->stats.last_packet_rate	= pstx_status->rate;
 }

-/*-----------------------------------------------------------------------------
+/*
+ * -----------------------------------------------------------------------------
  * Function:	cmpk_handle_tx_status()
  *
  * Overview:	Firmware add a new tx feedback status to reduce rx command
@@ -367,7 +380,7 @@ static void cmpk_count_tx_status(struct net_device *dev,
  *	When		Who	Remark
  *	05/12/2008	amy	Create Version 0 porting from windows code.
  *
- *---------------------------------------------------------------------------
+ * ---------------------------------------------------------------------------
  */
 static void cmpk_handle_tx_status(struct net_device *dev, u8 *pmsg)
 {
@@ -378,7 +391,8 @@ static void cmpk_handle_tx_status(struct net_device *dev, u8 *pmsg)
 	cmpk_count_tx_status(dev, &rx_tx_sts);
 }

-/*-----------------------------------------------------------------------------
+/*
+ * -----------------------------------------------------------------------------
  * Function:	cmpk_handle_tx_rate_history()
  *
  * Overview:	Firmware add a new tx rate history
@@ -393,7 +407,7 @@ static void cmpk_handle_tx_status(struct net_device *dev, u8 *pmsg)
  *	When		Who	Remark
  *	05/12/2008	amy	Create Version 0 porting from windows code.
  *
- *---------------------------------------------------------------------------
+ * ---------------------------------------------------------------------------
  */
 static void cmpk_handle_tx_rate_history(struct net_device *dev, u8 *pmsg)
 {
@@ -407,7 +421,8 @@ static void cmpk_handle_tx_rate_history(struct net_device *dev, u8 *pmsg)
 	pAdapter->HalFunc.GetHwRegHandler(pAdapter, HW_VAR_RF_STATE,
 					  (pu1Byte)(&rtState));

-	/* When RF is off, we should not count the packet for hw/sw synchronize
+	/*
+	 * When RF is off, we should not count the packet for hw/sw synchronize
 	 * reason, ie. there may be a duration while sw switch is changed and
 	 * hw switch is being changed.
 	 */
@@ -417,7 +432,8 @@ static void cmpk_handle_tx_rate_history(struct net_device *dev, u8 *pmsg)

 	ptemp = (u32 *)pmsg;

-	/* Do endian transfer to word alignment(16 bits) for windows system.
+	/*
+	 * Do endian transfer to word alignment(16 bits) for windows system.
 	 * You must do different endian transfer for linux and MAC OS
 	 */
 	for (i = 0; i < (length/4); i++) {
@@ -447,7 +463,8 @@ static void cmpk_handle_tx_rate_history(struct net_device *dev, u8 *pmsg)
 	}
 }

-/*-----------------------------------------------------------------------------
+/*
+ * -----------------------------------------------------------------------------
  * Function:    cmpk_message_handle_rx()
  *
  * Overview:    In the function, we will capture different RX command packet
@@ -466,7 +483,7 @@ static void cmpk_handle_tx_rate_history(struct net_device *dev, u8 *pmsg)
  *  When		Who	Remark
  *  05/06/2008		amy	Create Version 0 porting from windows code.
  *
- *---------------------------------------------------------------------------
+ * ---------------------------------------------------------------------------
  */
 u32 cmpk_message_handle_rx(struct net_device *dev,
 			   struct ieee80211_rx_stats *pstats)
@@ -476,7 +493,8 @@ u32 cmpk_message_handle_rx(struct net_device *dev,
 	u8			element_id;
 	u8			*pcmd_buff;

-	/* 0. Check inpt arguments. It is a command queue message or
+	/*
+	 * 0. Check inpt arguments. It is a command queue message or
 	 * pointer is null.
 	 */
 	if (pstats == NULL)
@@ -491,11 +509,13 @@ u32 cmpk_message_handle_rx(struct net_device *dev,
 	/* 3. Read command packet element id and length. */
 	element_id = pcmd_buff[0];

-	/* 4. Check every received command packet content according to different
+	/*
+	 * 4. Check every received command packet content according to different
 	 *    element type. Because FW may aggregate RX command packet to
 	 *    minimize transmit time between DRV and FW.
 	 */
-	/* Add a counter to prevent the lock in the loop from being held too
+	/*
+	 * Add a counter to prevent the lock in the loop from being held too
 	 * long
 	 */
 	while (total_length > 0 && exe_cnt++ < 100) {
@@ -524,7 +544,8 @@ u32 cmpk_message_handle_rx(struct net_device *dev,
 			break;

 		case RX_TX_PER_PKT_FEEDBACK:
-			/* You must at lease add a switch case element here,
+			/*
+			 * You must at lease add a switch case element here,
 			 * Otherwise, we will jump to default case.
 			 */
 			cmd_length = CMPK_RX_TX_FB_SIZE;
diff --git a/drivers/staging/rtl8192u/r819xU_cmdpkt.h b/drivers/staging/rtl8192u/r819xU_cmdpkt.h
index be45cd609d67..6498b4625254 100644
--- a/drivers/staging/rtl8192u/r819xU_cmdpkt.h
+++ b/drivers/staging/rtl8192u/r819xU_cmdpkt.h
@@ -52,7 +52,8 @@ struct cmd_pkt_tx_feedback {
 	u16	duration;
 };

-/* 2. RX side: Interrupt status packet. It includes Beacon State,
+/*
+ * 2. RX side: Interrupt status packet. It includes Beacon State,
  * Beacon Timer Interrupt and other useful information in MAC ISR Reg.
  */
 struct cmd_pkt_interrupt_status {
@@ -80,15 +81,17 @@ struct cmd_pkt_set_configuration {
 	u32	mask;
 };

-/* 4. Both side : TX/RX query configuration packet. The query structure is the
+/*
+ * 4. Both side : TX/RX query configuration packet. The query structure is the
  *    same as set configuration.
  */
 #define		cmpk_query_cfg	cmd_pkt_set_configuration

 /* 5. Multi packet feedback status. */
 typedef struct tag_tx_stats_feedback {
-	/* For endian transfer --> Driver will not the same as
-	 *  firmware structure.
+	/*
+	 * For endian transfer --> Driver will not the same as
+	 * firmware structure.
 	 */
 	/* DW 0 */
 	u16	reserve1;
@@ -154,7 +157,8 @@ typedef struct tag_tx_rate_history {
 	/* DW 3-6 */
 	u16	ofdm[8];

-	/* DW 7-14	BW=0 SG=0
+	/*
+	 * DW 7-14	BW=0 SG=0
 	 * DW 15-22	BW=1 SG=0
 	 * DW 23-30	BW=0 SG=1
 	 * DW 31-38	BW=1 SG=1
diff --git a/drivers/staging/rtl8192u/r819xU_firmware.c b/drivers/staging/rtl8192u/r819xU_firmware.c
index 153d4ee0ec07..e9511b829b05 100644
--- a/drivers/staging/rtl8192u/r819xU_firmware.c
+++ b/drivers/staging/rtl8192u/r819xU_firmware.c
@@ -61,7 +61,8 @@ static bool fw_download_code(struct net_device *dev, u8 *code_virtual_address,

 		}

-		/* Allocate skb buffer to contain firmware info and tx descriptor info
+		/*
+		 * Allocate skb buffer to contain firmware info and tx descriptor info
 		 * add 4 to avoid packet appending overflow.
 		 */
 		skb  = dev_alloc_skb(USB_HWDESC_HEADER_LEN + frag_length + 4);
@@ -273,7 +274,8 @@ bool init_firmware(struct net_device *dev)
 		}

 		/* Download image file */
-		/* The firmware download process is just as following,
+		/*
+		 * The firmware download process is just as following,
 		 * 1. that is each packet will be segmented and inserted to the wait queue.
 		 * 2. each packet segment will be put in the skb_buff packet.
 		 * 3. each skb_buff packet data content will already include the firmware info
@@ -288,7 +290,8 @@ bool init_firmware(struct net_device *dev)

 		switch (init_step) {
 		case FW_INIT_STEP0_BOOT:
-			/* Download boot
+			/*
+			 * Download boot
 			 * initialize command descriptor.
 			 * will set polling bit when firmware code is also configured
 			 */
diff --git a/drivers/staging/rtl8192u/r819xU_phy.c b/drivers/staging/rtl8192u/r819xU_phy.c
index 5f04afe53d69..5445ea092130 100644
--- a/drivers/staging/rtl8192u/r819xU_phy.c
+++ b/drivers/staging/rtl8192u/r819xU_phy.c
@@ -426,7 +426,8 @@ static void phy_FwRFSerialWrite(struct net_device *dev,
 	u8	time = 0;
 	u32	tmp;

-	/* Firmware RF Write control.
+	/*
+	 * Firmware RF Write control.
 	 * We can not execute the scheme in the initial step.
 	 * Otherwise, RF-R/W will waste much time.
 	 * This is only for site survey.
@@ -445,7 +446,8 @@ static void phy_FwRFSerialWrite(struct net_device *dev,
 	/* 6. Write operation. We can not write if bit 31 is 1. */
 	read_nic_dword(dev, QPNR, &tmp);
 	while (tmp & 0x80000000) {
-		/* If FW can not finish RF-R/W for more than ?? times.
+		/*
+		 * If FW can not finish RF-R/W for more than ?? times.
 		 * We must reset FW.
 		 */
 		if (time++ < 100) {
@@ -455,11 +457,13 @@ static void phy_FwRFSerialWrite(struct net_device *dev,
 			break;
 		}
 	}
-	/* 7. No matter check bit. We always force the write.
+	/*
+	 * 7. No matter check bit. We always force the write.
 	 * Because FW will not accept the command.
 	 */
 	write_nic_dword(dev, QPNR, data);
-	/* According to test, we must delay 20us to wait firmware
+	/*
+	 * According to test, we must delay 20us to wait firmware
 	 * to finish RF write operation.
 	 */
 	/* We support delay in firmware side now. */
@@ -828,7 +832,8 @@ static void rtl8192_BB_Config_ParaFile(struct net_device *dev)
 				 reg_u32);
 	}

-	/* Check if the CCK HighPower is turned ON.
+	/*
+	 * Check if the CCK HighPower is turned ON.
 	 * This is used to calculate PWDB.
 	 */
 	priv->bCckHighPower = (u8)rtl8192_QueryBBReg(dev,
@@ -847,7 +852,8 @@ static void rtl8192_BB_Config_ParaFile(struct net_device *dev)
 void rtl8192_BBConfig(struct net_device *dev)
 {
 	rtl8192_InitBBRFRegDef(dev);
-	/* config BB&RF. As hardCode based initialization has not been well
+	/*
+	 * config BB&RF. As hardCode based initialization has not been well
 	 * implemented, so use file first.
 	 * FIXME: should implement it for hardcode?
 	 */
@@ -1168,7 +1174,8 @@ bool rtl8192_SetRFPowerState(struct net_device *dev,
 		case RF_8256:
 			switch (pHalData->eRFPowerState) {
 			case eRfOff:
-				/* If Rf off reason is from IPS,
+				/*
+				 * If Rf off reason is from IPS,
 				 * LED should blink with no link
 				 */
 				if (pMgntInfo->RfOffReason == RF_CHANGE_BY_IPS)
@@ -1179,7 +1186,8 @@ bool rtl8192_SetRFPowerState(struct net_device *dev,
 				break;

 			case eRfOn:
-				/* Turn on RF we are still linked, which might
+				/*
+				 * Turn on RF we are still linked, which might
 				 * happen when we quickly turn off and on HW RF.
 				 */
 				if (pMgntInfo->bMediaConnect)
@@ -1274,7 +1282,8 @@ static u8 rtl8192_phy_SwChnlStepByStep(struct net_device *dev, u8 channel,
 		 __func__, *stage, *step, channel);
 	if (!is_legal_channel(priv->ieee80211, channel)) {
 		RT_TRACE(COMP_ERR, "set to illegal channel: %d\n", channel);
-		/* return true to tell upper caller function this channel
+		/*
+		 * return true to tell upper caller function this channel
 		 * setting is finished! Or it will in while loop.
 		 */
 		return true;
@@ -1621,7 +1630,8 @@ void rtl8192_SetBWModeWorkItem(struct net_device *dev)
 		break;

 	}
-	/* Skip over setting of J-mode in BB register here.
+	/*
+	 * Skip over setting of J-mode in BB register here.
 	 * Default value is "None J mode".
 	 */

diff --git a/drivers/staging/rtl8192u/r819xU_phy.h b/drivers/staging/rtl8192u/r819xU_phy.h
index 8c2933264407..b1974671fdc9 100644
--- a/drivers/staging/rtl8192u/r819xU_phy.h
+++ b/drivers/staging/rtl8192u/r819xU_phy.h
@@ -8,8 +8,8 @@
 #define MAX_POSTCMD_CNT 16

 enum baseband_config_type {
-	BASEBAND_CONFIG_PHY_REG = 0,			//Radio Path A
-	BASEBAND_CONFIG_AGC_TAB = 1,			//Radio Path B
+	BASEBAND_CONFIG_PHY_REG = 0,			/* Radio Path A */
+	BASEBAND_CONFIG_AGC_TAB = 1,			/* Radio Path B */
 };

 enum switch_chan_cmd_id {
diff --git a/drivers/staging/rtl8192u/r819xU_phyreg.h b/drivers/staging/rtl8192u/r819xU_phyreg.h
index dc9ddf100eab..af7d9b8fee7f 100644
--- a/drivers/staging/rtl8192u/r819xU_phyreg.h
+++ b/drivers/staging/rtl8192u/r819xU_phyreg.h
@@ -96,7 +96,8 @@
 #define rTxAGC_Mcs15_Mcs12			0xe1c


-/* RF
+/*
+ * RF
  * Zebra1
  */
 #define rZebra1_Channel				0x7
@@ -104,7 +105,8 @@
 /* Zebra4 */
 #define rGlobalCtrl				0

-/* Bit Mask
+/*
+ * Bit Mask
  * page-8
  */
 #define bRFMOD						0x1
@@ -126,7 +128,8 @@
 /* page e */
 #define bTxAGCRateCCK			0x7f00

-/* RF
+/*
+ * RF
  * Zebra1
  */
 #define bZebra1_ChannelNum        0xf80
--
2.17.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/3] drivers/staging/rtl8192u: Remove comment-out code
  2019-06-03 12:21 [PATCH 0/3] Fixing style errors in staging/drivers/rtl8192u Christian Müller
  2019-06-03 12:21 ` [PATCH 1/3] drivers/staging/rtl8192u: Reformat comments Christian Müller
@ 2019-06-03 12:21 ` Christian Müller
  2019-06-03 13:06   ` Greg KH
  2019-06-03 12:21 ` [PATCH 3/3] drivers/staging/rtl8192u: Fix of checkpatch-errors Christian Müller
  2 siblings, 1 reply; 8+ messages in thread
From: Christian Müller @ 2019-06-03 12:21 UTC (permalink / raw)
  To: gregkh
  Cc: johnfwhitmore, devel, linux-kernel, linux-kernel, felix.trommer,
	Christian Müller

From: Felix Trommer <felix.trommer@hotmail.de>

Remove the majority of all commented-out code. Commented out code, that
was adressed by a comment itself is not removed. The code that we left
in as comments was mostly due to the "pseudo-code"-like nature of the
code that helped to clarify certain functionalities.

Signed-off-by: Felix Trommer <felix.trommer@hotmail.de>
Signed-off-by: Christian Müller <muellerch-privat@web.de>
---
 drivers/staging/rtl8192u/ieee80211/dot11d.h   |  2 +-
 .../staging/rtl8192u/ieee80211/ieee80211.h    | 35 ++-----
 .../rtl8192u/ieee80211/ieee80211_crypt_ccmp.c |  1 -
 .../rtl8192u/ieee80211/ieee80211_crypt_tkip.c |  1 -
 .../rtl8192u/ieee80211/ieee80211_module.c     |  2 -
 .../staging/rtl8192u/ieee80211/ieee80211_rx.c | 50 +---------
 .../rtl8192u/ieee80211/ieee80211_softmac.c    | 93 +++----------------
 .../rtl8192u/ieee80211/ieee80211_softmac_wx.c | 13 +--
 .../staging/rtl8192u/ieee80211/ieee80211_tx.c |  3 +-
 .../staging/rtl8192u/ieee80211/ieee80211_wx.c | 19 +---
 .../rtl8192u/ieee80211/rtl819x_BAProc.c       |  3 -
 .../staging/rtl8192u/ieee80211/rtl819x_HT.h   |  2 -
 .../rtl8192u/ieee80211/rtl819x_HTProc.c       | 54 ++---------
 .../staging/rtl8192u/ieee80211/rtl819x_Qos.h  |  4 +-
 .../rtl8192u/ieee80211/rtl819x_TSProc.c       | 11 ---
 drivers/staging/rtl8192u/r8190_rtl8256.c      |  3 -
 drivers/staging/rtl8192u/r8192U_core.c        |  5 +-
 drivers/staging/rtl8192u/r8192U_dm.c          | 60 ------------
 drivers/staging/rtl8192u/r8192U_wx.c          |  2 -
 drivers/staging/rtl8192u/r819xU_firmware.c    |  1 -
 20 files changed, 38 insertions(+), 326 deletions(-)

diff --git a/drivers/staging/rtl8192u/ieee80211/dot11d.h b/drivers/staging/rtl8192u/ieee80211/dot11d.h
index 8b485fa18089..f27267307b3f 100644
--- a/drivers/staging/rtl8192u/ieee80211/dot11d.h
+++ b/drivers/staging/rtl8192u/ieee80211/dot11d.h
@@ -54,4 +54,4 @@ void dot11d_scan_complete(struct ieee80211_device *dev);
 int is_legal_channel(struct ieee80211_device *dev, u8 channel);
 int to_legal_channel(struct ieee80211_device *dev, u8 channel);

-#endif /* #ifndef __INC_DOT11D_H */
+#endif
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211.h b/drivers/staging/rtl8192u/ieee80211/ieee80211.h
index 8be8a94a2253..d110e9333799 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211.h
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211.h
@@ -106,17 +106,13 @@ struct cb_desc {
 	u8 bRTSUseShortGI:1;
 	u8 bMulticast:1;
 	u8 bBroadcast:1;
-	/* u8 reserved2:2; */
 	u8 drv_agg_enable:1;
 	u8 reserved2:1;

 	/* Tx Desc related element(12-19) */
 	u8 rata_index;
 	u8 queue_index;
-	/* u8 reserved3; */
-	/* u8 reserved4; */
 	u16 txbuf_size;
-	/* u8 reserved5; */
 	u8 RATRIndex;
 	u8 reserved6;
 	u8 reserved7;
@@ -127,9 +123,6 @@ struct cb_desc {
 	u8 rts_rate;
 	u8 ampdu_factor;
 	u8 ampdu_density;
-	/* u8 reserved9; */
-	/* u8 reserved10; */
-	/* u8 reserved11; */
 	u8 DrvAggrNum;
 	u16 pkt_size;
 	u8 reserved12;
@@ -883,7 +876,8 @@ enum ieee80211_mfie {
 	MFIE_TYPE_QOS_PARAMETER = 222,
 };

-/* Minimal header; can be used for passing 802.11 frames with sufficient
+/*
+ * Minimal header; can be used for passing 802.11 frames with sufficient
  * information to determine what type of underlying data type is actually
  * stored in the data.
  */
@@ -1144,7 +1138,6 @@ struct ieee80211_tim_parameters {
 	u8 tim_period;
 } __packed;

-//#else
 struct ieee80211_wmm_ts_info {
 	u8 ac_dir_tid;
 	u8 ac_up_psb;
@@ -1274,7 +1267,6 @@ enum {WMM_all_frame, WMM_two_frame, WMM_four_frame, WMM_six_frame};
 #define IEEE80211_PS_MBCAST IEEE80211_DTIM_MBCAST

 /* added by David for QoS 2006/6/30 */
-//#define WMM_Hang_8187
 #ifdef WMM_Hang_8187
 #undef WMM_Hang_8187
 #endif
@@ -1290,7 +1282,6 @@ enum {WMM_all_frame, WMM_two_frame, WMM_four_frame, WMM_six_frame};
 #define MAX_RECEIVE_BUFFER_SIZE 9100

 /* UP Mapping to AC, using in MgntQuery_SequenceNumber() and maybe for DSCP */
-//#define UP2AC(up)	((up<3) ? ((up==0)?1:0) : (up>>1))
 #define UP2AC(up) (		   \
 	((up) < 1) ? WME_AC_BE : \
 	((up) < 3) ? WME_AC_BK : \
@@ -1392,7 +1383,6 @@ struct ieee80211_network {
 	bool atheros_cap_exist;
 	bool cisco_cap_exist;
 	bool unknown_cap_exist;
-//	u8	berp_info;
 	bool	berp_info_valid;
 	bool buseprotection;
 	/* put at the end of the structure. */
@@ -1607,7 +1597,7 @@ struct ieee80211_device {
 	struct ieee80211_security sec;

 	/* hw security related */
-//	u8 hwsec_support; //support?
+	/* u8 hwsec_support; //support? */
 	u8 hwsec_active;  /* hw security active. */
 	bool is_silent_reset;
 	bool ieee_up;
@@ -1623,8 +1613,6 @@ struct ieee80211_device {

 	/* 11n HT below */
 	PRT_HIGH_THROUGHPUT	pHTInfo;
-	//struct timer_list		SwBwTimer;
-//	spinlock_t chnlop_spinlock;
 	spinlock_t bw_spinlock;

 	spinlock_t reorder_spinlock;
@@ -1640,8 +1628,6 @@ struct ieee80211_device {
 	u8	bTxUseDriverAssingedRate;
 	atomic_t	atm_chnlop;
 	atomic_t	atm_swbw;
-//	u8	HTHighestOperaRate;
-//	u8	HTCurrentOperaRate;

 	/* 802.11e and WMM Traffic Stream Info (TX) */
 	struct list_head		Tx_TS_Admit_List;
@@ -1653,12 +1639,10 @@ struct ieee80211_device {
 	struct list_head		Rx_TS_Pending_List;
 	struct list_head		Rx_TS_Unused_List;
 	struct rx_ts_record		RxTsRecord[TOTAL_TS_NUM];
-//#ifdef TO_DO_LIST
 	struct rx_reorder_entry	RxReorderEntry[128];
 	struct list_head		RxReorder_Unused_List;
-//#endif
 	/* Qos related. Added by Annie, 2005-11-01. */
-//	PSTA_QOS			pStaQos;
+	/* PSTA_QOS			pStaQos; */
 	u8				ForcedPriority;		/* Force per-packet priority 1~7. (default: 0, not to force it.) */


@@ -1898,9 +1882,6 @@ struct ieee80211_device {
 	/* Qos related. Added by Annie, 2005-11-01. */
 	/* STA_QOS  StaQos; */

-	/* u32 STA_EDCA_PARAM[4]; */
-	/* CHANNEL_ACCESS_SETTING ChannelAccessSetting; */
-
 	struct ieee80211_rxb *stats_IndicateArray[REORDER_WIN_SIZE];

 	/* Callback functions */
@@ -2002,15 +1983,16 @@ struct ieee80211_device {
 	/* check whether Tx hw resource available */
 	short (*check_nic_enough_desc)(struct net_device *dev, int queue_index);
 	/* added by wb for HT related */
-//	void (*SwChnlByTimerHandler)(struct net_device *dev, int channel);
+	/* void (*SwChnlByTimerHandler)(struct net_device *dev, int channel); */
 	void (*SetBWModeHandler)(struct net_device *dev, enum ht_channel_width Bandwidth, enum ht_extension_chan_offset Offset);
-//	void (*UpdateHalRATRTableHandler)(struct net_device* dev, u8* pMcsRate);
+	/* void (*UpdateHalRATRTableHandler)(struct net_device* dev, u8* pMcsRate); */
 	bool (*GetNmodeSupportBySecCfg)(struct net_device *dev);
 	void (*SetWirelessMode)(struct net_device *dev, u8 wireless_mode);
 	bool (*GetHalfNmodeSupportByAPsHandler)(struct net_device *dev);
 	void (*InitialGainHandler)(struct net_device *dev, u8 Operation);

-	/* This must be the last item so that it points to the data
+	/*
+	 * This must be the last item so that it points to the data
 	 * allocated beyond this structure by alloc_ieee80211
 	 */
 	u8 priv[0];
@@ -2326,7 +2308,6 @@ int ieee80211_wx_get_freq(struct ieee80211_device *ieee,
 int ieee80211_debug_init(void);
 void ieee80211_debug_exit(void);

-//extern void ieee80211_wx_sync_scan_wq(struct ieee80211_device *ieee);
 void ieee80211_wx_sync_scan_wq(struct work_struct *work);


diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c
index ad0b918ecf0d..7ec24120d871 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c
@@ -201,7 +201,6 @@ static int ieee80211_ccmp_encrypt(struct sk_buff *skb, int hdr_len, void *priv)
 	pos = skb_push(skb, CCMP_HDR_LEN);
 	memmove(pos, pos + CCMP_HDR_LEN, hdr_len);
 	pos += hdr_len;
-	/* mic = skb_put(skb, CCMP_MIC_LEN); */

 	i = CCMP_PN_LEN - 1;
 	while (i >= 0) {
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c
index db4b640d1d8c..564a6d67de88 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c
@@ -773,6 +773,5 @@ void __exit ieee80211_crypto_tkip_exit(void)

 void ieee80211_tkip_null(void)
 {
-//    printk("============>%s()\n", __func__);
 	return;
 }
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_module.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_module.c
index dd7ff7e84bd0..954e43af494b 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_module.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_module.c
@@ -194,8 +194,6 @@ void free_ieee80211(struct net_device *dev)
 {
 	struct ieee80211_device *ieee = netdev_priv(dev);
 	int i;
-	/* struct list_head *p, *q; */
-//	del_timer_sync(&ieee->SwBwTimer);
 	kfree(ieee->pHTInfo);
 	ieee->pHTInfo = NULL;
 	RemoveAllTS(ieee);
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
index eebd8deb0087..af8546ad12af 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
@@ -329,7 +329,6 @@ static int ieee80211_is_eapol_frame(struct ieee80211_device *ieee,
 		return 0;

 	/* check for port access entity Ethernet type */
-//	pos = skb->data + 24;
 	pos = skb->data + hdrlen;
 	ethertype = (pos[6] << 8) | pos[7];
 	if (ethertype == ETH_P_PAE)
@@ -490,9 +489,6 @@ static int is_duplicate_packet(struct ieee80211_device *ieee,
 		return 0;
 	}

-//	if(tid != 0) {
-//		printk(KERN_WARNING ":)))))))))))%x %x %x, fc(%x)\n", tid, *last_seq, seq, header->frame_ctl);
-//	}
 	if ((*last_seq == seq) &&
 	    time_after(*last_time + IEEE_PACKET_RETRY_TIME, jiffies)) {
 		if (*last_frag == frag)
@@ -508,8 +504,6 @@ static int is_duplicate_packet(struct ieee80211_device *ieee,
 	return 0;

 drop:
-//	BUG_ON(!(fc & IEEE80211_FCTL_RETRY));
-
 	return 1;
 }

@@ -537,8 +531,6 @@ void ieee80211_indicate_packets(struct ieee80211_device *ieee, struct ieee80211_
 {
 	u8 i = 0 , j=0;
 	u16 ethertype;
-//	if(index > 1)
-//		IEEE80211_DEBUG(IEEE80211_DL_REORDER,"%s(): hahahahhhh, We indicate packet from reorder list, index is %u\n",__func__,index);
 	for(j = 0; j<index; j++)
 	{
 /* added by amy for reorder */
@@ -565,8 +557,6 @@ void ieee80211_indicate_packets(struct ieee80211_device *ieee, struct ieee80211_
 				memcpy(skb_push(sub_skb, ETH_ALEN), prxb->src, ETH_ALEN);
 				memcpy(skb_push(sub_skb, ETH_ALEN), prxb->dst, ETH_ALEN);
 			}
-			//stats->rx_packets++;
-			//stats->rx_bytes += sub_skb->len;

 		/* Indicat the packets to upper layer */
 			if (sub_skb) {
@@ -658,11 +648,9 @@ static void RxReorderIndicatePacket(struct ieee80211_device *ieee,
 		IEEE80211_DEBUG(IEEE80211_DL_REORDER, "Packets indication!! IndicateSeq: %d, NewSeq: %d\n",\
 				pTS->rx_indicate_seq, SeqNum);
 		prxbIndicateArray[0] = prxb;
-//		printk("========================>%s(): SeqNum is %d\n",__func__,SeqNum);
 		index = 1;
 	} else {
 		/* Current packet is going to be inserted into pending list.*/
-		/* IEEE80211_DEBUG(IEEE80211_DL_REORDER,"%s(): We RX no ordered packed, insert to ordered list\n",__func__); */
 		if(!list_empty(&ieee->RxReorder_Unused_List)) {
 			pReorderEntry = list_entry(ieee->RxReorder_Unused_List.next, struct rx_reorder_entry, List);
 			list_del_init(&pReorderEntry->List);
@@ -670,7 +658,6 @@ static void RxReorderIndicatePacket(struct ieee80211_device *ieee,
 			/* Make a reorder entry and insert into a the packet list.*/
 			pReorderEntry->SeqNum = SeqNum;
 			pReorderEntry->prxb = prxb;
-	//		IEEE80211_DEBUG(IEEE80211_DL_REORDER,"%s(): pREorderEntry->SeqNum is %d\n",__func__,pReorderEntry->SeqNum);

 			if(!AddReorderEntry(pTS, pReorderEntry)) {
 				IEEE80211_DEBUG(IEEE80211_DL_REORDER, "%s(): Duplicate packet is dropped!! IndicateSeq: %d, NewSeq: %d\n",
@@ -728,7 +715,6 @@ static void RxReorderIndicatePacket(struct ieee80211_device *ieee,

 			IEEE80211_DEBUG(IEEE80211_DL_REORDER,"Packets indication!! IndicateSeq: %d, NewSeq: %d\n",pTS->rx_indicate_seq, SeqNum);
 			prxbIndicateArray[index] = pReorderEntry->prxb;
-		//	printk("========================>%s(): pReorderEntry->SeqNum is %d\n",__func__,pReorderEntry->SeqNum);
 			index++;

 			list_add_tail(&pReorderEntry->List,&ieee->RxReorder_Unused_List);
@@ -741,7 +727,6 @@ static void RxReorderIndicatePacket(struct ieee80211_device *ieee,
 	/* Handling pending timer. Set this timer to prevent from long time Rx buffering.*/
 	if (index>0) {
 		/* Cancel previous pending timer. */
-	//	del_timer_sync(&pTS->rx_pkt_pending_timer);
 		pTS->rx_timeout_indicate_seq = 0xffff;

 		/* Indicate packets */
@@ -798,7 +783,7 @@ static u8 parse_subframe(struct sk_buff *skb,
 		LLCOffset += HTCLNG;
 	}
 	/* Null packet, don't indicate it to upper layer */
-	ChkLength = LLCOffset;/* + (Frame_WEP(frame)!=0 ?Adapter->MgntInfo.SecurityInfo.EncryptionHeadOverhead:0);*/
+	ChkLength = LLCOffset;

 	if (skb->len <= ChkLength)
 		return 0;
@@ -815,7 +800,6 @@ static u8 parse_subframe(struct sk_buff *skb,

 		memcpy(rxb->src,src,ETH_ALEN);
 		memcpy(rxb->dst,dst,ETH_ALEN);
-		//IEEE80211_DEBUG_DATA(IEEE80211_DL_RX,skb->data,skb->len);
 		return 1;
 	} else {
 		rxb->nr_subframes = 0;
@@ -891,7 +875,6 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
 {
 	struct net_device *dev = ieee->dev;
 	struct rtl_80211_hdr_4addr *hdr;
-	//struct rtl_80211_hdr_3addrqos *hdr;

 	size_t hdrlen;
 	u16 fc, type, stype, sc;
@@ -902,7 +885,6 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
 	u8	TID = 0;
 	u16	SeqNum = 0;
 	struct rx_ts_record *pTS = NULL;
-	//bool bIsAggregateFrame = false;
 	/* added by amy for reorder */
 #ifdef NOT_YET
 	struct net_device *wds = NULL;
@@ -910,7 +892,6 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
 	int from_assoc_ap = 0;
 	void *sta = NULL;
 #endif
-//	u16 qos_ctl = 0;
 	u8 dst[ETH_ALEN];
 	u8 src[ETH_ALEN];
 	u8 bssid[ETH_ALEN];
@@ -945,7 +926,6 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
 		rx_stats->bContainHTC = true;
 	}

-	//IEEE80211_DEBUG_DATA(IEEE80211_DL_DATA, skb->data, skb->len);
 #ifdef NOT_YET
 	/*
 	 * Put this code here so that we avoid duplicating it in all
@@ -1028,7 +1008,6 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
 	else
 	{
 		struct rx_ts_record *pRxTS = NULL;
-			//IEEE80211_DEBUG(IEEE80211_DL_REORDER,"%s(): QOS ENABLE AND RECEIVE QOS DATA , we will get Ts, tid:%d\n",__func__, tid);
 		if(GetTs(
 				ieee,
 				(struct ts_common_info **) &pRxTS,
@@ -1038,7 +1017,6 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
 				true))
 		{

-		//	IEEE80211_DEBUG(IEEE80211_DL_REORDER,"%s(): pRxTS->rx_last_frag_num is %d,frag is %d,pRxTS->rx_last_seq_num is %d,seq is %d\n",__func__,pRxTS->rx_last_frag_num,frag,pRxTS->rx_last_seq_num,WLAN_GET_SEQ_SEQ(sc));
 			if ((fc & (1<<11)) &&
 			    (frag == pRxTS->rx_last_frag_num) &&
 			    (WLAN_GET_SEQ_SEQ(sc) == pRxTS->rx_last_seq_num)) {
@@ -1059,7 +1037,6 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
 	if (type == IEEE80211_FTYPE_MGMT) {


-	//IEEE80211_DEBUG_DATA(IEEE80211_DL_DATA, skb->data, skb->len);
 		if (ieee80211_rx_frame_mgmt(ieee, skb, rx_stats, type, stype))
 			goto rx_dropped;
 		else
@@ -1125,7 +1102,6 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
 		}
 	}
 #endif
-	//IEEE80211_DEBUG_DATA(IEEE80211_DL_DATA, skb->data, skb->len);
 	/*
 	 * Nullfunc frames may have PS-bit set, so they must be passed to
 	 * hostap_handle_sta_rx() before being dropped here.
@@ -1487,8 +1463,6 @@ static int ieee80211_qos_convert_ac_to_parameters(struct
 	int i;
 	struct ieee80211_qos_ac_parameter *ac_params;
 	u8 aci;
-	//u8 cw_min;
-	//u8 cw_max;

 	for (i = 0; i < QOS_QUEUE_NUM; i++) {
 		ac_params = &(param_elm->ac_params_record[i]);
@@ -1583,7 +1557,6 @@ static const char *get_info_element_string(u16 id)
 		MFIE_STRING(MEASURE_REPORT);
 		MFIE_STRING(QUIET);
 		MFIE_STRING(IBSS_DFS);
-	       // MFIE_STRING(ERP_INFO);
 		MFIE_STRING(RSN);
 		MFIE_STRING(RATES_EX);
 		MFIE_STRING(GENERIC);
@@ -1639,7 +1612,6 @@ int ieee80211_parse_info_param(struct ieee80211_device *ieee,
 	u16	tmp_htinfo_len=0;
 	u16 ht_realtek_agg_len=0;
 	u8  ht_realtek_agg_buf[MAX_IE_LEN];
-//	u16 broadcom_len = 0;
 #ifdef CONFIG_IEEE80211_DEBUG
 	char rates_str[64];
 	char *p;
@@ -1777,12 +1749,11 @@ int ieee80211_parse_info_param(struct ieee80211_device *ieee,

 				break;

-			offset = (ieee->assoc_id / 8) - offset;// + ((aid % 8)? 0 : 1) ;
+			offset = (ieee->assoc_id / 8) - offset;

 			if(info_element->data[3+offset] & (1<<(ieee->assoc_id%8)))
 				network->dtim_data |= IEEE80211_DTIM_UCAST;

-			//IEEE80211_DEBUG_MGMT("MFIE_TYPE_TIM: partially ignored\n");
 			break;

 		case MFIE_TYPE_ERP:
@@ -2162,12 +2133,9 @@ static inline u8 ieee80211_SignalStrengthTranslate(
 	{
 		RetSS = CurrSS;
 	}
-	//RT_TRACE(COMP_DBG, DBG_LOUD, ("##### After Mapping:  LastSS: %d, CurrSS: %d, RetSS: %d\n", LastSS, CurrSS, RetSS));

 	/* Step 2. Smoothing. */

-	//RT_TRACE(COMP_DBG, DBG_LOUD, ("$$$$$ After Smoothing:  LastSS: %d, CurrSS: %d, RetSS: %d\n", LastSS, CurrSS, RetSS));
-
 	return RetSS;
 }

@@ -2189,10 +2157,6 @@ static inline int ieee80211_network_init(
 	struct ieee80211_network *network,
 	struct ieee80211_rx_stats *stats)
 {
-#ifdef CONFIG_IEEE80211_DEBUG
-	//char rates_str[64];
-	//char *p;
-#endif

 	network->qos_data.active = 0;
 	network->qos_data.supported = 0;
@@ -2226,8 +2190,7 @@ static inline int ieee80211_network_init(
 #endif
 	network->CountryIeLen = 0;
 	memset(network->CountryIeBuf, 0, MAX_IE_LEN);
-/* Initialize HT parameters */
-	//ieee80211_ht_initialize(&network->bssht);
+	/* Initialize HT parameters */
 	HTInitializeBssDesc(&network->bssht);
 	if (stats->freq == IEEE80211_52GHZ_BAND) {
 		/* for A band (No DS info) */
@@ -2271,7 +2234,6 @@ static inline int ieee80211_network_init(
 		network->flags |= NETWORK_EMPTY_ESSID;

 	stats->signal = 30 + (stats->SignalStrength * 70) / 100;
-	//stats->signal = ieee80211_SignalStrengthTranslate(stats->signal);
 	stats->noise = ieee80211_translate_todbm((u8)(100-stats->signal)) -25;

 	memcpy(&network->stats, stats, sizeof(network->stats));
@@ -2356,9 +2318,7 @@ static inline void update_network(struct ieee80211_network *dst,

 	dst->last_scanned = jiffies;
 	/* qos related parameters */
-	//qos_active = src->qos_data.active;
 	qos_active = dst->qos_data.active;
-	//old_param = dst->qos_data.old_param_count;
 	old_param = dst->qos_data.param_count;
 	if(dst->flags & NETWORK_HAS_QOS_MASK)
 		memcpy(&dst->qos_data, &src->qos_data,
@@ -2389,7 +2349,6 @@ static inline void update_network(struct ieee80211_network *dst,
 	   src->wmm_param[3].aci_aifsn) {
 	  memcpy(dst->wmm_param, src->wmm_param, WME_AC_PRAM_LEN);
 	}
-	//dst->QoS_Enable = src->QoS_Enable;
 #ifdef THOMAS_TURBO
 	dst->Turbo_Enable = src->Turbo_Enable;
 #endif
@@ -2430,7 +2389,6 @@ static inline void ieee80211_process_probe_response(
 	unsigned long flags;
 	short renew;
 	u16 capability;
-	//u8 wmm_info;

 	network = kzalloc(sizeof(*network), GFP_ATOMIC);
 	if (!network)
@@ -2617,8 +2575,6 @@ static inline void ieee80211_process_probe_response(
 		/* YJ,add,080819,for hidden ap */
 		if(is_beacon(beacon->header.frame_ctl) == 0)
 			network->flags = (~NETWORK_EMPTY_ESSID & network->flags)|(NETWORK_EMPTY_ESSID & target->flags);
-		//if(strncmp(network->ssid, "linksys-c",9) == 0)
-		//	printk("====>2 network->ssid=%s FLAG=%d target.ssid=%s FLAG=%d\n", network->ssid, network->flags, target->ssid, target->flags);
 		if(((network->flags & NETWORK_EMPTY_ESSID) == NETWORK_EMPTY_ESSID) \
 		    && (((network->ssid_len > 0) && (strncmp(target->ssid, network->ssid, network->ssid_len)))\
 		    ||((ieee->current_network.ssid_len == network->ssid_len)&&(strncmp(ieee->current_network.ssid, network->ssid, network->ssid_len) == 0)&&(ieee->state == IEEE80211_NOLINK))))
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
index 27e81a1de51e..4f649fcc7c1d 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
@@ -153,7 +153,6 @@ static void enqueue_mgmt(struct ieee80211_device *ieee, struct sk_buff *skb)
 	ieee->mgmt_queue_head = nh;
 	ieee->mgmt_queue_ring[nh] = skb;

-	//return 0;
 }

 static struct sk_buff *dequeue_mgmt(struct ieee80211_device *ieee)
@@ -245,7 +244,6 @@ inline void softmac_mgmt_xmit(struct sk_buff *skb, struct ieee80211_device *ieee
 			/* avoid watchdog triggers */
 			netif_trans_update(ieee->dev);
 			ieee->softmac_data_hard_start_xmit(skb, ieee->dev, ieee->basic_rate);
-			//dev_kfree_skb_any(skb);//edit by thomas
 		}

 		spin_unlock_irqrestore(&ieee->lock, flags);
@@ -273,7 +271,6 @@ inline void softmac_mgmt_xmit(struct sk_buff *skb, struct ieee80211_device *ieee
 			skb_queue_tail(&ieee->skb_waitQ[tcb_desc->queue_index], skb);
 		} else {
 			ieee->softmac_hard_start_xmit(skb, ieee->dev);
-			//dev_kfree_skb_any(skb);//edit by thomas
 		}
 		spin_unlock_irqrestore(&ieee->mgmt_tx_lock, flags);
 	}
@@ -307,7 +304,6 @@ softmac_ps_mgmt_xmit(struct sk_buff *skb, struct ieee80211_device *ieee)

 		ieee->softmac_hard_start_xmit(skb, ieee->dev);
 	}
-	//dev_kfree_skb_any(skb);//edit by thomas
 }

 static inline struct sk_buff *ieee80211_probe_req(struct ieee80211_device *ieee)
@@ -356,25 +352,17 @@ static void ieee80211_send_beacon(struct ieee80211_device *ieee)

 	if (!ieee->ieee_up)
 		return;
-	//unsigned long flags;
 	skb = ieee80211_get_beacon_(ieee);

 	if (skb) {
 		softmac_mgmt_xmit(skb, ieee);
 		ieee->softmac_stats.tx_beacons++;
-		//dev_kfree_skb_any(skb);//edit by thomas
 	}
-//	ieee->beacon_timer.expires = jiffies +
-//		(MSECS( ieee->current_network.beacon_interval -5));

-	//spin_lock_irqsave(&ieee->beacon_lock,flags);
 	if (ieee->beacon_txing && ieee->ieee_up) {
-//		if(!timer_pending(&ieee->beacon_timer))
-//			add_timer(&ieee->beacon_timer);
 		mod_timer(&ieee->beacon_timer,
 			  jiffies + msecs_to_jiffies(ieee->current_network.beacon_interval - 5));
 	}
-	//spin_unlock_irqrestore(&ieee->beacon_lock,flags);
 }

 static void ieee80211_send_beacon_cb(struct timer_list *t)
@@ -396,7 +384,6 @@ static void ieee80211_send_probe(struct ieee80211_device *ieee)
 	if (skb) {
 		softmac_mgmt_xmit(skb, ieee);
 		ieee->softmac_stats.tx_probe_rq++;
-		//dev_kfree_skb_any(skb);//edit by thomas
 	}
 }

@@ -559,12 +546,7 @@ EXPORT_SYMBOL(ieee80211_start_send_beacons);

 static void ieee80211_softmac_stop_scan(struct ieee80211_device *ieee)
 {
-//	unsigned long flags;
-
-	//ieee->sync_scan_hurryup = 1;
-
 	mutex_lock(&ieee->scan_mutex);
-//	spin_lock_irqsave(&ieee->lock, flags);

 	if (ieee->scanning == 1) {
 		ieee->scanning = 0;
@@ -572,7 +554,6 @@ static void ieee80211_softmac_stop_scan(struct ieee80211_device *ieee)
 		cancel_delayed_work(&ieee->softmac_scan_wq);
 	}

-//	spin_unlock_irqrestore(&ieee->lock, flags);
 	mutex_unlock(&ieee->scan_mutex);
 }

@@ -644,7 +625,6 @@ ieee80211_authentication_req(struct ieee80211_network *beacon,
 	memcpy(auth->header.addr2, ieee->dev->dev_addr, ETH_ALEN);
 	memcpy(auth->header.addr3, beacon->bssid, ETH_ALEN);

-	//auth->algorithm = ieee->open_wep ? WLAN_AUTH_OPEN : WLAN_AUTH_SHARED_KEY;
 	if (ieee->auth_mode == 0)
 		auth->algorithm = WLAN_AUTH_OPEN;
 	else if (ieee->auth_mode == 1)
@@ -715,7 +695,6 @@ static struct sk_buff *ieee80211_probe_resp(struct ieee80211_device *ieee, u8 *d
 		tmp_generic_ie_len = sizeof(ieee->pHTInfo->szRT2RTAggBuffer);
 		HTConstructRT2RTAggElement(ieee, tmp_generic_ie_buf, &tmp_generic_ie_len);
 	}
-//	printk("===============>tmp_ht_cap_len is %d,tmp_ht_info_len is %d, tmp_generic_ie_len is %d\n",tmp_ht_cap_len,tmp_ht_info_len,tmp_generic_ie_len);
 	beacon_size = sizeof(struct ieee80211_probe_response) + 2
 		+ ssid_len
 		+ 3 /* channel */
@@ -802,7 +781,6 @@ static struct sk_buff *ieee80211_probe_resp(struct ieee80211_device *ieee, u8 *d
 		tag += wpa_ie_len;
 	}

-	//skb->dev = ieee->dev;
 	return skb;
 }

@@ -943,15 +921,9 @@ ieee80211_association_req(struct ieee80211_network *beacon,
 			  struct ieee80211_device *ieee)
 {
 	struct sk_buff *skb;
-	//unsigned long flags;

 	struct ieee80211_assoc_request_frame *hdr;
-	u8 *tag;//,*rsn_ie;
-	//short info_addr = 0;
-	//int i;
-	//u16 suite_count = 0;
-	//u8 suit_select = 0;
-	//unsigned int wpa_len = beacon->wpa_ie_len;
+	u8 *tag;
 	/* for HT */
 	u8 *ht_cap_buf = NULL;
 	u8 ht_cap_len = 0;
@@ -1159,8 +1131,7 @@ ieee80211_association_req(struct ieee80211_network *beacon,
 			memcpy(tag, realtek_ie_buf, realtek_ie_len - 2);
 		}
 	}
-//	printk("<=====%s(), %p, %p\n", __func__, ieee->dev, ieee->dev->dev_addr);
-//	IEEE80211_DEBUG_DATA(IEEE80211_DL_DATA, skb->data, skb->len);
+
 	return skb;
 }

@@ -1222,7 +1193,6 @@ static void ieee80211_associate_step1(struct ieee80211_device *ieee)
 			ieee->associate_timer.expires = jiffies + (HZ / 2);
 			add_timer(&ieee->associate_timer);
 		}
-		//dev_kfree_skb_any(skb);//edit by thomas
 	}
 }

@@ -1233,7 +1203,6 @@ static void ieee80211_auth_challenge(struct ieee80211_device *ieee,
 	u8 *c;
 	struct sk_buff *skb;
 	struct ieee80211_network *beacon = &ieee->current_network;
-//	int hlen = sizeof(struct ieee80211_authentication);

 	ieee->associate_seq++;
 	ieee->softmac_stats.tx_auth_rq++;
@@ -1253,7 +1222,6 @@ static void ieee80211_auth_challenge(struct ieee80211_device *ieee,

 		softmac_mgmt_xmit(skb, ieee);
 		mod_timer(&ieee->associate_timer, jiffies + (HZ / 2));
-		//dev_kfree_skb_any(skb);//edit by thomas
 	}
 	kfree(challenge);
 }
@@ -1274,7 +1242,6 @@ static void ieee80211_associate_step2(struct ieee80211_device *ieee)
 	} else {
 		softmac_mgmt_xmit(skb, ieee);
 		mod_timer(&ieee->associate_timer, jiffies + (HZ / 2));
-		//dev_kfree_skb_any(skb);//edit by thomas
 	}
 }
 static void ieee80211_associate_complete_wq(struct work_struct *work)
@@ -1295,7 +1262,6 @@ static void ieee80211_associate_complete_wq(struct work_struct *work)
 	} else {
 		printk("Successfully associated, ht not enabled(%d, %d)\n", ieee->pHTInfo->bCurrentHTSupport, ieee->pHTInfo->bEnableHT);
 		memset(ieee->dot11HTOperationalRateSet, 0, 16);
-		//HTSetConnectBwMode(ieee, HT_CHANNEL_WIDTH_20, HT_EXTCHNL_OFFSET_NO_EXT);
 	}
 	ieee->LinkDetectInfo.SlotNum = 2 * (1 + ieee->current_network.beacon_interval / 500);
 	/* To prevent the immediately calling watch_dog after association. */
@@ -1319,12 +1285,9 @@ static void ieee80211_associate_complete_wq(struct work_struct *work)

 static void ieee80211_associate_complete(struct ieee80211_device *ieee)
 {
-//	int i;
-//	struct net_device* dev = ieee->dev;
 	del_timer_sync(&ieee->associate_timer);

 	ieee->state = IEEE80211_LINKED;
-	//ieee->UpdateHalRATRTableHandler(dev, ieee->dot11HTOperationalRateSet);
 	schedule_work(&ieee->associate_complete_wq);
 }

@@ -1339,7 +1302,6 @@ static void ieee80211_associate_procedure_wq(struct work_struct *work)

 	ieee80211_stop_scan(ieee);
 	printk("===>%s(), chan:%d\n", __func__, ieee->current_network.channel);
-	//ieee->set_chan(ieee->dev, ieee->current_network.channel);
 	HTSetConnectBwMode(ieee, HT_CHANNEL_WIDTH_20, HT_EXTCHNL_OFFSET_NO_EXT);

 	ieee->associate_seq = 1;
@@ -1374,8 +1336,8 @@ inline void ieee80211_softmac_new_net(struct ieee80211_device *ieee, struct ieee
 		 * This could be obtained by beacons or, if the network does not
 		 * broadcast it, it can be put manually.
 		 */
-		apset = ieee->wap_set;//(memcmp(ieee->current_network.bssid, zero,ETH_ALEN)!=0 );
-		ssidset = ieee->ssid_set;//ieee->current_network.ssid[0] != '\0';
+		apset = ieee->wap_set;
+		ssidset = ieee->ssid_set;
 		ssidbroad =  !(net->ssid_len == 0 || net->ssid[0] == '\0');
 		apmatch = (memcmp(ieee->current_network.bssid, net->bssid, ETH_ALEN) == 0);
 		ssidmatch = (ieee->current_network.ssid_len == net->ssid_len) &&
@@ -1413,7 +1375,6 @@ inline void ieee80211_softmac_new_net(struct ieee80211_device *ieee, struct ieee
 			       ieee->pHTInfo->bEnableHT,
 			       ieee->current_network.bssht.bdSupportHT);

-			//ieee->pHTInfo->IOTAction = 0;
 			HTResetIOTSetting(ieee->pHTInfo);
 			if (ieee->iw_mode == IW_MODE_INFRA) {
 				/* Join the network for the first time */
@@ -1422,8 +1383,13 @@ inline void ieee80211_softmac_new_net(struct ieee80211_device *ieee, struct ieee
 				if ((ieee->current_network.qos_data.supported == 1) &&
 				    // (ieee->pHTInfo->bEnableHT && ieee->current_network.bssht.bdSupportHT))
 				    ieee->current_network.bssht.bdSupportHT) {
-/*WB, 2008.09.09:bCurrentHTSupport and bEnableHT two flags are going to put together to check whether we are in HT now, so needn't to check bEnableHT flags here. That's is to say we will set to HT support whenever joined AP has the ability to support HT. And whether we are in HT or not, please check bCurrentHTSupport&&bEnableHT now please.*/
-					//	ieee->pHTInfo->bCurrentHTSupport = true;
+				/*
+				 * WB, 2008.09.09:bCurrentHTSupport and bEnableHT two flags are going to put
+				 * together to check whether we are in HT now,
+				 * so needn't to check bEnableHT flags here. That's is to say we will set to HT
+				 * support whenever joined AP has the ability to support HT. And whether we
+				 * are in HT or not, please check bCurrentHTSupport&&bEnableHT now please.
+				 */
 					HTResetSelfAndSavePeerSetting(ieee, &ieee->current_network);
 				} else {
 					ieee->pHTInfo->bCurrentHTSupport = false;
@@ -1443,7 +1409,6 @@ inline void ieee80211_softmac_new_net(struct ieee80211_device *ieee, struct ieee
 					printk(KERN_INFO"Using B rates\n");
 				}
 				memset(ieee->dot11HTOperationalRateSet, 0, 16);
-				//HTSetConnectBwMode(ieee, HT_CHANNEL_WIDTH_20, HT_EXTCHNL_OFFSET_NO_EXT);
 				ieee->state = IEEE80211_LINKED;
 			}
 		}
@@ -1545,7 +1510,6 @@ static short probe_rq_parse(struct ieee80211_device *ieee, struct sk_buff *skb,
 		tag++; /* point to the next tag */
 	}

-	//IEEE80211DMESG("Card MAC address is "MACSTR, MAC2STR(src));
 	if (ssidlen == 0)
 		return 1;

@@ -1604,11 +1568,8 @@ ieee80211_rx_probe_rq(struct ieee80211_device *ieee, struct sk_buff *skb)
 {
 	u8 dest[ETH_ALEN];

-	//IEEE80211DMESG("Rx probe");
 	ieee->softmac_stats.rx_probe_rq++;
-	//DMESG("Dest is "MACSTR, MAC2STR(dest));
 	if (probe_rq_parse(ieee, skb, dest)) {
-		//IEEE80211DMESG("Was for me!");
 		ieee->softmac_stats.tx_probe_rs++;
 		ieee80211_resp_to_probe(ieee, dest);
 	}
@@ -1619,20 +1580,17 @@ ieee80211_rx_auth_rq(struct ieee80211_device *ieee, struct sk_buff *skb)
 {
 	u8 dest[ETH_ALEN];
 	int status;
-	//IEEE80211DMESG("Rx probe");
 	ieee->softmac_stats.rx_auth_rq++;

 	status = auth_rq_parse(skb, dest);
 	if (status != -1)
 		ieee80211_resp_to_auth(ieee, status, dest);
-	//DMESG("Dest is "MACSTR, MAC2STR(dest));
 }

 static inline void
 ieee80211_rx_assoc_rq(struct ieee80211_device *ieee, struct sk_buff *skb)
 {
 	u8 dest[ETH_ALEN];
-	//unsigned long flags;

 	ieee->softmac_stats.rx_ass_rq++;
 	if (assoc_rq_parse(skb, dest) != -1)
@@ -1657,12 +1615,7 @@ static short ieee80211_sta_ps_sleep(struct ieee80211_device *ieee, u32 *time_h,
 {
 	int timeout;
 	u8 dtim;
-	/*if(ieee->ps == IEEE80211_PS_DISABLED ||
-		ieee->iw_mode != IW_MODE_INFRA ||
-		ieee->state != IEEE80211_LINKED)

-		return 0;
-	*/
 	dtim = ieee->current_network.dtim_data;
 	if (!(dtim & IEEE80211_DTIM_VALID))
 		return 0;
@@ -1728,7 +1681,6 @@ static inline void ieee80211_sta_ps(struct ieee80211_device *ieee)
 		if (ieee->sta_sleep == 1) {
 			ieee->enter_sleep_state(ieee->dev, th, tl);
 		} else if (ieee->sta_sleep == 0) {
-		//	printk("send null 1\n");
 			spin_lock_irqsave(&ieee->mgmt_tx_lock, flags2);

 			if (ieee->ps_is_queue_empty(ieee->dev)) {
@@ -1811,7 +1763,6 @@ static void ieee80211_process_action(struct ieee80211_device *ieee,
 	struct rtl_80211_hdr *header = (struct rtl_80211_hdr *)skb->data;
 	u8 *act = ieee80211_get_payload(header);
 	u8 tmp = 0;
-//	IEEE80211_DEBUG_DATA(IEEE80211_DL_DATA|IEEE80211_DL_BA, skb->data, skb->len);
 	if (act == NULL) {
 		IEEE80211_DEBUG(IEEE80211_DL_ERR, "error to get payload of action frame\n");
 		return;
@@ -1901,7 +1852,6 @@ ieee80211_rx_frame_softmac(struct ieee80211_device *ieee, struct sk_buff *skb,
 	u16 errcode;
 	int aid;
 	struct ieee80211_assoc_response_frame *assoc_resp;
-//	struct ieee80211_info_element *info_element;

 	if (!ieee->proto_started)
 		return 0;
@@ -2005,7 +1955,6 @@ ieee80211_rx_frame_softmac(struct ieee80211_device *ieee, struct sk_buff *skb,
 			ieee->softmac_stats.reassoc++;

 			notify_wx_assoc_event(ieee);
-			//HTSetConnectBwMode(ieee, HT_CHANNEL_WIDTH_20, HT_EXTCHNL_OFFSET_NO_EXT);
 			RemovePeerTS(ieee, header->addr2);
 			schedule_work(&ieee->associate_procedure_wq);
 		}
@@ -2017,7 +1966,6 @@ ieee80211_rx_frame_softmac(struct ieee80211_device *ieee, struct sk_buff *skb,
 		return -1;
 	}

-	//dev_kfree_skb_any(skb);
 	return 0;
 }

@@ -2083,9 +2031,6 @@ void ieee80211_softmac_xmit(struct ieee80211_txb *txb, struct ieee80211_device *
 		} else {
 			ieee->softmac_data_hard_start_xmit(txb->fragments[i],
 							   ieee->dev, ieee->rate);
-			//ieee->stats.tx_packets++;
-			//ieee->stats.tx_bytes += txb->fragments[i]->len;
-			//ieee->dev->trans_start = jiffies;
 		}
 	}
 	ieee80211_txb_free(txb);
@@ -2106,7 +2051,6 @@ static void ieee80211_resume_tx(struct ieee80211_device *ieee)
 		} else {
 			ieee->softmac_data_hard_start_xmit(ieee->tx_pending.txb->fragments[i],
 							   ieee->dev, ieee->rate);
-			//(i+1)<ieee->tx_pending.txb->nr_frags);
 			ieee->stats.tx_packets++;
 			netif_trans_update(ieee->dev);
 		}
@@ -2155,7 +2099,6 @@ void ieee80211_wake_queue(struct ieee80211_device *ieee)
 				ieee->seq_ctrl[0]++;

 			ieee->softmac_data_hard_start_xmit(skb, ieee->dev, ieee->basic_rate);
-			//dev_kfree_skb_any(skb);//edit by thomas
 		}
 	}
 	if (!ieee->queue_stop && ieee->tx_pending.txb)
@@ -2172,15 +2115,12 @@ EXPORT_SYMBOL(ieee80211_wake_queue);

 void ieee80211_stop_queue(struct ieee80211_device *ieee)
 {
-	//unsigned long flags;
-	//spin_lock_irqsave(&ieee->lock,flags);

 	if (!netif_queue_stopped(ieee->dev)) {
 		netif_stop_queue(ieee->dev);
 		ieee->softmac_stats.swtxstop++;
 	}
 	ieee->queue_stop = 1;
-	//spin_unlock_irqrestore(&ieee->lock,flags);
 }
 EXPORT_SYMBOL(ieee80211_stop_queue);

@@ -2383,7 +2323,6 @@ void ieee80211_disassociate(struct ieee80211_device *ieee)
 	ieee->state = IEEE80211_NOLINK;
 	ieee->is_set_key = false;
 	ieee->link_change(ieee->dev);
-	//HTSetConnectBwMode(ieee, HT_CHANNEL_WIDTH_20, HT_EXTCHNL_OFFSET_NO_EXT);
 	notify_wx_assoc_event(ieee);
 }
 EXPORT_SYMBOL(ieee80211_disassociate);
@@ -2525,8 +2464,6 @@ void ieee80211_start_protocol(struct ieee80211_device *ieee)

 	if (ieee->current_network.beacon_interval == 0)
 		ieee->current_network.beacon_interval = 100;
-//	printk("===>%s(), chan:%d\n", __func__, ieee->current_network.channel);
-//	ieee->set_chan(ieee->dev,ieee->current_network.channel);

 	for (i = 0; i < 17; i++) {
 		ieee->last_rxseq_num[i] = -1;
@@ -2732,8 +2669,6 @@ static int ieee80211_wpa_set_auth_algs(struct ieee80211_device *ieee, int value)

 	if (ieee->set_security)
 		ieee->set_security(ieee->dev, &sec);
-	//else
-	//	ret = -EOPNOTSUPP;

 	return 0;
 }
@@ -2849,7 +2784,7 @@ static int ieee80211_wpa_set_encryption(struct ieee80211_device *ieee,
 		if (crypt) {
 			sec.enabled = 0;
 			/* FIXME FIXME */
-			//sec.encrypt = 0;
+			/* sec.encrypt = 0; */
 			sec.level = SEC_LEVEL_0;
 			sec.flags |= SEC_ENABLED | SEC_LEVEL;
 			ieee80211_crypt_delayed_deinit(ieee, crypt);
@@ -2858,7 +2793,7 @@ static int ieee80211_wpa_set_encryption(struct ieee80211_device *ieee,
 	}
 	sec.enabled = 1;
 /* FIXME FIXME */
-//	sec.encrypt = 1;
+/*	sec.encrypt = 1; */
 	sec.flags |= SEC_ENABLED;

 	/* IPW HW cannot build TKIP MIC, host decryption still needed. */
@@ -3000,7 +2935,6 @@ SendDisassociation(struct ieee80211_device *ieee,
 	skb = ieee80211_disassociate_skb(beacon, ieee, asRsn);
 	if (skb) {
 		softmac_mgmt_xmit(skb, ieee);
-		//dev_kfree_skb_any(skb);//edit by thomas
 	}
 }
 EXPORT_SYMBOL(SendDisassociation);
@@ -3011,7 +2945,6 @@ int ieee80211_wpa_supplicant_ioctl(struct ieee80211_device *ieee, struct iw_poin
 	int ret = 0;

 	mutex_lock(&ieee->wx_mutex);
-	//IEEE_DEBUG_INFO("wpa_supplicant: len=%d\n", p->length);

 	if (p->length < sizeof(struct ieee_param) || !p->pointer) {
 		ret = -EINVAL;
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac_wx.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac_wx.c
index 2bf333c12bbc..2f25eae5e8c0 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac_wx.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac_wx.c
@@ -94,8 +94,6 @@ int ieee80211_wx_get_freq(struct ieee80211_device *ieee,
 	/* NM 0.7.0 will not accept channel any more. */
 	fwrq->m = ieee80211_wlan_frequencies[ieee->current_network.channel-1] * 100000;
 	fwrq->e = 1;
-	/* fwrq->m = ieee->current_network.channel; */
-	/* fwrq->e = 0; */

 	return 0;
 }
@@ -139,7 +137,7 @@ int ieee80211_wx_set_wap(struct ieee80211_device *ieee,
 	int ret = 0;
 	unsigned long flags;

-	short ifup = ieee->proto_started; /* dev->flags & IFF_UP; */
+	short ifup = ieee->proto_started;
 	struct sockaddr *temp = (struct sockaddr *)awrq;

 	ieee->sync_scan_hurryup = 1;
@@ -522,16 +520,11 @@ int ieee80211_wx_set_power(struct ieee80211_device *ieee,
 		goto exit;
 	}
 	if (wrqu->power.flags & IW_POWER_TIMEOUT) {
-		/* ieee->ps_period = wrqu->power.value / 1000; */
 		ieee->ps_timeout = wrqu->power.value / 1000;
 	}

 	if (wrqu->power.flags & IW_POWER_PERIOD) {
-
-		/* ieee->ps_timeout = wrqu->power.value / 1000; */
 		ieee->ps_period = wrqu->power.value / 1000;
-		/* wrq->value / 1024; */
-
 	}
 	switch (wrqu->power.flags & IW_POWER_MODE) {
 	case IW_POWER_UNICAST_R:
@@ -545,7 +538,6 @@ int ieee80211_wx_set_power(struct ieee80211_device *ieee,
 		break;

 	case IW_POWER_ON:
-		/* ieee->ps = IEEE80211_PS_DISABLED; */
 		break;

 	default:
@@ -578,11 +570,8 @@ int ieee80211_wx_get_power(struct ieee80211_device *ieee,
 		wrqu->power.flags = IW_POWER_TIMEOUT;
 		wrqu->power.value = ieee->ps_timeout * 1000;
 	} else {
-		/* ret = -EOPNOTSUPP; */
-		/* goto exit; */
 		wrqu->power.flags = IW_POWER_PERIOD;
 		wrqu->power.value = ieee->ps_period * 1000;
-		/* ieee->current_network.dtim_period * ieee->current_network.beacon_interval * 1024; */
 	}

 	if ((ieee->ps & (IEEE80211_PS_MBCAST | IEEE80211_PS_UNICAST)) == (IEEE80211_PS_MBCAST | IEEE80211_PS_UNICAST))
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c
index f5c991f6d34f..320021752f28 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c
@@ -218,7 +218,6 @@ int ieee80211_encrypt_fragment(


 void ieee80211_txb_free(struct ieee80211_txb *txb) {
-	//int i;
 	if (unlikely(!txb))
 		return;
 	kfree(txb);
@@ -767,7 +766,7 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev)
 			skb_frag = txb->fragments[i];
 			tcb_desc = (struct cb_desc *)(skb_frag->cb + MAX_DEV_ADDR_SIZE);
 			if(qos_actived){
-				skb_frag->priority = skb->priority;//UP2AC(skb->priority);
+				skb_frag->priority = skb->priority;
 				tcb_desc->queue_index =  UP2AC(skb->priority);
 			} else {
 				skb_frag->priority = WME_AC_BK;
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c
index 6cf9e25d6607..b09fd717b760 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c
@@ -60,7 +60,6 @@ static inline char *rtl819x_translate_scan(struct ieee80211_device *ieee,
 	/* Add the ESSID */
 	iwe.cmd = SIOCGIWESSID;
 	iwe.u.data.flags = 1;
-//	if (network->flags & NETWORK_EMPTY_ESSID) {
 	if (network->ssid_len == 0) {
 		iwe.u.data.length = sizeof("<hidden>");
 		start = iwe_stream_add_point(info, start, stop, &iwe, "<hidden>");
@@ -92,8 +91,6 @@ static inline char *rtl819x_translate_scan(struct ieee80211_device *ieee,

 	/* Add frequency/channel */
 	iwe.cmd = SIOCGIWFREQ;
-/*	iwe.u.freq.m = ieee80211_frequency(network->channel, network->mode);
-	iwe.u.freq.e = 3; */
 	iwe.u.freq.m = network->channel;
 	iwe.u.freq.e = 0;
 	iwe.u.freq.i = 0;
@@ -182,7 +179,6 @@ static inline char *rtl819x_translate_scan(struct ieee80211_device *ieee,

 	if (ieee->wpa_enabled && network->wpa_ie_len) {
 		char buf[MAX_WPA_IE_LEN * 2 + 30];
-	//	printk("WPA IE\n");
 		u8 *p = buf;
 		p += sprintf(p, "wpa_ie=");
 		for (i = 0; i < network->wpa_ie_len; i++) {
@@ -234,9 +230,7 @@ int ieee80211_wx_get_scan(struct ieee80211_device *ieee,
 	unsigned long flags;

 	char *ev = extra;
-//	char *stop = ev + IW_SCAN_MAX_DATA;
 	char *stop = ev + wrqu->data.length;/* IW_SCAN_MAX_DATA; */
-	//char *stop = ev + IW_SCAN_MAX_DATA;
 	int i = 0;
 	int err = 0;
 	IEEE80211_DEBUG_WX("Getting scan\n");
@@ -541,7 +535,7 @@ int ieee80211_wx_set_encode_ext(struct ieee80211_device *ieee,
 			return -EINVAL;
 	}

-	sec.flags |= SEC_ENABLED;// | SEC_ENCRYPT;
+	sec.flags |= SEC_ENABLED;
 	if ((encoding->flags & IW_ENCODE_DISABLED) ||
 	    ext->alg == IW_ENCODE_ALG_NONE) {
 		if (*crypt)
@@ -555,7 +549,6 @@ int ieee80211_wx_set_encode_ext(struct ieee80211_device *ieee,

 		if (i == WEP_KEYS) {
 			sec.enabled = 0;
-		      //  sec.encrypt = 0;
 			sec.level = SEC_LEVEL_0;
 			sec.flags |= SEC_LEVEL;
 		}
@@ -563,7 +556,6 @@ int ieee80211_wx_set_encode_ext(struct ieee80211_device *ieee,
 	}

 	sec.enabled = 1;
-    //    sec.encrypt = 1;
 	switch (ext->alg) {
 	case IW_ENCODE_ALG_WEP:
 		alg = "WEP";
@@ -631,19 +623,15 @@ int ieee80211_wx_set_encode_ext(struct ieee80211_device *ieee,
 	}

 	if (ext->alg != IW_ENCODE_ALG_NONE) {
-		//memcpy(sec.keys[idx], ext->key, ext->key_len);
 		sec.key_sizes[idx] = ext->key_len;
 		sec.flags |= BIT(idx);
 		if (ext->alg == IW_ENCODE_ALG_WEP) {
-		      //  sec.encode_alg[idx] = SEC_ALG_WEP;
 			sec.flags |= SEC_LEVEL;
 			sec.level = SEC_LEVEL_1;
 		} else if (ext->alg == IW_ENCODE_ALG_TKIP) {
-		      //  sec.encode_alg[idx] = SEC_ALG_TKIP;
 			sec.flags |= SEC_LEVEL;
 			sec.level = SEC_LEVEL_2;
 		} else if (ext->alg == IW_ENCODE_ALG_CCMP) {
-		       // sec.encode_alg[idx] = SEC_ALG_CCMP;
 			sec.flags |= SEC_LEVEL;
 			sec.level = SEC_LEVEL_3;
 		}
@@ -761,8 +749,6 @@ int ieee80211_wx_set_auth(struct ieee80211_device *ieee,
 		break;

 	case IW_AUTH_80211_AUTH_ALG:
-		//printk("======>%s():data->value is %d\n",__func__,data->value);
-	//	ieee->open_wep = (data->value&IW_AUTH_ALG_OPEN_SYSTEM)?1:0;
 		if (data->value & IW_AUTH_ALG_SHARED_KEY) {
 			ieee->open_wep = 0;
 			ieee->auth_mode = 1;
@@ -800,8 +786,7 @@ int ieee80211_wx_set_gen_ie(struct ieee80211_device *ieee, u8 *ie, size_t len)

 	if (len>MAX_WPA_IE_LEN || (len && ie == NULL))
 	{
-	//	printk("return error out, len:%d\n", len);
-	return -EINVAL;
+		return -EINVAL;
 	}


diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c
index adfe1878f36d..aed114573edb 100644
--- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c
+++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c
@@ -164,7 +164,6 @@ static struct sk_buff *ieee80211_ADDBA(struct ieee80211_device *ieee, u8 *Dst, s

 	IEEE80211_DEBUG_DATA(IEEE80211_DL_DATA|IEEE80211_DL_BA, skb->data, skb->len);
 	return skb;
-	//return NULL;
 }


@@ -205,7 +204,6 @@ static struct sk_buff *ieee80211_DELBA(
 	skb = dev_alloc_skb(len + sizeof(struct rtl_80211_hdr_3addr)); /* need to add something others? FIXME */
 	if (!skb)
 		return NULL;
-//	memset(skb->data, 0, len+sizeof( struct rtl_80211_hdr_3addr));
 	skb_reserve(skb, ieee->tx_headroom);

 	Delba = skb_put(skb, sizeof(struct rtl_80211_hdr_3addr));
@@ -598,7 +596,6 @@ int ieee80211_rx_DELBA(struct ieee80211_device *ieee, struct sk_buff *skb)
 		pTxTs->add_ba_req_in_progress = false;
 		pTxTs->add_ba_req_delayed = false;
 		del_timer_sync(&pTxTs->ts_add_ba_timer);
-		//PlatformCancelTimer(Adapter, &pTxTs->ts_add_ba_timer);
 		TxTsDeleteBA(ieee, pTxTs);
 	}
 	return 0;
diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h b/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h
index 5691de03e740..71665b3da617 100644
--- a/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h
+++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h
@@ -233,8 +233,6 @@ typedef struct _BSS_HT {
 	u16					bdHTInfoLen;

 	HT_SPEC_VER				bdHTSpecVer;
-	//struct ht_capability_ele              bdHTCapEle;
-	//HT_INFORMATION_ELE		bdHTInfoEle;

 	u8					bdRT2RTAggregation;
 	u8					bdRT2RTLongSlotTime;
diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c
index 4359d6f5735c..c3b6687024cd 100644
--- a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c
+++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c
@@ -42,7 +42,6 @@ static u8 BELKINF5D82334V3_RALINK[3] = {0x00, 0x1c, 0xdf};
 static u8 PCI_RALINK[3] = {0x00, 0x90, 0xcc};
 static u8 EDIMAX_RALINK[3] = {0x00, 0x0e, 0x2e};
 static u8 AIRLINK_RALINK[3] = {0x00, 0x18, 0x02};
-//static u8 DLINK_ATHEROS[3] = {0x00, 0x1c, 0xf0};
 static u8 CISCO_BROADCOM[3] = {0x00, 0x17, 0x94};
 /*
  * 2008/04/01 MH For Cisco G mode RX TP We need to change FW duration. Should we
@@ -59,10 +58,7 @@ static u8 CISCO_BROADCOM[3] = {0x00, 0x17, 0x94};
 void HTUpdateDefaultSetting(struct ieee80211_device *ieee)
 {
 	PRT_HIGH_THROUGHPUT	pHTInfo = ieee->pHTInfo;
-	//const typeof( ((struct ieee80211_device *)0)->pHTInfo ) *__mptr = &pHTInfo;

-	//printk("pHTinfo:%p, &pHTinfo:%p, mptr:%p,  offsetof:%x\n", pHTInfo, &pHTInfo, __mptr, offsetof(struct ieee80211_device, pHTInfo));
-	//printk("===>ieee:%p,\n", ieee);
 	/* ShortGI support */
 	pHTInfo->bRegShortGI20MHz = 1;
 	pHTInfo->bRegShortGI40MHz = 1;
@@ -237,7 +233,6 @@ static u16 HTMcsToDataRate(struct ieee80211_device *ieee, u8 nMcsRate)
  */
 u16  TxCountToDataRate(struct ieee80211_device *ieee, u8 nDataRate)
 {
-	//PRT_HIGH_THROUGHPUT	pHTInfo = ieee->pHTInfo;
 	u16		CCKOFDMRate[12] = {0x02, 0x04, 0x0b, 0x16, 0x0c, 0x12, 0x18, 0x24, 0x30, 0x48, 0x60, 0x6c};
 	u8	is40MHz = 0;
 	u8	isShortGI = 0;
@@ -248,23 +243,15 @@ u16  TxCountToDataRate(struct ieee80211_device *ieee, u8 nDataRate)
 		if (nDataRate >= 0x10 && nDataRate <= 0x1f) { //if(nDataRate > 11 && nDataRate < 28 )
 			is40MHz = 0;
 			isShortGI = 0;
-
-		      // nDataRate = nDataRate - 12;
 		} else if (nDataRate >= 0x20  && nDataRate <= 0x2f) { //(27, 44)
 			is40MHz = 1;
 			isShortGI = 0;
-
-			//nDataRate = nDataRate - 28;
 		} else if (nDataRate >= 0x30  && nDataRate <= 0x3f) { //(43, 60)
 			is40MHz = 0;
 			isShortGI = 1;
-
-			//nDataRate = nDataRate - 44;
 		} else if (nDataRate >= 0x40  && nDataRate <= 0x4f) { //(59, 76)
 			is40MHz = 1;
 			isShortGI = 1;
-
-			//nDataRate = nDataRate - 60;
 		}
 		return MCS_DATA_RATE[is40MHz][isShortGI][nDataRate & 0xf];
 	}
@@ -374,10 +361,7 @@ static bool HTIOTActIsDisableMCS15(struct ieee80211_device *ieee)
 	retValue = true;
 #elif (DEV_BUS_TYPE == PCI_INTERFACE)
 	/* Enable MCS15 if the peer is Cisco AP. by Emily, 2008.05.12 */
-//	if(pBssDesc->bCiscoCapExist)
-//		retValue = false;
-//	else
-		retValue = false;
+	retValue = false;
 #endif
 #endif
 #endif
@@ -474,7 +458,6 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u
 {
 	PRT_HIGH_THROUGHPUT	pHT = ieee->pHTInfo;
 	struct ht_capability_ele   *pCapELE = NULL;
-	//u8 bIsDeclareMCS13;

 	if (!posHTCap || !pHT) {
 		IEEE80211_DEBUG(IEEE80211_DL_ERR,
@@ -499,13 +482,10 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u
 	else
 		pCapELE->ChlWidth = (pHT->bRegBW40MHz ? 1 : 0);

-//	pCapELE->ChlWidth		= (pHT->bRegBW40MHz?1:0);
 	pCapELE->MimoPwrSave		= pHT->SelfMimoPs;
 	pCapELE->GreenField		= 0; /* This feature is not supported now!! */
 	pCapELE->ShortGI20Mhz		= 1; /* We can receive Short GI!! */
 	pCapELE->ShortGI40Mhz		= 1; /* We can receive Short GI!! */
-	//DbgPrint("TX HT cap/info ele BW=%d SG20=%d SG40=%d\n\r",
-	//pCapELE->ChlWidth, pCapELE->ShortGI20Mhz, pCapELE->ShortGI40Mhz);
 	pCapELE->TxSTBC			= 1;
 	pCapELE->RxSTBC			= 0;
 	pCapELE->DelayBA		= 0;	/* Do not support now!! */
@@ -564,13 +544,12 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u
 	else
 		*len = 26 + 2;

-//	IEEE80211_DEBUG_DATA(IEEE80211_DL_DATA | IEEE80211_DL_HT, posHTCap, *len -2);

 	/*
 	 * Print each field in detail. Driver should not print out this message
 	 * by default
 	 */
-//	HTDebugHTCapability(posHTCap, (u8*)"HTConstructCapability()");
+	/* HTDebugHTCapability(posHTCap, (u8*)"HTConstructCapability()"); */
 }

 /*
@@ -621,8 +600,6 @@ void HTConstructInfoElement(struct ieee80211_device *ieee, u8 *posHTInfo, u8 *le
 		/* STA should not generate High Throughput Information Element */
 		*len = 0;
 	}
-	//IEEE80211_DEBUG_DATA(IEEE80211_DL_DATA | IEEE80211_DL_HT, posHTInfo, *len - 2);
-	//HTDebugHTInfo(posHTInfo, "HTConstructInforElement");
 }

 /*
@@ -667,10 +644,10 @@ void HTConstructRT2RTAggElement(struct ieee80211_device *ieee, u8 *posRT2RTAgg,
 	*posRT2RTAgg++ = 0x4c;
 	*posRT2RTAgg++ = 0x02;
 	*posRT2RTAgg++ = 0x01;
-	*posRT2RTAgg = 0x10;//*posRT2RTAgg = 0x02;
+	*posRT2RTAgg = 0x10;

 	if (ieee->bSupportRemoteWakeUp)
-		*posRT2RTAgg |= 0x08;//RT_HT_CAP_USE_WOW;
+		*posRT2RTAgg |= 0x08;

 	*len = 6 + 2;
 	return;
@@ -855,11 +832,7 @@ void HTOnAssocRsp(struct ieee80211_device *ieee)
 		return;
 	}
 	IEEE80211_DEBUG(IEEE80211_DL_HT, "===> HTOnAssocRsp_wq(): HT_ENABLE\n");
-//	IEEE80211_DEBUG_DATA(IEEE80211_DL_DATA, pHTInfo->PeerHTCapBuf, sizeof(struct ht_capability_ele));
-//	IEEE80211_DEBUG_DATA(IEEE80211_DL_DATA, pHTInfo->PeerHTInfoBuf, sizeof(HT_INFORMATION_ELE));

-//	HTDebugHTCapability(pHTInfo->PeerHTCapBuf,"HTOnAssocRsp_wq");
-//	HTDebugHTInfo(pHTInfo->PeerHTInfoBuf,"HTOnAssocRsp_wq");
 	if (!memcmp(pHTInfo->PeerHTCapBuf, EWC11NHTCap, sizeof(EWC11NHTCap)))
 		pPeerHTCap = (struct ht_capability_ele *)(&pHTInfo->PeerHTCapBuf[4]);
 	else
@@ -874,8 +847,7 @@ void HTOnAssocRsp(struct ieee80211_device *ieee)
 	 * Configurations:
 	 */
 	IEEE80211_DEBUG_DATA(IEEE80211_DL_DATA | IEEE80211_DL_HT, pPeerHTCap, sizeof(struct ht_capability_ele));
-//	IEEE80211_DEBUG_DATA(IEEE80211_DL_DATA|IEEE80211_DL_HT, pPeerHTInfo, sizeof(HT_INFORMATION_ELE));
-	// Config Supported Channel Width setting
+	/* Config Supported Channel Width setting */
 	HTSetConnectBwMode(ieee, (enum ht_channel_width)(pPeerHTCap->ChlWidth), (enum ht_extension_chan_offset)(pPeerHTInfo->ExtChlOffset));

 	pHTInfo->bCurTxBW40MHz = (pPeerHTInfo->RecommemdedTxWidth == 1);
@@ -999,7 +971,7 @@ void HTOnAssocRsp(struct ieee80211_device *ieee)
 	else
 		pMcsFilter = MCS_FILTER_ALL;
 	/* WB add for MCS8 bug */
-//	pMcsFilter = MCS_FILTER_1SS;
+	/* pMcsFilter = MCS_FILTER_1SS; */
 	ieee->HTHighestOperaRate = HTGetHighestMCSRate(ieee, ieee->dot11HTOperationalRateSet, pMcsFilter);
 	ieee->HTCurrentOperaRate = ieee->HTHighestOperaRate;

@@ -1114,10 +1086,6 @@ void HTInitializeBssDesc(PBSS_HT pBssHT)
 void HTResetSelfAndSavePeerSetting(struct ieee80211_device *ieee,	struct ieee80211_network *pNetwork)
 {
 	PRT_HIGH_THROUGHPUT		pHTInfo = ieee->pHTInfo;
-//	u16						nMaxAMSDUSize;
-//	struct ht_capability_ele       *pPeerHTCap = (struct ht_capability_ele *)pNetwork->bssht.bdHTCapBuf;
-//	PHT_INFORMATION_ELE		pPeerHTInfo = (PHT_INFORMATION_ELE)pNetwork->bssht.bdHTInfoBuf;
-//	u8*	pMcsFilter;
 	u8	bIOTAction = 0;

 	/*
@@ -1189,7 +1157,6 @@ void HTResetSelfAndSavePeerSetting(struct ieee80211_device *ieee,	struct ieee802
 void HTUpdateSelfAndPeerSetting(struct ieee80211_device *ieee,	struct ieee80211_network *pNetwork)
 {
 	PRT_HIGH_THROUGHPUT	        pHTInfo = ieee->pHTInfo;
-//	struct ht_capability_ele       *pPeerHTCap = (struct ht_capability_ele *)pNetwork->bssht.bdHTCapBuf;
 	PHT_INFORMATION_ELE		pPeerHTInfo = (PHT_INFORMATION_ELE)pNetwork->bssht.bdHTInfoBuf;

 	if (pHTInfo->bCurrentHTSupport) {
@@ -1254,19 +1221,11 @@ static void HTSetConnectBwModeCallback(struct ieee80211_device *ieee)
 void HTSetConnectBwMode(struct ieee80211_device *ieee, enum ht_channel_width Bandwidth, enum ht_extension_chan_offset Offset)
 {
 	PRT_HIGH_THROUGHPUT pHTInfo = ieee->pHTInfo;
-//	u32 flags = 0;

 	if (!pHTInfo->bRegBW40MHz)
 		return;

-	/* To reduce dummy operation */
-//	if((pHTInfo->bCurBW40MHz==false && Bandwidth==HT_CHANNEL_WIDTH_20) ||
-//	   (pHTInfo->bCurBW40MHz==true && Bandwidth==HT_CHANNEL_WIDTH_20_40 && Offset==pHTInfo->CurSTAExtChnlOffset))
-//		return;
-
-//	spin_lock_irqsave(&(ieee->bw_spinlock), flags);
 	if (pHTInfo->bSwBwInProgress) {
-//		spin_unlock_irqrestore(&(ieee->bw_spinlock), flags);
 		return;
 	}
 	/* if in half N mode, set to 20M bandwidth please 09.08.2008 WB. */
@@ -1296,5 +1255,4 @@ void HTSetConnectBwMode(struct ieee80211_device *ieee, enum ht_channel_width Ban
 	 */
 	HTSetConnectBwModeCallback(ieee);

-//	spin_unlock_irqrestore(&(ieee->bw_spinlock), flags);
 }
diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_Qos.h b/drivers/staging/rtl8192u/ieee80211/rtl819x_Qos.h
index 44418a284fe9..c5692e5414ec 100644
--- a/drivers/staging/rtl8192u/ieee80211/rtl819x_Qos.h
+++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_Qos.h
@@ -51,7 +51,7 @@ struct qos_tsinfo {
  * Note: sizeof 55 bytes
  */
 struct tspec_body {
-	struct qos_tsinfo	ts_info;	//u8	TSInfo[3];
+	struct qos_tsinfo	ts_info;
 	u16	nominal_msd_usize;
 	u16	max_msd_usize;
 	u32	min_service_itv;
@@ -79,4 +79,4 @@ struct octet_string {

 #define is_ac_valid(ac)			(((ac) <= 7) ? true : false)

-#endif // #ifndef __INC_QOS_TYPE_H
+#endif
diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c
index 469d6ab3dc8e..903373769464 100644
--- a/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c
+++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c
@@ -30,7 +30,6 @@ static void RxPktPendingTimeout(struct timer_list *t)

 	struct rx_reorder_entry	*pReorderEntry = NULL;

-	//u32 flags = 0;
 	unsigned long flags = 0;
 	u8 index = 0;
 	bool bPktInBuf = false;
@@ -179,14 +178,12 @@ void TSInitialize(struct ieee80211_device *ieee)
 	}
 	/* Initialize unused Rx Reorder List. */
 	INIT_LIST_HEAD(&ieee->RxReorder_Unused_List);
-//#ifdef TO_DO_LIST
 	for (count = 0; count < REORDER_ENTRY_NUM; count++) {
 		list_add_tail(&pRxReorderEntry->List, &ieee->RxReorder_Unused_List);
 		if (count == (REORDER_ENTRY_NUM-1))
 			break;
 		pRxReorderEntry = &ieee->RxReorderEntry[count+1];
 	}
-//#endif
 }

 static void AdmitTS(struct ieee80211_device *ieee,
@@ -205,7 +202,6 @@ static struct ts_common_info *SearchAdmitTRStream(struct ieee80211_device *ieee,
 						  u8 *Addr, u8 TID,
 						  enum tr_select TxRxSelect)
 {
-	//DIRECTION_VALUE	dir;
 	u8	dir;
 	bool				search_dir[4] = {0};
 	struct list_head		*psearch_list; /* FIXME */
@@ -240,16 +236,13 @@ static struct ts_common_info *SearchAdmitTRStream(struct ieee80211_device *ieee,
 	else
 		psearch_list = &ieee->Rx_TS_Admit_List;

-	//for(dir = DIR_UP; dir <= DIR_BI_DIR; dir++)
 	for (dir = 0; dir <= DIR_BI_DIR; dir++) {
 		if (!search_dir[dir])
 			continue;
 		list_for_each_entry(pRet, psearch_list, list) {
-	//		IEEE80211_DEBUG(IEEE80211_DL_TS, "ADD:%pM, TID:%d, dir:%d\n", pRet->Addr, pRet->TSpec.ts_info.ucTSID, pRet->TSpec.ts_info.ucDirection);
 			if (memcmp(pRet->addr, Addr, 6) == 0)
 				if (pRet->t_spec.ts_info.uc_tsid == TID)
 					if (pRet->t_spec.ts_info.uc_direction == dir) {
-	//					printk("Bingo! got it\n");
 						break;
 					}
 		}
@@ -409,14 +402,12 @@ bool GetTs(
 static void RemoveTsEntry(struct ieee80211_device *ieee, struct ts_common_info *pTs,
 			  enum tr_select TxRxSelect)
 {
-	//u32 flags = 0;
 	unsigned long flags = 0;
 	del_timer_sync(&pTs->setup_timer);
 	del_timer_sync(&pTs->inact_timer);
 	TsInitDelBA(ieee, pTs, TxRxSelect);

 	if (TxRxSelect == RX_DIR) {
-//#ifdef TO_DO_LIST
 		struct rx_reorder_entry	*pRxReorderEntry;
 		struct rx_ts_record     *pRxTS = (struct rx_ts_record *)pTs;
 		if (timer_pending(&pRxTS->rx_pkt_pending_timer))
@@ -424,7 +415,6 @@ static void RemoveTsEntry(struct ieee80211_device *ieee, struct ts_common_info *

 		while (!list_empty(&pRxTS->rx_pending_pkt_list)) {
 			spin_lock_irqsave(&(ieee->reorder_spinlock), flags);
-			//pRxReorderEntry = list_entry(&pRxTS->rx_pending_pkt_list.prev,RX_REORDER_ENTRY,List);
 			pRxReorderEntry = list_entry(pRxTS->rx_pending_pkt_list.prev, struct rx_reorder_entry, List);
 			list_del_init(&pRxReorderEntry->List);
 			{
@@ -444,7 +434,6 @@ static void RemoveTsEntry(struct ieee80211_device *ieee, struct ts_common_info *
 			spin_unlock_irqrestore(&(ieee->reorder_spinlock), flags);
 		}

-//#endif
 	} else {
 		struct tx_ts_record *pTxTS = (struct tx_ts_record *)pTs;
 		del_timer_sync(&pTxTS->ts_add_ba_timer);
diff --git a/drivers/staging/rtl8192u/r8190_rtl8256.c b/drivers/staging/rtl8192u/r8190_rtl8256.c
index 716be24bace6..f8790ab16c61 100644
--- a/drivers/staging/rtl8192u/r8190_rtl8256.c
+++ b/drivers/staging/rtl8192u/r8190_rtl8256.c
@@ -34,9 +34,6 @@ void phy_set_rf8256_bandwidth(struct net_device *dev, enum ht_channel_width Band
 	u8	eRFPath;
 	struct r8192_priv *priv = ieee80211_priv(dev);

-	/* for(eRFPath = RF90_PATH_A; eRFPath <pHalData->NumTotalRFPath;
-	 *  eRFPath++)
-	 */
 	for (eRFPath = 0; eRFPath < RF90_PATH_MAX; eRFPath++) {
 		if (!rtl8192_phy_CheckIsLegalRFPath(dev, eRFPath))
 			continue;
diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index 410c8a3e56d7..85d476af0586 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -458,8 +458,6 @@ int read_nic_dword(struct net_device *dev, int indx, u32 *data)
 	return 0;
 }

-/* u8 read_phy_cck(struct net_device *dev, u8 adr); */
-/* u8 read_phy_ofdm(struct net_device *dev, u8 adr); */
 /*
  * this might still called in what was the PHY rtl8185/rtl8192 common code
  * plans are to possibility turn it again in one common code...
@@ -4747,7 +4745,7 @@ static void rtl8192_rx_nomal(struct sk_buff *skb)
 		/* TODO */
 		/* hardware related info */
 		/* Process the MPDU received */
-		skb_trim(skb, skb->len - 4/*sCrcLng*/);
+		skb_trim(skb, skb->len - 4);

 		rx_pkt_len = skb->len;
 		ieee80211_hdr = (struct rtl_80211_hdr_1addr *)skb->data;
@@ -4846,7 +4844,6 @@ static void rtl8192_rx_cmd(struct sk_buff *skb)

 	if ((skb->len >= (20 + sizeof(struct rx_desc_819x_usb))) && (skb->len < RX_URB_SIZE)) {
 		query_rx_cmdpkt_desc_status(skb, &stats);
-		/* prfd->queue_id = 1; */

 		/* Process the command packet received. */

diff --git a/drivers/staging/rtl8192u/r8192U_dm.c b/drivers/staging/rtl8192u/r8192U_dm.c
index b15cf98281dd..51dab0863b86 100644
--- a/drivers/staging/rtl8192u/r8192U_dm.c
+++ b/drivers/staging/rtl8192u/r8192U_dm.c
@@ -57,8 +57,6 @@ static	void	dm_bandwidth_autoswitch(struct net_device *dev);

 static	void	dm_check_txpower_tracking(struct net_device *dev);

-/* static	void	dm_txpower_reset_recovery(struct net_device *dev); */
-
 /* DM --> Dynamic Init Gain by RSSI */
 static	void	dm_dig_init(struct net_device *dev);
 static	void	dm_ctrl_initgain_byrssi(struct net_device *dev);
@@ -73,7 +71,6 @@ static	void dm_init_ctstoself(struct net_device *dev);
 /* DM --> EDCA turbo mode control */
 static	void	dm_check_edca_turbo(struct net_device *dev);

-/*static	void	dm_gpio_change_rf(struct net_device *dev);*/
 /* DM --> Check PBC */
 static	void dm_check_pbc_gpio(struct net_device *dev);

@@ -121,7 +118,6 @@ void init_hal_dm(struct net_device *dev)
 	/* Initial TX Power Control for near/far range , add by amy 2008/05/15, porting from windows code. */
 	dm_init_dynamic_txpower(dev);
 	init_rate_adaptive(dev);
-	/* dm_initialize_txpower_tracking(dev); */
 	dm_dig_init(dev);
 	dm_init_edca_turbo(dev);
 	dm_init_bandwidth_autoswitch(dev);
@@ -195,10 +191,6 @@ void dm_CheckRxAggregation(struct net_device *dev)

 void hal_dm_watchdog(struct net_device *dev)
 {
-	/* struct r8192_priv *priv = ieee80211_priv(dev); */
-
-	/* static u8	previous_bssid[6] ={0}; */
-
 	/* Add by amy 2008/05/15 ,porting from windows code. */
 	dm_check_rate_adaptive(dev);
 	dm_dynamic_txpower(dev);
@@ -309,7 +301,6 @@ static void dm_check_rate_adaptive(struct net_device *dev)
 		return;

 	if (priv->ieee80211->state == IEEE80211_LINKED) {
-		/*RT_TRACE(COMP_RATE, "dm_CheckRateAdaptive(): \t");*/

 		/* Check whether Short GI is enabled */
 		bshort_gi_enabled = (pHTInfo->bCurTxBW40MHz && pHTInfo->bCurShortGI40MHz) ||
@@ -358,36 +349,27 @@ static void dm_check_rate_adaptive(struct net_device *dev)
 					(pra->low_rssi_thresh_for_ra40M):(pra->low_rssi_thresh_for_ra20M);
 		}

-		/*DbgPrint("[DM] THresh H/L=%d/%d\n\r", RATR.HighRSSIThreshForRA, RATR.LowRSSIThreshForRA);*/
 		if (priv->undecorated_smoothed_pwdb >= (long)HighRSSIThreshForRA) {
-			/*DbgPrint("[DM] RSSI=%d STA=HIGH\n\r", pHalData->UndecoratedSmoothedPWDB);*/
 			pra->ratr_state = DM_RATR_STA_HIGH;
 			targetRATR = pra->upper_rssi_threshold_ratr;
 		} else if (priv->undecorated_smoothed_pwdb >= (long)LowRSSIThreshForRA) {
-			/*DbgPrint("[DM] RSSI=%d STA=Middle\n\r", pHalData->UndecoratedSmoothedPWDB);*/
 			pra->ratr_state = DM_RATR_STA_MIDDLE;
 			targetRATR = pra->middle_rssi_threshold_ratr;
 		} else {
-			/*DbgPrint("[DM] RSSI=%d STA=LOW\n\r", pHalData->UndecoratedSmoothedPWDB);*/
 			pra->ratr_state = DM_RATR_STA_LOW;
 			targetRATR = pra->low_rssi_threshold_ratr;
 		}

 		/* cosa add for test */
 		if (pra->ping_rssi_enable) {
-			/*pHalData->UndecoratedSmoothedPWDB = 19;*/
 			if (priv->undecorated_smoothed_pwdb < (long)(pra->ping_rssi_thresh_for_ra+5)) {
 				if ((priv->undecorated_smoothed_pwdb < (long)pra->ping_rssi_thresh_for_ra) ||
 					ping_rssi_state) {
-					/*DbgPrint("TestRSSI = %d, set RATR to 0x%x\n", pHalData->UndecoratedSmoothedPWDB, pRA->TestRSSIRATR);*/
 					pra->ratr_state = DM_RATR_STA_LOW;
 					targetRATR = pra->ping_rssi_ratr;
 					ping_rssi_state = 1;
 				}
-				/*else
-					DbgPrint("TestRSSI is between the range.\n");*/
 			} else {
-				/*DbgPrint("TestRSSI Recover to 0x%x\n", targetRATR);*/
 				ping_rssi_state = 0;
 			}
 		}
@@ -510,7 +492,6 @@ static void dm_TXPowerTrackingCallback_TSSI(struct net_device *dev)
 	u32						Value;
 	u8						Pwr_Flag;
 	u16						Avg_TSSI_Meas, TSSI_13dBm, Avg_TSSI_Meas_from_driver = 0;
-	/*RT_STATUS				rtStatus = RT_STATUS_SUCCESS;*/
 	bool rtStatus = true;
 	u32						delta = 0;

@@ -532,7 +513,6 @@ static void dm_TXPowerTrackingCallback_TSSI(struct net_device *dev)
 		if (rtStatus == RT_STATUS_FAILURE)
 			RT_TRACE(COMP_POWER_TRACKING, "Set configuration with tx cmd queue fail!\n");
 		usleep_range(1000, 2000);
-		/*DbgPrint("hi, vivi, strange\n");*/
 		for (i = 0; i <= 30; i++) {
 			read_nic_byte(dev, 0x1ba, &Pwr_Flag);

@@ -684,7 +664,6 @@ static void dm_TXPowerTrackingCallback_ThermalMeter(struct net_device *dev)
 			}
 		}
 		priv->btxpower_trackingInit = true;
-		/*pHalData->TXPowercount = 0;*/
 		return;
 	}

@@ -751,7 +730,6 @@ static void dm_TXPowerTrackingCallback_ThermalMeter(struct net_device *dev)
 	}

 	if (CCKSwingNeedUpdate) {
-		/*DbgPrint("Update CCK Swing, CCK_index = %d\n", pHalData->CCK_index);*/
 		dm_cck_txpower_adjust(dev, priv->bcck_in_ch14);
 	}
 	if (priv->OFDM_index != tmpOFDMindex) {
@@ -1326,7 +1304,6 @@ static void dm_CheckTXPowerTracking_ThermalMeter(struct net_device *dev)
 {
 	struct r8192_priv *priv = ieee80211_priv(dev);
 	static u8	TM_Trigger;
-	/*DbgPrint("dm_CheckTXPowerTracking()\n");*/
 	if (!priv->btxpower_tracking)
 		return;
 	if (priv->txpower_count  <= 2) {
@@ -1347,7 +1324,6 @@ static void dm_CheckTXPowerTracking_ThermalMeter(struct net_device *dev)
 		TM_Trigger = 1;
 		return;
 	}
-	/*DbgPrint("Schedule TxPowerTrackingWorkItem\n");*/
 		queue_delayed_work(priv->priv_wq, &priv->txpower_tracking_wq, 0);
 	TM_Trigger = 0;
 }
@@ -1355,7 +1331,6 @@ static void dm_CheckTXPowerTracking_ThermalMeter(struct net_device *dev)
 static void dm_check_txpower_tracking(struct net_device *dev)
 {
 	struct r8192_priv *priv = ieee80211_priv(dev);
-	/*static u32 tx_power_track_counter = 0;*/

 #ifdef RTL8190P
 	dm_CheckTXPowerTracking_TSSI(dev);
@@ -1523,10 +1498,7 @@ void dm_restore_dynamic_mechanism_state(struct net_device *dev)
 			ratr_value = reg_ratr;
 			if (priv->rf_type == RF_1T2R) {	/* 1T2R, Spatial Stream 2 should be disabled */
 				ratr_value &= ~(RATE_ALL_OFDM_2SS);
-				/*DbgPrint("HW_VAR_TATR_0 from 0x%x ==> 0x%x\n", ((pu4Byte)(val))[0], ratr_value);*/
 			}
-			/*DbgPrint("set HW_VAR_TATR_0 = 0x%x\n", ratr_value);*/
-			/*cosa PlatformEFIOWrite4Byte(Adapter, RATR0, ((pu4Byte)(val))[0]);*/
 			write_nic_dword(dev, RATR0, ratr_value);
 			write_nic_byte(dev, UFWP, 1);
 	}
@@ -1588,7 +1560,6 @@ static void dm_bb_initialgain_backup(struct net_device *dev)
 	if (dm_digtable.dig_algorithm == DIG_ALGO_BY_RSSI)
 		return;

-	/*PHY_SetBBReg(Adapter, UFWP, bMaskLWord, 0x800);*/
 	rtl8192_setBBreg(dev, UFWP, bMaskByte1, 0x8);	/* Only clear byte 1 and rewrite. */
 	priv->initgain_backup.xaagccore1 = (u8)rtl8192_QueryBBReg(dev, rOFDM0_XAAGCCore1, bit_mask);
 	priv->initgain_backup.xbagccore1 = (u8)rtl8192_QueryBBReg(dev, rOFDM0_XBAGCCore1, bit_mask);
@@ -1679,7 +1650,6 @@ static void dm_ctrl_initgain_byrssi(struct net_device *dev)
 		dm_ctrl_initgain_byrssi_by_fwfalse_alarm(dev);
 	else if (dm_digtable.dig_algorithm == DIG_ALGO_BY_RSSI)
 		dm_ctrl_initgain_byrssi_by_driverrssi(dev);
-	/* ; */
 	else
 		return;
 }
@@ -1694,7 +1664,6 @@ static void dm_ctrl_initgain_byrssi_by_driverrssi(
 	if (!dm_digtable.dig_enable_flag)
 		return;

-	/*DbgPrint("Dig by Sw Rssi\n");*/
 	if (dm_digtable.dig_algorithm_switch)	/* if switched algorithm, we have to disable FW Dig. */
 		fw_dig = 0;

@@ -1715,7 +1684,6 @@ static void dm_ctrl_initgain_byrssi_by_driverrssi(
 		DM_DigTable.PreConnectState, DM_DigTable.CurConnectState);*/

 	dm_digtable.rssi_val = priv->undecorated_smoothed_pwdb;
-	/*DbgPrint("DM_DigTable.Rssi_val = %d\n", DM_DigTable.Rssi_val);*/
 	dm_initial_gain(dev);
 	dm_pd_th(dev);
 	dm_cs_ratio(dev);
@@ -1751,11 +1719,6 @@ static void dm_ctrl_initgain_byrssi_by_fwfalse_alarm(
 	    (priv->undecorated_smoothed_pwdb < dm_digtable.rssi_high_thresh))
 		return;

-	/*DbgPrint("Dig by Fw False Alarm\n");*/
-	/*if (DM_DigTable.Dig_State == DM_STA_DIG_OFF)*/
-	/*DbgPrint("DIG Check\n\r RSSI=%d LOW=%d HIGH=%d STATE=%d",
-	pHalData->UndecoratedSmoothedPWDB, DM_DigTable.RssiLowThresh,
-	DM_DigTable.RssiHighThresh, DM_DigTable.Dig_State);*/
 	/*
 	 * 1. When RSSI decrease, We have to judge if it is smaller than a threshold
 	 * and then execute the step below.
@@ -1827,7 +1790,6 @@ static void dm_ctrl_initgain_byrssi_by_fwfalse_alarm(
 		reset_cnt = priv->reset_count;

 		dm_digtable.dig_state = DM_STA_DIG_ON;
-		/*DbgPrint("DIG ON\n\r");*/

 		/*
 		 * 2.1 Set initial gain.
@@ -1987,7 +1949,6 @@ static void dm_initial_gain(
 		dm_digtable.cur_ig_value = priv->DefaultInitialGain[0];
 		dm_digtable.pre_ig_value = 0;
 	}
-	/*DbgPrint("DM_DigTable.CurIGValue = 0x%x, DM_DigTable.PreIGValue = 0x%x\n", DM_DigTable.CurIGValue, DM_DigTable.PreIGValue);*/

 	/* if silent reset happened, we should rewrite the values back */
 	if (priv->reset_count != reset_cnt) {
@@ -2003,7 +1964,6 @@ static void dm_initial_gain(
 		if ((dm_digtable.pre_ig_value != dm_digtable.cur_ig_value)
 			|| !initialized || force_write) {
 			initial_gain = (u8)dm_digtable.cur_ig_value;
-			/*DbgPrint("Write initial gain = 0x%x\n", initial_gain);*/
 			/*  Set initial gain. */
 			write_nic_byte(dev, rOFDM0_XAAGCCore1, initial_gain);
 			write_nic_byte(dev, rOFDM0_XBAGCCore1, initial_gain);
@@ -2055,7 +2015,6 @@ static void dm_pd_th(
 	{
 		if ((dm_digtable.prepd_thstate != dm_digtable.curpd_thstate) ||
 		    (initialized <= 3) || force_write) {
-			/*DbgPrint("Write PD_TH state = %d\n", DM_DigTable.CurPD_THState);*/
 			if (dm_digtable.curpd_thstate == DIG_PD_AT_LOW_POWER) {
 				/*  Lower PD_TH for OFDM. */
 				if (priv->CurrentChannelBW != HT_CHANNEL_WIDTH_20) {
@@ -2135,7 +2094,6 @@ static	void dm_cs_ratio(
 	{
 		if ((dm_digtable.precs_ratio_state != dm_digtable.curcs_ratio_state) ||
 		    !initialized || force_write) {
-			/*DbgPrint("Write CS_ratio state = %d\n", DM_DigTable.CurCS_ratioState);*/
 			if (dm_digtable.curcs_ratio_state == DIG_CS_RATIO_LOWER) {
 				/*  Lower CS ratio for CCK. */
 				write_nic_byte(dev, 0xa0a, 0x08);
@@ -2164,7 +2122,6 @@ static void dm_check_edca_turbo(
 {
 	struct r8192_priv *priv = ieee80211_priv(dev);
 	PRT_HIGH_THROUGHPUT	pHTInfo = priv->ieee80211->pHTInfo;
-	/* PSTA_QOS			pStaQos = pMgntInfo->pStaQos; */

 	/* Keep past Tx/Rx packet count for RT-to-RT EDCA turbo. */
 	static unsigned long			lastTxOkCnt;
@@ -2182,20 +2139,17 @@ static void dm_check_edca_turbo(
 	if (priv->ieee80211->pHTInfo->IOTAction & HT_IOT_ACT_DISABLE_EDCA_TURBO)
 		goto dm_CheckEdcaTurbo_EXIT;

-	/*printk("========>%s():bis_any_nonbepkts is %d\n", __func__, priv->bis_any_nonbepkts);*/
 	/* Check the status for current condition. */
 	if (!priv->ieee80211->bis_any_nonbepkts) {
 		curTxOkCnt = priv->stats.txbytesunicast - lastTxOkCnt;
 		curRxOkCnt = priv->stats.rxbytesunicast - lastRxOkCnt;
 		/* For RT-AP, we needs to turn it on when Rx>Tx */
 		if (curRxOkCnt > 4*curTxOkCnt) {
-			/*printk("%s():curRxOkCnt > 4*curTxOkCnt\n");*/
 			if (!priv->bis_cur_rdlstate || !priv->bcurrent_turbo_EDCA) {
 				write_nic_dword(dev, EDCAPARA_BE, edca_setting_DL[pHTInfo->IOTPeer]);
 				priv->bis_cur_rdlstate = true;
 			}
 		} else {
-			/*printk("%s():curRxOkCnt < 4*curTxOkCnt\n");*/
 			if (priv->bis_cur_rdlstate || !priv->bcurrent_turbo_EDCA) {
 				write_nic_dword(dev, EDCAPARA_BE, edca_setting_UL[pHTInfo->IOTPeer]);
 				priv->bis_cur_rdlstate = false;
@@ -2300,7 +2254,6 @@ static void dm_ctstoself(struct net_device *dev)
 		curRxOkCnt = priv->stats.rxbytesunicast - lastRxOkCnt;
 		if (curRxOkCnt > 4*curTxOkCnt) { /* downlink, disable CTS to self */
 			pHTInfo->IOTAction &= ~HT_IOT_ACT_FORCED_CTS2SELF;
-			/*DbgPrint("dm_CTSToSelf() ==> CTS to self disabled -- downlink\n");*/
 		} else { /* uplink */
 			pHTInfo->IOTAction |= HT_IOT_ACT_FORCED_CTS2SELF;
 		}
@@ -2371,7 +2324,6 @@ void dm_rf_pathcheck_workitemcallback(struct work_struct *work)
 	struct delayed_work *dwork = to_delayed_work(work);
 	struct r8192_priv *priv = container_of(dwork, struct r8192_priv, rfpath_check_wq);
 	struct net_device *dev = priv->ieee80211->dev;
-	/*bool bactually_set = false;*/
 	u8 rfpath = 0, i;

 	/*
@@ -2436,7 +2388,6 @@ static void dm_rxpath_sel_byrssi(struct net_device *dev)

 	if (priv->ieee80211->mode == WIRELESS_MODE_B) {
 		DM_RxPathSelTable.cck_method = CCK_RX_VERSION_2;	/* pure B mode, fixed cck version2 */
-		/*DbgPrint("Pure B mode, use cck rx version2\n");*/
 	}

 	/* decide max/sec/min rssi index */
@@ -2591,7 +2542,6 @@ static void dm_rxpath_sel_byrssi(struct net_device *dev)
 			if ((DM_RxPathSelTable.disabled_rf >> i) & 0x1) {	/* disabled rf */
 				if (tmp_max_rssi >= DM_RxPathSelTable.rf_enable_rssi_th[i]) {
 					/* enable the BB Rx path */
-					/*DbgPrint("RF-%d is enabled.\n", 0x1<<i);*/
 					rtl8192_setBBreg(dev, rOFDM0_TRxPathEnable, 0x1<<i, 0x1);	/* 0xc04[3:0] */
 					rtl8192_setBBreg(dev, rOFDM1_TRxPathEnable, 0x1<<i, 0x1);	/* 0xd04[3:0] */
 					DM_RxPathSelTable.rf_enable_rssi_th[i] = 100;
@@ -2823,7 +2773,6 @@ void dm_check_fsync(struct net_device *dev)
 #define	RegC38_NonFsync_Other_AP		1
 #define	RegC38_Fsync_AP_BCM			2
 	struct r8192_priv *priv = ieee80211_priv(dev);
-	/*u32			framesyncC34;*/
 	static u8		reg_c38_State = RegC38_Default;
 	static u32	reset_cnt;

@@ -2898,14 +2847,12 @@ void dm_check_fsync(struct net_device *dev)
 					if (reg_c38_State) {
 						write_nic_byte(dev, rOFDM0_RxDetector3, priv->framesync);
 						reg_c38_State = RegC38_Default;
-						/*DbgPrint("Fsync is idle, rssi>=40, write 0xc38 = 0x%x\n", pHalData->framesync);*/
 					}
 				}
 			} else {
 				if (reg_c38_State) {
 					write_nic_byte(dev, rOFDM0_RxDetector3, priv->framesync);
 					reg_c38_State = RegC38_Default;
-					/*DbgPrint("Fsync is idle, not connected, write 0xc38 = 0x%x\n", pHalData->framesync);*/
 				}
 			}
 		}
@@ -2915,13 +2862,11 @@ void dm_check_fsync(struct net_device *dev)
 			write_nic_byte(dev, rOFDM0_RxDetector3, priv->framesync);
 			reg_c38_State = RegC38_Default;
 			reset_cnt = priv->reset_count;
-			/*DbgPrint("reg_c38_State = 0 for silent reset.\n");*/
 		}
 	} else {
 		if (reg_c38_State) {
 			write_nic_byte(dev, rOFDM0_RxDetector3, priv->framesync);
 			reg_c38_State = RegC38_Default;
-			/*DbgPrint("framesync no monitor, write 0xc38 = 0x%x\n", pHalData->framesync);*/
 		}
 	}
 }
@@ -2952,7 +2897,6 @@ void dm_shadow_init(struct net_device *dev)
 	for (page = 0; page < 5; page++)
 		for (offset = 0; offset < 256; offset++) {
 			read_nic_byte(dev, offset + page * 256, &dm_shadow[page][offset]);
-			/*DbgPrint("P-%d/O-%02x=%02x\r\n", page, offset, DM_Shadow[page][offset]);*/
 		}

 	for (page = 8; page < 11; page++)
@@ -3008,7 +2952,6 @@ static void dm_dynamic_txpower(struct net_device *dev)
 		priv->bDynamicTxLowPower = false;
 		return;
 	}
-	/*printk("priv->ieee80211->current_network.unknown_cap_exist is %d , priv->ieee80211->current_network.broadcom_cap_exist is %d\n", priv->ieee80211->current_network.unknown_cap_exist, priv->ieee80211->current_network.broadcom_cap_exist);*/
 	if ((priv->ieee80211->current_network.atheros_cap_exist) && (priv->ieee80211->mode == IEEE_G)) {
 		txhipower_threshold = TX_POWER_ATHEROAP_THRESH_HIGH;
 		txlowpower_threshold = TX_POWER_ATHEROAP_THRESH_LOW;
@@ -3017,7 +2960,6 @@ static void dm_dynamic_txpower(struct net_device *dev)
 		txlowpower_threshold = TX_POWER_NEAR_FIELD_THRESH_LOW;
 	}

-	/*printk("=======>%s(): txhipower_threshold is %d, txlowpower_threshold is %d\n", __func__, txhipower_threshold, txlowpower_threshold);*/
 	RT_TRACE(COMP_TXAGC, "priv->undecorated_smoothed_pwdb = %ld\n", priv->undecorated_smoothed_pwdb);

 	if (priv->ieee80211->state == IEEE80211_LINKED) {
@@ -3036,7 +2978,6 @@ static void dm_dynamic_txpower(struct net_device *dev)
 				priv->bDynamicTxLowPower = false;
 		}
 	} else {
-		/*pHalData->bTXPowerCtrlforNearFarRange = !pHalData->bTXPowerCtrlforNearFarRange;*/
 		priv->bDynamicTxHighPower = false;
 		priv->bDynamicTxLowPower = false;
 	}
@@ -3065,7 +3006,6 @@ static void dm_check_txrateandretrycount(struct net_device *dev)
 	/* for 11n tx rate */
 	/*priv->stats.CurrentShowTxate = read_nic_byte(dev, CURRENT_TX_RATE_REG);*/
 	read_nic_byte(dev, CURRENT_TX_RATE_REG, &ieee->softmac_stats.CurrentShowTxate);
-	/*printk("=============>tx_rate_reg:%x\n", ieee->softmac_stats.CurrentShowTxate);*/
 	/* for initial tx rate */
 	/*priv->stats.last_packet_rate = read_nic_byte(dev, INITIAL_TX_RATE_REG);*/
 	read_nic_byte(dev, INITIAL_TX_RATE_REG, &ieee->softmac_stats.last_packet_rate);
diff --git a/drivers/staging/rtl8192u/r8192U_wx.c b/drivers/staging/rtl8192u/r8192U_wx.c
index adb9fe8a79da..839671cc7f96 100644
--- a/drivers/staging/rtl8192u/r8192U_wx.c
+++ b/drivers/staging/rtl8192u/r8192U_wx.c
@@ -470,7 +470,6 @@ static int r8192_wx_set_wap(struct net_device *dev,

 	int ret;
 	struct r8192_priv *priv = ieee80211_priv(dev);
-	/* struct sockaddr *temp = (struct sockaddr *)awrq; */
 	mutex_lock(&priv->wx_mutex);

 	ret = ieee80211_wx_set_wap(priv->ieee80211, info, awrq, extra);
@@ -746,7 +745,6 @@ static int r8192_wx_set_enc_ext(struct net_device *dev,
 			/* none is not allowed to use hwsec WB 2008.07.01 */
 			goto end_hw_sec;

-		/* as IW_ENCODE_ALG_CCMP is defined to be 3 and KEY_TYPE_CCMP is defined to 4; */
 		alg =  (ext->alg == IW_ENCODE_ALG_CCMP)?KEY_TYPE_CCMP:ext->alg;
 		idx = encoding->flags & IW_ENCODE_INDEX;
 		if (idx)
diff --git a/drivers/staging/rtl8192u/r819xU_firmware.c b/drivers/staging/rtl8192u/r819xU_firmware.c
index e9511b829b05..0e47b5f75695 100644
--- a/drivers/staging/rtl8192u/r819xU_firmware.c
+++ b/drivers/staging/rtl8192u/r819xU_firmware.c
@@ -296,7 +296,6 @@ bool init_firmware(struct net_device *dev)
 			 * will set polling bit when firmware code is also configured
 			 */
 			pfirmware->firmware_status = FW_STATUS_1_MOVE_BOOT_CODE;
-			/* mdelay(1000); */
 			/*
 			 * To initialize IMEM, CPU move code  from 0x80000080,
 			 * hence, we send 0x80 byte packet
--
2.17.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 3/3] drivers/staging/rtl8192u: Fix of checkpatch-errors
  2019-06-03 12:21 [PATCH 0/3] Fixing style errors in staging/drivers/rtl8192u Christian Müller
  2019-06-03 12:21 ` [PATCH 1/3] drivers/staging/rtl8192u: Reformat comments Christian Müller
  2019-06-03 12:21 ` [PATCH 2/3] drivers/staging/rtl8192u: Remove comment-out code Christian Müller
@ 2019-06-03 12:21 ` Christian Müller
  2019-06-03 13:05   ` Greg KH
  2019-06-03 13:09   ` Joe Perches
  2 siblings, 2 replies; 8+ messages in thread
From: Christian Müller @ 2019-06-03 12:21 UTC (permalink / raw)
  To: gregkh
  Cc: johnfwhitmore, devel, linux-kernel, linux-kernel, felix.trommer,
	Christian Müller

Fix issues that lead to multiple checkpatch warnings and errors, most of
them regarding formatting of code and comments.
Comments that contain only commented out code are removed as well.

Signed-off-by: Felix Trommer <felix.trommer@hotmail.de>
Signed-off-by: Christian Müller <muellerch-privat@web.de>
---
 .../staging/rtl8192u/ieee80211/ieee80211.h    |  18 +-
 .../rtl8192u/ieee80211/ieee80211_module.c     |   1 +
 .../staging/rtl8192u/ieee80211/ieee80211_rx.c | 651 ++++++++----------
 .../rtl8192u/ieee80211/ieee80211_softmac.c    |  48 +-
 .../staging/rtl8192u/ieee80211/ieee80211_tx.c | 206 +++---
 .../staging/rtl8192u/ieee80211/ieee80211_wx.c |  59 +-
 .../rtl8192u/ieee80211/rtl819x_BAProc.c       |  18 +-
 .../staging/rtl8192u/ieee80211/rtl819x_HT.h   |  15 +-
 .../rtl8192u/ieee80211/rtl819x_HTProc.c       |  16 +-
 .../rtl8192u/ieee80211/rtl819x_TSProc.c       |  14 +-
 drivers/staging/rtl8192u/r8192U_dm.c          |  53 +-
 drivers/staging/rtl8192u/r8192U_hw.h          |  16 +-
 drivers/staging/rtl8192u/r8192U_wx.c          |   3 +-
 drivers/staging/rtl8192u/r819xU_firmware.c    |   2 +-
 14 files changed, 480 insertions(+), 640 deletions(-)

diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211.h b/drivers/staging/rtl8192u/ieee80211/ieee80211.h
index d110e9333799..bab975f96a09 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211.h
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211.h
@@ -446,26 +446,26 @@ typedef enum _InitialGainOpType {
 extern u32 ieee80211_debug_level;
 #define IEEE80211_DEBUG(level, fmt, args...) \
 do { if (ieee80211_debug_level & (level)) \
-  printk(KERN_DEBUG "ieee80211: " fmt, ## args); } while (0)
+	printk(KERN_DEBUG "ieee80211: " fmt, ## args); } while (0)
 /* wb added to debug out data buf */
 /* if you want print DATA buffer related BA, please set ieee80211_debug_level to DATA|BA */
 #define IEEE80211_DEBUG_DATA(level, data, datalen)	\
-	do { if ((ieee80211_debug_level & (level)) == (level))	\
-		{	\
+	do { \
+		if ((ieee80211_debug_level & (level)) == (level)) {	\
 			int i;					\
 			u8 *pdata = (u8 *) data;			\
 			printk(KERN_DEBUG "ieee80211: %s()\n", __func__);	\
-			for (i = 0; i < (int)(datalen); i++)			\
-			{						\
+			for (i = 0; i < (int)(datalen); i++) {		\
 				printk("%2x ", pdata[i]);		\
-				if ((i + 1) % 16 == 0) printk("\n");	\
+				if ((i + 1) % 16 == 0)	\
+					printk("\n");	\
 			}				\
 			printk("\n");			\
 		}					\
 	} while (0)
 #else
-#define IEEE80211_DEBUG (level, fmt, args...) do {} while (0)
-#define IEEE80211_DEBUG_DATA (level, data, datalen) do {} while(0)
+#define IEEE80211_DEBUG ((level, fmt, args...) do {} while (0))
+#define IEEE80211_DEBUG_DATA ((level, data, datalen) do {} while (0))
 #endif	/* CONFIG_IEEE80211_DEBUG */

 /* debug macros not dependent on CONFIG_IEEE80211_DEBUG */
@@ -1876,7 +1876,7 @@ struct ieee80211_device {
 	struct work_struct associate_procedure_wq;
 	struct delayed_work softmac_scan_wq;
 	struct delayed_work associate_retry_wq;
-	 struct delayed_work start_ibss_wq;
+	struct delayed_work start_ibss_wq;
 	struct work_struct wx_sync_scan_wq;
 	struct workqueue_struct *wq;
 	/* Qos related. Added by Annie, 2005-11-01. */
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_module.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_module.c
index 954e43af494b..7cad5278b862 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_module.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_module.c
@@ -194,6 +194,7 @@ void free_ieee80211(struct net_device *dev)
 {
 	struct ieee80211_device *ieee = netdev_priv(dev);
 	int i;
+
 	kfree(ieee->pHTInfo);
 	ieee->pHTInfo = NULL;
 	RemoveAllTS(ieee);
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
index af8546ad12af..be97ad93ecac 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
@@ -102,18 +102,18 @@ ieee80211_frag_cache_get(struct ieee80211_device *ieee,
 	struct rtl_80211_hdr_4addrqos *hdr_4addrqos;
 	u8 tid;

-	if (((fc & IEEE80211_FCTL_DSTODS) == IEEE80211_FCTL_DSTODS)&&IEEE80211_QOS_HAS_SEQ(fc)) {
-	  hdr_4addrqos = (struct rtl_80211_hdr_4addrqos *)hdr;
-	  tid = le16_to_cpu(hdr_4addrqos->qos_ctl) & IEEE80211_QCTL_TID;
-	  tid = UP2AC(tid);
-	  tid++;
+	if (((fc & IEEE80211_FCTL_DSTODS) == IEEE80211_FCTL_DSTODS) && IEEE80211_QOS_HAS_SEQ(fc)) {
+		hdr_4addrqos = (struct rtl_80211_hdr_4addrqos *)hdr;
+		tid = le16_to_cpu(hdr_4addrqos->qos_ctl) & IEEE80211_QCTL_TID;
+		tid = UP2AC(tid);
+		tid++;
 	} else if (IEEE80211_QOS_HAS_SEQ(fc)) {
-	  hdr_3addrqos = (struct rtl_80211_hdr_3addrqos *)hdr;
-	  tid = le16_to_cpu(hdr_3addrqos->qos_ctl) & IEEE80211_QCTL_TID;
-	  tid = UP2AC(tid);
-	  tid++;
+		hdr_3addrqos = (struct rtl_80211_hdr_3addrqos *)hdr;
+		tid = le16_to_cpu(hdr_3addrqos->qos_ctl) & IEEE80211_QCTL_TID;
+		tid = UP2AC(tid);
+		tid++;
 	} else {
-	  tid = 0;
+		tid = 0;
 	}

 	if (frag == 0) {
@@ -147,7 +147,7 @@ ieee80211_frag_cache_get(struct ieee80211_device *ieee,
 		 * received a fragment of a frame for which the head fragment
 		 * should have already been received
 		 */
-		entry = ieee80211_frag_cache_find(ieee, seq, frag, tid,hdr->addr2,
+		entry = ieee80211_frag_cache_find(ieee, seq, frag, tid, hdr->addr2,
 						  hdr->addr1);
 		if (entry) {
 			entry->last_frag = frag;
@@ -171,18 +171,18 @@ static int ieee80211_frag_cache_invalidate(struct ieee80211_device *ieee,
 	struct rtl_80211_hdr_4addrqos *hdr_4addrqos;
 	u8 tid;

-	if(((fc & IEEE80211_FCTL_DSTODS) == IEEE80211_FCTL_DSTODS)&&IEEE80211_QOS_HAS_SEQ(fc)) {
-	  hdr_4addrqos = (struct rtl_80211_hdr_4addrqos *)hdr;
-	  tid = le16_to_cpu(hdr_4addrqos->qos_ctl) & IEEE80211_QCTL_TID;
-	  tid = UP2AC(tid);
-	  tid++;
+	if (((fc & IEEE80211_FCTL_DSTODS) == IEEE80211_FCTL_DSTODS) && IEEE80211_QOS_HAS_SEQ(fc)) {
+		hdr_4addrqos = (struct rtl_80211_hdr_4addrqos *)hdr;
+		tid = le16_to_cpu(hdr_4addrqos->qos_ctl) & IEEE80211_QCTL_TID;
+		tid = UP2AC(tid);
+		tid++;
 	} else if (IEEE80211_QOS_HAS_SEQ(fc)) {
-	  hdr_3addrqos = (struct rtl_80211_hdr_3addrqos *)hdr;
-	  tid = le16_to_cpu(hdr_3addrqos->qos_ctl) & IEEE80211_QCTL_TID;
-	  tid = UP2AC(tid);
-	  tid++;
+		hdr_3addrqos = (struct rtl_80211_hdr_3addrqos *)hdr;
+		tid = le16_to_cpu(hdr_3addrqos->qos_ctl) & IEEE80211_QCTL_TID;
+		tid = UP2AC(tid);
+		tid++;
 	} else {
-	  tid = 0;
+		tid = 0;
 	}

 	entry = ieee80211_frag_cache_find(ieee, seq, -1, tid, hdr->addr2,
@@ -221,10 +221,10 @@ ieee80211_rx_frame_mgmt(struct ieee80211_device *ieee, struct sk_buff *skb,
 	struct rtl_80211_hdr_3addr *hdr = (struct rtl_80211_hdr_3addr *)skb->data;

 	rx_stats->len = skb->len;
-	ieee80211_rx_mgt(ieee,(struct rtl_80211_hdr_4addr *)skb->data,rx_stats);
-	/* if ((ieee->state == IEEE80211_LINKED) && (memcmp(hdr->addr3, ieee->current_network.bssid, ETH_ALEN))) */
-	if ((memcmp(hdr->addr1, ieee->dev->dev_addr, ETH_ALEN)))/* use ADDR1 to perform address matching for Management frames */
-	{
+	ieee80211_rx_mgt(ieee, (struct rtl_80211_hdr_4addr *)skb->data, rx_stats);
+
+	/* use ADDR1 to perform address matching for Management frames */
+	if ((memcmp(hdr->addr1, ieee->dev->dev_addr, ETH_ALEN))) {
 		dev_kfree_skb_any(skb);
 		return 0;
 	}
@@ -240,9 +240,6 @@ ieee80211_rx_frame_mgmt(struct ieee80211_device *ieee, struct sk_buff *skb,
 		printk(KERN_DEBUG "%s: Master mode not yet supported.\n",
 		       ieee->dev->name);
 		return 0;
-/*
-  hostap_update_sta_ps(ieee, (struct hostap_ieee80211_hdr_4addr *)
-  skb->data);*/
 	}

 	if (ieee->hostapd && type == IEEE80211_TYPE_MGMT) {
@@ -268,7 +265,7 @@ ieee80211_rx_frame_mgmt(struct ieee80211_device *ieee, struct sk_buff *skb,
 		return 0;
 	}

-	    if (ieee->iw_mode == IW_MODE_MASTER) {
+	if (ieee->iw_mode == IW_MODE_MASTER) {
 		if (type != WLAN_FC_TYPE_MGMT && type != WLAN_FC_TYPE_CTRL) {
 			printk(KERN_DEBUG "%s: unknown management frame "
 			       "(type=0x%02x, stype=0x%02x) dropped\n",
@@ -290,11 +287,9 @@ ieee80211_rx_frame_mgmt(struct ieee80211_device *ieee, struct sk_buff *skb,

 /* See IEEE 802.1H for LLC/SNAP encapsulation/decapsulation */
 /* Ethernet-II snap header (RFC1042 for most EtherTypes) */
-static unsigned char rfc1042_header[] =
-{ 0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00 };
+static unsigned char rfc1042_header[] = {0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00};
 /* Bridge-Tunnel header (for EtherTypes ETH_P_AARP and ETH_P_IPX) */
-static unsigned char bridge_tunnel_header[] =
-{ 0xaa, 0xaa, 0x03, 0x00, 0x00, 0xf8 };
+static unsigned char bridge_tunnel_header[] = {0xaa, 0xaa, 0x03, 0x00, 0x00, 0xf8};
 /* No encapsulation header if EtherType < 0x600 (=length) */

 /* Called by ieee80211_rx_frame_decrypt */
@@ -347,9 +342,8 @@ ieee80211_rx_frame_decrypt(struct ieee80211_device *ieee, struct sk_buff *skb,

 	if (!crypt || !crypt->ops->decrypt_mpdu)
 		return 0;
-	if (ieee->hwsec_active)
-	{
-		struct cb_desc *tcb_desc = (struct cb_desc *)(skb->cb+ MAX_DEV_ADDR_SIZE);
+	if (ieee->hwsec_active) {
+		struct cb_desc *tcb_desc = (struct cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE);
 		tcb_desc->bHwSec = 1;
 	}
 	hdr = (struct rtl_80211_hdr_4addr *) skb->data;
@@ -394,9 +388,8 @@ ieee80211_rx_frame_decrypt_msdu(struct ieee80211_device *ieee, struct sk_buff *s

 	if (!crypt || !crypt->ops->decrypt_msdu)
 		return 0;
-	if (ieee->hwsec_active)
-	{
-		struct cb_desc *tcb_desc = (struct cb_desc *)(skb->cb+ MAX_DEV_ADDR_SIZE);
+	if (ieee->hwsec_active) {
+		struct cb_desc *tcb_desc = (struct cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE);
 		tcb_desc->bHwSec = 1;
 	}

@@ -434,18 +427,18 @@ static int is_duplicate_packet(struct ieee80211_device *ieee,


 	/* TO2DS and QoS */
-	if(((fc & IEEE80211_FCTL_DSTODS) == IEEE80211_FCTL_DSTODS)&&IEEE80211_QOS_HAS_SEQ(fc)) {
-	  hdr_4addrqos = (struct rtl_80211_hdr_4addrqos *)header;
-	  tid = le16_to_cpu(hdr_4addrqos->qos_ctl) & IEEE80211_QCTL_TID;
-	  tid = UP2AC(tid);
-	  tid++;
+	if (((fc & IEEE80211_FCTL_DSTODS) == IEEE80211_FCTL_DSTODS) && IEEE80211_QOS_HAS_SEQ(fc)) {
+		hdr_4addrqos = (struct rtl_80211_hdr_4addrqos *)header;
+		tid = le16_to_cpu(hdr_4addrqos->qos_ctl) & IEEE80211_QCTL_TID;
+		tid = UP2AC(tid);
+		tid++;
 	} else if (IEEE80211_QOS_HAS_SEQ(fc)) { /* QoS */
-	  hdr_3addrqos = (struct rtl_80211_hdr_3addrqos *)header;
-	  tid = le16_to_cpu(hdr_3addrqos->qos_ctl) & IEEE80211_QCTL_TID;
-	  tid = UP2AC(tid);
-	  tid++;
+		hdr_3addrqos = (struct rtl_80211_hdr_3addrqos *)header;
+		tid = le16_to_cpu(hdr_3addrqos->qos_ctl) & IEEE80211_QCTL_TID;
+		tid = UP2AC(tid);
+		tid++;
 	} else { /* no QoS */
-	  tid = 0;
+		tid = 0;
 	}

 	switch (ieee->iw_mode) {
@@ -461,7 +454,7 @@ static int is_duplicate_packet(struct ieee80211_device *ieee,
 			if (!memcmp(entry->mac, mac, ETH_ALEN))
 				break;
 		}
-	//	if (memcmp(entry->mac, mac, ETH_ALEN)){
+	//	if (memcmp(entry->mac, mac, ETH_ALEN)) {
 		if (p == &ieee->ibss_mac_hash[index]) {
 			entry = kmalloc(sizeof(struct ieee_ibss_seq), GFP_ATOMIC);
 			if (!entry)
@@ -510,8 +503,7 @@ static int is_duplicate_packet(struct ieee80211_device *ieee,
 static bool AddReorderEntry(struct rx_ts_record *pTS, struct rx_reorder_entry *pReorderEntry)
 {
 	struct list_head *pList = &pTS->rx_pending_pkt_list;
-	while(pList->next != &pTS->rx_pending_pkt_list)
-	{
+	while (pList->next != &pTS->rx_pending_pkt_list) {
 		if (SN_LESS(pReorderEntry->SeqNum, list_entry(pList->next, struct rx_reorder_entry, List)->SeqNum))
 			pList = pList->next;
 		else if (SN_EQUAL(pReorderEntry->SeqNum, list_entry(pList->next, struct rx_reorder_entry, List)->SeqNum))
@@ -527,15 +519,16 @@ static bool AddReorderEntry(struct rx_ts_record *pTS, struct rx_reorder_entry *p
 	return true;
 }

-void ieee80211_indicate_packets(struct ieee80211_device *ieee, struct ieee80211_rxb **prxbIndicateArray,u8  index)
+void ieee80211_indicate_packets(struct ieee80211_device *ieee, struct ieee80211_rxb **prxbIndicateArray, u8 index)
 {
-	u8 i = 0 , j=0;
+	u8 i = 0, j = 0;
 	u16 ethertype;
-	for(j = 0; j<index; j++)
-	{
-/* added by amy for reorder */
+
+	for (j = 0; j < index; j++) {
+		/* added by amy for reorder */
 		struct ieee80211_rxb *prxb = prxbIndicateArray[j];
-		for(i = 0; i<prxb->nr_subframes; i++) {
+
+		for (i = 0; i < prxb->nr_subframes; i++) {
 			struct sk_buff *sub_skb = prxb->subframes[i];

 		/* convert hdr + possible LLC headers into Ethernet header */
@@ -586,7 +579,7 @@ static void RxReorderIndicatePacket(struct ieee80211_device *ieee,
 	u16			WinEnd = (pTS->rx_indicate_seq + WinSize - 1) % 4096;
 	u8			index = 0;
 	bool			bMatchWinStart = false, bPktInBuf = false;
-	IEEE80211_DEBUG(IEEE80211_DL_REORDER,"%s(): Seq is %d,pTS->rx_indicate_seq is %d, WinSize is %d\n",__func__,SeqNum,pTS->rx_indicate_seq,WinSize);
+	IEEE80211_DEBUG(IEEE80211_DL_REORDER, "%s(): Seq is %d,pTS->rx_indicate_seq is %d, WinSize is %d\n", __func__, SeqNum, pTS->rx_indicate_seq, WinSize);

 	prxbIndicateArray = kmalloc_array(REORDER_WIN_SIZE,
 					  sizeof(struct ieee80211_rxb *),
@@ -600,12 +593,12 @@ static void RxReorderIndicatePacket(struct ieee80211_device *ieee,

 	/* Drop out the packet which SeqNum is smaller than WinStart */
 	if (SN_LESS(SeqNum, pTS->rx_indicate_seq)) {
-		IEEE80211_DEBUG(IEEE80211_DL_REORDER,"Packet Drop! IndicateSeq: %d, NewSeq: %d\n",
+		IEEE80211_DEBUG(IEEE80211_DL_REORDER, "Packet Drop! IndicateSeq: %d, NewSeq: %d\n",
 				 pTS->rx_indicate_seq, SeqNum);
 		pHTInfo->RxReorderDropCounter++;
 		{
 			int i;
-			for(i =0; i < prxb->nr_subframes; i++) {
+			for (i = 0; i < prxb->nr_subframes; i++) {
 				dev_kfree_skb(prxb->subframes[i]);
 			}
 			kfree(prxb);
@@ -621,16 +614,16 @@ static void RxReorderIndicatePacket(struct ieee80211_device *ieee,
 	 * 1. Incoming SeqNum is equal to WinStart =>Window shift 1
 	 * 2. Incoming SeqNum is larger than the WinEnd => Window shift N
 	 */
-	if(SN_EQUAL(SeqNum, pTS->rx_indicate_seq)) {
+	if (SN_EQUAL(SeqNum, pTS->rx_indicate_seq)) {
 		pTS->rx_indicate_seq = (pTS->rx_indicate_seq + 1) % 4096;
 		bMatchWinStart = true;
-	} else if(SN_LESS(WinEnd, SeqNum)) {
-		if(SeqNum >= (WinSize - 1)) {
-			pTS->rx_indicate_seq = SeqNum + 1 -WinSize;
+	} else if (SN_LESS(WinEnd, SeqNum)) {
+		if (SeqNum >= (WinSize - 1)) {
+			pTS->rx_indicate_seq = SeqNum + 1 - WinSize;
 		} else {
 			pTS->rx_indicate_seq = 4095 - (WinSize - (SeqNum + 1)) + 1;
 		}
-		IEEE80211_DEBUG(IEEE80211_DL_REORDER, "Window Shift! IndicateSeq: %d, NewSeq: %d\n",pTS->rx_indicate_seq, SeqNum);
+		IEEE80211_DEBUG(IEEE80211_DL_REORDER, "Window Shift! IndicateSeq: %d, NewSeq: %d\n", pTS->rx_indicate_seq, SeqNum);
 	}

 	/*
@@ -643,15 +636,15 @@ static void RxReorderIndicatePacket(struct ieee80211_device *ieee,
 	 * 1. All packets with SeqNum smaller than WinStart => Indicate
 	 * 2. All packets with SeqNum larger than or equal to WinStart => Buffer it.
 	 */
-	if(bMatchWinStart) {
+	if (bMatchWinStart) {
 		/* Current packet is going to be indicated.*/
-		IEEE80211_DEBUG(IEEE80211_DL_REORDER, "Packets indication!! IndicateSeq: %d, NewSeq: %d\n",\
+		IEEE80211_DEBUG(IEEE80211_DL_REORDER, "Packets indication!! IndicateSeq: %d, NewSeq: %d\n",
 				pTS->rx_indicate_seq, SeqNum);
 		prxbIndicateArray[0] = prxb;
 		index = 1;
 	} else {
 		/* Current packet is going to be inserted into pending list.*/
-		if(!list_empty(&ieee->RxReorder_Unused_List)) {
+		if (!list_empty(&ieee->RxReorder_Unused_List)) {
 			pReorderEntry = list_entry(ieee->RxReorder_Unused_List.next, struct rx_reorder_entry, List);
 			list_del_init(&pReorderEntry->List);

@@ -659,13 +652,14 @@ static void RxReorderIndicatePacket(struct ieee80211_device *ieee,
 			pReorderEntry->SeqNum = SeqNum;
 			pReorderEntry->prxb = prxb;

-			if(!AddReorderEntry(pTS, pReorderEntry)) {
+			if (!AddReorderEntry(pTS, pReorderEntry)) {
 				IEEE80211_DEBUG(IEEE80211_DL_REORDER, "%s(): Duplicate packet is dropped!! IndicateSeq: %d, NewSeq: %d\n",
 					__func__, pTS->rx_indicate_seq, SeqNum);
-				list_add_tail(&pReorderEntry->List,&ieee->RxReorder_Unused_List);
+				list_add_tail(&pReorderEntry->List, &ieee->RxReorder_Unused_List);
 				{
 					int i;
-					for(i =0; i < prxb->nr_subframes; i++) {
+
+					for (i = 0; i < prxb->nr_subframes; i++) {
 						dev_kfree_skb(prxb->subframes[i]);
 					}
 					kfree(prxb);
@@ -673,10 +667,9 @@ static void RxReorderIndicatePacket(struct ieee80211_device *ieee,
 				}
 			} else {
 				IEEE80211_DEBUG(IEEE80211_DL_REORDER,
-					 "Pkt insert into buffer!! IndicateSeq: %d, NewSeq: %d\n",pTS->rx_indicate_seq, SeqNum);
+					 "Pkt insert into buffer!! IndicateSeq: %d, NewSeq: %d\n", pTS->rx_indicate_seq, SeqNum);
 			}
-		}
-		else {
+		} else {
 			/*
 			 * Packets are dropped if there is not enough reorder entries.
 			 * This part shall be modified!! We can just indicate all the
@@ -685,7 +678,8 @@ static void RxReorderIndicatePacket(struct ieee80211_device *ieee,
 			IEEE80211_DEBUG(IEEE80211_DL_ERR, "RxReorderIndicatePacket(): There is no reorder entry!! Packet is dropped!!\n");
 			{
 				int i;
-				for(i =0; i < prxb->nr_subframes; i++) {
+
+				for (i = 0; i < prxb->nr_subframes; i++) {
 					dev_kfree_skb(prxb->subframes[i]);
 				}
 				kfree(prxb);
@@ -695,29 +689,28 @@ static void RxReorderIndicatePacket(struct ieee80211_device *ieee,
 	}

 	/* Check if there is any packet need indicate.*/
-	while(!list_empty(&pTS->rx_pending_pkt_list)) {
-		IEEE80211_DEBUG(IEEE80211_DL_REORDER,"%s(): start RREORDER indicate\n",__func__);
+	while (!list_empty(&pTS->rx_pending_pkt_list)) {
+		IEEE80211_DEBUG(IEEE80211_DL_REORDER, "%s(): start RREORDER indicate\n", __func__);
 		pReorderEntry = list_entry(pTS->rx_pending_pkt_list.prev, struct rx_reorder_entry, List);
 		if (SN_LESS(pReorderEntry->SeqNum, pTS->rx_indicate_seq) ||
-		    SN_EQUAL(pReorderEntry->SeqNum, pTS->rx_indicate_seq))
-		{
+			SN_EQUAL(pReorderEntry->SeqNum, pTS->rx_indicate_seq)) {
 			/* This protect buffer from overflow. */
 			if (index >= REORDER_WIN_SIZE) {
-				IEEE80211_DEBUG(IEEE80211_DL_ERR, "RxReorderIndicatePacket(): Buffer overflow!! \n");
+				IEEE80211_DEBUG(IEEE80211_DL_ERR, "RxReorderIndicatePacket(): Buffer overflow!!\n");
 				bPktInBuf = true;
 				break;
 			}

 			list_del_init(&pReorderEntry->List);

-			if(SN_EQUAL(pReorderEntry->SeqNum, pTS->rx_indicate_seq))
+			if (SN_EQUAL(pReorderEntry->SeqNum, pTS->rx_indicate_seq))
 				pTS->rx_indicate_seq = (pTS->rx_indicate_seq + 1) % 4096;

-			IEEE80211_DEBUG(IEEE80211_DL_REORDER,"Packets indication!! IndicateSeq: %d, NewSeq: %d\n",pTS->rx_indicate_seq, SeqNum);
+			IEEE80211_DEBUG(IEEE80211_DL_REORDER, "Packets indication!! IndicateSeq: %d, NewSeq: %d\n", pTS->rx_indicate_seq, SeqNum);
 			prxbIndicateArray[index] = pReorderEntry->prxb;
 			index++;

-			list_add_tail(&pReorderEntry->List,&ieee->RxReorder_Unused_List);
+			list_add_tail(&pReorderEntry->List, &ieee->RxReorder_Unused_List);
 		} else {
 			bPktInBuf = true;
 			break;
@@ -725,13 +718,13 @@ static void RxReorderIndicatePacket(struct ieee80211_device *ieee,
 	}

 	/* Handling pending timer. Set this timer to prevent from long time Rx buffering.*/
-	if (index>0) {
+	if (index > 0) {
 		/* Cancel previous pending timer. */
 		pTS->rx_timeout_indicate_seq = 0xffff;

 		/* Indicate packets */
-		if(index>REORDER_WIN_SIZE){
-			IEEE80211_DEBUG(IEEE80211_DL_ERR, "RxReorderIndicatePacket(): Rx Reorder buffer full!! \n");
+		if (index > REORDER_WIN_SIZE) {
+			IEEE80211_DEBUG(IEEE80211_DL_ERR, "RxReorderIndicatePacket(): Rx Reorder buffer full!!\n");
 			kfree(prxbIndicateArray);
 			return;
 		}
@@ -740,9 +733,9 @@ static void RxReorderIndicatePacket(struct ieee80211_device *ieee,

 	if (bPktInBuf && pTS->rx_timeout_indicate_seq == 0xffff) {
 		/* Set new pending timer. */
-		IEEE80211_DEBUG(IEEE80211_DL_REORDER,"%s(): SET rx timeout timer\n", __func__);
+		IEEE80211_DEBUG(IEEE80211_DL_REORDER, "%s(): SET rx timeout timer\n", __func__);
 		pTS->rx_timeout_indicate_seq = pTS->rx_indicate_seq;
-		if(timer_pending(&pTS->rx_pkt_pending_timer))
+		if (timer_pending(&pTS->rx_pkt_pending_timer))
 			del_timer_sync(&pTS->rx_pkt_pending_timer);
 		pTS->rx_pkt_pending_timer.expires = jiffies +
 				msecs_to_jiffies(pHTInfo->RxReorderPendingTime);
@@ -759,18 +752,18 @@ static u8 parse_subframe(struct sk_buff *skb,
 	struct rtl_80211_hdr_3addr  *hdr = (struct rtl_80211_hdr_3addr *)skb->data;
 	u16		fc = le16_to_cpu(hdr->frame_ctl);

-	u16		LLCOffset= sizeof(struct rtl_80211_hdr_3addr);
+	u16		LLCOffset = sizeof(struct rtl_80211_hdr_3addr);
 	u16		ChkLength;
 	bool		bIsAggregateFrame = false;
 	u16		nSubframe_Length;
 	u8		nPadding_Length = 0;
-	u16		SeqNum=0;
+	u16		SeqNum = 0;

 	struct sk_buff *sub_skb;
 	/* just for debug purpose */
 	SeqNum = WLAN_GET_SEQ_SEQ(le16_to_cpu(hdr->seq_ctl));

-	if ((IEEE80211_QOS_HAS_SEQ(fc))&&\
+	if ((IEEE80211_QOS_HAS_SEQ(fc)) && \
 			(((frameqos *)(skb->data + IEEE80211_3ADDR_LEN))->field.reserved)) {
 		bIsAggregateFrame = true;
 	}
@@ -790,7 +783,7 @@ static u8 parse_subframe(struct sk_buff *skb,

 	skb_pull(skb, LLCOffset);

-	if(!bIsAggregateFrame) {
+	if (!bIsAggregateFrame) {
 		rxb->nr_subframes = 1;
 #ifdef JOHN_NOCPY
 		rxb->subframes[0] = skb;
@@ -798,25 +791,25 @@ static u8 parse_subframe(struct sk_buff *skb,
 		rxb->subframes[0] = skb_copy(skb, GFP_ATOMIC);
 #endif

-		memcpy(rxb->src,src,ETH_ALEN);
-		memcpy(rxb->dst,dst,ETH_ALEN);
+		memcpy(rxb->src, src, ETH_ALEN);
+		memcpy(rxb->dst, dst, ETH_ALEN);
 		return 1;
 	} else {
 		rxb->nr_subframes = 0;
-		memcpy(rxb->src,src,ETH_ALEN);
-		memcpy(rxb->dst,dst,ETH_ALEN);
-		while(skb->len > ETHERNET_HEADER_SIZE) {
+		memcpy(rxb->src, src, ETH_ALEN);
+		memcpy(rxb->dst, dst, ETH_ALEN);
+		while (skb->len > ETHERNET_HEADER_SIZE) {
 			/* Offset 12 denote 2 mac address */
 			nSubframe_Length = *((u16 *)(skb->data + 12));
 			/* ==m==>change the length order */
 			nSubframe_Length = (nSubframe_Length>>8) + (nSubframe_Length<<8);

-			if (skb->len<(ETHERNET_HEADER_SIZE + nSubframe_Length)) {
+			if (skb->len < (ETHERNET_HEADER_SIZE + nSubframe_Length)) {
 				printk("%s: A-MSDU parse error!! pRfd->nTotalSubframe : %d\n",\
 						__func__, rxb->nr_subframes);
-				printk("%s: A-MSDU parse error!! Subframe Length: %d\n",__func__, nSubframe_Length);
-				printk("nRemain_Length is %d and nSubframe_Length is : %d\n",skb->len,nSubframe_Length);
-				printk("The Packet SeqNum is %d\n",SeqNum);
+				printk("%s: A-MSDU parse error!! Subframe Length: %d\n", __func__, nSubframe_Length);
+				printk("nRemain_Length is %d and nSubframe_Length is : %d\n", skb->len, nSubframe_Length);
+				printk("The Packet SeqNum is %d\n", SeqNum);
 				return 0;
 			}

@@ -918,9 +911,8 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
 	frag = WLAN_GET_SEQ_FRAG(sc);
 	hdrlen = ieee80211_get_hdrlen(fc);

-	if (HTCCheck(ieee, skb->data))
-	{
-		if(net_ratelimit())
+	if (HTCCheck(ieee, skb->data)) {
+		if (net_ratelimit())
 			printk("find HTCControl\n");
 		hdrlen += 4;
 		rx_stats->bContainHTC = true;
@@ -935,6 +927,7 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
 	/* If spy monitoring on */
 	if (iface->spy_data.spy_number > 0) {
 		struct iw_quality wstats;
+
 		wstats.level = rx_stats->rssi;
 		wstats.noise = rx_stats->noise;
 		wstats.updated = 6;	/* No qual value */
@@ -954,6 +947,7 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,

 	if (ieee->host_decrypt) {
 		int idx = 0;
+
 		if (skb->len >= hdrlen + 3)
 			idx = skb->data[hdrlen + 3] >> 6;
 		crypt = ieee->crypt[idx];
@@ -1000,43 +994,35 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
 		goto rx_dropped;

 	/* if QoS enabled, should check the sequence for each of the AC */
-	if ((!ieee->pHTInfo->bCurRxReorderEnable) || !ieee->current_network.qos_data.active|| !IsDataFrame(skb->data) || IsLegacyDataFrame(skb->data)) {
+	if ((!ieee->pHTInfo->bCurRxReorderEnable) || !ieee->current_network.qos_data.active || !IsDataFrame(skb->data) || IsLegacyDataFrame(skb->data)) {
 		if (is_duplicate_packet(ieee, hdr))
 		goto rx_dropped;

-	}
-	else
-	{
+	} else {
 		struct rx_ts_record *pRxTS = NULL;
-		if(GetTs(
+
+		if (GetTs(
 				ieee,
 				(struct ts_common_info **) &pRxTS,
 				hdr->addr2,
 				Frame_QoSTID((u8 *)(skb->data)),
 				RX_DIR,
-				true))
-		{
-
+				true)) {
 			if ((fc & (1<<11)) &&
 			    (frag == pRxTS->rx_last_frag_num) &&
 			    (WLAN_GET_SEQ_SEQ(sc) == pRxTS->rx_last_seq_num)) {
 				goto rx_dropped;
-			}
-			else
-			{
+			} else {
 				pRxTS->rx_last_frag_num = frag;
 				pRxTS->rx_last_seq_num = WLAN_GET_SEQ_SEQ(sc);
 			}
-		}
-		else
-		{
-			IEEE80211_DEBUG(IEEE80211_DL_ERR, "%s(): No TS!! Skip the check!!\n",__func__);
+		} else {
+			IEEE80211_DEBUG(IEEE80211_DL_ERR, "%s(): No TS!! Skip the check!!\n", __func__);
 			goto rx_dropped;
 		}
 	}
 	if (type == IEEE80211_FTYPE_MGMT) {

-
 		if (ieee80211_rx_frame_mgmt(ieee, skb, rx_stats, type, stype))
 			goto rx_dropped;
 		else
@@ -1109,7 +1095,7 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
 	if (stype != IEEE80211_STYPE_DATA &&
 	    stype != IEEE80211_STYPE_DATA_CFACK &&
 	    stype != IEEE80211_STYPE_DATA_CFPOLL &&
-	    stype != IEEE80211_STYPE_DATA_CFACKPOLL&&
+	    stype != IEEE80211_STYPE_DATA_CFACKPOLL &&
 	    stype != IEEE80211_STYPE_QOS_DATA/* add by David,2006.8.4 */
 	    ) {
 		if (stype != IEEE80211_STYPE_NULLFUNC)
@@ -1125,9 +1111,8 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,

 	/* skb: hdr + (possibly fragmented, possibly encrypted) payload */

-	if (ieee->host_decrypt && (fc & IEEE80211_FCTL_WEP) &&
-	    (keyidx = ieee80211_rx_frame_decrypt(ieee, skb, crypt)) < 0)
-	{
+	keyidx = ieee80211_rx_frame_decrypt(ieee, skb, crypt);
+	if (ieee->host_decrypt && (fc & IEEE80211_FCTL_WEP) && keyidx < 0) {
 		printk("decrypt frame error\n");
 		goto rx_dropped;
 	}
@@ -1137,10 +1122,10 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,

 	/* skb: hdr + (possibly fragmented) plaintext payload */
 	/* PR: FIXME: hostap has additional conditions in the "if" below: */
-	// ieee->host_decrypt && (fc & IEEE80211_FCTL_WEP) &&
 	if ((frag != 0 || (fc & IEEE80211_FCTL_MOREFRAGS))) {
 		int flen;
 		struct sk_buff *frag_skb = ieee80211_frag_cache_get(ieee, hdr);
+
 		IEEE80211_DEBUG_FRAG("Rx Fragment received (%u)\n", frag);

 		if (!frag_skb) {
@@ -1202,8 +1187,7 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
 	 * encrypted/authenticated
 	 */
 	if (ieee->host_decrypt && (fc & IEEE80211_FCTL_WEP) &&
-	    ieee80211_rx_frame_decrypt_msdu(ieee, skb, keyidx, crypt))
-	{
+	    ieee80211_rx_frame_decrypt_msdu(ieee, skb, keyidx, crypt)) {
 		printk("==>decrypt msdu error\n");
 		goto rx_dropped;
 	}
@@ -1255,20 +1239,14 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
 			hdr->addr2);
 		goto rx_dropped;
 	}
-/*
-	if(ieee80211_is_eapol_frame(ieee, skb, hdrlen)) {
-		printk(KERN_WARNING "RX: IEEE802.1X EPAOL frame!\n");
-	}
-*/
-/* added by amy for reorder */
+
+	/* added by amy for reorder */
 	if (ieee->current_network.qos_data.active && IsQoSDataFrame(skb->data)
-		&& !is_multicast_ether_addr(hdr->addr1))
-	{
+		&& !is_multicast_ether_addr(hdr->addr1)) {
 		TID = Frame_QoSTID(skb->data);
 		SeqNum = WLAN_GET_SEQ_SEQ(sc);
-		GetTs(ieee,(struct ts_common_info **) &pTS,hdr->addr2,TID,RX_DIR,true);
-		if (TID !=0 && TID !=3)
-		{
+		GetTs(ieee, (struct ts_common_info **) &pTS, hdr->addr2, TID, RX_DIR, true);
+		if (TID != 0 && TID != 3) {
 			ieee->bis_any_nonbepkts = true;
 		}
 	}
@@ -1282,7 +1260,7 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
 	/* qos data packets & reserved bit is 1 */
 	if (parse_subframe(skb, rx_stats, rxb, src, dst) == 0) {
 		/* only to free rxb, and not submit the packets to upper layer */
-		for(i =0; i < rxb->nr_subframes; i++) {
+		for (i = 0; i < rxb->nr_subframes; i++) {
 			dev_kfree_skb(rxb->subframes[i]);
 		}
 		kfree(rxb);
@@ -1293,7 +1271,7 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
 /* added by amy for reorder */
 	if (!ieee->pHTInfo->bCurRxReorderEnable || !pTS) {
 /* added by amy for reorder */
-		for(i = 0; i<rxb->nr_subframes; i++) {
+		for (i = 0; i < rxb->nr_subframes; i++) {
 			struct sk_buff *sub_skb = rxb->subframes[i];

 			if (sub_skb) {
@@ -1338,10 +1316,8 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
 		kfree(rxb);
 		rxb = NULL;

-	}
-	else
-	{
-		IEEE80211_DEBUG(IEEE80211_DL_REORDER,"%s(): REORDER ENABLE AND PTS not NULL, and we will enter RxReorderIndicatePacket()\n",__func__);
+	} else {
+		IEEE80211_DEBUG(IEEE80211_DL_REORDER, "%s(): REORDER ENABLE AND PTS not NULL, and we will enter RxReorderIndicatePacket()\n", __func__);
 		RxReorderIndicatePacket(ieee, rxb, pTS, SeqNum);
 	}
 #ifndef JOHN_NOCPY
@@ -1374,9 +1350,9 @@ EXPORT_SYMBOL(ieee80211_rx);
 static u8 qos_oui[QOS_OUI_LEN] = { 0x00, 0x50, 0xF2 };

 /*
-* Make the structure we read from the beacon packet to have
-* the right values
-*/
+ * Make the structure we read from the beacon packet to have
+ * the right values
+ */
 static int ieee80211_verify_qos_info(struct ieee80211_qos_information_element
 				     *info_element, int sub_type)
 {
@@ -1469,12 +1445,12 @@ static int ieee80211_qos_convert_ac_to_parameters(struct

 		aci = (ac_params->aci_aifsn & 0x60) >> 5;

-		if(aci >= QOS_QUEUE_NUM)
+		if (aci >= QOS_QUEUE_NUM)
 			continue;
 		qos_param->aifs[aci] = (ac_params->aci_aifsn) & 0x0f;

 		/* WMM spec P.11: The minimum value for AIFSN shall be 2 */
-		qos_param->aifs[aci] = (qos_param->aifs[aci] < 2) ? 2:qos_param->aifs[aci];
+		qos_param->aifs[aci] = (qos_param->aifs[aci] < 2) ? 2 : qos_param->aifs[aci];

 		qos_param->cw_min[aci] =
 		    cpu_to_le16(ac_params->ecw_min_max & 0x0F);
@@ -1574,15 +1550,12 @@ static inline void ieee80211_extract_country_ie(
 	u8 *addr2
 )
 {
-	if (IS_DOT11D_ENABLE(ieee))
-	{
-		if (info_element->len!= 0)
-		{
+	if (IS_DOT11D_ENABLE(ieee)) {
+		if (info_element->len != 0) {
 			memcpy(network->CountryIeBuf, info_element->data, info_element->len);
 			network->CountryIeLen = info_element->len;

-			if (!IS_COUNTRY_IE_VALID(ieee))
-			{
+			if (!IS_COUNTRY_IE_VALID(ieee)) {
 				dot11d_update_country_ie(ieee, addr2, info_element->len, info_element->data);
 			}
 		}
@@ -1592,8 +1565,7 @@ static inline void ieee80211_extract_country_ie(
 		 * some AP (e.g. Cisco 1242) don't include country IE in their
 		 * probe response frame.
 		 */
-		if (IS_EQUAL_CIE_SRC(ieee, addr2) )
-		{
+		if (IS_EQUAL_CIE_SRC(ieee, addr2)) {
 			UPDATE_CIE_WATCHDOG(ieee);
 		}
 	}
@@ -1608,9 +1580,9 @@ int ieee80211_parse_info_param(struct ieee80211_device *ieee,
 {
 	u8 i;
 	short offset;
-	u16	tmp_htcap_len=0;
-	u16	tmp_htinfo_len=0;
-	u16 ht_realtek_agg_len=0;
+	u16	tmp_htcap_len = 0;
+	u16	tmp_htinfo_len = 0;
+	u16 ht_realtek_agg_len = 0;
 	u8  ht_realtek_agg_buf[MAX_IE_LEN];
 #ifdef CONFIG_IEEE80211_DEBUG
 	char rates_str[64];
@@ -1721,14 +1693,14 @@ int ieee80211_parse_info_param(struct ieee80211_device *ieee,
 			break;

 		case MFIE_TYPE_TIM:
-			if(info_element->len < 4)
+			if (info_element->len < 4)
 				break;

 			network->tim.tim_count = info_element->data[0];
 			network->tim.tim_period = info_element->data[1];

 			network->dtim_period = info_element->data[1];
-			if(ieee->state != IEEE80211_LINKED)
+			if (ieee->state != IEEE80211_LINKED)
 				break;

 			network->last_dtim_sta_time[0] = stats->mac_time[0];
@@ -1736,22 +1708,22 @@ int ieee80211_parse_info_param(struct ieee80211_device *ieee,

 			network->dtim_data = IEEE80211_DTIM_VALID;

-			if(info_element->data[0] != 0)
+			if (info_element->data[0] != 0)
 				break;

-			if(info_element->data[2] & 1)
+			if (info_element->data[2] & 1)
 				network->dtim_data |= IEEE80211_DTIM_MBCAST;

 			offset = (info_element->data[2] >> 1)*2;

-			if(ieee->assoc_id < 8*offset ||
-				ieee->assoc_id > 8*(offset + info_element->len -3))
+			if (ieee->assoc_id < 8*offset ||
+				ieee->assoc_id > 8*(offset + info_element->len - 3))

 				break;

 			offset = (ieee->assoc_id / 8) - offset;

-			if(info_element->data[3+offset] & (1<<(ieee->assoc_id%8)))
+			if (info_element->data[3+offset] & (1<<(ieee->assoc_id%8)))
 				network->dtim_data |= IEEE80211_DTIM_UCAST;

 			break;
@@ -1793,52 +1765,52 @@ int ieee80211_parse_info_param(struct ieee80211_device *ieee,

 #ifdef THOMAS_TURBO
 			if (info_element->len == 7 &&
-			    info_element->data[0] == 0x00 &&
-			    info_element->data[1] == 0xe0 &&
-			    info_element->data[2] == 0x4c &&
-			    info_element->data[3] == 0x01 &&
-			    info_element->data[4] == 0x02) {
-				network->Turbo_Enable = 1;
+				info_element->data[0] == 0x00 &&
+				info_element->data[1] == 0xe0 &&
+				info_element->data[2] == 0x4c &&
+				info_element->data[3] == 0x01 &&
+				info_element->data[4] == 0x02) {
+					network->Turbo_Enable = 1;
 			}
 #endif

 			/* for HTcap and HTinfo parameters */
-			if(tmp_htcap_len == 0){
-				if(info_element->len >= 4 &&
-				   info_element->data[0] == 0x00 &&
-				   info_element->data[1] == 0x90 &&
-				   info_element->data[2] == 0x4c &&
-				   info_element->data[3] == 0x033){
-
-						tmp_htcap_len = min(info_element->len,(u8)MAX_IE_LEN);
-						if(tmp_htcap_len != 0){
+			if (tmp_htcap_len == 0) {
+				if (info_element->len >= 4 &&
+					info_element->data[0] == 0x00 &&
+					info_element->data[1] == 0x90 &&
+					info_element->data[2] == 0x4c &&
+					info_element->data[3] == 0x033) {
+
+						tmp_htcap_len = min(info_element->len, (u8)MAX_IE_LEN);
+						if (tmp_htcap_len != 0) {
 							network->bssht.bdHTSpecVer = HT_SPEC_VER_EWC;
-							network->bssht.bdHTCapLen = tmp_htcap_len > sizeof(network->bssht.bdHTCapBuf)?\
+							network->bssht.bdHTCapLen = tmp_htcap_len > sizeof(network->bssht.bdHTCapBuf) ? \
 								sizeof(network->bssht.bdHTCapBuf):tmp_htcap_len;
-							memcpy(network->bssht.bdHTCapBuf,info_element->data,network->bssht.bdHTCapLen);
+							memcpy(network->bssht.bdHTCapBuf, info_element->data, network->bssht.bdHTCapLen);
 						}
 				}
-				if(tmp_htcap_len != 0)
+				if (tmp_htcap_len != 0)
 					network->bssht.bdSupportHT = true;
 				else
 					network->bssht.bdSupportHT = false;
 			}


-			if(tmp_htinfo_len == 0){
-				if(info_element->len >= 4 &&
+			if (tmp_htinfo_len == 0) {
+				if (info_element->len >= 4 &&
 					info_element->data[0] == 0x00 &&
 					info_element->data[1] == 0x90 &&
 					info_element->data[2] == 0x4c &&
-					info_element->data[3] == 0x034){
+					info_element->data[3] == 0x034) {

-						tmp_htinfo_len = min(info_element->len,(u8)MAX_IE_LEN);
-						if(tmp_htinfo_len != 0){
+						tmp_htinfo_len = min(info_element->len, (u8)MAX_IE_LEN);
+						if (tmp_htinfo_len != 0) {
 							network->bssht.bdHTSpecVer = HT_SPEC_VER_EWC;
-							if(tmp_htinfo_len){
-								network->bssht.bdHTInfoLen = tmp_htinfo_len > sizeof(network->bssht.bdHTInfoBuf)?\
+							if (tmp_htinfo_len) {
+								network->bssht.bdHTInfoLen = tmp_htinfo_len > sizeof(network->bssht.bdHTInfoBuf) ? \
 									sizeof(network->bssht.bdHTInfoBuf):tmp_htinfo_len;
-								memcpy(network->bssht.bdHTInfoBuf,info_element->data,network->bssht.bdHTInfoLen);
+								memcpy(network->bssht.bdHTInfoBuf, info_element->data, network->bssht.bdHTInfoLen);
 							}

 						}
@@ -1846,29 +1818,29 @@ int ieee80211_parse_info_param(struct ieee80211_device *ieee,
 				}
 			}

-			if(ieee->aggregation){
-				if(network->bssht.bdSupportHT){
-					if(info_element->len >= 4 &&
+			if (ieee->aggregation) {
+				if (network->bssht.bdSupportHT) {
+					if (info_element->len >= 4 &&
 						info_element->data[0] == 0x00 &&
 						info_element->data[1] == 0xe0 &&
 						info_element->data[2] == 0x4c &&
-						info_element->data[3] == 0x02){
+						info_element->data[3] == 0x02) {

-						ht_realtek_agg_len = min(info_element->len,(u8)MAX_IE_LEN);
-						memcpy(ht_realtek_agg_buf,info_element->data,info_element->len);
+						ht_realtek_agg_len = min(info_element->len, (u8)MAX_IE_LEN);
+						memcpy(ht_realtek_agg_buf, info_element->data, info_element->len);

 					}
-					if(ht_realtek_agg_len >= 5){
+					if (ht_realtek_agg_len >= 5) {
 						network->bssht.bdRT2RTAggregation = true;

-						if((ht_realtek_agg_buf[4] == 1) && (ht_realtek_agg_buf[5] & 0x02))
+						if ((ht_realtek_agg_buf[4] == 1) && (ht_realtek_agg_buf[5] & 0x02))
 						network->bssht.bdRT2RTLongSlotTime = true;
 					}
 				}

 			}

-			//if(tmp_htcap_len !=0  ||  tmp_htinfo_len != 0)
+			//if (tmp_htcap_len !=0  ||  tmp_htinfo_len != 0)
 			{
 				if ((info_element->len >= 3 &&
 					 info_element->data[0] == 0x00 &&
@@ -1881,80 +1853,65 @@ int ieee80211_parse_info_param(struct ieee80211_device *ieee,
 					 (info_element->len >= 3 &&
 					 info_element->data[0] == 0x00 &&
 					 info_element->data[1] == 0x10 &&
-					 info_element->data[2] == 0x18)){
+					 info_element->data[2] == 0x18)) {

 						network->broadcom_cap_exist = true;

 				}
 			}
-			if(info_element->len >= 3 &&
+			if (info_element->len >= 3 &&
 				info_element->data[0] == 0x00 &&
 				info_element->data[1] == 0x0c &&
-				info_element->data[2] == 0x43)
-			{
+				info_element->data[2] == 0x43) {
 				network->ralink_cap_exist = true;
-			}
-			else
+			} else
 				network->ralink_cap_exist = false;
 			/* added by amy for atheros AP */
-			if((info_element->len >= 3 &&
+			if ((info_element->len >= 3 &&
 				info_element->data[0] == 0x00 &&
 				info_element->data[1] == 0x03 &&
 				info_element->data[2] == 0x7f) ||
 				(info_element->len >= 3 &&
 				info_element->data[0] == 0x00 &&
 				info_element->data[1] == 0x13 &&
-				info_element->data[2] == 0x74))
-			{
-				printk("========>%s(): athros AP is exist\n",__func__);
+				info_element->data[2] == 0x74)) {
+				printk("========>%s(): athros AP is exist\n", __func__);
 				network->atheros_cap_exist = true;
-			}
-			else
+			} else
 				network->atheros_cap_exist = false;

-			if(info_element->len >= 3 &&
+			if (info_element->len >= 3 &&
 				info_element->data[0] == 0x00 &&
 				info_element->data[1] == 0x40 &&
-				info_element->data[2] == 0x96)
-			{
+				info_element->data[2] == 0x96) {
 				network->cisco_cap_exist = true;
-			}
-			else
+			} else
 				network->cisco_cap_exist = false;
 			/* added by amy for LEAP of cisco */
 			if (info_element->len > 4 &&
 				info_element->data[0] == 0x00 &&
 				info_element->data[1] == 0x40 &&
 				info_element->data[2] == 0x96 &&
-				info_element->data[3] == 0x01)
-			{
-				if(info_element->len == 6)
-				{
+				info_element->data[3] == 0x01) {
+				if (info_element->len == 6) {
 					memcpy(network->CcxRmState, &info_element[4], 2);
-					if(network->CcxRmState[0] != 0)
-					{
+					if (network->CcxRmState[0] != 0) {
 						network->bCcxRmEnable = true;
-					}
-					else
+					} else
 						network->bCcxRmEnable = false;
 					/*
 					 * CCXv4 Table 59-1 MBSSID Masks.
 					 */
 					network->MBssidMask = network->CcxRmState[1] & 0x07;
-					if(network->MBssidMask != 0)
-					{
+					if (network->MBssidMask != 0) {
 						network->bMBssidValid = true;
 						network->MBssidMask = 0xff << (network->MBssidMask);
 						ether_addr_copy(network->MBssid, network->bssid);
 						network->MBssid[5] &= network->MBssidMask;
-					}
-					else
-					{
+					} else {
 						network->bMBssidValid = false;
 					}
-				}
-				else
-				{
+				} else {
 					network->bCcxRmEnable = false;
 				}
 			}
@@ -1962,15 +1919,11 @@ int ieee80211_parse_info_param(struct ieee80211_device *ieee,
 				info_element->data[0] == 0x00 &&
 				info_element->data[1] == 0x40 &&
 				info_element->data[2] == 0x96 &&
-				info_element->data[3] == 0x03)
-			{
-				if(info_element->len == 5)
-				{
+				info_element->data[3] == 0x03) {
+				if (info_element->len == 5) {
 					network->bWithCcxVerNum = true;
 					network->BssCcxVerNumber = info_element->data[4];
-				}
-				else
-				{
+				} else {
 					network->bWithCcxVerNum = false;
 					network->BssCcxVerNumber = 0;
 				}
@@ -1990,12 +1943,12 @@ int ieee80211_parse_info_param(struct ieee80211_device *ieee,
 		case MFIE_TYPE_HT_CAP:
 			IEEE80211_DEBUG_SCAN("MFIE_TYPE_HT_CAP: %d bytes\n",
 					     info_element->len);
-			tmp_htcap_len = min(info_element->len,(u8)MAX_IE_LEN);
-			if(tmp_htcap_len != 0){
+			tmp_htcap_len = min(info_element->len, (u8)MAX_IE_LEN);
+			if (tmp_htcap_len != 0) {
 				network->bssht.bdHTSpecVer = HT_SPEC_VER_EWC;
-				network->bssht.bdHTCapLen = tmp_htcap_len > sizeof(network->bssht.bdHTCapBuf)?\
+				network->bssht.bdHTCapLen = tmp_htcap_len > sizeof(network->bssht.bdHTCapBuf) ? \
 					sizeof(network->bssht.bdHTCapBuf):tmp_htcap_len;
-				memcpy(network->bssht.bdHTCapBuf,info_element->data,network->bssht.bdHTCapLen);
+				memcpy(network->bssht.bdHTCapBuf, info_element->data, network->bssht.bdHTCapLen);

 				/*
 				 * If peer is HT, but not WMM, call QosSetLegacyWMMParamWithHT()
@@ -2003,8 +1956,7 @@ int ieee80211_parse_info_param(struct ieee80211_device *ieee,
 				 * Linux driver is a bit different.
 				 */
 				network->bssht.bdSupportHT = true;
-			}
-			else
+			} else
 				network->bssht.bdSupportHT = false;
 			break;

@@ -2012,20 +1964,19 @@ int ieee80211_parse_info_param(struct ieee80211_device *ieee,
 		case MFIE_TYPE_HT_INFO:
 			IEEE80211_DEBUG_SCAN("MFIE_TYPE_HT_INFO: %d bytes\n",
 					     info_element->len);
-			tmp_htinfo_len = min(info_element->len,(u8)MAX_IE_LEN);
-			if(tmp_htinfo_len){
+			tmp_htinfo_len = min(info_element->len, (u8)MAX_IE_LEN);
+			if (tmp_htinfo_len) {
 				network->bssht.bdHTSpecVer = HT_SPEC_VER_IEEE;
-				network->bssht.bdHTInfoLen = tmp_htinfo_len > sizeof(network->bssht.bdHTInfoBuf)?\
+				network->bssht.bdHTInfoLen = tmp_htinfo_len > sizeof(network->bssht.bdHTInfoBuf) ? \
 					sizeof(network->bssht.bdHTInfoBuf):tmp_htinfo_len;
-				memcpy(network->bssht.bdHTInfoBuf,info_element->data,network->bssht.bdHTInfoLen);
+				memcpy(network->bssht.bdHTInfoBuf, info_element->data, network->bssht.bdHTInfoLen);
 			}
 			break;

 		case MFIE_TYPE_AIRONET:
 			IEEE80211_DEBUG_SCAN("MFIE_TYPE_AIRONET: %d bytes\n",
 					     info_element->len);
-			if(info_element->len >IE_CISCO_FLAG_POSITION)
-			{
+			if (info_element->len > IE_CISCO_FLAG_POSITION) {
 				network->bWithAironetIE = true;

 				/*
@@ -2033,18 +1984,13 @@ int ieee80211_parse_info_param(struct ieee80211_device *ieee,
 				 * "A Cisco access point advertises support for CKIP in beacon and probe response packets,
 				 * by adding an Aironet element and setting one or both of the CKIP negotiation bits."
 				 */
-				if(	(info_element->data[IE_CISCO_FLAG_POSITION]&SUPPORT_CKIP_MIC)	||
-					(info_element->data[IE_CISCO_FLAG_POSITION]&SUPPORT_CKIP_PK)	)
-				{
+				if ((info_element->data[IE_CISCO_FLAG_POSITION]&SUPPORT_CKIP_MIC) ||
+					(info_element->data[IE_CISCO_FLAG_POSITION]&SUPPORT_CKIP_PK)) {
 					network->bCkipSupported = true;
-				}
-				else
-				{
+				} else {
 					network->bCkipSupported = false;
 				}
-			}
-			else
-			{
+			} else {
 				network->bWithAironetIE = false;
 				network->bCkipSupported = false;
 			}
@@ -2069,68 +2015,42 @@ int ieee80211_parse_info_param(struct ieee80211_device *ieee,
 		}

 		length -= sizeof(*info_element) + info_element->len;
-		info_element =
-		    (struct ieee80211_info_element *)&info_element->
-		    data[info_element->len];
+		info_element = (struct ieee80211_info_element *)&info_element->data[info_element->len];
 	}

-	if(!network->atheros_cap_exist && !network->broadcom_cap_exist &&
-		!network->cisco_cap_exist && !network->ralink_cap_exist && !network->bssht.bdRT2RTAggregation)
-	{
+	if (!network->atheros_cap_exist && !network->broadcom_cap_exist &&
+		!network->cisco_cap_exist && !network->ralink_cap_exist && !network->bssht.bdRT2RTAggregation) {
 		network->unknown_cap_exist = true;
-	}
-	else
-	{
+	} else {
 		network->unknown_cap_exist = false;
 	}
 	return 0;
 }

-static inline u8 ieee80211_SignalStrengthTranslate(
-	u8  CurrSS
-	)
+static inline u8 ieee80211_SignalStrengthTranslate(u8 CurrSS)
 {
 	u8 RetSS;

 	/* Step 1. Scale mapping. */
-	if(CurrSS >= 71 && CurrSS <= 100)
-	{
+	if (CurrSS >= 71 && CurrSS <= 100) {
 		RetSS = 90 + ((CurrSS - 70) / 3);
-	}
-	else if(CurrSS >= 41 && CurrSS <= 70)
-	{
+	} else if (CurrSS >= 41 && CurrSS <= 70) {
 		RetSS = 78 + ((CurrSS - 40) / 3);
-	}
-	else if(CurrSS >= 31 && CurrSS <= 40)
-	{
+	} else if (CurrSS >= 31 && CurrSS <= 40) {
 		RetSS = 66 + (CurrSS - 30);
-	}
-	else if(CurrSS >= 21 && CurrSS <= 30)
-	{
+	} else if (CurrSS >= 21 && CurrSS <= 30) {
 		RetSS = 54 + (CurrSS - 20);
-	}
-	else if(CurrSS >= 5 && CurrSS <= 20)
-	{
+	} else if (CurrSS >= 5 && CurrSS <= 20) {
 		RetSS = 42 + (((CurrSS - 5) * 2) / 3);
-	}
-	else if(CurrSS == 4)
-	{
+	} else if (CurrSS == 4) {
 		RetSS = 36;
-	}
-	else if(CurrSS == 3)
-	{
+	} else if (CurrSS == 3) {
 		RetSS = 27;
-	}
-	else if(CurrSS == 2)
-	{
+	} else if (CurrSS == 2) {
 		RetSS = 18;
-	}
-	else if(CurrSS == 1)
-	{
+	} else if (CurrSS == 1) {
 		RetSS = 9;
-	}
-	else
-	{
+	} else {
 		RetSS = CurrSS;
 	}

@@ -2142,7 +2062,7 @@ static inline u8 ieee80211_SignalStrengthTranslate(
 /* 0-100 index */
 static long ieee80211_translate_todbm(u8 signal_strength_index)
 {
-	long	signal_power; /* in dBm. */
+	long signal_power; /* in dBm. */

 	/* Translate to dBm (x=0.5y-95). */
 	signal_power = (long)((signal_strength_index + 1) >> 1);
@@ -2202,7 +2122,7 @@ static inline int ieee80211_network_init(
 	network->rsn_ie_len = 0;

 	if (ieee80211_parse_info_param
-	    (ieee,beacon->info_element, stats->len - sizeof(*beacon), network, stats))
+	    (ieee, beacon->info_element, stats->len - sizeof(*beacon), network, stats))
 		return 1;

 	network->mode = 0;
@@ -2224,17 +2144,17 @@ static inline int ieee80211_network_init(
 		return 1;
 	}

-	if(network->bssht.bdSupportHT){
-		if(network->mode == IEEE_A)
+	if (network->bssht.bdSupportHT) {
+		if (network->mode == IEEE_A)
 			network->mode = IEEE_N_5G;
-		else if(network->mode & (IEEE_G | IEEE_B))
+		else if (network->mode & (IEEE_G | IEEE_B))
 			network->mode = IEEE_N_24G;
 	}
 	if (ieee80211_is_empty_essid(network->ssid, network->ssid_len))
 		network->flags |= NETWORK_EMPTY_ESSID;

 	stats->signal = 30 + (stats->SignalStrength * 70) / 100;
-	stats->noise = ieee80211_translate_todbm((u8)(100-stats->signal)) -25;
+	stats->noise = ieee80211_translate_todbm((u8)(100-stats->signal)) - 25;

 	memcpy(&network->stats, stats, sizeof(network->stats));

@@ -2242,19 +2162,17 @@ static inline int ieee80211_network_init(
 }

 static inline int is_same_network(struct ieee80211_network *src,
-				  struct ieee80211_network *dst, struct ieee80211_device *ieee)
-{
+				  struct ieee80211_network *dst, struct ieee80211_device *ieee) {
 	/*
 	 * A network is only a duplicate if the channel, BSSID, ESSID
 	 * and the capability field (in particular IBSS and BSS) all match.
 	 * We treat all <hidden> with the same BSSID and channel
 	 * as one network
 	 */
-	return //((src->ssid_len == dst->ssid_len) &&
+	return
 		(((src->ssid_len == dst->ssid_len) || (ieee->iw_mode == IW_MODE_INFRA)) &&
 		(src->channel == dst->channel) &&
 		!memcmp(src->bssid, dst->bssid, ETH_ALEN) &&
-		//!memcmp(src->ssid, dst->ssid, src->ssid_len) &&
 		(!memcmp(src->ssid, dst->ssid, src->ssid_len) || (ieee->iw_mode == IW_MODE_INFRA)) &&
 		((src->capability & WLAN_CAPABILITY_IBSS) ==
 		(dst->capability & WLAN_CAPABILITY_IBSS)) &&
@@ -2263,8 +2181,7 @@ static inline int is_same_network(struct ieee80211_network *src,
 }

 static inline void update_network(struct ieee80211_network *dst,
-				  struct ieee80211_network *src)
-{
+				  struct ieee80211_network *src) {
 	int qos_active;
 	u8 old_param;

@@ -2274,8 +2191,7 @@ static inline void update_network(struct ieee80211_network *dst,
 	dst->rates_len = src->rates_len;
 	memcpy(dst->rates_ex, src->rates_ex, src->rates_ex_len);
 	dst->rates_ex_len = src->rates_ex_len;
-	if (src->ssid_len > 0)
-	{
+	if (src->ssid_len > 0) {
 		memset(dst->ssid, 0, dst->ssid_len);
 		dst->ssid_len = src->ssid_len;
 		memcpy(dst->ssid, src->ssid, src->ssid_len);
@@ -2284,8 +2200,7 @@ static inline void update_network(struct ieee80211_network *dst,
 	dst->flags = src->flags;
 	dst->time_stamp[0] = src->time_stamp[0];
 	dst->time_stamp[1] = src->time_stamp[1];
-	if (src->flags & NETWORK_HAS_ERP_VALUE)
-	{
+	if (src->flags & NETWORK_HAS_ERP_VALUE) {
 		dst->erp_value = src->erp_value;
 		dst->berp_info_valid = src->berp_info_valid = true;
 	}
@@ -2300,10 +2215,10 @@ static inline void update_network(struct ieee80211_network *dst,

 	dst->bssht.bdSupportHT = src->bssht.bdSupportHT;
 	dst->bssht.bdRT2RTAggregation = src->bssht.bdRT2RTAggregation;
-	dst->bssht.bdHTCapLen= src->bssht.bdHTCapLen;
-	memcpy(dst->bssht.bdHTCapBuf,src->bssht.bdHTCapBuf,src->bssht.bdHTCapLen);
-	dst->bssht.bdHTInfoLen= src->bssht.bdHTInfoLen;
-	memcpy(dst->bssht.bdHTInfoBuf,src->bssht.bdHTInfoBuf,src->bssht.bdHTInfoLen);
+	dst->bssht.bdHTCapLen = src->bssht.bdHTCapLen;
+	memcpy(dst->bssht.bdHTCapBuf, src->bssht.bdHTCapBuf, src->bssht.bdHTCapLen);
+	dst->bssht.bdHTInfoLen = src->bssht.bdHTInfoLen;
+	memcpy(dst->bssht.bdHTInfoBuf, src->bssht.bdHTInfoBuf, src->bssht.bdHTInfoLen);
 	dst->bssht.bdHTSpecVer = src->bssht.bdHTSpecVer;
 	dst->bssht.bdRT2RTLongSlotTime = src->bssht.bdRT2RTLongSlotTime;
 	dst->broadcom_cap_exist = src->broadcom_cap_exist;
@@ -2320,7 +2235,7 @@ static inline void update_network(struct ieee80211_network *dst,
 	/* qos related parameters */
 	qos_active = dst->qos_data.active;
 	old_param = dst->qos_data.param_count;
-	if(dst->flags & NETWORK_HAS_QOS_MASK)
+	if (dst->flags & NETWORK_HAS_QOS_MASK)
 		memcpy(&dst->qos_data, &src->qos_data,
 			sizeof(struct ieee80211_qos_data));
 	else {
@@ -2330,7 +2245,7 @@ static inline void update_network(struct ieee80211_network *dst,

 	if (dst->qos_data.supported == 1) {
 		dst->QoS_Enable = 1;
-		if(dst->ssid_len)
+		if (dst->ssid_len)
 			IEEE80211_DEBUG_QOS
 				("QoS the network %s is QoS supported\n",
 				dst->ssid);
@@ -2343,11 +2258,11 @@ static inline void update_network(struct ieee80211_network *dst,

 	/* dst->last_associate is not overwritten */
 	dst->wmm_info = src->wmm_info; /* sure to exist in beacon or probe response frame. */
-	if (src->wmm_param[0].aci_aifsn|| \
-	   src->wmm_param[1].aci_aifsn|| \
-	   src->wmm_param[2].aci_aifsn|| \
+	if (src->wmm_param[0].aci_aifsn || \
+	   src->wmm_param[1].aci_aifsn || \
+	   src->wmm_param[2].aci_aifsn || \
 	   src->wmm_param[3].aci_aifsn) {
-	  memcpy(dst->wmm_param, src->wmm_param, WME_AC_PRAM_LEN);
+		memcpy(dst->wmm_param, src->wmm_param, WME_AC_PRAM_LEN);
 	}
 #ifdef THOMAS_TURBO
 	dst->Turbo_Enable = src->Turbo_Enable;
@@ -2437,46 +2352,36 @@ static inline void ieee80211_process_probe_response(

 	if (!is_legal_channel(ieee, network->channel))
 		goto out;
-	if (ieee->bGlobalDomain)
-	{
-		if (fc == IEEE80211_STYPE_PROBE_RESP)
-		{
+	if (ieee->bGlobalDomain) {
+		if (fc == IEEE80211_STYPE_PROBE_RESP) {
 			/* Case 1: Country code */
-			if(IS_COUNTRY_IE_VALID(ieee) )
-			{
+			if (IS_COUNTRY_IE_VALID(ieee)) {
 				if (!is_legal_channel(ieee, network->channel)) {
 					printk("GetScanInfo(): For Country code, filter probe response at channel(%d).\n", network->channel);
 					goto out;
 				}
 			}
 			/* Case 2: No any country code. */
-			else
-			{
+			else {
 				/* Filter over channel ch12~14 */
-				if (network->channel > 11)
-				{
+				if (network->channel > 11) {
 					printk("GetScanInfo(): For Global Domain, filter probe response at channel(%d).\n", network->channel);
 					goto out;
 				}
 			}
-		}
-		else
-		{
+		} else {
 			/* Case 1: Country code */
-			if(IS_COUNTRY_IE_VALID(ieee) )
-			{
+			if (IS_COUNTRY_IE_VALID(ieee)) {
 				if (!is_legal_channel(ieee, network->channel)) {
-					printk("GetScanInfo(): For Country code, filter beacon at channel(%d).\n",network->channel);
+					printk("GetScanInfo(): For Country code, filter beacon at channel(%d).\n", network->channel);
 					goto out;
 				}
 			}
 			/* Case 2: No any country code. */
-			else
-			{
+			else {
 				/* Filter over channel ch12~14 */
-				if (network->channel > 14)
-				{
-					printk("GetScanInfo(): For Global Domain, filter beacon at channel(%d).\n",network->channel);
+				if (network->channel > 14) {
+					printk("GetScanInfo(): For Global Domain, filter beacon at channel(%d).\n", network->channel);
 					goto out;
 				}
 			}
@@ -2502,15 +2407,14 @@ static inline void ieee80211_process_probe_response(
 	if (is_same_network(&ieee->current_network, network, ieee)) {
 		update_network(&ieee->current_network, network);
 		if ((ieee->current_network.mode == IEEE_N_24G || ieee->current_network.mode == IEEE_G)
-		&& ieee->current_network.berp_info_valid){
-		if(ieee->current_network.erp_value& ERP_UseProtection)
-			ieee->current_network.buseprotection = true;
-		else
-			ieee->current_network.buseprotection = false;
-		}
-		if(is_beacon(beacon->header.frame_ctl))
-		{
-			if(ieee->state == IEEE80211_LINKED)
+		&& ieee->current_network.berp_info_valid) {
+			if (ieee->current_network.erp_value & ERP_UseProtection)
+				ieee->current_network.buseprotection = true;
+			else
+				ieee->current_network.buseprotection = false;
+			}
+		if (is_beacon(beacon->header.frame_ctl)) {
+			if (ieee->state == IEEE80211_LINKED)
 				ieee->LinkDetectInfo.NumRecvBcnInPeriod++;
 		} else /* hidden AP */
 			network->flags = (~NETWORK_EMPTY_ESSID & network->flags)|(NETWORK_EMPTY_ESSID & ieee->current_network.flags);
@@ -2556,8 +2460,8 @@ static inline void ieee80211_process_probe_response(
 #endif
 		memcpy(target, network, sizeof(*target));
 		list_add_tail(&target->list, &ieee->network_list);
-		if(ieee->softmac_features & IEEE_SOFTMAC_ASSOCIATE)
-			ieee80211_softmac_new_net(ieee,network);
+		if (ieee->softmac_features & IEEE_SOFTMAC_ASSOCIATE)
+			ieee80211_softmac_new_net(ieee, network);
 	} else {
 		IEEE80211_DEBUG_SCAN("Updating '%s' (%pM) via %s.\n",
 				     escape_essid(target->ssid,
@@ -2573,24 +2477,27 @@ static inline void ieee80211_process_probe_response(
 		 */
 		renew = !time_after(target->last_scanned + ieee->scan_age, jiffies);
 		/* YJ,add,080819,for hidden ap */
-		if(is_beacon(beacon->header.frame_ctl) == 0)
+		if (is_beacon(beacon->header.frame_ctl) == 0)
 			network->flags = (~NETWORK_EMPTY_ESSID & network->flags)|(NETWORK_EMPTY_ESSID & target->flags);
-		if(((network->flags & NETWORK_EMPTY_ESSID) == NETWORK_EMPTY_ESSID) \
-		    && (((network->ssid_len > 0) && (strncmp(target->ssid, network->ssid, network->ssid_len)))\
-		    ||((ieee->current_network.ssid_len == network->ssid_len)&&(strncmp(ieee->current_network.ssid, network->ssid, network->ssid_len) == 0)&&(ieee->state == IEEE80211_NOLINK))))
-			renew = 1;
+		if (((network->flags & NETWORK_EMPTY_ESSID) == NETWORK_EMPTY_ESSID) &&
+			(((network->ssid_len > 0) &&
+			(strncmp(target->ssid, network->ssid, network->ssid_len))) ||
+			((ieee->current_network.ssid_len == network->ssid_len) &&
+			(strncmp(ieee->current_network.ssid, network->ssid, network->ssid_len) == 0) &&
+			(ieee->state == IEEE80211_NOLINK))))
+				renew = 1;
 		/* YJ,add,080819,for hidden ap,end */

 		update_network(target, network);
-		if(renew && (ieee->softmac_features & IEEE_SOFTMAC_ASSOCIATE))
-			ieee80211_softmac_new_net(ieee,network);
+		if (renew && (ieee->softmac_features & IEEE_SOFTMAC_ASSOCIATE))
+			ieee80211_softmac_new_net(ieee, network);
 	}

 	spin_unlock_irqrestore(&ieee->lock, flags);
-	if (is_beacon(beacon->header.frame_ctl)&&is_same_network(&ieee->current_network, network, ieee)&&\
+	if (is_beacon(beacon->header.frame_ctl) && is_same_network(&ieee->current_network, network, ieee) &&
 		(ieee->state == IEEE80211_LINKED)) {
 		if (ieee->handle_beacon != NULL) {
-			ieee->handle_beacon(ieee->dev,beacon,&ieee->current_network);
+			ieee->handle_beacon(ieee->dev, beacon, &ieee->current_network);
 		}
 	}

diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
index 4f649fcc7c1d..7e380e93e7b9 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
@@ -196,15 +196,6 @@ static u8 MgntQuery_MgntFrameTxRate(struct ieee80211_device *ieee)
 			rate = 0x02;
 	}

-	/*
-	// Data rate of ProbeReq is already decided. Annie, 2005-03-31
-	if( pMgntInfo->bScanInProgress || (pMgntInfo->bDualModeScanStep!=0) ) {
-	if(pMgntInfo->dot11CurrentWirelessMode==WIRELESS_MODE_A)
-	rate = 0x0c;
-	else
-	rate = 0x02;
-	}
-	 */
 	return rate;
 }

@@ -506,6 +497,7 @@ static void ieee80211_softmac_scan_wq(struct work_struct *work)
 static void ieee80211_beacons_start(struct ieee80211_device *ieee)
 {
 	unsigned long flags;
+
 	spin_lock_irqsave(&ieee->beacon_lock, flags);

 	ieee->beacon_txing = 1;
@@ -681,7 +673,7 @@ static struct sk_buff *ieee80211_probe_resp(struct ieee80211_device *ieee, u8 *d
 	crypt = ieee->crypt[ieee->tx_keyidx];

 	encrypt = ieee->host_encrypt && crypt && crypt->ops &&
-		((0 == strcmp(crypt->ops->name, "WEP") || wpa_ie_len));
+		((strcmp(crypt->ops->name, "WEP") == 0 || wpa_ie_len));
 	/* HT ralated element */
 	tmp_ht_cap_buf = (u8 *)&ieee->pHTInfo->SelfHTCap;
 	tmp_ht_cap_len = sizeof(ieee->pHTInfo->SelfHTCap);
@@ -912,6 +904,7 @@ static void ieee80211_resp_to_auth(struct ieee80211_device *ieee, int s,
 static void ieee80211_resp_to_probe(struct ieee80211_device *ieee, u8 *dest)
 {
 	struct sk_buff *buf = ieee80211_probe_resp(ieee, dest);
+
 	if (buf)
 		softmac_mgmt_xmit(buf, ieee);
 }
@@ -945,7 +938,7 @@ ieee80211_association_req(struct ieee80211_network *beacon,
 	int len = 0;

 	crypt = ieee->crypt[ieee->tx_keyidx];
-	encrypt = ieee->host_encrypt && crypt && crypt->ops && ((0 == strcmp(crypt->ops->name, "WEP") || wpa_ie_len));
+	encrypt = ieee->host_encrypt && crypt && crypt->ops && ((strcmp(crypt->ops->name, "WEP") == 0 || wpa_ie_len));

 	/* Include High Throuput capability && Realtek proprietary */
 	if (ieee->pHTInfo->bCurrentHTSupport && ieee->pHTInfo->bEnableHT) {
@@ -1080,6 +1073,7 @@ ieee80211_association_req(struct ieee80211_network *beacon,
 	if (beacon->BssCcxVerNumber >= 2) {
 		u8			CcxVerNumBuf[] = {0x00, 0x40, 0x96, 0x03, 0x00};
 		struct octet_string	osCcxVerNum;
+
 		CcxVerNumBuf[4] = beacon->BssCcxVerNumber;
 		osCcxVerNum.octet = CcxVerNumBuf;
 		osCcxVerNum.length = sizeof(CcxVerNumBuf);
@@ -1159,7 +1153,7 @@ void ieee80211_associate_abort(struct ieee80211_device *ieee)

 	ieee->state = IEEE80211_ASSOCIATING_RETRY;

-	schedule_delayed_work(&ieee->associate_retry_wq, \
+	schedule_delayed_work(&ieee->associate_retry_wq,
 			      IEEE80211_SOFTMAC_ASSOC_RETRY_TIME);

 	spin_unlock_irqrestore(&ieee->lock, flags);
@@ -1247,6 +1241,7 @@ static void ieee80211_associate_step2(struct ieee80211_device *ieee)
 static void ieee80211_associate_complete_wq(struct work_struct *work)
 {
 	struct ieee80211_device *ieee = container_of(work, struct ieee80211_device, associate_complete_wq);
+
 	printk(KERN_INFO "Associated successfully\n");
 	if (ieee80211_is_54g(&ieee->current_network) &&
 	    (ieee->modulation & IEEE80211_OFDM_MODULATION)) {
@@ -1294,6 +1289,7 @@ static void ieee80211_associate_complete(struct ieee80211_device *ieee)
 static void ieee80211_associate_procedure_wq(struct work_struct *work)
 {
 	struct ieee80211_device *ieee = container_of(work, struct ieee80211_device, associate_procedure_wq);
+
 	ieee->sync_scan_hurryup = 1;
 	mutex_lock(&ieee->wx_mutex);

@@ -1442,6 +1438,7 @@ static inline u16 auth_parse(struct sk_buff *skb, u8 **challenge, int *chlen)
 {
 	struct ieee80211_authentication *a;
 	u8 *t;
+
 	if (skb->len < (sizeof(struct ieee80211_authentication) - sizeof(struct ieee80211_info_element))) {
 		IEEE80211_DEBUG_MGMT("invalid len in auth resp: %d\n", skb->len);
 		return 0xcafe;
@@ -1525,7 +1522,7 @@ static int assoc_rq_parse(struct sk_buff *skb, u8 *dest)

 	if (skb->len < (sizeof(struct ieee80211_assoc_request_frame) -
 		sizeof(struct ieee80211_info_element))) {
-		IEEE80211_DEBUG_MGMT("invalid len in auth request:%d \n", skb->len);
+		IEEE80211_DEBUG_MGMT("invalid len in auth request:%d\n", skb->len);
 		return -1;
 	}

@@ -1580,6 +1577,7 @@ ieee80211_rx_auth_rq(struct ieee80211_device *ieee, struct sk_buff *skb)
 {
 	u8 dest[ETH_ALEN];
 	int status;
+
 	ieee->softmac_stats.rx_auth_rq++;

 	status = auth_rq_parse(skb, dest);
@@ -1664,7 +1662,7 @@ static inline void ieee80211_sta_ps(struct ieee80211_device *ieee)
 	if ((ieee->ps == IEEE80211_PS_DISABLED ||
 	     ieee->iw_mode != IW_MODE_INFRA ||
 	     ieee->state != IEEE80211_LINKED)) {
-		/* 	#warning CHECK_LOCK_HERE */
+		/* #warning CHECK_LOCK_HERE */
 		spin_lock_irqsave(&ieee->mgmt_tx_lock, flags2);

 		ieee80211_sta_wakeup(ieee, 1);
@@ -1763,6 +1761,7 @@ static void ieee80211_process_action(struct ieee80211_device *ieee,
 	struct rtl_80211_hdr *header = (struct rtl_80211_hdr *)skb->data;
 	u8 *act = ieee80211_get_payload(header);
 	u8 tmp = 0;
+
 	if (act == NULL) {
 		IEEE80211_DEBUG(IEEE80211_DL_ERR, "error to get payload of action frame\n");
 		return;
@@ -1781,7 +1780,6 @@ static void ieee80211_process_action(struct ieee80211_device *ieee,
 	default:
 		break;
 	}
-	return;
 }

 static void ieee80211_check_auth_response(struct ieee80211_device *ieee,
@@ -1886,8 +1884,8 @@ ieee80211_rx_frame_softmac(struct ieee80211_device *ieee, struct sk_buff *skb,
 				if (ieee->qos_support) {
 					assoc_resp = (struct ieee80211_assoc_response_frame *)skb->data;
 					memset(network, 0, sizeof(*network));
-					if (ieee80211_parse_info_param(ieee, assoc_resp->info_element,\
-								       rx_stats->len - sizeof(*assoc_resp), \
+					if (ieee80211_parse_info_param(ieee, assoc_resp->info_element,
+								       rx_stats->len - sizeof(*assoc_resp),
 								       network, rx_stats)) {
 						return 1;
 					} else {
@@ -2014,15 +2012,15 @@ void ieee80211_softmac_xmit(struct ieee80211_txb *txb, struct ieee80211_device *
 #else
 		if ((skb_queue_len(&ieee->skb_waitQ[queue_index]) != 0) ||
 #endif
-		    (!ieee->check_nic_enough_desc(ieee->dev, queue_index)) || \
+		    (!ieee->check_nic_enough_desc(ieee->dev, queue_index)) ||
 		    (ieee->queue_stop)) {
 			/* insert the skb packet to the wait queue */
 			/*
 			 * as for the completion function, it does not need
 			 * to check it any more.
-			 * */
-			//printk("error:no descriptor left@queue_index %d\n", queue_index);
-			//ieee80211_stop_queue(ieee);
+			 */
+			/* printk("error:no descriptor left@queue_index %d\n", queue_index); */
+			/* ieee80211_stop_queue(ieee); */
 #ifdef USB_TX_DRIVER_AGGREGATION_ENABLE
 			skb_queue_tail(&ieee->skb_drv_aggQ[queue_index], txb->fragments[i]);
 #else
@@ -2044,6 +2042,7 @@ EXPORT_SYMBOL(ieee80211_softmac_xmit);
 static void ieee80211_resume_tx(struct ieee80211_device *ieee)
 {
 	int i;
+
 	for (i = ieee->tx_pending.frag; i < ieee->tx_pending.txb->nr_frags; i++) {
 		if (ieee->queue_stop) {
 			ieee->tx_pending.frag = i;
@@ -2496,6 +2495,7 @@ void ieee80211_start_protocol(struct ieee80211_device *ieee)
 void ieee80211_softmac_init(struct ieee80211_device *ieee)
 {
 	int i;
+
 	memset(&ieee->current_network, 0, sizeof(struct ieee80211_network));

 	ieee->state = IEEE80211_NOLINK;
@@ -2579,8 +2579,10 @@ void ieee80211_softmac_free(struct ieee80211_device *ieee)
  ********************************************************/
 static int ieee80211_wpa_enable(struct ieee80211_device *ieee, int value)
 {
-	/* This is called when wpa_supplicant loads and closes the driver
-	 * interface. */
+	/*
+	 * This is called when wpa_supplicant loads and closes the driver
+	 * interface.
+	 */
 	printk("%s WPA\n", value ? "enabling" : "disabling");
 	ieee->wpa_enabled = value;
 	return 0;
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c
index 320021752f28..d807ea03a772 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c
@@ -169,8 +169,7 @@ int ieee80211_encrypt_fragment(
 	struct ieee80211_crypt_data *crypt = ieee->crypt[ieee->tx_keyidx];
 	int res;

-	if (!(crypt && crypt->ops))
-	{
+	if (!(crypt && crypt->ops)) {
 		printk("=========>%s(), crypt is null\n", __func__);
 		return -1;
 	}
@@ -217,7 +216,8 @@ int ieee80211_encrypt_fragment(
 }


-void ieee80211_txb_free(struct ieee80211_txb *txb) {
+void ieee80211_txb_free(struct ieee80211_txb *txb)
+{
 	if (unlikely(!txb))
 		return;
 	kfree(txb);
@@ -229,6 +229,7 @@ static struct ieee80211_txb *ieee80211_alloc_txb(int nr_frags, int txb_size,
 {
 	struct ieee80211_txb *txb;
 	int i;
+
 	txb = kmalloc(
 		sizeof(struct ieee80211_txb) + (sizeof(u8 *) * nr_frags),
 		gfp_mask);
@@ -263,6 +264,7 @@ ieee80211_classify(struct sk_buff *skb, struct ieee80211_network *network)
 {
 	struct ethhdr *eth;
 	struct iphdr *ip;
+
 	eth = (struct ethhdr *)skb->data;
 	if (eth->h_proto != htons(ETH_P_IP))
 		return 0;
@@ -295,7 +297,7 @@ static void ieee80211_tx_query_agg_cap(struct ieee80211_device *ieee,
 	struct tx_ts_record        *pTxTs = NULL;
 	struct rtl_80211_hdr_1addr *hdr = (struct rtl_80211_hdr_1addr *)skb->data;

-	if (!pHTInfo->bCurrentHTSupport||!pHTInfo->bEnableHT)
+	if (!pHTInfo->bCurrentHTSupport || !pHTInfo->bEnableHT)
 		return;
 	if (!IsQoSDataFrame(skb->data))
 		return;
@@ -310,69 +312,58 @@ static void ieee80211_tx_query_agg_cap(struct ieee80211_device *ieee,
 	if (!Adapter->HalFunc.GetNmodeSupportBySecCfgHandler(Adapter))
 		return;
 #endif
-	if (!ieee->GetNmodeSupportBySecCfg(ieee->dev))
-	{
+	if (!ieee->GetNmodeSupportBySecCfg(ieee->dev)) {
 		return;
 	}
-	if (pHTInfo->bCurrentAMPDUEnable)
-	{
-		if (!GetTs(ieee, (struct ts_common_info **)(&pTxTs), hdr->addr1, skb->priority, TX_DIR, true))
-		{
+	if (pHTInfo->bCurrentAMPDUEnable) {
+		if (!GetTs(ieee, (struct ts_common_info **)(&pTxTs), hdr->addr1, skb->priority, TX_DIR, true)) {
 			printk("===>can't get TS\n");
 			return;
 		}
-		if (!pTxTs->tx_admitted_ba_record.valid)
-		{
+		if (!pTxTs->tx_admitted_ba_record.valid) {
 			TsStartAddBaProcess(ieee, pTxTs);
 			goto FORCED_AGG_SETTING;
-		}
-		else if (!pTxTs->using_ba)
-		{
+		} else if (!pTxTs->using_ba) {
 			if (SN_LESS(pTxTs->tx_admitted_ba_record.start_seq_ctrl.field.seq_num, (pTxTs->tx_cur_seq + 1) % 4096))
 				pTxTs->using_ba = true;
 			else
 				goto FORCED_AGG_SETTING;
 		}

-		if (ieee->iw_mode == IW_MODE_INFRA)
-		{
+		if (ieee->iw_mode == IW_MODE_INFRA) {
 			tcb_desc->bAMPDUEnable = true;
 			tcb_desc->ampdu_factor = pHTInfo->CurrentAMPDUFactor;
 			tcb_desc->ampdu_density = pHTInfo->CurrentMPDUDensity;
 		}
 	}
 FORCED_AGG_SETTING:
-	switch (pHTInfo->ForcedAMPDUMode )
-	{
-		case HT_AGG_AUTO:
-			break;
-
-		case HT_AGG_FORCE_ENABLE:
-			tcb_desc->bAMPDUEnable = true;
-			tcb_desc->ampdu_density = pHTInfo->ForcedMPDUDensity;
-			tcb_desc->ampdu_factor = pHTInfo->ForcedAMPDUFactor;
-			break;
-
-		case HT_AGG_FORCE_DISABLE:
-			tcb_desc->bAMPDUEnable = false;
-			tcb_desc->ampdu_density = 0;
-			tcb_desc->ampdu_factor = 0;
-			break;
+	switch (pHTInfo->ForcedAMPDUMode) {
+	case HT_AGG_AUTO:
+		break;
+
+	case HT_AGG_FORCE_ENABLE:
+		tcb_desc->bAMPDUEnable = true;
+		tcb_desc->ampdu_density = pHTInfo->ForcedMPDUDensity;
+		tcb_desc->ampdu_factor = pHTInfo->ForcedAMPDUFactor;
+		break;
+
+	case HT_AGG_FORCE_DISABLE:
+		tcb_desc->bAMPDUEnable = false;
+		tcb_desc->ampdu_density = 0;
+		tcb_desc->ampdu_factor = 0;
+		break;

 	}
-		return;
+	return;
 }

 static void ieee80211_qurey_ShortPreambleMode(struct ieee80211_device *ieee,
 					      struct cb_desc *tcb_desc)
 {
 	tcb_desc->bUseShortPreamble = false;
-	if (tcb_desc->data_rate == 2) {
-	/* 1M can only use Long Preamble. 11B spec */
+	if (tcb_desc->data_rate == 2) {/* 1M can only use Long Preamble. 11B spec */
 		return;
-	}
-	else if (ieee->current_network.capability & WLAN_CAPABILITY_SHORT_PREAMBLE)
-	{
+	} else if (ieee->current_network.capability & WLAN_CAPABILITY_SHORT_PREAMBLE) {
 		tcb_desc->bUseShortPreamble = true;
 	}
 	return;
@@ -384,18 +375,17 @@ ieee80211_query_HTCapShortGI(struct ieee80211_device *ieee, struct cb_desc *tcb_

 	tcb_desc->bUseShortGI		= false;

-	if (!pHTInfo->bCurrentHTSupport||!pHTInfo->bEnableHT)
+	if (!pHTInfo->bCurrentHTSupport || !pHTInfo->bEnableHT)
 		return;

-	if (pHTInfo->bForcedShortGI)
-	{
+	if (pHTInfo->bForcedShortGI) {
 		tcb_desc->bUseShortGI = true;
 		return;
 	}

-	if ((pHTInfo->bCurBW40MHz==true) && pHTInfo->bCurShortGI40MHz)
+	if ((pHTInfo->bCurBW40MHz == true) && pHTInfo->bCurShortGI40MHz)
 		tcb_desc->bUseShortGI = true;
-	else if ((pHTInfo->bCurBW40MHz==false) && pHTInfo->bCurShortGI20MHz)
+	else if ((pHTInfo->bCurBW40MHz == false) && pHTInfo->bCurShortGI20MHz)
 		tcb_desc->bUseShortGI = true;
 }

@@ -406,7 +396,7 @@ static void ieee80211_query_BandwidthMode(struct ieee80211_device *ieee,

 	tcb_desc->bPacketBW = false;

-	if (!pHTInfo->bCurrentHTSupport||!pHTInfo->bEnableHT)
+	if (!pHTInfo->bCurrentHTSupport || !pHTInfo->bEnableHT)
 		return;

 	if (tcb_desc->bMulticast || tcb_desc->bBroadcast)
@@ -415,7 +405,7 @@ static void ieee80211_query_BandwidthMode(struct ieee80211_device *ieee,
 	if ((tcb_desc->data_rate & 0x80) == 0) /* If using legacy rate, it shall use 20MHz channel. */
 		return;
 	/* BandWidthAutoSwitch is for auto switch to 20 or 40 in long distance */
-	if(pHTInfo->bCurBW40MHz && pHTInfo->bCurTxBW40MHz && !ieee->bandwidth_auto_switch.bforced_tx20Mhz)
+	if (pHTInfo->bCurBW40MHz && pHTInfo->bCurTxBW40MHz && !ieee->bandwidth_auto_switch.bforced_tx20Mhz)
 		tcb_desc->bPacketBW = true;
 	return;
 }
@@ -434,24 +424,20 @@ static void ieee80211_query_protectionmode(struct ieee80211_device *ieee,
 	if (tcb_desc->bBroadcast || tcb_desc->bMulticast)/* only unicast frame will use rts/cts */
 		return;

-	if (is_broadcast_ether_addr(skb->data+16))  /* check addr3 as infrastructure add3 is DA. */
+	if (is_broadcast_ether_addr(skb->data + 16))  /* check addr3 as infrastructure add3 is DA. */
 		return;

-	if (ieee->mode < IEEE_N_24G) /* b, g mode */
-	{
-			/*
-			 * (1) RTS_Threshold is compared to the MPDU, not MSDU.
-			 * (2) If there are more than one frag in  this MSDU, only the first frag uses protection frame.
-			 * 	Other fragments are protected by previous fragment.
-			 * 	So we only need to check the length of first fragment.
-			 */
-		if (skb->len > ieee->rts)
-		{
+	if (ieee->mode < IEEE_N_24G) {/* b, g mode */
+		/*
+		 * (1) RTS_Threshold is compared to the MPDU, not MSDU.
+		 * (2) If there are more than one frag in  this MSDU, only the first frag uses protection frame.
+		 * 	Other fragments are protected by previous fragment.
+		 * 	So we only need to check the length of first fragment.
+		 */
+		if (skb->len > ieee->rts) {
 			tcb_desc->bRTSEnable = true;
 			tcb_desc->rts_rate = MGN_24M;
-		}
-		else if (ieee->current_network.buseprotection)
-		{
+		} else if (ieee->current_network.buseprotection) {
 			/* Use CTS-to-SELF in protection mode. */
 			tcb_desc->bRTSEnable = true;
 			tcb_desc->bCTSEnable = true;
@@ -461,8 +447,7 @@ static void ieee80211_query_protectionmode(struct ieee80211_device *ieee,
 		return;
 	} else {/* 11n High throughput case. */
 		PRT_HIGH_THROUGHPUT pHTInfo = ieee->pHTInfo;
-		while (true)
-		{
+		while (true) {
 			/* check ERP protection */
 			if (ieee->current_network.buseprotection) {/* CTS-to-SELF */
 				tcb_desc->bRTSEnable = true;
@@ -471,28 +456,24 @@ static void ieee80211_query_protectionmode(struct ieee80211_device *ieee,
 				break;
 			}
 			/* check HT op mode */
-			if(pHTInfo->bCurrentHTSupport  && pHTInfo->bEnableHT)
-			{
+			if (pHTInfo->bCurrentHTSupport && pHTInfo->bEnableHT) {
 				u8 HTOpMode = pHTInfo->CurrentOpMode;
-				if((pHTInfo->bCurBW40MHz && (HTOpMode == 2 || HTOpMode == 3)) ||
-							(!pHTInfo->bCurBW40MHz && HTOpMode == 3) )
-				{
+				if ((pHTInfo->bCurBW40MHz && (HTOpMode == 2 || HTOpMode == 3)) ||
+							(!pHTInfo->bCurBW40MHz && HTOpMode == 3)) {
 					tcb_desc->rts_rate = MGN_24M; /* Rate is 24Mbps. */
 					tcb_desc->bRTSEnable = true;
 					break;
 				}
 			}
 			/* check rts */
-			if (skb->len > ieee->rts)
-			{
+			if (skb->len > ieee->rts) {
 				tcb_desc->rts_rate = MGN_24M; /* Rate is 24Mbps. */
 				tcb_desc->bRTSEnable = true;
 				break;
 			}
 			/* to do list: check MIMO power save condition. */
 			/* check AMPDU aggregation for TXOP */
-			if(tcb_desc->bAMPDUEnable)
-			{
+			if (tcb_desc->bAMPDUEnable) {
 				tcb_desc->rts_rate = MGN_24M; /* Rate is 24Mbps. */
 				/* According to 8190 design, firmware sends CF-End only if RTS/CTS is enabled. However, it degrads */
 				/* throughput around 10M, so we disable of this mechanism. 2007.08.03 by Emily */
@@ -500,8 +481,7 @@ static void ieee80211_query_protectionmode(struct ieee80211_device *ieee,
 				break;
 			}
 			/* check IOT action */
-			if(pHTInfo->IOTAction & HT_IOT_ACT_FORCED_CTS2SELF)
-			{
+			if (pHTInfo->IOTAction & HT_IOT_ACT_FORCED_CTS2SELF) {
 				tcb_desc->bCTSEnable	= true;
 				tcb_desc->rts_rate  =	MGN_24M;
 				tcb_desc->bRTSEnable = true;
@@ -520,7 +500,7 @@ static void ieee80211_query_protectionmode(struct ieee80211_device *ieee,
 	if (ieee->current_network.capability & WLAN_CAPABILITY_SHORT_PREAMBLE)
 		tcb_desc->bUseShortPreamble = true;
 	if (ieee->mode == IW_MODE_MASTER)
-			goto NO_PROTECTION;
+		goto NO_PROTECTION;
 	return;
 NO_PROTECTION:
 	tcb_desc->bRTSEnable	= false;
@@ -535,28 +515,25 @@ static void ieee80211_txrate_selectmode(struct ieee80211_device *ieee,
 					struct cb_desc *tcb_desc)
 {
 #ifdef TO_DO_LIST
-	if(!IsDataFrame(pFrame))
-	{
+	if (!IsDataFrame(pFrame)) {
 		pTcb->bTxDisableRateFallBack = true;
 		pTcb->bTxUseDriverAssingedRate = true;
 		pTcb->RATRIndex = 7;
 		return;
 	}

-	if(pMgntInfo->ForcedDataRate!= 0)
-	{
+	if (pMgntInfo->ForcedDataRate != 0) {
 		pTcb->bTxDisableRateFallBack = true;
 		pTcb->bTxUseDriverAssingedRate = true;
 		return;
 	}
 #endif
-	if(ieee->bTxDisableRateFallBack)
+	if (ieee->bTxDisableRateFallBack)
 		tcb_desc->bTxDisableRateFallBack = true;

-	if(ieee->bTxUseDriverAssingedRate)
+	if (ieee->bTxUseDriverAssingedRate)
 		tcb_desc->bTxUseDriverAssingedRate = true;
-	if(!tcb_desc->bTxDisableRateFallBack || !tcb_desc->bTxUseDriverAssingedRate)
-	{
+	if (!tcb_desc->bTxDisableRateFallBack || !tcb_desc->bTxUseDriverAssingedRate) {
 		if (ieee->iw_mode == IW_MODE_INFRA || ieee->iw_mode == IW_MODE_ADHOC)
 			tcb_desc->RATRIndex = 0;
 	}
@@ -567,11 +544,10 @@ static void ieee80211_query_seqnum(struct ieee80211_device *ieee,
 {
 	if (is_multicast_ether_addr(dst))
 		return;
-	if (IsQoSDataFrame(skb->data)) /* we deal qos data only */
-	{
+	if (IsQoSDataFrame(skb->data)) {/* we deal qos data only */
 		struct tx_ts_record *pTS = NULL;
-		if (!GetTs(ieee, (struct ts_common_info **)(&pTS), dst, skb->priority, TX_DIR, true))
-		{
+
+		if (!GetTs(ieee, (struct ts_common_info **)(&pTS), dst, skb->priority, TX_DIR, true)) {
 			return;
 		}
 		pTS->tx_cur_seq = (pTS->tx_cur_seq + 1) % 4096;
@@ -607,15 +583,14 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev)
 	 * If there is no driver handler to take the TXB, dont' bother
 	 * creating it...
 	 */
-	if ((!ieee->hard_start_xmit && !(ieee->softmac_features & IEEE_SOFTMAC_TX_QUEUE))||
+	if ((!ieee->hard_start_xmit && !(ieee->softmac_features & IEEE_SOFTMAC_TX_QUEUE)) ||
 	   ((!ieee->softmac_data_hard_start_xmit && (ieee->softmac_features & IEEE_SOFTMAC_TX_QUEUE)))) {
-		printk(KERN_WARNING "%s: No xmit handler.\n",
-		       ieee->dev->name);
+		printk(KERN_WARNING "%s: No xmit handler.\n", ieee->dev->name);
 		goto success;
 	}


-	if(likely(ieee->raw_tx == 0)){
+	if (likely(ieee->raw_tx == 0)) {
 		if (unlikely(skb->len < SNAP_SIZE + sizeof(u16))) {
 			printk(KERN_WARNING "%s: skb too small (%d).\n",
 			ieee->dev->name, skb->len);
@@ -661,7 +636,7 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev)
 			fc = IEEE80211_FTYPE_DATA;

 		//if(ieee->current_network.QoS_Enable)
-		if(qos_actived)
+		if (qos_actived)
 			fc |= IEEE80211_STYPE_QOS_DATA;
 		else
 			fc |= IEEE80211_STYPE_DATA;
@@ -694,15 +669,13 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev)
 		if (is_multicast_ether_addr(header.addr1)) {
 			frag_size = MAX_FRAG_THRESHOLD;
 			qos_ctl |= QOS_CTL_NOTCONTAIN_ACK;
-		}
-		else {
+		} else {
 			frag_size = ieee->fts;/* default:392 */
 			qos_ctl = 0;
 		}

 		//if (ieee->current_network.QoS_Enable)
-		if(qos_actived)
-		{
+		if (qos_actived) {
 			hdr_len = IEEE80211_3ADDR_LEN + 2;

 			skb->priority = ieee80211_classify(skb, &ieee->current_network);
@@ -753,8 +726,7 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev)
 		txb->payload_size = __cpu_to_le16(bytes);

 		//if (ieee->current_network.QoS_Enable)
-		if(qos_actived)
-		{
+		if (qos_actived) {
 			txb->queue_index = UP2AC(skb->priority);
 		} else {
 			txb->queue_index = WME_AC_BK;
@@ -765,7 +737,7 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev)
 		for (i = 0; i < nr_frags; i++) {
 			skb_frag = txb->fragments[i];
 			tcb_desc = (struct cb_desc *)(skb_frag->cb + MAX_DEV_ADDR_SIZE);
-			if(qos_actived){
+			if (qos_actived) {
 				skb_frag->priority = skb->priority;
 				tcb_desc->queue_index =  UP2AC(skb->priority);
 			} else {
@@ -774,15 +746,13 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev)
 			}
 			skb_reserve(skb_frag, ieee->tx_headroom);

-			if (encrypt){
+			if (encrypt) {
 				if (ieee->hwsec_active)
 					tcb_desc->bHwSec = 1;
 				else
 					tcb_desc->bHwSec = 0;
 				skb_reserve(skb_frag, crypt->ops->extra_prefix_len);
-			}
-			else
-			{
+			} else {
 				tcb_desc->bHwSec = 0;
 			}
 			frag_hdr = skb_put_data(skb_frag, &header, hdr_len);
@@ -801,8 +771,7 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev)
 				bytes = bytes_last_frag;
 			}
 			//if(ieee->current_network.QoS_Enable)
-			if(qos_actived)
-			{
+			if (qos_actived) {
 				/* add 1 only indicate to corresponding seq number control 2006/7/12 */
 				frag_hdr->seq_ctl = cpu_to_le16(ieee->seq_ctrl[UP2AC(skb->priority)+1]<<4 | i);
 			} else {
@@ -833,17 +802,16 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev)
 				skb_put(skb_frag, 4);
 		}

-		if(qos_actived)
-		{
-		  if (ieee->seq_ctrl[UP2AC(skb->priority) + 1] == 0xFFF)
-			ieee->seq_ctrl[UP2AC(skb->priority) + 1] = 0;
-		  else
-			ieee->seq_ctrl[UP2AC(skb->priority) + 1]++;
+		if (qos_actived) {
+			if (ieee->seq_ctrl[UP2AC(skb->priority) + 1] == 0xFFF)
+				ieee->seq_ctrl[UP2AC(skb->priority) + 1] = 0;
+			else
+				ieee->seq_ctrl[UP2AC(skb->priority) + 1]++;
 		} else {
-		  if (ieee->seq_ctrl[0] == 0xFFF)
-			ieee->seq_ctrl[0] = 0;
-		  else
-			ieee->seq_ctrl[0]++;
+			if (ieee->seq_ctrl[0] == 0xFFF)
+				ieee->seq_ctrl[0] = 0;
+			else
+				ieee->seq_ctrl[0]++;
 		}
 	} else {
 		if (unlikely(skb->len < sizeof(struct rtl_80211_hdr_3addr))) {
@@ -853,7 +821,7 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev)
 		}

 		txb = ieee80211_alloc_txb(1, skb->len, GFP_ATOMIC);
-		if(!txb){
+		if (!txb) {
 			printk(KERN_WARNING "%s: Could not allocate TXB\n",
 			ieee->dev->name);
 			goto failed;
@@ -866,9 +834,9 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev)

  success:
 /* WB add to fill data tcb_desc here. only first fragment is considered, need to change, and you may remove to other place. */
-	if (txb)
-	{
+	if (txb) {
 		struct cb_desc *tcb_desc = (struct cb_desc *)(txb->fragments[0]->cb + MAX_DEV_ADDR_SIZE);
+
 		tcb_desc->bTxEnableFwCalcDur = 1;
 		if (is_multicast_ether_addr(header.addr1))
 			tcb_desc->bMulticast = 1;
@@ -889,9 +857,9 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev)
 	spin_unlock_irqrestore(&ieee->lock, flags);
 	dev_kfree_skb_any(skb);
 	if (txb) {
-		if (ieee->softmac_features & IEEE_SOFTMAC_TX_QUEUE){
+		if (ieee->softmac_features & IEEE_SOFTMAC_TX_QUEUE) {
 			ieee80211_softmac_xmit(txb, ieee);
-		}else{
+		} else {
 			if ((*ieee->hard_start_xmit)(txb, dev) == 0) {
 				stats->tx_packets++;
 				stats->tx_bytes += __le16_to_cpu(txb->payload_size);
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c
index b09fd717b760..a1ef752a9636 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c
@@ -69,10 +69,10 @@ static inline char *rtl819x_translate_scan(struct ieee80211_device *ieee,
 	}
 	/* Add the protocol name */
 	iwe.cmd = SIOCGIWNAME;
-	for(i=0; i<ARRAY_SIZE(ieee80211_modes); i++) {
+	for (i = 0; i < ARRAY_SIZE(ieee80211_modes); i++) {
 		if (network->mode & BIT(i)) {
-			sprintf(pname,ieee80211_modes[i].mode_string,ieee80211_modes[i].mode_size);
-			pname +=ieee80211_modes[i].mode_size;
+			sprintf(pname, ieee80211_modes[i].mode_string, ieee80211_modes[i].mode_size);
+			pname += ieee80211_modes[i].mode_size;
 		}
 	}
 	*pname = '\0';
@@ -127,19 +127,19 @@ static inline char *rtl819x_translate_scan(struct ieee80211_device *ieee,
 			max_rate = rate;
 	}

-	if (network->mode >= IEEE_N_24G)/* add N rate here; */
-	{
+	if (network->mode >= IEEE_N_24G) {/* add N rate here; */
 		struct ht_capability_ele *ht_cap = NULL;
 		bool is40M = false, isShortGI = false;
 		u8 max_mcs = 0;
+
 		if (!memcmp(network->bssht.bdHTCapBuf, EWC11NHTCap, 4))
 			ht_cap = (struct ht_capability_ele *)&network->bssht.bdHTCapBuf[4];
 		else
 			ht_cap = (struct ht_capability_ele *)&network->bssht.bdHTCapBuf[0];
 		is40M = (ht_cap->ChlWidth)?1:0;
-		isShortGI = (ht_cap->ChlWidth)?
-						((ht_cap->ShortGI40Mhz)?1:0):
-						((ht_cap->ShortGI20Mhz)?1:0);
+		isShortGI = (ht_cap->ChlWidth) ?
+						((ht_cap->ShortGI40Mhz) ? 1 : 0) :
+						((ht_cap->ShortGI20Mhz) ? 1 : 0);

 		max_mcs = HTGetHighestMCSRate(ieee, ht_cap->MCS, MCS_FILTER_ALL);
 		rate = MCS_DATA_RATE[is40M][isShortGI][max_mcs&0x7f];
@@ -175,11 +175,12 @@ static inline char *rtl819x_translate_scan(struct ieee80211_device *ieee,

 	iwe.u.data.length = p - custom;
 	if (iwe.u.data.length)
-	    start = iwe_stream_add_point(info, start, stop, &iwe, custom);
+		start = iwe_stream_add_point(info, start, stop, &iwe, custom);

 	if (ieee->wpa_enabled && network->wpa_ie_len) {
 		char buf[MAX_WPA_IE_LEN * 2 + 30];
 		u8 *p = buf;
+
 		p += sprintf(p, "wpa_ie=");
 		for (i = 0; i < network->wpa_ie_len; i++) {
 			p += sprintf(p, "%02x", network->wpa_ie[i]);
@@ -193,8 +194,8 @@ static inline char *rtl819x_translate_scan(struct ieee80211_device *ieee,

 	if (ieee->wpa_enabled && network->rsn_ie_len) {
 		char buf[MAX_WPA_IE_LEN * 2 + 30];
-
 		u8 *p = buf;
+
 		p += sprintf(p, "rsn_ie=");
 		for (i = 0; i < network->rsn_ie_len; i++) {
 			p += sprintf(p, "%02x", network->rsn_ie[i]);
@@ -217,7 +218,7 @@ static inline char *rtl819x_translate_scan(struct ieee80211_device *ieee,
 		      " Last beacon: %lums ago", (jiffies - network->last_scanned) / (HZ / 100));
 	iwe.u.data.length = p - custom;
 	if (iwe.u.data.length)
-	    start = iwe_stream_add_point(info, start, stop, &iwe, custom);
+		start = iwe_stream_add_point(info, start, stop, &iwe, custom);

 	return start;
 }
@@ -233,14 +234,14 @@ int ieee80211_wx_get_scan(struct ieee80211_device *ieee,
 	char *stop = ev + wrqu->data.length;/* IW_SCAN_MAX_DATA; */
 	int i = 0;
 	int err = 0;
+
 	IEEE80211_DEBUG_WX("Getting scan\n");
 	mutex_lock(&ieee->wx_mutex);
 	spin_lock_irqsave(&ieee->lock, flags);

 	list_for_each_entry(network, &ieee->network_list, list) {
 		i++;
-		if((stop-ev)<200)
-		{
+		if ((stop-ev) < 200) {
 			err = -E2BIG;
 			break;
 		}
@@ -460,7 +461,7 @@ int ieee80211_wx_get_encode(struct ieee80211_device *ieee,

 	IEEE80211_DEBUG_WX("GET_ENCODE\n");

-	if(ieee->iw_mode == IW_MODE_MONITOR)
+	if (ieee->iw_mode == IW_MODE_MONITOR)
 		return -1;

 	key = erq->flags & IW_ENCODE_INDEX;
@@ -575,7 +576,7 @@ int ieee80211_wx_set_encode_ext(struct ieee80211_device *ieee,
 		ret = -EINVAL;
 		goto done;
 	}
-	printk("alg name:%s\n",alg);
+	printk("alg name:%s\n", alg);

 	ops = try_then_request_module(ieee80211_get_crypto_ops(alg), module);
 	if (!ops) {
@@ -683,12 +684,12 @@ int ieee80211_wx_get_encode_ext(struct ieee80211_device *ieee,
 	encoding->flags = idx + 1;
 	memset(ext, 0, sizeof(*ext));

-	if (crypt == NULL || crypt->ops == NULL ) {
+	if (crypt == NULL || crypt->ops == NULL) {
 		ext->alg = IW_ENCODE_ALG_NONE;
 		ext->key_len = 0;
 		encoding->flags |= IW_ENCODE_DISABLED;
 	} else {
-		if (strcmp(crypt->ops->name, "WEP") == 0 )
+		if (strcmp(crypt->ops->name, "WEP") == 0)
 			ext->alg = IW_ENCODE_ALG_WEP;
 		else if (strcmp(crypt->ops->name, "TKIP"))
 			ext->alg = IW_ENCODE_ALG_TKIP;
@@ -713,6 +714,7 @@ int ieee80211_wx_set_mlme(struct ieee80211_device *ieee,
 			       union iwreq_data *wrqu, char *extra)
 {
 	struct iw_mlme *mlme = (struct iw_mlme *) extra;
+
 	switch (mlme->cmd) {
 	case IW_MLME_DEAUTH:
 	case IW_MLME_DISASSOC:
@@ -731,15 +733,15 @@ int ieee80211_wx_set_auth(struct ieee80211_device *ieee,
 {
 	switch (data->flags & IW_AUTH_INDEX) {
 	case IW_AUTH_WPA_VERSION:
-	     /*need to support wpa2 here*/
+	/*need to support wpa2 here*/
 		break;
 	case IW_AUTH_CIPHER_PAIRWISE:
 	case IW_AUTH_CIPHER_GROUP:
 	case IW_AUTH_KEY_MGMT:
 		/*
-		* Host AP driver does not use these parameters and allows
-		* wpa_supplicant to control them internally.
-		*/
+		 * Host AP driver does not use these parameters and allows
+		 * wpa_supplicant to control them internally.
+		 */
 		break;
 	case IW_AUTH_TKIP_COUNTERMEASURES:
 		ieee->tkip_countermeasures = data->value;
@@ -758,8 +760,7 @@ int ieee80211_wx_set_auth(struct ieee80211_device *ieee,
 		} else if (data->value & IW_AUTH_ALG_LEAP) {
 			ieee->open_wep = 1;
 			ieee->auth_mode = 2;
-		}
-		else
+		} else
 			return -EINVAL;
 		break;

@@ -784,16 +785,13 @@ int ieee80211_wx_set_gen_ie(struct ieee80211_device *ieee, u8 *ie, size_t len)
 {
 	u8 *buf;

-	if (len>MAX_WPA_IE_LEN || (len && ie == NULL))
-	{
+	if (len > MAX_WPA_IE_LEN || (len && ie == NULL)) {
 		return -EINVAL;
 	}


-	if (len)
-	{
-		if (len != ie[1]+2)
-		{
+	if (len) {
+		if (len != ie[1] + 2) {
 			printk("len:%zu, ie:%d\n", len, ie[1]);
 			return -EINVAL;
 		}
@@ -803,8 +801,7 @@ int ieee80211_wx_set_gen_ie(struct ieee80211_device *ieee, u8 *ie, size_t len)
 		kfree(ieee->wpa_ie);
 		ieee->wpa_ie = buf;
 		ieee->wpa_ie_len = len;
-	}
-	else{
+	} else {
 		kfree(ieee->wpa_ie);
 		ieee->wpa_ie = NULL;
 		ieee->wpa_ie_len = 0;
diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c
index aed114573edb..5faf19381c08 100644
--- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c
+++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c
@@ -140,7 +140,7 @@ static struct sk_buff *ieee80211_ADDBA(struct ieee80211_device *ieee, u8 *Dst, s
 	/* Dialog Token */
 	*tag++ = pBA->dialog_token;

-	if (ACT_ADDBARSP == type) {
+	if (type == ACT_ADDBARSP) {
 		/* Status Code */
 		netdev_info(ieee->dev, "=====>to send ADDBARSP\n");

@@ -156,7 +156,7 @@ static struct sk_buff *ieee80211_ADDBA(struct ieee80211_device *ieee, u8 *Dst, s
 	put_unaligned_le16(pBA->timeout_value, tag);
 	tag += 2;

-	if (ACT_ADDBAREQ == type) {
+	if (type == ACT_ADDBAREQ) {
 	/* BA Start SeqCtrl */
 		memcpy(tag, (u8 *)&(pBA->start_seq_ctrl), 2);
 		tag += 2;
@@ -245,6 +245,7 @@ static void ieee80211_send_ADDBAReq(struct ieee80211_device *ieee,
 				    u8 *dst, struct ba_record *pBA)
 {
 	struct sk_buff *skb;
+
 	skb = ieee80211_ADDBA(ieee, dst, pBA, 0, ACT_ADDBAREQ); /* construct ACT_ADDBAREQ frames so set statuscode zero. */

 	if (skb) {
@@ -271,6 +272,7 @@ static void ieee80211_send_ADDBARsp(struct ieee80211_device *ieee, u8 *dst,
 				    struct ba_record *pBA, u16 StatusCode)
 {
 	struct sk_buff *skb;
+
 	skb = ieee80211_ADDBA(ieee, dst, pBA, StatusCode, ACT_ADDBARSP); /* construct ACT_ADDBARSP frames */
 	if (skb) {
 		softmac_mgmt_xmit(skb, ieee);
@@ -297,6 +299,7 @@ static void ieee80211_send_DELBA(struct ieee80211_device *ieee, u8 *dst,
 				 u16 ReasonCode)
 {
 	struct sk_buff *skb;
+
 	skb = ieee80211_DELBA(ieee, dst, pBA, TxRxSelect, ReasonCode); /* construct ACT_ADDBARSP frames */
 	if (skb) {
 		softmac_mgmt_xmit(skb, ieee);
@@ -396,6 +399,7 @@ int ieee80211_rx_ADDBAReq(struct ieee80211_device *ieee, struct sk_buff *skb)
 OnADDBAReq_Fail:
 	{
 		struct ba_record	BA;
+
 		BA.param_set = *pBaParamSet;
 		BA.timeout_value = *pBaTimeoutVal;
 		BA.dialog_token = *pDialogToken;
@@ -445,7 +449,8 @@ int ieee80211_rx_ADDBARsp(struct ieee80211_device *ieee, struct sk_buff *skb)
 	if (ieee->current_network.qos_data.active == 0  ||
 	    !ieee->pHTInfo->bCurrentHTSupport ||
 	    !ieee->pHTInfo->bCurrentAMPDUEnable) {
-		IEEE80211_DEBUG(IEEE80211_DL_ERR, "reject to ADDBA_RSP as some capability is not ready(%d, %d, %d)\n", ieee->current_network.qos_data.active, ieee->pHTInfo->bCurrentHTSupport, ieee->pHTInfo->bCurrentAMPDUEnable);
+		IEEE80211_DEBUG(IEEE80211_DL_ERR, "reject to ADDBA_RSP as some capability is not ready(%d, %d, %d)\n",
+			ieee->current_network.qos_data.active, ieee->pHTInfo->bCurrentHTSupport, ieee->pHTInfo->bCurrentAMPDUEnable);
 		ReasonCode = DELBA_REASON_UNKNOWN_BA;
 		goto OnADDBARsp_Reject;
 	}
@@ -478,10 +483,10 @@ int ieee80211_rx_ADDBARsp(struct ieee80211_device *ieee, struct sk_buff *skb)
 	 */
 	if (pAdmittedBA->valid) {
 		/* Since BA is already setup, we ignore all other ADDBA Response. */
-		IEEE80211_DEBUG(IEEE80211_DL_BA, "OnADDBARsp(): Recv ADDBA Rsp. Drop because already admit it! \n");
+		IEEE80211_DEBUG(IEEE80211_DL_BA, "OnADDBARsp(): Recv ADDBA Rsp. Drop because already admit it!\n");
 		return -1;
 	} else if ((!pPendingBA->valid) || (*pDialogToken != pPendingBA->dialog_token)) {
-		IEEE80211_DEBUG(IEEE80211_DL_ERR,  "OnADDBARsp(): Recv ADDBA Rsp. BA invalid, DELBA! \n");
+		IEEE80211_DEBUG(IEEE80211_DL_ERR,  "OnADDBARsp(): Recv ADDBA Rsp. BA invalid, DELBA!\n");
 		ReasonCode = DELBA_REASON_UNKNOWN_BA;
 		goto OnADDBARsp_Reject;
 	} else {
@@ -525,6 +530,7 @@ int ieee80211_rx_ADDBARsp(struct ieee80211_device *ieee, struct sk_buff *skb)
 OnADDBARsp_Reject:
 	{
 		struct ba_record	BA;
+
 		BA.param_set = *pBaParamSet;
 		ieee80211_send_DELBA(ieee, dst, &BA, TX_DIR, ReasonCode);
 		return 0;
@@ -649,6 +655,7 @@ TsInitDelBA(struct ieee80211_device *ieee, struct ts_common_info *pTsCommonInfo,
 				DELBA_REASON_END_BA);
 	} else if (TxRxSelect == RX_DIR) {
 		struct rx_ts_record *pRxTs = (struct rx_ts_record *)pTsCommonInfo;
+
 		if (RxTsDeleteBA(ieee, pRxTs))
 			ieee80211_send_DELBA(
 				ieee,
@@ -677,6 +684,7 @@ void TxBaInactTimeout(struct timer_list *t)
 {
 	struct tx_ts_record *pTxTs = from_timer(pTxTs, t, tx_admitted_ba_record.timer);
 	struct ieee80211_device *ieee = container_of(pTxTs, struct ieee80211_device, TxTsRecord[pTxTs->num]);
+
 	TxTsDeleteBA(ieee, pTxTs);
 	ieee80211_send_DELBA(
 		ieee,
diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h b/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h
index 71665b3da617..177513c8d63b 100644
--- a/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h
+++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h
@@ -247,14 +247,14 @@ extern u8 MCS_FILTER_1SS[16];
  * to add a macro to judge wireless mode.
  */
 #define PICK_RATE(_nLegacyRate, _nMcsRate)	\
-		(_nMcsRate == 0) ? (_nLegacyRate & 0x7f) : (_nMcsRate)
+		((_nMcsRate == 0) ? (_nLegacyRate & 0x7f) : (_nMcsRate))
 /* 2007/07/12 MH We only define legacy and HT wireless mode now. */
 #define	LEGACY_WIRELESS_MODE	IEEE_MODE_MASK

 #define CURRENT_RATE(WirelessMode, LegacyRate, HTRate)	\
-					((WirelessMode & (LEGACY_WIRELESS_MODE)) != 0) ?\
+					(((WirelessMode & (LEGACY_WIRELESS_MODE)) != 0) ?\
 						(LegacyRate) :\
-						(PICK_RATE(LegacyRate, HTRate))
+						(PICK_RATE(LegacyRate, HTRate)))

 /* MCS Bw 40 {1~7, 12~15,32} */
 #define	RATE_ADPT_1SS_MASK		0xFF
@@ -268,11 +268,10 @@ typedef enum _HT_AGGRE_SIZE {
 	HT_AGG_SIZE_16K = 1,
 	HT_AGG_SIZE_32K = 2,
 	HT_AGG_SIZE_64K = 3,
-}HT_AGGRE_SIZE_E, *PHT_AGGRE_SIZE_E;
+} HT_AGGRE_SIZE_E, *PHT_AGGRE_SIZE_E;

 /* Indicate different AP vendor for IOT issue */
-typedef enum _HT_IOT_PEER
-{
+typedef enum _HT_IOT_PEER {
 	HT_IOT_PEER_UNKNOWN = 0,
 	HT_IOT_PEER_REALTEK = 1,
 	HT_IOT_PEER_BROADCOM = 2,
@@ -280,7 +279,7 @@ typedef enum _HT_IOT_PEER
 	HT_IOT_PEER_ATHEROS = 4,
 	HT_IOT_PEER_CISCO = 5,
 	HT_IOT_PEER_MAX = 6
-}HT_IOT_PEER_E, *PHTIOT_PEER_E;
+} HT_IOT_PEER_E, *PHTIOT_PEER_E;

 /*
  * IOT Action for different AP
@@ -296,6 +295,6 @@ typedef enum _HT_IOT_ACTION {
 	HT_IOT_ACT_CDD_FSYNC = 0x00000080,
 	HT_IOT_ACT_PURE_N_MODE = 0x00000100,
 	HT_IOT_ACT_FORCED_CTS2SELF = 0x00000200,
-}HT_IOT_ACTION_E, *PHT_IOT_ACTION_E;
+} HT_IOT_ACTION_E, *PHT_IOT_ACTION_E;

 #endif /* _RTL819XU_HTTYPE_H_ */
diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c
index c3b6687024cd..8476baaedf7f 100644
--- a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c
+++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c
@@ -146,7 +146,7 @@ void HTDebugHTCapability(u8 *CapIE, u8 *TitleString)
 	IEEE80211_DEBUG(IEEE80211_DL_HT,  "\tSupport CCK in 20/40 mode = %s\n", (pCapELE->DssCCk) ? "YES" : "NO");
 	IEEE80211_DEBUG(IEEE80211_DL_HT,  "\tMax AMPDU Factor = %d\n", pCapELE->MaxRxAMPDUFactor);
 	IEEE80211_DEBUG(IEEE80211_DL_HT,  "\tMPDU Density = %d\n", pCapELE->MPDUDensity);
-	IEEE80211_DEBUG(IEEE80211_DL_HT,  "\tMCS Rate Set = [%x][%x][%x][%x][%x]\n", pCapELE->MCS[0],\
+	IEEE80211_DEBUG(IEEE80211_DL_HT,  "\tMCS Rate Set = [%x][%x][%x][%x][%x]\n", pCapELE->MCS[0],
 				pCapELE->MCS[1], pCapELE->MCS[2], pCapELE->MCS[3], pCapELE->MCS[4]);
 }

@@ -208,7 +208,7 @@ void HTDebugHTInfo(u8 *InfoIE, u8 *TitleString)
 		break;
 	}

-	IEEE80211_DEBUG(IEEE80211_DL_HT, "\tBasic MCS Rate Set = [%x][%x][%x][%x][%x]\n", pHTInfoEle->BasicMSC[0],\
+	IEEE80211_DEBUG(IEEE80211_DL_HT, "\tBasic MCS Rate Set = [%x][%x][%x][%x][%x]\n", pHTInfoEle->BasicMSC[0],
 				pHTInfoEle->BasicMSC[1], pHTInfoEle->BasicMSC[2], pHTInfoEle->BasicMSC[3], pHTInfoEle->BasicMSC[4]);
 }

@@ -654,13 +654,13 @@ void HTConstructRT2RTAggElement(struct ieee80211_device *ieee, u8 *posRT2RTAgg,
 #ifdef TODO
 #if (HAL_CODE_BASE == RTL8192 && DEV_BUS_TYPE == USB_INTERFACE)
 	/*
-	//Emily. If it is required to Ask Realtek AP to send AMPDU during AES mode, enable this
-	   section of code.
-	if(IS_UNDER_11N_AES_MODE(Adapter))
-	{
+	 * Emily. If it is required to Ask Realtek AP to send AMPDU during AES mode, enable this
+	 * section of code.
+	 */
+	/*
+	if(IS_UNDER_11N_AES_MODE(Adapter)) {
 		posRT2RTAgg->octet[5] |= RT_HT_CAP_USE_AMPDU;
-	}else
-	{
+	} else {
 		posRT2RTAgg->octet[5] &= 0xfb;
 	}
 	*/
diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c
index 903373769464..b2614669f2d2 100644
--- a/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c
+++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c
@@ -68,7 +68,7 @@ static void RxPktPendingTimeout(struct timer_list *t)

 		/* Indicate packets */
 		if (index > REORDER_WIN_SIZE) {
-			IEEE80211_DEBUG(IEEE80211_DL_ERR, "RxReorderIndicatePacket(): Rx Reorder buffer full!! \n");
+			IEEE80211_DEBUG(IEEE80211_DL_ERR, "RxReorderIndicatePacket(): Rx Reorder buffer full!!\n");
 			spin_unlock_irqrestore(&(ieee->reorder_spinlock), flags);
 			return;
 		}
@@ -96,7 +96,7 @@ static void TsAddBaProcess(struct timer_list *t)
 	struct ieee80211_device *ieee = container_of(pTxTs, struct ieee80211_device, TxTsRecord[num]);

 	TsInitAddBA(ieee, pTxTs, BA_POLICY_IMMEDIATE, false);
-	IEEE80211_DEBUG(IEEE80211_DL_BA, "TsAddBaProcess(): ADDBA Req is started!! \n");
+	IEEE80211_DEBUG(IEEE80211_DL_BA, "TsAddBaProcess(): ADDBA Req is started!!\n");
 }


@@ -134,6 +134,7 @@ void TSInitialize(struct ieee80211_device *ieee)
 	struct rx_ts_record     *pRxTS  = ieee->RxTsRecord;
 	struct rx_reorder_entry	*pRxReorderEntry = ieee->RxReorderEntry;
 	u8				count = 0;
+
 	IEEE80211_DEBUG(IEEE80211_DL_TS, "==========>%s()\n", __func__);
 	/* Initialize Tx TS related info. */
 	INIT_LIST_HEAD(&ieee->Tx_TS_Admit_List);
@@ -206,6 +207,7 @@ static struct ts_common_info *SearchAdmitTRStream(struct ieee80211_device *ieee,
 	bool				search_dir[4] = {0};
 	struct list_head		*psearch_list; /* FIXME */
 	struct ts_common_info	*pRet = NULL;
+
 	if (ieee->iw_mode == IW_MODE_MASTER) { /* ap mode */
 		if (TxRxSelect == TX_DIR) {
 			search_dir[DIR_DOWN] = true;
@@ -251,7 +253,7 @@ static struct ts_common_info *SearchAdmitTRStream(struct ieee80211_device *ieee,
 	}

 	if (&pRet->list  != psearch_list)
-		return pRet ;
+		return pRet;
 	else
 		return NULL;
 }
@@ -367,9 +369,11 @@ bool GetTs(
 				list_del_init(&(*ppTS)->list);
 				if (TxRxSelect == TX_DIR) {
 					struct tx_ts_record *tmp = container_of(*ppTS, struct tx_ts_record, ts_common_info);
+
 					ResetTxTsEntry(tmp);
 				} else {
 					struct rx_ts_record *tmp = container_of(*ppTS, struct rx_ts_record, ts_common_info);
+
 					ResetRxTsEntry(tmp);
 				}

@@ -403,6 +407,7 @@ static void RemoveTsEntry(struct ieee80211_device *ieee, struct ts_common_info *
 			  enum tr_select TxRxSelect)
 {
 	unsigned long flags = 0;
+
 	del_timer_sync(&pTs->setup_timer);
 	del_timer_sync(&pTs->inact_timer);
 	TsInitDelBA(ieee, pTs, TxRxSelect);
@@ -410,6 +415,7 @@ static void RemoveTsEntry(struct ieee80211_device *ieee, struct ts_common_info *
 	if (TxRxSelect == RX_DIR) {
 		struct rx_reorder_entry	*pRxReorderEntry;
 		struct rx_ts_record     *pRxTS = (struct rx_ts_record *)pTs;
+
 		if (timer_pending(&pRxTS->rx_pkt_pending_timer))
 			del_timer_sync(&pRxTS->rx_pkt_pending_timer);

@@ -420,6 +426,7 @@ static void RemoveTsEntry(struct ieee80211_device *ieee, struct ts_common_info *
 			{
 				int i = 0;
 				struct ieee80211_rxb *prxb = pRxReorderEntry->prxb;
+
 				if (unlikely(!prxb)) {
 					spin_unlock_irqrestore(&(ieee->reorder_spinlock), flags);
 					return;
@@ -436,6 +443,7 @@ static void RemoveTsEntry(struct ieee80211_device *ieee, struct ts_common_info *

 	} else {
 		struct tx_ts_record *pTxTS = (struct tx_ts_record *)pTs;
+
 		del_timer_sync(&pTxTS->ts_add_ba_timer);
 	}
 }
diff --git a/drivers/staging/rtl8192u/r8192U_dm.c b/drivers/staging/rtl8192u/r8192U_dm.c
index 51dab0863b86..2ce587e27f3c 100644
--- a/drivers/staging/rtl8192u/r8192U_dm.c
+++ b/drivers/staging/rtl8192u/r8192U_dm.c
@@ -142,21 +142,6 @@ void dm_CheckRxAggregation(struct net_device *dev)
 	unsigned long		curTxOkCnt = 0;
 	unsigned long		curRxOkCnt = 0;

-/*
-	if (pHalData->bForcedUsbRxAggr) {
-		if (pHalData->ForcedUsbRxAggrInfo == 0) {
-			if (pHalData->bCurrentRxAggrEnable) {
-				Adapter->HalFunc.HalUsbRxAggrHandler(Adapter, FALSE);
-			}
-		} else {
-			if (!pHalData->bCurrentRxAggrEnable || (pHalData->ForcedUsbRxAggrInfo != pHalData->LastUsbRxAggrInfoSetting)) {
-				Adapter->HalFunc.HalUsbRxAggrHandler(Adapter, TRUE);
-			}
-		}
-		return;
-	}
-
-*/
 	curTxOkCnt = priv->stats.txbytesunicast - lastTxOkCnt;
 	curRxOkCnt = priv->stats.rxbytesunicast - lastRxOkCnt;

@@ -333,7 +318,6 @@ static void dm_check_rate_adaptive(struct net_device *dev)
 		 * time to link with AP. We will not change upper/lower threshold. If
 		 * STA stay in high or low level, we must change two different threshold
 		 * to prevent jumping frequently.
-		 *
 		 */
 		if (pra->ratr_state == DM_RATR_STA_HIGH) {
 			HighRSSIThreshForRA	= pra->high2low_rssi_thresh_for_ra;
@@ -708,9 +692,6 @@ static void dm_TXPowerTrackingCallback_ThermalMeter(struct net_device *dev)
 		}
 		tmpCCK40Mindex = 0;
 	}
-	/*DbgPrint("%ddb, tmpOFDMindex = %d, tmpCCK20Mindex = %d, tmpCCK40Mindex = %d",
-		((u1Byte)tmpRegA - pHalData->ThermalMeter[0]),
-		tmpOFDMindex, tmpCCK20Mindex, tmpCCK40Mindex);*/
 	if (priv->CurrentChannelBW != HT_CHANNEL_WIDTH_20)	/* 40M */
 		tmpCCKindex = tmpCCK40Mindex;
 	else
@@ -1304,6 +1285,7 @@ static void dm_CheckTXPowerTracking_ThermalMeter(struct net_device *dev)
 {
 	struct r8192_priv *priv = ieee80211_priv(dev);
 	static u8	TM_Trigger;
+
 	if (!priv->btxpower_tracking)
 		return;
 	if (priv->txpower_count  <= 2) {
@@ -1680,9 +1662,6 @@ static void dm_ctrl_initgain_byrssi_by_driverrssi(
 	else
 		dm_digtable.cur_connect_state = DIG_DISCONNECT;

-	/*DbgPrint("DM_DigTable.PreConnectState = %d, DM_DigTable.CurConnectState = %d\n",
-		DM_DigTable.PreConnectState, DM_DigTable.CurConnectState);*/
-
 	dm_digtable.rssi_val = priv->undecorated_smoothed_pwdb;
 	dm_initial_gain(dev);
 	dm_pd_th(dev);
@@ -1754,12 +1733,6 @@ static void dm_ctrl_initgain_byrssi_by_fwfalse_alarm(
 			 * 2008/02/05 MH SD3-Jerry 92U/92E PD_TH are the same.
 			 */
 			write_nic_byte(dev, (rOFDM0_XATxAFE+3), 0x00);
-			/*else if (priv->card_8192 == HARDWARE_TYPE_RTL8190P)
-				write_nic_byte(pAdapter, rOFDM0_RxDetector1, 0x40);
-			else if (pAdapter->HardwareType == HARDWARE_TYPE_RTL8192E)
-			else
-				PlatformEFIOWrite1Byte(pAdapter, rOFDM0_RxDetector1, 0x40);
-			*/
 		} else
 			write_nic_byte(dev, rOFDM0_RxDetector1, 0x42);

@@ -1814,13 +1787,6 @@ static void dm_ctrl_initgain_byrssi_by_fwfalse_alarm(
 			 * 2008/02/05 MH SD3-Jerry 92U/92E PD_TH are the same.
 			 */
 			write_nic_byte(dev, (rOFDM0_XATxAFE+3), 0x20);
-			/*
-			else if (priv->card_8192 == HARDWARE_TYPE_RTL8190P)
-				write_nic_byte(dev, rOFDM0_RxDetector1, 0x42);
-			else if (pAdapter->HardwareType == HARDWARE_TYPE_RTL8192E)
-			else
-				PlatformEFIOWrite1Byte(pAdapter, rOFDM0_RxDetector1, 0x42);
-			*/
 		} else
 			write_nic_byte(dev, rOFDM0_RxDetector1, 0x44);

@@ -1887,10 +1853,6 @@ static void dm_ctrl_initgain_byrssi_highpwr(
 		if (priv->CurrentChannelBW != HT_CHANNEL_WIDTH_20) {
 			write_nic_byte(dev, (rOFDM0_XATxAFE+3), 0x10);

-			/*else if (priv->card_8192 == HARDWARE_TYPE_RTL8190P)
-				write_nic_byte(dev, rOFDM0_RxDetector1, 0x41);
-			*/
-
 		} else
 			write_nic_byte(dev, rOFDM0_RxDetector1, 0x43);
 	} else {
@@ -1904,10 +1866,6 @@ static void dm_ctrl_initgain_byrssi_highpwr(
 			/*  3.2 Recover PD_TH for OFDM for normal power region. */
 			if (priv->CurrentChannelBW != HT_CHANNEL_WIDTH_20) {
 				write_nic_byte(dev, (rOFDM0_XATxAFE+3), 0x20);
-				/*else if (priv->card_8192 == HARDWARE_TYPE_RTL8190P)
-					write_nic_byte(dev, rOFDM0_RxDetector1, 0x42);
-				*/
-
 			} else
 				write_nic_byte(dev, rOFDM0_RxDetector1, 0x44);
 		}
@@ -2023,9 +1981,6 @@ static void dm_pd_th(
 					 * 2008/02/05 MH SD3-Jerry 92U/92E PD_TH are the same.
 					 */
 					write_nic_byte(dev, (rOFDM0_XATxAFE+3), 0x00);
-					/*else if (priv->card_8192 == HARDWARE_TYPE_RTL8190P)
-						write_nic_byte(dev, rOFDM0_RxDetector1, 0x40);
-					*/
 				} else
 					write_nic_byte(dev, rOFDM0_RxDetector1, 0x42);
 			} else if (dm_digtable.curpd_thstate == DIG_PD_AT_NORMAL_POWER) {
@@ -2036,18 +1991,12 @@ static void dm_pd_th(
 					 * 2008/02/05 MH SD3-Jerry 92U/92E PD_TH are the same.
 					 */
 					write_nic_byte(dev, (rOFDM0_XATxAFE+3), 0x20);
-					/*else if (priv->card_8192 == HARDWARE_TYPE_RTL8190P)
-						write_nic_byte(dev, rOFDM0_RxDetector1, 0x42);
-					*/
 				} else
 					write_nic_byte(dev, rOFDM0_RxDetector1, 0x44);
 			} else if (dm_digtable.curpd_thstate == DIG_PD_AT_HIGH_POWER) {
 				/* Higher PD_TH for OFDM for high power state. */
 				if (priv->CurrentChannelBW != HT_CHANNEL_WIDTH_20) {
 					write_nic_byte(dev, (rOFDM0_XATxAFE+3), 0x10);
-					/*else if (priv->card_8192 == HARDWARE_TYPE_RTL8190P)
-						write_nic_byte(dev, rOFDM0_RxDetector1, 0x41);
-					*/
 				} else
 					write_nic_byte(dev, rOFDM0_RxDetector1, 0x43);
 			}
diff --git a/drivers/staging/rtl8192u/r8192U_hw.h b/drivers/staging/rtl8192u/r8192U_hw.h
index 79d462894f1d..1e5a9c81788a 100644
--- a/drivers/staging/rtl8192u/r8192U_hw.h
+++ b/drivers/staging/rtl8192u/r8192U_hw.h
@@ -87,7 +87,7 @@ enum _RTL8192Usb_HW {
 #define RX_FIFO_THRESHOLD_MASK (BIT(13) | BIT(14) | BIT(15))
 #define RX_FIFO_THRESHOLD_SHIFT 13
 #define RX_FIFO_THRESHOLD_NONE 7
-#define MAX_RX_DMA_MASK 	(BIT(8) | BIT(9) | BIT(10))
+#define MAX_RX_DMA_MASK		(BIT(8) | BIT(9) | BIT(10))
 #define RCR_MXDMA_OFFSET	8
 #define RCR_FIFO_OFFSET		13
 #define RCR_ONLYERLPKT		BIT(31)			/* Early Receiving based on Packet Size. */
@@ -225,13 +225,13 @@ enum _RTL8192Usb_HW {
 #define	RATR_MCS14		0x04000000
 #define	RATR_MCS15		0x08000000
 /* ALL CCK Rate */
-#define RATE_ALL_CCK		RATR_1M|RATR_2M|RATR_55M|RATR_11M
-#define RATE_ALL_OFDM_AG	RATR_6M|RATR_9M|RATR_12M|RATR_18M|RATR_24M\
-							|RATR_36M|RATR_48M|RATR_54M
-#define RATE_ALL_OFDM_1SS	RATR_MCS0|RATR_MCS1|RATR_MCS2|RATR_MCS3 | \
-							RATR_MCS4|RATR_MCS5|RATR_MCS6|RATR_MCS7
-#define RATE_ALL_OFDM_2SS	RATR_MCS8|RATR_MCS9	|RATR_MCS10|RATR_MCS11| \
-							RATR_MCS12|RATR_MCS13|RATR_MCS14|RATR_MCS15
+#define RATE_ALL_CCK		(RATR_1M|RATR_2M|RATR_55M|RATR_11M)
+#define RATE_ALL_OFDM_AG	(RATR_6M|RATR_9M|RATR_12M|RATR_18M|RATR_24M\
+						|RATR_36M|RATR_48M|RATR_54M)
+#define RATE_ALL_OFDM_1SS	(RATR_MCS0|RATR_MCS1|RATR_MCS2|RATR_MCS3\
+						|RATR_MCS4|RATR_MCS5|RATR_MCS6|RATR_MCS7)
+#define RATE_ALL_OFDM_2SS	(RATR_MCS8|RATR_MCS9|RATR_MCS10|RATR_MCS11\
+						|RATR_MCS12|RATR_MCS13|RATR_MCS14|RATR_MCS15)

 	EPROM_CMD		= 0xfe58,
 #define Cmd9346CR_9356SEL	BIT(4)
diff --git a/drivers/staging/rtl8192u/r8192U_wx.c b/drivers/staging/rtl8192u/r8192U_wx.c
index 839671cc7f96..24c11976ea61 100644
--- a/drivers/staging/rtl8192u/r8192U_wx.c
+++ b/drivers/staging/rtl8192u/r8192U_wx.c
@@ -470,6 +470,7 @@ static int r8192_wx_set_wap(struct net_device *dev,

 	int ret;
 	struct r8192_priv *priv = ieee80211_priv(dev);
+
 	mutex_lock(&priv->wx_mutex);

 	ret = ieee80211_wx_set_wap(priv->ieee80211, info, awrq, extra);
@@ -751,7 +752,7 @@ static int r8192_wx_set_enc_ext(struct net_device *dev,
 			idx--;
 		group = ext->ext_flags & IW_ENCODE_EXT_GROUP_KEY;

-		if ((!group) || (IW_MODE_ADHOC == ieee->iw_mode) || (alg ==  KEY_TYPE_WEP40)) {
+		if ((!group) || (ieee->iw_mode == IW_MODE_ADHOC) || (alg ==  KEY_TYPE_WEP40)) {
 			if ((ext->key_len == 13) && (alg == KEY_TYPE_WEP40))
 				alg = KEY_TYPE_WEP104;
 			ieee->pairwise_key_type = alg;
diff --git a/drivers/staging/rtl8192u/r819xU_firmware.c b/drivers/staging/rtl8192u/r819xU_firmware.c
index 0e47b5f75695..b16f1a102c89 100644
--- a/drivers/staging/rtl8192u/r819xU_firmware.c
+++ b/drivers/staging/rtl8192u/r819xU_firmware.c
@@ -232,7 +232,7 @@ bool init_firmware(struct net_device *dev)
 		rst_opt = OPT_FIRMWARE_RESET;
 		starting_state = FW_INIT_STEP2_DATA;
 	} else {
-		 RT_TRACE(COMP_FIRMWARE, "PlatformInitFirmware: undefined firmware state\n");
+		RT_TRACE(COMP_FIRMWARE, "PlatformInitFirmware: undefined firmware state\n");
 	}

 	/*
--
2.17.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/3] drivers/staging/rtl8192u: Reformat comments
  2019-06-03 12:21 ` [PATCH 1/3] drivers/staging/rtl8192u: Reformat comments Christian Müller
@ 2019-06-03 13:04   ` Greg KH
  0 siblings, 0 replies; 8+ messages in thread
From: Greg KH @ 2019-06-03 13:04 UTC (permalink / raw)
  To: Christian Müller
  Cc: devel, felix.trommer, linux-kernel, linux-kernel, johnfwhitmore

On Mon, Jun 03, 2019 at 02:21:02PM +0200, Christian Müller wrote:
> From: Felix Trommer <felix.trommer@hotmail.de>
> 
> Replace C99-Style comments with C89-Style comments.

What does that mean?

>  		if (MaxChnlNum >= pTriple->first_channel) {
> -			/* It is not in a monotonically increasing order, so
> +			/*
> +			 * It is not in a monotonically increasing order, so
>  			 * stop processing.
>  			 */

Those are both /* */ style comments.  Where in the C99 or C89 spec does
it say anything about this type of change?

Are you sure you are not getting confused about // for a comment marker
in C99 which is not in C89?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 3/3] drivers/staging/rtl8192u: Fix of checkpatch-errors
  2019-06-03 12:21 ` [PATCH 3/3] drivers/staging/rtl8192u: Fix of checkpatch-errors Christian Müller
@ 2019-06-03 13:05   ` Greg KH
  2019-06-03 13:09   ` Joe Perches
  1 sibling, 0 replies; 8+ messages in thread
From: Greg KH @ 2019-06-03 13:05 UTC (permalink / raw)
  To: Christian Müller
  Cc: johnfwhitmore, devel, linux-kernel, linux-kernel, felix.trommer

On Mon, Jun 03, 2019 at 02:21:04PM +0200, Christian Müller wrote:
> Fix issues that lead to multiple checkpatch warnings and errors, most of
> them regarding formatting of code and comments.
> Comments that contain only commented out code are removed as well.
> 
> Signed-off-by: Felix Trommer <felix.trommer@hotmail.de>
> Signed-off-by: Christian Müller <muellerch-privat@web.de>


- Your patch did many different things all at once, making it difficult
  to review.  All Linux kernel patches need to only do one thing at a
  time.  If you need to do multiple things (such as clean up all coding
  style issues in a file/driver), do it in a sequence of patches, each
  one doing only one thing.  This will make it easier to review the
  patches to ensure that they are correct, and to help alleviate any
  merge issues that larger patches can cause.

- You did not specify a description of why the patch is needed, or
  possibly, any description at all, in the email body.  Please read the
  section entitled "The canonical patch format" in the kernel file,
  Documentation/SubmittingPatches for what is needed in order to
  properly describe the change.

- You did not write a descriptive Subject: for the patch, allowing Greg,
  and everyone else, to know what this patch is all about.  Please read
  the section entitled "The canonical patch format" in the kernel file,
  Documentation/SubmittingPatches for what a proper Subject: line should
  look like.

If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.

thanks,

greg k-h's patch email bot

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/3] drivers/staging/rtl8192u: Remove comment-out code
  2019-06-03 12:21 ` [PATCH 2/3] drivers/staging/rtl8192u: Remove comment-out code Christian Müller
@ 2019-06-03 13:06   ` Greg KH
  0 siblings, 0 replies; 8+ messages in thread
From: Greg KH @ 2019-06-03 13:06 UTC (permalink / raw)
  To: Christian Müller
  Cc: devel, felix.trommer, linux-kernel, linux-kernel, johnfwhitmore

On Mon, Jun 03, 2019 at 02:21:03PM +0200, Christian Müller wrote:
> From: Felix Trommer <felix.trommer@hotmail.de>
> 
> Remove the majority of all commented-out code. Commented out code, that
> was adressed by a comment itself is not removed. The code that we left
> in as comments was mostly due to the "pseudo-code"-like nature of the
> code that helped to clarify certain functionalities.
> 
> Signed-off-by: Felix Trommer <felix.trommer@hotmail.de>
> Signed-off-by: Christian Müller <muellerch-privat@web.de>
> ---
>  drivers/staging/rtl8192u/ieee80211/dot11d.h   |  2 +-
>  .../staging/rtl8192u/ieee80211/ieee80211.h    | 35 ++-----
>  .../rtl8192u/ieee80211/ieee80211_crypt_ccmp.c |  1 -
>  .../rtl8192u/ieee80211/ieee80211_crypt_tkip.c |  1 -
>  .../rtl8192u/ieee80211/ieee80211_module.c     |  2 -
>  .../staging/rtl8192u/ieee80211/ieee80211_rx.c | 50 +---------
>  .../rtl8192u/ieee80211/ieee80211_softmac.c    | 93 +++----------------
>  .../rtl8192u/ieee80211/ieee80211_softmac_wx.c | 13 +--
>  .../staging/rtl8192u/ieee80211/ieee80211_tx.c |  3 +-
>  .../staging/rtl8192u/ieee80211/ieee80211_wx.c | 19 +---
>  .../rtl8192u/ieee80211/rtl819x_BAProc.c       |  3 -
>  .../staging/rtl8192u/ieee80211/rtl819x_HT.h   |  2 -
>  .../rtl8192u/ieee80211/rtl819x_HTProc.c       | 54 ++---------
>  .../staging/rtl8192u/ieee80211/rtl819x_Qos.h  |  4 +-
>  .../rtl8192u/ieee80211/rtl819x_TSProc.c       | 11 ---
>  drivers/staging/rtl8192u/r8190_rtl8256.c      |  3 -
>  drivers/staging/rtl8192u/r8192U_core.c        |  5 +-
>  drivers/staging/rtl8192u/r8192U_dm.c          | 60 ------------
>  drivers/staging/rtl8192u/r8192U_wx.c          |  2 -
>  drivers/staging/rtl8192u/r819xU_firmware.c    |  1 -
>  20 files changed, 38 insertions(+), 326 deletions(-)
> 
> diff --git a/drivers/staging/rtl8192u/ieee80211/dot11d.h b/drivers/staging/rtl8192u/ieee80211/dot11d.h
> index 8b485fa18089..f27267307b3f 100644
> --- a/drivers/staging/rtl8192u/ieee80211/dot11d.h
> +++ b/drivers/staging/rtl8192u/ieee80211/dot11d.h
> @@ -54,4 +54,4 @@ void dot11d_scan_complete(struct ieee80211_device *dev);
>  int is_legal_channel(struct ieee80211_device *dev, u8 channel);
>  int to_legal_channel(struct ieee80211_device *dev, u8 channel);
> 
> -#endif /* #ifndef __INC_DOT11D_H */
> +#endif

This type of comment is there for a good reason :(


> diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211.h b/drivers/staging/rtl8192u/ieee80211/ieee80211.h
> index 8be8a94a2253..d110e9333799 100644
> --- a/drivers/staging/rtl8192u/ieee80211/ieee80211.h
> +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211.h
> @@ -106,17 +106,13 @@ struct cb_desc {
>  	u8 bRTSUseShortGI:1;
>  	u8 bMulticast:1;
>  	u8 bBroadcast:1;
> -	/* u8 reserved2:2; */
>  	u8 drv_agg_enable:1;
>  	u8 reserved2:1;
> 
>  	/* Tx Desc related element(12-19) */
>  	u8 rata_index;
>  	u8 queue_index;
> -	/* u8 reserved3; */
> -	/* u8 reserved4; */
>  	u16 txbuf_size;
> -	/* u8 reserved5; */
>  	u8 RATRIndex;
>  	u8 reserved6;
>  	u8 reserved7;
> @@ -127,9 +123,6 @@ struct cb_desc {
>  	u8 rts_rate;
>  	u8 ampdu_factor;
>  	u8 ampdu_density;
> -	/* u8 reserved9; */
> -	/* u8 reserved10; */
> -	/* u8 reserved11; */
>  	u8 DrvAggrNum;
>  	u16 pkt_size;
>  	u8 reserved12;
> @@ -883,7 +876,8 @@ enum ieee80211_mfie {
>  	MFIE_TYPE_QOS_PARAMETER = 222,
>  };
> 
> -/* Minimal header; can be used for passing 802.11 frames with sufficient
> +/*
> + * Minimal header; can be used for passing 802.11 frames with sufficient
>   * information to determine what type of underlying data type is actually
>   * stored in the data.
>   */

That change is not removing commented out code :(

Please be a lot more careful as to what you are doing in a patch when
you submit it...

> @@ -1144,7 +1138,6 @@ struct ieee80211_tim_parameters {
>  	u8 tim_period;
>  } __packed;
> 
> -//#else
>  struct ieee80211_wmm_ts_info {
>  	u8 ac_dir_tid;
>  	u8 ac_up_psb;
> @@ -1274,7 +1267,6 @@ enum {WMM_all_frame, WMM_two_frame, WMM_four_frame, WMM_six_frame};
>  #define IEEE80211_PS_MBCAST IEEE80211_DTIM_MBCAST
> 
>  /* added by David for QoS 2006/6/30 */
> -//#define WMM_Hang_8187
>  #ifdef WMM_Hang_8187
>  #undef WMM_Hang_8187
>  #endif

Are you sure you should remove this commented out line?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 3/3] drivers/staging/rtl8192u: Fix of checkpatch-errors
  2019-06-03 12:21 ` [PATCH 3/3] drivers/staging/rtl8192u: Fix of checkpatch-errors Christian Müller
  2019-06-03 13:05   ` Greg KH
@ 2019-06-03 13:09   ` Joe Perches
  1 sibling, 0 replies; 8+ messages in thread
From: Joe Perches @ 2019-06-03 13:09 UTC (permalink / raw)
  To: Christian Müller, gregkh
  Cc: johnfwhitmore, devel, linux-kernel, linux-kernel, felix.trommer

On Mon, 2019-06-03 at 14:21 +0200, Christian Müller wrote:
> Fix issues that lead to multiple checkpatch warnings and errors, most of
> them regarding formatting of code and comments.
> Comments that contain only commented out code are removed as well.

Generally, the quantity of changes in this patch makes it
impossible to review and apply.

It's better to do single issue fixes in separate patches.

All single line whitespace only changes can generally be done
in one patch as long as you verify that the object files have
pre and post the patch have not changed.

And the first block of this patch doesn't look like it could
ever compile properly.

> diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211.h b/drivers/staging/rtl8192u/ieee80211/ieee80211.h
[]
> @@ -446,26 +446,26 @@ typedef enum _InitialGainOpType {
[]
>  #else
> -#define IEEE80211_DEBUG (level, fmt, args...) do {} while (0)
> -#define IEEE80211_DEBUG_DATA (level, data, datalen) do {} while(0)
> +#define IEEE80211_DEBUG ((level, fmt, args...) do {} while (0))
> +#define IEEE80211_DEBUG_DATA ((level, data, datalen) do {} while (0))

These need to have the space removed after the
macro identifier before the open parentheses and
another level of parentheses removed instead.

#define IEEE80211_DEBUG(level, fmt, args...) do {} while (0)
#define IEEE80211_DEBUG_DATA(level, data, datalen) do {} while (0)

Given that it's never been compiled, it might as well be removed
in another patch.

I didn't look at the rest.


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-06-03 13:10 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-03 12:21 [PATCH 0/3] Fixing style errors in staging/drivers/rtl8192u Christian Müller
2019-06-03 12:21 ` [PATCH 1/3] drivers/staging/rtl8192u: Reformat comments Christian Müller
2019-06-03 13:04   ` Greg KH
2019-06-03 12:21 ` [PATCH 2/3] drivers/staging/rtl8192u: Remove comment-out code Christian Müller
2019-06-03 13:06   ` Greg KH
2019-06-03 12:21 ` [PATCH 3/3] drivers/staging/rtl8192u: Fix of checkpatch-errors Christian Müller
2019-06-03 13:05   ` Greg KH
2019-06-03 13:09   ` Joe Perches

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.