Commit 99590ffe authored by Dan Williams's avatar Dan Williams Committed by John W. Linville

airo: use __attribute__ ((packed)) not #pragma

Signed-off-by: default avatarDan Williams <dcbw@redhat.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent dff8ccd9
...@@ -496,39 +496,41 @@ typedef struct { ...@@ -496,39 +496,41 @@ typedef struct {
* so all rid access should use the read/writeXXXRid routines. * so all rid access should use the read/writeXXXRid routines.
*/ */
/* This is redundant for x86 archs, but it seems necessary for ARM */
#pragma pack(1)
/* This structure came from an email sent to me from an engineer at /* This structure came from an email sent to me from an engineer at
aironet for inclusion into this driver */ aironet for inclusion into this driver */
typedef struct { typedef struct WepKeyRid WepKeyRid;
struct WepKeyRid {
__le16 len; __le16 len;
__le16 kindex; __le16 kindex;
u8 mac[ETH_ALEN]; u8 mac[ETH_ALEN];
__le16 klen; __le16 klen;
u8 key[16]; u8 key[16];
} WepKeyRid; } __attribute__ ((packed));
/* These structures are from the Aironet's PC4500 Developers Manual */ /* These structures are from the Aironet's PC4500 Developers Manual */
typedef struct { typedef struct Ssid Ssid;
struct Ssid {
__le16 len; __le16 len;
u8 ssid[32]; u8 ssid[32];
} Ssid; } __attribute__ ((packed));
typedef struct { typedef struct SsidRid SsidRid;
struct SsidRid {
__le16 len; __le16 len;
Ssid ssids[3]; Ssid ssids[3];
} SsidRid; } __attribute__ ((packed));
typedef struct { typedef struct ModulationRid ModulationRid;
struct ModulationRid {
__le16 len; __le16 len;
__le16 modulation; __le16 modulation;
#define MOD_DEFAULT cpu_to_le16(0) #define MOD_DEFAULT cpu_to_le16(0)
#define MOD_CCK cpu_to_le16(1) #define MOD_CCK cpu_to_le16(1)
#define MOD_MOK cpu_to_le16(2) #define MOD_MOK cpu_to_le16(2)
} ModulationRid; } __attribute__ ((packed));
typedef struct { typedef struct ConfigRid ConfigRid;
struct ConfigRid {
__le16 len; /* sizeof(ConfigRid) */ __le16 len; /* sizeof(ConfigRid) */
__le16 opmode; /* operating mode */ __le16 opmode; /* operating mode */
#define MODE_STA_IBSS cpu_to_le16(0) #define MODE_STA_IBSS cpu_to_le16(0)
...@@ -649,9 +651,10 @@ typedef struct { ...@@ -649,9 +651,10 @@ typedef struct {
#define MAGIC_STAY_IN_CAM (1<<10) #define MAGIC_STAY_IN_CAM (1<<10)
u8 magicControl; u8 magicControl;
__le16 autoWake; __le16 autoWake;
} ConfigRid; } __attribute__ ((packed));
typedef struct { typedef struct StatusRid StatusRid;
struct StatusRid {
__le16 len; __le16 len;
u8 mac[ETH_ALEN]; u8 mac[ETH_ALEN];
__le16 mode; __le16 mode;
...@@ -707,21 +710,23 @@ typedef struct { ...@@ -707,21 +710,23 @@ typedef struct {
#define STAT_LEAPFAILED 91 #define STAT_LEAPFAILED 91
#define STAT_LEAPTIMEDOUT 92 #define STAT_LEAPTIMEDOUT 92
#define STAT_LEAPCOMPLETE 93 #define STAT_LEAPCOMPLETE 93
} StatusRid; } __attribute__ ((packed));
typedef struct { typedef struct StatsRid StatsRid;
struct StatsRid {
__le16 len; __le16 len;
__le16 spacer; __le16 spacer;
__le32 vals[100]; __le32 vals[100];
} StatsRid; } __attribute__ ((packed));
typedef struct { typedef struct APListRid APListRid;
struct APListRid {
__le16 len; __le16 len;
u8 ap[4][ETH_ALEN]; u8 ap[4][ETH_ALEN];
} APListRid; } __attribute__ ((packed));
typedef struct { typedef struct CapabilityRid CapabilityRid;
struct CapabilityRid {
__le16 len; __le16 len;
char oui[3]; char oui[3];
char zero; char zero;
...@@ -748,17 +753,18 @@ typedef struct { ...@@ -748,17 +753,18 @@ typedef struct {
__le16 bootBlockVer; __le16 bootBlockVer;
__le16 requiredHard; __le16 requiredHard;
__le16 extSoftCap; __le16 extSoftCap;
} CapabilityRid; } __attribute__ ((packed));
/* Only present on firmware >= 5.30.17 */ /* Only present on firmware >= 5.30.17 */
typedef struct { typedef struct BSSListRidExtra BSSListRidExtra;
struct BSSListRidExtra {
__le16 unknown[4]; __le16 unknown[4];
u8 fixed[12]; /* WLAN management frame */ u8 fixed[12]; /* WLAN management frame */
u8 iep[624]; u8 iep[624];
} BSSListRidExtra; } __attribute__ ((packed));
typedef struct { typedef struct BSSListRid BSSListRid;
struct BSSListRid {
__le16 len; __le16 len;
__le16 index; /* First is 0 and 0xffff means end of list */ __le16 index; /* First is 0 and 0xffff means end of list */
#define RADIO_FH 1 /* Frequency hopping radio type */ #define RADIO_FH 1 /* Frequency hopping radio type */
...@@ -789,33 +795,37 @@ typedef struct { ...@@ -789,33 +795,37 @@ typedef struct {
/* Only present on firmware >= 5.30.17 */ /* Only present on firmware >= 5.30.17 */
BSSListRidExtra extra; BSSListRidExtra extra;
} BSSListRid; } __attribute__ ((packed));
typedef struct { typedef struct {
BSSListRid bss; BSSListRid bss;
struct list_head list; struct list_head list;
} BSSListElement; } BSSListElement;
typedef struct { typedef struct tdsRssiEntry tdsRssiEntry;
struct tdsRssiEntry {
u8 rssipct; u8 rssipct;
u8 rssidBm; u8 rssidBm;
} tdsRssiEntry; } __attribute__ ((packed));
typedef struct { typedef struct tdsRssiRid tdsRssiRid;
struct tdsRssiRid {
u16 len; u16 len;
tdsRssiEntry x[256]; tdsRssiEntry x[256];
} tdsRssiRid; } __attribute__ ((packed));
typedef struct { typedef struct MICRid MICRid;
u16 len; struct MICRid {
u16 state; __le16 len;
u16 multicastValid; __le16 state;
__le16 multicastValid;
u8 multicast[16]; u8 multicast[16];
u16 unicastValid; __le16 unicastValid;
u8 unicast[16]; u8 unicast[16];
} MICRid; } __attribute__ ((packed));
typedef struct { typedef struct MICBuffer MICBuffer;
struct MICBuffer {
__be16 typelen; __be16 typelen;
union { union {
...@@ -830,15 +840,13 @@ typedef struct { ...@@ -830,15 +840,13 @@ typedef struct {
} u; } u;
__be32 mic; __be32 mic;
__be32 seq; __be32 seq;
} MICBuffer; } __attribute__ ((packed));
typedef struct { typedef struct {
u8 da[ETH_ALEN]; u8 da[ETH_ALEN];
u8 sa[ETH_ALEN]; u8 sa[ETH_ALEN];
} etherHead; } etherHead;
#pragma pack()
#define TXCTL_TXOK (1<<1) /* report if tx is ok */ #define TXCTL_TXOK (1<<1) /* report if tx is ok */
#define TXCTL_TXEX (1<<2) /* report if tx fails */ #define TXCTL_TXEX (1<<2) /* report if tx fails */
#define TXCTL_802_3 (0<<3) /* 802.3 packet */ #define TXCTL_802_3 (0<<3) /* 802.3 packet */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment