Staging: wlan-ng: Remove use of __WLAN_ATTRIB_PACK__

Replace all ocurrances of the __WLAN_ATTRIB_PACK__ from wlan_compat.h
by __attribute__((packed)) and remove it afterwards.

Signed-off-by: Moritz Muehlenhoff <jmm@debian.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Moritz Muehlenhoff 2009-01-21 22:00:40 +01:00 committed by Greg Kroah-Hartman
parent 4bb5a7ec76
commit 9cba46dc1c
9 changed files with 205 additions and 210 deletions

File diff suppressed because it is too large Load diff

View file

@ -148,7 +148,7 @@ typedef struct wlan_ethhdr
u8 daddr[WLAN_ETHADDR_LEN];
u8 saddr[WLAN_ETHADDR_LEN];
u16 type;
} __WLAN_ATTRIB_PACK__ wlan_ethhdr_t;
} __attribute__((packed)) wlan_ethhdr_t;
/* local llc header type */
typedef struct wlan_llc
@ -156,14 +156,14 @@ typedef struct wlan_llc
u8 dsap;
u8 ssap;
u8 ctl;
} __WLAN_ATTRIB_PACK__ wlan_llc_t;
} __attribute__((packed)) wlan_llc_t;
/* local snap header type */
typedef struct wlan_snap
{
u8 oui[WLAN_IEEE_OUI_LEN];
u16 type;
} __WLAN_ATTRIB_PACK__ wlan_snap_t;
} __attribute__((packed)) wlan_snap_t;
/* Circular include trick */
struct wlandevice;

View file

@ -229,7 +229,7 @@ typedef struct p80211_hdr_a3
u8 a2[WLAN_ADDR_LEN];
u8 a3[WLAN_ADDR_LEN];
u16 seq;
} __WLAN_ATTRIB_PACK__ p80211_hdr_a3_t;
} __attribute__((packed)) p80211_hdr_a3_t;
typedef struct p80211_hdr_a4
{
@ -240,13 +240,13 @@ typedef struct p80211_hdr_a4
u8 a3[WLAN_ADDR_LEN];
u16 seq;
u8 a4[WLAN_ADDR_LEN];
} __WLAN_ATTRIB_PACK__ p80211_hdr_a4_t;
} __attribute__((packed)) p80211_hdr_a4_t;
typedef union p80211_hdr
{
p80211_hdr_a3_t a3;
p80211_hdr_a4_t a4;
} __WLAN_ATTRIB_PACK__ p80211_hdr_t;
} __attribute__((packed)) p80211_hdr_t;
/*================================================================*/

View file

@ -109,7 +109,7 @@ typedef struct p80211ioctl_req
u32 magic;
u16 len;
u32 result;
} __WLAN_ATTRIB_PACK__ p80211ioctl_req_t;
} __attribute__((packed)) p80211ioctl_req_t;
/*================================================================*/

View file

@ -55,7 +55,7 @@ typedef struct p80211msg_dot11req_mibget
u8 devname[WLAN_DEVNAMELEN_MAX] ;
p80211item_unk392_t mibattribute ;
p80211item_uint32_t resultcode ;
} __WLAN_ATTRIB_PACK__ p80211msg_dot11req_mibget_t;
} __attribute__((packed)) p80211msg_dot11req_mibget_t;
typedef struct p80211msg_dot11req_mibset
{
@ -64,7 +64,7 @@ typedef struct p80211msg_dot11req_mibset
u8 devname[WLAN_DEVNAMELEN_MAX] ;
p80211item_unk392_t mibattribute ;
p80211item_uint32_t resultcode ;
} __WLAN_ATTRIB_PACK__ p80211msg_dot11req_mibset_t;
} __attribute__((packed)) p80211msg_dot11req_mibset_t;
typedef struct p80211msg_dot11req_scan
{
@ -85,7 +85,7 @@ typedef struct p80211msg_dot11req_scan
p80211item_uint32_t resultcode ;
p80211item_uint32_t numbss ;
p80211item_uint32_t append ;
} __WLAN_ATTRIB_PACK__ p80211msg_dot11req_scan_t;
} __attribute__((packed)) p80211msg_dot11req_scan_t;
typedef struct p80211msg_dot11req_scan_results
{
@ -134,7 +134,7 @@ typedef struct p80211msg_dot11req_scan_results
p80211item_uint32_t supprate6 ;
p80211item_uint32_t supprate7 ;
p80211item_uint32_t supprate8 ;
} __WLAN_ATTRIB_PACK__ p80211msg_dot11req_scan_results_t;
} __attribute__((packed)) p80211msg_dot11req_scan_results_t;
typedef struct p80211msg_dot11req_start
{
@ -173,7 +173,7 @@ typedef struct p80211msg_dot11req_start
p80211item_uint32_t operationalrate7 ;
p80211item_uint32_t operationalrate8 ;
p80211item_uint32_t resultcode ;
} __WLAN_ATTRIB_PACK__ p80211msg_dot11req_start_t;
} __attribute__((packed)) p80211msg_dot11req_start_t;
typedef struct p80211msg_lnxreq_ifstate
{
@ -182,7 +182,7 @@ typedef struct p80211msg_lnxreq_ifstate
u8 devname[WLAN_DEVNAMELEN_MAX] ;
p80211item_uint32_t ifstate ;
p80211item_uint32_t resultcode ;
} __WLAN_ATTRIB_PACK__ p80211msg_lnxreq_ifstate_t;
} __attribute__((packed)) p80211msg_lnxreq_ifstate_t;
typedef struct p80211msg_lnxreq_wlansniff
{
@ -197,7 +197,7 @@ typedef struct p80211msg_lnxreq_wlansniff
p80211item_uint32_t stripfcs ;
p80211item_uint32_t packet_trunc ;
p80211item_uint32_t resultcode ;
} __WLAN_ATTRIB_PACK__ p80211msg_lnxreq_wlansniff_t;
} __attribute__((packed)) p80211msg_lnxreq_wlansniff_t;
typedef struct p80211msg_lnxreq_hostwep
{
@ -207,7 +207,7 @@ typedef struct p80211msg_lnxreq_hostwep
p80211item_uint32_t resultcode ;
p80211item_uint32_t decrypt ;
p80211item_uint32_t encrypt ;
} __WLAN_ATTRIB_PACK__ p80211msg_lnxreq_hostwep_t;
} __attribute__((packed)) p80211msg_lnxreq_hostwep_t;
typedef struct p80211msg_lnxreq_commsquality
{
@ -219,7 +219,7 @@ typedef struct p80211msg_lnxreq_commsquality
p80211item_uint32_t link ;
p80211item_uint32_t level ;
p80211item_uint32_t noise ;
} __WLAN_ATTRIB_PACK__ p80211msg_lnxreq_commsquality_t;
} __attribute__((packed)) p80211msg_lnxreq_commsquality_t;
typedef struct p80211msg_lnxreq_autojoin
{
@ -230,7 +230,7 @@ typedef struct p80211msg_lnxreq_autojoin
u8 pad_19D[3] ;
p80211item_uint32_t authtype ;
p80211item_uint32_t resultcode ;
} __WLAN_ATTRIB_PACK__ p80211msg_lnxreq_autojoin_t;
} __attribute__((packed)) p80211msg_lnxreq_autojoin_t;
typedef struct p80211msg_p2req_readpda
{
@ -239,7 +239,7 @@ typedef struct p80211msg_p2req_readpda
u8 devname[WLAN_DEVNAMELEN_MAX] ;
p80211item_unk1024_t pda ;
p80211item_uint32_t resultcode ;
} __WLAN_ATTRIB_PACK__ p80211msg_p2req_readpda_t;
} __attribute__((packed)) p80211msg_p2req_readpda_t;
typedef struct p80211msg_p2req_ramdl_state
{
@ -249,7 +249,7 @@ typedef struct p80211msg_p2req_ramdl_state
p80211item_uint32_t enable ;
p80211item_uint32_t exeaddr ;
p80211item_uint32_t resultcode ;
} __WLAN_ATTRIB_PACK__ p80211msg_p2req_ramdl_state_t;
} __attribute__((packed)) p80211msg_p2req_ramdl_state_t;
typedef struct p80211msg_p2req_ramdl_write
{
@ -260,7 +260,7 @@ typedef struct p80211msg_p2req_ramdl_write
p80211item_uint32_t len ;
p80211item_unk4096_t data ;
p80211item_uint32_t resultcode ;
} __WLAN_ATTRIB_PACK__ p80211msg_p2req_ramdl_write_t;
} __attribute__((packed)) p80211msg_p2req_ramdl_write_t;
typedef struct p80211msg_p2req_flashdl_state
{
@ -269,7 +269,7 @@ typedef struct p80211msg_p2req_flashdl_state
u8 devname[WLAN_DEVNAMELEN_MAX] ;
p80211item_uint32_t enable ;
p80211item_uint32_t resultcode ;
} __WLAN_ATTRIB_PACK__ p80211msg_p2req_flashdl_state_t;
} __attribute__((packed)) p80211msg_p2req_flashdl_state_t;
typedef struct p80211msg_p2req_flashdl_write
{
@ -280,6 +280,6 @@ typedef struct p80211msg_p2req_flashdl_write
p80211item_uint32_t len ;
p80211item_unk4096_t data ;
p80211item_uint32_t resultcode ;
} __WLAN_ATTRIB_PACK__ p80211msg_p2req_flashdl_write_t;
} __attribute__((packed)) p80211msg_p2req_flashdl_write_t;
#endif

