defs.h 2.1 KB

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