All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Ioana Ciornei <ciorneiioana@gmail.com>
Cc: outreachy-kernel@googlegroups.com
Subject: Re: [Outreachy kernel] [PATCH v2] staging: p80211conv: Replace memcpy with ether_addr_copy
Date: Wed, 18 Mar 2015 11:19:38 +0100	[thread overview]
Message-ID: <20150318101938.GA5422@kroah.com> (raw)
In-Reply-To: <1426633858-22689-1-git-send-email-ciorneiioana@gmail.com>

On Wed, Mar 18, 2015 at 01:10:58AM +0200, Ioana Ciornei wrote:
> Replace memcpy() with ether_addr_copy() since addresses are __aligned(2).
> The 2 structures are aligned to u16:
> 
> struct p80211_hdr_a3 {
> 	__le16 fc;		/* 0	2 */
> 	u16 dur;		/* 2	2 */
> 	u8 a1[ETH_ALEN];	/* 4	6 */	
> 	u8 a2[ETH_ALEN];	/* 10	6 */
> 	u8 a3[ETH_ALEN];	/* 16	6 */
> 	u16 seq;		/* 22	2 */
> } __packed;
> 
> Total size: 24
> 
> struct wlan_ethhdr {
> 	u8 daddr[WLAN_ETHADDR_LEN];	/* 0	6 */
> 	u8 saddr[WLAN_ETHADDR_LEN];	/* 6	6 */
> 	u16 type;			/* 12	2 */
> } __packed;
> 
> Total size: 14
> 
> Signed-off-by: Ioana Ciornei <ciorneiioana@gmail.com>
> ---
> 
> Changes in v2:
> 	- added explanations on why the addresses are aligned
> 
>  drivers/staging/wlan-ng/p80211conv.c | 21 +++++++++++----------
>  1 file changed, 11 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/staging/wlan-ng/p80211conv.c b/drivers/staging/wlan-ng/p80211conv.c
> index bd69e8c..a51fbfe 100644
> --- a/drivers/staging/wlan-ng/p80211conv.c
> +++ b/drivers/staging/wlan-ng/p80211conv.c
> @@ -62,6 +62,7 @@
>  #include <linux/etherdevice.h>
>  #include <linux/if_ether.h>
>  #include <linux/byteorder/generic.h>
> 
>  #include <asm/byteorder.h>
>  
> @@ -178,21 +179,21 @@ int skb_ether_to_p80211(wlandevice_t *wlandev, u32 ethconv,

This patch is corrupted, it looks like you edited it by hand, which is
fine if you know the format, but when you don't, it breaks the tool and
can not be applied.

Look at that hunk above, it doesn't do anything, which is a hint that
something bad went wrong :(

Please fix up and resend.

thanks,

greg k-h


  reply	other threads:[~2015-03-18 10:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-17 23:10 [PATCH v2] staging: p80211conv: Replace memcpy with ether_addr_copy Ioana Ciornei
2015-03-18 10:19 ` Greg KH [this message]
2015-03-18 13:51   ` [Outreachy kernel] " Ioana Ciornei

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150318101938.GA5422@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=ciorneiioana@gmail.com \
    --cc=outreachy-kernel@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.