[PATCH 2/3] drivers/staging/rtl8192u: Remove comment-out code

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

 



From: Felix Trommer <felix.trommer@xxxxxxxxxx>

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@xxxxxxxxxx>
Signed-off-by: Christian Müller <muellerch-privat@xxxxxx>
---
 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

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





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