提交 c654fce6 编写于 作者: R Roland Vossen 提交者: Greg Kroah-Hartman

staging: brcm80211: replaced bmac acronym by brcms_b_

Code cleanup.
Signed-off-by: NRoland Vossen <rvossen@broadcom.com>
Reviewed-by: NArend van Spriel <arend@broadcom.com>
Reviewed-by: NFranky Lin <frankyl@broadcom.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 f212595d
......@@ -136,7 +136,7 @@ struct antsel_info *wlc_antsel_attach(struct wlc_info *wlc)
}
/* Set the antenna selection type for the low driver */
wlc_bmac_antsel_type_set(wlc->hw, asi->antsel_type);
brcms_b_antsel_type_set(wlc->hw, asi->antsel_type);
/* Init (auto/manual) antenna selection */
wlc_antsel_init_cfg(asi, &asi->antcfg_11n, true);
......
......@@ -21,7 +21,7 @@
/* dup state between BMAC(struct wlc_hw_info) and HIGH(struct wlc_info)
driver */
struct wlc_bmac_state {
struct brcms_b_state {
u32 machwcap; /* mac hw capibility */
u32 preamble_ovr; /* preamble override */
};
......@@ -71,100 +71,100 @@ enum {
IOV_BMAC_LAST
};
extern int wlc_bmac_attach(struct wlc_info *wlc, u16 vendor, u16 device,
extern int brcms_b_attach(struct wlc_info *wlc, u16 vendor, u16 device,
uint unit, bool piomode, void *regsva, uint bustype,
void *btparam);
extern int wlc_bmac_detach(struct wlc_info *wlc);
extern void wlc_bmac_watchdog(void *arg);
extern int brcms_b_detach(struct wlc_info *wlc);
extern void brcms_b_watchdog(void *arg);
/* up/down, reset, clk */
extern void wlc_bmac_copyto_objmem(struct wlc_hw_info *wlc_hw,
extern void brcms_b_copyto_objmem(struct wlc_hw_info *wlc_hw,
uint offset, const void *buf, int len,
u32 sel);
extern void wlc_bmac_copyfrom_objmem(struct wlc_hw_info *wlc_hw, uint offset,
extern void brcms_b_copyfrom_objmem(struct wlc_hw_info *wlc_hw, uint offset,
void *buf, int len, u32 sel);
#define wlc_bmac_copyfrom_shm(wlc_hw, offset, buf, len) \
wlc_bmac_copyfrom_objmem(wlc_hw, offset, buf, len, OBJADDR_SHM_SEL)
#define wlc_bmac_copyto_shm(wlc_hw, offset, buf, len) \
wlc_bmac_copyto_objmem(wlc_hw, offset, buf, len, OBJADDR_SHM_SEL)
extern void wlc_bmac_core_phypll_reset(struct wlc_hw_info *wlc_hw);
extern void wlc_bmac_core_phypll_ctl(struct wlc_hw_info *wlc_hw, bool on);
extern void wlc_bmac_phyclk_fgc(struct wlc_hw_info *wlc_hw, bool clk);
extern void wlc_bmac_macphyclk_set(struct wlc_hw_info *wlc_hw, bool clk);
extern void wlc_bmac_phy_reset(struct wlc_hw_info *wlc_hw);
extern void wlc_bmac_corereset(struct wlc_hw_info *wlc_hw, u32 flags);
extern void wlc_bmac_reset(struct wlc_hw_info *wlc_hw);
extern void wlc_bmac_init(struct wlc_hw_info *wlc_hw, chanspec_t chanspec,
#define brcms_b_copyfrom_shm(wlc_hw, offset, buf, len) \
brcms_b_copyfrom_objmem(wlc_hw, offset, buf, len, OBJADDR_SHM_SEL)
#define brcms_b_copyto_shm(wlc_hw, offset, buf, len) \
brcms_b_copyto_objmem(wlc_hw, offset, buf, len, OBJADDR_SHM_SEL)
extern void brcms_b_core_phypll_reset(struct wlc_hw_info *wlc_hw);
extern void brcms_b_core_phypll_ctl(struct wlc_hw_info *wlc_hw, bool on);
extern void brcms_b_phyclk_fgc(struct wlc_hw_info *wlc_hw, bool clk);
extern void brcms_b_macphyclk_set(struct wlc_hw_info *wlc_hw, bool clk);
extern void brcms_b_phy_reset(struct wlc_hw_info *wlc_hw);
extern void brcms_b_corereset(struct wlc_hw_info *wlc_hw, u32 flags);
extern void brcms_b_reset(struct wlc_hw_info *wlc_hw);
extern void brcms_b_init(struct wlc_hw_info *wlc_hw, chanspec_t chanspec,
bool mute);
extern int wlc_bmac_up_prep(struct wlc_hw_info *wlc_hw);
extern int wlc_bmac_up_finish(struct wlc_hw_info *wlc_hw);
extern int wlc_bmac_down_prep(struct wlc_hw_info *wlc_hw);
extern int wlc_bmac_down_finish(struct wlc_hw_info *wlc_hw);
extern void wlc_bmac_switch_macfreq(struct wlc_hw_info *wlc_hw, u8 spurmode);
extern int brcms_b_up_prep(struct wlc_hw_info *wlc_hw);
extern int brcms_b_up_finish(struct wlc_hw_info *wlc_hw);
extern int brcms_b_bmac_down_prep(struct wlc_hw_info *wlc_hw);
extern int brcms_b_down_finish(struct wlc_hw_info *wlc_hw);
extern void brcms_b_switch_macfreq(struct wlc_hw_info *wlc_hw, u8 spurmode);
/* chanspec, ucode interface */
extern void wlc_bmac_set_chanspec(struct wlc_hw_info *wlc_hw,
extern void brcms_b_set_chanspec(struct wlc_hw_info *wlc_hw,
chanspec_t chanspec,
bool mute, struct txpwr_limits *txpwr);
extern int wlc_bmac_xmtfifo_sz_get(struct wlc_hw_info *wlc_hw, uint fifo,
extern int brcms_b_xmtfifo_sz_get(struct wlc_hw_info *wlc_hw, uint fifo,
uint *blocks);
extern void wlc_bmac_mhf(struct wlc_hw_info *wlc_hw, u8 idx, u16 mask,
extern void brcms_b_mhf(struct wlc_hw_info *wlc_hw, u8 idx, u16 mask,
u16 val, int bands);
extern void wlc_bmac_mctrl(struct wlc_hw_info *wlc_hw, u32 mask, u32 val);
extern u16 wlc_bmac_mhf_get(struct wlc_hw_info *wlc_hw, u8 idx, int bands);
extern void wlc_bmac_txant_set(struct wlc_hw_info *wlc_hw, u16 phytxant);
extern u16 wlc_bmac_get_txant(struct wlc_hw_info *wlc_hw);
extern void wlc_bmac_antsel_type_set(struct wlc_hw_info *wlc_hw,
extern void brcms_b_mctrl(struct wlc_hw_info *wlc_hw, u32 mask, u32 val);
extern u16 brcms_b_mhf_get(struct wlc_hw_info *wlc_hw, u8 idx, int bands);
extern void brcms_b_txant_set(struct wlc_hw_info *wlc_hw, u16 phytxant);
extern u16 brcms_b_get_txant(struct wlc_hw_info *wlc_hw);
extern void brcms_b_antsel_type_set(struct wlc_hw_info *wlc_hw,
u8 antsel_type);
extern int wlc_bmac_state_get(struct wlc_hw_info *wlc_hw,
wlc_bmac_state_t *state);
extern void wlc_bmac_write_shm(struct wlc_hw_info *wlc_hw, uint offset, u16 v);
extern u16 wlc_bmac_read_shm(struct wlc_hw_info *wlc_hw, uint offset);
extern void wlc_bmac_write_template_ram(struct wlc_hw_info *wlc_hw, int offset,
extern int brcms_b_state_get(struct wlc_hw_info *wlc_hw,
brcms_b_state_t *state);
extern void brcms_b_write_shm(struct wlc_hw_info *wlc_hw, uint offset, u16 v);
extern u16 brcms_b_read_shm(struct wlc_hw_info *wlc_hw, uint offset);
extern void brcms_b_write_template_ram(struct wlc_hw_info *wlc_hw, int offset,
int len, void *buf);
extern void wlc_bmac_copyfrom_vars(struct wlc_hw_info *wlc_hw, char **buf,
extern void brcms_b_copyfrom_vars(struct wlc_hw_info *wlc_hw, char **buf,
uint *len);
extern void wlc_bmac_hw_etheraddr(struct wlc_hw_info *wlc_hw,
extern void brcms_b_hw_etheraddr(struct wlc_hw_info *wlc_hw,
u8 *ea);
extern bool wlc_bmac_radio_read_hwdisabled(struct wlc_hw_info *wlc_hw);
extern void wlc_bmac_set_shortslot(struct wlc_hw_info *wlc_hw, bool shortslot);
extern void wlc_bmac_band_stf_ss_set(struct wlc_hw_info *wlc_hw, u8 stf_mode);
extern bool brcms_b_radio_read_hwdisabled(struct wlc_hw_info *wlc_hw);
extern void brcms_b_set_shortslot(struct wlc_hw_info *wlc_hw, bool shortslot);
extern void brcms_b_band_stf_ss_set(struct wlc_hw_info *wlc_hw, u8 stf_mode);
extern void wlc_bmac_wait_for_wake(struct wlc_hw_info *wlc_hw);
extern void brcms_b_wait_for_wake(struct wlc_hw_info *wlc_hw);
extern void wlc_ucode_wake_override_set(struct wlc_hw_info *wlc_hw,
u32 override_bit);
extern void wlc_ucode_wake_override_clear(struct wlc_hw_info *wlc_hw,
u32 override_bit);
extern void wlc_bmac_set_addrmatch(struct wlc_hw_info *wlc_hw,
extern void brcms_b_set_addrmatch(struct wlc_hw_info *wlc_hw,
int match_reg_offset,
const u8 *addr);
extern void wlc_bmac_write_hw_bcntemplates(struct wlc_hw_info *wlc_hw,
extern void brcms_b_write_hw_bcntemplates(struct wlc_hw_info *wlc_hw,
void *bcn, int len, bool both);
extern void wlc_bmac_read_tsf(struct wlc_hw_info *wlc_hw, u32 *tsf_l_ptr,
extern void brcms_b_read_tsf(struct wlc_hw_info *wlc_hw, u32 *tsf_l_ptr,
u32 *tsf_h_ptr);
extern void wlc_bmac_set_cwmin(struct wlc_hw_info *wlc_hw, u16 newmin);
extern void wlc_bmac_set_cwmax(struct wlc_hw_info *wlc_hw, u16 newmax);
extern void brcms_b_set_cwmin(struct wlc_hw_info *wlc_hw, u16 newmin);
extern void brcms_b_set_cwmax(struct wlc_hw_info *wlc_hw, u16 newmax);
extern void wlc_bmac_retrylimit_upd(struct wlc_hw_info *wlc_hw, u16 SRL,
extern void brcms_b_retrylimit_upd(struct wlc_hw_info *wlc_hw, u16 SRL,
u16 LRL);
extern void wlc_bmac_fifoerrors(struct wlc_hw_info *wlc_hw);
extern void brcms_b_fifoerrors(struct wlc_hw_info *wlc_hw);
/* API for BMAC driver (e.g. wlc_phy.c etc) */
extern void wlc_bmac_bw_set(struct wlc_hw_info *wlc_hw, u16 bw);
extern void wlc_bmac_pllreq(struct wlc_hw_info *wlc_hw, bool set,
extern void brcms_b_bw_set(struct wlc_hw_info *wlc_hw, u16 bw);
extern void brcms_b_pllreq(struct wlc_hw_info *wlc_hw, bool set,
mbool req_bit);
extern void wlc_bmac_hw_up(struct wlc_hw_info *wlc_hw);
extern u16 wlc_bmac_rate_shm_offset(struct wlc_hw_info *wlc_hw, u8 rate);
extern void wlc_bmac_antsel_set(struct wlc_hw_info *wlc_hw, u32 antsel_avail);
extern void brcms_b_hw_up(struct wlc_hw_info *wlc_hw);
extern u16 brcms_b_rate_shm_offset(struct wlc_hw_info *wlc_hw, u8 rate);
extern void brcms_b_antsel_set(struct wlc_hw_info *wlc_hw, u32 antsel_avail);
#endif /* _BRCM_BOTTOM_MAC_H_ */
......@@ -1122,7 +1122,7 @@ wlc_channel_set_chanspec(wlc_cm_info_t *wlc_cm, chanspec_t chanspec,
wlc_channel_min_txpower_limits_with_local_constraint(wlc_cm, &txpwr,
local_constraint_qdbm);
wlc_bmac_set_chanspec(wlc->hw, chanspec,
brcms_b_set_chanspec(wlc->hw, chanspec,
(wlc_quiet_chanspec(wlc_cm, chanspec) != 0),
&txpwr);
}
......
......@@ -165,7 +165,7 @@
*/
/* To inform the ucode of the last mcast frame posted so that it can clear moredata bit */
#define BCMCFID(wlc, fid) wlc_bmac_write_shm((wlc)->hw, M_BCMC_FID, (fid))
#define BCMCFID(wlc, fid) brcms_b_write_shm((wlc)->hw, M_BCMC_FID, (fid))
#define WLC_WAR16165(wlc) (wlc->pub->sih->bustype == PCI_BUS && \
(!AP_ENAB(wlc->pub)) && (wlc->war16165))
......@@ -416,7 +416,7 @@ void wlc_reset(struct wlc_info *wlc)
memset((char *)wlc->core->macstat_snapshot, 0,
sizeof(macstat_t));
wlc_bmac_reset(wlc->hw);
brcms_b_reset(wlc->hw);
}
void wlc_fatal_error(struct wlc_info *wlc)
......@@ -470,7 +470,7 @@ void wlc_init(struct wlc_info *wlc)
else
chanspec = wlc_init_chanspec(wlc);
wlc_bmac_init(wlc->hw, chanspec, mute);
brcms_b_init(wlc->hw, chanspec, mute);
/* update beacon listen interval */
wlc_bcn_li_upd(wlc);
......@@ -632,7 +632,7 @@ void wlc_set_ps_ctrl(struct wlc_info *wlc)
awake_before = ((v1 & MCTL_WAKE) || ((v1 & MCTL_HPS) == 0));
if (!awake_before)
wlc_bmac_wait_for_wake(wlc->hw);
brcms_b_wait_for_wake(wlc->hw);
}
......@@ -702,7 +702,7 @@ void wlc_switch_shortslot(struct wlc_info *wlc, bool shortslot)
WLAN_CAPABILITY_SHORT_SLOT_TIME;
}
wlc_bmac_set_shortslot(wlc->hw, shortslot);
brcms_b_set_shortslot(wlc->hw, shortslot);
}
static u8 wlc_local_constraint_qdbm(struct wlc_info *wlc)
......@@ -793,10 +793,13 @@ void wlc_set_chanspec(struct wlc_info *wlc, chanspec_t chanspec)
CHSPEC_CHANNEL(chanspec));
return;
}
/* BMAC_NOTE: should the setband call come after the wlc_bmac_chanspec() ?
* if the setband updates (wlc_bsinit) use low level calls to inspect and
* set state, the state inspected may be from the wrong band, or the
* following wlc_bmac_set_chanspec() may undo the work.
/*
* should the setband call come after the
* brcms_b_chanspec() ? if the setband updates
* (wlc_bsinit) use low level calls to inspect and
* set state, the state inspected may be from the wrong
* band, or the following brcms_b_set_chanspec() may
* undo the work.
*/
wlc_setband(wlc, bandunit);
}
......@@ -1291,9 +1294,9 @@ void wlc_info_init(struct wlc_info *wlc, int unit)
static bool wlc_state_bmac_sync(struct wlc_info *wlc)
{
wlc_bmac_state_t state_bmac;
brcms_b_state_t state_bmac;
if (wlc_bmac_state_get(wlc->hw, &state_bmac) != 0)
if (brcms_b_state_get(wlc->hw, &state_bmac) != 0)
return false;
wlc->machwcap = state_bmac.machwcap;
......@@ -1386,7 +1389,7 @@ void *wlc_attach(struct brcms_info *wl, u16 vendor, u16 device, uint unit,
* low level attach steps(all hw accesses go
* inside, no more in rest of the attach)
*/
err = wlc_bmac_attach(wlc, vendor, device, unit, piomode, regsva,
err = brcms_b_attach(wlc, vendor, device, unit, piomode, regsva,
bustype, btparam);
if (err)
goto fail;
......@@ -1402,7 +1405,7 @@ void *wlc_attach(struct brcms_info *wl, u16 vendor, u16 device, uint unit,
pub->phy_11ncapable = WLC_PHY_11N_CAP(wlc->band);
/* propagate *vars* from BMAC driver to high driver */
wlc_bmac_copyfrom_vars(wlc->hw, &pub->vars, &wlc->vars_size);
brcms_b_copyfrom_vars(wlc->hw, &pub->vars, &wlc->vars_size);
/* set maximum allowed duty cycle */
......@@ -1428,7 +1431,7 @@ void *wlc_attach(struct brcms_info *wl, u16 vendor, u16 device, uint unit,
wlc->core->txavail[i] = wlc->hw->txavail[i];
}
wlc_bmac_hw_etheraddr(wlc->hw, wlc->perm_etheraddr);
brcms_b_hw_etheraddr(wlc->hw, wlc->perm_etheraddr);
memcpy(&pub->cur_etheraddr, &wlc->perm_etheraddr, ETH_ALEN);
......@@ -1576,10 +1579,10 @@ void *wlc_attach(struct brcms_info *wl, u16 vendor, u16 device, uint unit,
if ((wlc->pub->sih->chip) == BCM43235_CHIP_ID) {
if ((getintvar(wlc->pub->vars, "aa2g") == 7) ||
(getintvar(wlc->pub->vars, "aa5g") == 7)) {
wlc_bmac_antsel_set(wlc->hw, 1);
brcms_b_antsel_set(wlc->hw, 1);
}
} else {
wlc_bmac_antsel_set(wlc->hw, wlc->asi->antsel_avail);
brcms_b_antsel_set(wlc->hw, wlc->asi->antsel_avail);
}
if (perr)
......@@ -1716,7 +1719,7 @@ uint wlc_detach(struct wlc_info *wlc)
BCMMSG(wlc->wiphy, "wl%d\n", wlc->pub->unit);
callbacks += wlc_bmac_detach(wlc);
callbacks += brcms_b_detach(wlc);
/* delete software timers */
if (!wlc_radio_monitor_stop(wlc))
......@@ -1754,7 +1757,7 @@ static void wlc_radio_hwdisable_upd(struct wlc_info *wlc)
if (wlc->pub->wlfeatureflag & WL_SWFL_NOHWRADIO || wlc->pub->hw_off)
return;
if (wlc_bmac_radio_read_hwdisabled(wlc->hw)) {
if (brcms_b_radio_read_hwdisabled(wlc->hw)) {
mboolset(wlc->pub->radio_disabled, WL_RADIO_HW_DISABLE);
} else {
mboolclr(wlc->pub->radio_disabled, WL_RADIO_HW_DISABLE);
......@@ -1969,7 +1972,7 @@ static void wlc_watchdog(void *arg)
if (wlc->pub->radio_disabled)
return;
wlc_bmac_watchdog(wlc);
brcms_b_watchdog(wlc);
/* occasionally sample mac stat counters to detect 16-bit counter wrap */
if ((wlc->pub->now % SW_TIMER_MAC_STAT_UPD) == 0)
......@@ -2009,7 +2012,7 @@ int wlc_up(struct wlc_info *wlc)
return -ENOMEDIUM;
if (!wlc->pub->hw_up) {
wlc_bmac_hw_up(wlc->hw);
brcms_b_hw_up(wlc->hw);
wlc->pub->hw_up = true;
}
......@@ -2031,10 +2034,10 @@ int wlc_up(struct wlc_info *wlc)
* if radio is disabled, abort up, lower power, start radio timer and return 0(for NDIS)
* don't call radio_update to avoid looping wlc_up.
*
* wlc_bmac_up_prep() returns either 0 or -BCME_RADIOOFF only
* brcms_b_up_prep() returns either 0 or -BCME_RADIOOFF only
*/
if (!wlc->pub->radio_disabled) {
int status = wlc_bmac_up_prep(wlc->hw);
int status = brcms_b_up_prep(wlc->hw);
if (status == -ENOMEDIUM) {
if (!mboolisset
(wlc->pub->radio_disabled, WL_RADIO_HW_DISABLE)) {
......@@ -2061,7 +2064,7 @@ int wlc_up(struct wlc_info *wlc)
return 0;
}
/* wlc_bmac_up_prep has done wlc_corereset(). so clk is on, set it */
/* brcms_b_up_prep has done wlc_corereset(). so clk is on, set it */
wlc->clk = true;
wlc_radio_monitor_stop(wlc);
......@@ -2087,7 +2090,7 @@ int wlc_up(struct wlc_info *wlc)
wlc_enable_mac(wlc);
}
wlc_bmac_up_finish(wlc->hw);
brcms_b_up_finish(wlc->hw);
/* other software states up after ISR is running */
/* start APs that were to be brought up but are not up yet */
......@@ -2162,7 +2165,7 @@ uint wlc_down(struct wlc_info *wlc)
/* in between, mpc could try to bring down again.. */
wlc->going_down = true;
callbacks += wlc_bmac_down_prep(wlc->hw);
callbacks += brcms_b_bmac_down_prep(wlc->hw);
dev_gone = DEVICEREMOVED(wlc);
......@@ -2194,9 +2197,9 @@ uint wlc_down(struct wlc_info *wlc)
brcmu_pktq_flush(&qi->q, true, NULL, NULL);
}
callbacks += wlc_bmac_down_finish(wlc->hw);
callbacks += brcms_b_down_finish(wlc->hw);
/* wlc_bmac_down_finish has done wlc_coredisable(). so clk is off */
/* brcms_b_down_finish has done wlc_coredisable(). so clk is off */
wlc->clk = false;
wlc->going_down = false;
......@@ -2598,7 +2601,7 @@ _wlc_ioctl(struct wlc_info *wlc, int cmd, void *arg, int len,
int ac;
wlc->SRL = (u16) val;
wlc_bmac_retrylimit_upd(wlc->hw, wlc->SRL, wlc->LRL);
brcms_b_retrylimit_upd(wlc->hw, wlc->SRL, wlc->LRL);
for (ac = 0; ac < AC_COUNT; ac++) {
WLC_WME_RETRY_SHORT_SET(wlc, ac, wlc->SRL);
......@@ -2613,7 +2616,7 @@ _wlc_ioctl(struct wlc_info *wlc, int cmd, void *arg, int len,
int ac;
wlc->LRL = (u16) val;
wlc_bmac_retrylimit_upd(wlc->hw, wlc->SRL, wlc->LRL);
brcms_b_retrylimit_upd(wlc->hw, wlc->SRL, wlc->LRL);
for (ac = 0; ac < AC_COUNT; ac++) {
WLC_WME_RETRY_LONG_SET(wlc, ac, wlc->LRL);
......@@ -2889,8 +2892,8 @@ void wlc_statsupd(struct wlc_info *wlc)
#endif /* BCMDBG */
/* Read mac stats from contiguous shared memory */
wlc_bmac_copyfrom_shm(wlc->hw, M_UCODE_MACSTAT,
&macstats, sizeof(macstat_t));
brcms_b_copyfrom_shm(wlc->hw, M_UCODE_MACSTAT,
&macstats, sizeof(macstat_t));
#ifdef BCMDBG
/* check for rx fifo 0 overflow */
......@@ -3066,7 +3069,7 @@ void wlc_print_rxh(d11rxhdr_t *rxh)
static u16 wlc_rate_shm_offset(struct wlc_info *wlc, u8 rate)
{
return wlc_bmac_rate_shm_offset(wlc->hw, rate);
return brcms_b_rate_shm_offset(wlc->hw, rate);
}
/* Callback for device removed */
......@@ -3305,7 +3308,7 @@ wlc_txfifo(struct wlc_info *wlc, uint fifo, struct sk_buff *p, bool commit,
/* Bump up pending count for if not using rpc. If rpc is used, this will be handled
* in wlc_bmac_txfifo()
* in brcms_b_txfifo()
*/
if (commit) {
TXPKTPENDINC(wlc, fifo, txpktpend);
......@@ -4457,7 +4460,7 @@ void wlc_bcn_li_upd(struct wlc_info *wlc)
* |<---------- tsf_h ----------->||<--- tsf_l -->||<-RxTSFTime ->|
*
* The RxTSFTime are the lowest 16 bits and provided by the ucode. The
* tsf_l is filled in by wlc_bmac_recv, which is done earlier in the
* tsf_l is filled in by brcms_b_recv, which is done earlier in the
* receive call sequence after rx interrupt. Only the higher 16 bits
* are used. Finally, the tsf_h is read from the tsf register.
*/
......@@ -4466,7 +4469,7 @@ static u64 wlc_recover_tsf64(struct wlc_info *wlc, struct wlc_d11rxhdr *rxh)
u32 tsf_h, tsf_l;
u16 rx_tsf_0_15, rx_tsf_16_31;
wlc_bmac_read_tsf(wlc->hw, &tsf_l, &tsf_h);
brcms_b_read_tsf(wlc->hw, &tsf_l, &tsf_h);
rx_tsf_16_31 = (u16)(tsf_l >> 16);
rx_tsf_0_15 = rxh->rxhdr.RxTSFTime;
......@@ -5368,7 +5371,7 @@ wlc_bss_update_probe_resp(struct wlc_info *wlc, struct wlc_bsscfg *cfg,
wlc_suspend_mac_and_wait(wlc);
/* write the probe response into the template region */
wlc_bmac_write_template_ram(wlc->hw, T_PRS_TPL_BASE,
brcms_b_write_template_ram(wlc->hw, T_PRS_TPL_BASE,
(len + 3) & ~3, prb_resp);
/* write the length of the probe response frame (+PLCP/-FCS) */
......@@ -5626,7 +5629,7 @@ wlc_duty_cycle_set(struct wlc_info *wlc, int duty_cycle, bool isOFDM,
*/
u16 wlc_read_shm(struct wlc_info *wlc, uint offset)
{
return wlc_bmac_read_shm(wlc->hw, offset);
return brcms_b_read_shm(wlc->hw, offset);
}
/* Write a single u16 to shared memory.
......@@ -5634,7 +5637,7 @@ u16 wlc_read_shm(struct wlc_info *wlc, uint offset)
*/
void wlc_write_shm(struct wlc_info *wlc, uint offset, u16 v)
{
wlc_bmac_write_shm(wlc->hw, offset, v);
brcms_b_write_shm(wlc->hw, offset, v);
}
/* Copy a buffer to shared memory.
......@@ -5647,50 +5650,50 @@ void wlc_copyto_shm(struct wlc_info *wlc, uint offset, const void *buf, int len)
if (len <= 0 || (offset & 1) || (len & 1))
return;
wlc_bmac_copyto_objmem(wlc->hw, offset, buf, len, OBJADDR_SHM_SEL);
brcms_b_copyto_objmem(wlc->hw, offset, buf, len, OBJADDR_SHM_SEL);
}
/* wrapper BMAC functions to for HIGH driver access */
void wlc_mctrl(struct wlc_info *wlc, u32 mask, u32 val)
{
wlc_bmac_mctrl(wlc->hw, mask, val);
brcms_b_mctrl(wlc->hw, mask, val);
}
void wlc_mhf(struct wlc_info *wlc, u8 idx, u16 mask, u16 val, int bands)
{
wlc_bmac_mhf(wlc->hw, idx, mask, val, bands);
brcms_b_mhf(wlc->hw, idx, mask, val, bands);
}
int wlc_xmtfifo_sz_get(struct wlc_info *wlc, uint fifo, uint *blocks)
{
return wlc_bmac_xmtfifo_sz_get(wlc->hw, fifo, blocks);
return brcms_b_xmtfifo_sz_get(wlc->hw, fifo, blocks);
}
void wlc_write_template_ram(struct wlc_info *wlc, int offset, int len,
void *buf)
{
wlc_bmac_write_template_ram(wlc->hw, offset, len, buf);
brcms_b_write_template_ram(wlc->hw, offset, len, buf);
}
void wlc_write_hw_bcntemplates(struct wlc_info *wlc, void *bcn, int len,
bool both)
{
wlc_bmac_write_hw_bcntemplates(wlc->hw, bcn, len, both);
brcms_b_write_hw_bcntemplates(wlc->hw, bcn, len, both);
}
void
wlc_set_addrmatch(struct wlc_info *wlc, int match_reg_offset,
const u8 *addr)
{
wlc_bmac_set_addrmatch(wlc->hw, match_reg_offset, addr);
brcms_b_set_addrmatch(wlc->hw, match_reg_offset, addr);
if (match_reg_offset == RCM_BSSID_OFFSET)
memcpy(wlc->cfg->BSSID, addr, ETH_ALEN);
}
void wlc_pllreq(struct wlc_info *wlc, bool set, mbool req_bit)
{
wlc_bmac_pllreq(wlc->hw, set, req_bit);
brcms_b_pllreq(wlc->hw, set, req_bit);
}
void wlc_reset_bmac_done(struct wlc_info *wlc)
......
......@@ -100,24 +100,24 @@ void wlapi_intrsrestore(wlc_phy_shim_info_t *physhim, u32 macintmask)
void wlapi_bmac_write_shm(wlc_phy_shim_info_t *physhim, uint offset, u16 v)
{
wlc_bmac_write_shm(physhim->wlc_hw, offset, v);
brcms_b_write_shm(physhim->wlc_hw, offset, v);
}
u16 wlapi_bmac_read_shm(wlc_phy_shim_info_t *physhim, uint offset)
{
return wlc_bmac_read_shm(physhim->wlc_hw, offset);
return brcms_b_read_shm(physhim->wlc_hw, offset);
}
void
wlapi_bmac_mhf(wlc_phy_shim_info_t *physhim, u8 idx, u16 mask,
u16 val, int bands)
{
wlc_bmac_mhf(physhim->wlc_hw, idx, mask, val, bands);
brcms_b_mhf(physhim->wlc_hw, idx, mask, val, bands);
}
void wlapi_bmac_corereset(wlc_phy_shim_info_t *physhim, u32 flags)
{
wlc_bmac_corereset(physhim->wlc_hw, flags);
brcms_b_corereset(physhim->wlc_hw, flags);
}
void wlapi_suspend_mac_and_wait(wlc_phy_shim_info_t *physhim)
......@@ -127,7 +127,7 @@ void wlapi_suspend_mac_and_wait(wlc_phy_shim_info_t *physhim)
void wlapi_switch_macfreq(wlc_phy_shim_info_t *physhim, u8 spurmode)
{
wlc_bmac_switch_macfreq(physhim->wlc_hw, spurmode);
brcms_b_switch_macfreq(physhim->wlc_hw, spurmode);
}
void wlapi_enable_mac(wlc_phy_shim_info_t *physhim)
......@@ -137,42 +137,42 @@ void wlapi_enable_mac(wlc_phy_shim_info_t *physhim)
void wlapi_bmac_mctrl(wlc_phy_shim_info_t *physhim, u32 mask, u32 val)
{
wlc_bmac_mctrl(physhim->wlc_hw, mask, val);
brcms_b_mctrl(physhim->wlc_hw, mask, val);
}
void wlapi_bmac_phy_reset(wlc_phy_shim_info_t *physhim)
{
wlc_bmac_phy_reset(physhim->wlc_hw);
brcms_b_phy_reset(physhim->wlc_hw);
}
void wlapi_bmac_bw_set(wlc_phy_shim_info_t *physhim, u16 bw)
{
wlc_bmac_bw_set(physhim->wlc_hw, bw);
brcms_b_bw_set(physhim->wlc_hw, bw);
}
u16 wlapi_bmac_get_txant(wlc_phy_shim_info_t *physhim)
{
return wlc_bmac_get_txant(physhim->wlc_hw);
return brcms_b_get_txant(physhim->wlc_hw);
}
void wlapi_bmac_phyclk_fgc(wlc_phy_shim_info_t *physhim, bool clk)
{
wlc_bmac_phyclk_fgc(physhim->wlc_hw, clk);
brcms_b_phyclk_fgc(physhim->wlc_hw, clk);
}
void wlapi_bmac_macphyclk_set(wlc_phy_shim_info_t *physhim, bool clk)
{
wlc_bmac_macphyclk_set(physhim->wlc_hw, clk);
brcms_b_macphyclk_set(physhim->wlc_hw, clk);
}
void wlapi_bmac_core_phypll_ctl(wlc_phy_shim_info_t *physhim, bool on)
{
wlc_bmac_core_phypll_ctl(physhim->wlc_hw, on);
brcms_b_core_phypll_ctl(physhim->wlc_hw, on);
}
void wlapi_bmac_core_phypll_reset(wlc_phy_shim_info_t *physhim)
{
wlc_bmac_core_phypll_reset(physhim->wlc_hw);
brcms_b_core_phypll_reset(physhim->wlc_hw);
}
void wlapi_bmac_ucode_wake_override_phyreg_set(wlc_phy_shim_info_t *physhim)
......@@ -190,12 +190,12 @@ void
wlapi_bmac_write_template_ram(wlc_phy_shim_info_t *physhim, int offset,
int len, void *buf)
{
wlc_bmac_write_template_ram(physhim->wlc_hw, offset, len, buf);
brcms_b_write_template_ram(physhim->wlc_hw, offset, len, buf);
}
u16 wlapi_bmac_rate_shm_offset(wlc_phy_shim_info_t *physhim, u8 rate)
{
return wlc_bmac_rate_shm_offset(physhim->wlc_hw, rate);
return brcms_b_rate_shm_offset(physhim->wlc_hw, rate);
}
void wlapi_ucode_sample_init(wlc_phy_shim_info_t *physhim)
......@@ -206,12 +206,12 @@ void
wlapi_copyfrom_objmem(wlc_phy_shim_info_t *physhim, uint offset, void *buf,
int len, u32 sel)
{
wlc_bmac_copyfrom_objmem(physhim->wlc_hw, offset, buf, len, sel);
brcms_b_copyfrom_objmem(physhim->wlc_hw, offset, buf, len, sel);
}
void
wlapi_copyto_objmem(wlc_phy_shim_info_t *physhim, uint offset, const void *buf,
int l, u32 sel)
{
wlc_bmac_copyto_objmem(physhim->wlc_hw, offset, buf, l, sel);
brcms_b_copyto_objmem(physhim->wlc_hw, offset, buf, l, sel);
}
......@@ -194,7 +194,7 @@ static int wlc_stf_txcore_set(struct wlc_info *wlc, u8 Nsts, u8 core_mask)
* frames when 1 stream core map changed
*/
wlc->stf->phytxant = core_mask << PHY_TXC_ANT_SHIFT;
wlc_bmac_txant_set(wlc->hw, wlc->stf->phytxant);
brcms_b_txant_set(wlc->hw, wlc->stf->phytxant);
if (wlc->clk) {
wlc_suspend_mac_and_wait(wlc);
wlc_beacon_phytxctl_txant_upd(wlc, wlc->bcn_rspec);
......@@ -314,7 +314,7 @@ int wlc_stf_ss_update(struct wlc_info *wlc, struct wlcband *band)
}
if (prev_stf_ss != upd_stf_ss) {
wlc->stf->ss_opmode = upd_stf_ss;
wlc_bmac_band_stf_ss_set(wlc->hw, upd_stf_ss);
brcms_b_band_stf_ss_set(wlc->hw, upd_stf_ss);
}
return ret_code;
......@@ -396,7 +396,7 @@ static void _wlc_stf_phy_txant_upd(struct wlc_info *wlc)
wlc->stf->phytxant = PHY_TXC_OLD_ANT_LAST;
}
wlc_bmac_txant_set(wlc->hw, wlc->stf->phytxant);
brcms_b_txant_set(wlc->hw, wlc->stf->phytxant);
}
void wlc_stf_phy_txant_upd(struct wlc_info *wlc)
......
......@@ -374,7 +374,7 @@ struct wlcband;
typedef struct gpioh_item gpioh_item_t;
typedef struct si_info si_info_t;
typedef struct wlc_bmac_state wlc_bmac_state_t;
typedef struct brcms_b_state brcms_b_state_t;
typedef struct locale_info locale_info_t;
typedef struct locale_mimo_info locale_mimo_info_t;
typedef struct country_info country_info_t;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册