2
2
* Common (OS-independent) definitions for
3
3
* Broadcom 802.11abg Networking Device Driver
5
* Copyright 2008, Broadcom Corporation
5
* Copyright (C) 2010, Broadcom Corporation
6
6
* All Rights Reserved.
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
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.
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 $
29
16
#ifndef _wlc_pub_h_
30
17
#define _wlc_pub_h_
33
#define PACKED __attribute__((packed))
38
#define MAX_TIMERS (27 + (2 * WLC_MAXDPT))
19
#define MAX_TIMERS (29 + (2 * WLC_MAXDPT))
40
21
#define WLC_NUMRATES 16
41
22
#define MAXMULTILIST 32
42
23
#define D11_PHY_HDR_LEN 6
25
#ifndef LINUX_WLUSER_POSTMOGRIFY_REMOVAL
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
50
#define PHY_TYPE_NULL 0xf
32
#define PHY_TYPE_LCN 8
52
34
#define WLC_10_MHZ 10
53
35
#define WLC_20_MHZ 20
66
49
#define WLC_RSSI_EXCELLENT -57
67
50
#define WLC_RSSI_INVALID 0
52
typedef struct wlc_tunables {
69
71
typedef struct wlc_rateset {
71
73
uint8 rates[WLC_NUMRATES];
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);
162
173
typedef struct wlc_pub {
199
217
struct ether_addr cur_etheraddr;
200
struct ether_addr multicast[MAXMULTILIST];
219
struct ether_addr *multicast;
202
pmkid_cand_t pmkid_cand[MAXPMKID];
204
pmkid_t pmkid[MAXPMKID];
207
wlc_bss_info_t current_bss;
209
222
uint32 wlfeatureflag;
210
223
int psq_pkts_total;
264
281
#define STA_ONLY(pub) (!AP_ENAB(pub))
265
282
#define AP_ONLY(pub) (AP_ENAB(pub) && !APSTA_ENAB(pub))
284
#ifndef LINUX_WLUSER_POSTMOGRIFY_REMOVAL
267
286
#define WLC_PREC_BMP_ALL MAXBITVAL(WLC_PREC_COUNT)
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)))
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)
289
310
#define WLC_USE_COREFLAGS 0xffffffff
295
316
#define WLCNTSET(a,value) ((a) = (value))
296
317
#define WLCNTVAL(a) (a)
319
#ifndef LINUX_WLUSER_POSTMOGRIFY_REMOVAL
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);
324
347
extern void wlc_statsupd(struct wlc_info *wlc);
350
extern wlc_pub_t *wlc_pub(void *wlc);
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);
331
#define WLC_RPCTX_PARAMS 32
359
#ifndef LINUX_WLUSER_POSTMOGRIFY_REMOVAL
361
#define WLC_RPCTX_PARAMS 32