Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
main.c File Reference
#include <linux/pci_ids.h>
#include <linux/if_ether.h>
#include <net/cfg80211.h>
#include <net/mac80211.h>
#include <brcm_hw_ids.h>
#include <aiutils.h>
#include <chipcommon.h>
#include "rate.h"
#include "scb.h"
#include "phy/phy_hal.h"
#include "channel.h"
#include "antsel.h"
#include "stf.h"
#include "ampdu.h"
#include "mac80211_if.h"
#include "ucode_loader.h"
#include "main.h"
#include "soc.h"

Go to the source code of this file.

Data Structures

struct  brcms_c_bit_desc
 
struct  d11init
 
struct  edcf_acparam
 

Macros

#define pr_fmt(fmt)   KBUILD_MODNAME ": " fmt
 
#define ALLPRIO   -1
 
#define TIMER_INTERVAL_WATCHDOG   1000
 
#define TIMER_INTERVAL_RADIOCHK   800
 
#define BEACON_INTERVAL_DEFAULT   100
 
#define WL_11N_2x2   1
 
#define WL_11N_3x3   3
 
#define WL_11N_4x4   4
 
#define EDCF_ACI_MASK   0x60
 
#define EDCF_ACI_SHIFT   5
 
#define EDCF_ECWMIN_MASK   0x0f
 
#define EDCF_ECWMAX_SHIFT   4
 
#define EDCF_AIFSN_MASK   0x0f
 
#define EDCF_AIFSN_MAX   15
 
#define EDCF_ECWMAX_MASK   0xf0
 
#define EDCF_AC_BE_TXOP_STA   0x0000
 
#define EDCF_AC_BK_TXOP_STA   0x0000
 
#define EDCF_AC_VO_ACI_STA   0x62
 
#define EDCF_AC_VO_ECW_STA   0x32
 
#define EDCF_AC_VI_ACI_STA   0x42
 
#define EDCF_AC_VI_ECW_STA   0x43
 
#define EDCF_AC_BK_ECW_STA   0xA4
 
#define EDCF_AC_VI_TXOP_STA   0x005e
 
#define EDCF_AC_VO_TXOP_STA   0x002f
 
#define EDCF_AC_BE_ACI_STA   0x03
 
#define EDCF_AC_BE_ECW_STA   0xA4
 
#define EDCF_AC_BK_ACI_STA   0x27
 
#define EDCF_AC_VO_TXOP_AP   0x002f
 
#define EDCF_TXOP2USEC(txop)   ((txop) << 5)
 
#define EDCF_ECW2CW(exp)   ((1 << (exp)) - 1)
 
#define APHY_SYMBOL_TIME   4
 
#define APHY_PREAMBLE_TIME   16
 
#define APHY_SIGNAL_TIME   4
 
#define APHY_SIFS_TIME   16
 
#define APHY_SERVICE_NBITS   16
 
#define APHY_TAIL_NBITS   6
 
#define BPHY_SIFS_TIME   10
 
#define BPHY_PLCP_SHORT_TIME   96
 
#define PREN_PREAMBLE   24
 
#define PREN_MM_EXT   12
 
#define PREN_PREAMBLE_EXT   4
 
#define DOT11_MAC_HDR_LEN   24
 
#define DOT11_ACK_LEN   10
 
#define DOT11_BA_LEN   4
 
#define DOT11_OFDM_SIGNAL_EXTENSION   6
 
#define DOT11_MIN_FRAG_LEN   256
 
#define DOT11_RTS_LEN   16
 
#define DOT11_CTS_LEN   10
 
#define DOT11_BA_BITMAP_LEN   128
 
#define DOT11_MIN_BEACON_PERIOD   1
 
#define DOT11_MAX_BEACON_PERIOD   0xFFFF
 
#define DOT11_MAXNUMFRAGS   16
 
#define DOT11_MAX_FRAG_LEN   2346
 
#define BPHY_PLCP_TIME   192
 
#define RIFS_11N_TIME   2
 
#define BCN_TMPL_LEN   512
 
#define BRCMS_BSS_HT   0x0020 /* BSS is HT (MIMO) capable */
 
#define BRCMS_HWRXOFF   38
 
#define RFDISABLE_DEFAULT   10000000
 
#define BRCMS_TEMPSENSE_PERIOD   10 /* 10 second timeout */
 
#define _BRCMS_PREC_NONE   0 /* None = - */
 
#define _BRCMS_PREC_BK   2 /* BK - Background */
 
#define _BRCMS_PREC_BE   4 /* BE - Best-effort */
 
#define _BRCMS_PREC_EE   6 /* EE - Excellent-effort */
 
#define _BRCMS_PREC_CL   8 /* CL - Controlled Load */
 
#define _BRCMS_PREC_VI   10 /* Vi - Video */
 
#define _BRCMS_PREC_VO   12 /* Vo - Voice */
 
#define _BRCMS_PREC_NC   14 /* NC - Network Control */
 
#define SYNTHPU_DLY_APHY_US   3700
 
#define SYNTHPU_DLY_BPHY_US   1050
 
#define SYNTHPU_DLY_NPHY_US   2048
 
#define SYNTHPU_DLY_LPPHY_US   300
 
#define ANTCNT   10 /* vanilla M_MAX_ANTCNT val */
 
#define EDCF_SHORT_S   0
 
#define EDCF_SFB_S   4
 
