Staging: rtl8192u: ieee80211: Change from // to /* */
PATCH 1/1 Staging: rtl8192u: ieee80211: Change from // to /* */
Remove the all '//' and instead of '/* */' put.
This Error found with checkpatch.pl
Signed-off-by Hatice ERTURK <[email protected]>
--- drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c | 104 +++++++++++----------- 1 file changed, 52 insertions(+), 52 deletions(-)
drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c +52 -52
@@ -207,8 +207,8 @@ int ieee80211_encrypt_fragment(/* 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); res =0 ;
@@ -230,7 +230,7 @@ int ieee80211_encrypt_fragment(void ieee80211_txb_free (struct ieee80211_txb *txb) { -//int i; +/* int i; */ if (unlikely (!txb))return ;kfree (txb);
@@ -269,8 +269,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) {
@@ -280,7 +280,7 @@ ieee80211_classify(struct sk_buff *skb, struct ieee80211_network *network)if (eth->h_proto !=htons (ETH_P_IP ))return 0 ; -// IEEE80211_DEBUG_DATA(IEEE80211_DL_DATA, skb->data, skb->len); +/* IEEE80211_DEBUG_DATA(IEEE80211_DL_DATA, skb->data, skb->len); */ ip =ip_hdr (skb);switch (ip->tos &0xfc ) {case 0x20 :
@@ -317,11 +317,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
@@ -383,7 +383,7 @@ static void ieee80211_qurey_ShortPreambleMode(struct ieee80211_device *ieee, { tcb_desc->bUseShortPreamble = false;if (tcb_desc->data_rate ==2 ) - {//// 1M can only use Long Preamble. 11B spec + {/* 1M can only use Long Preamble. 11B spec */ return ; }else if (ieee->current_network.capability &WLAN_CAPABILITY_SHORT_PREAMBLE )
@@ -427,9 +427,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 ;
@@ -439,25 +439,25 @@ static void ieee80211_query_protectionmode(struct ieee80211_device *ieee,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 { -// (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;
@@ -465,57 +465,57 @@ 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. + {/* 11n High throughput case. */ PRT_HIGH_THROUGHPUT pHTInfo = ieee->pHTInfo;while (true) { -//check ERP protection +/* check ERP protection */ if (ieee->current_network.buseprotection) - {// CTS-to-SELF + {/* 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;
@@ -523,11 +523,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 ;
@@ -583,7 +583,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 */ {PTX_TS_RECORD pTS =NULL ;if (!GetTs (ieee, (PTS_COMMON_INFO *)(&pTS), dst, skb->priority,TX_DIR , true))
@@ -674,7 +674,7 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev) fc =IEEE80211_FTYPE_DATA ; -//if(ieee->current_network.QoS_Enable) +/* if(ieee->current_network.QoS_Enable) */ if (qos_actived) fc |=IEEE80211_STYPE_QOS_DATA ;else
@@ -704,17 +704,17 @@ 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 ; } -//if (ieee->current_network.QoS_Enable) +/* if (ieee->current_network.QoS_Enable) */ if (qos_actived) { 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 ;
@@ -754,7 +754,7 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev) txb->encrypted = encrypt; txb->payload_size = bytes; -//if (ieee->current_network.QoS_Enable) +/* if (ieee->current_network.QoS_Enable) */ if (qos_actived) { txb->queue_index =UP2AC (skb->priority);
@@ -768,7 +768,7 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev) skb_frag = txb->fragments[i]; tcb_desc = (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;/* UP2AC(skb->priority); */ tcb_desc->queue_index =UP2AC (skb->priority); }else { skb_frag->priority =WME_AC_BK ;
@@ -801,10 +801,10 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev)/* The last fragment takes the remaining length */ bytes = bytes_last_frag; } -//if(ieee->current_network.QoS_Enable) +/* 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);
@@ -864,7 +864,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) {cb_desc *tcb_desc = (cb_desc *)(txb->fragments[0 ]->cb +MAX_DEV_ADDR_SIZE );
@@ -877,7 +877,7 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev)if (tcb_desc->bMulticast || tcb_desc->bBroadcast) tcb_desc->data_rate = ieee->basic_rate;else -//tcb_desc->data_rate = CURRENT_RATE(ieee->current_network.mode, ieee->rate, ieee->HTCurrentOperaRate); +/* tcb_desc->data_rate = CURRENT_RATE(ieee->current_network.mode, ieee->rate, ieee->HTCurrentOperaRate); */ tcb_desc->data_rate =CURRENT_RATE (ieee->mode, ieee->rate, ieee->HTCurrentOperaRate);ieee80211_qurey_ShortPreambleMode (ieee, tcb_desc);ieee80211_tx_query_agg_cap (ieee, txb->fragments[0 ], tcb_desc);
@@ -885,8 +885,8 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev)ieee80211_query_BandwidthMode (ieee, tcb_desc);ieee80211_query_protectionmode (ieee, tcb_desc, txb->fragments[0 ]);ieee80211_query_seqnum (ieee, txb->fragments[0 ], header.addr1); -// IEEE80211_DEBUG_DATA(IEEE80211_DL_DATA, txb->fragments[0]->data, txb->fragments[0]->len); -//IEEE80211_DEBUG_DATA(IEEE80211_DL_DATA, tcb_desc, sizeof(cb_desc)); +/* IEEE80211_DEBUG_DATA(IEEE80211_DL_DATA, txb->fragments[0]->data, txb->fragments[0]->len); +IEEE80211_DEBUG_DATA(IEEE80211_DL_DATA, tcb_desc, sizeof(cb_desc)); */ }spin_unlock_irqrestore (&ieee->lock, flags);dev_kfree_skb_any (skb);
Signature · 1 line
1.9.1
Greg KH
maintainerQuoted 24 lines · Hatice ERT�RK
Remove the all '//' and instead of '/* */' put.
This Error found with checkpatch.plSigned-off-by Hatice ERTURK <[email protected]>--- drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c | 104 +++++++++++----------- 1 file changed, 52 insertions(+), 52 deletions(-)drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c +2
-2@@ -207,8 +207,8 @@ int ieee80211_encrypt_fragment(/* 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); res =0 ;
drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c int ieee80211_encrypt_fragment( · line 233
Quoted 5 lines
drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c +1
-1@@ -230,7 +230,7 @@ int ieee80211_encrypt_fragment(void ieee80211_txb_free (struct ieee80211_txb *txb) { -//int i; +/* int i; */
Just remove lines that are not needed anymore.
drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c static struct ieee80211_txb *ieee80211_alloc_txb(int nr_frags, int txb_size, · line 273
Quoted 11 lines
drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c +2
-2if (unlikely (!txb))return ;kfree (txb);@@ -269,8 +269,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. */
This is not the correct way to do multi-line comment blocks :(