Path: blob/main/sys/contrib/dev/broadcom/brcm80211/brcmsmac/main.h
178665 views
/*1* Copyright (c) 2010 Broadcom Corporation2*3* Permission to use, copy, modify, and/or distribute this software for any4* purpose with or without fee is hereby granted, provided that the above5* copyright notice and this permission notice appear in all copies.6*7* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES8* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF9* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY10* SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES11* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION12* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN13* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.14*/1516#ifndef _BRCM_MAIN_H_17#define _BRCM_MAIN_H_1819#include <linux/etherdevice.h>2021#include <brcmu_utils.h>22#include "types.h"23#include "d11.h"24#include "scb.h"2526#define INVCHANNEL 255 /* invalid channel */2728/* max # brcms_c_module_register() calls */29#define BRCMS_MAXMODULES 223031#define SEQNUM_SHIFT 432#define SEQNUM_MAX 0x10003334#define NTXRATE 64 /* # tx MPDUs rate is reported for */3536/* Maximum wait time for a MAC suspend */37/* uS: 83mS is max packet time (64KB ampdu @ 6Mbps) */38#define BRCMS_MAX_MAC_SUSPEND 830003940/* responses for probe requests older that this are tossed, zero to disable */41#define BRCMS_PRB_RESP_TIMEOUT 0 /* Disable probe response timeout */4243/* transmit buffer max headroom for protocol headers */44#define TXOFF (D11_TXH_LEN + D11_PHY_HDR_LEN)4546/* Macros for doing definition and get/set of bitfields47* Usage example, e.g. a three-bit field (bits 4-6):48* #define <NAME>_M BITFIELD_MASK(3)49* #define <NAME>_S 450* ...51* regval = R_REG(osh, ®s->regfoo);52* field = GFIELD(regval, <NAME>);53* regval = SFIELD(regval, <NAME>, 1);54* W_REG(osh, ®s->regfoo, regval);55*/56#define BITFIELD_MASK(width) \57(((unsigned)1 << (width)) - 1)58#define GFIELD(val, field) \59(((val) >> field ## _S) & field ## _M)60#define SFIELD(val, field, bits) \61(((val) & (~(field ## _M << field ## _S))) | \62((unsigned)(bits) << field ## _S))6364#define SW_TIMER_MAC_STAT_UPD 30 /* periodic MAC stats update */6566/* max # supported core revisions (0 .. MAXCOREREV - 1) */67#define MAXCOREREV 286869/* Double check that unsupported cores are not enabled */70#if CONF_MSK(D11CONF, 0x4f) || CONF_GE(D11CONF, MAXCOREREV)71#error "Configuration for D11CONF includes unsupported versions."72#endif /* Bad versions */7374/* values for shortslot_override */75#define BRCMS_SHORTSLOT_AUTO -1 /* Driver will manage Shortslot setting */76#define BRCMS_SHORTSLOT_OFF 0 /* Turn off short slot */77#define BRCMS_SHORTSLOT_ON 1 /* Turn on short slot */7879/* value for short/long and mixmode/greenfield preamble */80#define BRCMS_LONG_PREAMBLE (0)81#define BRCMS_SHORT_PREAMBLE (1 << 0)82#define BRCMS_GF_PREAMBLE (1 << 1)83#define BRCMS_MM_PREAMBLE (1 << 2)84#define BRCMS_IS_MIMO_PREAMBLE(_pre) (((_pre) == BRCMS_GF_PREAMBLE) || \85((_pre) == BRCMS_MM_PREAMBLE))8687/* TxFrameID */88/* seq and frag bits: SEQNUM_SHIFT, FRAGNUM_MASK (802.11.h) */89/* rate epoch bits: TXFID_RATE_SHIFT, TXFID_RATE_MASK ((wlc_rate.c) */90#define TXFID_QUEUE_MASK 0x0007 /* Bits 0-2 */91#define TXFID_SEQ_MASK 0x7FE0 /* Bits 5-15 */92#define TXFID_SEQ_SHIFT 5 /* Number of bit shifts */93#define TXFID_RATE_PROBE_MASK 0x8000 /* Bit 15 for rate probe */94#define TXFID_RATE_MASK 0x0018 /* Mask for bits 3 and 4 */95#define TXFID_RATE_SHIFT 3 /* Shift 3 bits for rate mask */9697/* promote boardrev */98#define BOARDREV_PROMOTABLE 0xFF /* from */99#define BOARDREV_PROMOTED 1 /* to */100101#define DATA_BLOCK_TX_SUPR (1 << 4)102103/* Ucode MCTL_WAKE override bits */104#define BRCMS_WAKE_OVERRIDE_CLKCTL 0x01105#define BRCMS_WAKE_OVERRIDE_PHYREG 0x02106#define BRCMS_WAKE_OVERRIDE_MACSUSPEND 0x04107#define BRCMS_WAKE_OVERRIDE_TXFIFO 0x08108#define BRCMS_WAKE_OVERRIDE_FORCEFAST 0x10109110/* stuff pulled in from wlc.c */111112/* Interrupt bit error summary. Don't include I_RU: we refill DMA at other113* times; and if we run out, constant I_RU interrupts may cause lockup. We114* will still get error counts from rx0ovfl.115*/116#define I_ERRORS (I_PC | I_PD | I_DE | I_RO | I_XU)117/* default software intmasks */118#define DEF_RXINTMASK (I_RI) /* enable rx int on rxfifo only */119#define DEF_MACINTMASK (MI_TXSTOP | MI_TBTT | MI_ATIMWINEND | MI_PMQ | \120MI_PHYTXERR | MI_DMAINT | MI_TFS | MI_BG_NOISE | \121MI_CCA | MI_TO | MI_GP0 | MI_RFDISABLE | MI_PWRUP)122123#define MAXTXPKTS 6 /* max # pkts pending */124125/* frameburst */126#define MAXTXFRAMEBURST 8 /* vanilla xpress mode: max frames/burst */127#define MAXFRAMEBURST_TXOP 10000 /* Frameburst TXOP in usec */128129#define NFIFO 6 /* # tx/rx fifopairs */130131/* PLL requests */132133/* pll is shared on old chips */134#define BRCMS_PLLREQ_SHARED 0x1135/* hold pll for radio monitor register checking */136#define BRCMS_PLLREQ_RADIO_MON 0x2137/* hold/release pll for some short operation */138#define BRCMS_PLLREQ_FLIP 0x4139140#define CHANNEL_BANDUNIT(wlc, ch) \141(((ch) <= CH_MAX_2G_CHANNEL) ? BAND_2G_INDEX : BAND_5G_INDEX)142143#define OTHERBANDUNIT(wlc) \144((uint)((wlc)->band->bandunit ? BAND_2G_INDEX : BAND_5G_INDEX))145146/*147* 802.11 protection information148*149* _g: use g spec protection, driver internal.150* g_override: override for use of g spec protection.151* gmode_user: user config gmode, operating band->gmode is different.152* overlap: Overlap BSS/IBSS protection for both 11g and 11n.153* nmode_user: user config nmode, operating pub->nmode is different.154* n_cfg: use OFDM protection on MIMO frames.155* n_cfg_override: override for use of N protection.156* nongf: non-GF present protection.157* nongf_override: override for use of GF protection.158* n_pam_override: override for preamble: MM or GF.159* n_obss: indicated OBSS Non-HT STA present.160*/161struct brcms_protection {162bool _g;163s8 g_override;164u8 gmode_user;165s8 overlap;166s8 nmode_user;167s8 n_cfg;168s8 n_cfg_override;169bool nongf;170s8 nongf_override;171s8 n_pam_override;172bool n_obss;173};174175/*176* anything affecting the single/dual streams/antenna operation177*178* hw_txchain: HW txchain bitmap cfg.179* txchain: txchain bitmap being used.180* txstreams: number of txchains being used.181* hw_rxchain: HW rxchain bitmap cfg.182* rxchain: rxchain bitmap being used.183* rxstreams: number of rxchains being used.184* ant_rx_ovr: rx antenna override.185* txant: userTx antenna setting.186* phytxant: phyTx antenna setting in txheader.187* ss_opmode: singlestream Operational mode, 0:siso; 1:cdd.188* ss_algosel_auto: if true, use wlc->stf->ss_algo_channel;189* else use wlc->band->stf->ss_mode_band.190* ss_algo_channel: ss based on per-channel algo: 0: SISO, 1: CDD 2: STBC.191* rxchain_restore_delay: delay time to restore default rxchain.192* ldpc: AUTO/ON/OFF ldpc cap supported.193* txcore[MAX_STREAMS_SUPPORTED + 1]: bitmap of selected core for each Nsts.194* spatial_policy:195*/196struct brcms_stf {197u8 hw_txchain;198u8 txchain;199u8 txstreams;200u8 hw_rxchain;201u8 rxchain;202u8 rxstreams;203u8 ant_rx_ovr;204s8 txant;205u16 phytxant;206u8 ss_opmode;207bool ss_algosel_auto;208u16 ss_algo_channel;209u8 rxchain_restore_delay;210s8 ldpc;211u8 txcore[MAX_STREAMS_SUPPORTED + 1];212s8 spatial_policy;213};214215#define BRCMS_STF_SS_STBC_TX(wlc, scb) \216(((wlc)->stf->txstreams > 1) && (((wlc)->band->band_stf_stbc_tx == ON) \217|| (((scb)->flags & SCB_STBCCAP) && \218(wlc)->band->band_stf_stbc_tx == AUTO && \219isset(&((wlc)->stf->ss_algo_channel), PHY_TXC1_MODE_STBC))))220221#define BRCMS_STBC_CAP_PHY(wlc) (BRCMS_ISNPHY(wlc->band) && \222NREV_GE(wlc->band->phyrev, 3))223224#define BRCMS_SGI_CAP_PHY(wlc) ((BRCMS_ISNPHY(wlc->band) && \225NREV_GE(wlc->band->phyrev, 3)) || \226BRCMS_ISLCNPHY(wlc->band))227228#define BRCMS_CHAN_PHYTYPE(x) (((x) & RXS_CHAN_PHYTYPE_MASK) \229>> RXS_CHAN_PHYTYPE_SHIFT)230#define BRCMS_CHAN_CHANNEL(x) (((x) & RXS_CHAN_ID_MASK) \231>> RXS_CHAN_ID_SHIFT)232233/*234* core state (mac)235*/236struct brcms_core {237uint coreidx; /* # sb enumerated core */238239/* fifo */240uint *txavail[NFIFO]; /* # tx descriptors available */241242struct macstat *macstat_snapshot; /* mac hw prev read values */243};244245/*246* band state (phy+ana+radio)247*/248struct brcms_band {249int bandtype; /* BRCM_BAND_2G, BRCM_BAND_5G */250uint bandunit; /* bandstate[] index */251252u16 phytype; /* phytype */253u16 phyrev;254u16 radioid;255u16 radiorev;256struct brcms_phy_pub *pi; /* pointer to phy specific information */257bool abgphy_encore;258259u8 gmode; /* currently active gmode */260261struct scb *hwrs_scb; /* permanent scb for hw rateset */262263/* band-specific copy of default_bss.rateset */264struct brcms_c_rateset defrateset;265266u8 band_stf_ss_mode; /* Configured STF type, 0:siso; 1:cdd */267s8 band_stf_stbc_tx; /* STBC TX 0:off; 1:force on; -1:auto */268/* rates supported by chip (phy-specific) */269struct brcms_c_rateset hw_rateset;270u8 basic_rate[BRCM_MAXRATE + 1]; /* basic rates indexed by rate */271bool mimo_cap_40; /* 40 MHz cap enabled on this band */272s8 antgain; /* antenna gain from srom */273274u16 CWmin; /* minimum size of contention window, in unit of aSlotTime */275u16 CWmax; /* maximum size of contention window, in unit of aSlotTime */276struct ieee80211_supported_band band;277};278279/* module control blocks */280struct modulecb {281/* module name : NULL indicates empty array member */282char name[32];283/* handle passed when handler 'doiovar' is called */284struct brcms_info *hdl;285286int (*down_fn)(void *handle); /* down handler. Note: the int returned287* by the down function is a count of the288* number of timers that could not be289* freed.290*/291292};293294struct brcms_hw_band {295int bandtype; /* BRCM_BAND_2G, BRCM_BAND_5G */296uint bandunit; /* bandstate[] index */297u16 mhfs[MHFMAX]; /* MHF array shadow */298u8 bandhw_stf_ss_mode; /* HW configured STF type, 0:siso; 1:cdd */299u16 CWmin;300u16 CWmax;301u32 core_flags;302303u16 phytype; /* phytype */304u16 phyrev;305u16 radioid;306u16 radiorev;307struct brcms_phy_pub *pi; /* pointer to phy specific information */308bool abgphy_encore;309};310311struct brcms_hardware {312bool _piomode; /* true if pio mode */313struct brcms_c_info *wlc;314315/* fifo */316struct dma_pub *di[NFIFO]; /* dma handles, per fifo */317318uint unit; /* device instance number */319320/* version info */321u16 vendorid; /* PCI vendor id */322u16 deviceid; /* PCI device id */323uint corerev; /* core revision */324u8 sromrev; /* version # of the srom */325u16 boardrev; /* version # of particular board */326u32 boardflags; /* Board specific flags from srom */327u32 boardflags2; /* More board flags if sromrev >= 4 */328u32 machwcap; /* MAC capabilities */329u32 machwcap_backup; /* backup of machwcap */330331struct si_pub *sih; /* SI handle (cookie for siutils calls) */332struct bcma_device *d11core; /* pointer to 802.11 core */333struct phy_shim_info *physhim; /* phy shim layer handler */334struct shared_phy *phy_sh; /* pointer to shared phy state */335struct brcms_hw_band *band;/* pointer to active per-band state */336/* band state per phy/radio */337struct brcms_hw_band *bandstate[MAXBANDS];338u16 bmac_phytxant; /* cache of high phytxant state */339bool shortslot; /* currently using 11g ShortSlot timing */340u16 SRL; /* 802.11 dot11ShortRetryLimit */341u16 LRL; /* 802.11 dot11LongRetryLimit */342u16 SFBL; /* Short Frame Rate Fallback Limit */343u16 LFBL; /* Long Frame Rate Fallback Limit */344345bool up; /* d11 hardware up and running */346uint now; /* # elapsed seconds */347uint _nbands; /* # bands supported */348u16 chanspec; /* bmac chanspec shadow */349350uint *txavail[NFIFO]; /* # tx descriptors available */351const u16 *xmtfifo_sz; /* fifo size in 256B for each xmt fifo */352353u32 pllreq; /* pll requests to keep PLL on */354355u8 suspended_fifos; /* Which TX fifo to remain awake for */356u32 maccontrol; /* Cached value of maccontrol */357uint mac_suspend_depth; /* current depth of mac_suspend levels */358u32 wake_override; /* bit flags to force MAC to WAKE mode */359u32 mute_override; /* Prevent ucode from sending beacons */360u8 etheraddr[ETH_ALEN]; /* currently configured ethernet address */361bool noreset; /* true= do not reset hw, used by WLC_OUT */362bool forcefastclk; /* true if h/w is forcing to use fast clk */363bool clk; /* core is out of reset and has clock */364bool sbclk; /* sb has clock */365bool phyclk; /* phy is out of reset and has clock */366367bool ucode_loaded; /* true after ucode downloaded */368369370u8 hw_stf_ss_opmode; /* STF single stream operation mode */371u8 antsel_type; /* Type of boardlevel mimo antenna switch-logic372* 0 = N/A, 1 = 2x4 board, 2 = 2x3 CB2 board373*/374u32 antsel_avail; /*375* put struct antsel_info here if more info is376* needed377*/378};379380/*381* Principal common driver data structure.382*383* pub: pointer to driver public state.384* wl: pointer to specific private state.385* hw: HW related state.386* clkreq_override: setting for clkreq for PCIE : Auto, 0, 1.387* fastpwrup_dly: time in us needed to bring up d11 fast clock.388* macintstatus: bit channel between isr and dpc.389* macintmask: sw runtime master macintmask value.390* defmacintmask: default "on" macintmask value.391* clk: core is out of reset and has clock.392* core: pointer to active io core.393* band: pointer to active per-band state.394* corestate: per-core state (one per hw core).395* bandstate: per-band state (one per phy/radio).396* qvalid: DirFrmQValid and BcMcFrmQValid.397* ampdu: ampdu module handler.398* asi: antsel module handler.399* cmi: channel manager module handler.400* vendorid: PCI vendor id.401* deviceid: PCI device id.402* ucode_rev: microcode revision.403* machwcap: MAC capabilities, BMAC shadow.404* perm_etheraddr: original sprom local ethernet address.405* bandlocked: disable auto multi-band switching.406* bandinit_pending: track band init in auto band.407* radio_monitor: radio timer is running.408* going_down: down path intermediate variable.409* wdtimer: timer for watchdog routine.410* radio_timer: timer for hw radio button monitor routine.411* monitor: monitor (MPDU sniffing) mode.412* bcnmisc_monitor: bcns promisc mode override for monitor.413* _rifs: enable per-packet rifs.414* bcn_li_bcn: beacon listen interval in # beacons.415* bcn_li_dtim: beacon listen interval in # dtims.416* WDarmed: watchdog timer is armed.417* WDlast: last time wlc_watchdog() was called.418* edcf_txop[IEEE80211_NUM_ACS]: current txop for each ac.419* wme_retries: per-AC retry limits.420* bsscfg: set of BSS configurations, idx 0 is default and always valid.421* cfg: the primary bsscfg (can be AP or STA).422* modulecb:423* mimoft: SIGN or 11N.424* cck_40txbw: 11N, cck tx b/w override when in 40MHZ mode.425* ofdm_40txbw: 11N, ofdm tx b/w override when in 40MHZ mode.426* mimo_40txbw: 11N, mimo tx b/w override when in 40MHZ mode.427* default_bss: configured BSS parameters.428* mc_fid_counter: BC/MC FIFO frame ID counter.429* country_default: saved country for leaving 802.11d auto-country mode.430* autocountry_default: initial country for 802.11d auto-country mode.431* prb_resp_timeout: do not send prb resp if request older432* than this, 0 = disable.433* home_chanspec: shared home chanspec.434* chanspec: target operational channel.435* usr_fragthresh: user configured fragmentation threshold.436* fragthresh[NFIFO]: per-fifo fragmentation thresholds.437* RTSThresh: 802.11 dot11RTSThreshold.438* SRL: 802.11 dot11ShortRetryLimit.439* LRL: 802.11 dot11LongRetryLimit.440* SFBL: Short Frame Rate Fallback Limit.441* LFBL: Long Frame Rate Fallback Limit.442* shortslot: currently using 11g ShortSlot timing.443* shortslot_override: 11g ShortSlot override.444* include_legacy_erp: include Legacy ERP info elt ID 47 as well as g ID 42.445* PLCPHdr_override: 802.11b Preamble Type override.446* stf:447* bcn_rspec: save bcn ratespec purpose.448* tempsense_lasttime;449* tx_duty_cycle_ofdm: maximum allowed duty cycle for OFDM.450* tx_duty_cycle_cck: maximum allowed duty cycle for CCK.451* wiphy:452* pri_scb: primary Station Control Block453*/454struct brcms_c_info {455struct brcms_pub *pub;456struct brcms_info *wl;457struct brcms_hardware *hw;458459/* clock */460u16 fastpwrup_dly;461462/* interrupt */463u32 macintstatus;464u32 macintmask;465u32 defmacintmask;466467bool clk;468469/* multiband */470struct brcms_core *core;471struct brcms_band *band;472struct brcms_core *corestate;473struct brcms_band *bandstate[MAXBANDS];474475/* packet queue */476uint qvalid;477478struct ampdu_info *ampdu;479struct antsel_info *asi;480struct brcms_cm_info *cmi;481482u16 vendorid;483u16 deviceid;484uint ucode_rev;485486u8 perm_etheraddr[ETH_ALEN];487488bool bandlocked;489bool bandinit_pending;490491bool radio_monitor;492bool going_down;493494bool beacon_template_virgin;495496struct brcms_timer *wdtimer;497struct brcms_timer *radio_timer;498499/* promiscuous */500uint filter_flags;501502/* driver feature */503bool _rifs;504505/* AP-STA synchronization, power save */506u8 bcn_li_bcn;507u8 bcn_li_dtim;508509bool WDarmed;510u32 WDlast;511512/* WME */513u16 edcf_txop[IEEE80211_NUM_ACS];514515u16 wme_retries[IEEE80211_NUM_ACS];516517struct brcms_bss_cfg *bsscfg;518519struct modulecb *modulecb;520521u8 mimoft;522s8 cck_40txbw;523s8 ofdm_40txbw;524s8 mimo_40txbw;525526struct brcms_bss_info *default_bss;527528u16 mc_fid_counter;529530char country_default[BRCM_CNTRY_BUF_SZ];531char autocountry_default[BRCM_CNTRY_BUF_SZ];532u16 prb_resp_timeout;533534u16 home_chanspec;535536/* PHY parameters */537u16 chanspec;538u16 usr_fragthresh;539u16 fragthresh[NFIFO];540u16 RTSThresh;541u16 SRL;542u16 LRL;543u16 SFBL;544u16 LFBL;545546/* network config */547bool shortslot;548s8 shortslot_override;549bool include_legacy_erp;550551struct brcms_protection *protection;552s8 PLCPHdr_override;553554struct brcms_stf *stf;555556u32 bcn_rspec;557558uint tempsense_lasttime;559560u16 tx_duty_cycle_ofdm;561u16 tx_duty_cycle_cck;562563struct wiphy *wiphy;564struct scb pri_scb;565struct ieee80211_vif *vif;566567struct sk_buff *beacon;568u16 beacon_tim_offset;569u16 beacon_dtim_period;570struct sk_buff *probe_resp;571};572573/* antsel module specific state */574struct antsel_info {575struct brcms_c_info *wlc; /* pointer to main wlc structure */576struct brcms_pub *pub; /* pointer to public fn */577u8 antsel_type; /* Type of boardlevel mimo antenna switch-logic578* 0 = N/A, 1 = 2x4 board, 2 = 2x3 CB2 board579*/580u8 antsel_antswitch; /* board level antenna switch type */581bool antsel_avail; /* Ant selection availability (SROM based) */582struct brcms_antselcfg antcfg_11n; /* antenna configuration */583struct brcms_antselcfg antcfg_cur; /* current antenna config (auto) */584};585586enum brcms_bss_type {587BRCMS_TYPE_STATION,588BRCMS_TYPE_AP,589BRCMS_TYPE_ADHOC,590};591592/*593* BSS configuration state594*595* wlc: wlc to which this bsscfg belongs to.596* type: interface type597* SSID_len: the length of SSID598* SSID: SSID string599*600*601* BSSID: BSSID (associated)602* cur_etheraddr: h/w address603* flags: BSSCFG flags; see below604*605* current_bss: BSS parameters in ASSOCIATED state606*607*608* ID: 'unique' ID of this bsscfg, assigned at bsscfg allocation609*/610struct brcms_bss_cfg {611struct brcms_c_info *wlc;612enum brcms_bss_type type;613u8 SSID_len;614u8 SSID[IEEE80211_MAX_SSID_LEN];615u8 BSSID[ETH_ALEN];616struct brcms_bss_info *current_bss;617};618619int brcms_c_txfifo(struct brcms_c_info *wlc, uint fifo, struct sk_buff *p);620int brcms_b_xmtfifo_sz_get(struct brcms_hardware *wlc_hw, uint fifo,621uint *blocks);622623int brcms_c_set_gmode(struct brcms_c_info *wlc, u8 gmode, bool config);624void brcms_c_mac_promisc(struct brcms_c_info *wlc, uint filter_flags);625u16 brcms_c_calc_lsig_len(struct brcms_c_info *wlc, u32 ratespec, uint mac_len);626u32 brcms_c_rspec_to_rts_rspec(struct brcms_c_info *wlc, u32 rspec,627bool use_rspec, u16 mimo_ctlchbw);628u16 brcms_c_compute_rtscts_dur(struct brcms_c_info *wlc, bool cts_only,629u32 rts_rate, u32 frame_rate,630u8 rts_preamble_type, u8 frame_preamble_type,631uint frame_len, bool ba);632void brcms_c_inval_dma_pkts(struct brcms_hardware *hw,633struct ieee80211_sta *sta, void (*dma_callback_fn));634void brcms_c_update_probe_resp(struct brcms_c_info *wlc, bool suspend);635int brcms_c_set_nmode(struct brcms_c_info *wlc);636void brcms_c_beacon_phytxctl_txant_upd(struct brcms_c_info *wlc, u32 bcn_rate);637void brcms_b_antsel_type_set(struct brcms_hardware *wlc_hw, u8 antsel_type);638void brcms_b_set_chanspec(struct brcms_hardware *wlc_hw, u16 chanspec,639bool mute, struct txpwr_limits *txpwr);640void brcms_b_write_shm(struct brcms_hardware *wlc_hw, uint offset, u16 v);641u16 brcms_b_read_shm(struct brcms_hardware *wlc_hw, uint offset);642void brcms_b_mhf(struct brcms_hardware *wlc_hw, u8 idx, u16 mask, u16 val,643int bands);644void brcms_b_corereset(struct brcms_hardware *wlc_hw, u32 flags);645void brcms_b_mctrl(struct brcms_hardware *wlc_hw, u32 mask, u32 val);646void brcms_b_phy_reset(struct brcms_hardware *wlc_hw);647void brcms_b_bw_set(struct brcms_hardware *wlc_hw, u16 bw);648void brcms_b_core_phypll_reset(struct brcms_hardware *wlc_hw);649void brcms_c_ucode_wake_override_set(struct brcms_hardware *wlc_hw,650u32 override_bit);651void brcms_c_ucode_wake_override_clear(struct brcms_hardware *wlc_hw,652u32 override_bit);653void brcms_b_write_template_ram(struct brcms_hardware *wlc_hw, int offset,654int len, void *buf);655u16 brcms_b_rate_shm_offset(struct brcms_hardware *wlc_hw, u8 rate);656void brcms_b_copyto_objmem(struct brcms_hardware *wlc_hw, uint offset,657const void *buf, int len, u32 sel);658void brcms_b_copyfrom_objmem(struct brcms_hardware *wlc_hw, uint offset,659void *buf, int len, u32 sel);660void brcms_b_switch_macfreq(struct brcms_hardware *wlc_hw, u8 spurmode);661u16 brcms_b_get_txant(struct brcms_hardware *wlc_hw);662void brcms_b_phyclk_fgc(struct brcms_hardware *wlc_hw, bool clk);663void brcms_b_macphyclk_set(struct brcms_hardware *wlc_hw, bool clk);664void brcms_b_core_phypll_ctl(struct brcms_hardware *wlc_hw, bool on);665void brcms_b_txant_set(struct brcms_hardware *wlc_hw, u16 phytxant);666void brcms_b_band_stf_ss_set(struct brcms_hardware *wlc_hw, u8 stf_mode);667void brcms_c_init_scb(struct scb *scb);668669#endif /* _BRCM_MAIN_H_ */670671672