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

« back to all changes in this revision

Viewing changes to src/src/wl/sys/wlc_pub.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:
2
2
 * Common (OS-independent) definitions for
3
3
 * Broadcom 802.11abg Networking Device Driver
4
4
 *
5
 
 * Copyright 2008, Broadcom Corporation
 
5
 * Copyright (C) 2010, Broadcom Corporation
6
6
 * All Rights Reserved.
7
7
 * 
8
 
 *      Unless you and Broadcom execute a separate written software license
9
 
 * agreement governing use of this software, this software is licensed to you
10
 
 * under the terms of the GNU General Public License version 2, available at
11
 
 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html (the "GPL"), with the
12
 
 * following added to such license:
13
 
 *      As a special exception, the copyright holders of this software give you
14
 
 * permission to link this software with independent modules, regardless of the
15
 
 * license terms of these independent modules, and to copy and distribute the
16
 
 * resulting executable under terms of your choice, provided that you also meet,
17
 
 * for each linked independent module, the terms and conditions of the license
18
 
 * of that module. An independent module is a module which is not derived from
19
 
 * this software.
20
 
 *
21
8
 * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY
22
9
 * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM
23
10
 * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
24
11
 * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE.
25
12
 *
26
 
 * $Id: wlc_pub.h,v 1.293.2.36 2009/01/23 22:38:41 Exp $
 
13
 * $Id: wlc_pub.h,v 1.392.2.6 2009/10/30 06:21:23 Exp $
27
14
 */
28
15
 
29
16
#ifndef _wlc_pub_h_
30
17
#define _wlc_pub_h_
31
18
 
32
 
#if defined(__GNUC__)
33
 
#define PACKED  __attribute__((packed))
34
 
#else
35
 
#define PACKED
36
 
#endif
37
 
 
38
 
#define MAX_TIMERS      (27 + (2 * WLC_MAXDPT))         
 
19
#define MAX_TIMERS      (29 + (2 * WLC_MAXDPT))         
39
20
 
40
21
#define WLC_NUMRATES    16      
41
22
#define MAXMULTILIST    32      
42
23
#define D11_PHY_HDR_LEN 6       
43
24
 
 
25
#ifndef LINUX_WLUSER_POSTMOGRIFY_REMOVAL
 
26
 
44
27
#define PHY_TYPE_A      0       
45
28
#define PHY_TYPE_G      2       
46
29
#define PHY_TYPE_N      4       
47
30
#define PHY_TYPE_LP     5       
48
31
#define PHY_TYPE_SSN    6       
49
 
#define PHY_TYPE_QN     7       
50
 
#define PHY_TYPE_NULL   0xf     
 
32
#define PHY_TYPE_LCN    8       
51
33
 
52
34
#define WLC_10_MHZ      10      
53
35
#define WLC_20_MHZ      20      
56
38
#define CHSPEC_WLC_BW(chanspec) (CHSPEC_IS40(chanspec) ? WLC_40_MHZ : \
57
39
                                 CHSPEC_IS20(chanspec) ? WLC_20_MHZ : \
58
40
                                                         WLC_10_MHZ)
 
41
#endif 
59
42
 
60
43
#define WLC_RSSI_MINVAL         -200    
61
44
#define WLC_RSSI_NO_SIGNAL      -91     
66
49
#define WLC_RSSI_EXCELLENT      -57     
67
50
#define WLC_RSSI_INVALID         0      
68
51
 
 
52
typedef struct wlc_tunables {
 
53
        int ntxd;                       
 
54
        int nrxd;                       
 
55
        int rxbufsz;            
 
56
        int nrxbufpost;         
 
57
        int maxscb;                     
 
58
        int ampdunummpdu;       
 
59
        int maxpktcb;           
 
60
        int maxdpt;                     
 
61
        int maxucodebss;        
 
62
        int maxucodebss4;       
 
63
        int maxbss;                     
 
64
        int datahiwat;          
 
65
        int ampdudatahiwat;     
 
66
        int rxbnd;                      
 
67
        int txsbnd;                     
 
68
        int memreserved;        
 
69
} wlc_tunables_t;
 
70
 
