]> git.karo-electronics.de Git - mv-sheeva.git/blob - drivers/staging/brcm80211/include/bcmdefs.h
cf9dc0e132d493d27fafa3f762f9cd7807c32c96
[mv-sheeva.git] / drivers / staging / brcm80211 / include / bcmdefs.h
1 /*
2  * Copyright (c) 2010 Broadcom Corporation
3  *
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.
7  *
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.
15  */
16
17 #ifndef _bcmdefs_h_
18 #define _bcmdefs_h_
19
20 #define SI_BUS                  0
21 #define PCI_BUS                 1
22 #define PCMCIA_BUS              2
23 #define SDIO_BUS                3
24 #define JTAG_BUS                4
25 #define USB_BUS                 5
26 #define SPI_BUS                 6
27
28 #ifndef OFF
29 #define OFF     0
30 #endif
31
32 #ifndef ON
33 #define ON      1               /* ON = 1 */
34 #endif
35
36 #define AUTO    (-1)            /* Auto = -1 */
37
38 /*
39  * Priority definitions according 802.1D
40  */
41 #define PRIO_8021D_NONE         2
42 #define PRIO_8021D_BK           1
43 #define PRIO_8021D_BE           0
44 #define PRIO_8021D_EE           3
45 #define PRIO_8021D_CL           4
46 #define PRIO_8021D_VI           5
47 #define PRIO_8021D_VO           6
48 #define PRIO_8021D_NC           7
49
50 #define MAXPRIO                 7
51 #define NUMPRIO                 (MAXPRIO + 1)
52
53 #define WL_NUMRATES             16      /* max # of rates in a rateset */
54
55 typedef struct wl_rateset {
56         u32 count;              /* # rates in this set */
57         u8 rates[WL_NUMRATES];  /* rates in 500kbps units w/hi bit set if basic */
58 } wl_rateset_t;
59
60 #define WLC_CNTRY_BUF_SZ        4       /* Country string is 3 bytes + NUL */
61
62 #define WLC_SET_CHANNEL                         30
63 #define WLC_SET_SRL                             32
64 #define WLC_SET_LRL                             34
65
66 #define WLC_SET_RATESET                         72
67 #define WLC_SET_BCNPRD                          76
68 #define WLC_GET_CURR_RATESET                    114     /* current rateset */
69 #define WLC_GET_PHYLIST                         180
70
71 /* Bit masks for radio disabled status - returned by WL_GET_RADIO */
72 #define WL_RADIO_SW_DISABLE             (1<<0)
73 #define WL_RADIO_HW_DISABLE             (1<<1)
74 #define WL_RADIO_MPC_DISABLE            (1<<2)
75 #define WL_RADIO_COUNTRY_DISABLE        (1<<3)  /* some countries don't support any channel */
76
77 /* Override bit for WLC_SET_TXPWR.  if set, ignore other level limits */
78 #define WL_TXPWR_OVERRIDE       (1U<<31)
79
80 /* band types */
81 #define WLC_BAND_AUTO           0       /* auto-select */
82 #define WLC_BAND_5G             1       /* 5 Ghz */
83 #define WLC_BAND_2G             2       /* 2.4 Ghz */
84 #define WLC_BAND_ALL            3       /* all bands */
85
86 /* Values for PM */
87 #define PM_OFF  0
88 #define PM_MAX  1
89
90 /* Message levels */
91 #define WL_ERROR_VAL            0x00000001
92 #define WL_TRACE_VAL            0x00000002
93
94 #define PM_OFF  0
95 #define PM_MAX  1
96 #define PM_FAST 2
97
98 #endif                          /* _bcmdefs_h_ */