Explorar o código

sbni endian fixes

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Al Viro %!s(int64=17) %!d(string=hai) anos
pai
achega
c15561f0e5
Modificáronse 1 ficheiros con 9 adicións e 3 borrados
  1. 9 3
      drivers/net/wan/sbni.h

+ 9 - 3
drivers/net/wan/sbni.h

@@ -44,9 +44,15 @@ enum {
 #define PR_RES 0x80
 
 struct sbni_csr1 {
-	unsigned rxl	: 5;
-	unsigned rate	: 2;
-	unsigned 	: 1;
+#ifdef __LITTLE_ENDIAN_BITFIELD
+	u8 rxl	: 5;
+	u8 rate	: 2;
+	u8 	: 1;
+#else
+	u8 	: 1;
+	u8 rate	: 2;
+	u8 rxl	: 5;
+#endif
 };
 
 /* fields in frame header */