2 * Copyright (c) 2010 Broadcom Corporation
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
11 * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
13 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
14 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
21 #define DOT11_BSSTYPE_ANY 2
22 #define DOT11_MAX_DEFAULT_KEYS 4
23 #define WPA_OUI "\x00\x50\xF2"
24 #define BRCM_OUI "\x00\x10\x18"
25 #define DOT11_MNG_RSN_ID 48
26 #define DOT11_MNG_WPA_ID 221
27 #define DOT11_DEFAULT_RTS_LEN 2347
28 #define DOT11_DEFAULT_FRAG_LEN 2346
29 #define DOT11_OUI_LEN 3
33 #define AC_BITMAP_TST(ab, ac) (((ab) & (1 << (ac))) != 0)
35 typedef u8 ac_bitmap_t;
41 } __attribute__((packed));
42 typedef struct edcf_acparam edcf_acparam_t;
51 edcf_acparam_t acparam[AC_COUNT];
52 } __attribute__((packed));
53 typedef struct wme_param_ie wme_param_ie_t;
55 #define DOT11_MAC_HDR_LEN 24
56 #define DOT11_ACK_LEN 10
57 #define DOT11_ICV_AES_LEN 8
58 #define DOT11_A4_HDR_LEN 30
59 #define DOT11_QOS_LEN 2
60 #define DOT11_IV_MAX_LEN 8
61 #define DOT11_BA_LEN 4
62 #define DOT11_OFDM_SIGNAL_EXTENSION 6
63 #define DOT11_MIN_FRAG_LEN 256
64 #define DOT11_RTS_LEN 16
65 #define DOT11_CTS_LEN 10
66 #define DOT11_BA_BITMAP_LEN 128
67 #define DOT11_MIN_BEACON_PERIOD 1
68 #define DOT11_MAX_BEACON_PERIOD 0xFFFF
69 #define DOT11_MAXNUMFRAGS 16
70 #define DOT11_MAX_FRAG_LEN 2346
72 #define SEQNUM_SHIFT 4
73 #define AMPDU_DELIMITER_LEN 4
74 #define SEQNUM_MAX 0x1000
76 #define APHY_SLOT_TIME 9
77 #define BPHY_SLOT_TIME 20
79 #define PHY_CWMAX 1023
81 #define EDCF_AIFSN_MIN 1
82 #define BPHY_PLCP_TIME 192
84 #define APHY_SYMBOL_TIME 4
85 #define APHY_PREAMBLE_TIME 16
86 #define APHY_SIGNAL_TIME 4
87 #define APHY_SIFS_TIME 16
88 #define APHY_SERVICE_NBITS 16
89 #define APHY_TAIL_NBITS 6
90 #define BPHY_SIFS_TIME 10
91 #define BPHY_PLCP_SHORT_TIME 96
93 #define PREN_PREAMBLE 24
94 #define PREN_MM_EXT 12
95 #define PREN_PREAMBLE_EXT 4
97 #define FRAGNUM_MASK 0xF
99 #define RIFS_11N_TIME 2
101 #define HT_CAP_RX_STBC_NO 0x0
103 #define EDCF_ACI_MASK 0x60
104 #define EDCF_ACI_SHIFT 5
105 #define EDCF_ECWMIN_MASK 0x0f
106 #define EDCF_ECWMAX_SHIFT 4
107 #define EDCF_AIFSN_MASK 0x0f
108 #define EDCF_AIFSN_MAX 15
109 #define EDCF_ECWMAX_MASK 0xf0
111 #define EDCF_AC_BE_TXOP_STA 0x0000
112 #define EDCF_AC_BK_TXOP_STA 0x0000
113 #define EDCF_AC_VO_ACI_STA 0x62
114 #define EDCF_AC_VO_ECW_STA 0x32
115 #define EDCF_AC_VI_ACI_STA 0x42
116 #define EDCF_AC_VI_ECW_STA 0x43
117 #define EDCF_AC_BK_ECW_STA 0xA4
118 #define EDCF_AC_VI_TXOP_STA 0x005e
119 #define EDCF_AC_VO_TXOP_STA 0x002f
120 #define EDCF_AC_BE_ACI_STA 0x03
121 #define EDCF_AC_BE_ECW_STA 0xA4
122 #define EDCF_AC_BK_ACI_STA 0x27
123 #define EDCF_AC_VO_TXOP_AP 0x002f
125 #define EDCF_TXOP2USEC(txop) ((txop) << 5)
126 #define EDCF_ECW2CW(exp) ((1 << (exp)) - 1)
129 #define WME_SUBTYPE_PARAM_IE 1
131 #define WME_OUI "\x00\x50\xf2"
138 #define HT_CAP_RX_STBC_ONE_STREAM 0x1
140 #endif /* _802_11_H_ */