2 * Copyright (c) 2010 Broadcom Corporation
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
11 * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
13 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
14 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
20 #include <linux/etherdevice.h>
22 #include <brcmu_utils.h>
27 #define INVCHANNEL 255 /* invalid channel */
29 /* max # brcms_c_module_register() calls */
30 #define BRCMS_MAXMODULES 22
32 #define SEQNUM_SHIFT 4
33 #define SEQNUM_MAX 0x1000
35 #define NTXRATE 64 /* # tx MPDUs rate is reported for */
37 /* Maximum wait time for a MAC suspend */
38 /* uS: 83mS is max packet time (64KB ampdu @ 6Mbps) */
39 #define BRCMS_MAX_MAC_SUSPEND 83000
41 /* responses for probe requests older that this are tossed, zero to disable */
42 #define BRCMS_PRB_RESP_TIMEOUT 0 /* Disable probe response timeout */
44 /* transmit buffer max headroom for protocol headers */
45 #define TXOFF (D11_TXH_LEN + D11_PHY_HDR_LEN)
47 /* Macros for doing definition and get/set of bitfields
48 * Usage example, e.g. a three-bit field (bits 4-6):
49 * #define <NAME>_M BITFIELD_MASK(3)
52 * regval = R_REG(osh, ®s->regfoo);
53 * field = GFIELD(regval, <NAME>);
54 * regval = SFIELD(regval, <NAME>, 1);
55 * W_REG(osh, ®s->regfoo, regval);
57 #define BITFIELD_MASK(width) \
58 (((unsigned)1 << (width)) - 1)
59 #define GFIELD(val, field) \
60 (((val) >> field ## _S) & field ## _M)
61 #define SFIELD(val, field, bits) \
62 (((val) & (~(field ## _M << field ## _S))) | \
63 ((unsigned)(bits) << field ## _S))
65 #define SW_TIMER_MAC_STAT_UPD 30 /* periodic MAC stats update */
67 /* max # supported core revisions (0 .. MAXCOREREV - 1) */
70 /* Double check that unsupported cores are not enabled */
71 #if CONF_MSK(D11CONF, 0x4f) || CONF_GE(D11CONF, MAXCOREREV)
72 #error "Configuration for D11CONF includes unsupported versions."
73 #endif /* Bad versions */
75 /* values for shortslot_override */
76 #define BRCMS_SHORTSLOT_AUTO -1 /* Driver will manage Shortslot setting */
77 #define BRCMS_SHORTSLOT_OFF 0 /* Turn off short slot */
78 #define BRCMS_SHORTSLOT_ON 1 /* Turn on short slot */
80 /* value for short/long and mixmode/greenfield preamble */
81 #define BRCMS_LONG_PREAMBLE (0)
82 #define BRCMS_SHORT_PREAMBLE (1 << 0)
83 #define BRCMS_GF_PREAMBLE (1 << 1)
84 #define BRCMS_MM_PREAMBLE (1 << 2)
85 #define BRCMS_IS_MIMO_PREAMBLE(_pre) (((_pre) == BRCMS_GF_PREAMBLE) || \
86 ((_pre) == BRCMS_MM_PREAMBLE))
89 /* seq and frag bits: SEQNUM_SHIFT, FRAGNUM_MASK (802.11.h) */
90 /* rate epoch bits: TXFID_RATE_SHIFT, TXFID_RATE_MASK ((wlc_rate.c) */
91 #define TXFID_QUEUE_MASK 0x0007 /* Bits 0-2 */
92 #define TXFID_SEQ_MASK 0x7FE0 /* Bits 5-15 */
93 #define TXFID_SEQ_SHIFT 5 /* Number of bit shifts */
94 #define TXFID_RATE_PROBE_MASK 0x8000 /* Bit 15 for rate probe */
95 #define TXFID_RATE_MASK 0x0018 /* Mask for bits 3 and 4 */
96 #define TXFID_RATE_SHIFT 3 /* Shift 3 bits for rate mask */
98 /* promote boardrev */
99 #define BOARDREV_PROMOTABLE 0xFF /* from */
100 #define BOARDREV_PROMOTED 1 /* to */
102 #define DATA_BLOCK_TX_SUPR (1 << 4)
104 /* Ucode MCTL_WAKE override bits */
105 #define BRCMS_WAKE_OVERRIDE_CLKCTL 0x01
106 #define BRCMS_WAKE_OVERRIDE_PHYREG 0x02
107 #define BRCMS_WAKE_OVERRIDE_MACSUSPEND 0x04
108 #define BRCMS_WAKE_OVERRIDE_TXFIFO 0x08
109 #define BRCMS_WAKE_OVERRIDE_FORCEFAST 0x10
111 /* stuff pulled in from wlc.c */
113 /* Interrupt bit error summary. Don't include I_RU: we refill DMA at other
114 * times; and if we run out, constant I_RU interrupts may cause lockup. We
115 * will still get error counts from rx0ovfl.
117 #define I_ERRORS (I_PC | I_PD | I_DE | I_RO | I_XU)
118 /* default software intmasks */
119 #define DEF_RXINTMASK (I_RI) /* enable rx int on rxfifo only */
120 #define DEF_MACINTMASK (MI_TXSTOP | MI_TBTT | MI_ATIMWINEND | MI_PMQ | \
121 MI_PHYTXERR | MI_DMAINT | MI_TFS | MI_BG_NOISE | \
122 MI_CCA | MI_TO | MI_GP0 | MI_RFDISABLE | MI_PWRUP)
124 #define MAXTXPKTS 6 /* max # pkts pending */
127 #define MAXTXFRAMEBURST 8 /* vanilla xpress mode: max frames/burst */
128 #define MAXFRAMEBURST_TXOP 10000 /* Frameburst TXOP in usec */
130 #define NFIFO 6 /* # tx/rx fifopairs */
134 /* pll is shared on old chips */
135 #define BRCMS_PLLREQ_SHARED 0x1
136 /* hold pll for radio monitor register checking */
137 #define BRCMS_PLLREQ_RADIO_MON 0x2
138 /* hold/release pll for some short operation */
139 #define BRCMS_PLLREQ_FLIP 0x4
141 #define CHANNEL_BANDUNIT(wlc, ch) \
142 (((ch) <= CH_MAX_2G_CHANNEL) ? BAND_2G_INDEX : BAND_5G_INDEX)
144 #define OTHERBANDUNIT(wlc) \
145 ((uint)((wlc)->band->bandunit ? BAND_2G_INDEX : BAND_5G_INDEX))
148 * 802.11 protection information
150 * _g: use g spec protection, driver internal.
151 * g_override: override for use of g spec protection.
152 * gmode_user: user config gmode, operating band->gmode is different.
153 * overlap: Overlap BSS/IBSS protection for both 11g and 11n.
154 * nmode_user: user config nmode, operating pub->nmode is different.
155 * n_cfg: use OFDM protection on MIMO frames.
156 * n_cfg_override: override for use of N protection.
157 * nongf: non-GF present protection.
158 * nongf_override: override for use of GF protection.
159 * n_pam_override: override for preamble: MM or GF.
160 * n_obss: indicated OBSS Non-HT STA present.
162 struct brcms_protection {
177 * anything affecting the single/dual streams/antenna operation
179 * hw_txchain: HW txchain bitmap cfg.
180 * txchain: txchain bitmap being used.
181 * txstreams: number of txchains being used.
182 * hw_rxchain: HW rxchain bitmap cfg.
183 * rxchain: rxchain bitmap being used.
184 * rxstreams: number of rxchains being used.
185 * ant_rx_ovr: rx antenna override.
186 * txant: userTx antenna setting.
187 * phytxant: phyTx antenna setting in txheader.
188 * ss_opmode: singlestream Operational mode, 0:siso; 1:cdd.
189 * ss_algosel_auto: if true, use wlc->stf->ss_algo_channel;
190 * else use wlc->band->stf->ss_mode_band.
191 * ss_algo_channel: ss based on per-channel algo: 0: SISO, 1: CDD 2: STBC.
192 * rxchain_restore_delay: delay time to restore default rxchain.
193 * ldpc: AUTO/ON/OFF ldpc cap supported.
194 * txcore[MAX_STREAMS_SUPPORTED + 1]: bitmap of selected core for each Nsts.
208 bool ss_algosel_auto;
210 u8 rxchain_restore_delay;
212 u8 txcore[MAX_STREAMS_SUPPORTED + 1];
216 #define BRCMS_STF_SS_STBC_TX(wlc, scb) \
217 (((wlc)->stf->txstreams > 1) && (((wlc)->band->band_stf_stbc_tx == ON) \
218 || (((scb)->flags & SCB_STBCCAP) && \
219 (wlc)->band->band_stf_stbc_tx == AUTO && \
220 isset(&((wlc)->stf->ss_algo_channel), PHY_TXC1_MODE_STBC))))
222 #define BRCMS_STBC_CAP_PHY(wlc) (BRCMS_ISNPHY(wlc->band) && \
223 NREV_GE(wlc->band->phyrev, 3))
225 #define BRCMS_SGI_CAP_PHY(wlc) ((BRCMS_ISNPHY(wlc->band) && \
226 NREV_GE(wlc->band->phyrev, 3)) || \
227 BRCMS_ISLCNPHY(wlc->band))
229 #define BRCMS_CHAN_PHYTYPE(x) (((x) & RXS_CHAN_PHYTYPE_MASK) \
230 >> RXS_CHAN_PHYTYPE_SHIFT)
231 #define BRCMS_CHAN_CHANNEL(x) (((x) & RXS_CHAN_ID_MASK) \
232 >> RXS_CHAN_ID_SHIFT)
238 uint coreidx; /* # sb enumerated core */
241 uint *txavail[NFIFO]; /* # tx descriptors available */
243 struct macstat *macstat_snapshot; /* mac hw prev read values */
247 * band state (phy+ana+radio)
250 int bandtype; /* BRCM_BAND_2G, BRCM_BAND_5G */
251 uint bandunit; /* bandstate[] index */
253 u16 phytype; /* phytype */
257 struct brcms_phy_pub *pi; /* pointer to phy specific information */
260 u8 gmode; /* currently active gmode */
262 struct scb *hwrs_scb; /* permanent scb for hw rateset */
264 /* band-specific copy of default_bss.rateset */
265 struct brcms_c_rateset defrateset;
267 u8 band_stf_ss_mode; /* Configured STF type, 0:siso; 1:cdd */
268 s8 band_stf_stbc_tx; /* STBC TX 0:off; 1:force on; -1:auto */
269 /* rates supported by chip (phy-specific) */
270 struct brcms_c_rateset hw_rateset;
271 u8 basic_rate[BRCM_MAXRATE + 1]; /* basic rates indexed by rate */
272 bool mimo_cap_40; /* 40 MHz cap enabled on this band */
273 s8 antgain; /* antenna gain from srom */
275 u16 CWmin; /* minimum size of contention window, in unit of aSlotTime */
276 u16 CWmax; /* maximum size of contention window, in unit of aSlotTime */
277 struct ieee80211_supported_band band;
280 /* module control blocks */
282 /* module name : NULL indicates empty array member */
284 /* handle passed when handler 'doiovar' is called */
285 struct brcms_info *hdl;
287 int (*down_fn)(void *handle); /* down handler. Note: the int returned
288 * by the down function is a count of the
289 * number of timers that could not be
295 struct brcms_hw_band {
296 int bandtype; /* BRCM_BAND_2G, BRCM_BAND_5G */
297 uint bandunit; /* bandstate[] index */
298 u16 mhfs[MHFMAX]; /* MHF array shadow */
299 u8 bandhw_stf_ss_mode; /* HW configured STF type, 0:siso; 1:cdd */
304 u16 phytype; /* phytype */
308 struct brcms_phy_pub *pi; /* pointer to phy specific information */
312 struct brcms_hardware {
313 bool _piomode; /* true if pio mode */
314 struct brcms_c_info *wlc;
317 struct dma_pub *di[NFIFO]; /* dma handles, per fifo */
319 uint unit; /* device instance number */
322 u16 vendorid; /* PCI vendor id */
323 u16 deviceid; /* PCI device id */
324 uint corerev; /* core revision */
325 u8 sromrev; /* version # of the srom */
326 u16 boardrev; /* version # of particular board */
327 u32 boardflags; /* Board specific flags from srom */
328 u32 boardflags2; /* More board flags if sromrev >= 4 */
329 u32 machwcap; /* MAC capabilities */
330 u32 machwcap_backup; /* backup of machwcap */
332 struct si_pub *sih; /* SI handle (cookie for siutils calls) */
333 struct bcma_device *d11core; /* pointer to 802.11 core */
334 struct phy_shim_info *physhim; /* phy shim layer handler */
335 struct shared_phy *phy_sh; /* pointer to shared phy state */
336 struct brcms_hw_band *band;/* pointer to active per-band state */
337 /* band state per phy/radio */
338 struct brcms_hw_band *bandstate[MAXBANDS];
339 u16 bmac_phytxant; /* cache of high phytxant state */
340 bool shortslot; /* currently using 11g ShortSlot timing */
341 u16 SRL; /* 802.11 dot11ShortRetryLimit */
342 u16 LRL; /* 802.11 dot11LongRetryLimit */
343 u16 SFBL; /* Short Frame Rate Fallback Limit */
344 u16 LFBL; /* Long Frame Rate Fallback Limit */
346 bool up; /* d11 hardware up and running */
347 uint now; /* # elapsed seconds */
348 uint _nbands; /* # bands supported */
349 u16 chanspec; /* bmac chanspec shadow */
351 uint *txavail[NFIFO]; /* # tx descriptors available */
352 const u16 *xmtfifo_sz; /* fifo size in 256B for each xmt fifo */
354 u32 pllreq; /* pll requests to keep PLL on */
356 u8 suspended_fifos; /* Which TX fifo to remain awake for */
357 u32 maccontrol; /* Cached value of maccontrol */
358 uint mac_suspend_depth; /* current depth of mac_suspend levels */
359 u32 wake_override; /* bit flags to force MAC to WAKE mode */
360 u32 mute_override; /* Prevent ucode from sending beacons */
361 u8 etheraddr[ETH_ALEN]; /* currently configured ethernet address */
362 bool noreset; /* true= do not reset hw, used by WLC_OUT */
363 bool forcefastclk; /* true if h/w is forcing to use fast clk */
364 bool clk; /* core is out of reset and has clock */
365 bool sbclk; /* sb has clock */
366 bool phyclk; /* phy is out of reset and has clock */
368 bool ucode_loaded; /* true after ucode downloaded */
371 u8 hw_stf_ss_opmode; /* STF single stream operation mode */
372 u8 antsel_type; /* Type of boardlevel mimo antenna switch-logic
373 * 0 = N/A, 1 = 2x4 board, 2 = 2x3 CB2 board
376 * put struct antsel_info here if more info is
382 * Principal common driver data structure.
384 * pub: pointer to driver public state.
385 * wl: pointer to specific private state.
386 * hw: HW related state.
387 * clkreq_override: setting for clkreq for PCIE : Auto, 0, 1.
388 * fastpwrup_dly: time in us needed to bring up d11 fast clock.
389 * macintstatus: bit channel between isr and dpc.
390 * macintmask: sw runtime master macintmask value.
391 * defmacintmask: default "on" macintmask value.
392 * clk: core is out of reset and has clock.
393 * core: pointer to active io core.
394 * band: pointer to active per-band state.
395 * corestate: per-core state (one per hw core).
396 * bandstate: per-band state (one per phy/radio).
397 * qvalid: DirFrmQValid and BcMcFrmQValid.
398 * ampdu: ampdu module handler.
399 * asi: antsel module handler.
400 * cmi: channel manager module handler.
401 * vendorid: PCI vendor id.
402 * deviceid: PCI device id.
403 * ucode_rev: microcode revision.
404 * machwcap: MAC capabilities, BMAC shadow.
405 * perm_etheraddr: original sprom local ethernet address.
406 * bandlocked: disable auto multi-band switching.
407 * bandinit_pending: track band init in auto band.
408 * radio_monitor: radio timer is running.
409 * going_down: down path intermediate variable.
410 * wdtimer: timer for watchdog routine.
411 * radio_timer: timer for hw radio button monitor routine.
412 * monitor: monitor (MPDU sniffing) mode.
413 * bcnmisc_monitor: bcns promisc mode override for monitor.
414 * _rifs: enable per-packet rifs.
415 * bcn_li_bcn: beacon listen interval in # beacons.
416 * bcn_li_dtim: beacon listen interval in # dtims.
417 * WDarmed: watchdog timer is armed.
418 * WDlast: last time wlc_watchdog() was called.
419 * edcf_txop[IEEE80211_NUM_ACS]: current txop for each ac.
420 * wme_retries: per-AC retry limits.
421 * bsscfg: set of BSS configurations, idx 0 is default and always valid.
422 * cfg: the primary bsscfg (can be AP or STA).
424 * mimoft: SIGN or 11N.
425 * cck_40txbw: 11N, cck tx b/w override when in 40MHZ mode.
426 * ofdm_40txbw: 11N, ofdm tx b/w override when in 40MHZ mode.
427 * mimo_40txbw: 11N, mimo tx b/w override when in 40MHZ mode.
428 * default_bss: configured BSS parameters.
429 * mc_fid_counter: BC/MC FIFO frame ID counter.
430 * country_default: saved country for leaving 802.11d auto-country mode.
431 * autocountry_default: initial country for 802.11d auto-country mode.
432 * prb_resp_timeout: do not send prb resp if request older
433 * than this, 0 = disable.
434 * home_chanspec: shared home chanspec.
435 * chanspec: target operational channel.
436 * usr_fragthresh: user configured fragmentation threshold.
437 * fragthresh[NFIFO]: per-fifo fragmentation thresholds.
438 * RTSThresh: 802.11 dot11RTSThreshold.
439 * SRL: 802.11 dot11ShortRetryLimit.
440 * LRL: 802.11 dot11LongRetryLimit.
441 * SFBL: Short Frame Rate Fallback Limit.
442 * LFBL: Long Frame Rate Fallback Limit.
443 * shortslot: currently using 11g ShortSlot timing.
444 * shortslot_override: 11g ShortSlot override.
445 * include_legacy_erp: include Legacy ERP info elt ID 47 as well as g ID 42.
446 * PLCPHdr_override: 802.11b Preamble Type override.
448 * bcn_rspec: save bcn ratespec purpose.
449 * tempsense_lasttime;
450 * tx_duty_cycle_ofdm: maximum allowed duty cycle for OFDM.
451 * tx_duty_cycle_cck: maximum allowed duty cycle for CCK.
453 * pri_scb: primary Station Control Block
455 struct brcms_c_info {
456 struct brcms_pub *pub;
457 struct brcms_info *wl;
458 struct brcms_hardware *hw;
471 struct brcms_core *core;
472 struct brcms_band *band;
473 struct brcms_core *corestate;
474 struct brcms_band *bandstate[MAXBANDS];
479 struct ampdu_info *ampdu;
480 struct antsel_info *asi;
481 struct brcms_cm_info *cmi;
487 u8 perm_etheraddr[ETH_ALEN];
490 bool bandinit_pending;
495 struct brcms_timer *wdtimer;
496 struct brcms_timer *radio_timer;
504 /* AP-STA synchronization, power save */
512 u16 edcf_txop[IEEE80211_NUM_ACS];
514 u16 wme_retries[IEEE80211_NUM_ACS];
516 struct brcms_bss_cfg *bsscfg;
518 struct modulecb *modulecb;
525 struct brcms_bss_info *default_bss;
529 char country_default[BRCM_CNTRY_BUF_SZ];
530 char autocountry_default[BRCM_CNTRY_BUF_SZ];
531 u16 prb_resp_timeout;
538 u16 fragthresh[NFIFO];
547 s8 shortslot_override;
548 bool include_legacy_erp;
550 struct brcms_protection *protection;
553 struct brcms_stf *stf;
557 uint tempsense_lasttime;
559 u16 tx_duty_cycle_ofdm;
560 u16 tx_duty_cycle_cck;
566 /* antsel module specific state */
568 struct brcms_c_info *wlc; /* pointer to main wlc structure */
569 struct brcms_pub *pub; /* pointer to public fn */
570 u8 antsel_type; /* Type of boardlevel mimo antenna switch-logic
571 * 0 = N/A, 1 = 2x4 board, 2 = 2x3 CB2 board
573 u8 antsel_antswitch; /* board level antenna switch type */
574 bool antsel_avail; /* Ant selection availability (SROM based) */
575 struct brcms_antselcfg antcfg_11n; /* antenna configuration */
576 struct brcms_antselcfg antcfg_cur; /* current antenna config (auto) */
580 * BSS configuration state
582 * wlc: wlc to which this bsscfg belongs to.
583 * up: is this configuration up operational
584 * enable: is this configuration enabled
585 * associated: is BSS in ASSOCIATED state
586 * BSS: infraustructure or adhoc
587 * SSID_len: the length of SSID
591 * BSSID: BSSID (associated)
592 * cur_etheraddr: h/w address
593 * flags: BSSCFG flags; see below
595 * current_bss: BSS parms in ASSOCIATED state
598 * ID: 'unique' ID of this bsscfg, assigned at bsscfg allocation
600 struct brcms_bss_cfg {
601 struct brcms_c_info *wlc;
607 u8 SSID[IEEE80211_MAX_SSID_LEN];
609 u8 cur_etheraddr[ETH_ALEN];
610 struct brcms_bss_info *current_bss;
613 extern int brcms_c_txfifo(struct brcms_c_info *wlc, uint fifo,
615 extern int brcms_b_xmtfifo_sz_get(struct brcms_hardware *wlc_hw, uint fifo,
618 extern int brcms_c_set_gmode(struct brcms_c_info *wlc, u8 gmode, bool config);
619 extern void brcms_c_mac_promisc(struct brcms_c_info *wlc, uint filter_flags);
620 extern u16 brcms_c_calc_lsig_len(struct brcms_c_info *wlc, u32 ratespec,
622 extern u32 brcms_c_rspec_to_rts_rspec(struct brcms_c_info *wlc,
624 bool use_rspec, u16 mimo_ctlchbw);
625 extern u16 brcms_c_compute_rtscts_dur(struct brcms_c_info *wlc, bool cts_only,
628 u8 rts_preamble_type,
629 u8 frame_preamble_type, uint frame_len,
631 extern void brcms_c_inval_dma_pkts(struct brcms_hardware *hw,
632 struct ieee80211_sta *sta,
633 void (*dma_callback_fn));
634 extern void brcms_c_update_beacon(struct brcms_c_info *wlc);
635 extern void brcms_c_update_probe_resp(struct brcms_c_info *wlc, bool suspend);
636 extern int brcms_c_set_nmode(struct brcms_c_info *wlc);
637 extern void brcms_c_beacon_phytxctl_txant_upd(struct brcms_c_info *wlc,
639 extern void brcms_b_antsel_type_set(struct brcms_hardware *wlc_hw,
641 extern void brcms_b_set_chanspec(struct brcms_hardware *wlc_hw,
643 bool mute, struct txpwr_limits *txpwr);
644 extern void brcms_b_write_shm(struct brcms_hardware *wlc_hw, uint offset,
646 extern u16 brcms_b_read_shm(struct brcms_hardware *wlc_hw, uint offset);
647 extern void brcms_b_mhf(struct brcms_hardware *wlc_hw, u8 idx, u16 mask,
649 extern void brcms_b_corereset(struct brcms_hardware *wlc_hw, u32 flags);
650 extern void brcms_b_mctrl(struct brcms_hardware *wlc_hw, u32 mask, u32 val);
651 extern void brcms_b_phy_reset(struct brcms_hardware *wlc_hw);
652 extern void brcms_b_bw_set(struct brcms_hardware *wlc_hw, u16 bw);
653 extern void brcms_b_core_phypll_reset(struct brcms_hardware *wlc_hw);
654 extern void brcms_c_ucode_wake_override_set(struct brcms_hardware *wlc_hw,
656 extern void brcms_c_ucode_wake_override_clear(struct brcms_hardware *wlc_hw,
658 extern void brcms_b_write_template_ram(struct brcms_hardware *wlc_hw,
659 int offset, int len, void *buf);
660 extern u16 brcms_b_rate_shm_offset(struct brcms_hardware *wlc_hw, u8 rate);
661 extern void brcms_b_copyto_objmem(struct brcms_hardware *wlc_hw,
662 uint offset, const void *buf, int len,
664 extern void brcms_b_copyfrom_objmem(struct brcms_hardware *wlc_hw, uint offset,
665 void *buf, int len, u32 sel);
666 extern void brcms_b_switch_macfreq(struct brcms_hardware *wlc_hw, u8 spurmode);
667 extern u16 brcms_b_get_txant(struct brcms_hardware *wlc_hw);
668 extern void brcms_b_phyclk_fgc(struct brcms_hardware *wlc_hw, bool clk);
669 extern void brcms_b_macphyclk_set(struct brcms_hardware *wlc_hw, bool clk);
670 extern void brcms_b_core_phypll_ctl(struct brcms_hardware *wlc_hw, bool on);
671 extern void brcms_b_txant_set(struct brcms_hardware *wlc_hw, u16 phytxant);
672 extern void brcms_b_band_stf_ss_set(struct brcms_hardware *wlc_hw,
674 extern void brcms_c_init_scb(struct scb *scb);
676 #endif /* _BRCM_MAIN_H_ */