]> git.baikalelectronics.ru Git - kernel.git/commit
rtlwifi: Fix possible unaligned array in ether_addr_copy()
authorLarry Finger <Larry.Finger@lwfinger.net>
Wed, 8 Oct 2014 17:44:55 +0000 (12:44 -0500)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 8 Oct 2014 19:24:16 +0000 (15:24 -0400)
commit25908b1034e62d0910163220a85d54f72067b8f3
tree22e0bade399ab65eb5027f7c00bb60213a5847e3
parent8561ad94b985de0dc844bc29a29865838b172cda
rtlwifi: Fix possible unaligned array in ether_addr_copy()

Two macros used to copy BSSID information use ether_addr_copy(), thus
the arrays must be 2-byte aligned. In one case, the array could become
unaligned if the struct containing it were changed. Use the __unaligned(2)
attribute to retain the necessary alignment. In addition, the magic number
used to specify the size of the array is replaced by ETH_ALEN.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rtlwifi/wifi.h