69
71
typedef struct wlc_rateset {
70
72
        uint    count;                  
71
73
        uint8   rates[WLC_NUMRATES];    
80
82
        uint8 unicast[4];       
81
83
        uint8 acount;           
82
84
        uint8 auth[4];          
 
85
        uint8 PAD[4];           
83
86
};
84
87
 
85
88
typedef void *wlc_pkt_t;
100
103
        uint8           SSID_len;       
101
104
        uint8           SSID[32];       
102
105
        int16           RSSI;           
 
106
        int16           SNR;            
103
107
        uint16          beacon_period;  
104
108
        uint16          atim_window;    
105
109
        chanspec_t      chanspec;       
116
120
        uint8           wme_qosinfo;    
117
121
        struct rsn_parms wpa;
118
122
        struct rsn_parms wpa2;
 
123
#ifdef BCMWAPI_WAI
 
124
        struct rsn_parms wapi;
 
125
#endif 
119
126
        uint16          qbss_load_aac;  
120
127
 
121
128
        uint8           qbss_load_chan_free;    
123
130
        uint8           wpacfg;         
124
131
} wlc_bss_info_t;
125
132
 
 
133
#ifndef LINUX_WLUSER_POSTMOGRIFY_REMOVAL
 
134
 
126
135
struct wlc_if;
127
136
 
128
137
#define WLC_ENOIOCTL    1 
135
144
#define WLC_ENOMEM      8 
136
145
#define WLC_EBUSY       9 
137
146
 
 
147
#define IOVF_MFG        (1<<3)  
138
148
#define IOVF_WHL        (1<<4)  
139
149
#define IOVF_NTRL       (1<<5)  
140
150
 
158
168
typedef int (*iovar_fn_t)(void *handle, const bcm_iovar_t *vi, uint32 actionid,
159
169
        const char *name, void *params, uint plen, void *arg, int alen,
160
170
        int vsize, struct wlc_if *wlcif);
 
171
#endif 
161
172
 
162
173
typedef struct wlc_pub {
 
174
        void            *wlc;
163
175
        uint            unit;                   
164
176
        uint            corerev;                
165
177
        osl_t           *osh;                   
167
179
        char            *vars;                  
168
180
        bool            up;                     
169
181
        bool            hw_off;                 
 
182
        wlc_tunables_t *tunables;       
170
183
        bool            hw_up;                  
171
184
        bool            _piomode;                
172
185
        uint            _nbands;                
179
192
        bool            _assoc_recreate;        
180
193
        int             _wme;                   
181
194
        uint8           _mbss;                  
 
195
#ifdef WLBDD
 
196
        bool            _bdd;                   
 
197
#endif
 
198
#ifdef WLP2P
 
199
        bool            _p2p;                   
 
200
#endif
182
201
        bool            allmulti;               
183
 
        bool            BSS;                    
184
202
        bool            associated;             
185
203
 
186
 
        bool            phytest_on;             
187
 
        bool            bf_preempt;             
 
204
        bool            phytest_on;             
 
205
        bool            bf_preempt_4306;        
188
206
        uint            txqstopped;             
189
207
 
190
208
        bool            _ampdu;                 
194
212
        int             _n_reqd;                
195
213
        int8            _coex;                  
196
214
 
197
 
        bool            _priofc;                
 
215
        bool            _priofc;        
198
216
 
199
217
        struct ether_addr       cur_etheraddr;  
200
 
        struct ether_addr       multicast[MAXMULTILIST]; 
 
218
 
 
219
        struct ether_addr       *multicast; 
201
220
        uint            nmulticast;             
202
 
        pmkid_cand_t    pmkid_cand[MAXPMKID];   
203
 
        uint            npmkid_cand;            
204
 
        pmkid_t         pmkid[MAXPMKID];        
205
 
        uint            npmkid;                 
206
 
 
207
 
        wlc_bss_info_t  current_bss;            
208
221
 
209
222
        uint32          wlfeatureflag;          
210
223
        int             psq_pkts_total;         
213
226
 
214
227
        uint16          txmaxpkts;              
215
228
 
216
 
        int8            txpwr_local_max;        
217
 
        uint8           txpwr_local_constraint; 
218
 
 
219
229
        uint32          swdecrypt;              
220
230
 
221
231
        int             bcmerror;               
228
238
        uint8           sromrev;                
229
239
        uint32          boardflags;             
230
240
        uint32          boardflags2;            
231
 
        uint8           antsel_type;            
232
 
        bool            antsel_avail;           
233
 
 
234
 
        uint32          radar;                  
235
 
 
236
 
        wl_cnt_t        _cnt;                   
237
 
        wl_wme_cnt_t    _wme_cnt;               
238
 
 
 
241
 
 
242
        wl_cnt_t        *_cnt;                  
 
243
        wl_wme_cnt_t    *_wme_cnt;              
 
244
 
 
245
        bool            _win7;                  
 
246
        bool            _extsta;                
 
247
        bool            _pkt_filter;            
 
248
 
 
249
        bool            _lmac;                  
 
250
 
 
251
        uint16          bt_period;              
 
252
        bool            phy_11ncapable;         
239
253
} wlc_pub_t;
240
254
 