#define EDCF_LONG_S   8
 
#define EDCF_LFB_S   12
 
#define EDCF_SHORT_M   BITFIELD_MASK(4)
 
#define EDCF_SFB_M   BITFIELD_MASK(4)
 
#define EDCF_LONG_M   BITFIELD_MASK(4)
 
#define EDCF_LFB_M   BITFIELD_MASK(4)
 
#define RETRY_SHORT_DEF   7 /* Default Short retry Limit */
 
#define RETRY_SHORT_MAX   255 /* Maximum Short retry Limit */
 
#define RETRY_LONG_DEF   4 /* Default Long retry count */
 
#define RETRY_SHORT_FB   3 /* Short count for fb rate */
 
#define RETRY_LONG_FB   2 /* Long count for fb rate */
 
#define APHY_CWMIN   15
 
#define PHY_CWMAX   1023
 
#define EDCF_AIFSN_MIN   1
 
#define FRAGNUM_MASK   0xF
 
#define APHY_SLOT_TIME   9
 
#define BPHY_SLOT_TIME   20
 
#define WL_SPURAVOID_OFF   0
 
#define WL_SPURAVOID_ON1   1
 
#define WL_SPURAVOID_ON2   2
 
#define BRCMS_USE_COREFLAGS   0xffffffff
 
#define BRCMS_PLCP_AUTO   -1
 
#define BRCMS_PLCP_SHORT   0
 
#define BRCMS_PLCP_LONG   1
 
#define BRCMS_PROTECTION_AUTO   -1
 
#define BRCMS_PROTECTION_OFF   0
 
#define BRCMS_PROTECTION_ON   1
 
#define BRCMS_PROTECTION_MMHDR_ONLY   2
 
#define BRCMS_PROTECTION_CTS_ONLY   3
 
#define BRCMS_PROTECTION_CTL_OFF   0
 
#define BRCMS_PROTECTION_CTL_LOCAL   1
 
#define BRCMS_PROTECTION_CTL_OVERLAP   2
 
#define BRCMS_N_PROTECTION_OFF   0
 
#define BRCMS_N_PROTECTION_OPTIONAL   1
 
#define BRCMS_N_PROTECTION_20IN40   2
 
#define BRCMS_N_PROTECTION_MIXEDMODE   3
 
#define BRCMS_N_BW_20ALL   0
 
#define BRCMS_N_BW_40ALL   1
 
#define BRCMS_N_BW_20IN2G_40IN5G   2
 
#define BRCMS_N_SGI_20   0x01
 
#define BRCMS_N_SGI_40   0x02
 
#define NRATE_MCS_INUSE   0x00000080
 
#define NRATE_RATE_MASK   0x0000007f
 
#define NRATE_STF_MASK   0x0000ff00
 
#define NRATE_STF_SHIFT   8
 
#define NRATE_OVERRIDE_MCS_ONLY   0x40000000
 
#define NRATE_SGI_MASK   0x00800000 /* sgi mode */
 
#define NRATE_SGI_SHIFT   23 /* sgi mode */
 
#define NRATE_LDPC_CODING   0x00400000 /* adv coding in use */
 
#define NRATE_LDPC_SHIFT   22 /* ldpc shift */
 
#define NRATE_STF_SISO   0 /* stf mode SISO */
 
#define NRATE_STF_CDD   1 /* stf mode CDD */
 
#define NRATE_STF_STBC   2 /* stf mode STBC */
 
#define NRATE_STF_SDM   3 /* stf mode SDM */
 
#define MAX_DMA_SEGS   4
 
#define NTXD   256
 
#define NRXD   256
 
#define NRXBUFPOST   32
 
#define BRCMS_DATAHIWAT   50
 
#define RXBND   8
 
#define TXSBND   8
 
#define XMTFIFOTBL_STARTREV   17
 
#define PHYPLL_WAIT_US   100000
 
#define ANTCFG_NONE   0xFF
 

Functions

void brcms_b_mhf (struct brcms_hardware *wlc_hw, u8 idx, u16 mask, u16 val, int bands)
 
void brcms_b_mctrl (struct brcms_hardware *wlc_hw, u32 mask, u32 val)
 
void brcms_c_ucode_wake_override_set (struct brcms_hardware *wlc_hw, u32 override_bit)
 
void brcms_c_ucode_wake_override_clear (struct brcms_hardware *wlc_hw, u32 override_bit)
 
void brcms_b_write_template_ram (struct brcms_hardware *wlc_hw, int offset, int len, void *buf)
 
void brcms_b_bw_set (struct brcms_hardware *wlc_hw, u16 bw)
 
void brcms_b_core_phypll_reset (struct brcms_hardware *wlc_hw)
 
void brcms_b_phyclk_fgc (struct brcms_hardware *wlc_hw, bool clk)
 
void brcms_b_macphyclk_set (struct brcms_hardware *wlc_hw, bool clk)
 
void brcms_b_phy_reset (struct brcms_hardware *wlc_hw)
 
void brcms_b_corereset (struct brcms_hardware *wlc_hw, u32 flags)
 
void brcms_b_switch_macfreq (struct brcms_hardware *wlc_hw, u8 spurmode)
 
void brcms_b_txant_set (struct brcms_hardware *wlc_hw, u16 phytxant)
 
u16 brcms_b_get_txant (struct brcms_hardware *wlc_hw)
 
void brcms_b_antsel_type_set (struct brcms_hardware *wlc_hw, u8 antsel_type)
 
void brcms_c_intrson (struct brcms_c_info *wlc)
 
u32 brcms_c_intrsoff (struct brcms_c_info *wlc)
 
void brcms_c_intrsrestore (struct brcms_c_info *wlc, u32 macintmask)
 
void brcms_c_mute (struct brcms_c_info *wlc, bool mute_tx)
 
bool brcms_c_intrsupd (struct brcms_c_info *wlc)
 
bool brcms_c_isr (struct brcms_c_info *wlc, bool *wantdpc)
 
void brcms_c_suspend_mac_and_wait (struct brcms_c_info *wlc)
 
void brcms_c_enable_mac (struct brcms_c_info *wlc)
 
void brcms_b_band_stf_ss_set (struct brcms_hardware *wlc_hw, u8 stf_mode)
 
void brcms_b_core_phypll_ctl (struct brcms_hardware *wlc_hw, bool on)
 
u16 brcms_b_read_shm (struct brcms_hardware *wlc_hw, uint offset)
 
void brcms_b_write_shm (struct brcms_hardware *wlc_hw, uint offset, u16 v)
 
void brcms_b_copyto_objmem (struct brcms_hardware *wlc_hw, uint offset, const void *buf, int len, u32 sel)
 
void brcms_b_copyfrom_objmem (struct brcms_hardware *wlc_hw, uint offset, void *buf, int len, u32 sel)
 
void brcms_c_reset (struct brcms_c_info *wlc)
 
void brcms_c_init_scb (struct scb *scb)
 
void brcms_c_mac_promisc (struct brcms_c_info *wlc, uint filter_flags)
 
void brcms_b_set_chanspec (struct brcms_hardware *wlc_hw, u16 chanspec, bool mute_tx, struct txpwr_limits *txpwr)
 
void brcms_c_beacon_phytxctl_txant_upd (struct brcms_c_info *wlc, u32 bcn_rspec)
 
void brcms_c_protection_upd (struct brcms_c_info *wlc, uint idx, int val)
 
void brcms_c_wme_setparams (struct brcms_c_info *wlc, u16 aci, const struct ieee80211_tx_queue_params *params, bool suspend)
 
bool brcms_c_check_radio_disabled (struct brcms_c_info *wlc)
 
struct brcms_pubbrcms_c_pub (struct brcms_c_info *wlc)
 
uint brcms_c_detach (struct brcms_c_info *wlc)
 
int brcms_c_up (struct brcms_c_info *wlc)
 
uint brcms_c_down (struct brcms_c_info *wlc)
 
int brcms_c_set_gmode (struct brcms_c_info *wlc, u8 gmode, bool config)
 
int brcms_c_set_nmode (struct brcms_c_info *wlc)
 
int brcms_c_set_channel (struct brcms_c_info *wlc, u16 channel)
 
int brcms_c_set_rate_limit (struct brcms_c_info *wlc, u16 srl, u16 lrl)
 
void brcms_c_get_current_rateset (struct brcms_c_info *wlc, struct brcm_rateset *currs)
 
int brcms_c_set_rateset (struct brcms_c_info *wlc, struct brcm_rateset *rs)
 
int brcms_c_set_beacon_period (struct brcms_c_info *wlc, u16 period)
 
u16 brcms_c_get_phy_type (struct brcms_c_info *wlc, int phyidx)
 
void brcms_c_set_shortslot_override (struct brcms_c_info *wlc, s8 sslot_override)
 
int brcms_c_module_register (struct brcms_pub *pub, const char *name, struct brcms_info *hdl, int(*d_fn)(void *handle))
 
int brcms_c_module_unregister (struct brcms_pub *pub, const char *name, struct brcms_info *hdl)
 
void brcms_c_print_txstatus (struct tx_status *txs)
 
bool brcms_c_chipmatch (struct bcma_device *core)
 
u16 brcms_b_rate_shm_offset (struct brcms_hardware *wlc_hw, u8 rate)
 
void brcms_c_txq_enq (struct brcms_c_info *wlc, struct scb *scb, struct sk_buff *sdu, uint prec)
 
u16 brcms_c_compute_rtscts_dur (struct brcms_c_info *wlc, bool cts_only, u32 rts_rate, u32 frame_rate, u8 rts_preamble_type, u8 frame_preamble_type, uint frame_len, bool ba)
 
void brcms_c_sendpkt_mac80211 (struct brcms_c_info *wlc, struct sk_buff *sdu, struct ieee80211_hw *hw)
 
void brcms_c_send_q (struct brcms_c_info *wlc)
 
void brcms_c_txfifo (struct brcms_c_info *wlc, uint fifo, struct sk_buff *p, bool commit, s8 txpktpend)
 
u32 brcms_c_rspec_to_rts_rspec (struct brcms_c_info *wlc, u32 rspec, bool use_rspec, u16 mimo_ctlchbw)
 
void brcms_c_txfifo_complete (struct brcms_c_info *wlc, uint fifo, s8 txpktpend)
 
u16 brcms_c_calc_lsig_len (struct brcms_c_info *wlc, u32 ratespec, uint mac_len)
 
int brcms_c_get_header_len (void)
 
void brcms_c_update_beacon (struct brcms_c_info *wlc)
 
void brcms_c_update_probe_resp (struct brcms_c_info *wlc, bool suspend)
 
