~vanvugt/ubuntu/natty/bcmwl/fix-793890

« back to all changes in this revision

Viewing changes to src/src/include/proto/802.11.h

  • Committer: Bazaar Package Importer
  • Author(s): Alberto Milone
  • Date: 2010-02-14 19:58:58 UTC
  • mfrom: (2.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20100214195858-yw9z3vstz9kyw5jl
Tags: 5.60.48.36+bdcom-0ubuntu1
* New upstream release (LP: #432780):
  - Support up to linux kernel 2.6.31. 2.6.32 support is there
    also but not tested (although reports from users suggests it
    works fine).
  - Support for hidden networks.
  - Support for rfkill in kernels < 2.6.31.
  - Setting power level via 'iwconfig eth1 txpower X' is now
    operational
  - Add support for 4313.
  - Additional channels in both 2.4 and 5 Ghz bands.
  - Fix issue with tkip group keys that caused the following
    message to repeat often:
    TKIP: RX tkey->key_idx=2 frame keyidx=1 priv=ffff8800cf80e840
  - Fix a continuous assoc/disassoc loop (in Ubuntu 8.04)
    with suspend/resume with WPA2 and wpa_supplicant.
  - Fix bug affecting Ubuntu 8.04 which prevented from pinging when
    Linux STA is IBSS creator with WEP.
  - Fix bug affecting Ubuntu 9.04 which prevented from connecting to
    hidden networks after suspend/resume.
  - Fix bug which prevented the driver from associating to AP with
    when transitioning from AES to TKIP encryption.
* debian/patches/0002-Makefile.patch:
  - Refresh patch.
* debian/patches/0003-DEV_WL_IF.patch,
  0004-broadcom-sta-5.10.91.9-linux-2.6.30.patch,
  0005-NET_DEVICE_OPS.patch,
  0006-broadcom-sta-5.10.91.9-linux-2.6.32.patch:
  - Drop patches as they are now part of the upstream code.
* debian/dkms.conf.in:
  - Remove the lines about the above mentioned patches.
* debian/bcmwl-kernel-source.postinst:
  - Make use of /usr/lib/dkms/common.postinst (LP: #497149).
* Bump compat to 5.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright 2008, Broadcom Corporation
 
2
 * Copyright (C) 2010, Broadcom Corporation
3
3
 * All Rights Reserved.
4
4
 * 
5
 
 *      Unless you and Broadcom execute a separate written software license
6
 
 * agreement governing use of this software, this software is licensed to you
7
 
 * under the terms of the GNU General Public License version 2, available at
8
 
 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html (the "GPL"), with the
9
 
 * following added to such license:
10
 
 *      As a special exception, the copyright holders of this software give you
11
 
 * permission to link this software with independent modules, regardless of the
12
 
 * license terms of these independent modules, and to copy and distribute the
13
 
 * resulting executable under terms of your choice, provided that you also meet,
14
 
 * for each linked independent module, the terms and conditions of the license
15
 
 * of that module. An independent module is a module which is not derived from
16
 
 * this software.
17
 
 *
18
5
 * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY
19
6
 * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM
20
7
 * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
22
9
 *
23
10
 * Fundamental types and constants relating to 802.11
24
11
 *
25
 
 * $Id: 802.11.h,v 9.222.2.5 2009/01/28 00:21:34 Exp $
 
12
 * $Id: 802.11.h,v 9.253.2.1 2009/10/22 07:38:43 Exp $
26
13
 */
27
14
 
28
15
#ifndef _802_11_H_
38
25
 
39
26
#include <proto/wpa.h>
40
27
 
41
 
#if defined(__GNUC__)
42
 
#define PACKED  __attribute__((packed))
43
 
#else
44
 
#pragma pack(1)
45
 
#define PACKED
46
 
#endif
 
28
#include <packed_section_start.h>
47
29
 
48
30
#define DOT11_TU_TO_US                  1024    
49
31
 
89
71
 
90
72
#define DOT11_LLC_SNAP_HDR_LEN          8       
91
73
#define DOT11_OUI_LEN                   3       
92
 
struct dot11_llc_snap_header {
 
74
BWL_PRE_PACKED_STRUCT struct dot11_llc_snap_header {
93
75
        uint8   dsap;                           
94
76
        uint8   ssap;                           
95
77
        uint8   ctl;                            
96
78
        uint8   oui[DOT11_OUI_LEN];             
97
79
        uint16  type;                           
98
 
} PACKED;
 
80
} BWL_POST_PACKED_STRUCT;
99
81
 
100
82
#define RFC1042_HDR_LEN (ETHER_HDR_LEN + DOT11_LLC_SNAP_HDR_LEN)        
101
83
 
102
 
struct dot11_header {
 
84
BWL_PRE_PACKED_STRUCT struct dot11_header {
103
85
        uint16                  fc;             
104
86
        uint16                  durid;          
105
87
        struct ether_addr       a1;             
107
89
        struct ether_addr       a3;             
108
90
        uint16                  seq;            
109
91
        struct ether_addr       a4;             
110
 
} PACKED;
 
92
} BWL_POST_PACKED_STRUCT;
111
93
 
112
 
struct dot11_rts_frame {
 
94
BWL_PRE_PACKED_STRUCT struct dot11_rts_frame {
113
95
        uint16                  fc;             
114
96
        uint16                  durid;          
115
97
        struct ether_addr       ra;             
116
98
        struct ether_addr       ta;             
117
 
} PACKED;
 
99
} BWL_POST_PACKED_STRUCT;
118
100
#define DOT11_RTS_LEN           16              
119
101
 
120
 
struct dot11_cts_frame {
 
102
BWL_PRE_PACKED_STRUCT struct dot11_cts_frame {
121
103
        uint16                  fc;             
122
104
        uint16                  durid;          
123
105
        struct ether_addr       ra;             
124
 
} PACKED;
 
106
} BWL_POST_PACKED_STRUCT;
125
107
#define DOT11_CTS_LEN           10              
126
108
 
127
 
struct dot11_ack_frame {
 
109
BWL_PRE_PACKED_STRUCT struct dot11_ack_frame {
128
110
        uint16                  fc;             
129
111
        uint16                  durid;          
130
112
        struct ether_addr       ra;             
131
 
} PACKED;
 
113
} BWL_POST_PACKED_STRUCT;
132
114
#define DOT11_ACK_LEN           10              
133
115
 
134
 
struct dot11_ps_poll_frame {
 
116
BWL_PRE_PACKED_STRUCT struct dot11_ps_poll_frame {
135
117
        uint16                  fc;             
136
118
        uint16                  durid;          
137
119
        struct ether_addr       bssid;          
138
120
        struct ether_addr       ta;             
139
 
} PACKED;
 
121
} BWL_POST_PACKED_STRUCT;
140
122
#define DOT11_PS_POLL_LEN       16              
141
123
 
142
 
struct dot11_cf_end_frame {
 
124
BWL_PRE_PACKED_STRUCT struct dot11_cf_end_frame {
143
125
        uint16                  fc;             
144
126
        uint16                  durid;          
145
127
        struct ether_addr       ra;             
146
128
        struct ether_addr       bssid;          
147
 
} PACKED;
 
129
} BWL_POST_PACKED_STRUCT;
148
130
#define DOT11_CS_END_LEN        16              
149
131
 
 
132
BWL_PRE_PACKED_STRUCT struct dot11_action_wifi_vendor_specific {
 
133
        uint8   category;
 
134
        uint8   OUI[3];
 
135
        uint8   type;
 
136
        uint8   subtype;
 
137
        uint8   data[1040];
 
138
        struct dot11_action_wifi_vendor_specific* next_node;
 
139
} BWL_POST_PACKED_STRUCT;
 
140
 
 
141
typedef struct dot11_action_wifi_vendor_specific dot11_action_wifi_vendor_specific_t;
 
142
 
150
143
#define DOT11_BA_CTL_POLICY_NORMAL      0x0000  
151
144
#define DOT11_BA_CTL_POLICY_NOACK       0x0001  
152
145
#define DOT11_BA_CTL_POLICY_MASK        0x0001  
160
153
#define DOT11_BA_CTL_TID_MASK           0xF000  
161
154
#define DOT11_BA_CTL_TID_SHIFT          12      
162
155
 
163
 
struct dot11_ctl_header {
 
156
BWL_PRE_PACKED_STRUCT struct dot11_ctl_header {
164
157
        uint16                  fc;             
165
158
        uint16                  durid;          
166
159
        struct ether_addr       ra;             
167
160
        struct ether_addr       ta;             
168
 
} PACKED;
 
161
} BWL_POST_PACKED_STRUCT;
169
162
#define DOT11_CTL_HDR_LEN       16              
170
163
 
171
 
struct dot11_bar {
 
164
BWL_PRE_PACKED_STRUCT struct dot11_bar {
172
165
        uint16                  bar_control;    
173
166
        uint16                  seqnum;         
174
 
} PACKED;
 
167
} BWL_POST_PACKED_STRUCT;
175
168
#define DOT11_BAR_LEN           4               
176
169
 
177
170
#define DOT11_BA_BITMAP_LEN     128             
178
171
#define DOT11_BA_CMP_BITMAP_LEN 8               
179
172
 
180
 
struct dot11_ba {
 
173
BWL_PRE_PACKED_STRUCT struct dot11_ba {
181
174
        uint16                  ba_control;     
182
175
        uint16                  seqnum;         
183
176
        uint8                   bitmap[DOT11_BA_BITMAP_LEN];    
184
 
} PACKED;
 
177
} BWL_POST_PACKED_STRUCT;
185
178
#define DOT11_BA_LEN            4               
186
179
 
187
 
struct dot11_management_header {
 
180
BWL_PRE_PACKED_STRUCT struct dot11_management_header {
188
181
        uint16                  fc;             
189
182
        uint16                  durid;          
190
183
        struct ether_addr       da;             
191
184
        struct ether_addr       sa;             
192
185
        struct ether_addr       bssid;          
193
186
        uint16                  seq;            
194
 
} PACKED;
 
187
} BWL_POST_PACKED_STRUCT;
195
188
#define DOT11_MGMT_HDR_LEN      24              
196
189
 
197
 
struct dot11_bcn_prb {
 
190
BWL_PRE_PACKED_STRUCT struct dot11_bcn_prb {
198
191
        uint32                  timestamp[2];
199
192
        uint16                  beacon_interval;
200
193
        uint16                  capability;
201
 
} PACKED;
 
194
} BWL_POST_PACKED_STRUCT;
202
195
#define DOT11_BCN_PRB_LEN       12              
 
196
#define DOT11_BCN_PRB_FIXED_LEN 12              
203
197
 
204
 
struct dot11_auth {
 
198
BWL_PRE_PACKED_STRUCT struct dot11_auth {
205
199
        uint16                  alg;            
206
200
        uint16                  seq;            
207
201
        uint16                  status;         
208
 
} PACKED;
 
202
} BWL_POST_PACKED_STRUCT;
209
203
#define DOT11_AUTH_FIXED_LEN    6               
210
204
 
211
 
struct dot11_assoc_req {
 
205
BWL_PRE_PACKED_STRUCT struct dot11_assoc_req {
212
206
        uint16                  capability;     
213
207
        uint16                  listen;         
214
 
} PACKED;
 
208
} BWL_POST_PACKED_STRUCT;
215
209
#define DOT11_ASSOC_REQ_FIXED_LEN       4       
216
210
 
217
 
struct dot11_reassoc_req {
 
211
BWL_PRE_PACKED_STRUCT struct dot11_reassoc_req {
218
212
        uint16                  capability;     
219
213
        uint16                  listen;         
220
214
        struct ether_addr       ap;             
221
 
} PACKED;
 
215
} BWL_POST_PACKED_STRUCT;
222
216
#define DOT11_REASSOC_REQ_FIXED_LEN     10      
223
217
 
224
 
struct dot11_assoc_resp {
 
218
BWL_PRE_PACKED_STRUCT struct dot11_assoc_resp {
225
219
        uint16                  capability;     
226
220
        uint16                  status;         
227
221
        uint16                  aid;            
228
 
} PACKED;
 
222
} BWL_POST_PACKED_STRUCT;
 
223
#define DOT11_ASSOC_RESP_FIXED_LEN      6       
229
224
 
230
 
struct dot11_action_measure {
 
225
BWL_PRE_PACKED_STRUCT struct dot11_action_measure {
231
226
        uint8   category;
232
227
        uint8   action;
233
228
        uint8   token;
234
229
        uint8   data[1];
235
 
} PACKED;
 
230
} BWL_POST_PACKED_STRUCT;
236
231
#define DOT11_ACTION_MEASURE_LEN        3       
237
232
 
238
 
struct dot11_action_ht_ch_width {
 
233
BWL_PRE_PACKED_STRUCT struct dot11_action_ht_ch_width {
239
234
        uint8   category;
240
235
        uint8   action;
241
236
        uint8   ch_width;
242
 
} PACKED;
 
237
} BWL_POST_PACKED_STRUCT;
243
238
 
244
 
struct dot11_action_ht_mimops {
 
239
BWL_PRE_PACKED_STRUCT struct dot11_action_ht_mimops {
245
240
        uint8   category;
246
241
        uint8   action;
247
242
        uint8   control;
248
 
} PACKED;
 
243
} BWL_POST_PACKED_STRUCT;
249
244
 
250
245
#define SM_PWRSAVE_ENABLE       1
251
246
#define SM_PWRSAVE_MODE         2
252
247
 
253
 
struct dot11_power_cnst {
 
248
BWL_PRE_PACKED_STRUCT struct dot11_power_cnst {
254
249
        uint8 id;
255
250
        uint8 len;
256
251
        uint8 power;
257
 
} PACKED;
 
252
} BWL_POST_PACKED_STRUCT;
258
253
typedef struct dot11_power_cnst dot11_power_cnst_t;
259
254
 
260
 
struct dot11_power_cap {
 
255
BWL_PRE_PACKED_STRUCT struct dot11_power_cap {
261
256
        uint8 min;
262
257
        uint8 max;
263
 
} PACKED;
 
258
} BWL_POST_PACKED_STRUCT;
264
259
typedef struct dot11_power_cap dot11_power_cap_t;
265
260
 
266
 
struct dot11_tpc_rep {
 
261
BWL_PRE_PACKED_STRUCT struct dot11_tpc_rep {
267
262
        uint8 id;
268
263
        uint8 len;
269
264
        uint8 tx_pwr;
270
265
        uint8 margin;
271
 
} PACKED;
 
266
} BWL_POST_PACKED_STRUCT;
272
267
typedef struct dot11_tpc_rep dot11_tpc_rep_t;
273
268
#define DOT11_MNG_IE_TPC_REPORT_LEN     2       
274
269
 
275
 
struct dot11_supp_channels {
 
270
BWL_PRE_PACKED_STRUCT struct dot11_supp_channels {
276
271
        uint8 id;
277
272
        uint8 len;
278
273
        uint8 first_channel;
279
274
        uint8 num_channels;
280
 
} PACKED;
 
275
} BWL_POST_PACKED_STRUCT;
281
276
typedef struct dot11_supp_channels dot11_supp_channels_t;
282
277
 
283
 
struct dot11_extch {
 
278
BWL_PRE_PACKED_STRUCT struct dot11_extch {
284
279
        uint8   id;             
285
280
        uint8   len;            
286
281
        uint8   extch;
287
 
} PACKED;
 
282
} BWL_POST_PACKED_STRUCT;
288
283
typedef struct dot11_extch dot11_extch_ie_t;
289
284
 
290
 
struct dot11_brcm_extch {
 
285
BWL_PRE_PACKED_STRUCT struct dot11_brcm_extch {
291
286
        uint8   id;             
292
287
        uint8   len;            
293
288
        uint8   oui[3];         
294
289
        uint8   type;           
295
290
        uint8   extch;
296
 
} PACKED;
 
291
} BWL_POST_PACKED_STRUCT;
297
292
typedef struct dot11_brcm_extch dot11_brcm_extch_ie_t;
298
293
 
299
294
#define BRCM_EXTCH_IE_LEN       5
304
299
#define DOT11_EXT_CH_LOWER      0x03    
305
300
#define DOT11_EXT_CH_NONE       0x00    
306
301
 
307
 
struct dot11_action_frmhdr {
 
302
BWL_PRE_PACKED_STRUCT struct dot11_action_frmhdr {
308
303
        uint8   category;
309
304
        uint8   action;
310
305
        uint8   data[1];
311
 
} PACKED;
 
306
} BWL_POST_PACKED_STRUCT;
312
307
#define DOT11_ACTION_FRMHDR_LEN 2
313
308
 
314
 
struct dot11_channel_switch {
 
309
BWL_PRE_PACKED_STRUCT struct dot11_channel_switch {
315
310
        uint8 id;       
316
311
        uint8 len;      
317
312
        uint8 mode;     
318
313
        uint8 channel;  
319
314
        uint8 count;    
320
 
} PACKED;
 
315
} BWL_POST_PACKED_STRUCT;
321
316
typedef struct dot11_channel_switch dot11_chan_switch_ie_t;
322
317
 
323
318
#define DOT11_SWITCH_IE_LEN     3       
325
320
#define DOT11_CSA_MODE_ADVISORY         0       
326
321
#define DOT11_CSA_MODE_NO_TX            1       
327
322
 
328
 
struct dot11_action_switch_channel {
 
323
BWL_PRE_PACKED_STRUCT struct dot11_action_switch_channel {
329
324
        uint8   category;
330
325
        uint8   action;
331
326
        dot11_chan_switch_ie_t chan_switch_ie;  
332
327
        dot11_brcm_extch_ie_t extch_ie;         
333
 
} PACKED;
 
328
} BWL_POST_PACKED_STRUCT;
334
329
 
335
 
struct dot11_ext_csa {
336
 
        uint8 id;       
337
 
        uint8 len;      
 
330
BWL_PRE_PACKED_STRUCT struct dot11_csa_body {
338
331
        uint8 mode;     
339
332
        uint8 reg;      
340
333
        uint8 channel;  
341
334
        uint8 count;    
342
 
} PACKED;
 
335
} BWL_POST_PACKED_STRUCT;
 
336
 
 
337
BWL_PRE_PACKED_STRUCT struct dot11_ext_csa {
 
338
        uint8 id;       
 
339
        uint8 len;      
 
340
        struct dot11_csa_body b;        
 
341
} BWL_POST_PACKED_STRUCT;
343
342
typedef struct dot11_ext_csa dot11_ext_csa_ie_t;
344
343
#define DOT11_EXT_CSA_IE_LEN    4       
345
344
 
346
 
struct dot11_action_ext_csa {
 
345
BWL_PRE_PACKED_STRUCT struct dot11_action_ext_csa {
347
346
        uint8   category;
348
347
        uint8   action;
349
348
        dot11_ext_csa_ie_t chan_switch_ie;      
350
 
} PACKED;
351
 
 
352
 
struct dot11_obss_coex {
 
349
} BWL_POST_PACKED_STRUCT;
 
350
 
 
351
BWL_PRE_PACKED_STRUCT struct dot11y_action_ext_csa {
 
352
        uint8   category;
 
353
        uint8   action;
 
354
        struct dot11_csa_body b;        
 
355
} BWL_POST_PACKED_STRUCT;
 
356
 
 
357
BWL_PRE_PACKED_STRUCT struct dot11_obss_coex {
353
358
        uint8   id;
354
359
        uint8   len;
355
360
        uint8   info;
356
 
} PACKED;
 
361
} BWL_POST_PACKED_STRUCT;
357
362
typedef struct dot11_obss_coex dot11_obss_coex_t;
358
363
#define DOT11_OBSS_COEXINFO_LEN 1       
359
364
 
361
366
#define DOT11_OBSS_COEX_40MHZ_INTOLERANT        0x02
362
367
#define DOT11_OBSS_COEX_20MHZ_WIDTH_REQ 0x04
363
368
 
364
 
struct dot11_obss_chanlist {
 
369
BWL_PRE_PACKED_STRUCT struct dot11_obss_chanlist {
365
370
        uint8   id;
366
371
        uint8   len;
367
372
        uint8   regclass;
368
373
        uint8   chanlist[1];
369
 
} PACKED;
 
374
} BWL_POST_PACKED_STRUCT;
370
375
typedef struct dot11_obss_chanlist dot11_obss_chanlist_t;
371
376
#define DOT11_OBSS_CHANLIST_FIXED_LEN   1       
372
377
 
373
 
struct dot11_extcap_ie {
 
378
BWL_PRE_PACKED_STRUCT struct dot11_extcap_ie {
374
379
        uint8 id;
375
380
        uint8 len;
376
381
        uint8 cap;
377
 
} PACKED;
 
382
} BWL_POST_PACKED_STRUCT;
378
383
typedef struct dot11_extcap_ie dot11_extcap_ie_t;
379
384
#define DOT11_EXTCAP_LEN        1
380
385
 
381
386
#define DOT11_MEASURE_TYPE_BASIC        0       
382
387
#define DOT11_MEASURE_TYPE_CCA          1       
383
388
#define DOT11_MEASURE_TYPE_RPI          2       
 
389
#define DOT11_MEASURE_TYPE_CHLOAD               3       
 
390
#define DOT11_MEASURE_TYPE_NOISE                4       
 
391
#define DOT11_MEASURE_TYPE_BEACON               5       
 
392
#define DOT11_MEASURE_TYPE_FRAME        6       
 
393
#define DOT11_MEASURE_TYPE_STATS                7       
 
394
#define DOT11_MEASURE_TYPE_LCI          8       
 
395
#define DOT11_MEASURE_TYPE_TXSTREAM             9       
 
396
#define DOT11_MEASURE_TYPE_PAUSE                255     
384
397
 
 
398
#define DOT11_MEASURE_MODE_PARALLEL     (1<<0)  
385
399
#define DOT11_MEASURE_MODE_ENABLE       (1<<1)  
386
400
#define DOT11_MEASURE_MODE_REQUEST      (1<<2)  
387
401
#define DOT11_MEASURE_MODE_REPORT       (1<<3)  
 
402
#define DOT11_MEASURE_MODE_DUR  (1<<4)  
388
403
 
389
404
#define DOT11_MEASURE_MODE_LATE         (1<<0)  
390
405
#define DOT11_MEASURE_MODE_INCAPABLE    (1<<1)  
396
411
#define DOT11_MEASURE_BASIC_MAP_RADAR   ((uint8)(1<<3)) 
397
412
#define DOT11_MEASURE_BASIC_MAP_UNMEAS  ((uint8)(1<<4)) 
398
413
 
399
 
struct dot11_meas_req {
 
414
BWL_PRE_PACKED_STRUCT struct dot11_meas_req {
400
415
        uint8 id;
401
416
        uint8 len;
402
417
        uint8 token;
405
420
        uint8 channel;
406
421
        uint8 start_time[8];
407
422
        uint16 duration;
408
 
} PACKED;
 
423
} BWL_POST_PACKED_STRUCT;
409
424
typedef struct dot11_meas_req dot11_meas_req_t;
410
425
#define DOT11_MNG_IE_MREQ_LEN 14        
411
426
 
412
427
#define DOT11_MNG_IE_MREQ_FIXED_LEN 3   
413
428
 
414
 
struct dot11_meas_rep {
 
429
BWL_PRE_PACKED_STRUCT struct dot11_meas_rep {
415
430
        uint8 id;
416
431
        uint8 len;
417
432
        uint8 token;
418
433
        uint8 mode;
419
434
        uint8 type;
420
 
        union
 
435
        BWL_PRE_PACKED_STRUCT union
421
436
        {
422
 
                struct {
 
437
                BWL_PRE_PACKED_STRUCT struct {
423
438
                        uint8 channel;
424
439
                        uint8 start_time[8];
425
440
                        uint16 duration;
426
441
                        uint8 map;
427
 
                } PACKED basic;
 
442
                } BWL_POST_PACKED_STRUCT basic;
428
443
                uint8 data[1];
429
 
        } PACKED rep;
430
 
} PACKED;
 
444
        } BWL_POST_PACKED_STRUCT rep;
 
445
} BWL_POST_PACKED_STRUCT;
431
446
typedef struct dot11_meas_rep dot11_meas_rep_t;
432
447
 
433
448
#define DOT11_MNG_IE_MREP_FIXED_LEN     3       
434
449
 
435
 
struct dot11_meas_rep_basic {
 
450
BWL_PRE_PACKED_STRUCT struct dot11_meas_rep_basic {
436
451
        uint8 channel;
437
452
        uint8 start_time[8];
438
453
        uint16 duration;
439
454
        uint8 map;
440
 
} PACKED;
 
455
} BWL_POST_PACKED_STRUCT;
441
456
typedef struct dot11_meas_rep_basic dot11_meas_rep_basic_t;
442
457
#define DOT11_MEASURE_BASIC_REP_LEN     12      
443
458
 
444
 
struct dot11_quiet {
 
459
BWL_PRE_PACKED_STRUCT struct dot11_quiet {
445
460
        uint8 id;
446
461
        uint8 len;
447
462
        uint8 count;    
448
463
        uint8 period;   
449
464
        uint16 duration;        
450
465
        uint16 offset;  
451
 
} PACKED;
 
466
} BWL_POST_PACKED_STRUCT;
452
467
typedef struct dot11_quiet dot11_quiet_t;
453
468
 
454
 
struct chan_map_tuple {
 
469
BWL_PRE_PACKED_STRUCT struct chan_map_tuple {
455
470
        uint8 channel;
456
471
        uint8 map;
457
 
} PACKED;
 
472
} BWL_POST_PACKED_STRUCT;
458
473
typedef struct chan_map_tuple chan_map_tuple_t;
459
474
 
460
 
struct dot11_ibss_dfs {
 
475
BWL_PRE_PACKED_STRUCT struct dot11_ibss_dfs {
461
476
        uint8 id;
462
477
        uint8 len;
463
478
        uint8 eaddr[ETHER_ADDR_LEN];
464
479
        uint8 interval;
465
480
        chan_map_tuple_t map[1];
466
 
} PACKED;
 
481
} BWL_POST_PACKED_STRUCT;
467
482
typedef struct dot11_ibss_dfs dot11_ibss_dfs_t;
468
483
 
469
484
#define WME_OUI                 "\x00\x50\xf2"  
487
502
#define AC_BITMAP_SET(ab, ac)   (((ab) |= (1 << (ac))))
488
503
#define AC_BITMAP_RESET(ab, ac) (((ab) &= ~(1 << (ac))))
489
504
 
490
 
struct wme_ie {
 
505
BWL_PRE_PACKED_STRUCT struct wme_ie {
491
506
        uint8 oui[3];
492
507
        uint8 type;
493
508
        uint8 subtype;
494
509
        uint8 version;
495
510
        uint8 qosinfo;
496
 
} PACKED;
 
511
} BWL_POST_PACKED_STRUCT;
497
512
typedef struct wme_ie wme_ie_t;
498
513
#define WME_IE_LEN 7    
499
514
 
500
 
struct edcf_acparam {
 
515
BWL_PRE_PACKED_STRUCT struct edcf_acparam {
501
516
        uint8   ACI;
502
517
        uint8   ECW;
503
518
        uint16  TXOP;           
504
 
} PACKED;
 
519
} BWL_POST_PACKED_STRUCT;
505
520
typedef struct edcf_acparam edcf_acparam_t;
506
521
 
507
 
struct wme_param_ie {
 
522
BWL_PRE_PACKED_STRUCT struct wme_param_ie {
508
523
        uint8 oui[3];
509
524
        uint8 type;
510
525
        uint8 subtype;
512
527
        uint8 qosinfo;
513
528
        uint8 rsvd;
514
529
        edcf_acparam_t acparam[AC_COUNT];
515
 
} PACKED;
 
530
} BWL_POST_PACKED_STRUCT;
516
531
typedef struct wme_param_ie wme_param_ie_t;
517
532
#define WME_PARAM_IE_LEN            24          
518
533
 
553
568
#define EDCF_TXOP_MAX                65535       
554
569
#define EDCF_TXOP2USEC(txop)         ((txop) << 5)
555
570
 
 
571
#define NON_EDCF_AC_BE_ACI_STA          0x02
 
572
 
556
573
#define EDCF_AC_BE_ACI_STA           0x03       
557
574
#define EDCF_AC_BE_ECW_STA           0xA4       
558
575
#define EDCF_AC_BE_TXOP_STA          0x0000     
566
583
#define EDCF_AC_VO_ECW_STA           0x32       
567
584
#define EDCF_AC_VO_TXOP_STA          0x002f     
568
585
 
569
 
#define NON_EDCF_AC_BE_ACI_STA          0x02
570
 
 
571
586
#define EDCF_AC_BE_ACI_AP            0x03       
572
587
#define EDCF_AC_BE_ECW_AP            0x64       
573
588
#define EDCF_AC_BE_TXOP_AP           0x0000     
581
596
#define EDCF_AC_VO_ECW_AP            0x32       
582
597
#define EDCF_AC_VO_TXOP_AP           0x002f     
583
598
 
584
 
struct dot11_qbss_load_ie {
 
599
BWL_PRE_PACKED_STRUCT struct edca_param_ie {
 
600
        uint8 qosinfo;
 
601
        uint8 rsvd;
 
602
        edcf_acparam_t acparam[AC_COUNT];
 
603
} BWL_POST_PACKED_STRUCT;
 
604
typedef struct edca_param_ie edca_param_ie_t;
 
605
#define EDCA_PARAM_IE_LEN            18          
 
606
 
 
607
BWL_PRE_PACKED_STRUCT struct qos_cap_ie {
 
608
        uint8 qosinfo;
 
609
} BWL_POST_PACKED_STRUCT;
 
610
typedef struct qos_cap_ie qos_cap_ie_t;
 
611
 
 
612
BWL_PRE_PACKED_STRUCT struct dot11_qbss_load_ie {
585
613
        uint8 id;                       
586
614
        uint8 length;
587
615
        uint16 station_count;           
588
616
        uint8 channel_utilization;      
589
617
        uint16 aac;                     
590
 
} PACKED;
 
618
} BWL_POST_PACKED_STRUCT;
591
619
typedef struct dot11_qbss_load_ie dot11_qbss_load_ie_t;
592
620
 
593
621
#define FIXED_MSDU_SIZE 0x8000          
596
624
#define INTEGER_SHIFT   13      
597
625
#define FRACTION_MASK   0x1FFF  
598
626
 
599
 
struct dot11_management_notification {
 
627
BWL_PRE_PACKED_STRUCT struct dot11_management_notification {
600
628
        uint8 category;                 
601
629
        uint8 action;
602
630
        uint8 token;
603
631
        uint8 status;
604
632
        uint8 data[1];                  
605
 
} PACKED;
 
633
} BWL_POST_PACKED_STRUCT;
606
634
#define DOT11_MGMT_NOTIFICATION_LEN 4   
607
635
 
608
636
#define WME_ADDTS_REQUEST       0       
841
869
#define DOT11_MNG_HOPPING_TABLE_ID              9       
842
870
#define DOT11_MNG_REQUEST_ID                    10      
843
871
#define DOT11_MNG_QBSS_LOAD_ID                  11      
 
872
#define DOT11_MNG_EDCA_PARAM_ID                 12      
844
873
#define DOT11_MNG_CHALLENGE_ID                  16      
845
874
#define DOT11_MNG_PWR_CONSTRAINT_ID             32      
846
875
#define DOT11_MNG_PWR_CAP_ID                    33      
855
884
#define DOT11_MNG_ERP_ID                        42      
856
885
#define DOT11_MNG_TS_DELAY_ID                   43      
857
886
#define DOT11_MNG_HT_CAP                        45      
 
887
#define DOT11_MNG_QOS_CAP_ID                    46      
858
888
#define DOT11_MNG_NONERP_ID                     47      
859
889
#define DOT11_MNG_RSN_ID                        48      
860
890
#define DOT11_MNG_EXT_RATES_ID                  50      
 
891
#define DOT11_MNG_AP_CHREP_ID           51      
 
892
#define DOT11_MNG_NBR_REP_ID            52      
861
893
#define DOT11_MNG_REGCLASS_ID                   59      
862
894
#define DOT11_MNG_EXT_CSA_ID                    60      
863
895
#define DOT11_MNG_HT_ADD                        61      
864
896
#define DOT11_MNG_EXT_CHANNEL_OFFSET            62      
 
897
 
 
898
#ifdef BCMWAPI_WAI
 
899
#define DOT11_MNG_WAPI_ID                       68      
 
900
#endif
 
901
 
 
902
#define DOT11_MNG_RRM_CAP_ID            70      
865
903
#define DOT11_MNG_HT_BSS_COEXINFO_ID            72      
866
904
#define DOT11_MNG_HT_BSS_CHANNEL_REPORT_ID      73      
867
905
#define DOT11_MNG_HT_OBSS_ID                    74      
890
928
#define DOT11_CAP_AGILITY                       0x0080  
891
929
#define DOT11_CAP_SPECTRUM                      0x0100  
892
930
#define DOT11_CAP_SHORTSLOT                     0x0400  
 
931
#define DOT11_CAP_RM                    0x1000  
893
932
#define DOT11_CAP_CCK_OFDM                      0x2000  
894
933
 
895
934
#define DOT11_OBSS_COEX_MNG_SUPPORT     0x01    
896
935
 
897
936
#define DOT11_ACTION_HDR_LEN            2       
 
937
 
898
938
#define DOT11_ACTION_CAT_ERR_MASK       0x80    
899
939
#define DOT11_ACTION_CAT_MASK           0x7F    
900
940
#define DOT11_ACTION_CAT_SPECT_MNG      0       
 
941
#define DOT11_ACTION_CAT_QOS            1       
 
942
#define DOT11_ACTION_CAT_DLS            2       
901
943
#define DOT11_ACTION_CAT_BLOCKACK       3       
902
944
#define DOT11_ACTION_CAT_PUBLIC         4       
 
945
#define DOT11_ACTION_CAT_RM             5       
903
946
#define DOT11_ACTION_CAT_HT             7       
 
947
#define DOT11_ACTION_CAT_VS             127     
904
948
#define DOT11_ACTION_NOTIFICATION       0x11    
905
949
 
906
 
#define DOT11_ACTION_ID_M_REQ           0       
907
 
#define DOT11_ACTION_ID_M_REP           1       
908
 
#define DOT11_ACTION_ID_TPC_REQ         2       
909
 
#define DOT11_ACTION_ID_TPC_REP         3       
910
 
#define DOT11_ACTION_ID_CHANNEL_SWITCH  4       
911
 
#define DOT11_ACTION_ID_EXT_CSA         5       
 
950
#define DOT11_SM_ACTION_M_REQ           0       
 
951
#define DOT11_SM_ACTION_M_REP           1       
 
952
#define DOT11_SM_ACTION_TPC_REQ         2       
 
953
#define DOT11_SM_ACTION_TPC_REP         3       
 
954
#define DOT11_SM_ACTION_CHANNEL_SWITCH  4       
 
955
#define DOT11_SM_ACTION_EXT_CSA         5       
912
956
 
913
957
#define DOT11_ACTION_ID_HT_CH_WIDTH     0       
914
958
#define DOT11_ACTION_ID_HT_MIMO_PS      1       
915
959
 
916
 
#define DOT11_ACTION_ID_BSS_COEX_MNG    0       
 
960
#define DOT11_PUB_ACTION_BSS_COEX_MNG   0       
 
961
#define DOT11_PUB_ACTION_CHANNEL_SWITCH 4       
917
962
 
918
963
#define DOT11_BA_ACTION_ADDBA_REQ       0       
919
964
#define DOT11_BA_ACTION_ADDBA_RESP      1       
930
975
#define DOT11_ADDBA_POLICY_DELAYED      0       
931
976
#define DOT11_ADDBA_POLICY_IMMEDIATE    1       
932
977
 
933
 
struct dot11_addba_req {
 
978
BWL_PRE_PACKED_STRUCT struct dot11_addba_req {
934
979
        uint8 category;                         
935
980
        uint8 action;                           
936
981
        uint8 token;                            
937
982
        uint16 addba_param_set;                 
938
983
        uint16 timeout;                         
939
984
        uint16 start_seqnum;                    
940
 
}PACKED;
 
985
} BWL_POST_PACKED_STRUCT;
941
986
typedef struct dot11_addba_req dot11_addba_req_t;
942
987
#define DOT11_ADDBA_REQ_LEN             9       
943
988
 
944
 
struct dot11_addba_resp {
 
989
BWL_PRE_PACKED_STRUCT struct dot11_addba_resp {
945
990
        uint8 category;                         
946
991
        uint8 action;                           
947
992
        uint8 token;                            
948
993
        uint16 status;                          
949
994
        uint16 addba_param_set;                 
950
995
        uint16 timeout;                         
951
 
}PACKED;
 
996
} BWL_POST_PACKED_STRUCT;
952
997
typedef struct dot11_addba_resp dot11_addba_resp_t;
953
998
#define DOT11_ADDBA_RESP_LEN            9       
954
999
 
957
1002
#define DOT11_DELBA_PARAM_TID_MASK      0xf000  
958
1003
#define DOT11_DELBA_PARAM_TID_SHIFT     12      
959
1004
 
960
 
struct dot11_delba {
 
1005
BWL_PRE_PACKED_STRUCT struct dot11_delba {
961
1006
        uint8 category;                         
962
1007
        uint8 action;                           
963
1008
        uint16 delba_param_set;                 
964
1009
        uint16 reason;                          
965
 
}PACKED;
 
1010
} BWL_POST_PACKED_STRUCT;
966
1011
typedef struct dot11_delba dot11_delba_t;
967
1012
#define DOT11_DELBA_LEN                 6       
968
1013
 
 
1014
#define DOT11_RRM_CAP_LEN               5       
 
1015
BWL_PRE_PACKED_STRUCT struct dot11_rrm_cap_ie {
 
1016
        uint8 cap[DOT11_RRM_CAP_LEN];
 
1017
} BWL_POST_PACKED_STRUCT;
 
1018
typedef struct dot11_rrm_cap_ie dot11_rrm_cap_ie_t;
 
1019
 
 
1020
#define DOT11_RRM_CAP_LINK                      0
 
1021
#define DOT11_RRM_CAP_NEIGHBOR_REPORT   1
 
1022
#define DOT11_RRM_CAP_PARALLEL          2
 
1023
#define DOT11_RRM_CAP_REPEATED          3
 
1024
#define DOT11_RRM_CAP_BCN_PASSIVE       4
 
1025
#define DOT11_RRM_CAP_BCN_ACTIVE        5
 
1026
#define DOT11_RRM_CAP_BCN_TABLE         6
 
1027
#define DOT11_RRM_CAP_BCN_REP_COND      7
 
1028
 
 
1029
#define DOT11_RM_ACTION_RM_REQ          0       
 
1030
#define DOT11_RM_ACTION_RM_REP          1       
 
1031
#define DOT11_RM_ACTION_LM_REQ          2       
 
1032
#define DOT11_RM_ACTION_LM_REP          3       
 
1033
#define DOT11_RM_ACTION_NR_REQ          4       
 
1034
#define DOT11_RM_ACTION_NR_REP          5       
 
1035
 
 
1036
BWL_PRE_PACKED_STRUCT struct dot11_rm_action {
 
1037
        uint8 category;                         
 
1038
        uint8 action;                           
 
1039
        uint8 token;                            
 
1040
        uint8 data[1];
 
1041
} BWL_POST_PACKED_STRUCT;
 
1042
typedef struct dot11_rm_action dot11_rm_action_t;
 
1043
#define DOT11_RM_ACTION_LEN 3
 
1044
 
 
1045
BWL_PRE_PACKED_STRUCT struct dot11_rmreq {
 
1046
        uint8 category;                         
 
1047
        uint8 action;                           
 
1048
        uint8 token;                            
 
1049
        uint16 reps;                            
 
1050
} BWL_POST_PACKED_STRUCT;
 
1051
typedef struct dot11_rmreq dot11_rmreq_t;
 
1052
#define DOT11_RMREQ_LEN 5
 
1053
 
 
1054
BWL_PRE_PACKED_STRUCT struct dot11_rm_ie {
 
1055
        uint8 id;
 
1056
        uint8 len;
 
1057
        uint8 token;
 
1058
        uint8 mode;
 
1059
        uint8 type;
 
1060
} BWL_POST_PACKED_STRUCT;
 
1061
typedef struct dot11_rm_ie dot11_rm_ie_t;
 
1062
#define DOT11_RM_IE_LEN 5
 
1063
 
 
1064
BWL_PRE_PACKED_STRUCT struct dot11_rmreq_bcn {
 
1065
        uint8 id;
 
1066
        uint8 len;
 
1067
        uint8 token;
 
1068
        uint8 mode;
 
1069
        uint8 type;
 
1070
        uint8 reg;
 
1071
        uint8 channel;
 
1072
        uint16 interval;
 
1073
        uint16 duration;
 
1074
        uint8 bcn_mode;
 
1075
        struct ether_addr       bssid;
 
1076
} BWL_POST_PACKED_STRUCT;
 
1077
typedef struct dot11_rmreq_bcn dot11_rmreq_bcn_t;
 
1078
#define DOT11_RMREQ_BCN_LEN     18
 
1079
 
 
1080
BWL_PRE_PACKED_STRUCT struct dot11_rmrep_bcn {
 
1081
        uint8 reg;
 
1082
        uint8 channel;
 
1083
        uint32 starttime[2];
 
1084
        uint16 duration;
 
1085
        uint8 frame_info;
 
1086
        uint8 rcpi;
 
1087
        uint8 rsni;
 
1088
        struct ether_addr       bssid;
 
1089
        uint8 antenna_id;
 
1090
        uint32 parent_tsf;
 
1091
} BWL_POST_PACKED_STRUCT;
 
1092
typedef struct dot11_rmrep_bcn dot11_rmrep_bcn_t;
 
1093
#define DOT11_RMREP_BCN_LEN     26
 
1094
 
 
1095
#define DOT11_RMREQ_BCN_PASSIVE 0
 
1096
#define DOT11_RMREQ_BCN_ACTIVE  1
 
1097
#define DOT11_RMREQ_BCN_BCNTABLE        2
 
1098
 
 
1099
#define DOT11_RMREQ_BCN_SSID_ID 0
 
1100
#define DOT11_RMREQ_BCN_REPINFO_ID      1
 
1101
#define DOT11_RMREQ_BCN_REPDET_ID       2
 
1102
#define DOT11_RMREQ_BCN_REQUEST_ID      10
 
1103
#define DOT11_RMREQ_BCN_APCHREP_ID      51
 
1104
 
 
1105
#define DOT11_RMREP_BCN_FRM_BODY        1
 
1106
 
 
1107
BWL_PRE_PACKED_STRUCT struct dot11_rmrep_nbr {
 
1108
        struct ether_addr       bssid;
 
1109
        uint32  bssid_info;
 
1110
        uint8 reg;
 
1111
        uint8 channel;
 
1112
        uint8 phytype;
 
1113
} BWL_POST_PACKED_STRUCT;
 
1114
typedef struct dot11_rmrep_nbr dot11_rmrep_nbr_t;
 
1115
#define DOT11_RMREP_NBR_LEN     13
 
1116
 
969
1117
#define DOT11_BSSTYPE_INFRASTRUCTURE            0       
970
1118
#define DOT11_BSSTYPE_INDEPENDENT               1       
971
1119
#define DOT11_BSSTYPE_ANY                       2       
973
1121
#define DOT11_SCANTYPE_PASSIVE                  1       
974
1122
 
975
1123
#define PREN_PREAMBLE           24      
976
 
#define PREN_MM_EXT             8       
 
1124
#define PREN_MM_EXT             12      
977
1125
#define PREN_PREAMBLE_EXT       4       
978
1126
 
979
 
#define NPHY_RIFS_TIME          2       
 
1127
#define RIFS_11N_TIME           2       
980
1128
 
981
1129
#define APHY_SLOT_TIME          9       
982
1130
#define APHY_SIFS_TIME          16      
1022
1170
 
1023
1171
#define BRCM_OUI                "\x00\x10\x18"  
1024
1172
 
1025
 
struct brcm_ie {
 
1173
BWL_PRE_PACKED_STRUCT struct brcm_ie {
1026
1174
        uint8   id;             
1027
1175
        uint8   len;            
1028
1176
        uint8   oui[3];         
1031
1179
        uint8   flags;          
1032
1180
        uint8   flags1;         
1033
1181
        uint16  amsdu_mtu_pref; 
1034
 
} PACKED;
 
1182
} BWL_POST_PACKED_STRUCT;
1035
1183
typedef struct brcm_ie brcm_ie_t;
1036
1184
#define BRCM_IE_LEN             11      
1037
1185
#define BRCM_IE_VER             2       
1047
1195
 
1048
1196
#define AB_GUARDCOUNT   10              
1049
1197
 
 
1198
BWL_PRE_PACKED_STRUCT struct vndr_ie {
 
1199
        uchar id;
 
1200
        uchar len;
 
1201
        uchar oui [3];
 
1202
        uchar data [1];         
 
1203
} BWL_POST_PACKED_STRUCT;
 
1204
typedef struct vndr_ie vndr_ie_t;
 
1205
 
 
1206
#define VNDR_IE_HDR_LEN         2       
 
1207
#define VNDR_IE_MIN_LEN         3       
 
1208
#define VNDR_IE_MAX_LEN         256     
 
1209
 
1050
1210
#define MCSSET_LEN      16      
1051
1211
#define MAX_MCS_NUM     (128)   
1052
1212
 
1053
 
struct ht_cap_ie {
 
1213
BWL_PRE_PACKED_STRUCT struct ht_cap_ie {
1054
1214
        uint16  cap;
1055
1215
        uint8   params;
1056
1216
        uint8   supp_mcs[MCSSET_LEN];
1057
1217
        uint16  ext_htcap;
1058
1218
        uint32  txbf_cap;
1059
1219
        uint8   as_cap;
1060
 
} PACKED;
 
1220
} BWL_POST_PACKED_STRUCT;
1061
1221
typedef struct ht_cap_ie ht_cap_ie_t;
1062
1222
 
1063
 
struct ht_prop_cap_ie {
 
1223
BWL_PRE_PACKED_STRUCT struct ht_prop_cap_ie {
1064
1224
        uint8   id;             
1065
1225
        uint8   len;            
1066
1226
        uint8   oui[3];         
1067
1227
        uint8   type;           
1068
1228
        ht_cap_ie_t cap_ie;
1069
 
} PACKED;
 
1229
} BWL_POST_PACKED_STRUCT;
1070
1230
typedef struct ht_prop_cap_ie ht_prop_cap_ie_t;
1071
1231
 
1072
1232
#define HT_PROP_IE_OVERHEAD     4       
1088
1248
#define HT_CAP_RX_STBC_SHIFT    8       
1089
1249
#define HT_CAP_DELAYED_BA       0x0400  
1090
1250
#define HT_CAP_MAX_AMSDU        0x0800  
1091
 
#define HT_CAP_DSSS_CCK         0x1000  
 
1251
#define HT_CAP_DSSS_CCK 0x1000  
1092
1252
#define HT_CAP_PSMP             0x2000  
1093
1253
#define HT_CAP_40MHZ_INTOLERANT 0x4000  
1094
1254
#define HT_CAP_LSIG_TXOP        0x8000  
1103
1263
 
1104
1264
#define HT_PARAMS_RX_FACTOR_MASK        0x03    
1105
1265
#define HT_PARAMS_DENSITY_MASK          0x1C    
1106
 
#define HT_PARAMS_DENSITY_SHIFT         2       
 
1266
#define HT_PARAMS_DENSITY_SHIFT 2       
1107
1267
 
1108
1268
#define AMPDU_MAX_MPDU_DENSITY  7       
1109
1269
#define AMPDU_RX_FACTOR_8K      0       
1114
1274
 
1115
1275
#define AMPDU_DELIMITER_LEN     4       
1116
1276
 
1117
 
struct ht_add_ie {
 
1277
BWL_PRE_PACKED_STRUCT struct ht_add_ie {
1118
1278
        uint8   ctl_ch;                 
1119
1279
        uint8   byte1;                  
1120
1280
        uint16  opmode;                 
1121
1281
        uint16  misc_bits;              
1122
1282
        uint8   basic_mcs[MCSSET_LEN];  
1123
 
} PACKED;
 
1283
} BWL_POST_PACKED_STRUCT;
1124
1284
typedef struct ht_add_ie ht_add_ie_t;
1125
1285
 
1126
 
struct ht_prop_add_ie {
 
1286
BWL_PRE_PACKED_STRUCT struct ht_prop_add_ie {
1127
1287
        uint8   id;             
1128
1288
        uint8   len;            
1129
1289
        uint8   oui[3];         
1130
1290
        uint8   type;           
1131
1291
        ht_add_ie_t add_ie;
1132
 
} PACKED;
 
1292
} BWL_POST_PACKED_STRUCT;
1133
1293
typedef struct ht_prop_add_ie ht_prop_add_ie_t;
1134
1294
 
1135
1295
#define HT_ADD_IE_LEN   22
1139
1299
#define HT_RIFS_PERMITTED       0x08    
1140
1300
 
1141
1301
#define HT_OPMODE_MASK          0x0003  
1142
 
#define HT_OPMODE_SHIFT 0       
 
1302
#define HT_OPMODE_SHIFT         0       
1143
1303
#define HT_OPMODE_PURE          0x0000  
1144
1304
#define HT_OPMODE_OPTIONAL      0x0001  
1145
1305
#define HT_OPMODE_HT20IN40      0x0002  
1175
1335
#define DOT11N_OBSS_NONHT_PRESENT(add_ie)       ((ltoh16_ua(&add_ie->opmode) & DOT11N_OBSS_NONHT) \
1176
1336
                                        == DOT11N_OBSS_NONHT)   
1177
1337
 
1178
 
struct obss_params {
 
1338
BWL_PRE_PACKED_STRUCT struct obss_params {
1179
1339
        uint16  passive_dwell;
1180
1340
        uint16  active_dwell;
1181
1341
        uint16  bss_widthscan_interval;
1183
1343
        uint16  active_total;
1184
1344
        uint16  chanwidth_transition_dly;
1185
1345
        uint16  activity_threshold;
1186
 
} PACKED;
 
1346
} BWL_POST_PACKED_STRUCT;
1187
1347
typedef struct obss_params obss_params_t;
1188
1348
 
1189
 
struct dot11_obss_ie {
 
1349
BWL_PRE_PACKED_STRUCT struct dot11_obss_ie {
1190
1350
        uint8   id;
1191
1351
        uint8   len;
1192
1352
        obss_params_t obss_params;
1193
 
} PACKED;
 
1353
} BWL_POST_PACKED_STRUCT;
1194
1354
typedef struct dot11_obss_ie dot11_obss_ie_t;
1195
1355
#define DOT11_OBSS_SCAN_IE_LEN  sizeof(obss_params_t)   
1196
1356
 
1197
 
struct vndr_ie {
1198
 
        uchar id;
1199
 
        uchar len;
1200
 
        uchar oui [3];
1201
 
        uchar data [1];         
1202
 
} PACKED;
1203
 
typedef struct vndr_ie vndr_ie_t;
 
1357
#define HT_CTRL_LA_TRQ          0x00000002      
 
1358
#define HT_CTRL_LA_MAI          0x0000003C      
 
1359
#define HT_CTRL_LA_MAI_SHIFT    2
 
1360
#define HT_CTRL_LA_MAI_MRQ      0x00000004      
 
1361
#define HT_CTRL_LA_MAI_MSI      0x00000038      
 
1362
#define HT_CTRL_LA_MFSI         0x000001C0      
 
1363
#define HT_CTRL_LA_MFSI_SHIFT   6
 
1364
#define HT_CTRL_LA_MFB_ASELC    0x0000FE00      
 
1365
#define HT_CTRL_LA_MFB_ASELC_SH 9
 
1366
#define HT_CTRL_LA_ASELC_CMD    0x00000C00      
 
1367
#define HT_CTRL_LA_ASELC_DATA   0x0000F000      
 
1368
#define HT_CTRL_CAL_POS         0x00030000      
 
1369
#define HT_CTRL_CAL_SEQ         0x000C0000      
 
1370
#define HT_CTRL_CSI_STEERING    0x00C00000      
 
1371
#define HT_CTRL_CSI_STEER_SHIFT 22
 
1372
#define HT_CTRL_CSI_STEER_NFB   0               
 
1373
#define HT_CTRL_CSI_STEER_CSI   1               
 
1374
#define HT_CTRL_CSI_STEER_NCOM  2               
 
1375
#define HT_CTRL_CSI_STEER_COM   3               
 
1376
#define HT_CTRL_NDP_ANNOUNCE    0x01000000      
 
1377
#define HT_CTRL_AC_CONSTRAINT   0x40000000      
 
1378
#define HT_CTRL_RDG_MOREPPDU    0x80000000      
1204
1379
 
1205
 
#define VNDR_IE_HDR_LEN         2       
1206
 
#define VNDR_IE_MIN_LEN         3       
1207
 
#define VNDR_IE_MAX_LEN         256     
 
1380
#define HT_OPMODE_OPTIONAL      0x0001  
 
1381
#define HT_OPMODE_HT20IN40      0x0002  
 
1382
#define HT_OPMODE_MIXED 0x0003  
 
1383
#define HT_OPMODE_NONGF 0x0004  
 
1384
#define DOT11N_TXBURST          0x0008  
 
1385
#define DOT11N_OBSS_NONHT       0x0010  
1208
1386
 
1209
1387
#define WPA_VERSION             1       
1210
1388
#define WPA_OUI                 "\x00\x50\xF2"  
1223
1401
#define DOT11_MAX_KEY_SIZE      32      
1224
1402
#define DOT11_MAX_IV_SIZE       16      
1225
1403
#define DOT11_EXT_IV_FLAG       (1<<5)  
1226
 
#define DOT11_WPA_KEY_RSC_LEN   8       
 
1404
#define DOT11_WPA_KEY_RSC_LEN   8       
1227
1405
 
1228
1406
#define WEP1_KEY_SIZE           5       
1229
1407
#define WEP1_KEY_HEX_SIZE       10      
1240
1418
#define AES_KEY_SIZE            16      
1241
1419
#define AES_MIC_SIZE            8       
1242
1420
 
1243
 
#undef PACKED
1244
 
#if !defined(__GNUC__)
1245
 
#pragma pack()
1246
 
#endif
 
1421
#define WCN_OUI                 "\x00\x50\xf2"  
 
1422
#define WCN_TYPE                4       
 
1423
 
 
1424
#ifdef BCMWAPI_WAI
 
1425
#define WAPI_IE_MIN_LEN         20      
 
1426
#define WAPI_VERSION            1       
 
1427
#define WAPI_VERSION_LEN        2       
 
1428
#define WAPI_OUI                "\x00\x14\x72"  
 
1429
#define WAPI_OUI_LEN            DOT11_OUI_LEN   
 
1430
#endif 
 
1431
 
 
1432
#include <packed_section_end.h>
1247
1433
 
1248
1434
#endif