From 06c111072892d3f5fed9d73d1becb59d3f33410b Mon Sep 17 00:00:00 2001 From: Mateusz Kulikowski Date: Sun, 31 May 2015 20:19:21 +0200 Subject: staging: rtl8192e: Make ethernet addresses properly aligned Reorder ethernet addresses allocated on stack or in non-packed structures to keep them aligned(2). Use ETH_ALEN as array length in places where it was hardcoded to 6. Alignment verified using pahole where possible and target-tested with BUG_ON() trap in ether_addr_copy. Signed-off-by: Mateusz Kulikowski Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8192e/rtllib.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'drivers/staging/rtl8192e/rtllib.h') diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h index bfec4fd..411363c 100644 --- a/drivers/staging/rtl8192e/rtllib.h +++ b/drivers/staging/rtl8192e/rtllib.h @@ -1531,7 +1531,7 @@ struct rtllib_network { u16 CcxRmState[2]; bool bMBssidValid; u8 MBssidMask; - u8 MBssid[6]; + u8 MBssid[ETH_ALEN]; bool bWithCcxVerNum; u8 BssCcxVerNumber; /* These are network statistics */ @@ -1866,7 +1866,7 @@ struct rt_link_detect { struct sw_cam_table { - u8 macaddr[6]; + u8 macaddr[ETH_ALEN]; bool bused; u8 key_buf[16]; u16 key_type; @@ -1912,10 +1912,10 @@ enum ratr_table_mode_8192s { #define NUM_PMKID_CACHE 16 struct rt_pmkid_list { - u8 bUsed; - u8 Bssid[6]; + u8 Bssid[ETH_ALEN]; u8 PMKID[16]; u8 SsidBuf[33]; + u8 bUsed; u8 *ssid_octet; u16 ssid_length; }; @@ -2083,7 +2083,7 @@ struct rtllib_device { u8 *wpa_ie; size_t wps_ie_len; u8 *wps_ie; - u8 ap_mac_addr[6]; + u8 ap_mac_addr[ETH_ALEN]; u16 pairwise_key_type; u16 group_key_type; -- cgit v1.1