241
255
typedef struct  wl_rxsts {
252
266
        uint    preamble;               
253
267
        uint    encoding;               
254
268
        uint    nfrmtype;               
 
269
        struct wl_if *wlif;     
255
270
} wl_rxsts_t;
256
271
 
257
272
struct wlc_info;
 
273
struct wlc_hw_info;
 
274
struct wlc_bsscfg;
258
275
struct wlc_if;
259
276
 
260
277
#define AP_ENAB(pub)    (0)
264
281
#define STA_ONLY(pub)   (!AP_ENAB(pub))
265
282
#define AP_ONLY(pub)    (AP_ENAB(pub) && !APSTA_ENAB(pub))
266
283
 
 
284
#ifndef LINUX_WLUSER_POSTMOGRIFY_REMOVAL
 
285
 
267
286
#define WLC_PREC_BMP_ALL                MAXBITVAL(WLC_PREC_COUNT)
268
287
 
269
288
#define WLC_PREC_BMP_AC_BE      (NBITVAL(WLC_PRIO_TO_PREC(PRIO_8021D_BE)) |     \
283
302
                                NBITVAL(WLC_PRIO_TO_PREC(PRIO_8021D_NC)) |      \
284
303
                                NBITVAL(WLC_PRIO_TO_HI_PREC(PRIO_8021D_NC)))
285
304
 
 
305
#endif 
 
306
 
286
307
#define WME_ENAB(pub) ((pub)->_wme != OFF)
287
 
#define WME_AUTO(wlc) ((wlc)->pub._wme == AUTO)
 
308
#define WME_AUTO(wlc) ((wlc)->pub->_wme == AUTO)
288
309
 
289
310
#define WLC_USE_COREFLAGS       0xffffffff      
290
311
 
295
316
#define WLCNTSET(a,value)       ((a) = (value)) 
296
317
#define WLCNTVAL(a)             (a)     
297
318
 
 
319
#ifndef LINUX_WLUSER_POSTMOGRIFY_REMOVAL
 
320
 
298
321
extern void * wlc_attach(void *wl, uint16 vendor, uint16 device, uint unit, bool piomode,
299
322
        osl_t *osh, void *regsva, uint bustype, void *btparam, uint *perr);
300
323
extern uint wlc_detach(struct wlc_info *wlc);
322
345
extern int wlc_ioctl(struct wlc_info *wlc, int cmd, void *arg, int len, struct wlc_if *wlcif);
323
346
 
324
347
extern void wlc_statsupd(struct wlc_info *wlc);
325
 
 
 
348
#endif 
 
349
 
 
350
extern wlc_pub_t *wlc_pub(void *wlc);
 
351
 
 
352
#ifndef LINUX_WLUSER_POSTMOGRIFY_REMOVAL
326
353
extern int wlc_module_register(wlc_pub_t *pub, const bcm_iovar_t *iovars,
327
354
                               const char *name, void *hdl, iovar_fn_t iovar_fn,
328
355
                               watchdog_fn_t watchdog_fn, down_fn_t down_fn);
329
356
extern int wlc_module_unregister(wlc_pub_t *pub, const char *name, void *hdl);
330
 
 
331
 
#define WLC_RPCTX_PARAMS        32
332
 
 
333
 
#undef PACKED
 
357
#endif 
 
358
 
 
359
#ifndef LINUX_WLUSER_POSTMOGRIFY_REMOVAL
 
360
 
 
361
#define WLC_RPCTX_PARAMS        32
 
362
 
 
363
#endif 
334
364
#endif