[PATCH linux-2.6.31-rc2] libertas: correct packing of rxpd structure

Bob Dunlop rdunlop at guralp.com
Wed Aug 5 03:32:11 EDT 2009


Older Gcc compilers (3.4.5 tested) need additional hints in order to get
the packing of the rxpd structure (which contains a 16 bit union) correct
on the ARM processor.

struct txpd does not need these hints since it contains a 32 bit union that
packs naturally.

Signed-off-by: R.J.Dunlop <rdunlop at guralp.com>

---

diff -u linux-2.6.31-rc2/drivers/net/wireless/libertas/hostcmd.h{-orig,}
--- linux-2.6.31-rc2/drivers/net/wireless/libertas/hostcmd.h-orig	2009-07-04 18:58:48.000000000 +0100
+++ linux-2.6.31-rc2/drivers/net/wireless/libertas/hostcmd.h	2009-07-13 08:27:45.000000000 +0100
@@ -56,8 +56,8 @@
 			u8 bss_type;
 			/* BSS number */
 			u8 bss_num;
-		} bss;
-	} u;
+		} __attribute__ ((packed)) bss;
+	} __attribute__ ((packed)) u;
 
 	/* SNR */
 	u8 snr;

-- 
        Bob Dunlop
        Guralp Systems Limited
        http://www.guralp.com



More information about the libertas-dev mailing list