mirror of https://gitee.com/openkylin/linux.git
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>
This commit is contained in:
parent
b7c9cd450b
commit
ccc103f564
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue