Commit aaad4303 authored by Solomon Peachy's avatar Solomon Peachy Committed by Greg Kroah-Hartman

Staging: wlan-ng: Use standard kernel integer (u32/s32/etc) types.

wlan-ng needed to interact with userspace, and support very old kernels,
so it used to define its own types for integers to ensure consistency.

It's all rather irrelevant now.
Signed-off-by: default avatarSolomon Peachy <pizza@shaftnet.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 5704976f
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
...@@ -99,8 +99,8 @@ ...@@ -99,8 +99,8 @@
/*================================================================*/ /*================================================================*/
/* Local Static Definitions */ /* Local Static Definitions */
static UINT8 oui_rfc1042[] = {0x00, 0x00, 0x00}; static u8 oui_rfc1042[] = {0x00, 0x00, 0x00};
static UINT8 oui_8021h[] = {0x00, 0x00, 0xf8}; static u8 oui_8021h[] = {0x00, 0x00, 0xf8};
/*================================================================*/ /*================================================================*/
/* Local Function Declarations */ /* Local Function Declarations */
...@@ -134,11 +134,11 @@ static UINT8 oui_8021h[] = {0x00, 0x00, 0xf8}; ...@@ -134,11 +134,11 @@ static UINT8 oui_8021h[] = {0x00, 0x00, 0xf8};
* Call context: * Call context:
* May be called in interrupt or non-interrupt context * May be called in interrupt or non-interrupt context
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
int skb_ether_to_p80211( wlandevice_t *wlandev, UINT32 ethconv, struct sk_buff *skb, p80211_hdr_t *p80211_hdr, p80211_metawep_t *p80211_wep) int skb_ether_to_p80211( wlandevice_t *wlandev, u32 ethconv, struct sk_buff *skb, p80211_hdr_t *p80211_hdr, p80211_metawep_t *p80211_wep)
{ {
UINT16 fc; u16 fc;
UINT16 proto; u16 proto;
wlan_ethhdr_t e_hdr; wlan_ethhdr_t e_hdr;
wlan_llc_t *e_llc; wlan_llc_t *e_llc;
wlan_snap_t *e_snap; wlan_snap_t *e_snap;
...@@ -297,14 +297,14 @@ static void orinoco_spy_gather(wlandevice_t *wlandev, char *mac, ...@@ -297,14 +297,14 @@ static void orinoco_spy_gather(wlandevice_t *wlandev, char *mac,
* Call context: * Call context:
* May be called in interrupt or non-interrupt context * May be called in interrupt or non-interrupt context
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
int skb_p80211_to_ether( wlandevice_t *wlandev, UINT32 ethconv, struct sk_buff *skb) int skb_p80211_to_ether( wlandevice_t *wlandev, u32 ethconv, struct sk_buff *skb)
{ {
netdevice_t *netdev = wlandev->netdev; netdevice_t *netdev = wlandev->netdev;
UINT16 fc; u16 fc;
UINT payload_length; unsigned int payload_length;
UINT payload_offset; unsigned int payload_offset;
UINT8 daddr[WLAN_ETHADDR_LEN]; u8 daddr[WLAN_ETHADDR_LEN];
UINT8 saddr[WLAN_ETHADDR_LEN]; u8 saddr[WLAN_ETHADDR_LEN];
p80211_hdr_t *w_hdr; p80211_hdr_t *w_hdr;
wlan_ethhdr_t *e_hdr; wlan_ethhdr_t *e_hdr;
wlan_llc_t *e_llc; wlan_llc_t *e_llc;
...@@ -488,7 +488,7 @@ int skb_p80211_to_ether( wlandevice_t *wlandev, UINT32 ethconv, struct sk_buff * ...@@ -488,7 +488,7 @@ int skb_p80211_to_ether( wlandevice_t *wlandev, UINT32 ethconv, struct sk_buff *
* Call context: * Call context:
* May be called in interrupt or non-interrupt context * May be called in interrupt or non-interrupt context
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
int p80211_stt_findproto(UINT16 proto) int p80211_stt_findproto(u16 proto)
{ {
/* Always return found for now. This is the behavior used by the */ /* Always return found for now. This is the behavior used by the */
/* Zoom Win95 driver when 802.1h mode is selected */ /* Zoom Win95 driver when 802.1h mode is selected */
......
...@@ -86,22 +86,22 @@ typedef struct p80211_rxmeta ...@@ -86,22 +86,22 @@ typedef struct p80211_rxmeta
{ {
struct wlandevice *wlandev; struct wlandevice *wlandev;
UINT64 mactime; /* Hi-rez MAC-supplied time value */ u64 mactime; /* Hi-rez MAC-supplied time value */
UINT64 hosttime; /* Best-rez host supplied time value */ u64 hosttime; /* Best-rez host supplied time value */
UINT rxrate; /* Receive data rate in 100kbps */ unsigned int rxrate; /* Receive data rate in 100kbps */
UINT priority; /* 0-15, 0=contention, 6=CF */ unsigned int priority; /* 0-15, 0=contention, 6=CF */
INT signal; /* An SSI, see p80211netdev.h */ int signal; /* An SSI, see p80211netdev.h */
INT noise; /* An SSI, see p80211netdev.h */ int noise; /* An SSI, see p80211netdev.h */
UINT channel; /* Receive channel (mostly for snifs) */ unsigned int channel; /* Receive channel (mostly for snifs) */
UINT preamble; /* P80211ENUM_preambletype_* */ unsigned int preamble; /* P80211ENUM_preambletype_* */
UINT encoding; /* P80211ENUM_encoding_* */ unsigned int encoding; /* P80211ENUM_encoding_* */
} p80211_rxmeta_t; } p80211_rxmeta_t;
typedef struct p80211_frmmeta typedef struct p80211_frmmeta
{ {
UINT magic; unsigned int magic;
p80211_rxmeta_t *rx; p80211_rxmeta_t *rx;
} p80211_frmmeta_t; } p80211_frmmeta_t;
...@@ -117,20 +117,20 @@ void p80211skb_rxmeta_detach(struct sk_buff *skb); ...@@ -117,20 +117,20 @@ void p80211skb_rxmeta_detach(struct sk_buff *skb);
*/ */
typedef struct p80211_caphdr typedef struct p80211_caphdr
{ {
UINT32 version; u32 version;
UINT32 length; u32 length;
UINT64 mactime; u64 mactime;
UINT64 hosttime; u64 hosttime;
UINT32 phytype; u32 phytype;
UINT32 channel; u32 channel;
UINT32 datarate; u32 datarate;
UINT32 antenna; u32 antenna;
UINT32 priority; u32 priority;
UINT32 ssi_type; u32 ssi_type;
INT32 ssi_signal; s32 ssi_signal;
INT32 ssi_noise; s32 ssi_noise;
UINT32 preamble; u32 preamble;
UINT32 encoding; u32 encoding;
} p80211_caphdr_t; } p80211_caphdr_t;
/* buffer free method pointer type */ /* buffer free method pointer type */
...@@ -138,31 +138,31 @@ typedef void (* freebuf_method_t)(void *buf, int size); ...@@ -138,31 +138,31 @@ typedef void (* freebuf_method_t)(void *buf, int size);
typedef struct p80211_metawep { typedef struct p80211_metawep {
void *data; void *data;
UINT8 iv[4]; u8 iv[4];
UINT8 icv[4]; u8 icv[4];
} p80211_metawep_t; } p80211_metawep_t;
/* local ether header type */ /* local ether header type */
typedef struct wlan_ethhdr typedef struct wlan_ethhdr
{ {
UINT8 daddr[WLAN_ETHADDR_LEN]; u8 daddr[WLAN_ETHADDR_LEN];
UINT8 saddr[WLAN_ETHADDR_LEN]; u8 saddr[WLAN_ETHADDR_LEN];
UINT16 type; u16 type;
} __WLAN_ATTRIB_PACK__ wlan_ethhdr_t; } __WLAN_ATTRIB_PACK__ wlan_ethhdr_t;
/* local llc header type */ /* local llc header type */
typedef struct wlan_llc typedef struct wlan_llc
{ {
UINT8 dsap; u8 dsap;
UINT8 ssap; u8 ssap;
UINT8 ctl; u8 ctl;
} __WLAN_ATTRIB_PACK__ wlan_llc_t; } __WLAN_ATTRIB_PACK__ wlan_llc_t;
/* local snap header type */ /* local snap header type */
typedef struct wlan_snap typedef struct wlan_snap
{ {
UINT8 oui[WLAN_IEEE_OUI_LEN]; u8 oui[WLAN_IEEE_OUI_LEN];
UINT16 type; u16 type;
} __WLAN_ATTRIB_PACK__ wlan_snap_t; } __WLAN_ATTRIB_PACK__ wlan_snap_t;
/* Circular include trick */ /* Circular include trick */
...@@ -174,13 +174,13 @@ struct wlandevice; ...@@ -174,13 +174,13 @@ struct wlandevice;
/*================================================================*/ /*================================================================*/
/*Function Declarations */ /*Function Declarations */
int skb_p80211_to_ether( struct wlandevice *wlandev, UINT32 ethconv, int skb_p80211_to_ether( struct wlandevice *wlandev, u32 ethconv,
struct sk_buff *skb); struct sk_buff *skb);
int skb_ether_to_p80211( struct wlandevice *wlandev, UINT32 ethconv, int skb_ether_to_p80211( struct wlandevice *wlandev, u32 ethconv,
struct sk_buff *skb, p80211_hdr_t *p80211_hdr, struct sk_buff *skb, p80211_hdr_t *p80211_hdr,
p80211_metawep_t *p80211_wep ); p80211_metawep_t *p80211_wep );
int p80211_stt_findproto(UINT16 proto); int p80211_stt_findproto(u16 proto);
int p80211_stt_addproto(UINT16 proto); int p80211_stt_addproto(u16 proto);
#endif #endif
...@@ -166,29 +166,29 @@ ...@@ -166,29 +166,29 @@
/* SET_FC_FSTYPE(WLAN_FSTYPE_RTS) ); */ /* SET_FC_FSTYPE(WLAN_FSTYPE_RTS) ); */
/*------------------------------------------------------------*/ /*------------------------------------------------------------*/
#define WLAN_GET_FC_PVER(n) (((UINT16)(n)) & (BIT0 | BIT1)) #define WLAN_GET_FC_PVER(n) (((u16)(n)) & (BIT0 | BIT1))
#define WLAN_GET_FC_FTYPE(n) ((((UINT16)(n)) & (BIT2 | BIT3)) >> 2) #define WLAN_GET_FC_FTYPE(n) ((((u16)(n)) & (BIT2 | BIT3)) >> 2)
#define WLAN_GET_FC_FSTYPE(n) ((((UINT16)(n)) & (BIT4|BIT5|BIT6|BIT7)) >> 4) #define WLAN_GET_FC_FSTYPE(n) ((((u16)(n)) & (BIT4|BIT5|BIT6|BIT7)) >> 4)
#define WLAN_GET_FC_TODS(n) ((((UINT16)(n)) & (BIT8)) >> 8) #define WLAN_GET_FC_TODS(n) ((((u16)(n)) & (BIT8)) >> 8)
#define WLAN_GET_FC_FROMDS(n) ((((UINT16)(n)) & (BIT9)) >> 9) #define WLAN_GET_FC_FROMDS(n) ((((u16)(n)) & (BIT9)) >> 9)
#define WLAN_GET_FC_MOREFRAG(n) ((((UINT16)(n)) & (BIT10)) >> 10) #define WLAN_GET_FC_MOREFRAG(n) ((((u16)(n)) & (BIT10)) >> 10)
#define WLAN_GET_FC_RETRY(n) ((((UINT16)(n)) & (BIT11)) >> 11) #define WLAN_GET_FC_RETRY(n) ((((u16)(n)) & (BIT11)) >> 11)
#define WLAN_GET_FC_PWRMGT(n) ((((UINT16)(n)) & (BIT12)) >> 12) #define WLAN_GET_FC_PWRMGT(n) ((((u16)(n)) & (BIT12)) >> 12)
#define WLAN_GET_FC_MOREDATA(n) ((((UINT16)(n)) & (BIT13)) >> 13) #define WLAN_GET_FC_MOREDATA(n) ((((u16)(n)) & (BIT13)) >> 13)
#define WLAN_GET_FC_ISWEP(n) ((((UINT16)(n)) & (BIT14)) >> 14) #define WLAN_GET_FC_ISWEP(n) ((((u16)(n)) & (BIT14)) >> 14)
#define WLAN_GET_FC_ORDER(n) ((((UINT16)(n)) & (BIT15)) >> 15) #define WLAN_GET_FC_ORDER(n) ((((u16)(n)) & (BIT15)) >> 15)
#define WLAN_SET_FC_PVER(n) ((UINT16)(n)) #define WLAN_SET_FC_PVER(n) ((u16)(n))
#define WLAN_SET_FC_FTYPE(n) (((UINT16)(n)) << 2) #define WLAN_SET_FC_FTYPE(n) (((u16)(n)) << 2)
#define WLAN_SET_FC_FSTYPE(n) (((UINT16)(n)) << 4) #define WLAN_SET_FC_FSTYPE(n) (((u16)(n)) << 4)
#define WLAN_SET_FC_TODS(n) (((UINT16)(n)) << 8) #define WLAN_SET_FC_TODS(n) (((u16)(n)) << 8)
#define WLAN_SET_FC_FROMDS(n) (((UINT16)(n)) << 9) #define WLAN_SET_FC_FROMDS(n) (((u16)(n)) << 9)
#define WLAN_SET_FC_MOREFRAG(n) (((UINT16)(n)) << 10) #define WLAN_SET_FC_MOREFRAG(n) (((u16)(n)) << 10)
#define WLAN_SET_FC_RETRY(n) (((UINT16)(n)) << 11) #define WLAN_SET_FC_RETRY(n) (((u16)(n)) << 11)
#define WLAN_SET_FC_PWRMGT(n) (((UINT16)(n)) << 12) #define WLAN_SET_FC_PWRMGT(n) (((u16)(n)) << 12)
#define WLAN_SET_FC_MOREDATA(n) (((UINT16)(n)) << 13) #define WLAN_SET_FC_MOREDATA(n) (((u16)(n)) << 13)
#define WLAN_SET_FC_ISWEP(n) (((UINT16)(n)) << 14) #define WLAN_SET_FC_ISWEP(n) (((u16)(n)) << 14)
#define WLAN_SET_FC_ORDER(n) (((UINT16)(n)) << 15) #define WLAN_SET_FC_ORDER(n) (((u16)(n)) << 15)
/*--- Duration Macros ----------------------------------------*/ /*--- Duration Macros ----------------------------------------*/
/* Macros to get/set the bitfields of the Duration Field */ /* Macros to get/set the bitfields of the Duration Field */
...@@ -201,45 +201,45 @@ ...@@ -201,45 +201,45 @@
/* Macros to get/set the bitfields of the Sequence Control */ /* Macros to get/set the bitfields of the Sequence Control */
/* Field. */ /* Field. */
/*------------------------------------------------------------*/ /*------------------------------------------------------------*/
#define WLAN_GET_SEQ_FRGNUM(n) (((UINT16)(n)) & (BIT0|BIT1|BIT2|BIT3)) #define WLAN_GET_SEQ_FRGNUM(n) (((u16)(n)) & (BIT0|BIT1|BIT2|BIT3))
#define WLAN_GET_SEQ_SEQNUM(n) ((((UINT16)(n)) & (~(BIT0|BIT1|BIT2|BIT3))) >> 4) #define WLAN_GET_SEQ_SEQNUM(n) ((((u16)(n)) & (~(BIT0|BIT1|BIT2|BIT3))) >> 4)
/*--- Data ptr macro -----------------------------------------*/ /*--- Data ptr macro -----------------------------------------*/
/* Creates a UINT8* to the data portion of a frame */ /* Creates a u8* to the data portion of a frame */
/* Assumes you're passing in a ptr to the beginning of the hdr*/ /* Assumes you're passing in a ptr to the beginning of the hdr*/
/*------------------------------------------------------------*/ /*------------------------------------------------------------*/
#define WLAN_HDR_A3_DATAP(p) (((UINT8*)(p)) + WLAN_HDR_A3_LEN) #define WLAN_HDR_A3_DATAP(p) (((u8*)(p)) + WLAN_HDR_A3_LEN)
#define WLAN_HDR_A4_DATAP(p) (((UINT8*)(p)) + WLAN_HDR_A4_LEN) #define WLAN_HDR_A4_DATAP(p) (((u8*)(p)) + WLAN_HDR_A4_LEN)
#define DOT11_RATE5_ISBASIC_GET(r) (((UINT8)(r)) & BIT7) #define DOT11_RATE5_ISBASIC_GET(r) (((u8)(r)) & BIT7)
/*================================================================*/ /*================================================================*/
/* Types */ /* Types */
/* BSS Timestamp */ /* BSS Timestamp */
typedef UINT8 wlan_bss_ts_t[WLAN_BSS_TS_LEN]; typedef u8 wlan_bss_ts_t[WLAN_BSS_TS_LEN];
/* Generic 802.11 Header types */ /* Generic 802.11 Header types */
typedef struct p80211_hdr_a3 typedef struct p80211_hdr_a3
{ {
UINT16 fc; u16 fc;
UINT16 dur; u16 dur;
UINT8 a1[WLAN_ADDR_LEN]; u8 a1[WLAN_ADDR_LEN];
UINT8 a2[WLAN_ADDR_LEN]; u8 a2[WLAN_ADDR_LEN];
UINT8 a3[WLAN_ADDR_LEN]; u8 a3[WLAN_ADDR_LEN];
UINT16 seq; u16 seq;
} __WLAN_ATTRIB_PACK__ p80211_hdr_a3_t; } __WLAN_ATTRIB_PACK__ p80211_hdr_a3_t;
typedef struct p80211_hdr_a4 typedef struct p80211_hdr_a4
{ {
UINT16 fc; u16 fc;
UINT16 dur; u16 dur;
UINT8 a1[WLAN_ADDR_LEN]; u8 a1[WLAN_ADDR_LEN];
UINT8 a2[WLAN_ADDR_LEN]; u8 a2[WLAN_ADDR_LEN];
UINT8 a3[WLAN_ADDR_LEN]; u8 a3[WLAN_ADDR_LEN];
UINT16 seq; u16 seq;
UINT8 a4[WLAN_ADDR_LEN]; u8 a4[WLAN_ADDR_LEN];
} __WLAN_ATTRIB_PACK__ p80211_hdr_a4_t; } __WLAN_ATTRIB_PACK__ p80211_hdr_a4_t;
typedef union p80211_hdr typedef union p80211_hdr
...@@ -271,9 +271,9 @@ typedef union p80211_hdr ...@@ -271,9 +271,9 @@ typedef union p80211_hdr
#define WLAN_FCS_LEN 4 #define WLAN_FCS_LEN 4
/* ftcl in HOST order */ /* ftcl in HOST order */
inline static UINT16 p80211_headerlen(UINT16 fctl) inline static u16 p80211_headerlen(u16 fctl)
{ {
UINT16 hdrlen = 0; u16 hdrlen = 0;
switch ( WLAN_GET_FC_FTYPE(fctl) ) { switch ( WLAN_GET_FC_FTYPE(fctl) ) {
case WLAN_FTYPE_MGMT: case WLAN_FTYPE_MGMT:
......
...@@ -106,9 +106,9 @@ typedef struct p80211ioctl_req ...@@ -106,9 +106,9 @@ typedef struct p80211ioctl_req
{ {
char name[WLAN_DEVNAMELEN_MAX]; char name[WLAN_DEVNAMELEN_MAX];
caddr_t data; caddr_t data;
UINT32 magic; u32 magic;
UINT16 len; u16 len;
UINT32 result; u32 result;
} __WLAN_ATTRIB_PACK__ p80211ioctl_req_t; } __WLAN_ATTRIB_PACK__ p80211ioctl_req_t;
......
...@@ -90,7 +90,7 @@ ...@@ -90,7 +90,7 @@
#define MKMIBMETASIZE(name) p80211meta_ ## mib ## _ ## name ## _ ## size #define MKMIBMETASIZE(name) p80211meta_ ## mib ## _ ## name ## _ ## size
#define MKGRPMETASIZE(name) p80211meta_ ## grp ## _ ## name ## _ ## size #define MKGRPMETASIZE(name) p80211meta_ ## grp ## _ ## name ## _ ## size
#define GETMETASIZE(aptr) (**((UINT32**)(aptr))) #define GETMETASIZE(aptr) (**((u32**)(aptr)))
/*----------------------------------------------------------------*/ /*----------------------------------------------------------------*/
/* The following ifdef depends on the following defines: */ /* The following ifdef depends on the following defines: */
...@@ -114,14 +114,14 @@ ...@@ -114,14 +114,14 @@
typedef struct p80211meta typedef struct p80211meta
{ {
char *name; /* data item name */ char *name; /* data item name */
UINT32 did; /* partial did */ u32 did; /* partial did */
UINT32 flags; /* set of various flag bits */ u32 flags; /* set of various flag bits */
UINT32 min; /* min value of a BOUNDEDINT */ u32 min; /* min value of a BOUNDEDint */
UINT32 max; /* max value of a BOUNDEDINT */ u32 max; /* max value of a BOUNDEDint */
UINT32 maxlen; /* maxlen of a OCTETSTR or DISPLAYSTR */ u32 maxlen; /* maxlen of a OCTETSTR or DISPLAYSTR */
UINT32 minlen; /* minlen of a OCTETSTR or DISPLAYSTR */ u32 minlen; /* minlen of a OCTETSTR or DISPLAYSTR */
p80211enum_t *enumptr; /* ptr to the enum type for ENUMINT */ p80211enum_t *enumptr; /* ptr to the enum type for ENUMint */
p80211_totext_t totextptr; /* ptr to totext conversion function */ p80211_totext_t totextptr; /* ptr to totext conversion function */
p80211_fromtext_t fromtextptr; /* ptr to totext conversion function */ p80211_fromtext_t fromtextptr; /* ptr to totext conversion function */
p80211_valid_t validfunptr; /* ptr to totext conversion function */ p80211_valid_t validfunptr; /* ptr to totext conversion function */
...@@ -150,20 +150,20 @@ typedef struct catlistitem ...@@ -150,20 +150,20 @@ typedef struct catlistitem
/*----------------------------------------------------------------*/ /*----------------------------------------------------------------*/
/* */ /* */
UINT32 p80211_text2did(catlistitem_t *catlist, char *catname, char *grpname, char *itemname); u32 p80211_text2did(catlistitem_t *catlist, char *catname, char *grpname, char *itemname);
UINT32 p80211_text2catdid(catlistitem_t *list, char *name ); u32 p80211_text2catdid(catlistitem_t *list, char *name );
UINT32 p80211_text2grpdid(grplistitem_t *list, char *name ); u32 p80211_text2grpdid(grplistitem_t *list, char *name );
UINT32 p80211_text2itemdid(p80211meta_t *list, char *name ); u32 p80211_text2itemdid(p80211meta_t *list, char *name );
UINT32 p80211_isvalid_did( catlistitem_t *catlist, UINT32 did ); u32 p80211_isvalid_did( catlistitem_t *catlist, u32 did );
UINT32 p80211_isvalid_catdid( catlistitem_t *catlist, UINT32 did ); u32 p80211_isvalid_catdid( catlistitem_t *catlist, u32 did );
UINT32 p80211_isvalid_grpdid( catlistitem_t *catlist, UINT32 did ); u32 p80211_isvalid_grpdid( catlistitem_t *catlist, u32 did );
UINT32 p80211_isvalid_itemdid( catlistitem_t *catlist, UINT32 did ); u32 p80211_isvalid_itemdid( catlistitem_t *catlist, u32 did );
catlistitem_t *p80211_did2cat( catlistitem_t *catlist, UINT32 did ); catlistitem_t *p80211_did2cat( catlistitem_t *catlist, u32 did );
grplistitem_t *p80211_did2grp( catlistitem_t *catlist, UINT32 did ); grplistitem_t *p80211_did2grp( catlistitem_t *catlist, u32 did );
p80211meta_t *p80211_did2item( catlistitem_t *catlist, UINT32 did ); p80211meta_t *p80211_did2item( catlistitem_t *catlist, u32 did );
UINT32 p80211item_maxdatalen( struct catlistitem *metalist, UINT32 did ); u32 p80211item_maxdatalen( struct catlistitem *metalist, u32 did );
UINT32 p80211_metaname2did(struct catlistitem *metalist, char *itemname); u32 p80211_metaname2did(struct catlistitem *metalist, char *itemname);
UINT32 p80211item_getoffset( struct catlistitem *metalist, UINT32 did ); u32 p80211item_getoffset( struct catlistitem *metalist, u32 did );
int p80211item_gettype(p80211meta_t *meta); int p80211item_gettype(p80211meta_t *meta);
#endif /* _P80211META_H */ #endif /* _P80211META_H */
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
/* category metadata list */ /* category metadata list */
extern catlistitem_t mib_catlist[]; extern catlistitem_t mib_catlist[];
extern UINT32 mib_catlist_size; extern u32 mib_catlist_size;
/*================================================================*/ /*================================================================*/
......
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
/* category metadata list */ /* category metadata list */
extern catlistitem_t msg_catlist[]; extern catlistitem_t msg_catlist[];
extern UINT32 msg_catlist_size; extern u32 msg_catlist_size;
/*================================================================*/ /*================================================================*/
......
This diff is collapsed.
...@@ -172,14 +172,14 @@ ...@@ -172,14 +172,14 @@
/* Note: These offsets are from the start of the frame data */ /* Note: These offsets are from the start of the frame data */
#define WLAN_BEACON_OFF_TS 0 #define WLAN_BEACON_OFF_TS 0
#define WLAN_BEACON_OFF_BCN_INT 8 #define WLAN_BEACON_OFF_BCN_int 8
#define WLAN_BEACON_OFF_CAPINFO 10 #define WLAN_BEACON_OFF_CAPINFO 10
#define WLAN_BEACON_OFF_SSID 12 #define WLAN_BEACON_OFF_SSID 12
#define WLAN_DISASSOC_OFF_REASON 0 #define WLAN_DISASSOC_OFF_REASON 0
#define WLAN_ASSOCREQ_OFF_CAP_INFO 0 #define WLAN_ASSOCREQ_OFF_CAP_INFO 0
#define WLAN_ASSOCREQ_OFF_LISTEN_INT 2 #define WLAN_ASSOCREQ_OFF_LISTEN_int 2
#define WLAN_ASSOCREQ_OFF_SSID 4 #define WLAN_ASSOCREQ_OFF_SSID 4
#define WLAN_ASSOCRESP_OFF_CAP_INFO 0 #define WLAN_ASSOCRESP_OFF_CAP_INFO 0
...@@ -188,7 +188,7 @@ ...@@ -188,7 +188,7 @@
#define WLAN_ASSOCRESP_OFF_SUPP_RATES 6 #define WLAN_ASSOCRESP_OFF_SUPP_RATES 6
#define WLAN_REASSOCREQ_OFF_CAP_INFO 0 #define WLAN_REASSOCREQ_OFF_CAP_INFO 0
#define WLAN_REASSOCREQ_OFF_LISTEN_INT 2 #define WLAN_REASSOCREQ_OFF_LISTEN_int 2
#define WLAN_REASSOCREQ_OFF_CURR_AP 4 #define WLAN_REASSOCREQ_OFF_CURR_AP 4
#define WLAN_REASSOCREQ_OFF_SSID 10 #define WLAN_REASSOCREQ_OFF_SSID 10
...@@ -200,7 +200,7 @@ ...@@ -200,7 +200,7 @@
#define WLAN_PROBEREQ_OFF_SSID 0 #define WLAN_PROBEREQ_OFF_SSID 0
#define WLAN_PROBERESP_OFF_TS 0 #define WLAN_PROBERESP_OFF_TS 0
#define WLAN_PROBERESP_OFF_BCN_INT 8 #define WLAN_PROBERESP_OFF_BCN_int 8
#define WLAN_PROBERESP_OFF_CAP_INFO 10 #define WLAN_PROBERESP_OFF_CAP_INFO 10
#define WLAN_PROBERESP_OFF_SSID 12 #define WLAN_PROBERESP_OFF_SSID 12
...@@ -245,82 +245,82 @@ ...@@ -245,82 +245,82 @@
typedef struct wlan_ie typedef struct wlan_ie
{ {
UINT8 eid; u8 eid;
UINT8 len; u8 len;
} __WLAN_ATTRIB_PACK__ wlan_ie_t; } __WLAN_ATTRIB_PACK__ wlan_ie_t;
/*-- Service Set Identity (SSID) -----------------*/ /*-- Service Set Identity (SSID) -----------------*/
typedef struct wlan_ie_ssid typedef struct wlan_ie_ssid
{ {
UINT8 eid; u8 eid;
UINT8 len; u8 len;
UINT8 ssid[1]; /* may be zero, ptrs may overlap */ u8 ssid[1]; /* may be zero, ptrs may overlap */
} __WLAN_ATTRIB_PACK__ wlan_ie_ssid_t; } __WLAN_ATTRIB_PACK__ wlan_ie_ssid_t;
/*-- Supported Rates -----------------------------*/ /*-- Supported Rates -----------------------------*/
typedef struct wlan_ie_supp_rates typedef struct wlan_ie_supp_rates
{ {
UINT8 eid; u8 eid;
UINT8 len; u8 len;
UINT8 rates[1]; /* had better be at LEAST one! */ u8 rates[1]; /* had better be at LEAST one! */
} __WLAN_ATTRIB_PACK__ wlan_ie_supp_rates_t; } __WLAN_ATTRIB_PACK__ wlan_ie_supp_rates_t;
/*-- FH Parameter Set ----------------------------*/ /*-- FH Parameter Set ----------------------------*/
typedef struct wlan_ie_fh_parms typedef struct wlan_ie_fh_parms
{ {
UINT8 eid; u8 eid;
UINT8 len; u8 len;
UINT16 dwell; u16 dwell;
UINT8 hopset; u8 hopset;
UINT8 hoppattern; u8 hoppattern;
UINT8 hopindex; u8 hopindex;
} __WLAN_ATTRIB_PACK__ wlan_ie_fh_parms_t; } __WLAN_ATTRIB_PACK__ wlan_ie_fh_parms_t;
/*-- DS Parameter Set ----------------------------*/ /*-- DS Parameter Set ----------------------------*/
typedef struct wlan_ie_ds_parms typedef struct wlan_ie_ds_parms
{ {
UINT8 eid; u8 eid;
UINT8 len; u8 len;
UINT8 curr_ch; u8 curr_ch;
} __WLAN_ATTRIB_PACK__ wlan_ie_ds_parms_t; } __WLAN_ATTRIB_PACK__ wlan_ie_ds_parms_t;
/*-- CF Parameter Set ----------------------------*/ /*-- CF Parameter Set ----------------------------*/
typedef struct wlan_ie_cf_parms typedef struct wlan_ie_cf_parms
{ {
UINT8 eid; u8 eid;
UINT8 len; u8 len;
UINT8 cfp_cnt; u8 cfp_cnt;
UINT8 cfp_period; u8 cfp_period;
UINT16 cfp_maxdur; u16 cfp_maxdur;
UINT16 cfp_durremaining; u16 cfp_durremaining;
} __WLAN_ATTRIB_PACK__ wlan_ie_cf_parms_t; } __WLAN_ATTRIB_PACK__ wlan_ie_cf_parms_t;
/*-- TIM ------------------------------------------*/ /*-- TIM ------------------------------------------*/
typedef struct wlan_ie_tim typedef struct wlan_ie_tim
{ {
UINT8 eid; u8 eid;
UINT8 len; u8 len;
UINT8 dtim_cnt; u8 dtim_cnt;
UINT8 dtim_period; u8 dtim_period;
UINT8 bitmap_ctl; u8 bitmap_ctl;
UINT8 virt_bm[1]; u8 virt_bm[1];
} __WLAN_ATTRIB_PACK__ wlan_ie_tim_t; } __WLAN_ATTRIB_PACK__ wlan_ie_tim_t;
/*-- IBSS Parameter Set ---------------------------*/ /*-- IBSS Parameter Set ---------------------------*/
typedef struct wlan_ie_ibss_parms typedef struct wlan_ie_ibss_parms
{ {
UINT8 eid; u8 eid;
UINT8 len; u8 len;
UINT16 atim_win; u16 atim_win;
} __WLAN_ATTRIB_PACK__ wlan_ie_ibss_parms_t; } __WLAN_ATTRIB_PACK__ wlan_ie_ibss_parms_t;
/*-- Challenge Text ------------------------------*/ /*-- Challenge Text ------------------------------*/
typedef struct wlan_ie_challenge typedef struct wlan_ie_challenge
{ {
UINT8 eid; u8 eid;
UINT8 len; u8 len;
UINT8 challenge[1]; u8 challenge[1];
} __WLAN_ATTRIB_PACK__ wlan_ie_challenge_t; } __WLAN_ATTRIB_PACK__ wlan_ie_challenge_t;
/*-------------------------------------------------*/ /*-------------------------------------------------*/
...@@ -329,9 +329,9 @@ typedef struct wlan_ie_challenge ...@@ -329,9 +329,9 @@ typedef struct wlan_ie_challenge
/* prototype structure, all mgmt frame types will start with these members */ /* prototype structure, all mgmt frame types will start with these members */
typedef struct wlan_fr_mgmt typedef struct wlan_fr_mgmt
{ {
UINT16 type; u16 type;
UINT16 len; /* DOES NOT include CRC !!!!*/ u16 len; /* DOES NOT include CRC !!!!*/
UINT8 *buf; u8 *buf;
p80211_hdr_t *hdr; p80211_hdr_t *hdr;
/* used for target specific data, skb in Linux */ /* used for target specific data, skb in Linux */
void *priv; void *priv;
...@@ -342,16 +342,16 @@ typedef struct wlan_fr_mgmt ...@@ -342,16 +342,16 @@ typedef struct wlan_fr_mgmt
/*-- Beacon ---------------------------------------*/ /*-- Beacon ---------------------------------------*/
typedef struct wlan_fr_beacon typedef struct wlan_fr_beacon
{ {
UINT16 type; u16 type;
UINT16 len; u16 len;
UINT8 *buf; u8 *buf;
p80211_hdr_t *hdr; p80211_hdr_t *hdr;
/* used for target specific data, skb in Linux */ /* used for target specific data, skb in Linux */
void *priv; void *priv;
/*-- fixed fields -----------*/ /*-- fixed fields -----------*/
UINT64 *ts; u64 *ts;
UINT16 *bcn_int; u16 *bcn_int;
UINT16 *cap_info; u16 *cap_info;
/*-- info elements ----------*/ /*-- info elements ----------*/
wlan_ie_ssid_t *ssid; wlan_ie_ssid_t *ssid;
wlan_ie_supp_rates_t *supp_rates; wlan_ie_supp_rates_t *supp_rates;
...@@ -367,9 +367,9 @@ typedef struct wlan_fr_beacon ...@@ -367,9 +367,9 @@ typedef struct wlan_fr_beacon
/*-- IBSS ATIM ------------------------------------*/ /*-- IBSS ATIM ------------------------------------*/
typedef struct wlan_fr_ibssatim typedef struct wlan_fr_ibssatim
{ {
UINT16 type; u16 type;
UINT16 len; u16 len;
UINT8* buf; u8* buf;
p80211_hdr_t *hdr; p80211_hdr_t *hdr;
/* used for target specific data, skb in Linux */ /* used for target specific data, skb in Linux */
void *priv; void *priv;
...@@ -384,14 +384,14 @@ typedef struct wlan_fr_ibssatim ...@@ -384,14 +384,14 @@ typedef struct wlan_fr_ibssatim
/*-- Disassociation -------------------------------*/ /*-- Disassociation -------------------------------*/
typedef struct wlan_fr_disassoc typedef struct wlan_fr_disassoc
{ {
UINT16 type; u16 type;
UINT16 len; u16 len;
UINT8 *buf; u8 *buf;
p80211_hdr_t *hdr; p80211_hdr_t *hdr;
/* used for target specific data, skb in Linux */ /* used for target specific data, skb in Linux */
void *priv; void *priv;
/*-- fixed fields -----------*/ /*-- fixed fields -----------*/
UINT16 *reason; u16 *reason;
/*-- info elements ----------*/ /*-- info elements ----------*/
...@@ -400,15 +400,15 @@ typedef struct wlan_fr_disassoc ...@@ -400,15 +400,15 @@ typedef struct wlan_fr_disassoc
/*-- Association Request --------------------------*/ /*-- Association Request --------------------------*/
typedef struct wlan_fr_assocreq typedef struct wlan_fr_assocreq
{ {
UINT16 type; u16 type;
UINT16 len; u16 len;
UINT8* buf; u8* buf;
p80211_hdr_t *hdr; p80211_hdr_t *hdr;
/* used for target specific data, skb in Linux */ /* used for target specific data, skb in Linux */
void *priv; void *priv;
/*-- fixed fields -----------*/ /*-- fixed fields -----------*/
UINT16 *cap_info; u16 *cap_info;
UINT16 *listen_int; u16 *listen_int;
/*-- info elements ----------*/ /*-- info elements ----------*/
wlan_ie_ssid_t *ssid; wlan_ie_ssid_t *ssid;
wlan_ie_supp_rates_t *supp_rates; wlan_ie_supp_rates_t *supp_rates;
...@@ -418,16 +418,16 @@ typedef struct wlan_fr_assocreq ...@@ -418,16 +418,16 @@ typedef struct wlan_fr_assocreq
/*-- Association Response -------------------------*/ /*-- Association Response -------------------------*/
typedef struct wlan_fr_assocresp typedef struct wlan_fr_assocresp
{ {
UINT16 type; u16 type;
UINT16 len; u16 len;
UINT8 *buf; u8 *buf;
p80211_hdr_t *hdr; p80211_hdr_t *hdr;
/* used for target specific data, skb in Linux */ /* used for target specific data, skb in Linux */
void *priv; void *priv;
/*-- fixed fields -----------*/ /*-- fixed fields -----------*/
UINT16 *cap_info; u16 *cap_info;
UINT16 *status; u16 *status;
UINT16 *aid; u16 *aid;
/*-- info elements ----------*/ /*-- info elements ----------*/
wlan_ie_supp_rates_t *supp_rates; wlan_ie_supp_rates_t *supp_rates;
...@@ -436,16 +436,16 @@ typedef struct wlan_fr_assocresp ...@@ -436,16 +436,16 @@ typedef struct wlan_fr_assocresp
/*-- Reassociation Request ------------------------*/ /*-- Reassociation Request ------------------------*/
typedef struct wlan_fr_reassocreq typedef struct wlan_fr_reassocreq
{ {
UINT16 type; u16 type;
UINT16 len; u16 len;
UINT8 *buf; u8 *buf;
p80211_hdr_t *hdr; p80211_hdr_t *hdr;
/* used for target specific data, skb in Linux */ /* used for target specific data, skb in Linux */
void *priv; void *priv;
/*-- fixed fields -----------*/ /*-- fixed fields -----------*/
UINT16 *cap_info; u16 *cap_info;
UINT16 *listen_int; u16 *listen_int;
UINT8 *curr_ap; u8 *curr_ap;
/*-- info elements ----------*/ /*-- info elements ----------*/
wlan_ie_ssid_t *ssid; wlan_ie_ssid_t *ssid;
wlan_ie_supp_rates_t *supp_rates; wlan_ie_supp_rates_t *supp_rates;
...@@ -455,16 +455,16 @@ typedef struct wlan_fr_reassocreq ...@@ -455,16 +455,16 @@ typedef struct wlan_fr_reassocreq
/*-- Reassociation Response -----------------------*/ /*-- Reassociation Response -----------------------*/
typedef struct wlan_fr_reassocresp typedef struct wlan_fr_reassocresp
{ {
UINT16 type; u16 type;
UINT16 len; u16 len;
UINT8 *buf; u8 *buf;
p80211_hdr_t *hdr; p80211_hdr_t *hdr;
/* used for target specific data, skb in Linux */ /* used for target specific data, skb in Linux */
void *priv; void *priv;
/*-- fixed fields -----------*/ /*-- fixed fields -----------*/
UINT16 *cap_info; u16 *cap_info;
UINT16 *status; u16 *status;
UINT16 *aid; u16 *aid;
/*-- info elements ----------*/ /*-- info elements ----------*/
wlan_ie_supp_rates_t *supp_rates; wlan_ie_supp_rates_t *supp_rates;
...@@ -473,9 +473,9 @@ typedef struct wlan_fr_reassocresp ...@@ -473,9 +473,9 @@ typedef struct wlan_fr_reassocresp
/*-- Probe Request --------------------------------*/ /*-- Probe Request --------------------------------*/
typedef struct wlan_fr_probereq typedef struct wlan_fr_probereq
{ {
UINT16 type; u16 type;
UINT16 len; u16 len;
UINT8 *buf; u8 *buf;
p80211_hdr_t *hdr; p80211_hdr_t *hdr;
/* used for target specific data, skb in Linux */ /* used for target specific data, skb in Linux */
void *priv; void *priv;
...@@ -489,16 +489,16 @@ typedef struct wlan_fr_probereq ...@@ -489,16 +489,16 @@ typedef struct wlan_fr_probereq
/*-- Probe Response -------------------------------*/ /*-- Probe Response -------------------------------*/
typedef struct wlan_fr_proberesp typedef struct wlan_fr_proberesp
{ {
UINT16 type; u16 type;
UINT16 len; u16 len;
UINT8 *buf; u8 *buf;
p80211_hdr_t *hdr; p80211_hdr_t *hdr;
/* used for target specific data, skb in Linux */ /* used for target specific data, skb in Linux */
void *priv; void *priv;
/*-- fixed fields -----------*/ /*-- fixed fields -----------*/
UINT64 *ts; u64 *ts;
UINT16 *bcn_int; u16 *bcn_int;
UINT16 *cap_info; u16 *cap_info;
/*-- info elements ----------*/ /*-- info elements ----------*/
wlan_ie_ssid_t *ssid; wlan_ie_ssid_t *ssid;
wlan_ie_supp_rates_t *supp_rates; wlan_ie_supp_rates_t *supp_rates;
...@@ -511,16 +511,16 @@ typedef struct wlan_fr_proberesp ...@@ -511,16 +511,16 @@ typedef struct wlan_fr_proberesp
/*-- Authentication -------------------------------*/ /*-- Authentication -------------------------------*/
typedef struct wlan_fr_authen typedef struct wlan_fr_authen
{ {
UINT16 type; u16 type;
UINT16 len; u16 len;
UINT8 *buf; u8 *buf;
p80211_hdr_t *hdr; p80211_hdr_t *hdr;
/* used for target specific data, skb in Linux */ /* used for target specific data, skb in Linux */
void *priv; void *priv;
/*-- fixed fields -----------*/ /*-- fixed fields -----------*/
UINT16 *auth_alg; u16 *auth_alg;
UINT16 *auth_seq; u16 *auth_seq;
UINT16 *status; u16 *status;
/*-- info elements ----------*/ /*-- info elements ----------*/
wlan_ie_challenge_t *challenge; wlan_ie_challenge_t *challenge;
...@@ -529,14 +529,14 @@ typedef struct wlan_fr_authen ...@@ -529,14 +529,14 @@ typedef struct wlan_fr_authen
/*-- Deauthenication -----------------------------*/ /*-- Deauthenication -----------------------------*/
typedef struct wlan_fr_deauthen typedef struct wlan_fr_deauthen
{ {
UINT16 type; u16 type;
UINT16 len; u16 len;
UINT8 *buf; u8 *buf;
p80211_hdr_t *hdr; p80211_hdr_t *hdr;
/* used for target specific data, skb in Linux */ /* used for target specific data, skb in Linux */
void *priv; void *priv;
/*-- fixed fields -----------*/ /*-- fixed fields -----------*/
UINT16 *reason; u16 *reason;
/*-- info elements ----------*/ /*-- info elements ----------*/
......
...@@ -78,17 +78,17 @@ ...@@ -78,17 +78,17 @@
typedef struct p80211msg typedef struct p80211msg
{ {
UINT32 msgcode; u32 msgcode;
UINT32 msglen; u32 msglen;
UINT8 devname[WLAN_DEVNAMELEN_MAX]; u8 devname[WLAN_DEVNAMELEN_MAX];
} __WLAN_ATTRIB_PACK__ p80211msg_t; } __WLAN_ATTRIB_PACK__ p80211msg_t;
typedef struct p80211msgd typedef struct p80211msgd
{ {
UINT32 msgcode; u32 msgcode;
UINT32 msglen; u32 msglen;
UINT8 devname[WLAN_DEVNAMELEN_MAX]; u8 devname[WLAN_DEVNAMELEN_MAX];
UINT8 args[0]; u8 args[0];
} __WLAN_ATTRIB_PACK__ p80211msgd_t; } __WLAN_ATTRIB_PACK__ p80211msgd_t;
/*================================================================*/ /*================================================================*/
......
...@@ -128,7 +128,7 @@ static void p80211knetdev_set_multicast_list(netdevice_t *dev); ...@@ -128,7 +128,7 @@ static void p80211knetdev_set_multicast_list(netdevice_t *dev);
static int p80211knetdev_do_ioctl(netdevice_t *dev, struct ifreq *ifr, int cmd); static int p80211knetdev_do_ioctl(netdevice_t *dev, struct ifreq *ifr, int cmd);
static int p80211knetdev_set_mac_address(netdevice_t *dev, void *addr); static int p80211knetdev_set_mac_address(netdevice_t *dev, void *addr);
static void p80211knetdev_tx_timeout(netdevice_t *netdev); static void p80211knetdev_tx_timeout(netdevice_t *netdev);
static int p80211_rx_typedrop( wlandevice_t *wlandev, UINT16 fc); static int p80211_rx_typedrop( wlandevice_t *wlandev, u16 fc);
/*================================================================*/ /*================================================================*/
...@@ -343,7 +343,7 @@ static void p80211netdev_rx_bh(unsigned long arg) ...@@ -343,7 +343,7 @@ static void p80211netdev_rx_bh(unsigned long arg)
struct sk_buff *skb = NULL; struct sk_buff *skb = NULL;
netdevice_t *dev = wlandev->netdev; netdevice_t *dev = wlandev->netdev;
p80211_hdr_a3_t *hdr; p80211_hdr_a3_t *hdr;
UINT16 fc; u16 fc;
DBFENTER; DBFENTER;
...@@ -571,7 +571,7 @@ static void p80211knetdev_set_multicast_list(netdevice_t *dev) ...@@ -571,7 +571,7 @@ static void p80211knetdev_set_multicast_list(netdevice_t *dev)
static int p80211netdev_ethtool(wlandevice_t *wlandev, void __user *useraddr) static int p80211netdev_ethtool(wlandevice_t *wlandev, void __user *useraddr)
{ {
UINT32 ethcmd; u32 ethcmd;
struct ethtool_drvinfo info; struct ethtool_drvinfo info;
struct ethtool_value edata; struct ethtool_value edata;
...@@ -638,7 +638,7 @@ static int p80211netdev_ethtool(wlandevice_t *wlandev, void __user *useraddr) ...@@ -638,7 +638,7 @@ static int p80211netdev_ethtool(wlandevice_t *wlandev, void __user *useraddr)
* -EFAULT memory fault copying msg from user buffer * -EFAULT memory fault copying msg from user buffer
* -ENOMEM unable to allocate kernel msg buffer * -ENOMEM unable to allocate kernel msg buffer
* -ENOSYS bad magic, it the cmd really for us? * -ENOSYS bad magic, it the cmd really for us?
* -EINTR sleeping on cmd, awakened by signal, cmd cancelled. * -EintR sleeping on cmd, awakened by signal, cmd cancelled.
* *
* Call Context: * Call Context:
* Process thread (ioctl caller). TODO: SMP support may require * Process thread (ioctl caller). TODO: SMP support may require
...@@ -649,7 +649,7 @@ static int p80211knetdev_do_ioctl(netdevice_t *dev, struct ifreq *ifr, int cmd) ...@@ -649,7 +649,7 @@ static int p80211knetdev_do_ioctl(netdevice_t *dev, struct ifreq *ifr, int cmd)
int result = 0; int result = 0;
p80211ioctl_req_t *req = (p80211ioctl_req_t*)ifr; p80211ioctl_req_t *req = (p80211ioctl_req_t*)ifr;
wlandevice_t *wlandev = dev->ml_priv; wlandevice_t *wlandev = dev->ml_priv;
UINT8 *msgbuf; u8 *msgbuf;
DBFENTER; DBFENTER;
WLAN_LOG_DEBUG(2, "rx'd ioctl, cmd=%d, len=%d\n", cmd, req->len); WLAN_LOG_DEBUG(2, "rx'd ioctl, cmd=%d, len=%d\n", cmd, req->len);
...@@ -769,7 +769,7 @@ static int p80211knetdev_set_mac_address(netdevice_t *dev, void *addr) ...@@ -769,7 +769,7 @@ static int p80211knetdev_set_mac_address(netdevice_t *dev, void *addr)
resultcode->data = 0; resultcode->data = 0;
/* now fire the request */ /* now fire the request */
result = p80211req_dorequest(dev->ml_priv, (UINT8 *)&dot11req); result = p80211req_dorequest(dev->ml_priv, (u8 *)&dot11req);
/* If the request wasn't successful, report an error and don't /* If the request wasn't successful, report an error and don't
* change the netdev address * change the netdev address
...@@ -1075,10 +1075,10 @@ void p80211netdev_hwremoved(wlandevice_t *wlandev) ...@@ -1075,10 +1075,10 @@ void p80211netdev_hwremoved(wlandevice_t *wlandev)
* Call context: * Call context:
* interrupt * interrupt
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
static int p80211_rx_typedrop( wlandevice_t *wlandev, UINT16 fc) static int p80211_rx_typedrop( wlandevice_t *wlandev, u16 fc)
{ {
UINT16 ftype; u16 ftype;
UINT16 fstype; u16 fstype;
int drop = 0; int drop = 0;
/* Classify frame, increment counter */ /* Classify frame, increment counter */
ftype = WLAN_GET_FC_FTYPE(fc); ftype = WLAN_GET_FC_FTYPE(fc);
......
...@@ -113,39 +113,39 @@ ...@@ -113,39 +113,39 @@
/* Received frame statistics */ /* Received frame statistics */
typedef struct p80211_frmrx_t typedef struct p80211_frmrx_t
{ {
UINT32 mgmt; u32 mgmt;
UINT32 assocreq; u32 assocreq;
UINT32 assocresp; u32 assocresp;
UINT32 reassocreq; u32 reassocreq;
UINT32 reassocresp; u32 reassocresp;
UINT32 probereq; u32 probereq;
UINT32 proberesp; u32 proberesp;
UINT32 beacon; u32 beacon;
UINT32 atim; u32 atim;
UINT32 disassoc; u32 disassoc;
UINT32 authen; u32 authen;
UINT32 deauthen; u32 deauthen;
UINT32 mgmt_unknown; u32 mgmt_unknown;
UINT32 ctl; u32 ctl;
UINT32 pspoll; u32 pspoll;
UINT32 rts; u32 rts;
UINT32 cts; u32 cts;
UINT32 ack; u32 ack;
UINT32 cfend; u32 cfend;
UINT32 cfendcfack; u32 cfendcfack;
UINT32 ctl_unknown; u32 ctl_unknown;
UINT32 data; u32 data;
UINT32 dataonly; u32 dataonly;
UINT32 data_cfack; u32 data_cfack;
UINT32 data_cfpoll; u32 data_cfpoll;
UINT32 data__cfack_cfpoll; u32 data__cfack_cfpoll;
UINT32 null; u32 null;
UINT32 cfack; u32 cfack;
UINT32 cfpoll; u32 cfpoll;
UINT32 cfack_cfpoll; u32 cfack_cfpoll;
UINT32 data_unknown; u32 data_unknown;
UINT32 decrypt; u32 decrypt;
UINT32 decrypt_err; u32 decrypt_err;
} p80211_frmrx_t; } p80211_frmrx_t;
#ifdef WIRELESS_EXT #ifdef WIRELESS_EXT
...@@ -180,18 +180,18 @@ typedef struct wlandevice ...@@ -180,18 +180,18 @@ typedef struct wlandevice
char name[WLAN_DEVNAMELEN_MAX]; /* Dev name, from register_wlandev()*/ char name[WLAN_DEVNAMELEN_MAX]; /* Dev name, from register_wlandev()*/
char *nsdname; char *nsdname;
UINT32 state; /* Device I/F state (open/closed) */ u32 state; /* Device I/F state (open/closed) */
UINT32 msdstate; /* state of underlying driver */ u32 msdstate; /* state of underlying driver */
UINT32 hwremoved; /* Has the hw been yanked out? */ u32 hwremoved; /* Has the hw been yanked out? */
/* Hardware config */ /* Hardware config */
UINT irq; unsigned int irq;
UINT iobase; unsigned int iobase;
UINT membase; unsigned int membase;
UINT32 nsdcaps; /* NSD Capabilities flags */ u32 nsdcaps; /* NSD Capabilities flags */
/* Config vars */ /* Config vars */
UINT ethconv; unsigned int ethconv;
/* device methods (init by MSD, used by p80211 */ /* device methods (init by MSD, used by p80211 */
int (*open)(struct wlandevice *wlandev); int (*open)(struct wlandevice *wlandev);
...@@ -204,15 +204,15 @@ typedef struct wlandevice ...@@ -204,15 +204,15 @@ typedef struct wlandevice
void (*tx_timeout)(struct wlandevice *wlandev); void (*tx_timeout)(struct wlandevice *wlandev);
/* 802.11 State */ /* 802.11 State */
UINT8 bssid[WLAN_BSSID_LEN]; u8 bssid[WLAN_BSSID_LEN];
p80211pstr32_t ssid; p80211pstr32_t ssid;
UINT32 macmode; u32 macmode;
int linkstatus; int linkstatus;
int shortpreamble; /* C bool */ int shortpreamble; /* C bool */
/* WEP State */ /* WEP State */
UINT8 wep_keys[NUM_WEPKEYS][MAX_KEYLEN]; u8 wep_keys[NUM_WEPKEYS][MAX_KEYLEN];
UINT8 wep_keylens[NUM_WEPKEYS]; u8 wep_keylens[NUM_WEPKEYS];
int hostwep; int hostwep;
/* Request/Confirm i/f state (used by p80211) */ /* Request/Confirm i/f state (used by p80211) */
...@@ -237,7 +237,7 @@ typedef struct wlandevice ...@@ -237,7 +237,7 @@ typedef struct wlandevice
struct iw_statistics wstats; struct iw_statistics wstats;
/* jkriegl: iwspy fields */ /* jkriegl: iwspy fields */
UINT8 spy_number; u8 spy_number;
char spy_address[IW_MAX_SPY][ETH_ALEN]; char spy_address[IW_MAX_SPY][ETH_ALEN];
struct iw_quality spy_stat[IW_MAX_SPY]; struct iw_quality spy_stat[IW_MAX_SPY];
...@@ -246,9 +246,9 @@ typedef struct wlandevice ...@@ -246,9 +246,9 @@ typedef struct wlandevice
} wlandevice_t; } wlandevice_t;
/* WEP stuff */ /* WEP stuff */
int wep_change_key(wlandevice_t *wlandev, int keynum, UINT8* key, int keylen); int wep_change_key(wlandevice_t *wlandev, int keynum, u8* key, int keylen);
int wep_decrypt(wlandevice_t *wlandev, UINT8 *buf, UINT32 len, int key_override, UINT8 *iv, UINT8 *icv); int wep_decrypt(wlandevice_t *wlandev, u8 *buf, u32 len, int key_override, u8 *iv, u8 *icv);
int wep_encrypt(wlandevice_t *wlandev, UINT8 *buf, UINT8 *dst, UINT32 len, int keynum, UINT8 *iv, UINT8 *icv); int wep_encrypt(wlandevice_t *wlandev, u8 *buf, u8 *dst, u32 len, int keynum, u8 *iv, u8 *icv);
/*================================================================*/ /*================================================================*/
/* Externs */ /* Externs */
......
...@@ -125,7 +125,7 @@ static int p80211req_mibset_mibget(wlandevice_t *wlandev, p80211msg_dot11req_mib ...@@ -125,7 +125,7 @@ static int p80211req_mibset_mibget(wlandevice_t *wlandev, p80211msg_dot11req_mib
* Potentially blocks the caller, so it's a good idea to * Potentially blocks the caller, so it's a good idea to
* not call this function from an interrupt context. * not call this function from an interrupt context.
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
int p80211req_dorequest( wlandevice_t *wlandev, UINT8 *msgbuf) int p80211req_dorequest( wlandevice_t *wlandev, u8 *msgbuf)
{ {
int result = 0; int result = 0;
p80211msg_t *msg = (p80211msg_t*)msgbuf; p80211msg_t *msg = (p80211msg_t*)msgbuf;
...@@ -223,13 +223,13 @@ static int p80211req_mibset_mibget(wlandevice_t *wlandev, ...@@ -223,13 +223,13 @@ static int p80211req_mibset_mibget(wlandevice_t *wlandev,
{ {
p80211itemd_t *mibitem = (p80211itemd_t *) mib_msg->mibattribute.data; p80211itemd_t *mibitem = (p80211itemd_t *) mib_msg->mibattribute.data;
p80211pstrd_t *pstr = (p80211pstrd_t*) mibitem->data; p80211pstrd_t *pstr = (p80211pstrd_t*) mibitem->data;
UINT8 *key = mibitem->data + sizeof(p80211pstrd_t); u8 *key = mibitem->data + sizeof(p80211pstrd_t);
DBFENTER; DBFENTER;
switch (mibitem->did) { switch (mibitem->did) {
case DIDmib_dot11smt_p80211Table_p80211_ifstate: { case DIDmib_dot11smt_p80211Table_p80211_ifstate: {
UINT32 *data = (UINT32 *) mibitem->data; u32 *data = (u32 *) mibitem->data;
if (isget) if (isget)
switch (wlandev->msdstate) { switch (wlandev->msdstate) {
case WLAN_MSD_HWPRESENT: case WLAN_MSD_HWPRESENT:
...@@ -247,7 +247,7 @@ static int p80211req_mibset_mibget(wlandevice_t *wlandev, ...@@ -247,7 +247,7 @@ static int p80211req_mibset_mibget(wlandevice_t *wlandev,
break; break;
} }
case DIDmib_dot11phy_dot11PhyOperationTable_dot11ShortPreambleEnabled: { case DIDmib_dot11phy_dot11PhyOperationTable_dot11ShortPreambleEnabled: {
UINT32 *data = (UINT32 *) mibitem->data; u32 *data = (u32 *) mibitem->data;
if (isget) if (isget)
*data = wlandev->shortpreamble; *data = wlandev->shortpreamble;
...@@ -276,7 +276,7 @@ static int p80211req_mibset_mibget(wlandevice_t *wlandev, ...@@ -276,7 +276,7 @@ static int p80211req_mibset_mibget(wlandevice_t *wlandev,
break; break;
} }
case DIDmib_dot11smt_dot11PrivacyTable_dot11WEPDefaultKeyID: { case DIDmib_dot11smt_dot11PrivacyTable_dot11WEPDefaultKeyID: {
UINT32 *data = (UINT32 *) mibitem->data; u32 *data = (u32 *) mibitem->data;
if (isget) { if (isget) {
*data = wlandev->hostwep & HOSTWEP_DEFAULTKEY_MASK; *data = wlandev->hostwep & HOSTWEP_DEFAULTKEY_MASK;
...@@ -288,7 +288,7 @@ static int p80211req_mibset_mibget(wlandevice_t *wlandev, ...@@ -288,7 +288,7 @@ static int p80211req_mibset_mibget(wlandevice_t *wlandev,
break; break;
} }
case DIDmib_dot11smt_dot11PrivacyTable_dot11PrivacyInvoked: { case DIDmib_dot11smt_dot11PrivacyTable_dot11PrivacyInvoked: {
UINT32 *data = (UINT32 *) mibitem->data; u32 *data = (u32 *) mibitem->data;
if (isget) { if (isget) {
if (wlandev->hostwep & HOSTWEP_PRIVACYINVOKED) if (wlandev->hostwep & HOSTWEP_PRIVACYINVOKED)
...@@ -303,7 +303,7 @@ static int p80211req_mibset_mibget(wlandevice_t *wlandev, ...@@ -303,7 +303,7 @@ static int p80211req_mibset_mibget(wlandevice_t *wlandev,
break; break;
} }
case DIDmib_dot11smt_dot11PrivacyTable_dot11ExcludeUnencrypted: { case DIDmib_dot11smt_dot11PrivacyTable_dot11ExcludeUnencrypted: {
UINT32 *data = (UINT32 *) mibitem->data; u32 *data = (u32 *) mibitem->data;
if (isget) { if (isget) {
if (wlandev->hostwep & HOSTWEP_EXCLUDEUNENCRYPTED) if (wlandev->hostwep & HOSTWEP_EXCLUDEUNENCRYPTED)
......
...@@ -63,6 +63,6 @@ ...@@ -63,6 +63,6 @@
/*================================================================*/ /*================================================================*/
/* Function Declarations */ /* Function Declarations */
int p80211req_dorequest(wlandevice_t *wlandev, UINT8 *msgbuf); int p80211req_dorequest(wlandevice_t *wlandev, u8 *msgbuf);
#endif #endif
This diff is collapsed.
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
/*================================================================*/ /*================================================================*/
/* Local Constants */ /* Local Constants */
#define SSWAP(a,b) {UINT8 tmp = s[a]; s[a] = s[b]; s[b] = tmp;} #define SSWAP(a,b) {u8 tmp = s[a]; s[a] = s[b]; s[b] = tmp;}
#define WEP_KEY(x) (((x) & 0xC0) >> 6) #define WEP_KEY(x) (((x) & 0xC0) >> 6)
/*================================================================*/ /*================================================================*/
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
/*================================================================*/ /*================================================================*/
/* Local Static Definitions */ /* Local Static Definitions */
static const UINT32 wep_crc32_table[256] = { static const u32 wep_crc32_table[256] = {
0x00000000L, 0x77073096L, 0xee0e612cL, 0x990951baL, 0x076dc419L, 0x00000000L, 0x77073096L, 0xee0e612cL, 0x990951baL, 0x076dc419L,
0x706af48fL, 0xe963a535L, 0x9e6495a3L, 0x0edb8832L, 0x79dcb8a4L, 0x706af48fL, 0xe963a535L, 0x9e6495a3L, 0x0edb8832L, 0x79dcb8a4L,
0xe0d5e91eL, 0x97d2d988L, 0x09b64c2bL, 0x7eb17cbdL, 0xe7b82d07L, 0xe0d5e91eL, 0x97d2d988L, 0x09b64c2bL, 0x7eb17cbdL, 0xe7b82d07L,
...@@ -149,7 +149,7 @@ static const UINT32 wep_crc32_table[256] = { ...@@ -149,7 +149,7 @@ static const UINT32 wep_crc32_table[256] = {
/* keylen in bytes! */ /* keylen in bytes! */
int wep_change_key(wlandevice_t *wlandev, int keynum, UINT8* key, int keylen) int wep_change_key(wlandevice_t *wlandev, int keynum, u8* key, int keylen)
{ {
if (keylen < 0) return -1; if (keylen < 0) return -1;
if (keylen >= MAX_KEYLEN) return -1; if (keylen >= MAX_KEYLEN) return -1;
...@@ -172,11 +172,11 @@ int wep_change_key(wlandevice_t *wlandev, int keynum, UINT8* key, int keylen) ...@@ -172,11 +172,11 @@ int wep_change_key(wlandevice_t *wlandev, int keynum, UINT8* key, int keylen)
4-byte IV at start of buffer, 4-byte ICV at end of buffer. 4-byte IV at start of buffer, 4-byte ICV at end of buffer.
if successful, buf start is payload begin, length -= 8; if successful, buf start is payload begin, length -= 8;
*/ */
int wep_decrypt(wlandevice_t *wlandev, UINT8 *buf, UINT32 len, int key_override, UINT8 *iv, UINT8 *icv) int wep_decrypt(wlandevice_t *wlandev, u8 *buf, u32 len, int key_override, u8 *iv, u8 *icv)
{ {
UINT32 i, j, k, crc, keylen; u32 i, j, k, crc, keylen;
UINT8 s[256], key[64], c_crc[4]; u8 s[256], key[64], c_crc[4];
UINT8 keyidx; u8 keyidx;
/* Needs to be at least 8 bytes of payload */ /* Needs to be at least 8 bytes of payload */
if (len <= 0) return -1; if (len <= 0) return -1;
...@@ -244,10 +244,10 @@ int wep_decrypt(wlandevice_t *wlandev, UINT8 *buf, UINT32 len, int key_override, ...@@ -244,10 +244,10 @@ int wep_decrypt(wlandevice_t *wlandev, UINT8 *buf, UINT32 len, int key_override,
} }
/* encrypts in-place. */ /* encrypts in-place. */
int wep_encrypt(wlandevice_t *wlandev, UINT8 *buf, UINT8 *dst, UINT32 len, int keynum, UINT8 *iv, UINT8 *icv) int wep_encrypt(wlandevice_t *wlandev, u8 *buf, u8 *dst, u32 len, int keynum, u8 *iv, u8 *icv)
{ {
UINT32 i, j, k, crc, keylen; u32 i, j, k, crc, keylen;
UINT8 s[256], key[64]; u8 s[256], key[64];
/* no point in WEPping an empty frame */ /* no point in WEPping an empty frame */
if (len <= 0) return -1; if (len <= 0) return -1;
......
...@@ -78,7 +78,7 @@ static int p80211wext_giwessid(netdevice_t *dev, ...@@ -78,7 +78,7 @@ static int p80211wext_giwessid(netdevice_t *dev,
/* compatibility to wireless extensions */ /* compatibility to wireless extensions */
#ifdef WIRELESS_EXT #ifdef WIRELESS_EXT
static UINT8 p80211_mhz_to_channel(UINT16 mhz) static u8 p80211_mhz_to_channel(u16 mhz)
{ {
if (mhz >= 5000) { if (mhz >= 5000) {
return ((mhz - 5000) / 5); return ((mhz - 5000) / 5);
...@@ -94,7 +94,7 @@ static UINT8 p80211_mhz_to_channel(UINT16 mhz) ...@@ -94,7 +94,7 @@ static UINT8 p80211_mhz_to_channel(UINT16 mhz)
return 0; return 0;
} }
static UINT16 p80211_channel_to_mhz(UINT8 ch, int dot11a) static u16 p80211_channel_to_mhz(u8 ch, int dot11a)
{ {
if (ch == 0) if (ch == 0)
...@@ -144,7 +144,7 @@ static int qual_as_percent(int snr ) { ...@@ -144,7 +144,7 @@ static int qual_as_percent(int snr ) {
static int p80211wext_dorequest(wlandevice_t *wlandev, UINT32 did, UINT32 data) static int p80211wext_dorequest(wlandevice_t *wlandev, u32 did, u32 data)
{ {
p80211msg_dot11req_mibset_t msg; p80211msg_dot11req_mibset_t msg;
p80211item_uint32_t mibitem; p80211item_uint32_t mibitem;
...@@ -156,7 +156,7 @@ static int p80211wext_dorequest(wlandevice_t *wlandev, UINT32 did, UINT32 data) ...@@ -156,7 +156,7 @@ static int p80211wext_dorequest(wlandevice_t *wlandev, UINT32 did, UINT32 data)
mibitem.did = did; mibitem.did = did;
mibitem.data = data; mibitem.data = data;
memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
result = p80211req_dorequest(wlandev, (UINT8*)&msg); result = p80211req_dorequest(wlandev, (u8*)&msg);
DBFEXIT; DBFEXIT;
return result; return result;
...@@ -197,7 +197,7 @@ static int p80211wext_autojoin(wlandevice_t *wlandev) ...@@ -197,7 +197,7 @@ static int p80211wext_autojoin(wlandevice_t *wlandev)
memcpy(msg.ssid.data.data, ssid, data.length); memcpy(msg.ssid.data.data, ssid, data.length);
msg.ssid.data.len = data.length; msg.ssid.data.len = data.length;
result = p80211req_dorequest(wlandev, (UINT8*)&msg); result = p80211req_dorequest(wlandev, (u8*)&msg);
if (result) { if (result) {
err = -EFAULT; err = -EFAULT;
...@@ -303,7 +303,7 @@ static int p80211wext_giwfreq(netdevice_t *dev, ...@@ -303,7 +303,7 @@ static int p80211wext_giwfreq(netdevice_t *dev,
msg.msgcode = DIDmsg_dot11req_mibget; msg.msgcode = DIDmsg_dot11req_mibget;
mibitem.did = DIDmib_dot11phy_dot11PhyDSSSTable_dot11CurrentChannel; mibitem.did = DIDmib_dot11phy_dot11PhyDSSSTable_dot11CurrentChannel;
memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
result = p80211req_dorequest(wlandev, (UINT8*)&msg); result = p80211req_dorequest(wlandev, (u8*)&msg);
if (result) { if (result) {
err = -EFAULT; err = -EFAULT;
...@@ -353,7 +353,7 @@ static int p80211wext_siwfreq(netdevice_t *dev, ...@@ -353,7 +353,7 @@ static int p80211wext_siwfreq(netdevice_t *dev,
mibitem.data = p80211_mhz_to_channel(freq->m); mibitem.data = p80211_mhz_to_channel(freq->m);
memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
result = p80211req_dorequest(wlandev, (UINT8*)&msg); result = p80211req_dorequest(wlandev, (u8*)&msg);
if (result) { if (result) {
err = -EFAULT; err = -EFAULT;
...@@ -436,14 +436,11 @@ static int p80211wext_siwmode(netdevice_t *dev, ...@@ -436,14 +436,11 @@ static int p80211wext_siwmode(netdevice_t *dev,
} }
/* Set Operation mode to the PORT TYPE RID */ /* Set Operation mode to the PORT TYPE RID */
#warning "get rid of p2mib here"
msg.msgcode = DIDmsg_dot11req_mibset; msg.msgcode = DIDmsg_dot11req_mibset;
mibitem.did = DIDmib_p2_p2Static_p2CnfPortType; mibitem.did = DIDmib_p2_p2Static_p2CnfPortType;
mibitem.data = (*mode == IW_MODE_ADHOC) ? 0 : 1; mibitem.data = (*mode == IW_MODE_ADHOC) ? 0 : 1;
memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
result = p80211req_dorequest(wlandev, (UINT8*)&msg); result = p80211req_dorequest(wlandev, (u8*)&msg);
if (result) if (result)
err = -EFAULT; err = -EFAULT;
...@@ -671,7 +668,7 @@ static int p80211wext_siwencode(netdevice_t *dev, ...@@ -671,7 +668,7 @@ static int p80211wext_siwencode(netdevice_t *dev,
msg.msgcode = DIDmsg_dot11req_mibset; msg.msgcode = DIDmsg_dot11req_mibset;
memcpy(&msg.mibattribute.data, &pstr, sizeof(pstr)); memcpy(&msg.mibattribute.data, &pstr, sizeof(pstr));
result = p80211req_dorequest(wlandev, (UINT8*)&msg); result = p80211req_dorequest(wlandev, (u8*)&msg);
if (result) { if (result) {
err = -EFAULT; err = -EFAULT;
...@@ -779,7 +776,7 @@ static int p80211wext_siwessid(netdevice_t *dev, ...@@ -779,7 +776,7 @@ static int p80211wext_siwessid(netdevice_t *dev,
msg.ssid.data.len = length; msg.ssid.data.len = length;
WLAN_LOG_DEBUG(1,"autojoin_ssid for %s \n",essid); WLAN_LOG_DEBUG(1,"autojoin_ssid for %s \n",essid);
result = p80211req_dorequest(wlandev, (UINT8*)&msg); result = p80211req_dorequest(wlandev, (u8*)&msg);
WLAN_LOG_DEBUG(1,"autojoin_ssid %d\n",result); WLAN_LOG_DEBUG(1,"autojoin_ssid %d\n",result);
if (result) { if (result) {
...@@ -831,7 +828,7 @@ static int p80211wext_giwrate(netdevice_t *dev, ...@@ -831,7 +828,7 @@ static int p80211wext_giwrate(netdevice_t *dev,
msg.msgcode = DIDmsg_dot11req_mibget; msg.msgcode = DIDmsg_dot11req_mibget;
mibitem.did = DIDmib_p2_p2MAC_p2CurrentTxRate; mibitem.did = DIDmib_p2_p2MAC_p2CurrentTxRate;
memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
result = p80211req_dorequest(wlandev, (UINT8*)&msg); result = p80211req_dorequest(wlandev, (u8*)&msg);
if (result) { if (result) {
err = -EFAULT; err = -EFAULT;
...@@ -844,10 +841,10 @@ static int p80211wext_giwrate(netdevice_t *dev, ...@@ -844,10 +841,10 @@ static int p80211wext_giwrate(netdevice_t *dev,
rrq->disabled = 0; rrq->disabled = 0;
rrq->value = 0; rrq->value = 0;
#define HFA384x_RATEBIT_1 ((UINT16)1) #define HFA384x_RATEBIT_1 ((u16)1)
#define HFA384x_RATEBIT_2 ((UINT16)2) #define HFA384x_RATEBIT_2 ((u16)2)
#define HFA384x_RATEBIT_5dot5 ((UINT16)4) #define HFA384x_RATEBIT_5dot5 ((u16)4)
#define HFA384x_RATEBIT_11 ((UINT16)8) #define HFA384x_RATEBIT_11 ((u16)8)
switch (mibitem.data) { switch (mibitem.data) {
case HFA384x_RATEBIT_1: case HFA384x_RATEBIT_1:
...@@ -885,7 +882,7 @@ static int p80211wext_giwrts(netdevice_t *dev, ...@@ -885,7 +882,7 @@ static int p80211wext_giwrts(netdevice_t *dev,
msg.msgcode = DIDmsg_dot11req_mibget; msg.msgcode = DIDmsg_dot11req_mibget;
mibitem.did = DIDmib_dot11mac_dot11OperationTable_dot11RTSThreshold; mibitem.did = DIDmib_dot11mac_dot11OperationTable_dot11RTSThreshold;
memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
result = p80211req_dorequest(wlandev, (UINT8*)&msg); result = p80211req_dorequest(wlandev, (u8*)&msg);
if (result) { if (result) {
err = -EFAULT; err = -EFAULT;
...@@ -929,7 +926,7 @@ static int p80211wext_siwrts(netdevice_t *dev, ...@@ -929,7 +926,7 @@ static int p80211wext_siwrts(netdevice_t *dev,
mibitem.data = rts->value; mibitem.data = rts->value;
memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
result = p80211req_dorequest(wlandev, (UINT8*)&msg); result = p80211req_dorequest(wlandev, (u8*)&msg);
if (result) { if (result) {
err = -EFAULT; err = -EFAULT;
...@@ -956,7 +953,7 @@ static int p80211wext_giwfrag(netdevice_t *dev, ...@@ -956,7 +953,7 @@ static int p80211wext_giwfrag(netdevice_t *dev,
msg.msgcode = DIDmsg_dot11req_mibget; msg.msgcode = DIDmsg_dot11req_mibget;
mibitem.did = DIDmib_dot11mac_dot11OperationTable_dot11FragmentationThreshold; mibitem.did = DIDmib_dot11mac_dot11OperationTable_dot11FragmentationThreshold;
memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
result = p80211req_dorequest(wlandev, (UINT8*)&msg); result = p80211req_dorequest(wlandev, (u8*)&msg);
if (result) { if (result) {
err = -EFAULT; err = -EFAULT;
...@@ -1000,7 +997,7 @@ static int p80211wext_siwfrag(netdevice_t *dev, ...@@ -1000,7 +997,7 @@ static int p80211wext_siwfrag(netdevice_t *dev,
mibitem.data = frag->value; mibitem.data = frag->value;
memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
result = p80211req_dorequest(wlandev, (UINT8*)&msg); result = p80211req_dorequest(wlandev, (u8*)&msg);
if (result) { if (result) {
err = -EFAULT; err = -EFAULT;
...@@ -1029,7 +1026,7 @@ static int p80211wext_giwretry(netdevice_t *dev, ...@@ -1029,7 +1026,7 @@ static int p80211wext_giwretry(netdevice_t *dev,
p80211msg_dot11req_mibset_t msg; p80211msg_dot11req_mibset_t msg;
int result; int result;
int err = 0; int err = 0;
UINT16 shortretry, longretry, lifetime; u16 shortretry, longretry, lifetime;
DBFENTER; DBFENTER;
...@@ -1037,7 +1034,7 @@ static int p80211wext_giwretry(netdevice_t *dev, ...@@ -1037,7 +1034,7 @@ static int p80211wext_giwretry(netdevice_t *dev,
mibitem.did = DIDmib_dot11mac_dot11OperationTable_dot11ShortRetryLimit; mibitem.did = DIDmib_dot11mac_dot11OperationTable_dot11ShortRetryLimit;
memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
result = p80211req_dorequest(wlandev, (UINT8*)&msg); result = p80211req_dorequest(wlandev, (u8*)&msg);
if (result) { if (result) {
err = -EFAULT; err = -EFAULT;
...@@ -1051,7 +1048,7 @@ static int p80211wext_giwretry(netdevice_t *dev, ...@@ -1051,7 +1048,7 @@ static int p80211wext_giwretry(netdevice_t *dev,
mibitem.did = DIDmib_dot11mac_dot11OperationTable_dot11LongRetryLimit; mibitem.did = DIDmib_dot11mac_dot11OperationTable_dot11LongRetryLimit;
memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
result = p80211req_dorequest(wlandev, (UINT8*)&msg); result = p80211req_dorequest(wlandev, (u8*)&msg);
if (result) { if (result) {
err = -EFAULT; err = -EFAULT;
...@@ -1065,7 +1062,7 @@ static int p80211wext_giwretry(netdevice_t *dev, ...@@ -1065,7 +1062,7 @@ static int p80211wext_giwretry(netdevice_t *dev,
mibitem.did = DIDmib_dot11mac_dot11OperationTable_dot11MaxTransmitMSDULifetime; mibitem.did = DIDmib_dot11mac_dot11OperationTable_dot11MaxTransmitMSDULifetime;
memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
result = p80211req_dorequest(wlandev, (UINT8*)&msg); result = p80211req_dorequest(wlandev, (u8*)&msg);
if (result) { if (result) {
err = -EFAULT; err = -EFAULT;
...@@ -1128,7 +1125,7 @@ static int p80211wext_siwretry(netdevice_t *dev, ...@@ -1128,7 +1125,7 @@ static int p80211wext_siwretry(netdevice_t *dev,
mibitem.data = rrq->value /= 1024; mibitem.data = rrq->value /= 1024;
memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
result = p80211req_dorequest(wlandev, (UINT8*)&msg); result = p80211req_dorequest(wlandev, (u8*)&msg);
if (result) { if (result) {
err = -EFAULT; err = -EFAULT;
...@@ -1140,7 +1137,7 @@ static int p80211wext_siwretry(netdevice_t *dev, ...@@ -1140,7 +1137,7 @@ static int p80211wext_siwretry(netdevice_t *dev,
mibitem.data = rrq->value; mibitem.data = rrq->value;
memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
result = p80211req_dorequest(wlandev, (UINT8*)&msg); result = p80211req_dorequest(wlandev, (u8*)&msg);
if (result) { if (result) {
err = -EFAULT; err = -EFAULT;
...@@ -1153,7 +1150,7 @@ static int p80211wext_siwretry(netdevice_t *dev, ...@@ -1153,7 +1150,7 @@ static int p80211wext_siwretry(netdevice_t *dev,
mibitem.data = rrq->value; mibitem.data = rrq->value;
memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
result = p80211req_dorequest(wlandev, (UINT8*)&msg); result = p80211req_dorequest(wlandev, (u8*)&msg);
if (result) { if (result) {
err = -EFAULT; err = -EFAULT;
...@@ -1201,7 +1198,7 @@ static int p80211wext_siwtxpow(netdevice_t *dev, ...@@ -1201,7 +1198,7 @@ static int p80211wext_siwtxpow(netdevice_t *dev,
} }
memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
result = p80211req_dorequest(wlandev, (UINT8*)&msg); result = p80211req_dorequest(wlandev, (u8*)&msg);
if (result) { if (result) {
err = -EFAULT; err = -EFAULT;
...@@ -1229,7 +1226,7 @@ static int p80211wext_giwtxpow(netdevice_t *dev, ...@@ -1229,7 +1226,7 @@ static int p80211wext_giwtxpow(netdevice_t *dev,
mibitem.did = DIDmib_dot11phy_dot11PhyTxPowerTable_dot11CurrentTxPowerLevel; mibitem.did = DIDmib_dot11phy_dot11PhyTxPowerTable_dot11CurrentTxPowerLevel;
memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem)); memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
result = p80211req_dorequest(wlandev, (UINT8*)&msg); result = p80211req_dorequest(wlandev, (u8*)&msg);
if (result) { if (result) {
err = -EFAULT; err = -EFAULT;
...@@ -1381,7 +1378,7 @@ static int p80211wext_siwscan(netdevice_t *dev, ...@@ -1381,7 +1378,7 @@ static int p80211wext_siwscan(netdevice_t *dev,
msg.maxchanneltime.data = 250; msg.maxchanneltime.data = 250;
msg.minchanneltime.data = 200; msg.minchanneltime.data = 200;
result = p80211req_dorequest(wlandev, (UINT8*)&msg); result = p80211req_dorequest(wlandev, (u8*)&msg);
if (result) if (result)
err = prism2_result2err (msg.resultcode.data); err = prism2_result2err (msg.resultcode.data);
...@@ -1492,7 +1489,7 @@ static int p80211wext_giwscan(netdevice_t *dev, ...@@ -1492,7 +1489,7 @@ static int p80211wext_giwscan(netdevice_t *dev,
msg.msgcode = DIDmsg_dot11req_scan_results; msg.msgcode = DIDmsg_dot11req_scan_results;
msg.bssindex.data = i; msg.bssindex.data = i;
result = p80211req_dorequest(wlandev, (UINT8*)&msg); result = p80211req_dorequest(wlandev, (u8*)&msg);
if ((result != 0) || if ((result != 0) ||
(msg.resultcode.data != P80211ENUM_resultcode_success)) { (msg.resultcode.data != P80211ENUM_resultcode_success)) {
break; break;
...@@ -1585,7 +1582,7 @@ static int p80211wext_set_encodeext(struct net_device *dev, ...@@ -1585,7 +1582,7 @@ static int p80211wext_set_encodeext(struct net_device *dev,
break; break;
} }
msg.msgcode = DIDmsg_dot11req_mibset; msg.msgcode = DIDmsg_dot11req_mibset;
result = p80211req_dorequest(wlandev,(UINT8*)&msg); result = p80211req_dorequest(wlandev,(u8*)&msg);
WLAN_LOG_DEBUG(1,"result (%d)\n",result); WLAN_LOG_DEBUG(1,"result (%d)\n",result);
} }
return result; return result;
......
...@@ -129,7 +129,7 @@ int prism2mgmt_scan(wlandevice_t *wlandev, void *msgp) ...@@ -129,7 +129,7 @@ int prism2mgmt_scan(wlandevice_t *wlandev, void *msgp)
int result = 0; int result = 0;
hfa384x_t *hw = wlandev->priv; hfa384x_t *hw = wlandev->priv;
p80211msg_dot11req_scan_t *msg = msgp; p80211msg_dot11req_scan_t *msg = msgp;
UINT16 roamingmode, word; u16 roamingmode, word;
int i, timeout; int i, timeout;
int istmpenable = 0; int istmpenable = 0;
...@@ -197,7 +197,7 @@ int prism2mgmt_scan(wlandevice_t *wlandev, void *msgp) ...@@ -197,7 +197,7 @@ int prism2mgmt_scan(wlandevice_t *wlandev, void *msgp)
/* set up the channel list */ /* set up the channel list */
word = 0; word = 0;
for (i = 0; i < msg->channellist.data.len; i++) { for (i = 0; i < msg->channellist.data.len; i++) {
UINT8 channel = msg->channellist.data.data[i]; u8 channel = msg->channellist.data.data[i];
if (channel > 14) continue; if (channel > 14) continue;
/* channel 1 is BIT0 ... channel 14 is BIT13 */ /* channel 1 is BIT0 ... channel 14 is BIT13 */
word |= (1 << (channel-1)); word |= (1 << (channel-1));
...@@ -218,7 +218,7 @@ int prism2mgmt_scan(wlandevice_t *wlandev, void *msgp) ...@@ -218,7 +218,7 @@ int prism2mgmt_scan(wlandevice_t *wlandev, void *msgp)
goto exit; goto exit;
} }
if (word == HFA384x_PORTSTATUS_DISABLED) { if (word == HFA384x_PORTSTATUS_DISABLED) {
UINT16 wordbuf[17]; u16 wordbuf[17];
result = hfa384x_drvr_setconfig16(hw, result = hfa384x_drvr_setconfig16(hw,
HFA384x_RID_CNFROAMINGMODE, HFA384x_RID_CNFROAMINGMODE,
...@@ -531,9 +531,9 @@ int prism2mgmt_p2_join(wlandevice_t *wlandev, void *msgp) ...@@ -531,9 +531,9 @@ int prism2mgmt_p2_join(wlandevice_t *wlandev, void *msgp)
int result = 0; int result = 0;
hfa384x_t *hw = wlandev->priv; hfa384x_t *hw = wlandev->priv;
p80211msg_p2req_join_t *msg = msgp; p80211msg_p2req_join_t *msg = msgp;
UINT16 reg; u16 reg;
p80211pstrd_t *pstr; p80211pstrd_t *pstr;
UINT8 bytebuf[256]; u8 bytebuf[256];
hfa384x_bytestr_t *p2bytestr = (hfa384x_bytestr_t*)bytebuf; hfa384x_bytestr_t *p2bytestr = (hfa384x_bytestr_t*)bytebuf;
hfa384x_JoinRequest_data_t joinreq; hfa384x_JoinRequest_data_t joinreq;
DBFENTER; DBFENTER;
...@@ -828,9 +828,9 @@ int prism2mgmt_start(wlandevice_t *wlandev, void *msgp) ...@@ -828,9 +828,9 @@ int prism2mgmt_start(wlandevice_t *wlandev, void *msgp)
p80211msg_dot11req_start_t *msg = msgp; p80211msg_dot11req_start_t *msg = msgp;
p80211pstrd_t *pstr; p80211pstrd_t *pstr;
UINT8 bytebuf[80]; u8 bytebuf[80];
hfa384x_bytestr_t *p2bytestr = (hfa384x_bytestr_t*)bytebuf; hfa384x_bytestr_t *p2bytestr = (hfa384x_bytestr_t*)bytebuf;
UINT16 word; u16 word;
DBFENTER; DBFENTER;
wlandev->macmode = WLAN_MACMODE_NONE; wlandev->macmode = WLAN_MACMODE_NONE;
...@@ -876,7 +876,7 @@ int prism2mgmt_start(wlandevice_t *wlandev, void *msgp) ...@@ -876,7 +876,7 @@ int prism2mgmt_start(wlandevice_t *wlandev, void *msgp)
/* beacon period */ /* beacon period */
word = msg->beaconperiod.data; word = msg->beaconperiod.data;
result = hfa384x_drvr_setconfig16(hw, HFA384x_RID_CNFAPBCNINT, word); result = hfa384x_drvr_setconfig16(hw, HFA384x_RID_CNFAPBCNint, word);
if ( result ) { if ( result ) {
WLAN_LOG_ERROR("Failed to set beacon period=%d.\n", word); WLAN_LOG_ERROR("Failed to set beacon period=%d.\n", word);
goto failed; goto failed;
...@@ -1214,16 +1214,16 @@ int prism2mgmt_low_level(wlandevice_t *wlandev, void *msgp) ...@@ -1214,16 +1214,16 @@ int prism2mgmt_low_level(wlandevice_t *wlandev, void *msgp)
msg->resultcode.status = P80211ENUM_msgitem_status_data_ok; msg->resultcode.status = P80211ENUM_msgitem_status_data_ok;
/* call some routine to execute the test command */ /* call some routine to execute the test command */
cmd.cmd = (UINT16) msg->command.data; cmd.cmd = (u16) msg->command.data;
cmd.parm0 = (UINT16) msg->param0.data; cmd.parm0 = (u16) msg->param0.data;
cmd.parm1 = (UINT16) msg->param1.data; cmd.parm1 = (u16) msg->param1.data;
cmd.parm2 = (UINT16) msg->param2.data; cmd.parm2 = (u16) msg->param2.data;
hfa384x_drvr_low_level(hw,&cmd); hfa384x_drvr_low_level(hw,&cmd);
msg->resp0.data = (UINT32) cmd.result.resp0; msg->resp0.data = (u32) cmd.result.resp0;
msg->resp1.data = (UINT32) cmd.result.resp1; msg->resp1.data = (u32) cmd.result.resp1;
msg->resp2.data = (UINT32) cmd.result.resp2; msg->resp2.data = (u32) cmd.result.resp2;
msg->resultcode.data = P80211ENUM_resultcode_success; msg->resultcode.data = P80211ENUM_resultcode_success;
...@@ -1257,8 +1257,8 @@ int prism2mgmt_test_command(wlandevice_t *wlandev, void *msgp) ...@@ -1257,8 +1257,8 @@ int prism2mgmt_test_command(wlandevice_t *wlandev, void *msgp)
DBFENTER; DBFENTER;
cmd.cmd = ((UINT16) msg->testcode.data) << 8 | 0x38; cmd.cmd = ((u16) msg->testcode.data) << 8 | 0x38;
cmd.parm0 = (UINT16) msg->testparam.data; cmd.parm0 = (u16) msg->testparam.data;
cmd.parm1 = 0; cmd.parm1 = 0;
cmd.parm2 = 0; cmd.parm2 = 0;
...@@ -1305,7 +1305,7 @@ int prism2mgmt_mmi_read(wlandevice_t *wlandev, void *msgp) ...@@ -1305,7 +1305,7 @@ int prism2mgmt_mmi_read(wlandevice_t *wlandev, void *msgp)
{ {
hfa384x_t *hw = wlandev->priv; hfa384x_t *hw = wlandev->priv;
p80211msg_p2req_mmi_read_t *msg = msgp; p80211msg_p2req_mmi_read_t *msg = msgp;
UINT32 resp = 0; u32 resp = 0;
DBFENTER; DBFENTER;
...@@ -1450,9 +1450,9 @@ int prism2mgmt_ramdl_write(wlandevice_t *wlandev, void *msgp) ...@@ -1450,9 +1450,9 @@ int prism2mgmt_ramdl_write(wlandevice_t *wlandev, void *msgp)
{ {
hfa384x_t *hw = wlandev->priv; hfa384x_t *hw = wlandev->priv;
p80211msg_p2req_ramdl_write_t *msg = msgp; p80211msg_p2req_ramdl_write_t *msg = msgp;
UINT32 addr; u32 addr;
UINT32 len; u32 len;
UINT8 *buf; u8 *buf;
DBFENTER; DBFENTER;
if (wlandev->msdstate != WLAN_MSD_FWLOAD) { if (wlandev->msdstate != WLAN_MSD_FWLOAD) {
...@@ -1590,9 +1590,9 @@ int prism2mgmt_flashdl_write(wlandevice_t *wlandev, void *msgp) ...@@ -1590,9 +1590,9 @@ int prism2mgmt_flashdl_write(wlandevice_t *wlandev, void *msgp)
{ {
hfa384x_t *hw = wlandev->priv; hfa384x_t *hw = wlandev->priv;
p80211msg_p2req_flashdl_write_t *msg = msgp; p80211msg_p2req_flashdl_write_t *msg = msgp;
UINT32 addr; u32 addr;
UINT32 len; u32 len;
UINT8 *buf; u8 *buf;
DBFENTER; DBFENTER;
if (wlandev->msdstate != WLAN_MSD_FWLOAD) { if (wlandev->msdstate != WLAN_MSD_FWLOAD) {
...@@ -1691,11 +1691,11 @@ int prism2mgmt_autojoin(wlandevice_t *wlandev, void *msgp) ...@@ -1691,11 +1691,11 @@ int prism2mgmt_autojoin(wlandevice_t *wlandev, void *msgp)
{ {
hfa384x_t *hw = wlandev->priv; hfa384x_t *hw = wlandev->priv;
int result = 0; int result = 0;
UINT16 reg; u16 reg;
UINT16 port_type; u16 port_type;
p80211msg_lnxreq_autojoin_t *msg = msgp; p80211msg_lnxreq_autojoin_t *msg = msgp;
p80211pstrd_t *pstr; p80211pstrd_t *pstr;
UINT8 bytebuf[256]; u8 bytebuf[256];
hfa384x_bytestr_t *p2bytestr = (hfa384x_bytestr_t*)bytebuf; hfa384x_bytestr_t *p2bytestr = (hfa384x_bytestr_t*)bytebuf;
DBFENTER; DBFENTER;
...@@ -1785,7 +1785,7 @@ int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp) ...@@ -1785,7 +1785,7 @@ int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp)
p80211msg_lnxreq_wlansniff_t *msg = msgp; p80211msg_lnxreq_wlansniff_t *msg = msgp;
hfa384x_t *hw = wlandev->priv; hfa384x_t *hw = wlandev->priv;
UINT16 word; u16 word;
DBFENTER; DBFENTER;
......
...@@ -80,8 +80,8 @@ extern int prism2_reset_settletime; ...@@ -80,8 +80,8 @@ extern int prism2_reset_settletime;
/*--- Function Declarations -----------------------------------*/ /*--- Function Declarations -----------------------------------*/
/*=============================================================*/ /*=============================================================*/
UINT32 u32
prism2sta_ifstate(wlandevice_t *wlandev, UINT32 ifstate); prism2sta_ifstate(wlandevice_t *wlandev, u32 ifstate);
void void
prism2sta_ev_dtim(wlandevice_t *wlandev); prism2sta_ev_dtim(wlandevice_t *wlandev);
...@@ -90,9 +90,9 @@ prism2sta_ev_infdrop(wlandevice_t *wlandev); ...@@ -90,9 +90,9 @@ prism2sta_ev_infdrop(wlandevice_t *wlandev);
void void
prism2sta_ev_info(wlandevice_t *wlandev, hfa384x_InfFrame_t *inf); prism2sta_ev_info(wlandevice_t *wlandev, hfa384x_InfFrame_t *inf);
void void
prism2sta_ev_txexc(wlandevice_t *wlandev, UINT16 status); prism2sta_ev_txexc(wlandevice_t *wlandev, u16 status);
void void
prism2sta_ev_tx(wlandevice_t *wlandev, UINT16 status); prism2sta_ev_tx(wlandevice_t *wlandev, u16 status);
void void
prism2sta_ev_rx(wlandevice_t *wlandev, struct sk_buff *skb); prism2sta_ev_rx(wlandevice_t *wlandev, struct sk_buff *skb);
void void
...@@ -129,31 +129,31 @@ int prism2mgmt_autojoin(wlandevice_t *wlandev, void *msgp); ...@@ -129,31 +129,31 @@ int prism2mgmt_autojoin(wlandevice_t *wlandev, void *msgp);
* Prism2 data types * Prism2 data types
---------------------------------------------------------------*/ ---------------------------------------------------------------*/
/* byte area conversion functions*/ /* byte area conversion functions*/
void prism2mgmt_pstr2bytearea(UINT8 *bytearea, p80211pstrd_t *pstr); void prism2mgmt_pstr2bytearea(u8 *bytearea, p80211pstrd_t *pstr);
void prism2mgmt_bytearea2pstr(UINT8 *bytearea, p80211pstrd_t *pstr, int len); void prism2mgmt_bytearea2pstr(u8 *bytearea, p80211pstrd_t *pstr, int len);
/* byte string conversion functions*/ /* byte string conversion functions*/
void prism2mgmt_pstr2bytestr(hfa384x_bytestr_t *bytestr, p80211pstrd_t *pstr); void prism2mgmt_pstr2bytestr(hfa384x_bytestr_t *bytestr, p80211pstrd_t *pstr);
void prism2mgmt_bytestr2pstr(hfa384x_bytestr_t *bytestr, p80211pstrd_t *pstr); void prism2mgmt_bytestr2pstr(hfa384x_bytestr_t *bytestr, p80211pstrd_t *pstr);
/* integer conversion functions */ /* integer conversion functions */
void prism2mgmt_prism2int2p80211int(UINT16 *prism2int, UINT32 *wlanint); void prism2mgmt_prism2int2p80211int(u16 *prism2int, u32 *wlanint);
void prism2mgmt_p80211int2prism2int(UINT16 *prism2int, UINT32 *wlanint); void prism2mgmt_p80211int2prism2int(u16 *prism2int, u32 *wlanint);
/* enumerated integer conversion functions */ /* enumerated integer conversion functions */
void prism2mgmt_prism2enum2p80211enum(UINT16 *prism2enum, UINT32 *wlanenum, UINT16 rid); void prism2mgmt_prism2enum2p80211enum(u16 *prism2enum, u32 *wlanenum, u16 rid);
void prism2mgmt_p80211enum2prism2enum(UINT16 *prism2enum, UINT32 *wlanenum, UINT16 rid); void prism2mgmt_p80211enum2prism2enum(u16 *prism2enum, u32 *wlanenum, u16 rid);
/* functions to convert a bit area to/from an Operational Rate Set */ /* functions to convert a bit area to/from an Operational Rate Set */
void prism2mgmt_get_oprateset(UINT16 *rate, p80211pstrd_t *pstr); void prism2mgmt_get_oprateset(u16 *rate, p80211pstrd_t *pstr);
void prism2mgmt_set_oprateset(UINT16 *rate, p80211pstrd_t *pstr); void prism2mgmt_set_oprateset(u16 *rate, p80211pstrd_t *pstr);
/* functions to convert Group Addresses */ /* functions to convert Group Addresses */
void prism2mgmt_get_grpaddr(UINT32 did, void prism2mgmt_get_grpaddr(u32 did,
p80211pstrd_t *pstr, hfa384x_t *priv ); p80211pstrd_t *pstr, hfa384x_t *priv );
int prism2mgmt_set_grpaddr(UINT32 did, int prism2mgmt_set_grpaddr(u32 did,
UINT8 *prism2buf, p80211pstrd_t *pstr, hfa384x_t *priv ); u8 *prism2buf, p80211pstrd_t *pstr, hfa384x_t *priv );
int prism2mgmt_get_grpaddr_index( UINT32 did ); int prism2mgmt_get_grpaddr_index( u32 did );
void prism2sta_processing_defer(struct work_struct *data); void prism2sta_processing_defer(struct work_struct *data);
......
This diff is collapsed.
...@@ -189,7 +189,7 @@ inline void dmpmem(void *buf, int n) ...@@ -189,7 +189,7 @@ inline void dmpmem(void *buf, int n)
int c; int c;
for ( c= 0; c < n; c++) { for ( c= 0; c < n; c++) {
if ( (c % 16) == 0 ) printk(KERN_DEBUG"dmp[%d]: ", c); if ( (c % 16) == 0 ) printk(KERN_DEBUG"dmp[%d]: ", c);
printk("%02x ", ((UINT8*)buf)[c]); printk("%02x ", ((u8*)buf)[c]);
if ( (c % 16) == 15 ) printk("\n"); if ( (c % 16) == 15 ) printk("\n");
} }
if ( (c % 16) != 0 ) printk("\n"); if ( (c % 16) != 0 ) printk("\n");
...@@ -534,10 +534,10 @@ static int prism2sta_mlmerequest(wlandevice_t *wlandev, p80211msg_t *msg) ...@@ -534,10 +534,10 @@ static int prism2sta_mlmerequest(wlandevice_t *wlandev, p80211msg_t *msg)
* process thread (usually) * process thread (usually)
* interrupt * interrupt
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
UINT32 prism2sta_ifstate(wlandevice_t *wlandev, UINT32 ifstate) u32 prism2sta_ifstate(wlandevice_t *wlandev, u32 ifstate)
{ {
hfa384x_t *hw = (hfa384x_t *)wlandev->priv; hfa384x_t *hw = (hfa384x_t *)wlandev->priv;
UINT32 result; u32 result;
DBFENTER; DBFENTER;
result = P80211ENUM_resultcode_implementation_failure; result = P80211ENUM_resultcode_implementation_failure;
...@@ -712,8 +712,8 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev) ...@@ -712,8 +712,8 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev)
{ {
int result = 0; int result = 0;
hfa384x_t *hw = (hfa384x_t *)wlandev->priv; hfa384x_t *hw = (hfa384x_t *)wlandev->priv;
UINT16 temp; u16 temp;
UINT8 snum[HFA384x_RID_NICSERIALNUMBER_LEN]; u8 snum[HFA384x_RID_NICSERIALNUMBER_LEN];
char pstr[(HFA384x_RID_NICSERIALNUMBER_LEN * 4) + 1]; char pstr[(HFA384x_RID_NICSERIALNUMBER_LEN * 4) + 1];
DBFENTER; DBFENTER;
...@@ -778,7 +778,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev) ...@@ -778,7 +778,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev)
/* strip out the 'special' variant bits */ /* strip out the 'special' variant bits */
hw->mm_mods = hw->ident_sta_fw.variant & (BIT14 | BIT15); hw->mm_mods = hw->ident_sta_fw.variant & (BIT14 | BIT15);
hw->ident_sta_fw.variant &= ~((UINT16)(BIT14 | BIT15)); hw->ident_sta_fw.variant &= ~((u16)(BIT14 | BIT15));
if ( hw->ident_sta_fw.id == 0x1f ) { if ( hw->ident_sta_fw.id == 0x1f ) {
WLAN_LOG_INFO( WLAN_LOG_INFO(
...@@ -1039,7 +1039,7 @@ static int prism2sta_setmulticast(wlandevice_t *wlandev, netdevice_t *dev) ...@@ -1039,7 +1039,7 @@ static int prism2sta_setmulticast(wlandevice_t *wlandev, netdevice_t *dev)
int result = 0; int result = 0;
hfa384x_t *hw = (hfa384x_t *)wlandev->priv; hfa384x_t *hw = (hfa384x_t *)wlandev->priv;
UINT16 promisc; u16 promisc;
DBFENTER; DBFENTER;
...@@ -1114,9 +1114,9 @@ static void prism2sta_inf_handover(wlandevice_t *wlandev, hfa384x_InfFrame_t *in ...@@ -1114,9 +1114,9 @@ static void prism2sta_inf_handover(wlandevice_t *wlandev, hfa384x_InfFrame_t *in
static void prism2sta_inf_tallies(wlandevice_t *wlandev, hfa384x_InfFrame_t *inf) static void prism2sta_inf_tallies(wlandevice_t *wlandev, hfa384x_InfFrame_t *inf)
{ {
hfa384x_t *hw = (hfa384x_t *)wlandev->priv; hfa384x_t *hw = (hfa384x_t *)wlandev->priv;
UINT16 *src16; u16 *src16;
UINT32 *dst; u32 *dst;
UINT32 *src32; u32 *src32;
int i; int i;
int cnt; int cnt;
...@@ -1127,15 +1127,15 @@ static void prism2sta_inf_tallies(wlandevice_t *wlandev, hfa384x_InfFrame_t *inf ...@@ -1127,15 +1127,15 @@ static void prism2sta_inf_tallies(wlandevice_t *wlandev, hfa384x_InfFrame_t *inf
** record length of the info record. ** record length of the info record.
*/ */
cnt = sizeof(hfa384x_CommTallies32_t) / sizeof(UINT32); cnt = sizeof(hfa384x_CommTallies32_t) / sizeof(u32);
if (inf->framelen > 22) { if (inf->framelen > 22) {
dst = (UINT32 *) &hw->tallies; dst = (u32 *) &hw->tallies;
src32 = (UINT32 *) &inf->info.commtallies32; src32 = (u32 *) &inf->info.commtallies32;
for (i = 0; i < cnt; i++, dst++, src32++) for (i = 0; i < cnt; i++, dst++, src32++)
*dst += hfa384x2host_32(*src32); *dst += hfa384x2host_32(*src32);
} else { } else {
dst = (UINT32 *) &hw->tallies; dst = (u32 *) &hw->tallies;
src16 = (UINT16 *) &inf->info.commtallies16; src16 = (u16 *) &inf->info.commtallies16;
for (i = 0; i < cnt; i++, dst++, src16++) for (i = 0; i < cnt; i++, dst++, src16++)
*dst += hfa384x2host_16(*src16); *dst += hfa384x2host_16(*src16);
} }
...@@ -1175,7 +1175,7 @@ static void prism2sta_inf_scanresults(wlandevice_t *wlandev, ...@@ -1175,7 +1175,7 @@ static void prism2sta_inf_scanresults(wlandevice_t *wlandev,
DBFENTER; DBFENTER;
/* Get the number of results, first in bytes, then in results */ /* Get the number of results, first in bytes, then in results */
nbss = (inf->framelen * sizeof(UINT16)) - nbss = (inf->framelen * sizeof(u16)) -
sizeof(inf->infotype) - sizeof(inf->infotype) -
sizeof(inf->info.scanresult.scanreason); sizeof(inf->info.scanresult.scanreason);
nbss /= sizeof(hfa384x_ScanResultSub_t); nbss /= sizeof(hfa384x_ScanResultSub_t);
...@@ -1367,7 +1367,7 @@ void prism2sta_processing_defer(struct work_struct *data) ...@@ -1367,7 +1367,7 @@ void prism2sta_processing_defer(struct work_struct *data)
/* Don't call this in monitor mode */ /* Don't call this in monitor mode */
if ( wlandev->netdev->type == ARPHRD_ETHER ) { if ( wlandev->netdev->type == ARPHRD_ETHER ) {
UINT16 portstatus; u16 portstatus;
WLAN_LOG_INFO("linkstatus=CONNECTED\n"); WLAN_LOG_INFO("linkstatus=CONNECTED\n");
...@@ -1703,7 +1703,7 @@ static void prism2sta_inf_authreq_defer(wlandevice_t *wlandev, ...@@ -1703,7 +1703,7 @@ static void prism2sta_inf_authreq_defer(wlandevice_t *wlandev,
hfa384x_authenticateStation_data_t rec; hfa384x_authenticateStation_data_t rec;
int i, added, result, cnt; int i, added, result, cnt;
UINT8 *addr; u8 *addr;
DBFENTER; DBFENTER;
...@@ -2030,7 +2030,7 @@ void prism2sta_ev_info(wlandevice_t *wlandev, hfa384x_InfFrame_t *inf) ...@@ -2030,7 +2030,7 @@ void prism2sta_ev_info(wlandevice_t *wlandev, hfa384x_InfFrame_t *inf)
* Call context: * Call context:
* interrupt * interrupt
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
void prism2sta_ev_txexc(wlandevice_t *wlandev, UINT16 status) void prism2sta_ev_txexc(wlandevice_t *wlandev, u16 status)
{ {
DBFENTER; DBFENTER;
...@@ -2057,7 +2057,7 @@ void prism2sta_ev_txexc(wlandevice_t *wlandev, UINT16 status) ...@@ -2057,7 +2057,7 @@ void prism2sta_ev_txexc(wlandevice_t *wlandev, UINT16 status)
* Call context: * Call context:
* interrupt * interrupt
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
void prism2sta_ev_tx(wlandevice_t *wlandev, UINT16 status) void prism2sta_ev_tx(wlandevice_t *wlandev, u16 status)
{ {
DBFENTER; DBFENTER;
WLAN_LOG_DEBUG(4, "Tx Complete, status=0x%04x\n", status); WLAN_LOG_DEBUG(4, "Tx Complete, status=0x%04x\n", status);
......
...@@ -93,30 +93,6 @@ ...@@ -93,30 +93,6 @@
#define BIT30 0x40000000 #define BIT30 0x40000000
#define BIT31 0x80000000 #define BIT31 0x80000000
#include <linux/types.h>
typedef u_int8_t UINT8;
typedef u_int16_t UINT16;
typedef u_int32_t UINT32;
typedef int8_t INT8;
typedef int16_t INT16;
typedef int32_t INT32;
typedef unsigned int UINT;
typedef signed int INT;
typedef u_int64_t UINT64;
typedef int64_t INT64;
#define UINT8_MAX (0xffUL)
#define UINT16_MAX (0xffffUL)
#define UINT32_MAX (0xffffffffUL)
#define INT8_MAX (0x7fL)
#define INT16_MAX (0x7fffL)
#define INT32_MAX (0x7fffffffL)
/*=============================================================*/ /*=============================================================*/
/*------ Compiler Portability Macros --------------------------*/ /*------ Compiler Portability Macros --------------------------*/
/*=============================================================*/ /*=============================================================*/
...@@ -126,14 +102,14 @@ typedef int64_t INT64; ...@@ -126,14 +102,14 @@ typedef int64_t INT64;
/*------ OS Portability Macros --------------------------------*/ /*------ OS Portability Macros --------------------------------*/
/*=============================================================*/ /*=============================================================*/
#ifndef WLAN_DBVAR
#define WLAN_DBVAR wlan_debug
#endif
#ifndef KERNEL_VERSION #ifndef KERNEL_VERSION
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c)) #define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
#endif #endif
#ifndef WLAN_DBVAR
#define WLAN_DBVAR wlan_debug
#endif
#define WLAN_RELEASE "0.3.0-lkml" #define WLAN_RELEASE "0.3.0-lkml"
#include <linux/hardirq.h> #include <linux/hardirq.h>
...@@ -153,7 +129,7 @@ typedef int64_t INT64; ...@@ -153,7 +129,7 @@ typedef int64_t INT64;
int __i__; \ int __i__; \
printk(KERN_DEBUG x ":"); \ printk(KERN_DEBUG x ":"); \
for( __i__=0; __i__ < (n); __i__++) \ for( __i__=0; __i__ < (n); __i__++) \
printk( " %02x", ((UINT8*)(p))[__i__]); \ printk( " %02x", ((u8*)(p))[__i__]); \
printk("\n"); } printk("\n"); }
#define DBFENTER { if ( WLAN_DBVAR >= 5 ){ WLAN_LOG_DEBUG(3,"---->\n"); } } #define DBFENTER { if ( WLAN_DBVAR >= 5 ){ WLAN_LOG_DEBUG(3,"---->\n"); } }
#define DBFEXIT { if ( WLAN_DBVAR >= 5 ){ WLAN_LOG_DEBUG(3,"<----\n"); } } #define DBFEXIT { if ( WLAN_DBVAR >= 5 ){ WLAN_LOG_DEBUG(3,"<----\n"); } }
...@@ -198,7 +174,7 @@ do { \ ...@@ -198,7 +174,7 @@ do { \
\ \
add_wait_queue(&wq, &__wait); \ add_wait_queue(&wq, &__wait); \
for (;;) { \ for (;;) { \
set_current_state(TASK_INTERRUPTIBLE); \ set_current_state(TASK_intERRUPTIBLE); \
if (condition) \ if (condition) \
break; \ break; \
if (!signal_pending(current)) { \ if (!signal_pending(current)) { \
......
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