diff mbox

[OPW,kernel,v2,09/13] staging: rtl8187se: fixup multi-line comment

Message ID 1382398644-511-10-git-send-email-teobaluta@gmail.com
State New, archived
Headers show

Commit Message

Teodora Baluta Oct. 21, 2013, 11:37 p.m. UTC
This patch ensures that all multi-line comments are consistent with the Linux
kernel coding style for long (multi-line) comments.

Signed-off-by: Teodora Baluta <teobaluta@gmail.com>

---
Changes since v1:
* change only existing C89 comments to use the preferred multi-line style
* change multi-line comment to single-line comment for one small comment
---
 drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c |   38 +++++++++++---------
 1 file changed, 22 insertions(+), 16 deletions(-)

Comments

Josh Triplett Oct. 21, 2013, 11:44 p.m. UTC | #1
On Tue, Oct 22, 2013 at 02:37:20AM +0300, Teodora Baluta wrote:
> This patch ensures that all multi-line comments are consistent with the Linux
> kernel coding style for long (multi-line) comments.
> 
> Signed-off-by: Teodora Baluta <teobaluta@gmail.com>

Reviewed-by: Josh Triplett <josh@joshtriplett.org>

>  drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c |   38 +++++++++++---------
>  1 file changed, 22 insertions(+), 16 deletions(-)
> 
> diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c
> index edcce26..372e227 100644
> --- a/drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c
> +++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c
> @@ -209,14 +209,13 @@ 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
> +	 * call both MSDU and MPDU encryption functions from here.
>  	 */
> -	/* 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;
>  	if (crypt->ops->encrypt_msdu)
> @@ -407,14 +406,15 @@ int ieee80211_rtl_xmit(struct sk_buff *skb,
>  
>  		if (ieee->iw_mode == IW_MODE_INFRA) {
>  			fc |= IEEE80211_FCTL_TODS;
> -			/* To DS: Addr1 = BSSID, Addr2 = SA,
> -			Addr3 = DA */
> +			/* To DS: Addr1 = BSSID, Addr2 = SA, Addr3 = DA */
>  			memcpy(&header.addr1, ieee->current_network.bssid, ETH_ALEN);
>  			memcpy(&header.addr2, &src, ETH_ALEN);
>  			memcpy(&header.addr3, &dest, ETH_ALEN);
>  		} else if (ieee->iw_mode == IW_MODE_ADHOC) {
> -			/* not From/To DS: Addr1 = DA, Addr2 = SA,
> -			Addr3 = BSSID */
> +			/*
> +			 * not From/To DS: Addr1 = DA, Addr2 = SA,
> +			 * Addr3 = BSSID
> +			 */
>  			memcpy(&header.addr1, dest, ETH_ALEN);
>  			memcpy(&header.addr2, src, ETH_ALEN);
>  			memcpy(&header.addr3, ieee->current_network.bssid, ETH_ALEN);
> @@ -459,8 +459,10 @@ int ieee80211_rtl_xmit(struct sk_buff *skb,
>  			bytes_per_frag -= crypt->ops->extra_prefix_len +
>  				crypt->ops->extra_postfix_len;
>  
> -		/* Number of fragments is the total bytes_per_frag /
> -		* payload_per_fragment */
> +		/*
> +		 * Number of fragments is the total bytes_per_frag /
> +		 * payload_per_fragment
> +		 */
>  		nr_frags = bytes / bytes_per_frag;
>  		bytes_last_frag = bytes % bytes_per_frag;
>  		if (bytes_last_frag)
> @@ -468,9 +470,11 @@ int ieee80211_rtl_xmit(struct sk_buff *skb,
>  		else
>  			bytes_last_frag = bytes_per_frag;
>  
> -		/* When we allocate the TXB we allocate enough space for the reserve
> -		* and full fragment bytes (bytes_per_frag doesn't include prefix,
> -		* postfix, header, FCS, etc.) */
> +		/*
> +		 * When we allocate the TXB we allocate enough space for the 
> +		 * reserve and full fragment bytes (bytes_per_frag doesn't
> +		 * include prefix, postfix, header, FCS, etc.)
> +		 */
>  		txb = ieee80211_alloc_txb(nr_frags, frag_size, GFP_ATOMIC);
>  		if (unlikely(!txb)) {
>  			printk(KERN_WARNING "%s: Could not allocate TXB\n",
> @@ -489,8 +493,10 @@ int ieee80211_rtl_xmit(struct sk_buff *skb,
>  			frag_hdr = (struct ieee80211_hdr_3addrqos *)skb_put(skb_frag, hdr_len);
>  			memcpy(frag_hdr, &header, hdr_len);
>  
> -			/* If this is not the last fragment, then add the MOREFRAGS
> -			* bit to the frame control */
> +			/*
> +			 * If this is not the last fragment, then add the MOREFRAGS
> +			 * bit to the frame control
> +			 */
>  			if (i != nr_frags - 1) {
>  				frag_hdr->frame_ctl = cpu_to_le16(
>  					fc | IEEE80211_FCTL_MOREFRAGS);
> -- 
> 1.7.10.4
> 
> -- 
> You received this message because you are subscribed to the Google Groups "opw-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to opw-kernel+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
diff mbox

Patch

diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c
index edcce26..372e227 100644
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c
@@ -209,14 +209,13 @@  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
+	 * call both MSDU and MPDU encryption functions from here.
 	 */
-	/* 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;
 	if (crypt->ops->encrypt_msdu)
@@ -407,14 +406,15 @@  int ieee80211_rtl_xmit(struct sk_buff *skb,
 
 		if (ieee->iw_mode == IW_MODE_INFRA) {
 			fc |= IEEE80211_FCTL_TODS;
-			/* To DS: Addr1 = BSSID, Addr2 = SA,
-			Addr3 = DA */
+			/* To DS: Addr1 = BSSID, Addr2 = SA, Addr3 = DA */
 			memcpy(&header.addr1, ieee->current_network.bssid, ETH_ALEN);
 			memcpy(&header.addr2, &src, ETH_ALEN);
 			memcpy(&header.addr3, &dest, ETH_ALEN);
 		} else if (ieee->iw_mode == IW_MODE_ADHOC) {
-			/* not From/To DS: Addr1 = DA, Addr2 = SA,
-			Addr3 = BSSID */
+			/*
+			 * not From/To DS: Addr1 = DA, Addr2 = SA,
+			 * Addr3 = BSSID
+			 */
 			memcpy(&header.addr1, dest, ETH_ALEN);
 			memcpy(&header.addr2, src, ETH_ALEN);
 			memcpy(&header.addr3, ieee->current_network.bssid, ETH_ALEN);
@@ -459,8 +459,10 @@  int ieee80211_rtl_xmit(struct sk_buff *skb,
 			bytes_per_frag -= crypt->ops->extra_prefix_len +
 				crypt->ops->extra_postfix_len;
 
-		/* Number of fragments is the total bytes_per_frag /
-		* payload_per_fragment */
+		/*
+		 * Number of fragments is the total bytes_per_frag /
+		 * payload_per_fragment
+		 */
 		nr_frags = bytes / bytes_per_frag;
 		bytes_last_frag = bytes % bytes_per_frag;
 		if (bytes_last_frag)
@@ -468,9 +470,11 @@  int ieee80211_rtl_xmit(struct sk_buff *skb,
 		else
 			bytes_last_frag = bytes_per_frag;
 
-		/* When we allocate the TXB we allocate enough space for the reserve
-		* and full fragment bytes (bytes_per_frag doesn't include prefix,
-		* postfix, header, FCS, etc.) */
+		/*
+		 * When we allocate the TXB we allocate enough space for the 
+		 * reserve and full fragment bytes (bytes_per_frag doesn't
+		 * include prefix, postfix, header, FCS, etc.)
+		 */
 		txb = ieee80211_alloc_txb(nr_frags, frag_size, GFP_ATOMIC);
 		if (unlikely(!txb)) {
 			printk(KERN_WARNING "%s: Could not allocate TXB\n",
@@ -489,8 +493,10 @@  int ieee80211_rtl_xmit(struct sk_buff *skb,
 			frag_hdr = (struct ieee80211_hdr_3addrqos *)skb_put(skb_frag, hdr_len);
 			memcpy(frag_hdr, &header, hdr_len);
 
-			/* If this is not the last fragment, then add the MOREFRAGS
-			* bit to the frame control */
+			/*
+			 * If this is not the last fragment, then add the MOREFRAGS
+			 * bit to the frame control
+			 */
 			if (i != nr_frags - 1) {
 				frag_hdr->frame_ctl = cpu_to_le16(
 					fc | IEEE80211_FCTL_MOREFRAGS);