Index: if_80211.h =================================================================== RCS file: /home/vkondra-l/cvsroot/p80211/if_80211.h,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 if_80211.h --- if_80211.h 31 Aug 2004 20:32:16 -0000 1.1.1.1 +++ if_80211.h 31 Aug 2004 21:29:58 -0000 @@ -31,6 +31,27 @@ u8 addr4[ETH_ALEN]; }; +struct ieee802_11_hdrq { + u16 frame_ctl; + u16 duration_id; + u8 addr1[ETH_ALEN]; + u8 addr2[ETH_ALEN]; + u8 addr3[ETH_ALEN]; + u16 seq_ctl; + u16 qos_ctl; +}; + +struct ieee802_11_hdr4q { + u16 frame_ctl; + u16 duration_id; + u8 addr1[ETH_ALEN]; + u8 addr2[ETH_ALEN]; + u8 addr3[ETH_ALEN]; + u16 seq_ctl; + u8 addr4[ETH_ALEN]; + u16 qos_ctl; +}; + /* Address field usage based upon setting of FROMDS/TODS bits: * * FROMDS TODS addr1 addr2 addr3 addr4 @@ -78,8 +99,11 @@ #define IEEE802_11_STYPE_DISASSOC 0x00A0 #define IEEE802_11_STYPE_AUTH 0x00B0 #define IEEE802_11_STYPE_DEAUTH 0x00C0 +#define IEEE802_11_STYPE_ACTION 0x00D0 /* control */ +#define IEEE802_11_STYPE_BACK_REQ 0x0080 +#define IEEE802_11_STYPE_BACK 0x0090 #define IEEE802_11_STYPE_PSPOLL 0x00A0 #define IEEE802_11_STYPE_RTS 0x00B0 #define IEEE802_11_STYPE_CTS 0x00C0 @@ -96,11 +120,51 @@ #define IEEE802_11_STYPE_CFACK 0x0050 #define IEEE802_11_STYPE_CFPOLL 0x0060 #define IEEE802_11_STYPE_CFACKPOLL 0x0070 +#define IEEE802_11_STYPE_QDATA 0x0080 +#define IEEE802_11_STYPE_QDATA_CFACK 0x0090 +#define IEEE802_11_STYPE_QDATA_CFPOLL 0x00A0 +#define IEEE802_11_STYPE_QDATA_CFACKPOLL 0x00B0 +#define IEEE802_11_STYPE_QNULLFUNC 0x00C0 +#define IEEE802_11_STYPE_QCFACK 0x00D0 +#define IEEE802_11_STYPE_QCFPOLL 0x00E0 +#define IEEE802_11_STYPE_QCFACKPOLL 0x00F0 #define IEEE802_11_SCTL_FRAG 0x000F #define IEEE802_11_SCTL_SEQ 0xFFF0 #define IEEE802_11_SCTL_SEQ_SHIFT 4 +/** QOS control field bits usage + * Frame 0..3 4 5..6 7 8..15 + * + * QoS (+)CF-Poll TID EOSP Ack_policy rsrv TXOP limit + * sent by HC + * + * QoS Data, QoS Null, TID EOSP Ack_policy rsrv QAP PS buffer size + * QoS CF-Ack, + * QoS Data + CF-Ack + * sent by HC + * + * QoS Data sent by TID 0 Ack_policy rsrv TXOP duration requested + * non-AP QSTA TID 1 Ack_policy rsrv Queue size + * + */ +#define IEEE802_11_QCTL_FRAG 0x000F +#define IEEE802_11_QCTL_EOSP 0x0010 +#define IEEE802_11_QCTL_ACK 0x0060 +#define IEEE802_11_QCTL_VAL 0xFF00 + +/* bits for ack policy */ +#define IEEE802_11_QCTL_ACK_NORM 0x0000 /* normal Ack */ +#define IEEE802_11_QCTL_ACK_NO 0x0020 /* No ack */ +#define IEEE802_11_QCTL_ACK_NEXP 0x0040 /* No explicit Ack */ +#define IEEE802_11_QCTL_ACK_BLK 0x0060 /* Block Ack */ + +/* bits for QAP PS buffer size */ +#define IEEE802_11_QCTL_PSBUF_PRESENT 0x0200 /* next fields present */ +#define IEEE802_11_QCTL_PSBUF_HI_AC 0x0C00 /* highest AC buffered */ +#define IEEE802_11_QCTL_PSBUF_BUF 0xF000 /* total buffered payload */ + + struct ieee802_11_snap { u8 dsap; u8 ssap; @@ -119,6 +183,14 @@ #define IEEE802_11_TLV_TYPE_TIM 5 #define IEEE802_11_TLV_TYPE_IBSSPARMS 6 #define IEEE802_11_TLV_TYPE_COUNTRY 7 +#define IEEE802_11_TLV_TYPE_QBSS_LOAD 11 +#define IEEE802_11_TLV_TYPE_EDCA 12 +#define IEEE802_11_TLV_TYPE_TSPEC 13 +#define IEEE802_11_TLV_TYPE_TCLAS 14 +#define IEEE802_11_TLV_TYPE_SCHED 15 +#define IEEE802_11_TLV_TYPE_TS_DELAY 43 +#define IEEE802_11_TLV_TYPE_TC_PROC 44 +#define IEEE802_11_TLV_TYPE_QOS_CAP 46 #define IEEE802_11_TLV_TYPE_XRATES 50 #define IEEE802_11_MAX_RATES 8