diff options
author | Krzysztof Adamski <k@japko.eu> | 2014-12-08 12:13:41 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-01-12 19:38:40 -0800 |
commit | ccc103f564d992bb3260a9195980b26098384943 (patch) | |
tree | 8924f2ed8d7c56c31a4459482d07c6bfa5b9c897 /drivers/staging/vt6656 | |
parent | b7c9cd450baed139ed07c997071ec5b3164ee1c4 (diff) | |
download | op-kernel-dev-ccc103f564d992bb3260a9195980b26098384943.zip op-kernel-dev-ccc103f564d992bb3260a9195980b26098384943.tar.gz |
staging: vt6656: Use ether_addr_copy() in vnt_fill_ieee80211_rts.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vt6656')
-rw-r--r-- | drivers/staging/vt6656/rxtx.c | 5 |
1 files 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; } |