diff options
author | Michael Straube <straube.linux@gmail.com> | 2021-08-23 14:00:59 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-08-26 12:23:11 +0200 |
commit | 8aa824f2ec1b66fdbf7e5b87e519bced35a35114 (patch) | |
tree | c582dfbe7ed1a4d0aef36d8bcb23e8726ed2bc0f | |
parent | staging: r8188eu: remove unnecessary parentheses (diff) | |
download | linux-8aa824f2ec1b66fdbf7e5b87e519bced35a35114.tar.xz linux-8aa824f2ec1b66fdbf7e5b87e519bced35a35114.zip |
staging: r8188eu: ensure proper alignment for eth address buffers
Add __aligned(2) to eth address buffers in structs rx_pkt_attrib and
pkt_attrib to ensure proper alignment for usage with functions from
<linux/etherdevice.h>
Acked-by: Phillip Potter <phil@philpotter.co.uk>
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20210823120106.9633-2-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/r8188eu/include/rtw_recv.h | 10 | ||||
-rw-r--r-- | drivers/staging/r8188eu/include/rtw_xmit.h | 8 |
2 files changed, 9 insertions, 9 deletions
diff --git a/drivers/staging/r8188eu/include/rtw_recv.h b/drivers/staging/r8188eu/include/rtw_recv.h index 81594e7aed51..1b41f8d7d079 100644 --- a/drivers/staging/r8188eu/include/rtw_recv.h +++ b/drivers/staging/r8188eu/include/rtw_recv.h @@ -109,11 +109,11 @@ struct rx_pkt_attrib { u16 eth_type; - u8 dst[ETH_ALEN]; - u8 src[ETH_ALEN]; - u8 ta[ETH_ALEN]; - u8 ra[ETH_ALEN]; - u8 bssid[ETH_ALEN]; + u8 dst[ETH_ALEN] __aligned(2); + u8 src[ETH_ALEN] __aligned(2); + u8 ta[ETH_ALEN] __aligned(2); + u8 ra[ETH_ALEN] __aligned(2); + u8 bssid[ETH_ALEN] __aligned(2); u8 ack_policy; diff --git a/drivers/staging/r8188eu/include/rtw_xmit.h b/drivers/staging/r8188eu/include/rtw_xmit.h index e1418a3f7ed1..5f6e2402e5c4 100644 --- a/drivers/staging/r8188eu/include/rtw_xmit.h +++ b/drivers/staging/r8188eu/include/rtw_xmit.h @@ -122,10 +122,10 @@ struct pkt_attrib { u8 ack_policy; u8 mac_id; u8 vcs_mode; /* virtual carrier sense method */ - u8 dst[ETH_ALEN]; - u8 src[ETH_ALEN]; - u8 ta[ETH_ALEN]; - u8 ra[ETH_ALEN]; + u8 dst[ETH_ALEN] __aligned(2); + u8 src[ETH_ALEN] __aligned(2); + u8 ta[ETH_ALEN] __aligned(2); + u8 ra[ETH_ALEN] __aligned(2); u8 key_idx; u8 qos_en; u8 ht_en; |