linux/drivers/staging/brcm80211/include/defs.h
<<
>>
Prefs
   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#ifndef OFF
  31#define OFF     0
  32#endif
  33
  34#ifndef ON
  35#define ON      1               /* ON = 1 */
  36#endif
  37
  38#define AUTO    (-1)            /* Auto = -1 */
  39
  40/*
  41 * Priority definitions according 802.1D
  42 */
  43#define PRIO_8021D_NONE         2
  44#define PRIO_8021D_BK           1
  45#define PRIO_8021D_BE           0
  46#define PRIO_8021D_EE           3
  47#define PRIO_8021D_CL           4
  48#define PRIO_8021D_VI           5
  49#define PRIO_8021D_VO           6
  50#define PRIO_8021D_NC           7
  51
  52#define MAXPRIO                 7
  53#define NUMPRIO                 (MAXPRIO + 1)
  54
  55#define WL_NUMRATES             16      /* max # of rates in a rateset */
  56
  57typedef struct wl_rateset {
  58        u32 count;              /* # rates in this set */
  59        u8 rates[WL_NUMRATES];  /* rates in 500kbps units w/hi bit set if basic */
  60} wl_rateset_t;
  61
  62#define BRCM_CNTRY_BUF_SZ       4       /* Country string is 3 bytes + NUL */
  63
  64#define BRCM_SET_CHANNEL                                30
  65#define BRCM_SET_SRL                            32
  66#define BRCM_SET_LRL                            34
  67
  68#define BRCM_SET_RATESET                                72
  69#define BRCM_SET_BCNPRD                         76
  70#define BRCM_GET_CURR_RATESET                   114     /* current rateset */
  71#define BRCM_GET_PHYLIST                                180
  72
  73/* Bit masks for radio disabled status - returned by WL_GET_RADIO */
  74#define WL_RADIO_SW_DISABLE             (1<<0)
  75#define WL_RADIO_HW_DISABLE             (1<<1)
  76#define WL_RADIO_MPC_DISABLE            (1<<2)
  77#define WL_RADIO_COUNTRY_DISABLE        (1<<3)  /* some countries don't support any channel */
  78
  79/* Override bit for SET_TXPWR.  if set, ignore other level limits */
  80#define WL_TXPWR_OVERRIDE       (1U<<31)
  81
  82/* band types */
  83#define BRCM_BAND_AUTO          0       /* auto-select */
  84#define BRCM_BAND_5G            1       /* 5 Ghz */
  85#define BRCM_BAND_2G            2       /* 2.4 Ghz */
  86#define BRCM_BAND_ALL           3       /* all bands */
  87
  88/* Values for PM */
  89#define PM_OFF  0
  90#define PM_MAX  1
  91
  92/* Message levels */
  93#define LOG_ERROR_VAL           0x00000001
  94#define LOG_TRACE_VAL           0x00000002
  95
  96#define PM_OFF  0
  97#define PM_MAX  1
  98#define PM_FAST 2
  99
 100/*
 101 * Sonics Configuration Space Registers.
 102 */
 103#define SBCONFIGOFF             0xf00   /* core sbconfig regs are top 256bytes of regs */
 104
 105/* cpp contortions to concatenate w/arg prescan */
 106#ifndef PAD
 107#define _PADLINE(line)  pad ## line
 108#define _XSTR(line)     _PADLINE(line)
 109#define PAD             _XSTR(__LINE__)
 110#endif
 111
 112#endif                          /* _BRCM_DEFS_H_ */
 113