]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ar9170: fix struct layout on arm
authorJohannes Berg <johannes@sipsolutions.net>
Fri, 10 Apr 2009 08:02:45 +0000 (10:02 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 16 Apr 2009 14:39:17 +0000 (10:39 -0400)
arm will pad even between u8's, so mark the structs/unions
packed. Fixes a build bug on arm due to BUILD_BUG_ON tests
in the code.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Reported-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ar9170/hw.h

index 13091bd9d815e12816b814ecb2d13745bf603baf..53e250a4278f2a7d8868a202d7413dd0e2e5ef15 100644 (file)
@@ -310,7 +310,7 @@ struct ar9170_tx_control {
 
 struct ar9170_rx_head {
        u8 plcp[12];
-};
+} __packed;
 
 struct ar9170_rx_tail {
        union {
@@ -318,16 +318,16 @@ struct ar9170_rx_tail {
                        u8 rssi_ant0, rssi_ant1, rssi_ant2,
                           rssi_ant0x, rssi_ant1x, rssi_ant2x,
                           rssi_combined;
-               };
+               } __packed;
                u8 rssi[7];
-       };
+       } __packed;
 
        u8 evm_stream0[6], evm_stream1[6];
        u8 phy_err;
        u8 SAidx, DAidx;
        u8 error;
        u8 status;
-};
+} __packed;
 
 #define AR9170_ENC_ALG_NONE                    0x0
 #define AR9170_ENC_ALG_WEP64                   0x1