int brcms_c_prep_pdu (struct brcms_c_info *wlc, struct sk_buff *pdu, uint *fifop)
 
int brcms_b_xmtfifo_sz_get (struct brcms_hardware *wlc_hw, uint fifo, uint *blocks)
 
void brcms_c_set_addrmatch (struct brcms_c_info *wlc, int match_reg_offset, const u8 *addr)
 
void brcms_c_scan_start (struct brcms_c_info *wlc)
 
void brcms_c_scan_stop (struct brcms_c_info *wlc)
 
void brcms_c_associate_upd (struct brcms_c_info *wlc, bool state)
 
void brcms_c_inval_dma_pkts (struct brcms_hardware *hw, struct ieee80211_sta *sta, void(*dma_callback_fn))
 
int brcms_c_get_curband (struct brcms_c_info *wlc)
 
void brcms_c_wait_for_tx_completion (struct brcms_c_info *wlc, bool drop)
 
void brcms_c_set_beacon_listen_interval (struct brcms_c_info *wlc, u8 interval)
 
int brcms_c_set_tx_power (struct brcms_c_info *wlc, int txpwr)
 
int brcms_c_get_tx_power (struct brcms_c_info *wlc)
 
bool brcms_c_dpc (struct brcms_c_info *wlc, bool bounded)
 
void brcms_c_init (struct brcms_c_info *wlc, bool mute_tx)
 
struct brcms_c_infobrcms_c_attach (struct brcms_info *wl, struct bcma_device *core, uint unit, bool piomode, uint *perr)
 

Variables

struct edcf_acparam __packed
 
const u8 prio2fifo [NUMPRIO]
 
uint brcm_msg_level
 
const u8 wlc_prio2prec_map []
 

Macro Definition Documentation

#define _BRCMS_PREC_BE   4 /* BE - Best-effort */

Definition at line 137 of file main.c.

#define _BRCMS_PREC_BK   2 /* BK - Background */

Definition at line 136 of file main.c.

#define _BRCMS_PREC_CL   8 /* CL - Controlled Load */

Definition at line 139 of file main.c.

#define _BRCMS_PREC_EE   6 /* EE - Excellent-effort */

Definition at line 138 of file main.c.

#define _BRCMS_PREC_NC   14 /* NC - Network Control */

Definition at line 142 of file main.c.

#define _BRCMS_PREC_NONE   0 /* None = - */

Definition at line 135 of file main.c.

#define _BRCMS_PREC_VI   10 /* Vi - Video */

Definition at line 140 of file main.c.

#define _BRCMS_PREC_VO   12 /* Vo - Voice */

Definition at line 141 of file main.c.

#define ALLPRIO   -1

Definition at line 42 of file main.c.

#define ANTCFG_NONE   0xFF
#define ANTCNT   10 /* vanilla M_MAX_ANTCNT val */

Definition at line 150 of file main.c.

#define APHY_CWMIN   15

Definition at line 168 of file main.c.

#define APHY_PREAMBLE_TIME   16

Definition at line 87 of file main.c.

#define APHY_SERVICE_NBITS   16

Definition at line 90 of file main.c.

#define APHY_SIFS_TIME   16

Definition at line 89 of file main.c.

#define APHY_SIGNAL_TIME   4

Definition at line 88 of file main.c.

#define APHY_SLOT_TIME   9

Definition at line 175 of file main.c.

#define APHY_SYMBOL_TIME   4

Definition at line 86 of file main.c.

#define APHY_TAIL_NBITS   6

Definition at line 91 of file main.c.

#define BCN_TMPL_LEN   512

Definition at line 116 of file main.c.

#define BEACON_INTERVAL_DEFAULT   100

Definition at line 50 of file main.c.

#define BPHY_PLCP_SHORT_TIME   96

Definition at line 93 of file main.c.

#define BPHY_PLCP_TIME   192

Definition at line 112 of file main.c.

#define BPHY_SIFS_TIME   10

Definition at line 92 of file main.c.

#define BPHY_SLOT_TIME   20

Definition at line 176 of file main.c.

#define BRCMS_BSS_HT   0x0020 /* BSS is HT (MIMO) capable */

Definition at line 119 of file main.c.

#define BRCMS_DATAHIWAT   50

Definition at line 249 of file main.c.

#define BRCMS_HWRXOFF   38

Definition at line 122 of file main.c.

#define BRCMS_N_BW_20ALL   0

Definition at line 209 of file main.c.

#define BRCMS_N_BW_20IN2G_40IN5G   2

Definition at line 211 of file main.c.

#define BRCMS_N_BW_40ALL   1

Definition at line 210 of file main.c.

#define BRCMS_N_PROTECTION_20IN40   2

Definition at line 205 of file main.c.

#define BRCMS_N_PROTECTION_MIXEDMODE   3

Definition at line 206 of file main.c.

#define BRCMS_N_PROTECTION_OFF   0

Definition at line 203 of file main.c.

#define BRCMS_N_PROTECTION_OPTIONAL   1

Definition at line 204 of file main.c.

#define BRCMS_N_SGI_20   0x01

Definition at line 214 of file main.c.

#define BRCMS_N_SGI_40   0x02

Definition at line 215 of file main.c.

#define BRCMS_PLCP_AUTO   -1

Definition at line 186 of file main.c.

#define BRCMS_PLCP_LONG   1

Definition at line 188 of file main.c.

