summaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8192e/rtllib_softmac.c
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_softmac.c
parentc7ddc288ebf2aee890828cec26b4fb889a246330 (diff)
downloadlinux-stable-06c111072892d3f5fed9d73d1becb59d3f33410b.tar.gz
linux-stable-06c111072892d3f5fed9d73d1becb59d3f33410b.tar.bz2
linux-stable-06c111072892d3f5fed9d73d1becb59d3f33410b.zip
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_softmac.c')
-rw-r--r--drivers/staging/rtl8192e/rtllib_softmac.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c
index cd758feac88c..051105d77a21 100644
--- a/drivers/staging/rtl8192e/rtllib_softmac.c
+++ b/drivers/staging/rtl8192e/rtllib_softmac.c
@@ -1957,9 +1957,9 @@ static inline void rtllib_rx_auth_rq(struct rtllib_device *ieee,
static inline void rtllib_rx_assoc_rq(struct rtllib_device *ieee,
struct sk_buff *skb)
{
-
u8 dest[ETH_ALEN];
+
ieee->softmac_stats.rx_ass_rq++;
if (assoc_rq_parse(skb, dest) != -1)
rtllib_resp_to_assoc_rq(ieee, dest);
@@ -2912,7 +2912,7 @@ exit:
struct sk_buff *rtllib_get_beacon_(struct rtllib_device *ieee)
{
- u8 broadcast_addr[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
+ const u8 broadcast_addr[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
struct sk_buff *skb;
struct rtllib_probe_response *b;