View file

@ -247,7 +247,7 @@ typedef struct wlan_ie
{
u8 eid;
u8 len;
} __WLAN_ATTRIB_PACK__ wlan_ie_t;
} __attribute__((packed)) wlan_ie_t;
/*-- Service Set Identity (SSID) -----------------*/
typedef struct wlan_ie_ssid
@ -255,7 +255,7 @@ typedef struct wlan_ie_ssid
u8 eid;
u8 len;
u8 ssid[1]; /* may be zero, ptrs may overlap */
} __WLAN_ATTRIB_PACK__ wlan_ie_ssid_t;
} __attribute__((packed)) wlan_ie_ssid_t;
/*-- Supported Rates -----------------------------*/
typedef struct wlan_ie_supp_rates
@ -263,7 +263,7 @@ typedef struct wlan_ie_supp_rates
u8 eid;
u8 len;
u8 rates[1]; /* had better be at LEAST one! */
} __WLAN_ATTRIB_PACK__ wlan_ie_supp_rates_t;
} __attribute__((packed)) wlan_ie_supp_rates_t;
/*-- FH Parameter Set ----------------------------*/
typedef struct wlan_ie_fh_parms
@ -274,7 +274,7 @@ typedef struct wlan_ie_fh_parms
u8 hopset;
u8 hoppattern;
u8 hopindex;
} __WLAN_ATTRIB_PACK__ wlan_ie_fh_parms_t;
} __attribute__((packed)) wlan_ie_fh_parms_t;
/*-- DS Parameter Set ----------------------------*/
typedef struct wlan_ie_ds_parms
@ -282,7 +282,7 @@ typedef struct wlan_ie_ds_parms
u8 eid;
u8 len;
u8 curr_ch;
} __WLAN_ATTRIB_PACK__ wlan_ie_ds_parms_t;
} __attribute__((packed)) wlan_ie_ds_parms_t;
/*-- CF Parameter Set ----------------------------*/
@ -294,7 +294,7 @@ typedef struct wlan_ie_cf_parms
u8 cfp_period;
u16 cfp_maxdur;
u16 cfp_durremaining;
} __WLAN_ATTRIB_PACK__ wlan_ie_cf_parms_t;
} __attribute__((packed)) wlan_ie_cf_parms_t;
/*-- TIM ------------------------------------------*/
typedef struct wlan_ie_tim
@ -305,7 +305,7 @@ typedef struct wlan_ie_tim
u8 dtim_period;
u8 bitmap_ctl;
u8 virt_bm[1];
} __WLAN_ATTRIB_PACK__ wlan_ie_tim_t;
} __attribute__((packed)) wlan_ie_tim_t;
/*-- IBSS Parameter Set ---------------------------*/
typedef struct wlan_ie_ibss_parms
@ -313,7 +313,7 @@ typedef struct wlan_ie_ibss_parms
u8 eid;
u8 len;
u16 atim_win;
} __WLAN_ATTRIB_PACK__ wlan_ie_ibss_parms_t;
} __attribute__((packed)) wlan_ie_ibss_parms_t;
/*-- Challenge Text ------------------------------*/
typedef struct wlan_ie_challenge
@ -321,7 +321,7 @@ typedef struct wlan_ie_challenge
u8 eid;
u8 len;
u8 challenge[1];
} __WLAN_ATTRIB_PACK__ wlan_ie_challenge_t;
} __attribute__((packed)) wlan_ie_challenge_t;
/*-------------------------------------------------*/
/* Frame Types */

