/* * Copyright (c) 2010 Broadcom Corporation * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* Double check that unsupported cores are not enabled */ #if CONF_MSK(D11CONF, 0x4f) || CONF_GE(D11CONF, MAXCOREREV) #error"Configuration for D11CONF includes unsupported versions." #endif/* Bad versions */
/* values for shortslot_override */ #define BRCMS_SHORTSLOT_AUTO -1 /* Driver will manage Shortslot setting */ #define BRCMS_SHORTSLOT_OFF 0 /* Turn off short slot */ #define BRCMS_SHORTSLOT_ON 1 /* Turn on short slot */
/* Interrupt bit error summary. Don't include I_RU: we refill DMA at other * times; and if we run out, constant I_RU interrupts may cause lockup. We * will still get error counts from rx0ovfl.
*/ #define I_ERRORS (I_PC | I_PD | I_DE | I_RO | I_XU) /* default software intmasks */ #define DEF_RXINTMASK (I_RI) /* enable rx int on rxfifo only */ #define DEF_MACINTMASK (MI_TXSTOP | MI_TBTT | MI_ATIMWINEND | MI_PMQ | \
MI_PHYTXERR | MI_DMAINT | MI_TFS | MI_BG_NOISE | \
MI_CCA | MI_TO | MI_GP0 | MI_RFDISABLE | MI_PWRUP)
/* pll is shared on old chips */ #define BRCMS_PLLREQ_SHARED 0x1 /* hold pll for radio monitor register checking */ #define BRCMS_PLLREQ_RADIO_MON 0x2 /* hold/release pll for some short operation */ #define BRCMS_PLLREQ_FLIP 0x4
/* * 802.11 protection information * * _g: use g spec protection, driver internal. * g_override: override for use of g spec protection. * gmode_user: user config gmode, operating band->gmode is different. * overlap: Overlap BSS/IBSS protection for both 11g and 11n. * nmode_user: user config nmode, operating pub->nmode is different. * n_cfg: use OFDM protection on MIMO frames. * n_cfg_override: override for use of N protection. * nongf: non-GF present protection. * nongf_override: override for use of GF protection. * n_pam_override: override for preamble: MM or GF. * n_obss: indicated OBSS Non-HT STA present.
*/ struct brcms_protection { bool _g;
s8 g_override;
u8 gmode_user;
s8 overlap;
s8 nmode_user;
s8 n_cfg;
s8 n_cfg_override; bool nongf;
s8 nongf_override;
s8 n_pam_override; bool n_obss;
};
/* * anything affecting the single/dual streams/antenna operation * * hw_txchain: HW txchain bitmap cfg. * txchain: txchain bitmap being used. * txstreams: number of txchains being used. * hw_rxchain: HW rxchain bitmap cfg. * rxchain: rxchain bitmap being used. * rxstreams: number of rxchains being used. * ant_rx_ovr: rx antenna override. * txant: userTx antenna setting. * phytxant: phyTx antenna setting in txheader. * ss_opmode: singlestream Operational mode, 0:siso; 1:cdd. * ss_algosel_auto: if true, use wlc->stf->ss_algo_channel; * else use wlc->band->stf->ss_mode_band. * ss_algo_channel: ss based on per-channel algo: 0: SISO, 1: CDD 2: STBC. * rxchain_restore_delay: delay time to restore default rxchain. * ldpc: AUTO/ON/OFF ldpc cap supported. * txcore[MAX_STREAMS_SUPPORTED + 1]: bitmap of selected core for each Nsts. * spatial_policy:
*/ struct brcms_stf {
u8 hw_txchain;
u8 txchain;
u8 txstreams;
u8 hw_rxchain;
u8 rxchain;
u8 rxstreams;
u8 ant_rx_ovr;
s8 txant;
u16 phytxant;
u8 ss_opmode; bool ss_algosel_auto;
u16 ss_algo_channel;
u8 rxchain_restore_delay;
s8 ldpc;
u8 txcore[MAX_STREAMS_SUPPORTED + 1];
s8 spatial_policy;
};
/* * band state (phy+ana+radio)
*/ struct brcms_band { int bandtype; /* BRCM_BAND_2G, BRCM_BAND_5G */
uint bandunit; /* bandstate[] index */
u16 phytype; /* phytype */
u16 phyrev;
u16 radioid;
u16 radiorev; struct brcms_phy_pub *pi; /* pointer to phy specific information */ bool abgphy_encore;
u8 gmode; /* currently active gmode */
struct scb *hwrs_scb; /* permanent scb for hw rateset */
/* band-specific copy of default_bss.rateset */ struct brcms_c_rateset defrateset;
u8 band_stf_ss_mode; /* Configured STF type, 0:siso; 1:cdd */
s8 band_stf_stbc_tx; /* STBC TX 0:off; 1:force on; -1:auto */ /* rates supported by chip (phy-specific) */ struct brcms_c_rateset hw_rateset;
u8 basic_rate[BRCM_MAXRATE + 1]; /* basic rates indexed by rate */ bool mimo_cap_40; /* 40 MHz cap enabled on this band */
s8 antgain; /* antenna gain from srom */
u16 CWmin; /* minimum size of contention window, in unit of aSlotTime */
u16 CWmax; /* maximum size of contention window, in unit of aSlotTime */ struct ieee80211_supported_band band;
};
/* module control blocks */ struct modulecb { /* module name : NULL indicates empty array member */ char name[32]; /* handle passed when handler 'doiovar' is called */ struct brcms_info *hdl;
int (*down_fn)(void *handle); /* down handler. Note: the int returned * by the down function is a count of the * number of timers that could not be * freed.
*/
/* version info */
u16 vendorid; /* PCI vendor id */
u16 deviceid; /* PCI device id */
uint corerev; /* core revision */
u8 sromrev; /* version # of the srom */
u16 boardrev; /* version # of particular board */
u32 boardflags; /* Board specific flags from srom */
u32 boardflags2; /* More board flags if sromrev >= 4 */
u32 machwcap; /* MAC capabilities */
u32 machwcap_backup; /* backup of machwcap */
struct si_pub *sih; /* SI handle (cookie for siutils calls) */ struct bcma_device *d11core; /* pointer to 802.11 core */ struct phy_shim_info *physhim; /* phy shim layer handler */ struct shared_phy *phy_sh; /* pointer to shared phy state */ struct brcms_hw_band *band;/* pointer to active per-band state */ /* band state per phy/radio */ struct brcms_hw_band *bandstate[MAXBANDS];
u16 bmac_phytxant; /* cache of high phytxant state */ bool shortslot; /* currently using 11g ShortSlot timing */
u16 SRL; /* 802.11 dot11ShortRetryLimit */
u16 LRL; /* 802.11 dot11LongRetryLimit */
u16 SFBL; /* Short Frame Rate Fallback Limit */
u16 LFBL; /* Long Frame Rate Fallback Limit */
uint *txavail[NFIFO]; /* # tx descriptors available */ const u16 *xmtfifo_sz; /* fifo size in 256B for each xmt fifo */
u32 pllreq; /* pll requests to keep PLL on */
u8 suspended_fifos; /* Which TX fifo to remain awake for */
u32 maccontrol; /* Cached value of maccontrol */
uint mac_suspend_depth; /* current depth of mac_suspend levels */
u32 wake_override; /* bit flags to force MAC to WAKE mode */
u32 mute_override; /* Prevent ucode from sending beacons */
u8 etheraddr[ETH_ALEN]; /* currently configured ethernet address */ bool noreset; /* true= do not reset hw, used by WLC_OUT */ bool forcefastclk; /* true if h/w is forcing to use fast clk */ bool clk; /* core is out of reset and has clock */ bool sbclk; /* sb has clock */ bool phyclk; /* phy is out of reset and has clock */
bool ucode_loaded; /* true after ucode downloaded */
u8 hw_stf_ss_opmode; /* STF single stream operation mode */
u8 antsel_type; /* Type of boardlevel mimo antenna switch-logic * 0 = N/A, 1 = 2x4 board, 2 = 2x3 CB2 board
*/
u32 antsel_avail; /* * put struct antsel_info here if more info is * needed
*/
};
/* * Principal common driver data structure. * * pub: pointer to driver public state. * wl: pointer to specific private state. * hw: HW related state. * clkreq_override: setting for clkreq for PCIE : Auto, 0, 1. * fastpwrup_dly: time in us needed to bring up d11 fast clock. * macintstatus: bit channel between isr and dpc. * macintmask: sw runtime master macintmask value. * defmacintmask: default "on" macintmask value. * clk: core is out of reset and has clock. * core: pointer to active io core. * band: pointer to active per-band state. * corestate: per-core state (one per hw core). * bandstate: per-band state (one per phy/radio). * qvalid: DirFrmQValid and BcMcFrmQValid. * ampdu: ampdu module handler. * asi: antsel module handler. * cmi: channel manager module handler. * vendorid: PCI vendor id. * deviceid: PCI device id. * ucode_rev: microcode revision. * machwcap: MAC capabilities, BMAC shadow. * perm_etheraddr: original sprom local ethernet address. * bandlocked: disable auto multi-band switching. * bandinit_pending: track band init in auto band. * radio_monitor: radio timer is running. * going_down: down path intermediate variable. * wdtimer: timer for watchdog routine. * radio_timer: timer for hw radio button monitor routine. * monitor: monitor (MPDU sniffing) mode. * bcnmisc_monitor: bcns promisc mode override for monitor. * _rifs: enable per-packet rifs. * bcn_li_bcn: beacon listen interval in # beacons. * bcn_li_dtim: beacon listen interval in # dtims. * WDarmed: watchdog timer is armed. * WDlast: last time wlc_watchdog() was called. * edcf_txop[IEEE80211_NUM_ACS]: current txop for each ac. * wme_retries: per-AC retry limits. * bsscfg: set of BSS configurations, idx 0 is default and always valid. * cfg: the primary bsscfg (can be AP or STA). * modulecb: * mimoft: SIGN or 11N. * cck_40txbw: 11N, cck tx b/w override when in 40MHZ mode. * ofdm_40txbw: 11N, ofdm tx b/w override when in 40MHZ mode. * mimo_40txbw: 11N, mimo tx b/w override when in 40MHZ mode. * default_bss: configured BSS parameters. * mc_fid_counter: BC/MC FIFO frame ID counter. * country_default: saved country for leaving 802.11d auto-country mode. * autocountry_default: initial country for 802.11d auto-country mode. * prb_resp_timeout: do not send prb resp if request older * than this, 0 = disable. * home_chanspec: shared home chanspec. * chanspec: target operational channel. * usr_fragthresh: user configured fragmentation threshold. * fragthresh[NFIFO]: per-fifo fragmentation thresholds. * RTSThresh: 802.11 dot11RTSThreshold. * SRL: 802.11 dot11ShortRetryLimit. * LRL: 802.11 dot11LongRetryLimit. * SFBL: Short Frame Rate Fallback Limit. * LFBL: Long Frame Rate Fallback Limit. * shortslot: currently using 11g ShortSlot timing. * shortslot_override: 11g ShortSlot override. * include_legacy_erp: include Legacy ERP info elt ID 47 as well as g ID 42. * PLCPHdr_override: 802.11b Preamble Type override. * stf: * bcn_rspec: save bcn ratespec purpose. * tempsense_lasttime; * tx_duty_cycle_ofdm: maximum allowed duty cycle for OFDM. * tx_duty_cycle_cck: maximum allowed duty cycle for CCK. * wiphy: * pri_scb: primary Station Control Block
*/ struct brcms_c_info { struct brcms_pub *pub; struct brcms_info *wl; struct brcms_hardware *hw;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.