#define BRCMS_PLCP_SHORT   0

Definition at line 187 of file main.c.

#define BRCMS_PROTECTION_AUTO   -1

Definition at line 191 of file main.c.

#define BRCMS_PROTECTION_CTL_LOCAL   1

Definition at line 199 of file main.c.

#define BRCMS_PROTECTION_CTL_OFF   0

Definition at line 198 of file main.c.

#define BRCMS_PROTECTION_CTL_OVERLAP   2

Definition at line 200 of file main.c.

#define BRCMS_PROTECTION_CTS_ONLY   3

Definition at line 195 of file main.c.

#define BRCMS_PROTECTION_MMHDR_ONLY   2

Definition at line 194 of file main.c.

#define BRCMS_PROTECTION_OFF   0

Definition at line 192 of file main.c.

#define BRCMS_PROTECTION_ON   1

Definition at line 193 of file main.c.

#define BRCMS_TEMPSENSE_PERIOD   10 /* 10 second timeout */

Definition at line 127 of file main.c.

#define BRCMS_USE_COREFLAGS   0xffffffff

Definition at line 183 of file main.c.

#define DOT11_ACK_LEN   10

Definition at line 100 of file main.c.

#define DOT11_BA_BITMAP_LEN   128

Definition at line 106 of file main.c.

#define DOT11_BA_LEN   4

Definition at line 101 of file main.c.

#define DOT11_CTS_LEN   10

Definition at line 105 of file main.c.

#define DOT11_MAC_HDR_LEN   24

Definition at line 99 of file main.c.

#define DOT11_MAX_BEACON_PERIOD   0xFFFF

Definition at line 108 of file main.c.

#define DOT11_MAX_FRAG_LEN   2346

Definition at line 110 of file main.c.

#define DOT11_MAXNUMFRAGS   16

Definition at line 109 of file main.c.

#define DOT11_MIN_BEACON_PERIOD   1

Definition at line 107 of file main.c.

#define DOT11_MIN_FRAG_LEN   256

Definition at line 103 of file main.c.

#define DOT11_OFDM_SIGNAL_EXTENSION   6

Definition at line 102 of file main.c.

#define DOT11_RTS_LEN   16

Definition at line 104 of file main.c.

#define EDCF_AC_BE_ACI_STA   0x03

Definition at line 78 of file main.c.

#define EDCF_AC_BE_ECW_STA   0xA4

Definition at line 79 of file main.c.

#define EDCF_AC_BE_TXOP_STA   0x0000

Definition at line 69 of file main.c.

#define EDCF_AC_BK_ACI_STA   0x27

Definition at line 80 of file main.c.

#define EDCF_AC_BK_ECW_STA   0xA4

Definition at line 75 of file main.c.

#define EDCF_AC_BK_TXOP_STA   0x0000

Definition at line 70 of file main.c.

#define EDCF_AC_VI_ACI_STA   0x42

Definition at line 73 of file main.c.

#define EDCF_AC_VI_ECW_STA   0x43

Definition at line 74 of file main.c.

#define EDCF_AC_VI_TXOP_STA   0x005e

Definition at line 76 of file main.c.

#define EDCF_AC_VO_ACI_STA   0x62

Definition at line 71 of file main.c.

#define EDCF_AC_VO_ECW_STA   0x32

Definition at line 72 of file main.c.

#define EDCF_AC_VO_TXOP_AP   0x002f

Definition at line 81 of file main.c.

#define EDCF_AC_VO_TXOP_STA   0x002f

Definition at line 77 of file main.c.

#define EDCF_ACI_MASK   0x60

Definition at line 61 of file main.c.

#define EDCF_ACI_SHIFT   5

Definition at line 62 of file main.c.

#define EDCF_AIFSN_MASK   0x0f

Definition at line 65 of file main.c.

#define EDCF_AIFSN_MAX   15

Definition at line 66 of file main.c.

#define EDCF_AIFSN_MIN   1

Definition at line 171 of file main.c.

#define EDCF_ECW2CW (   exp)    ((1 << (exp)) - 1)

Definition at line 84 of file main.c.

#define EDCF_ECWMAX_MASK   0xf0

Definition at line 67 of file main.c.

#define EDCF_ECWMAX_SHIFT   4

Definition at line 64 of file main.c.

#define EDCF_ECWMIN_MASK   0x0f

Definition at line 63 of file main.c.

#define EDCF_LFB_M   BITFIELD_MASK(4)

Definition at line 160 of file main.c.

#define EDCF_LFB_S   12

Definition at line 156 of file main.c.

#define EDCF_LONG_M   BITFIELD_MASK(4)

Definition at line 159 of file main.c.

#define EDCF_LONG_S   8

Definition at line 155 of file main.c.

#define EDCF_SFB_M   BITFIELD_MASK(4)

Definition at line 158 of file main.c.

#define EDCF_SFB_S   4

Definition at line 154 of file main.c.

#define EDCF_SHORT_M   BITFIELD_MASK(4)

Definition at line 157 of file main.c.

#define EDCF_SHORT_S   0

Definition at line 153 of file main.c.

#define EDCF_TXOP2USEC (   txop)    ((txop) << 5)

Definition at line 83 of file main.c.

#define FRAGNUM_MASK   0xF

Definition at line 173 of file main.c.

#define MAX_DMA_SEGS   4

Definition at line 238 of file main.c.

