Staging: rtl8192e: Use ether_addr_copy() instead of memcpy()
This patch replaces memcpy with ether_addr_copy.
Also pathole was used to make sure that arguments passed to ether_addr_copy
are aligned to u16.
First argument is iwe.u.ap_addr.sa_data i output of pahole is:
struct iw_event {
__u16 len; /* 0 2 */
__u16 cmd; /* 2 2 */
/* XXX 4 bytes hole, try to pack */
union iwreq_data u; /* 8 16 */
/* size: 24, cachelines: 1, members: 3 */
/* sum members: 20, holes: 1, sum holes: 4 */
/* last cacheline: 24 bytes */
};
and inside union iwreq_data u is sa_data:
struct sockaddr {
/* typedef sa_family_t -> __kernel_sa_family_t */ short unsigned int sa_family; /* 8 2 */
char sa_data[14]; /* 10 14 */
} ap_addr; /* 16 */
sa_data is a char array of size 14, and the number of bytes copied using
ether_addr_copy() is 6.
Second argument is network->bssid and output of pahole is:
struct rtllib_network {
u8 bssid[6]; /* 0 6 */
u8 channel; /* 6 1 */
u8 ssid[33]; /* 7 33 */
u8 ssid_len; /* 40 1 */
u8 hidden_ssid[33]; /* 41 33 */
/* --- cacheline 1 boundary (64 bytes) was 10 bytes ago --- */
u8 hidden_ssid_len; /* 74 1 */