View file

@ -81,7 +81,7 @@ typedef struct p80211msg
u32 msgcode;
u32 msglen;
u8 devname[WLAN_DEVNAMELEN_MAX];
} __WLAN_ATTRIB_PACK__ p80211msg_t;
} __attribute__((packed)) p80211msg_t;
typedef struct p80211msgd
{
@ -89,7 +89,7 @@ typedef struct p80211msgd
u32 msglen;
u8 devname[WLAN_DEVNAMELEN_MAX];
u8 args[0];
} __WLAN_ATTRIB_PACK__ p80211msgd_t;
} __attribute__((packed)) p80211msgd_t;
/*================================================================*/
/* Extern Declarations */

View file

@ -395,48 +395,48 @@ typedef struct p80211enum
typedef struct p80211pstr
{
u8 len;
} __WLAN_ATTRIB_PACK__ p80211pstr_t;
} __attribute__((packed)) p80211pstr_t;
typedef struct p80211pstrd
{
u8 len;
u8 data[0];
} __WLAN_ATTRIB_PACK__ p80211pstrd_t;
} __attribute__((packed)) p80211pstrd_t;
/* Maximum pascal string */
typedef struct p80211pstr255
{
u8 len;
u8 data[MAXLEN_PSTR255];
} __WLAN_ATTRIB_PACK__ p80211pstr255_t;
} __attribute__((packed)) p80211pstr255_t;
/* pascal string for macaddress and bssid */
typedef struct p80211pstr6
{
u8 len;
u8 data[MAXLEN_PSTR6];
} __WLAN_ATTRIB_PACK__ p80211pstr6_t;
} __attribute__((packed)) p80211pstr6_t;
/* pascal string for channel list */
typedef struct p80211pstr14
{
u8 len;
u8 data[MAXLEN_PSTR14];
} __WLAN_ATTRIB_PACK__ p80211pstr14_t;
} __attribute__((packed)) p80211pstr14_t;
/* pascal string for ssid */
typedef struct p80211pstr32
{
u8 len;
u8 data[MAXLEN_PSTR32];
} __WLAN_ATTRIB_PACK__ p80211pstr32_t;
} __attribute__((packed)) p80211pstr32_t;
/* MAC address array */
typedef struct p80211macarray
{
u32 cnt;
u8 data[1][MAXLEN_PSTR6];
} __WLAN_ATTRIB_PACK__ p80211macarray_t;
} __attribute__((packed)) p80211macarray_t;
/* prototype template */
typedef struct p80211item
@ -444,7 +444,7 @@ typedef struct p80211item
u32 did;
u16 status;
u16 len;
} __WLAN_ATTRIB_PACK__ p80211item_t;
} __attribute__((packed)) p80211item_t;
/* prototype template w/ data item */
typedef struct p80211itemd
@ -453,7 +453,7 @@ typedef struct p80211itemd
u16 status;
u16 len;
u8 data[0];
} __WLAN_ATTRIB_PACK__ p80211itemd_t;
} __attribute__((packed)) p80211itemd_t;
/* message data item for int, BOUNDEDINT, ENUMINT */
typedef struct p80211item_uint32
@ -462,7 +462,7 @@ typedef struct p80211item_uint32
u16 status;
u16 len;
u32 data;
} __WLAN_ATTRIB_PACK__ p80211item_uint32_t;
} __attribute__((packed)) p80211item_uint32_t;
/* message data item for OCTETSTR, DISPLAYSTR */
typedef struct p80211item_pstr6
@ -471,7 +471,7 @@ typedef struct p80211item_pstr6
u16 status;
u16 len;
p80211pstr6_t data;
} __WLAN_ATTRIB_PACK__ p80211item_pstr6_t;
} __attribute__((packed)) p80211item_pstr6_t;
/* message data item for OCTETSTR, DISPLAYSTR */
typedef struct p80211item_pstr14
@ -480,7 +480,7 @@ typedef struct p80211item_pstr14
u16 status;
u16 len;
p80211pstr14_t data;
} __WLAN_ATTRIB_PACK__ p80211item_pstr14_t;
} __attribute__((packed)) p80211item_pstr14_t;
/* message data item for OCTETSTR, DISPLAYSTR */
typedef struct p80211item_pstr32
@ -489,7 +489,7 @@ typedef struct p80211item_pstr32
u16 status;
u16 len;
p80211pstr32_t data;
} __WLAN_ATTRIB_PACK__ p80211item_pstr32_t;
} __attribute__((packed)) p80211item_pstr32_t;
/* message data item for OCTETSTR, DISPLAYSTR */
typedef struct p80211item_pstr255
@ -498,7 +498,7 @@ typedef struct p80211item_pstr255
u16 status;
u16 len;
p80211pstr255_t data;
} __WLAN_ATTRIB_PACK__ p80211item_pstr255_t;
} __attribute__((packed)) p80211item_pstr255_t;
/* message data item for UNK 392, namely mib items */
typedef struct p80211item_unk392
@ -507,7 +507,7 @@ typedef struct p80211item_unk392
u16 status;
u16 len;
u8 data[MAXLEN_MIBATTRIBUTE];
} __WLAN_ATTRIB_PACK__ p80211item_unk392_t;
} __attribute__((packed)) p80211item_unk392_t;
/* message data item for UNK 1025, namely p2 pdas */
typedef struct p80211item_unk1024
@ -516,7 +516,7 @@ typedef struct p80211item_unk1024
u16 status;
u16 len;
u8 data[1024];
} __WLAN_ATTRIB_PACK__ p80211item_unk1024_t;
} __attribute__((packed)) p80211item_unk1024_t;
/* message data item for UNK 4096, namely p2 download chunks */
typedef struct p80211item_unk4096
@ -525,7 +525,7 @@ typedef struct p80211item_unk4096
u16 status;
u16 len;
u8 data[4096];
} __WLAN_ATTRIB_PACK__ p80211item_unk4096_t;
} __attribute__((packed)) p80211item_unk4096_t;
struct catlistitem;

View file

@ -85,11 +85,6 @@
#define BIT30 0x40000000
#define BIT31 0x80000000
/*=============================================================*/
/*------ Compiler Portability Macros --------------------------*/
/*=============================================================*/
#define __WLAN_ATTRIB_PACK__ __attribute__ ((packed))
/*=============================================================*/
/*------ OS Portability Macros --------------------------------*/
/*=============================================================*/