Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: rtl8187se: use C89 comment style instead of C99-style

This patch fixes the comments in file ieee80211/ieee80211_tx.c from
driver rtl8187se, as reported by checkpatch. The C89 comments that
contain code
are deleted.

Signed-off-by: Teodora Baluta <teobaluta@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Teodora Baluta and committed by
Greg Kroah-Hartman
d31d4785 d27a71a2

+32 -30
+32 -30
drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c
··· 32 32 ******************************************************************************/ 33 33 34 34 #include <linux/compiler.h> 35 - //#include <linux/config.h> 36 35 #include <linux/errno.h> 37 36 #include <linux/if_arp.h> 38 37 #include <linux/in6.h> ··· 206 207 /* To encrypt, frame format is: 207 208 * IV (4 bytes), clear payload (including SNAP), ICV (4 bytes) */ 208 209 209 - // PR: FIXME: Copied from hostap. Check fragmentation/MSDU/MPDU encryption. 210 + /* PR: FIXME: Copied from hostap. Check fragmentation/MSDU/MPDU encryption. */ 210 211 /* Host-based IEEE 802.11 fragmentation for TX is not yet supported, so 211 212 * call both MSDU and MPDU encryption functions from here. */ 212 213 atomic_inc(&crypt->refcnt); ··· 269 270 return txb; 270 271 } 271 272 272 - // Classify the to-be send data packet 273 - // Need to acquire the sent queue index. 273 + /* 274 + * Classify the to-be send data packet 275 + * Need to acquire the sent queue index. 276 + */ 274 277 static int 275 278 ieee80211_classify(struct sk_buff *skb, struct ieee80211_network *network) 276 279 { ··· 288 287 const struct iphdr *ih = (struct iphdr *)(skb->data + \ 289 288 sizeof(struct ether_header)); 290 289 wme_UP = (ih->tos >> 5)&0x07; 291 - } else if (vlan_tx_tag_present(skb)) {//vtag packet 290 + } else if (vlan_tx_tag_present(skb)) {/* vtag packet */ 292 291 #ifndef VLAN_PRI_SHIFT 293 292 #define VLAN_PRI_SHIFT 13 /* Shift to find VLAN user priority */ 294 293 #define VLAN_PRI_MASK 7 /* Mask for user priority bits in VLAN */ ··· 296 295 u32 tag = vlan_tx_tag_get(skb); 297 296 wme_UP = (tag >> VLAN_PRI_SHIFT) & VLAN_PRI_MASK; 298 297 } else if(ETH_P_PAE == ntohs(((struct ethhdr *)skb->data)->h_proto)) { 299 - //printk(KERN_WARNING "type = normal packet\n"); 300 298 wme_UP = 7; 301 299 } 302 300 ··· 325 325 326 326 struct ieee80211_crypt_data* crypt; 327 327 328 - //printk(KERN_WARNING "upper layer packet!\n"); 329 328 spin_lock_irqsave(&ieee->lock, flags); 330 329 331 - /* If there is no driver handler to take the TXB, don't bother 332 - * creating it... */ 330 + /* 331 + * If there is no driver handler to take the TXB, don't bother 332 + * creating it... 333 + */ 333 334 if ((!ieee->hard_start_xmit && !(ieee->softmac_features & IEEE_SOFTMAC_TX_QUEUE))|| 334 335 ((!ieee->softmac_data_hard_start_xmit && (ieee->softmac_features & IEEE_SOFTMAC_TX_QUEUE)))) { 335 336 printk(KERN_WARNING "%s: No xmit handler.\n", ··· 408 407 memcpy(&header.addr2, src, ETH_ALEN); 409 408 memcpy(&header.addr3, ieee->current_network.bssid, ETH_ALEN); 410 409 } 411 - // printk(KERN_WARNING "essid MAC address is %pM", &header.addr1); 412 410 header.frame_ctl = cpu_to_le16(fc); 413 - //hdr_len = IEEE80211_3ADDR_LEN; 414 411 415 - /* Determine fragmentation size based on destination (multicast 416 - * and broadcast are not fragmented) */ 412 + /* 413 + * Determine fragmentation size based on destination (multicast 414 + * and broadcast are not fragmented) 415 + */ 417 416 if (is_multicast_ether_addr(header.addr1)) { 418 417 frag_size = MAX_FRAG_THRESHOLD; 419 418 qos_ctl = QOS_CTL_NOTCONTAIN_ACK; 420 419 } 421 420 else { 422 - //printk(KERN_WARNING "&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&frag_size = %d\n", frag_size); 423 - frag_size = ieee->fts;//default:392 421 + /* default:392 */ 422 + frag_size = ieee->fts; 424 423 qos_ctl = 0; 425 424 } 426 425 ··· 433 432 hdr_len = IEEE80211_3ADDR_LEN; 434 433 } 435 434 436 - /* Determine amount of payload per fragment. Regardless of if 437 - * this stack is providing the full 802.11 header, one will 438 - * eventually be affixed to this fragment -- so we must account for 439 - * it when determining the amount of payload space. */ 440 - //bytes_per_frag = frag_size - (IEEE80211_3ADDR_LEN + (ieee->current_network->QoS_Enable ? 2:0)); 435 + /* 436 + * Determine amount of payload per fragment. Regardless of if 437 + * this stack is providing the full 802.11 header, one will 438 + * eventually be affixed to this fragment -- so we must account 439 + * for it when determining the amount of payload space. 440 + */ 441 441 bytes_per_frag = frag_size - hdr_len; 442 442 if (ieee->config & 443 443 (CFG_IEEE80211_COMPUTE_FCS | CFG_IEEE80211_RESERVE_FCS)) ··· 491 489 bytes = bytes_last_frag; 492 490 } 493 491 if(ieee->current_network.QoS_Enable) { 494 - // add 1 only indicate to corresponding seq number control 2006/7/12 492 + /* 493 + * add 1 only indicate to corresponding seq number 494 + * control 2006/7/12 495 + */ 495 496 frag_hdr->seq_ctl = cpu_to_le16(ieee->seq_ctrl[UP2AC(skb->priority)+1]<<4 | i); 496 - //printk(KERN_WARNING "skb->priority = %d,", skb->priority); 497 - //printk(KERN_WARNING "type:%d: seq = %d\n",UP2AC(skb->priority),ieee->seq_ctrl[UP2AC(skb->priority)+1]); 498 497 } else { 499 498 frag_hdr->seq_ctl = cpu_to_le16(ieee->seq_ctrl[0]<<4 | i); 500 499 } 501 - //frag_hdr->seq_ctl = cpu_to_le16(ieee->seq_ctrl<<4 | i); 502 - // 503 500 504 501 /* Put a SNAP header on the first fragment */ 505 502 if (i == 0) { ··· 513 512 /* Advance the SKB... */ 514 513 skb_pull(skb, bytes); 515 514 516 - /* Encryption routine will move the header forward in order 517 - * to insert the IV between the header and the payload */ 515 + /* 516 + * Encryption routine will move the header forward in 517 + * order to insert the IV between the header and the 518 + * payload 519 + */ 518 520 if (encrypt) 519 521 ieee80211_encrypt_fragment(ieee, skb_frag, hdr_len); 520 522 if (ieee->config & 521 523 (CFG_IEEE80211_COMPUTE_FCS | CFG_IEEE80211_RESERVE_FCS)) 522 524 skb_put(skb_frag, 4); 523 525 } 524 - // Advance sequence number in data frame. 525 - //printk(KERN_WARNING "QoS Enalbed? %s\n", ieee->current_network.QoS_Enable?"Y":"N"); 526 + /* Advance sequence number in data frame. */ 526 527 if (ieee->current_network.QoS_Enable) { 527 528 if (ieee->seq_ctrl[UP2AC(skb->priority) + 1] == 0xFFF) 528 529 ieee->seq_ctrl[UP2AC(skb->priority) + 1] = 0; ··· 536 533 else 537 534 ieee->seq_ctrl[0]++; 538 535 } 539 - //--- 540 536 }else{ 541 537 if (unlikely(skb->len < sizeof(struct ieee80211_hdr_3addr))) { 542 538 printk(KERN_WARNING "%s: skb too small (%d).\n",