defs.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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. #ifndef _BRCM_DEFS_H_
  17. #define _BRCM_DEFS_H_
  18. #include <linux/types.h>
  19. #define SI_BUS 0
  20. #define PCI_BUS 1
  21. #define PCMCIA_BUS 2
  22. #define SDIO_BUS 3
  23. #define JTAG_BUS 4
  24. #define USB_BUS 5
  25. #define SPI_BUS 6
  26. #define OFF 0
  27. #define ON 1 /* ON = 1 */
  28. #define AUTO (-1) /* Auto = -1 */
  29. /*
  30. * Priority definitions according 802.1D
  31. */
  32. #define PRIO_8021D_NONE 2
  33. #define PRIO_8021D_BK 1
  34. #define PRIO_8021D_BE 0
  35. #define PRIO_8021D_EE 3
  36. #define PRIO_8021D_CL 4
  37. #define PRIO_8021D_VI 5
  38. #define PRIO_8021D_VO 6
  39. #define PRIO_8021D_NC 7
  40. #define MAXPRIO 7
  41. #define NUMPRIO (MAXPRIO + 1)
  42. #define WL_NUMRATES 16 /* max # of rates in a rateset */
  43. #define BRCM_CNTRY_BUF_SZ 4 /* Country string is 3 bytes + NUL */
  44. #define BRCM_SET_CHANNEL 30
  45. #define BRCM_SET_SRL 32
  46. #define BRCM_SET_LRL 34
  47. #define BRCM_SET_BCNPRD 76
  48. #define BRCM_GET_CURR_RATESET 114 /* current rateset */
  49. #define BRCM_GET_PHYLIST 180
  50. /* Bit masks for radio disabled status - returned by WL_GET_RADIO */
  51. #define WL_RADIO_SW_DISABLE (1<<0)
  52. #define WL_RADIO_HW_DISABLE (1<<1)
  53. /* some countries don't support any channel */
  54. #define WL_RADIO_COUNTRY_DISABLE (1<<3)
  55. /* Override bit for SET_TXPWR. if set, ignore other level limits */
  56. #define WL_TXPWR_OVERRIDE (1U<<31)
  57. /* band types */
  58. #define BRCM_BAND_AUTO 0 /* auto-select */
  59. #define BRCM_BAND_5G 1 /* 5 Ghz */
  60. #define BRCM_BAND_2G 2 /* 2.4 Ghz */
  61. #define BRCM_BAND_ALL 3 /* all bands */
  62. /* Debug levels */
  63. #define BRCM_DL_INFO 0x00000001
  64. #define BRCM_DL_MAC80211 0x00000002
  65. #define BRCM_DL_RX 0x00000004
  66. #define BRCM_DL_TX 0x00000008
  67. #define BRCM_DL_INT 0x00000010
  68. #define BRCM_DL_DMA 0x00000020
  69. #define BRCM_DL_HT 0x00000040
  70. /* Values for PM */
  71. #define PM_OFF 0
  72. #define PM_MAX 1
  73. #define PM_FAST 2
  74. /*
  75. * Sonics Configuration Space Registers.
  76. */
  77. /* core sbconfig regs are top 256bytes of regs */
  78. #define SBCONFIGOFF 0xf00
  79. /* cpp contortions to concatenate w/arg prescan */
  80. #ifndef PAD
  81. #define _PADLINE(line) pad ## line
  82. #define _XSTR(line) _PADLINE(line)
  83. #define PAD _XSTR(__LINE__)
  84. #endif
  85. #endif /* _BRCM_DEFS_H_ */