From 8aa824f2ec1b66fdbf7e5b87e519bced35a35114 Mon Sep 17 00:00:00 2001 From: Michael Straube Date: Mon, 23 Aug 2021 14:00:59 +0200 Subject: 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 Acked-by: Phillip Potter Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20210823120106.9633-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman --- drivers/staging/r8188eu/include/rtw_recv.h | 10 +++++----- 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; -- cgit v1.2.3