Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: ISC
0002 /*
0003  * Copyright (c) 2010 Broadcom Corporation
0004  */
0005 
0006 #ifndef _BRCM_DEFS_H_
0007 #define _BRCM_DEFS_H_
0008 
0009 #include <linux/types.h>
0010 
0011 #define SI_BUS          0
0012 #define PCI_BUS         1
0013 #define PCMCIA_BUS      2
0014 #define SDIO_BUS        3
0015 #define JTAG_BUS        4
0016 #define USB_BUS         5
0017 #define SPI_BUS         6
0018 
0019 #define OFF 0
0020 #define ON  1       /* ON = 1 */
0021 #define AUTO    (-1)        /* Auto = -1 */
0022 
0023 /*
0024  * Priority definitions according 802.1D
0025  */
0026 #define PRIO_8021D_NONE     2
0027 #define PRIO_8021D_BK       1
0028 #define PRIO_8021D_BE       0
0029 #define PRIO_8021D_EE       3
0030 #define PRIO_8021D_CL       4
0031 #define PRIO_8021D_VI       5
0032 #define PRIO_8021D_VO       6
0033 #define PRIO_8021D_NC       7
0034 
0035 #define MAXPRIO         7
0036 #define NUMPRIO         (MAXPRIO + 1)
0037 
0038 #define WL_NUMRATES     16  /* max # of rates in a rateset */
0039 
0040 #define BRCM_CNTRY_BUF_SZ   4   /* Country string is 3 bytes + NUL */
0041 
0042 #define BRCM_SET_CHANNEL    30
0043 #define BRCM_SET_SRL        32
0044 #define BRCM_SET_LRL        34
0045 #define BRCM_SET_BCNPRD     76
0046 
0047 #define BRCM_GET_CURR_RATESET   114 /* current rateset */
0048 #define BRCM_GET_PHYLIST    180
0049 
0050 /* Bit masks for radio disabled status - returned by WL_GET_RADIO */
0051 
0052 #define WL_RADIO_SW_DISABLE     (1<<0)
0053 #define WL_RADIO_HW_DISABLE     (1<<1)
0054 /* some countries don't support any channel */
0055 #define WL_RADIO_COUNTRY_DISABLE    (1<<3)
0056 
0057 /* Override bit for SET_TXPWR.  if set, ignore other level limits */
0058 #define WL_TXPWR_OVERRIDE   (1U<<31)
0059 
0060 /* band types */
0061 #define BRCM_BAND_AUTO      0   /* auto-select */
0062 #define BRCM_BAND_5G        1   /* 5 Ghz */
0063 #define BRCM_BAND_2G        2   /* 2.4 Ghz */
0064 #define BRCM_BAND_ALL       3   /* all bands */
0065 
0066 /* Debug levels */
0067 #define BRCM_DL_INFO        0x00000001
0068 #define BRCM_DL_MAC80211    0x00000002
0069 #define BRCM_DL_RX      0x00000004
0070 #define BRCM_DL_TX      0x00000008
0071 #define BRCM_DL_INT     0x00000010
0072 #define BRCM_DL_DMA     0x00000020
0073 #define BRCM_DL_HT      0x00000040
0074 
0075 /* Values for PM */
0076 #define PM_OFF  0
0077 #define PM_MAX  1
0078 #define PM_FAST 2
0079 
0080 /*
0081  * Sonics Configuration Space Registers.
0082  */
0083 
0084 /* core sbconfig regs are top 256bytes of regs */
0085 #define SBCONFIGOFF     0xf00
0086 
0087 /* cpp contortions to concatenate w/arg prescan */
0088 #ifndef PAD
0089 #define _PADLINE(line)  pad ## line
0090 #define _XSTR(line) _PADLINE(line)
0091 #define PAD     _XSTR(__LINE__)
0092 #endif
0093 
0094 #endif              /* _BRCM_DEFS_H_ */