#define NRATE_LDPC_CODING   0x00400000 /* adv coding in use */

Definition at line 230 of file main.c.

#define NRATE_LDPC_SHIFT   22 /* ldpc shift */

Definition at line 231 of file main.c.

#define NRATE_MCS_INUSE   0x00000080

Definition at line 219 of file main.c.

#define NRATE_OVERRIDE_MCS_ONLY   0x40000000

Definition at line 227 of file main.c.

#define NRATE_RATE_MASK   0x0000007f

Definition at line 221 of file main.c.

#define NRATE_SGI_MASK   0x00800000 /* sgi mode */

Definition at line 228 of file main.c.

#define NRATE_SGI_SHIFT   23 /* sgi mode */

Definition at line 229 of file main.c.

#define NRATE_STF_CDD   1 /* stf mode CDD */

Definition at line 234 of file main.c.

#define NRATE_STF_MASK   0x0000ff00

Definition at line 223 of file main.c.

#define NRATE_STF_SDM   3 /* stf mode SDM */

Definition at line 236 of file main.c.

#define NRATE_STF_SHIFT   8

Definition at line 225 of file main.c.

#define NRATE_STF_SISO   0 /* stf mode SISO */

Definition at line 233 of file main.c.

#define NRATE_STF_STBC   2 /* stf mode STBC */

Definition at line 235 of file main.c.

#define NRXBUFPOST   32

Definition at line 246 of file main.c.

#define NRXD   256

Definition at line 243 of file main.c.

#define NTXD   256

Definition at line 241 of file main.c.

#define PHY_CWMAX   1023

Definition at line 169 of file main.c.

#define PHYPLL_WAIT_US   100000

Definition at line 2798 of file main.c.

#define pr_fmt (   fmt)    KBUILD_MODNAME ": " fmt

Definition at line 17 of file main.c.

#define PREN_MM_EXT   12

Definition at line 96 of file main.c.

#define PREN_PREAMBLE   24

Definition at line 95 of file main.c.

#define PREN_PREAMBLE_EXT   4

Definition at line 97 of file main.c.

#define RETRY_LONG_DEF   4 /* Default Long retry count */

Definition at line 164 of file main.c.

#define RETRY_LONG_FB   2 /* Long count for fb rate */

Definition at line 166 of file main.c.

#define RETRY_SHORT_DEF   7 /* Default Short retry Limit */

Definition at line 162 of file main.c.

#define RETRY_SHORT_FB   3 /* Short count for fb rate */

Definition at line 165 of file main.c.

#define RETRY_SHORT_MAX   255 /* Maximum Short retry Limit */

Definition at line 163 of file main.c.

#define RFDISABLE_DEFAULT   10000000

Definition at line 125 of file main.c.

#define RIFS_11N_TIME   2

Definition at line 113 of file main.c.

#define RXBND   8

Definition at line 252 of file main.c.

#define SYNTHPU_DLY_APHY_US   3700

Definition at line 145 of file main.c.

#define SYNTHPU_DLY_BPHY_US   1050

Definition at line 146 of file main.c.

#define SYNTHPU_DLY_LPPHY_US   300

Definition at line 148 of file main.c.

#define SYNTHPU_DLY_NPHY_US   2048

Definition at line 147 of file main.c.

#define TIMER_INTERVAL_RADIOCHK   800

Definition at line 47 of file main.c.

#define TIMER_INTERVAL_WATCHDOG   1000

Definition at line 45 of file main.c.

#define TXSBND   8

Definition at line 254 of file main.c.

#define WL_11N_2x2   1

Definition at line 57 of file main.c.

#define WL_11N_3x3   3

Definition at line 58 of file main.c.

#define WL_11N_4x4   4

Definition at line 59 of file main.c.

#define WL_SPURAVOID_OFF   0

Definition at line 178 of file main.c.

#define WL_SPURAVOID_ON1   1

Definition at line 179 of file main.c.

#define WL_SPURAVOID_ON2   2

Definition at line 180 of file main.c.

#define XMTFIFOTBL_STARTREV   17

Definition at line 272 of file main.c.

Function Documentation

void brcms_b_antsel_type_set ( struct brcms_hardware wlc_hw,
u8  antsel_type 
)

Definition at line 2299 of file main.c.

void brcms_b_band_stf_ss_set ( struct brcms_hardware wlc_hw,
u8  stf_mode 
)

Definition at line 2729 of file main.c.

void brcms_b_bw_set ( struct brcms_hardware wlc_hw,
u16  bw 
)

Definition at line 1578 of file main.c.

void brcms_b_copyfrom_objmem ( struct brcms_hardware wlc_hw,
uint  offset,
void buf,
int  len,
u32  sel 
)

Definition at line 2975 of file main.c.

void brcms_b_copyto_objmem ( struct brcms_hardware wlc_hw,
uint  offset,
const void buf,
int  len,
u32  sel 
)

Definition at line 2952 of file main.c.

void brcms_b_core_phypll_ctl ( struct brcms_hardware wlc_hw,
bool  on 
)

Definition at line 2800 of file main.c.

void brcms_b_core_phypll_reset ( struct brcms_hardware wlc_hw)

Definition at line 1737 of file main.c.

void brcms_b_corereset ( struct brcms_hardware wlc_hw,
u32  flags 
)

Definition at line 2000 of file main.c.

u16 brcms_b_get_txant ( struct brcms_hardware wlc_hw)

