From: Krzysztof Adamski <k@japko.eu>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Malcolm Priestley <tvboxspy@gmail.com>
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: [PATCH] staging: vt6656: Use ether_addr_copy() in vnt_fill_ieee80211_rts.
Date: Mon, 8 Dec 2014 12:13:41 +0100 [thread overview]
Message-ID: <20141208111341.GA11489@x61s.lan> (raw)
Both struct ieee80211_rts and struct ieee80211_hdr defined in
linux/ieee80211.h are declared as __aligned(2) so it is safe to use
ether_addr_copy() instead of memcpy().
Signed-off-by: Krzysztof Adamski <k@japko.eu>
---
drivers/staging/vt6656/rxtx.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c
index ea5140a..280c923 100644
--- a/drivers/staging/vt6656/rxtx.c
+++ b/drivers/staging/vt6656/rxtx.c
@@ -36,6 +36,7 @@
*
*/
+#include <linux/etherdevice.h>
#include "device.h"
#include "rxtx.h"
#include "card.h"
@@ -392,8 +393,8 @@ static int vnt_fill_ieee80211_rts(struct vnt_usb_send_context *tx_context,
rts->frame_control =
cpu_to_le16(IEEE80211_FTYPE_CTL | IEEE80211_STYPE_RTS);
- memcpy(rts->ra, hdr->addr1, ETH_ALEN);
- memcpy(rts->ta, hdr->addr2, ETH_ALEN);
+ ether_addr_copy(rts->ra, hdr->addr1);
+ ether_addr_copy(rts->ta, hdr->addr2);
return 0;
}
--
1.9.3
next reply other threads:[~2014-12-08 11:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-08 11:13 Krzysztof Adamski [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-12-16 8:30 [PATCH] staging: vt6656: Use ether_addr_copy() in vnt_fill_ieee80211_rts Krzysztof Adamski
2014-12-16 8:42 ` Joe Perches
2014-12-16 8:53 ` Krzysztof Adamski
2015-01-13 3:37 ` Greg Kroah-Hartman
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=20141208111341.GA11489@x61s.lan \
--to=k@japko.eu \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tvboxspy@gmail.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.