1 /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 // MAC_Structures.h
3 //
4 // This file contains the definitions and data structures used by SW-MAC.
5 //
6 // Revision Histoy
7 //=================
8 // 0.1      2002        UN00
9 // 0.2      20021004    PD43 CCLiu6
10 //          20021018    PD43 CCLiu6
11 //                      Add enum_TxRate type
12 //                      Modify enum_STAState type
13 // 0.3      20021023    PE23 CYLiu update MAC session struct
14 //          20021108
15 //          20021122    PD43 Austin
16 //                      Deleted some unused.
17 //          20021129    PD43 Austin
18 //			20030617	increase the 802.11g definition
19 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
20 
21 #ifndef _MAC_Structures_H_
22 #define _MAC_Structures_H_
23 
24 #define MAC_ADDR_LENGTH                     6
25 
26 /* ========================================================
27 // 802.11 Frame define
28 //----- */
29 #define DOT_11_MAC_HEADER_SIZE		24
30 #define DOT_11_SNAP_SIZE			6
31 #define DOT_11_DURATION_OFFSET		2
32 /* Sequence control offset */
33 #define DOT_11_SEQUENCE_OFFSET		22
34 /* The start offset of 802.11 Frame// */
35 #define DOT_11_TYPE_OFFSET			30
36 #define DOT_11_DATA_OFFSET          24
37 #define DOT_11_DA_OFFSET			4
38 
39 #define MAX_ETHERNET_PACKET_SIZE		1514
40 
41 /* -----  management : Type of Bits (2, 3) and Subtype of Bits (4, 5, 6, 7) */
42 #define MAC_SUBTYPE_MNGMNT_ASSOC_REQUEST    0x00
43 #define MAC_SUBTYPE_MNGMNT_ASSOC_RESPONSE   0x10
44 #define MAC_SUBTYPE_MNGMNT_REASSOC_REQUEST  0x20
45 #define MAC_SUBTYPE_MNGMNT_REASSOC_RESPONSE 0x30
46 #define MAC_SUBTYPE_MNGMNT_PROBE_REQUEST    0x40
47 #define MAC_SUBTYPE_MNGMNT_PROBE_RESPONSE   0x50
48 #define MAC_SUBTYPE_MNGMNT_BEACON           0x80
49 #define MAC_SUBTYPE_MNGMNT_ATIM             0x90
50 #define MAC_SUBTYPE_MNGMNT_DISASSOCIATION   0xA0
51 #define MAC_SUBTYPE_MNGMNT_AUTHENTICATION   0xB0
52 #define MAC_SUBTYPE_MNGMNT_DEAUTHENTICATION 0xC0
53 
54 #define RATE_AUTO					0
55 #define RATE_1M						2
56 #define RATE_2M						4
57 #define RATE_5dot5M					11
58 #define RATE_6M						12
59 #define RATE_9M						18
60 #define RATE_11M					22
61 #define RATE_12M					24
62 #define RATE_18M					36
63 #define RATE_22M					44
64 #define RATE_24M					48
65 #define RATE_33M					66
66 #define RATE_36M					72
67 #define RATE_48M					96
68 #define RATE_54M					108
69 #define RATE_MAX					255
70 
71 #endif /* _MAC_Structure_H_ */
72