Definition at line 2294 of file main.c.

void brcms_b_macphyclk_set ( struct brcms_hardware wlc_hw,
bool  clk 
)

Definition at line 1771 of file main.c.

void brcms_b_mctrl ( struct brcms_hardware wlc_hw,
u32  mask,
u32  val 
)

Definition at line 1411 of file main.c.

void brcms_b_mhf ( struct brcms_hardware wlc_hw,
u8  idx,
u16  mask,
u16  val,
int  bands 
)

Definition at line 1323 of file main.c.

void brcms_b_phy_reset ( struct brcms_hardware wlc_hw)

Definition at line 1779 of file main.c.

void brcms_b_phyclk_fgc ( struct brcms_hardware wlc_hw,
bool  clk 
)

Definition at line 1758 of file main.c.

u16 brcms_b_rate_shm_offset ( struct brcms_hardware wlc_hw,
u8  rate 
)

Definition at line 6013 of file main.c.

u16 brcms_b_read_shm ( struct brcms_hardware wlc_hw,
uint  offset 
)

Definition at line 2931 of file main.c.

void brcms_b_set_chanspec ( struct brcms_hardware wlc_hw,
u16  chanspec,
bool  mute_tx,
struct txpwr_limits txpwr 
)

Definition at line 3879 of file main.c.

void brcms_b_switch_macfreq ( struct brcms_hardware wlc_hw,
u8  spurmode 
)

Definition at line 2141 of file main.c.

void brcms_b_txant_set ( struct brcms_hardware wlc_hw,
u16  phytxant 
)

Definition at line 2282 of file main.c.

void brcms_b_write_shm ( struct brcms_hardware wlc_hw,
uint  offset,
u16  v 
)

Definition at line 2940 of file main.c.

void brcms_b_write_template_ram ( struct brcms_hardware wlc_hw,
int  offset,
int  len,
void buf 
)

Definition at line 1522 of file main.c.

int brcms_b_xmtfifo_sz_get ( struct brcms_hardware wlc_hw,
uint  fifo,
uint blocks 
)

Definition at line 7915 of file main.c.

void brcms_c_associate_upd ( struct brcms_c_info wlc,
bool  state 
)

Definition at line 7948 of file main.c.

struct brcms_c_info* brcms_c_attach ( struct brcms_info wl,
struct bcma_device core,
uint  unit,
bool  piomode,
uint perr 
)
read

Definition at line 8330 of file main.c.

void brcms_c_beacon_phytxctl_txant_upd ( struct brcms_c_info wlc,
u32  bcn_rspec 
)

Definition at line 3998 of file main.c.

u16 brcms_c_calc_lsig_len ( struct brcms_c_info wlc,
u32  ratespec,
uint  mac_len 
)

Definition at line 7647 of file main.c.

bool brcms_c_check_radio_disabled ( struct brcms_c_info wlc)

Definition at line 4213 of file main.c.

bool brcms_c_chipmatch ( struct bcma_device core)

Definition at line 5822 of file main.c.

u16 brcms_c_compute_rtscts_dur ( struct brcms_c_info wlc,
bool  cts_only,
u32  rts_rate,
u32  frame_rate,
u8  rts_preamble_type,
u8  frame_preamble_type,
uint  frame_len,
bool  ba 
)

Definition at line 6540 of file main.c.

uint brcms_c_detach ( struct brcms_c_info wlc)

Definition at line 4987 of file main.c.

uint brcms_c_down ( struct brcms_c_info wlc)

Definition at line 5311 of file main.c.

bool brcms_c_dpc ( struct brcms_c_info wlc,
bool  bounded 
)

Definition at line 8138 of file main.c.

void brcms_c_enable_mac ( struct brcms_c_info wlc)

Definition at line 2693 of file main.c.

int brcms_c_get_curband ( struct brcms_c_info wlc)

Definition at line 7972 of file main.c.

void brcms_c_get_current_rateset ( struct brcms_c_info wlc,
struct brcm_rateset currs 
)

Definition at line 5612 of file main.c.

int brcms_c_get_header_len ( void  )

Definition at line 7801 of file main.c.

u16 brcms_c_get_phy_type ( struct brcms_c_info wlc,
int  phyidx 
)

Definition at line 5669 of file main.c.

int brcms_c_get_tx_power ( struct brcms_c_info wlc)

Definition at line 8012 of file main.c.

void brcms_c_init ( struct brcms_c_info wlc,
bool  mute_tx 
)

Definition at line 8226 of file main.c.

void brcms_c_init_scb ( struct scb scb)

Definition at line 3159 of file main.c.

u32 brcms_c_intrsoff ( struct brcms_c_info wlc)

Definition at line 2380 of file main.c.

void brcms_c_intrson ( struct brcms_c_info wlc)

Definition at line 2373 of file main.c.

void brcms_c_intrsrestore ( struct brcms_c_info wlc,
u32  macintmask 
)

Definition at line 2399 of file main.c.

bool brcms_c_intrsupd ( struct brcms_c_info wlc)

Definition at line 2571 of file main.c.

void brcms_c_inval_dma_pkts ( struct brcms_hardware hw,
struct ieee80211_sta sta,
void dma_callback_fn 
)

Definition at line 7959 of file main.c.

bool brcms_c_isr ( struct brcms_c_info wlc,
bool wantdpc 
)

Definition at line 2594 of file main.c.

