Skip to contentSkip to conversation

libertas: correct packing of rxpd structure

PATCH New Dan Williams 1 participant 1 message Aug 6, 2009 Networking drivers (wireless)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libertas: correct packing of rxpd structure

From: Bob Dunlop <[email protected]>

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.

---

drivers/net/wireless/libertas/hostcmd.h renamed from drivers/net/wireless/libertas/hostcmd.h-orig +2 -2
diff -u linux-2.6.31-rc2/drivers/net/wireless/libertas/hostcmd.h{-orig,}
@@ -56,8 +56,8 @@
 			u8 bss_type;
 			/* BSS number */
 			u8 bss_num;
-		} bss;
-	} u;
+		} __attribute__ ((packed)) bss;
+	} __attribute__ ((packed)) u;
 
 	/* SNR */
 	u8 snr;