Arend van Spriel | 5b435de | 2011-10-05 13:19:03 +0200 | [diff] [blame] | 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 _BRCM_DEFS_H_ |
| 18 | #define _BRCM_DEFS_H_ |
| 19 | |
| 20 | #include <linux/types.h> |
| 21 | |
| 22 | #define SI_BUS 0 |
| 23 | #define PCI_BUS 1 |
| 24 | #define PCMCIA_BUS 2 |
| 25 | #define SDIO_BUS 3 |
| 26 | #define JTAG_BUS 4 |
| 27 | #define USB_BUS 5 |
| 28 | #define SPI_BUS 6 |
| 29 | |
| 30 | #define OFF 0 |
| 31 | #define ON 1 /* ON = 1 */ |
| 32 | #define AUTO (-1) /* Auto = -1 */ |
| 33 | |
| 34 | /* |
| 35 | * Priority definitions according 802.1D |
| 36 | */ |
| 37 | #define PRIO_8021D_NONE 2 |
| 38 | #define PRIO_8021D_BK 1 |
| 39 | #define PRIO_8021D_BE 0 |
| 40 | #define PRIO_8021D_EE 3 |
| 41 | #define PRIO_8021D_CL 4 |
| 42 | #define PRIO_8021D_VI 5 |
| 43 | #define PRIO_8021D_VO 6 |
| 44 | #define PRIO_8021D_NC 7 |
| 45 | |
| 46 | #define MAXPRIO 7 |
| 47 | #define NUMPRIO (MAXPRIO + 1) |
| 48 | |
| 49 | #define WL_NUMRATES 16 /* max # of rates in a rateset */ |
| 50 | |
| 51 | #define BRCM_CNTRY_BUF_SZ 4 /* Country string is 3 bytes + NUL */ |
| 52 | |
| 53 | #define BRCM_SET_CHANNEL 30 |
| 54 | #define BRCM_SET_SRL 32 |
| 55 | #define BRCM_SET_LRL 34 |
| 56 | #define BRCM_SET_BCNPRD 76 |
| 57 | |
| 58 | #define BRCM_GET_CURR_RATESET 114 /* current rateset */ |
| 59 | #define BRCM_GET_PHYLIST 180 |
| 60 | |
| 61 | /* Bit masks for radio disabled status - returned by WL_GET_RADIO */ |
| 62 | |
| 63 | #define WL_RADIO_SW_DISABLE (1<<0) |
| 64 | #define WL_RADIO_HW_DISABLE (1<<1) |
Arend van Spriel | 5b435de | 2011-10-05 13:19:03 +0200 | [diff] [blame] | 65 | /* some countries don't support any channel */ |
| 66 | #define WL_RADIO_COUNTRY_DISABLE (1<<3) |
| 67 | |
| 68 | /* Override bit for SET_TXPWR. if set, ignore other level limits */ |
| 69 | #define WL_TXPWR_OVERRIDE (1U<<31) |
| 70 | |
| 71 | /* band types */ |
| 72 | #define BRCM_BAND_AUTO 0 /* auto-select */ |
| 73 | #define BRCM_BAND_5G 1 /* 5 Ghz */ |
| 74 | #define BRCM_BAND_2G 2 /* 2.4 Ghz */ |
| 75 | #define BRCM_BAND_ALL 3 /* all bands */ |
| 76 | |
Seth Forshee | 1ca47e6 | 2012-11-15 08:08:00 -0600 | [diff] [blame] | 77 | /* Debug levels */ |
| 78 | #define BRCM_DL_INFO 0x00000001 |
Seth Forshee | 913911f | 2012-11-15 08:08:04 -0600 | [diff] [blame] | 79 | #define BRCM_DL_MAC80211 0x00000002 |
Seth Forshee | 5ce58bb | 2012-11-15 08:08:05 -0600 | [diff] [blame] | 80 | #define BRCM_DL_RX 0x00000004 |
| 81 | #define BRCM_DL_TX 0x00000008 |
Seth Forshee | 229a41d | 2012-11-15 08:08:06 -0600 | [diff] [blame] | 82 | #define BRCM_DL_INT 0x00000010 |
Seth Forshee | 90123e0 | 2012-11-15 08:08:07 -0600 | [diff] [blame] | 83 | #define BRCM_DL_DMA 0x00000020 |
Seth Forshee | 5211fa2 | 2012-11-15 08:08:08 -0600 | [diff] [blame] | 84 | #define BRCM_DL_HT 0x00000040 |
Arend van Spriel | 5b435de | 2011-10-05 13:19:03 +0200 | [diff] [blame] | 85 | |
Hante Meuleman | 4eb3af7 | 2014-09-30 10:23:18 +0200 | [diff] [blame] | 86 | /* Values for PM */ |
Arend van Spriel | 5b435de | 2011-10-05 13:19:03 +0200 | [diff] [blame] | 87 | #define PM_OFF 0 |
| 88 | #define PM_MAX 1 |
| 89 | #define PM_FAST 2 |
| 90 | |
| 91 | /* |
| 92 | * Sonics Configuration Space Registers. |
| 93 | */ |
| 94 | |
| 95 | /* core sbconfig regs are top 256bytes of regs */ |
| 96 | #define SBCONFIGOFF 0xf00 |
| 97 | |
| 98 | /* cpp contortions to concatenate w/arg prescan */ |
| 99 | #ifndef PAD |
| 100 | #define _PADLINE(line) pad ## line |
| 101 | #define _XSTR(line) _PADLINE(line) |
| 102 | #define PAD _XSTR(__LINE__) |
| 103 | #endif |
| 104 | |
| 105 | #endif /* _BRCM_DEFS_H_ */ |