diff options
-rw-r--r-- | drivers/staging/wlan-ng/p80211hdr.h | 55 |
1 files changed, 1 insertions, 54 deletions
diff --git a/drivers/staging/wlan-ng/p80211hdr.h b/drivers/staging/wlan-ng/p80211hdr.h index edcfbc6..21b26d0 100644 --- a/drivers/staging/wlan-ng/p80211hdr.h +++ b/drivers/staging/wlan-ng/p80211hdr.h @@ -79,28 +79,10 @@ /*--- Sizes -----------------------------------------------*/ #define WLAN_CRC_LEN 4 #define WLAN_BSSID_LEN 6 -#define WLAN_BSS_TS_LEN 8 #define WLAN_HDR_A3_LEN 24 #define WLAN_HDR_A4_LEN 30 #define WLAN_SSID_MAXLEN 32 #define WLAN_DATA_MAXLEN 2312 -#define WLAN_A3FR_MAXLEN (WLAN_HDR_A3_LEN + WLAN_DATA_MAXLEN + WLAN_CRC_LEN) -#define WLAN_A4FR_MAXLEN (WLAN_HDR_A4_LEN + WLAN_DATA_MAXLEN + WLAN_CRC_LEN) -#define WLAN_BEACON_FR_MAXLEN (WLAN_HDR_A3_LEN + 334) -#define WLAN_ATIM_FR_MAXLEN (WLAN_HDR_A3_LEN + 0) -#define WLAN_DISASSOC_FR_MAXLEN (WLAN_HDR_A3_LEN + 2) -#define WLAN_ASSOCREQ_FR_MAXLEN (WLAN_HDR_A3_LEN + 48) -#define WLAN_ASSOCRESP_FR_MAXLEN (WLAN_HDR_A3_LEN + 16) -#define WLAN_REASSOCREQ_FR_MAXLEN (WLAN_HDR_A3_LEN + 54) -#define WLAN_REASSOCRESP_FR_MAXLEN (WLAN_HDR_A3_LEN + 16) -#define WLAN_PROBEREQ_FR_MAXLEN (WLAN_HDR_A3_LEN + 44) -#define WLAN_PROBERESP_FR_MAXLEN (WLAN_HDR_A3_LEN + 78) -#define WLAN_AUTHEN_FR_MAXLEN (WLAN_HDR_A3_LEN + 261) -#define WLAN_DEAUTHEN_FR_MAXLEN (WLAN_HDR_A3_LEN + 2) -#define WLAN_WEP_NKEYS 4 -#define WLAN_WEP_MAXKEYLEN 13 -#define WLAN_CHALLENGE_IE_LEN 130 -#define WLAN_CHALLENGE_LEN 128 #define WLAN_WEP_IV_LEN 4 #define WLAN_WEP_ICV_LEN 4 @@ -167,59 +149,23 @@ /* SET_FC_FSTYPE(WLAN_FSTYPE_RTS) ); */ /*------------------------------------------------------------*/ -#define WLAN_GET_FC_PVER(n) (((u16)(n)) & (BIT(0) | BIT(1))) #define WLAN_GET_FC_FTYPE(n) ((((u16)(n)) & (BIT(2) | BIT(3))) >> 2) #define WLAN_GET_FC_FSTYPE(n) ((((u16)(n)) & (BIT(4)|BIT(5)|BIT(6)|BIT(7))) >> 4) #define WLAN_GET_FC_TODS(n) ((((u16)(n)) & (BIT(8))) >> 8) #define WLAN_GET_FC_FROMDS(n) ((((u16)(n)) & (BIT(9))) >> 9) -#define WLAN_GET_FC_MOREFRAG(n) ((((u16)(n)) & (BIT(10))) >> 10) -#define WLAN_GET_FC_RETRY(n) ((((u16)(n)) & (BIT(11))) >> 11) -#define WLAN_GET_FC_PWRMGT(n) ((((u16)(n)) & (BIT(12))) >> 12) -#define WLAN_GET_FC_MOREDATA(n) ((((u16)(n)) & (BIT(13))) >> 13) #define WLAN_GET_FC_ISWEP(n) ((((u16)(n)) & (BIT(14))) >> 14) -#define WLAN_GET_FC_ORDER(n) ((((u16)(n)) & (BIT(15))) >> 15) -#define WLAN_SET_FC_PVER(n) ((u16)(n)) #define WLAN_SET_FC_FTYPE(n) (((u16)(n)) << 2) #define WLAN_SET_FC_FSTYPE(n) (((u16)(n)) << 4) #define WLAN_SET_FC_TODS(n) (((u16)(n)) << 8) #define WLAN_SET_FC_FROMDS(n) (((u16)(n)) << 9) -#define WLAN_SET_FC_MOREFRAG(n) (((u16)(n)) << 10) -#define WLAN_SET_FC_RETRY(n) (((u16)(n)) << 11) -#define WLAN_SET_FC_PWRMGT(n) (((u16)(n)) << 12) -#define WLAN_SET_FC_MOREDATA(n) (((u16)(n)) << 13) #define WLAN_SET_FC_ISWEP(n) (((u16)(n)) << 14) -#define WLAN_SET_FC_ORDER(n) (((u16)(n)) << 15) - -/*--- Duration Macros ----------------------------------------*/ -/* Macros to get/set the bitfields of the Duration Field */ -/* - the duration value is only valid when bit15 is zero */ -/* - the firmware handles these values, so I'm not going */ -/* these macros right now. */ -/*------------------------------------------------------------*/ - -/*--- Sequence Control Macros -------------------------------*/ -/* Macros to get/set the bitfields of the Sequence Control */ -/* Field. */ -/*------------------------------------------------------------*/ -#define WLAN_GET_SEQ_FRGNUM(n) (((u16)(n)) & (BIT(0)|BIT(1)|BIT(2)|BIT(3))) -#define WLAN_GET_SEQ_SEQNUM(n) ((((u16)(n)) & (~(BIT(0)|BIT(1)|BIT(2)|BIT(3)))) >> 4) - -/*--- Data ptr macro -----------------------------------------*/ -/* Creates a u8* to the data portion of a frame */ -/* Assumes you're passing in a ptr to the beginning of the hdr*/ -/*------------------------------------------------------------*/ -#define WLAN_HDR_A3_DATAP(p) (((u8*)(p)) + WLAN_HDR_A3_LEN) -#define WLAN_HDR_A4_DATAP(p) (((u8*)(p)) + WLAN_HDR_A4_LEN) #define DOT11_RATE5_ISBASIC_GET(r) (((u8)(r)) & BIT(7)) /*================================================================*/ /* Types */ -/* BSS Timestamp */ -typedef u8 wlan_bss_ts_t[WLAN_BSS_TS_LEN]; - /* Generic 802.11 Header types */ typedef struct p80211_hdr_a3 @@ -294,3 +240,4 @@ inline static u16 p80211_headerlen(u16 fctl) } #endif /* _P80211HDR_H */ + |