summaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8192e/rtllib.h
diff options
context:
space:
mode:
authorMateusz Kulikowski <mateusz.kulikowski@gmail.com>2015-05-31 20:19:21 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-06-01 06:31:59 +0900
commit06c111072892d3f5fed9d73d1becb59d3f33410b (patch)
treec51bdb395bfbbf740bae4512c0354816d47680ce /drivers/staging/rtl8192e/rtllib.h
parentc7ddc288ebf2aee890828cec26b4fb889a246330 (diff)
downloadop-kernel-dev-06c111072892d3f5fed9d73d1becb59d3f33410b.zip
op-kernel-dev-06c111072892d3f5fed9d73d1becb59d3f33410b.tar.gz
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 <mateusz.kulikowski@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8192e/rtllib.h')
-rw-r--r--drivers/staging/rtl8192e/rtllib.h10
1 files changed, 5 insertions, 5 deletions
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;
OpenPOWER on IntegriCloud