~ubuntu-branches/debian/wheezy/linux-2.6/wheezy

« back to all changes in this revision

Viewing changes to drivers/staging/brcm80211/include/proto/802.11.h

  • Committer: Bazaar Package Importer
  • Author(s): Ben Hutchings, Ben Hutchings, Aurelien Jarno
  • Date: 2011-06-07 12:14:05 UTC
  • mfrom: (43.1.9 sid)
  • Revision ID: james.westby@ubuntu.com-20110607121405-i3h1rd7nrnd2b73h
Tags: 2.6.39-2
[ Ben Hutchings ]
* [x86] Enable BACKLIGHT_APPLE, replacing BACKLIGHT_MBP_NVIDIA
  (Closes: #627492)
* cgroups: Disable memory resource controller by default. Allow it
  to be enabled using kernel parameter 'cgroup_enable=memory'.
* rt2800usb: Enable support for more USB devices including
  Linksys WUSB600N (Closes: #596626) (this change was accidentally
  omitted from 2.6.39-1)
* [x86] Remove Celeron from list of processors supporting PAE. Most
  'Celeron M' models do not.
* Update debconf template translations:
  - Swedish (Martin Bagge) (Closes: #628932)
  - French (David Prévot) (Closes: #628191)
* aufs: Update for 2.6.39 (Closes: #627837)
* Add stable 2.6.39.1, including:
  - ext4: dont set PageUptodate in ext4_end_bio()
  - pata_cmd64x: fix boot crash on parisc (Closes: #622997, #622745)
  - ext3: Fix fs corruption when make_indexed_dir() fails
  - netfilter: nf_ct_sip: validate Content-Length in TCP SIP messages
  - sctp: fix race between sctp_bind_addr_free() and
    sctp_bind_addr_conflict()
  - sctp: fix memory leak of the ASCONF queue when free asoc
  - md/bitmap: fix saving of events_cleared and other state
  - cdc_acm: Fix oops when Droids MuIn LCD is connected
  - cx88: Fix conversion from BKL to fine-grained locks (Closes: #619827)
  - keys: Set cred->user_ns in key_replace_session_keyring (CVE-2011-2184)
  - tmpfs: fix race between truncate and writepage
  - nfs41: Correct offset for LAYOUTCOMMIT
  - xen/mmu: fix a race window causing leave_mm BUG()
  - ext4: fix possible use-after-free in ext4_remove_li_request()
  For the complete list of changes, see:
   http://www.kernel.org/pub/linux/kernel/v2.6/ChangeLog-2.6.39.1
* Bump ABI to 2
* netfilter: Enable IP_SET, IP_SET_BITMAP_IP, IP_SET_BITMAP_IPMAC,
  IP_SET_BITMAP_PORT, IP_SET_HASH_IP, IP_SET_HASH_IPPORT,
  IP_SET_HASH_IPPORTIP, IP_SET_HASH_IPPORTNET, IP_SET_HASH_NET,
  IP_SET_HASH_NETPORT, IP_SET_LIST_SET, NETFILTER_XT_SET as modules
  (Closes: #629401)

[ Aurelien Jarno ]
* [mipsel/loongson-2f] Disable_SCSI_LPFC to workaround GCC ICE.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
#ifndef _802_11_H_
18
18
#define _802_11_H_
19
19
 
20
 
#include <proto/wpa.h>
21
 
#include <packed_section_start.h>
 
20
#include <linux/if_ether.h>
22
21
 
23
22
#define DOT11_A3_HDR_LEN                24
24
23
#define DOT11_A4_HDR_LEN                30
25
24
#define DOT11_MAC_HDR_LEN               DOT11_A3_HDR_LEN
26
 
#define DOT11_FCS_LEN                   4
27
25
#define DOT11_ICV_AES_LEN               8
28
26
#define DOT11_QOS_LEN                   2
29
27
 
30
28
#define DOT11_IV_MAX_LEN                8
31
29
 
32
 
#define DOT11_MAX_SSID_LEN              32
33
 
 
34
30
#define DOT11_DEFAULT_RTS_LEN           2347
35
31
 
36
32
#define DOT11_MIN_FRAG_LEN              256
45
41
 
46
42
#define DOT11_OUI_LEN                   3
47
43
 
48
 
BWL_PRE_PACKED_STRUCT struct dot11_header {
49
 
        u16 fc;
50
 
        u16 durid;
51
 
        struct ether_addr a1;
52
 
        struct ether_addr a2;
53
 
        struct ether_addr a3;
54
 
        u16 seq;
55
 
        struct ether_addr a4;
56
 
} BWL_POST_PACKED_STRUCT;
57
 
 
58
 
BWL_PRE_PACKED_STRUCT struct dot11_rts_frame {
59
 
        u16 fc;
60
 
        u16 durid;
61
 
        struct ether_addr ra;
62
 
        struct ether_addr ta;
63
 
} BWL_POST_PACKED_STRUCT;
64
 
 
65
44
#define DOT11_RTS_LEN           16
66
45
#define DOT11_CTS_LEN           10
67
46
#define DOT11_ACK_LEN           10
69
48
#define DOT11_BA_BITMAP_LEN             128
70
49
#define DOT11_BA_LEN            4
71
50
 
72
 
BWL_PRE_PACKED_STRUCT struct dot11_management_header {
73
 
        u16 fc;
74
 
        u16 durid;
75
 
        struct ether_addr da;
76
 
        struct ether_addr sa;
77
 
        struct ether_addr bssid;
78
 
        u16 seq;
79
 
} BWL_POST_PACKED_STRUCT;
80
 
#define DOT11_MGMT_HDR_LEN      24
81
 
 
82
 
BWL_PRE_PACKED_STRUCT struct dot11_bcn_prb {
83
 
        u32 timestamp[2];
84
 
        u16 beacon_interval;
85
 
        u16 capability;
86
 
} BWL_POST_PACKED_STRUCT;
87
 
#define DOT11_BCN_PRB_LEN       12
88
 
 
89
51
#define WME_OUI                 "\x00\x50\xf2"
90
52
#define WME_VER                 1
91
53
#define WME_TYPE                2
102
64
#define AC_BITMAP_ALL           0xf
103
65
#define AC_BITMAP_TST(ab, ac)   (((ab) & (1 << (ac))) != 0)
104
66
 
105
 
BWL_PRE_PACKED_STRUCT struct edcf_acparam {
 
67
struct edcf_acparam {
106
68
        u8 ACI;
107
69
        u8 ECW;
108
70
        u16 TXOP;
109
 
} BWL_POST_PACKED_STRUCT;
 
71
} __attribute__((packed));
110
72
typedef struct edcf_acparam edcf_acparam_t;
111
73
 
112
 
BWL_PRE_PACKED_STRUCT struct wme_param_ie {
 
74
struct wme_param_ie {
113
75
        u8 oui[3];
114
76
        u8 type;
115
77
        u8 subtype;
117
79
        u8 qosinfo;
118
80
        u8 rsvd;
119
81
        edcf_acparam_t acparam[AC_COUNT];
120
 
} BWL_POST_PACKED_STRUCT;
 
82
} __attribute__((packed));
121
83
typedef struct wme_param_ie wme_param_ie_t;
122
84
#define WME_PARAM_IE_LEN            24
123
85
 
150
112
 
151
113
#define EDCF_AC_VO_TXOP_AP           0x002f
152
114
 
153
 
#define DOT11_OPEN_SYSTEM       0
154
 
#define DOT11_SHARED_KEY        1
155
 
 
156
 
#define FC_TYPE_MASK            0xC
157
 
#define FC_TYPE_SHIFT           2
158
 
#define FC_SUBTYPE_MASK         0xF0
159
 
#define FC_SUBTYPE_SHIFT        4
160
 
#define FC_MOREFRAG             0x400
161
 
 
162
115
#define SEQNUM_SHIFT            4
163
116
#define SEQNUM_MAX              0x1000
164
117
#define FRAGNUM_MASK            0xF
165
118
 
166
 
#define FC_TYPE_MNG             0
167
 
#define FC_TYPE_CTL             1
168
 
#define FC_TYPE_DATA            2
169
 
 
170
 
#define FC_SUBTYPE_PROBE_REQ            4
171
 
#define FC_SUBTYPE_PROBE_RESP           5
172
 
#define FC_SUBTYPE_BEACON               8
173
 
#define FC_SUBTYPE_PS_POLL              10
174
 
#define FC_SUBTYPE_RTS                  11
175
 
#define FC_SUBTYPE_CTS                  12
176
 
 
177
 
#define FC_SUBTYPE_ANY_QOS(s)           (((s) & 8) != 0)
178
 
 
179
 
#define FC_KIND_MASK            (FC_TYPE_MASK | FC_SUBTYPE_MASK)
180
 
 
181
 
#define FC_KIND(t, s)   (((t) << FC_TYPE_SHIFT) | ((s) << FC_SUBTYPE_SHIFT))
182
 
 
183
 
#define FC_SUBTYPE(fc)  (((fc) & FC_SUBTYPE_MASK) >> FC_SUBTYPE_SHIFT)
184
 
#define FC_TYPE(fc)     (((fc) & FC_TYPE_MASK) >> FC_TYPE_SHIFT)
185
 
 
186
 
#define FC_PROBE_REQ    FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_PROBE_REQ)
187
 
#define FC_PROBE_RESP   FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_PROBE_RESP)
188
 
#define FC_BEACON       FC_KIND(FC_TYPE_MNG, FC_SUBTYPE_BEACON)
189
 
#define FC_PS_POLL      FC_KIND(FC_TYPE_CTL, FC_SUBTYPE_PS_POLL)
190
 
#define FC_RTS          FC_KIND(FC_TYPE_CTL, FC_SUBTYPE_RTS)
191
 
#define FC_CTS          FC_KIND(FC_TYPE_CTL, FC_SUBTYPE_CTS)
192
 
 
193
 
#define TLV_LEN_OFF             1
194
 
#define TLV_HDR_LEN             2
195
 
#define TLV_BODY_OFF            2
196
 
 
197
119
#define DOT11_MNG_RSN_ID                        48
198
120
#define DOT11_MNG_WPA_ID                        221
199
121
#define DOT11_MNG_VS_ID                         221
200
122
 
201
 
#define DOT11_CAP_ESS                           0x0001
202
 
#define DOT11_CAP_IBSS                          0x0002
203
 
#define DOT11_CAP_PRIVACY                       0x0010
204
 
#define DOT11_CAP_SHORT                         0x0020
205
 
#define DOT11_CAP_SHORTSLOT                     0x0400
206
 
 
207
123
#define DOT11_BSSTYPE_INFRASTRUCTURE            0
208
124
#define DOT11_BSSTYPE_ANY                       2
209
125
#define DOT11_SCANTYPE_ACTIVE                   0
253
169
 
254
170
#define MCSSET_LEN      16
255
171
 
256
 
BWL_PRE_PACKED_STRUCT struct ht_cap_ie {
257
 
        u16 cap;
258
 
        u8 params;
259
 
        u8 supp_mcs[MCSSET_LEN];
260
 
        u16 ext_htcap;
261
 
        u32 txbf_cap;
262
 
        u8 as_cap;
263
 
} BWL_POST_PACKED_STRUCT;
264
 
typedef struct ht_cap_ie ht_cap_ie_t;
265
 
 
266
172
#define HT_CAP_IE_LEN           26
267
173
 
268
 
#define HT_CAP_LDPC_CODING      0x0001
269
 
#define HT_CAP_40MHZ            0x0002
270
 
#define HT_CAP_MIMO_PS_MASK     0x000C
271
 
#define HT_CAP_MIMO_PS_SHIFT    0x0002
272
 
#define HT_CAP_MIMO_PS_OFF      0x0003
273
 
#define HT_CAP_MIMO_PS_ON       0x0000
274
 
#define HT_CAP_GF               0x0010
275
 
#define HT_CAP_SHORT_GI_20      0x0020
276
 
#define HT_CAP_SHORT_GI_40      0x0040
277
 
#define HT_CAP_TX_STBC          0x0080
278
 
#define HT_CAP_RX_STBC_MASK     0x0300
279
 
#define HT_CAP_RX_STBC_SHIFT    8
280
 
#define HT_CAP_MAX_AMSDU        0x0800
281
 
#define HT_CAP_DSSS_CCK 0x1000
282
 
#define HT_CAP_40MHZ_INTOLERANT 0x4000
283
 
 
284
174
#define HT_CAP_RX_STBC_NO               0x0
285
175
#define HT_CAP_RX_STBC_ONE_STREAM       0x1
286
176
 
287
 
#define HT_PARAMS_RX_FACTOR_MASK        0x03
288
 
 
289
 
#define AMPDU_MAX_MPDU_DENSITY  7
290
 
#define AMPDU_RX_FACTOR_16K     1
291
 
#define AMPDU_RX_FACTOR_32K     2
292
 
#define AMPDU_RX_FACTOR_64K     3
 
177
#define AMPDU_MAX_MPDU_DENSITY  IEEE80211_HT_MPDU_DENSITY_16
293
178
 
294
179
#define AMPDU_DELIMITER_LEN     4
295
180
 
308
193
#define RSN_AKM_PSK             2
309
194
 
310
195
#define DOT11_MAX_DEFAULT_KEYS  4
311
 
#define DOT11_MAX_KEY_SIZE      32
312
196
#define DOT11_WPA_KEY_RSC_LEN   8
313
197
 
314
 
#define WEP1_KEY_SIZE           5
315
 
#define WEP128_KEY_SIZE         13
316
 
#define TKIP_KEY_SIZE           32
317
 
#define AES_KEY_SIZE            16
318
 
 
319
198
#define BRCM_OUI                "\x00\x10\x18"
320
 
#include <packed_section_end.h>
321
199
 
322
200
#endif                          /* _802_11_H_ */