[PATCH 3/3] libertas: fix memory alignment problems on the blackfin

Ihar Hrachyshka ihar.hrachyshka at promwad.com
Fri Jan 25 05:44:14 EST 2008


My Evolution mail client crapped the previous patch so - resending.
I think that explicit alignment of data structures in patch 2/3 and
3/3 is better than fields rearrangement because it guarantees that
sometime later our manual arrangement won't be broken with later
edits.

Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka at promwad.com>

---

diff --git a/drivers/net/wireless/libertas/assoc.c b/drivers/net/wireless/libertas/assoc.c
index c622e9b..61e1bc5 100644
--- a/drivers/net/wireless/libertas/assoc.c
+++ b/drivers/net/wireless/libertas/assoc.c
@@ -12,9 +12,8 @@
 #include "cmd.h"
 
 
-static const u8 bssid_any[ETH_ALEN] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };
-static const u8 bssid_off[ETH_ALEN] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
-
+static const u8 bssid_any[ETH_ALEN] __attribute__ ((aligned (2))) = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };
+static const u8 bssid_off[ETH_ALEN] __attribute__ ((aligned (2))) = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
 
 static int assoc_helper_essid(struct lbs_private *priv,
                               struct assoc_request * assoc_req)

-- 
Ihar Hrachyshka
Software Developer
Promwad Innovation Company
19, Sharangovicha Str.
220018, Minsk, Belarus
Phone/Fax: +375 (17) 211-5826
Web: www.promwad.com



More information about the libertas-dev mailing list