void brcms_c_mac_promisc ( struct brcms_c_info wlc,
uint  filter_flags 
)

Definition at line 3575 of file main.c.

int brcms_c_module_register ( struct brcms_pub pub,
const char name,
struct brcms_info hdl,
int(*)(void *handle d_fn 
)

Definition at line 5705 of file main.c.

int brcms_c_module_unregister ( struct brcms_pub pub,
const char name,
struct brcms_info hdl 
)

Definition at line 5727 of file main.c.

void brcms_c_mute ( struct brcms_c_info wlc,
bool  mute_tx 
)

Definition at line 2502 of file main.c.

int brcms_c_prep_pdu ( struct brcms_c_info wlc,
struct sk_buff pdu,
uint fifop 
)

Definition at line 7887 of file main.c.

void brcms_c_print_txstatus ( struct tx_status txs)

Definition at line 5748 of file main.c.

void brcms_c_protection_upd ( struct brcms_c_info wlc,
uint  idx,
int  val 
)

Definition at line 4019 of file main.c.

struct brcms_pub* brcms_c_pub ( struct brcms_c_info wlc)
read

Definition at line 4416 of file main.c.

void brcms_c_reset ( struct brcms_c_info wlc)

Definition at line 3145 of file main.c.

u32 brcms_c_rspec_to_rts_rspec ( struct brcms_c_info wlc,
u32  rspec,
bool  use_rspec,
u16  mimo_ctlchbw 
)

Definition at line 7380 of file main.c.

void brcms_c_scan_start ( struct brcms_c_info wlc)

Definition at line 7938 of file main.c.

void brcms_c_scan_stop ( struct brcms_c_info wlc)

Definition at line 7943 of file main.c.

void brcms_c_send_q ( struct brcms_c_info wlc)

Definition at line 7297 of file main.c.

void brcms_c_sendpkt_mac80211 ( struct brcms_c_info wlc,
struct sk_buff sdu,
struct ieee80211_hw hw 
)

Definition at line 7276 of file main.c.

void brcms_c_set_addrmatch ( struct brcms_c_info wlc,
int  match_reg_offset,
const u8 addr 
)

Definition at line 7927 of file main.c.

void brcms_c_set_beacon_listen_interval ( struct brcms_c_info wlc,
u8  interval 
)

Definition at line 7996 of file main.c.

int brcms_c_set_beacon_period ( struct brcms_c_info wlc,
u16  period 
)

Definition at line 5659 of file main.c.

int brcms_c_set_channel ( struct brcms_c_info wlc,
u16  channel 
)

Definition at line 5558 of file main.c.

int brcms_c_set_gmode ( struct brcms_c_info wlc,
u8  gmode,
bool  config 
)

Definition at line 5373 of file main.c.

int brcms_c_set_nmode ( struct brcms_c_info wlc)

Definition at line 5474 of file main.c.

int brcms_c_set_rate_limit ( struct brcms_c_info wlc,
u16  srl,
u16  lrl 
)

Definition at line 5588 of file main.c.

int brcms_c_set_rateset ( struct brcms_c_info wlc,
struct brcm_rateset rs 
)

Definition at line 5627 of file main.c.

void brcms_c_set_shortslot_override ( struct brcms_c_info wlc,
s8  sslot_override 
)

Definition at line 5674 of file main.c.

int brcms_c_set_tx_power ( struct brcms_c_info wlc,
int  txpwr 
)

Definition at line 8003 of file main.c.

void brcms_c_suspend_mac_and_wait ( struct brcms_c_info wlc)

Definition at line 2624 of file main.c.

void brcms_c_txfifo ( struct brcms_c_info wlc,
uint  fifo,
struct sk_buff p,
bool  commit,
s8  txpktpend 
)

Definition at line 7342 of file main.c.

void brcms_c_txfifo_complete ( struct brcms_c_info wlc,
uint  fifo,
s8  txpktpend 
)

Definition at line 7427 of file main.c.

void brcms_c_txq_enq ( struct brcms_c_info wlc,
struct scb scb,
struct sk_buff sdu,
uint  prec 
)

Definition at line 6098 of file main.c.

void brcms_c_ucode_wake_override_clear ( struct brcms_hardware wlc_hw,
u32  override_bit 
)

Definition at line 1446 of file main.c.

void brcms_c_ucode_wake_override_set ( struct brcms_hardware wlc_hw,
u32  override_bit 
)

Definition at line 1432 of file main.c.

int brcms_c_up ( struct brcms_c_info wlc)

Definition at line 5134 of file main.c.

void brcms_c_update_beacon ( struct brcms_c_info wlc)

Definition at line 7809 of file main.c.

void brcms_c_update_probe_resp ( struct brcms_c_info wlc,
bool  suspend 
)

Definition at line 7877 of file main.c.

void brcms_c_wait_for_tx_completion ( struct brcms_c_info wlc,
bool  drop 
)

Definition at line 7977 of file main.c.

void brcms_c_wme_setparams ( struct brcms_c_info wlc,
u16  aci,
const struct ieee80211_tx_queue_params params,
bool  suspend 
)

Definition at line 4083 of file main.c.

Variable Documentation

uint brcm_msg_level
Initial value:
=
0

Definition at line 298 of file main.c.

const u8 prio2fifo[NUMPRIO]
Initial value:

Definition at line 286 of file main.c.

const u8 wlc_prio2prec_map[]