You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
staging: brcm80211: replaced Broadcom specific acronym WLC
WLC (caps) was replaced, wlc (small caps) has not been replaced yet. Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
bfaa5765fd
commit
7c783cefbc
@@ -590,7 +590,7 @@ struct brcmf_pub {
|
||||
char *pktfilter[100];
|
||||
int pktfilter_count;
|
||||
|
||||
u8 country_code[WLC_CNTRY_BUF_SZ];
|
||||
u8 country_code[BRCM_CNTRY_BUF_SZ];
|
||||
char eventmask[BRCMF_EVENTING_MASK_LEN];
|
||||
|
||||
};
|
||||
|
||||
@@ -363,18 +363,18 @@ do { \
|
||||
}
|
||||
|
||||
static struct ieee80211_rate __wl_rates[] = {
|
||||
RATETAB_ENT(WLC_RATE_1M, 0),
|
||||
RATETAB_ENT(WLC_RATE_2M, IEEE80211_RATE_SHORT_PREAMBLE),
|
||||
RATETAB_ENT(WLC_RATE_5M5, IEEE80211_RATE_SHORT_PREAMBLE),
|
||||
RATETAB_ENT(WLC_RATE_11M, IEEE80211_RATE_SHORT_PREAMBLE),
|
||||
RATETAB_ENT(WLC_RATE_6M, 0),
|
||||
RATETAB_ENT(WLC_RATE_9M, 0),
|
||||
RATETAB_ENT(WLC_RATE_12M, 0),
|
||||
RATETAB_ENT(WLC_RATE_18M, 0),
|
||||
RATETAB_ENT(WLC_RATE_24M, 0),
|
||||
RATETAB_ENT(WLC_RATE_36M, 0),
|
||||
RATETAB_ENT(WLC_RATE_48M, 0),
|
||||
RATETAB_ENT(WLC_RATE_54M, 0),
|
||||
RATETAB_ENT(BRCM_RATE_1M, 0),
|
||||
RATETAB_ENT(BRCM_RATE_2M, IEEE80211_RATE_SHORT_PREAMBLE),
|
||||
RATETAB_ENT(BRCM_RATE_5M5, IEEE80211_RATE_SHORT_PREAMBLE),
|
||||
RATETAB_ENT(BRCM_RATE_11M, IEEE80211_RATE_SHORT_PREAMBLE),
|
||||
RATETAB_ENT(BRCM_RATE_6M, 0),
|
||||
RATETAB_ENT(BRCM_RATE_9M, 0),
|
||||
RATETAB_ENT(BRCM_RATE_12M, 0),
|
||||
RATETAB_ENT(BRCM_RATE_18M, 0),
|
||||
RATETAB_ENT(BRCM_RATE_24M, 0),
|
||||
RATETAB_ENT(BRCM_RATE_36M, 0),
|
||||
RATETAB_ENT(BRCM_RATE_48M, 0),
|
||||
RATETAB_ENT(BRCM_RATE_54M, 0),
|
||||
};
|
||||
|
||||
#define wl_a_rates (__wl_rates + 4)
|
||||
@@ -895,7 +895,7 @@ static s32 brcmf_set_frag(struct net_device *dev, u32 frag_threshold)
|
||||
static s32 brcmf_set_retry(struct net_device *dev, u32 retry, bool l)
|
||||
{
|
||||
s32 err = 0;
|
||||
u32 cmd = (l ? WLC_SET_LRL : WLC_SET_SRL);
|
||||
u32 cmd = (l ? BRCM_SET_LRL : BRCM_SET_SRL);
|
||||
|
||||
retry = cpu_to_le32(retry);
|
||||
err = brcmf_dev_ioctl(dev, cmd, &retry, sizeof(retry));
|
||||
@@ -1025,7 +1025,7 @@ brcmf_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *dev,
|
||||
else
|
||||
bcnprd = cpu_to_le32(100);
|
||||
|
||||
err = brcmf_dev_ioctl(dev, WLC_SET_BCNPRD, &bcnprd, sizeof(bcnprd));
|
||||
err = brcmf_dev_ioctl(dev, BRCM_SET_BCNPRD, &bcnprd, sizeof(bcnprd));
|
||||
if (unlikely(err)) {
|
||||
WL_ERR("WLC_SET_BCNPRD failed (%d)\n", err);
|
||||
goto done;
|
||||
@@ -1068,7 +1068,7 @@ brcmf_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *dev,
|
||||
|
||||
/* set channel for starter */
|
||||
target_channel = cpu_to_le32(cfg_priv->channel);
|
||||
err = brcmf_dev_ioctl(dev, WLC_SET_CHANNEL,
|
||||
err = brcmf_dev_ioctl(dev, BRCM_SET_CHANNEL,
|
||||
&target_channel, sizeof(target_channel));
|
||||
if (unlikely(err)) {
|
||||
WL_ERR("WLC_SET_CHANNEL failed (%d)\n", err);
|
||||
@@ -2039,7 +2039,7 @@ brcmf_cfg80211_set_bitrate_mask(struct wiphy *wiphy, struct net_device *dev,
|
||||
|
||||
/* addr param is always NULL. ignore it */
|
||||
/* Get current rateset */
|
||||
err = brcmf_dev_ioctl(dev, WLC_GET_CURR_RATESET, &rateset,
|
||||
err = brcmf_dev_ioctl(dev, BRCM_GET_CURR_RATESET, &rateset,
|
||||
sizeof(rateset));
|
||||
if (unlikely(err)) {
|
||||
WL_ERR("could not get current rateset (%d)\n", err);
|
||||
@@ -3755,7 +3755,7 @@ brcmf_dongle_roam(struct net_device *ndev, u32 roamvar, u32 bcn_timeout)
|
||||
}
|
||||
|
||||
roamtrigger[0] = WL_ROAM_TRIGGER_LEVEL;
|
||||
roamtrigger[1] = WLC_BAND_ALL;
|
||||
roamtrigger[1] = BRCM_BAND_ALL;
|
||||
err = brcmf_dev_ioctl(ndev, BRCMF_C_SET_ROAM_TRIGGER,
|
||||
(void *)roamtrigger, sizeof(roamtrigger));
|
||||
if (unlikely(err)) {
|
||||
@@ -3764,7 +3764,7 @@ brcmf_dongle_roam(struct net_device *ndev, u32 roamvar, u32 bcn_timeout)
|
||||
}
|
||||
|
||||
roam_delta[0] = WL_ROAM_DELTA;
|
||||
roam_delta[1] = WLC_BAND_ALL;
|
||||
roam_delta[1] = BRCM_BAND_ALL;
|
||||
err = brcmf_dev_ioctl(ndev, BRCMF_C_SET_ROAM_DELTA,
|
||||
(void *)roam_delta, sizeof(roam_delta));
|
||||
if (unlikely(err)) {
|
||||
@@ -3865,8 +3865,8 @@ static s32 wl_update_wiphybands(struct brcmf_cfg80211_priv *cfg_priv)
|
||||
s8 phy;
|
||||
s32 err = 0;
|
||||
|
||||
err = brcmf_dev_ioctl(cfg_to_ndev(cfg_priv), WLC_GET_PHYLIST, &phy_list,
|
||||
sizeof(phy_list));
|
||||
err = brcmf_dev_ioctl(cfg_to_ndev(cfg_priv), BRCM_GET_PHYLIST,
|
||||
&phy_list, sizeof(phy_list));
|
||||
if (unlikely(err)) {
|
||||
WL_ERR("error (%d)\n", err);
|
||||
return err;
|
||||
|
||||
@@ -36,11 +36,11 @@ static void brcms_c_tunables_init(struct brcms_tunables *tunables, uint devid)
|
||||
tunables->maxscb = MAXSCB;
|
||||
tunables->ampdunummpdu = AMPDU_NUM_MPDU;
|
||||
tunables->maxpktcb = MAXPKTCB;
|
||||
tunables->maxucodebss = WLC_MAX_UCODE_BSS;
|
||||
tunables->maxucodebss4 = WLC_MAX_UCODE_BSS4;
|
||||
tunables->maxucodebss = BRCMS_MAX_UCODE_BSS;
|
||||
tunables->maxucodebss4 = BRCMS_MAX_UCODE_BSS4;
|
||||
tunables->maxbss = MAXBSS;
|
||||
tunables->datahiwat = WLC_DATAHIWAT;
|
||||
tunables->ampdudatahiwat = WLC_AMPDUDATAHIWAT;
|
||||
tunables->datahiwat = BRCMS_DATAHIWAT;
|
||||
tunables->ampdudatahiwat = BRCMS_AMPDUDATAHIWAT;
|
||||
tunables->rxbnd = RXBND;
|
||||
tunables->txsbnd = TXSBND;
|
||||
}
|
||||
@@ -169,7 +169,7 @@ struct brcms_c_info *brcms_c_attach_malloc(uint unit, uint *err, uint devid)
|
||||
}
|
||||
|
||||
wlc->modulecb =
|
||||
kzalloc(sizeof(struct modulecb) * WLC_MAXMODULES, GFP_ATOMIC);
|
||||
kzalloc(sizeof(struct modulecb) * BRCMS_MAXMODULES, GFP_ATOMIC);
|
||||
if (wlc->modulecb == NULL) {
|
||||
*err = 1009;
|
||||
goto fail;
|
||||
@@ -189,13 +189,14 @@ struct brcms_c_info *brcms_c_attach_malloc(uint unit, uint *err, uint devid)
|
||||
brcms_c_bsscfg_ID_assign(wlc, wlc->cfg);
|
||||
|
||||
wlc->wsec_def_keys[0] =
|
||||
kzalloc(sizeof(struct wsec_key) * WLC_DEFAULT_KEYS, GFP_ATOMIC);
|
||||
kzalloc(sizeof(struct wsec_key) * BRCMS_DEFAULT_KEYS,
|
||||
GFP_ATOMIC);
|
||||
if (wlc->wsec_def_keys[0] == NULL) {
|
||||
*err = 1015;
|
||||
goto fail;
|
||||
} else {
|
||||
int i;
|
||||
for (i = 1; i < WLC_DEFAULT_KEYS; i++) {
|
||||
for (i = 1; i < BRCMS_DEFAULT_KEYS; i++) {
|
||||
wlc->wsec_def_keys[i] = (struct wsec_key *)
|
||||
((unsigned long)wlc->wsec_def_keys[0] +
|
||||
(sizeof(struct wsec_key) * i));
|
||||
|
||||
@@ -164,7 +164,7 @@ struct ampdu_info *brcms_c_ampdu_attach(struct brcms_c_info *wlc)
|
||||
|
||||
ampdu->ffpld_rsvd = AMPDU_DEF_FFPLD_RSVD;
|
||||
/* bump max ampdu rcv size to 64k for all 11n devices except 4321A0 and 4321A1 */
|
||||
if (WLCISNPHY(wlc->band) && NREV_LT(wlc->band->phyrev, 2))
|
||||
if (BRCMS_ISNPHY(wlc->band) && NREV_LT(wlc->band->phyrev, 2))
|
||||
ampdu->rx_factor = IEEE80211_HT_MAX_AMPDU_32K;
|
||||
else
|
||||
ampdu->rx_factor = IEEE80211_HT_MAX_AMPDU_64K;
|
||||
@@ -443,10 +443,10 @@ brcms_c_sendampdu(struct ampdu_info *ampdu, struct brcms_txq_info *qi,
|
||||
struct sk_buff *p, *pkt[AMPDU_MAX_MPDU];
|
||||
u8 tid, ndelim;
|
||||
int err = 0;
|
||||
u8 preamble_type = WLC_GF_PREAMBLE;
|
||||
u8 fbr_preamble_type = WLC_GF_PREAMBLE;
|
||||
u8 rts_preamble_type = WLC_LONG_PREAMBLE;
|
||||
u8 rts_fbr_preamble_type = WLC_LONG_PREAMBLE;
|
||||
u8 preamble_type = BRCMS_GF_PREAMBLE;
|
||||
u8 fbr_preamble_type = BRCMS_GF_PREAMBLE;
|
||||
u8 rts_preamble_type = BRCMS_LONG_PREAMBLE;
|
||||
u8 rts_fbr_preamble_type = BRCMS_LONG_PREAMBLE;
|
||||
|
||||
bool rr = true, fbr = false;
|
||||
uint i, count = 0, fifo, seg_cnt = 0;
|
||||
@@ -551,8 +551,8 @@ brcms_c_sendampdu(struct ampdu_info *ampdu, struct brcms_txq_info *qi,
|
||||
}
|
||||
|
||||
/* extract the length info */
|
||||
len = fbr_iscck ? WLC_GET_CCK_PLCP_LEN(txh->FragPLCPFallback)
|
||||
: WLC_GET_MIMO_PLCP_LEN(txh->FragPLCPFallback);
|
||||
len = fbr_iscck ? BRCMS_GET_CCK_PLCP_LEN(txh->FragPLCPFallback)
|
||||
: BRCMS_GET_MIMO_PLCP_LEN(txh->FragPLCPFallback);
|
||||
|
||||
/* retrieve null delimiter count */
|
||||
ndelim = txh->RTSPLCPFallback[AMPDU_FBR_NULL_DELIM];
|
||||
@@ -622,8 +622,8 @@ brcms_c_sendampdu(struct ampdu_info *ampdu, struct brcms_txq_info *qi,
|
||||
|
||||
if (is40)
|
||||
mimo_ctlchbw =
|
||||
CHSPEC_SB_UPPER(WLC_BAND_PI_RADIO_CHANSPEC)
|
||||
? PHY_TXC1_BW_20MHZ_UP : PHY_TXC1_BW_20MHZ;
|
||||
CHSPEC_SB_UPPER(BRCMS_BAND_PI_RADIO_CHANSPEC)
|
||||
? PHY_TXC1_BW_20MHZ_UP : PHY_TXC1_BW_20MHZ;
|
||||
|
||||
/* rebuild the rspec and rspec_fallback */
|
||||
rspec = RSPEC_MIMORATE;
|
||||
@@ -717,31 +717,31 @@ brcms_c_sendampdu(struct ampdu_info *ampdu, struct brcms_txq_info *qi,
|
||||
|
||||
/* remove the pad len from last mpdu */
|
||||
fbr_iscck = ((le16_to_cpu(txh->XtraFrameTypes) & 0x3) == 0);
|
||||
len = fbr_iscck ? WLC_GET_CCK_PLCP_LEN(txh->FragPLCPFallback)
|
||||
: WLC_GET_MIMO_PLCP_LEN(txh->FragPLCPFallback);
|
||||
len = fbr_iscck ? BRCMS_GET_CCK_PLCP_LEN(txh->FragPLCPFallback)
|
||||
: BRCMS_GET_MIMO_PLCP_LEN(txh->FragPLCPFallback);
|
||||
ampdu_len -= roundup(len, 4) - len;
|
||||
|
||||
/* patch up the first txh & plcp */
|
||||
txh = (struct d11txh *) pkt[0]->data;
|
||||
plcp = (u8 *) (txh + 1);
|
||||
|
||||
WLC_SET_MIMO_PLCP_LEN(plcp, ampdu_len);
|
||||
BRCMS_SET_MIMO_PLCP_LEN(plcp, ampdu_len);
|
||||
/* mark plcp to indicate ampdu */
|
||||
WLC_SET_MIMO_PLCP_AMPDU(plcp);
|
||||
BRCMS_SET_MIMO_PLCP_AMPDU(plcp);
|
||||
|
||||
/* reset the mixed mode header durations */
|
||||
if (txh->MModeLen) {
|
||||
u16 mmodelen =
|
||||
brcms_c_calc_lsig_len(wlc, rspec, ampdu_len);
|
||||
txh->MModeLen = cpu_to_le16(mmodelen);
|
||||
preamble_type = WLC_MM_PREAMBLE;
|
||||
preamble_type = BRCMS_MM_PREAMBLE;
|
||||
}
|
||||
if (txh->MModeFbrLen) {
|
||||
u16 mmfbrlen =
|
||||
brcms_c_calc_lsig_len(wlc, rspec_fallback,
|
||||
ampdu_len);
|
||||
txh->MModeFbrLen = cpu_to_le16(mmfbrlen);
|
||||
fbr_preamble_type = WLC_MM_PREAMBLE;
|
||||
fbr_preamble_type = BRCMS_MM_PREAMBLE;
|
||||
}
|
||||
|
||||
/* set the preload length */
|
||||
@@ -759,11 +759,11 @@ brcms_c_sendampdu(struct ampdu_info *ampdu, struct brcms_txq_info *qi,
|
||||
rts = (struct ieee80211_rts *)&txh->rts_frame;
|
||||
if ((mch & TXC_PREAMBLE_RTS_MAIN_SHORT) ==
|
||||
TXC_PREAMBLE_RTS_MAIN_SHORT)
|
||||
rts_preamble_type = WLC_SHORT_PREAMBLE;
|
||||
rts_preamble_type = BRCMS_SHORT_PREAMBLE;
|
||||
|
||||
if ((mch & TXC_PREAMBLE_RTS_FB_SHORT) ==
|
||||
TXC_PREAMBLE_RTS_FB_SHORT)
|
||||
rts_fbr_preamble_type = WLC_SHORT_PREAMBLE;
|
||||
rts_fbr_preamble_type = BRCMS_SHORT_PREAMBLE;
|
||||
|
||||
durid =
|
||||
brcms_c_compute_rtscts_dur(wlc, use_cts, rts_rspec,
|
||||
@@ -788,8 +788,8 @@ brcms_c_sendampdu(struct ampdu_info *ampdu, struct brcms_txq_info *qi,
|
||||
if (fbr) {
|
||||
mch |= TXC_AMPDU_FBR;
|
||||
txh->MacTxControlHigh = cpu_to_le16(mch);
|
||||
WLC_SET_MIMO_PLCP_AMPDU(plcp);
|
||||
WLC_SET_MIMO_PLCP_AMPDU(txh->FragPLCPFallback);
|
||||
BRCMS_SET_MIMO_PLCP_AMPDU(plcp);
|
||||
BRCMS_SET_MIMO_PLCP_AMPDU(txh->FragPLCPFallback);
|
||||
}
|
||||
|
||||
BCMMSG(wlc->wiphy, "wl%d: count %d ampdu_len %d\n",
|
||||
@@ -1046,9 +1046,9 @@ brcms_c_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb,
|
||||
ini->tx_in_transit--;
|
||||
/* Use high prededence for retransmit to give some punch */
|
||||
/* brcms_c_txq_enq(wlc, scb, p,
|
||||
* WLC_PRIO_TO_PREC(tid)); */
|
||||
* BRCMS_PRIO_TO_PREC(tid)); */
|
||||
brcms_c_txq_enq(wlc, scb, p,
|
||||
WLC_PRIO_TO_HI_PREC(tid));
|
||||
BRCMS_PRIO_TO_HI_PREC(tid));
|
||||
} else {
|
||||
/* Retry timeout */
|
||||
ini->tx_in_transit--;
|
||||
@@ -1108,7 +1108,7 @@ static int brcms_c_ampdu_set(struct ampdu_info *ampdu, bool on)
|
||||
|
||||
static bool brcms_c_ampdu_cap(struct ampdu_info *ampdu)
|
||||
{
|
||||
if (WLC_PHY_11N_CAP(ampdu->wlc->band))
|
||||
if (BRCMS_PHY_11N_CAP(ampdu->wlc->band))
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
|
||||
@@ -31,11 +31,12 @@
|
||||
#define ANT_SELCFG_RX_DEF 3 /* default rx antenna configuration */
|
||||
|
||||
/* useful macros */
|
||||
#define WLC_ANTSEL_11N_0(ant) ((((ant) & ANT_SELCFG_MASK) >> 4) & 0xf)
|
||||
#define WLC_ANTSEL_11N_1(ant) (((ant) & ANT_SELCFG_MASK) & 0xf)
|
||||
#define WLC_ANTIDX_11N(ant) (((WLC_ANTSEL_11N_0(ant)) << 2) + (WLC_ANTSEL_11N_1(ant)))
|
||||
#define WLC_ANT_ISAUTO_11N(ant) (((ant) & ANT_SELCFG_AUTO) == ANT_SELCFG_AUTO)
|
||||
#define WLC_ANTSEL_11N(ant) ((ant) & ANT_SELCFG_MASK)
|
||||
#define BRCMS_ANTSEL_11N_0(ant) ((((ant) & ANT_SELCFG_MASK) >> 4) & 0xf)
|
||||
#define BRCMS_ANTSEL_11N_1(ant) (((ant) & ANT_SELCFG_MASK) & 0xf)
|
||||
#define BRCMS_ANTIDX_11N(ant) (((BRCMS_ANTSEL_11N_0(ant)) << 2) +\
|
||||
(BRCMS_ANTSEL_11N_1(ant)))
|
||||
#define BRCMS_ANT_ISAUTO_11N(ant) (((ant) & ANT_SELCFG_AUTO) == ANT_SELCFG_AUTO)
|
||||
#define BRCMS_ANTSEL_11N(ant) ((ant) & ANT_SELCFG_MASK)
|
||||
|
||||
/* antenna switch */
|
||||
/* defines for no boardlevel antenna diversity */
|
||||
@@ -263,7 +264,7 @@ static u8 brcms_c_antsel_id2antcfg(struct antsel_info *asi, u8 id)
|
||||
/* boardlevel antenna selection: convert ant_cfg to mimo_antsel (ucode interface) */
|
||||
static u16 brcms_c_antsel_antcfg2antsel(struct antsel_info *asi, u8 ant_cfg)
|
||||
{
|
||||
u8 idx = WLC_ANTIDX_11N(WLC_ANTSEL_11N(ant_cfg));
|
||||
u8 idx = BRCMS_ANTIDX_11N(BRCMS_ANTSEL_11N(ant_cfg));
|
||||
u16 mimo_antsel = 0;
|
||||
|
||||
if (asi->antsel_type == ANTSEL_2x4) {
|
||||
|
||||
@@ -38,7 +38,6 @@
|
||||
#define SYNTHPU_DLY_PHY_US_QT 100 /* QT synthpu_dly time in us */
|
||||
|
||||
#ifndef BMAC_DUP_TO_REMOVE
|
||||
#define WLC_RM_WAIT_TX_SUSPEND 4 /* Wait Tx Suspend */
|
||||
|
||||
#define ANTCNT 10 /* vanilla M_MAX_ANTCNT value */
|
||||
|
||||
@@ -186,7 +185,7 @@ static void WLBANDINITFN(brcms_c_ucode_bsinit) (struct brcms_hardware *wlc_hw)
|
||||
|
||||
/* do band-specific ucode IHR, SHM, and SCR inits */
|
||||
if (D11REV_IS(wlc_hw->corerev, 23)) {
|
||||
if (WLCISNPHY(wlc_hw->band)) {
|
||||
if (BRCMS_ISNPHY(wlc_hw->band)) {
|
||||
brcms_c_write_inits(wlc_hw, d11n0bsinitvals16);
|
||||
} else {
|
||||
wiphy_err(wiphy, "%s: wl%d: unsupported phy in corerev"
|
||||
@@ -195,7 +194,7 @@ static void WLBANDINITFN(brcms_c_ucode_bsinit) (struct brcms_hardware *wlc_hw)
|
||||
}
|
||||
} else {
|
||||
if (D11REV_IS(wlc_hw->corerev, 24)) {
|
||||
if (WLCISLCNPHY(wlc_hw->band)) {
|
||||
if (BRCMS_ISLCNPHY(wlc_hw->band)) {
|
||||
brcms_c_write_inits(wlc_hw,
|
||||
d11lcn0bsinitvals24);
|
||||
} else
|
||||
@@ -421,7 +420,7 @@ brcms_b_set_chanspec(struct brcms_hardware *wlc_hw, chanspec_t chanspec,
|
||||
|
||||
/* Switch bands if necessary */
|
||||
if (NBANDS_HW(wlc_hw) > 1) {
|
||||
bandunit = CHSPEC_WLCBANDUNIT(chanspec);
|
||||
bandunit = CHSPEC_BANDUNIT(chanspec);
|
||||
if (wlc_hw->band->bandunit != bandunit) {
|
||||
/* brcms_b_setband disables other bandunit,
|
||||
* use light band switch if not up yet
|
||||
@@ -501,7 +500,7 @@ static bool brcms_b_attach_dmapio(struct brcms_c_info *wlc, uint j, bool wme)
|
||||
NULL), DMAREG(wlc_hw, DMA_RX, 0),
|
||||
(wme ? tune->ntxd : 0), tune->nrxd,
|
||||
tune->rxbufsz, -1, tune->nrxbufpost,
|
||||
WL_HWRXOFF, &brcm_msg_level);
|
||||
BRCMS_HWRXOFF, &brcm_msg_level);
|
||||
dma_attach_err |= (NULL == wlc_hw->di[0]);
|
||||
|
||||
/*
|
||||
@@ -681,7 +680,7 @@ int brcms_b_attach(struct brcms_c_info *wlc, u16 vendor, u16 device, uint unit,
|
||||
* But it will be called again inside wlc_corereset, after d11 is out of reset.
|
||||
*/
|
||||
brcms_b_clkctl_clk(wlc_hw, CLK_FAST);
|
||||
brcms_b_corereset(wlc_hw, WLC_USE_COREFLAGS);
|
||||
brcms_b_corereset(wlc_hw, BRCMS_USE_COREFLAGS);
|
||||
|
||||
if (!brcms_b_validate_chip_access(wlc_hw)) {
|
||||
wiphy_err(wiphy, "wl%d: brcms_b_attach: validate_chip_access "
|
||||
@@ -708,7 +707,7 @@ int brcms_b_attach(struct brcms_c_info *wlc, u16 vendor, u16 device, uint unit,
|
||||
wlc_hw->boardflags2 = (u32) getintvar(vars, "boardflags2");
|
||||
|
||||
if (wlc_hw->boardflags & BFL_NOPLLDOWN)
|
||||
brcms_b_pllreq(wlc_hw, true, WLC_PLLREQ_SHARED);
|
||||
brcms_b_pllreq(wlc_hw, true, BRCMS_PLLREQ_SHARED);
|
||||
|
||||
if ((wlc_hw->sih->bustype == PCI_BUS)
|
||||
&& (ai_pci_war16165(wlc_hw->sih)))
|
||||
@@ -788,9 +787,9 @@ int brcms_b_attach(struct brcms_c_info *wlc, u16 vendor, u16 device, uint unit,
|
||||
brcms_c_setxband(wlc_hw, j);
|
||||
|
||||
wlc_hw->band->bandunit = j;
|
||||
wlc_hw->band->bandtype = j ? WLC_BAND_5G : WLC_BAND_2G;
|
||||
wlc_hw->band->bandtype = j ? BRCM_BAND_5G : BRCM_BAND_2G;
|
||||
wlc->band->bandunit = j;
|
||||
wlc->band->bandtype = j ? WLC_BAND_5G : WLC_BAND_2G;
|
||||
wlc->band->bandtype = j ? BRCM_BAND_5G : BRCM_BAND_2G;
|
||||
wlc->core->coreidx = ai_coreidx(wlc_hw->sih);
|
||||
|
||||
wlc_hw->machwcap = R_REG(®s->machwcap);
|
||||
@@ -824,12 +823,12 @@ int brcms_b_attach(struct brcms_c_info *wlc, u16 vendor, u16 device, uint unit,
|
||||
wlc_phy_get_coreflags(wlc_hw->band->pi);
|
||||
|
||||
/* verify good phy_type & supported phy revision */
|
||||
if (WLCISNPHY(wlc_hw->band)) {
|
||||
if (BRCMS_ISNPHY(wlc_hw->band)) {
|
||||
if (NCONF_HAS(wlc_hw->band->phyrev))
|
||||
goto good_phy;
|
||||
else
|
||||
goto bad_phy;
|
||||
} else if (WLCISLCNPHY(wlc_hw->band)) {
|
||||
} else if (BRCMS_ISLCNPHY(wlc_hw->band)) {
|
||||
if (LCNCONF_HAS(wlc_hw->band->phyrev))
|
||||
goto good_phy;
|
||||
else
|
||||
@@ -1002,7 +1001,7 @@ void brcms_b_reset(struct brcms_hardware *wlc_hw)
|
||||
|
||||
/* reset the core */
|
||||
if (!DEVICEREMOVED(wlc_hw->wlc))
|
||||
brcms_b_corereset(wlc_hw, WLC_USE_COREFLAGS);
|
||||
brcms_b_corereset(wlc_hw, BRCMS_USE_COREFLAGS);
|
||||
|
||||
/* purge the dma rings */
|
||||
brcms_c_flushqueues(wlc_hw->wlc);
|
||||
@@ -1028,7 +1027,7 @@ brcms_b_init(struct brcms_hardware *wlc_hw, chanspec_t chanspec,
|
||||
macintmask = brcms_intrsoff(wlc->wl);
|
||||
|
||||
/* set up the specified band and chanspec */
|
||||
brcms_c_setxband(wlc_hw, CHSPEC_WLCBANDUNIT(chanspec));
|
||||
brcms_c_setxband(wlc_hw, CHSPEC_BANDUNIT(chanspec));
|
||||
wlc_phy_chanspec_radio_set(wlc_hw->band->pi, chanspec);
|
||||
|
||||
/* do one-time phy inits and calibration */
|
||||
@@ -1047,10 +1046,10 @@ brcms_b_init(struct brcms_hardware *wlc_hw, chanspec_t chanspec,
|
||||
/* restore macintmask */
|
||||
brcms_intrsrestore(wlc->wl, macintmask);
|
||||
|
||||
/* seed wake_override with WLC_WAKE_OVERRIDE_MACSUSPEND since the mac is suspended
|
||||
* and brcms_c_enable_mac() will clear this override bit.
|
||||
/* seed wake_override with BRCMS_WAKE_OVERRIDE_MACSUSPEND since the mac
|
||||
* is suspended and brcms_c_enable_mac() will clear this override bit.
|
||||
*/
|
||||
mboolset(wlc_hw->wake_override, WLC_WAKE_OVERRIDE_MACSUSPEND);
|
||||
mboolset(wlc_hw->wake_override, BRCMS_WAKE_OVERRIDE_MACSUSPEND);
|
||||
|
||||
/*
|
||||
* initialize mac_suspend_depth to 1 to match ucode initial suspended state
|
||||
@@ -1101,7 +1100,7 @@ int brcms_b_up_prep(struct brcms_hardware *wlc_hw)
|
||||
ai_pci_up(wlc_hw->sih);
|
||||
|
||||
/* reset the d11 core */
|
||||
brcms_b_corereset(wlc_hw, WLC_USE_COREFLAGS);
|
||||
brcms_b_corereset(wlc_hw, BRCMS_USE_COREFLAGS);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1274,10 +1273,10 @@ static void brcms_b_clkctl_clk(struct brcms_hardware *wlc_hw, uint mode)
|
||||
*/
|
||||
if (wlc_hw->forcefastclk)
|
||||
mboolset(wlc_hw->wake_override,
|
||||
WLC_WAKE_OVERRIDE_FORCEFAST);
|
||||
BRCMS_WAKE_OVERRIDE_FORCEFAST);
|
||||
else
|
||||
mboolclr(wlc_hw->wake_override,
|
||||
WLC_WAKE_OVERRIDE_FORCEFAST);
|
||||
BRCMS_WAKE_OVERRIDE_FORCEFAST);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1295,7 +1294,7 @@ brcms_c_mhfdef(struct brcms_c_info *wlc, u16 *mhfs, u16 mhf2_init)
|
||||
if (wlc_hw->boardflags & BFL_NOPLLDOWN)
|
||||
mhfs[MHF1] |= MHF1_FORCEFASTCLK;
|
||||
|
||||
if (WLCISNPHY(wlc_hw->band) && NREV_LT(wlc_hw->band->phyrev, 2)) {
|
||||
if (BRCMS_ISNPHY(wlc_hw->band) && NREV_LT(wlc_hw->band->phyrev, 2)) {
|
||||
mhfs[MHF2] |= MHF2_NPHY40MHZ_WAR;
|
||||
mhfs[MHF1] |= MHF1_IQSWAP_WAR;
|
||||
}
|
||||
@@ -1307,10 +1306,10 @@ brcms_c_mhfdef(struct brcms_c_info *wlc, u16 *mhfs, u16 mhf2_init)
|
||||
* pre-CLK changes should use wlc_write_mhf to get around the optimization
|
||||
*
|
||||
*
|
||||
* bands values are: WLC_BAND_AUTO <--- Current band only
|
||||
* WLC_BAND_5G <--- 5G band only
|
||||
* WLC_BAND_2G <--- 2G band only
|
||||
* WLC_BAND_ALL <--- All bands
|
||||
* bands values are: BRCM_BAND_AUTO <--- Current band only
|
||||
* BRCM_BAND_5G <--- 5G band only
|
||||
* BRCM_BAND_2G <--- 2G band only
|
||||
* BRCM_BAND_ALL <--- All bands
|
||||
*/
|
||||
void
|
||||
brcms_b_mhf(struct brcms_hardware *wlc_hw, u8 idx, u16 mask, u16 val,
|
||||
@@ -1330,14 +1329,14 @@ brcms_b_mhf(struct brcms_hardware *wlc_hw, u8 idx, u16 mask, u16 val,
|
||||
/* Current band only or all bands,
|
||||
* then set the band to current band
|
||||
*/
|
||||
case WLC_BAND_AUTO:
|
||||
case WLC_BAND_ALL:
|
||||
case BRCM_BAND_AUTO:
|
||||
case BRCM_BAND_ALL:
|
||||
band = wlc_hw->band;
|
||||
break;
|
||||
case WLC_BAND_5G:
|
||||
case BRCM_BAND_5G:
|
||||
band = wlc_hw->bandstate[BAND_5G_INDEX];
|
||||
break;
|
||||
case WLC_BAND_2G:
|
||||
case BRCM_BAND_2G:
|
||||
band = wlc_hw->bandstate[BAND_2G_INDEX];
|
||||
break;
|
||||
default:
|
||||
@@ -1357,7 +1356,7 @@ brcms_b_mhf(struct brcms_hardware *wlc_hw, u8 idx, u16 mask, u16 val,
|
||||
(u16) band->mhfs[idx]);
|
||||
}
|
||||
|
||||
if (bands == WLC_BAND_ALL) {
|
||||
if (bands == BRCM_BAND_ALL) {
|
||||
wlc_hw->bandstate[0]->mhfs[idx] =
|
||||
(wlc_hw->bandstate[0]->mhfs[idx] & ~mask) | val;
|
||||
wlc_hw->bandstate[1]->mhfs[idx] =
|
||||
@@ -1372,13 +1371,13 @@ u16 brcms_b_mhf_get(struct brcms_hardware *wlc_hw, u8 idx, int bands)
|
||||
if (idx >= MHFMAX)
|
||||
return 0; /* error condition */
|
||||
switch (bands) {
|
||||
case WLC_BAND_AUTO:
|
||||
case BRCM_BAND_AUTO:
|
||||
band = wlc_hw->band;
|
||||
break;
|
||||
case WLC_BAND_5G:
|
||||
case BRCM_BAND_5G:
|
||||
band = wlc_hw->bandstate[BAND_5G_INDEX];
|
||||
break;
|
||||
case WLC_BAND_2G:
|
||||
case BRCM_BAND_2G:
|
||||
band = wlc_hw->bandstate[BAND_2G_INDEX];
|
||||
break;
|
||||
default:
|
||||
@@ -1678,9 +1677,9 @@ static void WLBANDINITFN(brcms_b_upd_synthpu) (struct brcms_hardware *wlc_hw)
|
||||
struct brcms_c_info *wlc = wlc_hw->wlc;
|
||||
/* update SYNTHPU_DLY */
|
||||
|
||||
if (WLCISLCNPHY(wlc->band)) {
|
||||
if (BRCMS_ISLCNPHY(wlc->band)) {
|
||||
v = SYNTHPU_DLY_LPPHY_US;
|
||||
} else if (WLCISNPHY(wlc->band) && (NREV_GE(wlc->band->phyrev, 3))) {
|
||||
} else if (BRCMS_ISNPHY(wlc->band) && (NREV_GE(wlc->band->phyrev, 3))) {
|
||||
v = SYNTHPU_DLY_NPHY_US;
|
||||
} else {
|
||||
v = SYNTHPU_DLY_BPHY_US;
|
||||
@@ -1772,7 +1771,7 @@ void brcms_b_core_phypll_reset(struct brcms_hardware *wlc_hw)
|
||||
void brcms_b_phyclk_fgc(struct brcms_hardware *wlc_hw, bool clk)
|
||||
{
|
||||
/* support(necessary for NPHY and HYPHY) only */
|
||||
if (!WLCISNPHY(wlc_hw->band))
|
||||
if (!BRCMS_ISNPHY(wlc_hw->band))
|
||||
return;
|
||||
|
||||
if (ON == clk)
|
||||
@@ -1804,7 +1803,7 @@ void brcms_b_phy_reset(struct brcms_hardware *wlc_hw)
|
||||
phy_bw_clkbits = wlc_phy_clk_bwbits(wlc_hw->band->pi);
|
||||
|
||||
/* Specific reset sequence required for NPHY rev 3 and 4 */
|
||||
if (WLCISNPHY(wlc_hw->band) && NREV_GE(wlc_hw->band->phyrev, 3) &&
|
||||
if (BRCMS_ISNPHY(wlc_hw->band) && NREV_GE(wlc_hw->band->phyrev, 3) &&
|
||||
NREV_LE(wlc_hw->band->phyrev, 4)) {
|
||||
/* Set the PHY bandwidth */
|
||||
ai_core_cflags(wlc_hw->sih, SICF_BWMASK, phy_bw_clkbits);
|
||||
@@ -2065,7 +2064,7 @@ void brcms_b_corereset(struct brcms_hardware *wlc_hw, u32 flags)
|
||||
bool fastclk;
|
||||
u32 resetbits = 0;
|
||||
|
||||
if (flags == WLC_USE_COREFLAGS)
|
||||
if (flags == BRCMS_USE_COREFLAGS)
|
||||
flags = (wlc_hw->band->pi ? wlc_hw->band->core_flags : 0);
|
||||
|
||||
BCMMSG(wlc_hw->wlc->wiphy, "wl%d\n", wlc_hw->unit);
|
||||
@@ -2238,14 +2237,14 @@ static void brcms_b_coreinit(struct brcms_c_info *wlc)
|
||||
sflags = ai_core_sflags(wlc_hw->sih, 0, 0);
|
||||
|
||||
if (D11REV_IS(wlc_hw->corerev, 23)) {
|
||||
if (WLCISNPHY(wlc_hw->band))
|
||||
if (BRCMS_ISNPHY(wlc_hw->band))
|
||||
brcms_c_write_inits(wlc_hw, d11n0initvals16);
|
||||
else
|
||||
wiphy_err(wiphy, "%s: wl%d: unsupported phy in corerev"
|
||||
" %d\n", __func__, wlc_hw->unit,
|
||||
wlc_hw->corerev);
|
||||
} else if (D11REV_IS(wlc_hw->corerev, 24)) {
|
||||
if (WLCISLCNPHY(wlc_hw->band)) {
|
||||
if (BRCMS_ISLCNPHY(wlc_hw->band)) {
|
||||
brcms_c_write_inits(wlc_hw, d11lcn0initvals24);
|
||||
} else {
|
||||
wiphy_err(wiphy, "%s: wl%d: unsupported phy in corerev"
|
||||
@@ -2403,7 +2402,7 @@ void brcms_b_switch_macfreq(struct brcms_hardware *wlc_hw, u8 spurmode)
|
||||
W_REG(®s->tsf_clk_frac_l, 0x8889);
|
||||
W_REG(®s->tsf_clk_frac_h, 0x8);
|
||||
}
|
||||
} else if (WLCISLCNPHY(wlc_hw->band)) {
|
||||
} else if (BRCMS_ISLCNPHY(wlc_hw->band)) {
|
||||
if (spurmode == WL_SPURAVOID_ON1) { /* 82Mhz */
|
||||
W_REG(®s->tsf_clk_frac_l, 0x7CE0);
|
||||
W_REG(®s->tsf_clk_frac_h, 0xC);
|
||||
@@ -2440,9 +2439,9 @@ static void brcms_c_gpio_init(struct brcms_c_info *wlc)
|
||||
if (wlc_hw->antsel_type == ANTSEL_2x3) {
|
||||
/* Enable antenna diversity, use 2x3 mode */
|
||||
brcms_b_mhf(wlc_hw, MHF3, MHF3_ANTSEL_EN,
|
||||
MHF3_ANTSEL_EN, WLC_BAND_ALL);
|
||||
MHF3_ANTSEL_EN, BRCM_BAND_ALL);
|
||||
brcms_b_mhf(wlc_hw, MHF3, MHF3_ANTSEL_MODE,
|
||||
MHF3_ANTSEL_MODE, WLC_BAND_ALL);
|
||||
MHF3_ANTSEL_MODE, BRCM_BAND_ALL);
|
||||
|
||||
/* init superswitch control */
|
||||
wlc_phy_antsel_init(wlc_hw->band->pi, false);
|
||||
@@ -2460,9 +2459,9 @@ static void brcms_c_gpio_init(struct brcms_c_info *wlc)
|
||||
|
||||
/* Enable antenna diversity, use 2x4 mode */
|
||||
brcms_b_mhf(wlc_hw, MHF3, MHF3_ANTSEL_EN,
|
||||
MHF3_ANTSEL_EN, WLC_BAND_ALL);
|
||||
MHF3_ANTSEL_EN, BRCM_BAND_ALL);
|
||||
brcms_b_mhf(wlc_hw, MHF3, MHF3_ANTSEL_MODE, 0,
|
||||
WLC_BAND_ALL);
|
||||
BRCM_BAND_ALL);
|
||||
|
||||
/* Configure the desired clock to be 4Mhz */
|
||||
brcms_b_write_shm(wlc_hw, M_ANTSEL_CLKDIV,
|
||||
@@ -2486,7 +2485,7 @@ static void brcms_ucode_download(struct brcms_hardware *wlc_hw)
|
||||
return;
|
||||
|
||||
if (D11REV_IS(wlc_hw->corerev, 23)) {
|
||||
if (WLCISNPHY(wlc_hw->band)) {
|
||||
if (BRCMS_ISNPHY(wlc_hw->band)) {
|
||||
brcms_ucode_write(wlc_hw, bcm43xx_16_mimo,
|
||||
bcm43xx_16_mimosz);
|
||||
wlc_hw->ucode_loaded = true;
|
||||
@@ -2495,7 +2494,7 @@ static void brcms_ucode_download(struct brcms_hardware *wlc_hw)
|
||||
"corerev %d\n",
|
||||
__func__, wlc_hw->unit, wlc_hw->corerev);
|
||||
} else if (D11REV_IS(wlc_hw->corerev, 24)) {
|
||||
if (WLCISLCNPHY(wlc_hw->band)) {
|
||||
if (BRCMS_ISLCNPHY(wlc_hw->band)) {
|
||||
brcms_ucode_write(wlc_hw, bcm43xx_24_lcn,
|
||||
bcm43xx_24_lcnsz);
|
||||
wlc_hw->ucode_loaded = true;
|
||||
@@ -2796,7 +2795,7 @@ static void brcms_b_tx_fifo_suspend(struct brcms_hardware *wlc_hw,
|
||||
/* force the core awake only if not already */
|
||||
if (wlc_hw->suspended_fifos == 0)
|
||||
brcms_c_ucode_wake_override_set(wlc_hw,
|
||||
WLC_WAKE_OVERRIDE_TXFIFO);
|
||||
BRCMS_WAKE_OVERRIDE_TXFIFO);
|
||||
|
||||
wlc_hw->suspended_fifos |= fifo;
|
||||
|
||||
@@ -2805,12 +2804,12 @@ static void brcms_b_tx_fifo_suspend(struct brcms_hardware *wlc_hw,
|
||||
* which may result in mismatch between ucode and driver
|
||||
* so suspend the mac before suspending the FIFO
|
||||
*/
|
||||
if (WLC_PHY_11N_CAP(wlc_hw->band))
|
||||
if (BRCMS_PHY_11N_CAP(wlc_hw->band))
|
||||
brcms_c_suspend_mac_and_wait(wlc_hw->wlc);
|
||||
|
||||
dma_txsuspend(wlc_hw->di[tx_fifo]);
|
||||
|
||||
if (WLC_PHY_11N_CAP(wlc_hw->band))
|
||||
if (BRCMS_PHY_11N_CAP(wlc_hw->band))
|
||||
brcms_c_enable_mac(wlc_hw->wlc);
|
||||
}
|
||||
}
|
||||
@@ -2818,7 +2817,7 @@ static void brcms_b_tx_fifo_suspend(struct brcms_hardware *wlc_hw,
|
||||
static void brcms_b_tx_fifo_resume(struct brcms_hardware *wlc_hw,
|
||||
uint tx_fifo)
|
||||
{
|
||||
/* BMAC_NOTE: WLC_TX_FIFO_ENAB is done in brcms_c_dpc() for DMA case
|
||||
/* BMAC_NOTE: BRCMS_TX_FIFO_ENAB is done in brcms_c_dpc() for DMA case
|
||||
* but need to be done here for PIO otherwise the watchdog will catch
|
||||
* the inconsistency and fire
|
||||
*/
|
||||
@@ -2833,7 +2832,7 @@ static void brcms_b_tx_fifo_resume(struct brcms_hardware *wlc_hw,
|
||||
wlc_hw->suspended_fifos &= ~(1 << tx_fifo);
|
||||
if (wlc_hw->suspended_fifos == 0)
|
||||
brcms_c_ucode_wake_override_clear(wlc_hw,
|
||||
WLC_WAKE_OVERRIDE_TXFIFO);
|
||||
BRCMS_WAKE_OVERRIDE_TXFIFO);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3048,7 +3047,7 @@ void brcms_c_suspend_mac_and_wait(struct brcms_c_info *wlc)
|
||||
return;
|
||||
|
||||
/* force the core awake */
|
||||
brcms_c_ucode_wake_override_set(wlc_hw, WLC_WAKE_OVERRIDE_MACSUSPEND);
|
||||
brcms_c_ucode_wake_override_set(wlc_hw, BRCMS_WAKE_OVERRIDE_MACSUSPEND);
|
||||
|
||||
mc = R_REG(®s->maccontrol);
|
||||
|
||||
@@ -3074,12 +3073,12 @@ void brcms_c_suspend_mac_and_wait(struct brcms_c_info *wlc)
|
||||
brcms_b_mctrl(wlc_hw, MCTL_EN_MAC, 0);
|
||||
|
||||
SPINWAIT(!(R_REG(®s->macintstatus) & MI_MACSSPNDD),
|
||||
WLC_MAX_MAC_SUSPEND);
|
||||
BRCMS_MAX_MAC_SUSPEND);
|
||||
|
||||
if (!(R_REG(®s->macintstatus) & MI_MACSSPNDD)) {
|
||||
wiphy_err(wiphy, "wl%d: wlc_suspend_mac_and_wait: waited %d uS"
|
||||
" and MI_MACSSPNDD is still not on.\n",
|
||||
wlc_hw->unit, WLC_MAX_MAC_SUSPEND);
|
||||
wlc_hw->unit, BRCMS_MAX_MAC_SUSPEND);
|
||||
wiphy_err(wiphy, "wl%d: psmdebug 0x%08x, phydebug 0x%08x, "
|
||||
"psm_brc 0x%04x\n", wlc_hw->unit,
|
||||
R_REG(®s->psmdebug),
|
||||
@@ -3131,21 +3130,22 @@ void brcms_c_enable_mac(struct brcms_c_info *wlc)
|
||||
mi = R_REG(®s->macintstatus);
|
||||
WARN_ON(mi & MI_MACSSPNDD);
|
||||
|
||||
brcms_c_ucode_wake_override_clear(wlc_hw, WLC_WAKE_OVERRIDE_MACSUSPEND);
|
||||
brcms_c_ucode_wake_override_clear(wlc_hw,
|
||||
BRCMS_WAKE_OVERRIDE_MACSUSPEND);
|
||||
}
|
||||
|
||||
static void brcms_upd_ofdm_pctl1_table(struct brcms_hardware *wlc_hw)
|
||||
{
|
||||
u8 rate;
|
||||
u8 rates[8] = {
|
||||
WLC_RATE_6M, WLC_RATE_9M, WLC_RATE_12M, WLC_RATE_18M,
|
||||
WLC_RATE_24M, WLC_RATE_36M, WLC_RATE_48M, WLC_RATE_54M
|
||||
BRCM_RATE_6M, BRCM_RATE_9M, BRCM_RATE_12M, BRCM_RATE_18M,
|
||||
BRCM_RATE_24M, BRCM_RATE_36M, BRCM_RATE_48M, BRCM_RATE_54M
|
||||
};
|
||||
u16 entry_ptr;
|
||||
u16 pctl1;
|
||||
uint i;
|
||||
|
||||
if (!WLC_PHY_11N_CAP(wlc_hw->band))
|
||||
if (!BRCMS_PHY_11N_CAP(wlc_hw->band))
|
||||
return;
|
||||
|
||||
/* walk the phy rate table and update the entries */
|
||||
@@ -3179,14 +3179,14 @@ static u16 brcms_b_ofdm_ratetable_offset(struct brcms_hardware *wlc_hw,
|
||||
};
|
||||
/* OFDM RATE sub-field of PLCP SIGNAL field, per 802.11 sec 17.3.4.1 */
|
||||
const struct plcp_signal_rate_lookup rate_lookup[] = {
|
||||
{WLC_RATE_6M, 0xB},
|
||||
{WLC_RATE_9M, 0xF},
|
||||
{WLC_RATE_12M, 0xA},
|
||||
{WLC_RATE_18M, 0xE},
|
||||
{WLC_RATE_24M, 0x9},
|
||||
{WLC_RATE_36M, 0xD},
|
||||
{WLC_RATE_48M, 0x8},
|
||||
{WLC_RATE_54M, 0xC}
|
||||
{BRCM_RATE_6M, 0xB},
|
||||
{BRCM_RATE_9M, 0xF},
|
||||
{BRCM_RATE_12M, 0xA},
|
||||
{BRCM_RATE_18M, 0xE},
|
||||
{BRCM_RATE_24M, 0x9},
|
||||
{BRCM_RATE_36M, 0xD},
|
||||
{BRCM_RATE_48M, 0x8},
|
||||
{BRCM_RATE_54M, 0xC}
|
||||
};
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(rate_lookup); i++) {
|
||||
@@ -3543,7 +3543,7 @@ void brcms_b_pllreq(struct brcms_hardware *wlc_hw, bool set, mbool req_bit)
|
||||
|
||||
mboolset(wlc_hw->pllreq, req_bit);
|
||||
|
||||
if (mboolisset(wlc_hw->pllreq, WLC_PLLREQ_FLIP)) {
|
||||
if (mboolisset(wlc_hw->pllreq, BRCMS_PLLREQ_FLIP)) {
|
||||
if (!wlc_hw->sbclk) {
|
||||
brcms_b_xtal(wlc_hw, ON);
|
||||
}
|
||||
@@ -3554,7 +3554,7 @@ void brcms_b_pllreq(struct brcms_hardware *wlc_hw, bool set, mbool req_bit)
|
||||
|
||||
mboolclr(wlc_hw->pllreq, req_bit);
|
||||
|
||||
if (mboolisset(wlc_hw->pllreq, WLC_PLLREQ_FLIP)) {
|
||||
if (mboolisset(wlc_hw->pllreq, BRCMS_PLLREQ_FLIP)) {
|
||||
if (wlc_hw->sbclk) {
|
||||
brcms_b_xtal(wlc_hw, OFF);
|
||||
}
|
||||
@@ -3578,7 +3578,7 @@ u16 brcms_b_rate_shm_offset(struct brcms_hardware *wlc_hw, u8 rate)
|
||||
/* for a given rate, the LS-nibble of the PLCP SIGNAL field is
|
||||
* the index into the rate table.
|
||||
*/
|
||||
phy_rate = rate_info[rate] & WLC_RATE_MASK;
|
||||
phy_rate = rate_info[rate] & BRCMS_RATE_MASK;
|
||||
index = phy_rate & 0xf;
|
||||
|
||||
/* Find the SHM pointer to the rate table entry by looking in the
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -17,7 +17,8 @@
|
||||
#ifndef _BRCM_CHANNEL_H_
|
||||
#define _BRCM_CHANNEL_H_
|
||||
|
||||
#define WLC_TXPWR_DB_FACTOR 4 /* conversion for phy txpwr cacluations that use .25 dB units */
|
||||
/* conversion for phy txpwr calculations that use .25 dB units */
|
||||
#define BRCMS_TXPWR_DB_FACTOR 4
|
||||
|
||||
|
||||
/* maxpwr mapping to 5GHz band channels:
|
||||
@@ -46,8 +47,10 @@
|
||||
#define CHANNEL_POWER_IDX_5G(c) \
|
||||
(((c) < 52) ? 0 : (((c) < 62) ? 1 : (((c) < 100) ? 2 : (((c) < 149) ? 3 : 4))))
|
||||
|
||||
#define WLC_MAXPWR_TBL_SIZE 6 /* max of BAND_5G_PWR_LVLS and 6 for 2.4 GHz */
|
||||
#define WLC_MAXPWR_MIMO_TBL_SIZE 14 /* max of BAND_5G_PWR_LVLS and 14 for 2.4 GHz */
|
||||
/* max of BAND_5G_PWR_LVLS and 6 for 2.4 GHz */
|
||||
#define BRCMS_MAXPWR_TBL_SIZE 6
|
||||
/* max of BAND_5G_PWR_LVLS and 14 for 2.4 GHz */
|
||||
#define BRCMS_MAXPWR_MIMO_TBL_SIZE 14
|
||||
|
||||
#define NBANDS(wlc) ((wlc)->pub->_nbands)
|
||||
#define NBANDS_PUB(pub) ((pub)->_nbands)
|
||||
@@ -58,9 +61,12 @@
|
||||
/* locale channel and power info. */
|
||||
struct locale_info {
|
||||
u32 valid_channels;
|
||||
u8 radar_channels; /* List of radar sensitive channels */
|
||||
u8 restricted_channels; /* List of channels used only if APs are detected */
|
||||
s8 maxpwr[WLC_MAXPWR_TBL_SIZE]; /* Max tx pwr in qdBm for each sub-band */
|
||||
/* List of radar sensitive channels */
|
||||
u8 radar_channels;
|
||||
/* List of channels used only if APs are detected */
|
||||
u8 restricted_channels;
|
||||
/* Max tx pwr in qdBm for each sub-band */
|
||||
s8 maxpwr[BRCMS_MAXPWR_TBL_SIZE];
|
||||
s8 pub_maxpwr[BAND_5G_PWR_LVLS]; /* Country IE advertised max tx pwr in dBm
|
||||
* per sub-band
|
||||
*/
|
||||
@@ -68,25 +74,27 @@ struct locale_info {
|
||||
};
|
||||
|
||||
/* bits for locale_info flags */
|
||||
#define WLC_PEAK_CONDUCTED 0x00 /* Peak for locals */
|
||||
#define WLC_EIRP 0x01 /* Flag for EIRP */
|
||||
#define WLC_DFS_TPC 0x02 /* Flag for DFS TPC */
|
||||
#define WLC_NO_OFDM 0x04 /* Flag for No OFDM */
|
||||
#define WLC_NO_40MHZ 0x08 /* Flag for No MIMO 40MHz */
|
||||
#define WLC_NO_MIMO 0x10 /* Flag for No MIMO, 20 or 40 MHz */
|
||||
#define WLC_RADAR_TYPE_EU 0x20 /* Flag for EU */
|
||||
#define WLC_DFS_FCC WLC_DFS_TPC /* Flag for DFS FCC */
|
||||
#define WLC_DFS_EU (WLC_DFS_TPC | WLC_RADAR_TYPE_EU) /* Flag for DFS EU */
|
||||
#define BRCMS_PEAK_CONDUCTED 0x00 /* Peak for locals */
|
||||
#define BRCMS_EIRP 0x01 /* Flag for EIRP */
|
||||
#define BRCMS_DFS_TPC 0x02 /* Flag for DFS TPC */
|
||||
#define BRCMS_NO_OFDM 0x04 /* Flag for No OFDM */
|
||||
#define BRCMS_NO_40MHZ 0x08 /* Flag for No MIMO 40MHz */
|
||||
#define BRCMS_NO_MIMO 0x10 /* Flag for No MIMO, 20 or 40 MHz */
|
||||
#define BRCMS_RADAR_TYPE_EU 0x20 /* Flag for EU */
|
||||
#define BRCMS_DFS_FCC BRCMS_DFS_TPC /* Flag for DFS FCC */
|
||||
#define BRCMS_DFS_EU (BRCMS_DFS_TPC | BRCMS_RADAR_TYPE_EU) /* Flag for DFS EU */
|
||||
|
||||
#define ISDFS_EU(fl) (((fl) & WLC_DFS_EU) == WLC_DFS_EU)
|
||||
#define ISDFS_EU(fl) (((fl) & BRCMS_DFS_EU) == BRCMS_DFS_EU)
|
||||
|
||||
/* locale per-channel tx power limits for MIMO frames
|
||||
* maxpwr arrays are index by channel for 2.4 GHz limits, and
|
||||
* by sub-band for 5 GHz limits using CHANNEL_POWER_IDX_5G(channel)
|
||||
*/
|
||||
struct locale_mimo_info {
|
||||
s8 maxpwr20[WLC_MAXPWR_MIMO_TBL_SIZE]; /* tx 20 MHz power limits, qdBm units */
|
||||
s8 maxpwr40[WLC_MAXPWR_MIMO_TBL_SIZE]; /* tx 40 MHz power limits, qdBm units */
|
||||
/* tx 20 MHz power limits, qdBm units */
|
||||
s8 maxpwr20[BRCMS_MAXPWR_MIMO_TBL_SIZE];
|
||||
/* tx 40 MHz power limits, qdBm units */
|
||||
s8 maxpwr40[BRCMS_MAXPWR_MIMO_TBL_SIZE];
|
||||
u8 flags;
|
||||
};
|
||||
|
||||
|
||||
@@ -681,17 +681,17 @@ struct cck_phy_hdr {
|
||||
#define MIMO_PLCP_40MHZ 0x80 /* 40 Hz frame */
|
||||
#define MIMO_PLCP_AMPDU 0x08 /* ampdu */
|
||||
|
||||
#define WLC_GET_CCK_PLCP_LEN(plcp) (plcp[4] + (plcp[5] << 8))
|
||||
#define WLC_GET_MIMO_PLCP_LEN(plcp) (plcp[1] + (plcp[2] << 8))
|
||||
#define WLC_SET_MIMO_PLCP_LEN(plcp, len) \
|
||||
#define BRCMS_GET_CCK_PLCP_LEN(plcp) (plcp[4] + (plcp[5] << 8))
|
||||
#define BRCMS_GET_MIMO_PLCP_LEN(plcp) (plcp[1] + (plcp[2] << 8))
|
||||
#define BRCMS_SET_MIMO_PLCP_LEN(plcp, len) \
|
||||
do { \
|
||||
plcp[1] = len & 0xff; \
|
||||
plcp[2] = ((len >> 8) & 0xff); \
|
||||
} while (0);
|
||||
|
||||
#define WLC_SET_MIMO_PLCP_AMPDU(plcp) (plcp[3] |= MIMO_PLCP_AMPDU)
|
||||
#define WLC_CLR_MIMO_PLCP_AMPDU(plcp) (plcp[3] &= ~MIMO_PLCP_AMPDU)
|
||||
#define WLC_IS_MIMO_PLCP_AMPDU(plcp) (plcp[3] & MIMO_PLCP_AMPDU)
|
||||
#define BRCMS_SET_MIMO_PLCP_AMPDU(plcp) (plcp[3] |= MIMO_PLCP_AMPDU)
|
||||
#define BRCMS_CLR_MIMO_PLCP_AMPDU(plcp) (plcp[3] &= ~MIMO_PLCP_AMPDU)
|
||||
#define BRCMS_IS_MIMO_PLCP_AMPDU(plcp) (plcp[3] & MIMO_PLCP_AMPDU)
|
||||
|
||||
/* The dot11a PLCP header is 5 bytes. To simplify the software (so that we
|
||||
* don't need e.g. different tx DMA headers for 11a and 11b), the PLCP header has
|
||||
|
||||
@@ -248,7 +248,7 @@ ieee_set_channel(struct ieee80211_hw *hw, struct ieee80211_channel *chan,
|
||||
switch (type) {
|
||||
case NL80211_CHAN_HT20:
|
||||
case NL80211_CHAN_NO_HT:
|
||||
err = brcms_c_set(wl->wlc, WLC_SET_CHANNEL, chan->hw_value);
|
||||
err = brcms_c_set(wl->wlc, BRCM_SET_CHANNEL, chan->hw_value);
|
||||
break;
|
||||
case NL80211_CHAN_HT40MINUS:
|
||||
case NL80211_CHAN_HT40PLUS:
|
||||
@@ -310,13 +310,13 @@ static int brcms_ops_config(struct ieee80211_hw *hw, u32 changed)
|
||||
}
|
||||
if (changed & IEEE80211_CONF_CHANGE_RETRY_LIMITS) {
|
||||
if (brcms_c_set
|
||||
(wl->wlc, WLC_SET_SRL,
|
||||
(wl->wlc, BRCM_SET_SRL,
|
||||
conf->short_frame_max_tx_count) < 0) {
|
||||
wiphy_err(wiphy, "%s: Error setting srl\n", __func__);
|
||||
err = -EIO;
|
||||
goto config_out;
|
||||
}
|
||||
if (brcms_c_set(wl->wlc, WLC_SET_LRL,
|
||||
if (brcms_c_set(wl->wlc, BRCM_SET_LRL,
|
||||
conf->long_frame_max_tx_count) < 0) {
|
||||
wiphy_err(wiphy, "%s: Error setting lrl\n", __func__);
|
||||
err = -EIO;
|
||||
@@ -355,7 +355,7 @@ brcms_ops_bss_info_changed(struct ieee80211_hw *hw,
|
||||
else
|
||||
val = 0;
|
||||
LOCK(wl);
|
||||
brcms_c_set(wl->wlc, WLC_SET_SHORTSLOT_OVERRIDE, val);
|
||||
brcms_c_set(wl->wlc, BRCMS_SET_SHORTSLOT_OVERRIDE, val);
|
||||
UNLOCK(wl);
|
||||
}
|
||||
|
||||
@@ -364,11 +364,11 @@ brcms_ops_bss_info_changed(struct ieee80211_hw *hw,
|
||||
u16 mode = info->ht_operation_mode;
|
||||
|
||||
LOCK(wl);
|
||||
brcms_c_protection_upd(wl->wlc, WLC_PROT_N_CFG,
|
||||
brcms_c_protection_upd(wl->wlc, BRCMS_PROT_N_CFG,
|
||||
mode & IEEE80211_HT_OP_MODE_PROTECTION);
|
||||
brcms_c_protection_upd(wl->wlc, WLC_PROT_N_NONGF,
|
||||
brcms_c_protection_upd(wl->wlc, BRCMS_PROT_N_NONGF,
|
||||
mode & IEEE80211_HT_OP_MODE_NON_GF_STA_PRSNT);
|
||||
brcms_c_protection_upd(wl->wlc, WLC_PROT_N_OBSS,
|
||||
brcms_c_protection_upd(wl->wlc, BRCMS_PROT_N_OBSS,
|
||||
mode & IEEE80211_HT_OP_MODE_NON_HT_STA_PRSNT);
|
||||
UNLOCK(wl);
|
||||
}
|
||||
@@ -381,7 +381,7 @@ brcms_ops_bss_info_changed(struct ieee80211_hw *hw,
|
||||
|
||||
/* retrieve the current rates */
|
||||
LOCK(wl);
|
||||
error = brcms_c_ioctl(wl->wlc, WLC_GET_CURR_RATESET,
|
||||
error = brcms_c_ioctl(wl->wlc, BRCM_GET_CURR_RATESET,
|
||||
&rs, sizeof(rs), NULL);
|
||||
UNLOCK(wl);
|
||||
if (error) {
|
||||
@@ -402,13 +402,13 @@ brcms_ops_bss_info_changed(struct ieee80211_hw *hw,
|
||||
|
||||
/* update the rate set */
|
||||
LOCK(wl);
|
||||
brcms_c_ioctl(wl->wlc, WLC_SET_RATESET, &rs, sizeof(rs), NULL);
|
||||
brcms_c_ioctl(wl->wlc, BRCM_SET_RATESET, &rs, sizeof(rs), NULL);
|
||||
UNLOCK(wl);
|
||||
}
|
||||
if (changed & BSS_CHANGED_BEACON_INT) {
|
||||
/* Beacon interval changed */
|
||||
LOCK(wl);
|
||||
brcms_c_set(wl->wlc, WLC_SET_BCNPRD, info->beacon_int);
|
||||
brcms_c_set(wl->wlc, BRCM_SET_BCNPRD, info->beacon_int);
|
||||
UNLOCK(wl);
|
||||
}
|
||||
if (changed & BSS_CHANGED_BSSID) {
|
||||
@@ -1045,7 +1045,7 @@ static int ieee_hw_rate_init(struct ieee80211_hw *hw)
|
||||
hw->wiphy->bands[IEEE80211_BAND_2GHZ] = NULL;
|
||||
hw->wiphy->bands[IEEE80211_BAND_5GHZ] = NULL;
|
||||
|
||||
if (brcms_c_get(wl->wlc, WLC_GET_PHYLIST, (int *)&phy_list) < 0)
|
||||
if (brcms_c_get(wl->wlc, BRCM_GET_PHYLIST, (int *)&phy_list) < 0)
|
||||
wiphy_err(hw->wiphy, "Phy list failed\n");
|
||||
|
||||
if (phy_list[0] == 'n' || phy_list[0] == 'c') {
|
||||
@@ -1382,9 +1382,9 @@ static void brcms_set_basic_rate(struct wl_rateset *rs, u16 rate, bool is_br)
|
||||
continue;
|
||||
|
||||
if (is_br)
|
||||
rs->rates[i] |= WLC_RATE_FLAG;
|
||||
rs->rates[i] |= BRCMS_RATE_FLAG;
|
||||
else
|
||||
rs->rates[i] &= WLC_RATE_MASK;
|
||||
rs->rates[i] &= BRCMS_RATE_MASK;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#include <linux/interrupt.h>
|
||||
|
||||
/* softmac ioctl definitions */
|
||||
#define WLC_SET_SHORTSLOT_OVERRIDE 146
|
||||
#define BRCMS_SET_SHORTSLOT_OVERRIDE 146
|
||||
|
||||
|
||||
/* BMAC Note: High-only driver is no longer working in softirq context as it needs to block and
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -24,10 +24,12 @@
|
||||
#include "d11.h"
|
||||
|
||||
#define MA_WINDOW_SZ 8 /* moving average window size */
|
||||
#define WL_HWRXOFF 38 /* chip rx buffer offset */
|
||||
#define BRCMS_HWRXOFF 38 /* chip rx buffer offset */
|
||||
#define INVCHANNEL 255 /* invalid channel */
|
||||
#define MAXCOREREV 28 /* max # supported core revisions (0 .. MAXCOREREV - 1) */
|
||||
#define WLC_MAXMODULES 22 /* max # brcms_c_module_register() calls */
|
||||
/* max # supported core revisions (0 .. MAXCOREREV - 1) */
|
||||
#define MAXCOREREV 28
|
||||
/* max # brcms_c_module_register() calls */
|
||||
#define BRCMS_MAXMODULES 22
|
||||
|
||||
#define SEQNUM_SHIFT 4
|
||||
#define AMPDU_DELIMITER_LEN 4
|
||||
@@ -41,14 +43,15 @@
|
||||
|
||||
#define NTXRATE 64 /* # tx MPDUs rate is reported for */
|
||||
|
||||
#define WLC_BITSCNT(x) brcmu_bitcount((u8 *)&(x), sizeof(u8))
|
||||
#define BRCMS_BITSCNT(x) brcmu_bitcount((u8 *)&(x), sizeof(u8))
|
||||
|
||||
/* Maximum wait time for a MAC suspend */
|
||||
#define WLC_MAX_MAC_SUSPEND 83000 /* uS: 83mS is max packet time (64KB ampdu @ 6Mbps) */
|
||||
/* uS: 83mS is max packet time (64KB ampdu @ 6Mbps) */
|
||||
#define BRCMS_MAX_MAC_SUSPEND 83000
|
||||
|
||||
/* Probe Response timeout - responses for probe requests older that this are tossed, zero to disable
|
||||
*/
|
||||
#define WLC_PRB_RESP_TIMEOUT 0 /* Disable probe response timeout */
|
||||
#define BRCMS_PRB_RESP_TIMEOUT 0 /* Disable probe response timeout */
|
||||
|
||||
/* transmit buffer max headroom for protocol headers */
|
||||
#define TXOFF (D11_TXH_LEN + D11_PHY_HDR_LEN)
|
||||
@@ -83,26 +86,28 @@
|
||||
#define VALID_COREREV(corerev) CONF_HAS(D11CONF, corerev)
|
||||
|
||||
/* values for shortslot_override */
|
||||
#define WLC_SHORTSLOT_AUTO -1 /* Driver will manage Shortslot setting */
|
||||
#define WLC_SHORTSLOT_OFF 0 /* Turn off short slot */
|
||||
#define WLC_SHORTSLOT_ON 1 /* Turn on short slot */
|
||||
#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 */
|
||||
|
||||
/* value for short/long and mixmode/greenfield preamble */
|
||||
|
||||
#define WLC_LONG_PREAMBLE (0)
|
||||
#define WLC_SHORT_PREAMBLE (1 << 0)
|
||||
#define WLC_GF_PREAMBLE (1 << 1)
|
||||
#define WLC_MM_PREAMBLE (1 << 2)
|
||||
#define WLC_IS_MIMO_PREAMBLE(_pre) (((_pre) == WLC_GF_PREAMBLE) || ((_pre) == WLC_MM_PREAMBLE))
|
||||
#define BRCMS_LONG_PREAMBLE (0)
|
||||
#define BRCMS_SHORT_PREAMBLE (1 << 0)
|
||||
#define BRCMS_GF_PREAMBLE (1 << 1)
|
||||
#define BRCMS_MM_PREAMBLE (1 << 2)
|
||||
#define BRCMS_IS_MIMO_PREAMBLE(_pre) (((_pre) == BRCMS_GF_PREAMBLE) || \
|
||||
((_pre) == BRCMS_MM_PREAMBLE))
|
||||
|
||||
/* values for barker_preamble */
|
||||
#define WLC_BARKER_SHORT_ALLOWED 0 /* Short pre-amble allowed */
|
||||
#define BRCMS_BARKER_SHORT_ALLOWED 0 /* Short pre-amble allowed */
|
||||
|
||||
/* A fifo is full. Clear precedences related to that FIFO */
|
||||
#define WLC_TX_FIFO_CLEAR(wlc, fifo) ((wlc)->tx_prec_map &= ~(wlc)->fifo2prec_map[fifo])
|
||||
#define BRCMS_TX_FIFO_CLEAR(wlc, fifo) \
|
||||
((wlc)->tx_prec_map &= ~(wlc)->fifo2prec_map[fifo])
|
||||
|
||||
/* Fifo is NOT full. Enable precedences for that FIFO */
|
||||
#define WLC_TX_FIFO_ENAB(wlc, fifo) ((wlc)->tx_prec_map |= (wlc)->fifo2prec_map[fifo])
|
||||
#define BRCMS_TX_FIFO_ENAB(wlc, fifo) \
|
||||
((wlc)->tx_prec_map |= (wlc)->fifo2prec_map[fifo])
|
||||
|
||||
/* TxFrameID */
|
||||
/* seq and frag bits: SEQNUM_SHIFT, FRAGNUM_MASK (802.11.h) */
|
||||
@@ -121,10 +126,10 @@
|
||||
/* if wpa is in use then portopen is true when the group key is plumbed otherwise it is always true
|
||||
*/
|
||||
#define WSEC_ENABLED(wsec) ((wsec) & (WEP_ENABLED | TKIP_ENABLED | AES_ENABLED))
|
||||
#define WLC_SW_KEYS(wlc, bsscfg) ((((wlc)->wsec_swkeys) || \
|
||||
#define BRCMS_SW_KEYS(wlc, bsscfg) ((((wlc)->wsec_swkeys) || \
|
||||
((bsscfg)->wsec & WSEC_SWFLAG)))
|
||||
|
||||
#define WLC_PORTOPEN(cfg) \
|
||||
#define BRCMS_PORTOPEN(cfg) \
|
||||
(((cfg)->WPA_auth != WPA_AUTH_DISABLED && WSEC_ENABLED((cfg)->wsec)) ? \
|
||||
(cfg)->wsec_portopen : true)
|
||||
|
||||
@@ -136,11 +141,11 @@
|
||||
extern const u8 prio2fifo[];
|
||||
|
||||
/* Ucode MCTL_WAKE override bits */
|
||||
#define WLC_WAKE_OVERRIDE_CLKCTL 0x01
|
||||
#define WLC_WAKE_OVERRIDE_PHYREG 0x02
|
||||
#define WLC_WAKE_OVERRIDE_MACSUSPEND 0x04
|
||||
#define WLC_WAKE_OVERRIDE_TXFIFO 0x08
|
||||
#define WLC_WAKE_OVERRIDE_FORCEFAST 0x10
|
||||
#define BRCMS_WAKE_OVERRIDE_CLKCTL 0x01
|
||||
#define BRCMS_WAKE_OVERRIDE_PHYREG 0x02
|
||||
#define BRCMS_WAKE_OVERRIDE_MACSUSPEND 0x04
|
||||
#define BRCMS_WAKE_OVERRIDE_TXFIFO 0x08
|
||||
#define BRCMS_WAKE_OVERRIDE_FORCEFAST 0x10
|
||||
|
||||
/* stuff pulled in from wlc.c */
|
||||
|
||||
@@ -179,24 +184,32 @@ extern const u8 prio2fifo[];
|
||||
|
||||
#define NFIFO 6 /* # tx/rx fifopairs */
|
||||
|
||||
#define WLC_WME_RETRY_SHORT_GET(wlc, ac) GFIELD(wlc->wme_retries[ac], EDCF_SHORT)
|
||||
#define WLC_WME_RETRY_SFB_GET(wlc, ac) GFIELD(wlc->wme_retries[ac], EDCF_SFB)
|
||||
#define WLC_WME_RETRY_LONG_GET(wlc, ac) GFIELD(wlc->wme_retries[ac], EDCF_LONG)
|
||||
#define WLC_WME_RETRY_LFB_GET(wlc, ac) GFIELD(wlc->wme_retries[ac], EDCF_LFB)
|
||||
#define BRCMS_WME_RETRY_SHORT_GET(wlc, ac) \
|
||||
GFIELD(wlc->wme_retries[ac], EDCF_SHORT)
|
||||
#define BRCMS_WME_RETRY_SFB_GET(wlc, ac) \
|
||||
GFIELD(wlc->wme_retries[ac], EDCF_SFB)
|
||||
#define BRCMS_WME_RETRY_LONG_GET(wlc, ac) \
|
||||
GFIELD(wlc->wme_retries[ac], EDCF_LONG)
|
||||
#define BRCMS_WME_RETRY_LFB_GET(wlc, ac) \
|
||||
GFIELD(wlc->wme_retries[ac], EDCF_LFB)
|
||||
|
||||
#define WLC_WME_RETRY_SHORT_SET(wlc, ac, val) \
|
||||
#define BRCMS_WME_RETRY_SHORT_SET(wlc, ac, val) \
|
||||
(wlc->wme_retries[ac] = SFIELD(wlc->wme_retries[ac], EDCF_SHORT, val))
|
||||
#define WLC_WME_RETRY_SFB_SET(wlc, ac, val) \
|
||||
#define BRCMS_WME_RETRY_SFB_SET(wlc, ac, val) \
|
||||
(wlc->wme_retries[ac] = SFIELD(wlc->wme_retries[ac], EDCF_SFB, val))
|
||||
#define WLC_WME_RETRY_LONG_SET(wlc, ac, val) \
|
||||
#define BRCMS_WME_RETRY_LONG_SET(wlc, ac, val) \
|
||||
(wlc->wme_retries[ac] = SFIELD(wlc->wme_retries[ac], EDCF_LONG, val))
|
||||
#define WLC_WME_RETRY_LFB_SET(wlc, ac, val) \
|
||||
#define BRCMS_WME_RETRY_LFB_SET(wlc, ac, val) \
|
||||
(wlc->wme_retries[ac] = SFIELD(wlc->wme_retries[ac], EDCF_LFB, val))
|
||||
|
||||
/* PLL requests */
|
||||
#define WLC_PLLREQ_SHARED 0x1 /* pll is shared on old chips */
|
||||
#define WLC_PLLREQ_RADIO_MON 0x2 /* hold pll for radio monitor register checking */
|
||||
#define WLC_PLLREQ_FLIP 0x4 /* hold/release pll for some short operation */
|
||||
|
||||
/* 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
|
||||
|
||||
/*
|
||||
* Macros to check if AP or STA is active.
|
||||
@@ -227,7 +240,7 @@ extern const u8 prio2fifo[];
|
||||
(MCTL_PSM_JMP_0 | MCTL_IHR_EN)) != MCTL_IHR_EN) : \
|
||||
(ai_deviceremoved(wlc->hw->sih)))
|
||||
|
||||
#define WLCWLUNIT(wlc) ((wlc)->pub->unit)
|
||||
#define BRCMS_UNIT(wlc) ((wlc)->pub->unit)
|
||||
|
||||
struct brcms_protection {
|
||||
bool _g; /* use g spec protection, driver internal */
|
||||
@@ -270,37 +283,41 @@ struct brcms_stf {
|
||||
s8 spatial_policy;
|
||||
};
|
||||
|
||||
#define WLC_STF_SS_STBC_TX(wlc, scb) \
|
||||
#define BRCMS_STF_SS_STBC_TX(wlc, scb) \
|
||||
(((wlc)->stf->txstreams > 1) && (((wlc)->band->band_stf_stbc_tx == ON) || \
|
||||
(SCB_STBC_CAP((scb)) && \
|
||||
(wlc)->band->band_stf_stbc_tx == AUTO && \
|
||||
isset(&((wlc)->stf->ss_algo_channel), PHY_TXC1_MODE_STBC))))
|
||||
|
||||
#define WLC_STBC_CAP_PHY(wlc) (WLCISNPHY(wlc->band) && NREV_GE(wlc->band->phyrev, 3))
|
||||
#define BRCMS_STBC_CAP_PHY(wlc) (BRCMS_ISNPHY(wlc->band) && \
|
||||
NREV_GE(wlc->band->phyrev, 3))
|
||||
|
||||
#define WLC_SGI_CAP_PHY(wlc) ((WLCISNPHY(wlc->band) && NREV_GE(wlc->band->phyrev, 3)) || \
|
||||
WLCISLCNPHY(wlc->band))
|
||||
#define BRCMS_SGI_CAP_PHY(wlc) ((BRCMS_ISNPHY(wlc->band) && \
|
||||
NREV_GE(wlc->band->phyrev, 3)) || \
|
||||
BRCMS_ISLCNPHY(wlc->band))
|
||||
|
||||
#define WLC_CHAN_PHYTYPE(x) (((x) & RXS_CHAN_PHYTYPE_MASK) >> RXS_CHAN_PHYTYPE_SHIFT)
|
||||
#define WLC_CHAN_CHANNEL(x) (((x) & RXS_CHAN_ID_MASK) >> RXS_CHAN_ID_SHIFT)
|
||||
#define WLC_RX_CHANNEL(rxh) (WLC_CHAN_CHANNEL((rxh)->RxChan))
|
||||
#define BRCMS_CHAN_PHYTYPE(x) (((x) & RXS_CHAN_PHYTYPE_MASK) \
|
||||
>> RXS_CHAN_PHYTYPE_SHIFT)
|
||||
#define BRCMS_CHAN_CHANNEL(x) (((x) & RXS_CHAN_ID_MASK) \
|
||||
>> RXS_CHAN_ID_SHIFT)
|
||||
#define BRCMS_RX_CHANNEL(rxh) (BRCMS_CHAN_CHANNEL((rxh)->RxChan))
|
||||
|
||||
/* brcms_bss_info flag bit values */
|
||||
#define WLC_BSS_HT 0x0020 /* BSS is HT (MIMO) capable */
|
||||
#define BRCMS_BSS_HT 0x0020 /* BSS is HT (MIMO) capable */
|
||||
|
||||
/* Flags used in brcms_c_txq_info.stopped */
|
||||
#define TXQ_STOP_FOR_PRIOFC_MASK 0x000000FF /* per prio flow control bits */
|
||||
#define TXQ_STOP_FOR_PKT_DRAIN 0x00000100 /* stop txq enqueue for packet drain */
|
||||
#define TXQ_STOP_FOR_AMPDU_FLOW_CNTRL 0x00000200 /* stop txq enqueue for ampdu flow control */
|
||||
|
||||
#define WLC_HT_WEP_RESTRICT 0x01 /* restrict HT with WEP */
|
||||
#define WLC_HT_TKIP_RESTRICT 0x02 /* restrict HT with TKIP */
|
||||
#define BRCMS_HT_WEP_RESTRICT 0x01 /* restrict HT with WEP */
|
||||
#define BRCMS_HT_TKIP_RESTRICT 0x02 /* restrict HT with TKIP */
|
||||
|
||||
/* Maximum # of keys that wl driver supports in S/W.
|
||||
* Keys supported in H/W is less than or equal to WSEC_MAX_KEYS.
|
||||
*/
|
||||
#define WSEC_MAX_KEYS 54 /* Max # of keys (50 + 4 default keys) */
|
||||
#define WLC_DEFAULT_KEYS 4 /* Default # of keys */
|
||||
#define BRCMS_DEFAULT_KEYS 4 /* Default # of keys */
|
||||
|
||||
/*
|
||||
* Max # of keys currently supported:
|
||||
@@ -308,7 +325,7 @@ struct brcms_stf {
|
||||
* s/w keys if WSEC_SW(wlc->wsec).
|
||||
* h/w keys otherwise.
|
||||
*/
|
||||
#define WLC_MAX_WSEC_KEYS(wlc) WSEC_MAX_KEYS
|
||||
#define BRCMS_MAX_WSEC_KEYS(wlc) WSEC_MAX_KEYS
|
||||
|
||||
/* number of 802.11 default (non-paired, group keys) */
|
||||
#define WSEC_MAX_DEFAULT_KEYS 4 /* # of default keys */
|
||||
@@ -318,7 +335,7 @@ struct wsec_iv {
|
||||
u16 lo; /* lower 16 bits of IV */
|
||||
};
|
||||
|
||||
#define WLC_NUMRXIVS 16 /* # rx IVs (one per 802.11e TID) */
|
||||
#define BRCMS_NUMRXIVS 16 /* # rx IVs (one per 802.11e TID) */
|
||||
|
||||
struct wsec_key {
|
||||
u8 ea[ETH_ALEN]; /* per station */
|
||||
@@ -334,7 +351,7 @@ struct wsec_key {
|
||||
u32 len; /* key length..don't move this var */
|
||||
/* data is 4byte aligned */
|
||||
u8 data[WLAN_MAX_KEY_LEN]; /* key data */
|
||||
struct wsec_iv rxiv[WLC_NUMRXIVS]; /* Rx IV (one per TID) */
|
||||
struct wsec_iv rxiv[BRCMS_NUMRXIVS]; /* Rx IV (one per TID) */
|
||||
struct wsec_iv txiv; /* Tx IV */
|
||||
};
|
||||
|
||||
@@ -355,7 +372,7 @@ struct brcms_core {
|
||||
* band state (phy+ana+radio)
|
||||
*/
|
||||
struct brcms_band {
|
||||
int bandtype; /* WLC_BAND_2G, WLC_BAND_5G */
|
||||
int bandtype; /* BRCM_BAND_2G, BRCM_BAND_5G */
|
||||
uint bandunit; /* bandstate[] index */
|
||||
|
||||
u16 phytype; /* phytype */
|
||||
@@ -376,7 +393,7 @@ struct brcms_band {
|
||||
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 */
|
||||
wlc_rateset_t hw_rateset; /* rates supported by chip (phy-specific) */
|
||||
u8 basic_rate[WLC_MAXRATE + 1]; /* basic rates indexed by rate */
|
||||
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 */
|
||||
|
||||
@@ -436,7 +453,7 @@ struct wme_param_ie {
|
||||
/* virtual interface */
|
||||
struct brcms_c_if {
|
||||
struct brcms_c_if *next;
|
||||
u8 type; /* WLC_IFTYPE_BSS or WLC_IFTYPE_WDS */
|
||||
u8 type; /* BSS or WDS */
|
||||
u8 index; /* assigned in wl_add_if(), index of the wlif if any,
|
||||
* not necessarily corresponding to bsscfg._idx or
|
||||
* AID2PVBMAP(scb).
|
||||
@@ -445,18 +462,18 @@ struct brcms_c_if {
|
||||
struct brcms_if *wlif; /* pointer to wlif */
|
||||
struct brcms_txq_info *qi; /* pointer to associated tx queue */
|
||||
union {
|
||||
/* pointer to scb if WLC_IFTYPE_WDS */
|
||||
/* pointer to scb if WDS */
|
||||
struct scb *scb;
|
||||
/* pointer to bsscfg if WLC_IFTYPE_BSS */
|
||||
/* pointer to bsscfg if BSS */
|
||||
struct brcms_bss_cfg *bsscfg;
|
||||
} u;
|
||||
};
|
||||
|
||||
/* flags for the interface, this interface is linked to a brcms_if */
|
||||
#define WLC_IF_LINKED 0x02
|
||||
#define BRCMS_IF_LINKED 0x02
|
||||
|
||||
struct brcms_hw_band {
|
||||
int bandtype; /* WLC_BAND_2G, WLC_BAND_5G */
|
||||
int bandtype; /* BRCM_BAND_2G, BRCM_BAND_5G */
|
||||
uint bandunit; /* bandstate[] index */
|
||||
u16 mhfs[MHFMAX]; /* MHF array shadow */
|
||||
u8 bandhw_stf_ss_mode; /* HW configured STF type, 0:siso; 1:cdd */
|
||||
@@ -673,7 +690,7 @@ struct brcms_c_info {
|
||||
* BSS Configurations set of BSS configurations, idx 0 is default and
|
||||
* always valid
|
||||
*/
|
||||
struct brcms_bss_cfg *bsscfg[WLC_MAXBSSCFG];
|
||||
struct brcms_bss_cfg *bsscfg[BRCMS_MAXBSSCFG];
|
||||
struct brcms_bss_cfg *cfg; /* the primary bsscfg (can be AP or STA) */
|
||||
|
||||
/* tx queue */
|
||||
@@ -682,7 +699,7 @@ struct brcms_c_info {
|
||||
/* security */
|
||||
struct wsec_key *wsec_keys[WSEC_MAX_KEYS]; /* dynamic key storage */
|
||||
/* default key storage */
|
||||
struct wsec_key *wsec_def_keys[WLC_DEFAULT_KEYS];
|
||||
struct wsec_key *wsec_def_keys[BRCMS_DEFAULT_KEYS];
|
||||
bool wsec_swkeys; /* indicates that all keys should be
|
||||
* treated as sw keys (used for debugging)
|
||||
*/
|
||||
@@ -699,12 +716,10 @@ struct brcms_c_info {
|
||||
|
||||
u16 mc_fid_counter; /* BC/MC FIFO frame ID counter */
|
||||
|
||||
char country_default[WLC_CNTRY_BUF_SZ]; /* saved country for leaving 802.11d
|
||||
* auto-country mode
|
||||
*/
|
||||
char autocountry_default[WLC_CNTRY_BUF_SZ]; /* initial country for 802.11d
|
||||
* auto-country mode
|
||||
*/
|
||||
/* saved country for leaving 802.11d auto-country mode */
|
||||
char country_default[BRCM_CNTRY_BUF_SZ];
|
||||
/* initial country for 802.11d auto-country mode */
|
||||
char autocountry_default[BRCM_CNTRY_BUF_SZ];
|
||||
u16 prb_resp_timeout; /* do not send prb resp if request older than this,
|
||||
* 0 = disable
|
||||
*/
|
||||
@@ -800,7 +815,7 @@ struct brcms_bss_cfg {
|
||||
struct wsec_iv wpa_none_txiv;
|
||||
int wsec_index; /* 0-3: default tx key, -1: not set */
|
||||
/* default key storage: */
|
||||
struct wsec_key *bss_def_keys[WLC_DEFAULT_KEYS];
|
||||
struct wsec_key *bss_def_keys[BRCMS_DEFAULT_KEYS];
|
||||
|
||||
/* TKIP countermeasures */
|
||||
bool tkip_countermeasures; /* flags TKIP no-assoc period */
|
||||
@@ -814,7 +829,7 @@ struct brcms_bss_cfg {
|
||||
u16 bcmc_fid; /* the last BCMC FID queued to TX_BCMC_FIFO */
|
||||
u16 bcmc_fid_shm; /* the last BCMC FID written to shared mem */
|
||||
|
||||
u32 flags; /* WLC_BSSCFG flags; see below */
|
||||
u32 flags; /* BSSCFG flags; see below */
|
||||
|
||||
u8 *bcn; /* AP beacon */
|
||||
uint bcn_len; /* AP beacon length */
|
||||
@@ -853,7 +868,7 @@ struct brcms_bss_cfg {
|
||||
#define IS_MBAND_UNLOCKED(wlc) \
|
||||
((NBANDS(wlc) > 1) && !(wlc)->bandlocked)
|
||||
|
||||
#define WLC_BAND_PI_RADIO_CHANSPEC wlc_phy_chanspec_get(wlc->band->pi)
|
||||
#define BRCMS_BAND_PI_RADIO_CHANSPEC wlc_phy_chanspec_get(wlc->band->pi)
|
||||
|
||||
/* sum the individual fifo tx pending packet counts */
|
||||
#define TXPKTPENDTOT(wlc) ((wlc)->core->txpktpend[0] + (wlc)->core->txpktpend[1] + \
|
||||
@@ -866,7 +881,7 @@ struct brcms_bss_cfg {
|
||||
#define GETNEXTTXP(wlc, _queue) \
|
||||
dma_getnexttxp((wlc)->hw->di[(_queue)], DMA_RANGE_TRANSMITTED)
|
||||
|
||||
#define WLC_IS_MATCH_SSID(wlc, ssid1, ssid2, len1, len2) \
|
||||
#define BRCMS_IS_MATCH_SSID(wlc, ssid1, ssid2, len1, len2) \
|
||||
((len1 == len2) && !memcmp(ssid1, ssid2, len1))
|
||||
|
||||
extern void brcms_c_fatal_error(struct brcms_c_info *wlc);
|
||||
|
||||
@@ -109,14 +109,14 @@ u16 ltrn_list[PHY_LTRN_LIST_LEN] = {
|
||||
|
||||
const u8 ofdm_rate_lookup[] = {
|
||||
|
||||
WLC_RATE_48M,
|
||||
WLC_RATE_24M,
|
||||
WLC_RATE_12M,
|
||||
WLC_RATE_6M,
|
||||
WLC_RATE_54M,
|
||||
WLC_RATE_36M,
|
||||
WLC_RATE_18M,
|
||||
WLC_RATE_9M
|
||||
BRCM_RATE_48M,
|
||||
BRCM_RATE_24M,
|
||||
BRCM_RATE_12M,
|
||||
BRCM_RATE_6M,
|
||||
BRCM_RATE_54M,
|
||||
BRCM_RATE_36M,
|
||||
BRCM_RATE_18M,
|
||||
BRCM_RATE_9M
|
||||
};
|
||||
|
||||
#define PHY_WREG_LIMIT 24
|
||||
@@ -636,9 +636,9 @@ wlc_phy_attach(struct shared_phy *sh, void *regs, int bandtype,
|
||||
pi->phynoise_polling = false;
|
||||
|
||||
for (i = 0; i < TXP_NUM_RATES; i++) {
|
||||
pi->txpwr_limit[i] = WLC_TXPWR_MAX;
|
||||
pi->txpwr_env_limit[i] = WLC_TXPWR_MAX;
|
||||
pi->tx_user_target[i] = WLC_TXPWR_MAX;
|
||||
pi->txpwr_limit[i] = BRCMS_TXPWR_MAX;
|
||||
pi->txpwr_env_limit[i] = BRCMS_TXPWR_MAX;
|
||||
pi->tx_user_target[i] = BRCMS_TXPWR_MAX;
|
||||
}
|
||||
|
||||
pi->radiopwr_override = RADIOPWR_OVERRIDE_DEF;
|
||||
@@ -1110,7 +1110,7 @@ wlc_phy_init_radio_regs(struct brcms_phy *pi, struct radio_regs *radioregs,
|
||||
address | core_offset,
|
||||
(u16) radioregs[i].init_a);
|
||||
if (ISNPHY(pi) && (++count % 4 == 0))
|
||||
WLC_PHY_WAR_PR51571(pi);
|
||||
BRCMS_PHY_WAR_PR51571(pi);
|
||||
}
|
||||
} else {
|
||||
if (radioregs[i].do_init_g) {
|
||||
@@ -1119,7 +1119,7 @@ wlc_phy_init_radio_regs(struct brcms_phy *pi, struct radio_regs *radioregs,
|
||||
address | core_offset,
|
||||
(u16) radioregs[i].init_g);
|
||||
if (ISNPHY(pi) && (++count % 4 == 0))
|
||||
WLC_PHY_WAR_PR51571(pi);
|
||||
BRCMS_PHY_WAR_PR51571(pi);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1411,8 +1411,8 @@ wlc_phy_chanspec_band_validch(struct brcms_phy_pub *ppi, uint band,
|
||||
&& (channel <= LAST_REF5_CHANNUM))
|
||||
continue;
|
||||
|
||||
if (((band == WLC_BAND_2G) && (channel <= CH_MAX_2G_CHANNEL)) ||
|
||||
((band == WLC_BAND_5G) && (channel > CH_MAX_2G_CHANNEL)))
|
||||
if ((band == BRCM_BAND_2G && channel <= CH_MAX_2G_CHANNEL) ||
|
||||
(band == BRCM_BAND_5G && channel > CH_MAX_2G_CHANNEL))
|
||||
setbit(channels->vec, channel);
|
||||
}
|
||||
}
|
||||
@@ -1443,7 +1443,7 @@ chanspec_t wlc_phy_chanspec_band_firstch(struct brcms_phy_pub *ppi, uint band)
|
||||
chspec =
|
||||
channel | WL_CHANSPEC_BW_40 |
|
||||
WL_CHANSPEC_CTL_SB_LOWER;
|
||||
if (band == WLC_BAND_2G)
|
||||
if (band == BRCM_BAND_2G)
|
||||
chspec |= WL_CHANSPEC_BAND_2G;
|
||||
else
|
||||
chspec |= WL_CHANSPEC_BAND_5G;
|
||||
@@ -1454,8 +1454,8 @@ chanspec_t wlc_phy_chanspec_band_firstch(struct brcms_phy_pub *ppi, uint band)
|
||||
&& (channel <= LAST_REF5_CHANNUM))
|
||||
continue;
|
||||
|
||||
if (((band == WLC_BAND_2G) && (channel <= CH_MAX_2G_CHANNEL)) ||
|
||||
((band == WLC_BAND_5G) && (channel > CH_MAX_2G_CHANNEL)))
|
||||
if ((band == BRCM_BAND_2G && channel <= CH_MAX_2G_CHANNEL) ||
|
||||
(band == BRCM_BAND_5G && channel > CH_MAX_2G_CHANNEL))
|
||||
return chspec;
|
||||
}
|
||||
|
||||
@@ -1479,35 +1479,35 @@ void wlc_phy_txpower_target_set(struct brcms_phy_pub *ppi,
|
||||
struct brcms_phy *pi = (struct brcms_phy *) ppi;
|
||||
|
||||
memcpy(&pi->tx_user_target[TXP_FIRST_CCK],
|
||||
&txpwr->cck[0], WLC_NUM_RATES_CCK);
|
||||
&txpwr->cck[0], BRCMS_NUM_RATES_CCK);
|
||||
|
||||
memcpy(&pi->tx_user_target[TXP_FIRST_OFDM],
|
||||
&txpwr->ofdm[0], WLC_NUM_RATES_OFDM);
|
||||
&txpwr->ofdm[0], BRCMS_NUM_RATES_OFDM);
|
||||
memcpy(&pi->tx_user_target[TXP_FIRST_OFDM_20_CDD],
|
||||
&txpwr->ofdm_cdd[0], WLC_NUM_RATES_OFDM);
|
||||
&txpwr->ofdm_cdd[0], BRCMS_NUM_RATES_OFDM);
|
||||
|
||||
memcpy(&pi->tx_user_target[TXP_FIRST_OFDM_40_SISO],
|
||||
&txpwr->ofdm_40_siso[0], WLC_NUM_RATES_OFDM);
|
||||
&txpwr->ofdm_40_siso[0], BRCMS_NUM_RATES_OFDM);
|
||||
memcpy(&pi->tx_user_target[TXP_FIRST_OFDM_40_CDD],
|
||||
&txpwr->ofdm_40_cdd[0], WLC_NUM_RATES_OFDM);
|
||||
&txpwr->ofdm_40_cdd[0], BRCMS_NUM_RATES_OFDM);
|
||||
|
||||
memcpy(&pi->tx_user_target[TXP_FIRST_MCS_20_SISO],
|
||||
&txpwr->mcs_20_siso[0], WLC_NUM_RATES_MCS_1_STREAM);
|
||||
&txpwr->mcs_20_siso[0], BRCMS_NUM_RATES_MCS_1_STREAM);
|
||||
memcpy(&pi->tx_user_target[TXP_FIRST_MCS_20_CDD],
|
||||
&txpwr->mcs_20_cdd[0], WLC_NUM_RATES_MCS_1_STREAM);
|
||||
&txpwr->mcs_20_cdd[0], BRCMS_NUM_RATES_MCS_1_STREAM);
|
||||
memcpy(&pi->tx_user_target[TXP_FIRST_MCS_20_STBC],
|
||||
&txpwr->mcs_20_stbc[0], WLC_NUM_RATES_MCS_1_STREAM);
|
||||
&txpwr->mcs_20_stbc[0], BRCMS_NUM_RATES_MCS_1_STREAM);
|
||||
memcpy(&pi->tx_user_target[TXP_FIRST_MCS_20_SDM],
|
||||
&txpwr->mcs_20_mimo[0], WLC_NUM_RATES_MCS_2_STREAM);
|
||||
&txpwr->mcs_20_mimo[0], BRCMS_NUM_RATES_MCS_2_STREAM);
|
||||
|
||||
memcpy(&pi->tx_user_target[TXP_FIRST_MCS_40_SISO],
|
||||
&txpwr->mcs_40_siso[0], WLC_NUM_RATES_MCS_1_STREAM);
|
||||
&txpwr->mcs_40_siso[0], BRCMS_NUM_RATES_MCS_1_STREAM);
|
||||
memcpy(&pi->tx_user_target[TXP_FIRST_MCS_40_CDD],
|
||||
&txpwr->mcs_40_cdd[0], WLC_NUM_RATES_MCS_1_STREAM);
|
||||
&txpwr->mcs_40_cdd[0], BRCMS_NUM_RATES_MCS_1_STREAM);
|
||||
memcpy(&pi->tx_user_target[TXP_FIRST_MCS_40_STBC],
|
||||
&txpwr->mcs_40_stbc[0], WLC_NUM_RATES_MCS_1_STREAM);
|
||||
&txpwr->mcs_40_stbc[0], BRCMS_NUM_RATES_MCS_1_STREAM);
|
||||
memcpy(&pi->tx_user_target[TXP_FIRST_MCS_40_SDM],
|
||||
&txpwr->mcs_40_mimo[0], WLC_NUM_RATES_MCS_2_STREAM);
|
||||
&txpwr->mcs_40_mimo[0], BRCMS_NUM_RATES_MCS_2_STREAM);
|
||||
|
||||
if (R_REG(&pi->regs->maccontrol) & MCTL_EN_MAC)
|
||||
mac_enabled = true;
|
||||
@@ -1564,7 +1564,7 @@ wlc_phy_txpower_sromlimit(struct brcms_phy_pub *ppi, uint channel, u8 *min_pwr,
|
||||
struct brcms_phy *pi = (struct brcms_phy *) ppi;
|
||||
uint i;
|
||||
|
||||
*min_pwr = pi->min_txpower * WLC_TXPWR_DB_FACTOR;
|
||||
*min_pwr = pi->min_txpower * BRCMS_TXPWR_DB_FACTOR;
|
||||
|
||||
if (ISNPHY(pi)) {
|
||||
if (txp_rate_idx < 0)
|
||||
@@ -1578,7 +1578,7 @@ wlc_phy_txpower_sromlimit(struct brcms_phy_pub *ppi, uint channel, u8 *min_pwr,
|
||||
*max_pwr = pi->tx_srom_max_rate_2g[txp_rate_idx];
|
||||
} else {
|
||||
|
||||
*max_pwr = WLC_TXPWR_MAX;
|
||||
*max_pwr = BRCMS_TXPWR_MAX;
|
||||
|
||||
if (txp_rate_idx < 0)
|
||||
txp_rate_idx = TXP_FIRST_OFDM;
|
||||
@@ -1670,7 +1670,7 @@ void wlc_phy_txpower_recalc_target(struct brcms_phy *pi)
|
||||
u8 max_num_rate;
|
||||
u8 start_rate = 0;
|
||||
chanspec_t chspec;
|
||||
u32 band = CHSPEC2WLC_BAND(pi->radio_chanspec);
|
||||
u32 band = CHSPEC2BAND(pi->radio_chanspec);
|
||||
initfn_t txpwr_recalc_fn = NULL;
|
||||
|
||||
chspec = pi->radio_chanspec;
|
||||
@@ -1782,7 +1782,7 @@ void
|
||||
wlc_phy_txpower_reg_limit_calc(struct brcms_phy *pi, struct txpwr_limits *txpwr,
|
||||
chanspec_t chanspec)
|
||||
{
|
||||
u8 tmp_txpwr_limit[2 * WLC_NUM_RATES_OFDM];
|
||||
u8 tmp_txpwr_limit[2 * BRCMS_NUM_RATES_OFDM];
|
||||
u8 *txpwr_ptr1 = NULL, *txpwr_ptr2 = NULL;
|
||||
int rate_start_index = 0, rate1, rate2, k;
|
||||
|
||||
@@ -1825,16 +1825,15 @@ wlc_phy_txpower_reg_limit_calc(struct brcms_phy *pi, struct txpwr_limits *txpwr,
|
||||
break;
|
||||
}
|
||||
|
||||
for (rate2 = 0; rate2 < WLC_NUM_RATES_OFDM; rate2++) {
|
||||
for (rate2 = 0; rate2 < BRCMS_NUM_RATES_OFDM; rate2++) {
|
||||
tmp_txpwr_limit[rate2] = 0;
|
||||
tmp_txpwr_limit[WLC_NUM_RATES_OFDM + rate2] =
|
||||
tmp_txpwr_limit[BRCMS_NUM_RATES_OFDM + rate2] =
|
||||
txpwr_ptr1[rate2];
|
||||
}
|
||||
wlc_phy_mcs_to_ofdm_powers_nphy(tmp_txpwr_limit, 0,
|
||||
WLC_NUM_RATES_OFDM - 1,
|
||||
WLC_NUM_RATES_OFDM);
|
||||
BRCMS_NUM_RATES_OFDM - 1, BRCMS_NUM_RATES_OFDM);
|
||||
for (rate1 = rate_start_index, rate2 = 0;
|
||||
rate2 < WLC_NUM_RATES_OFDM; rate1++, rate2++)
|
||||
rate2 < BRCMS_NUM_RATES_OFDM; rate1++, rate2++)
|
||||
pi->txpwr_limit[rate1] =
|
||||
min(txpwr_ptr2[rate2],
|
||||
tmp_txpwr_limit[rate2]);
|
||||
@@ -1867,16 +1866,15 @@ wlc_phy_txpower_reg_limit_calc(struct brcms_phy *pi, struct txpwr_limits *txpwr,
|
||||
rate_start_index = WL_TX_POWER_MCS40_CDD_FIRST;
|
||||
break;
|
||||
}
|
||||
for (rate2 = 0; rate2 < WLC_NUM_RATES_OFDM; rate2++) {
|
||||
for (rate2 = 0; rate2 < BRCMS_NUM_RATES_OFDM; rate2++) {
|
||||
tmp_txpwr_limit[rate2] = 0;
|
||||
tmp_txpwr_limit[WLC_NUM_RATES_OFDM + rate2] =
|
||||
tmp_txpwr_limit[BRCMS_NUM_RATES_OFDM + rate2] =
|
||||
txpwr_ptr1[rate2];
|
||||
}
|
||||
wlc_phy_ofdm_to_mcs_powers_nphy(tmp_txpwr_limit, 0,
|
||||
WLC_NUM_RATES_OFDM - 1,
|
||||
WLC_NUM_RATES_OFDM);
|
||||
BRCMS_NUM_RATES_OFDM - 1, BRCMS_NUM_RATES_OFDM);
|
||||
for (rate1 = rate_start_index, rate2 = 0;
|
||||
rate2 < WLC_NUM_RATES_MCS_1_STREAM;
|
||||
rate2 < BRCMS_NUM_RATES_MCS_1_STREAM;
|
||||
rate1++, rate2++)
|
||||
pi->txpwr_limit[rate1] =
|
||||
min(txpwr_ptr2[rate2],
|
||||
@@ -1897,7 +1895,7 @@ wlc_phy_txpower_reg_limit_calc(struct brcms_phy *pi, struct txpwr_limits *txpwr,
|
||||
break;
|
||||
}
|
||||
for (rate1 = rate_start_index, rate2 = 0;
|
||||
rate2 < WLC_NUM_RATES_MCS_1_STREAM;
|
||||
rate2 < BRCMS_NUM_RATES_MCS_1_STREAM;
|
||||
rate1++, rate2++)
|
||||
pi->txpwr_limit[rate1] = txpwr_ptr1[rate2];
|
||||
}
|
||||
@@ -1916,7 +1914,7 @@ wlc_phy_txpower_reg_limit_calc(struct brcms_phy *pi, struct txpwr_limits *txpwr,
|
||||
break;
|
||||
}
|
||||
for (rate1 = rate_start_index, rate2 = 0;
|
||||
rate2 < WLC_NUM_RATES_MCS_2_STREAM;
|
||||
rate2 < BRCMS_NUM_RATES_MCS_2_STREAM;
|
||||
rate1++, rate2++)
|
||||
pi->txpwr_limit[rate1] = txpwr_ptr1[rate2];
|
||||
}
|
||||
@@ -1986,7 +1984,7 @@ wlc_phy_txpower_limit_set(struct brcms_phy_pub *ppi, struct txpwr_limits *txpwr,
|
||||
if (ISLCNPHY(pi)) {
|
||||
int i, j;
|
||||
for (i = TXP_FIRST_OFDM_20_CDD, j = 0;
|
||||
j < WLC_NUM_RATES_MCS_1_STREAM; i++, j++) {
|
||||
j < BRCMS_NUM_RATES_MCS_1_STREAM; i++, j++) {
|
||||
if (txpwr->mcs_20_siso[j])
|
||||
pi->txpwr_limit[i] = txpwr->mcs_20_siso[j];
|
||||
else
|
||||
@@ -2052,7 +2050,7 @@ void wlc_phy_txpower_update_shm(struct brcms_phy *pi)
|
||||
}
|
||||
|
||||
wlapi_bmac_mhf(pi->sh->physhim, MHF2, MHF2_HWPWRCTL,
|
||||
MHF2_HWPWRCTL, WLC_BAND_ALL);
|
||||
MHF2_HWPWRCTL, BRCM_BAND_ALL);
|
||||
} else {
|
||||
int i;
|
||||
|
||||
@@ -2300,10 +2298,10 @@ void wlc_phy_ant_rxdiv_set(struct brcms_phy_pub *ppi, u8 val)
|
||||
if (!(ISNPHY(pi) && D11REV_IS(pi->sh->corerev, 16))) {
|
||||
if (val > ANT_RX_DIV_FORCE_1)
|
||||
wlapi_bmac_mhf(pi->sh->physhim, MHF1, MHF1_ANTDIV,
|
||||
MHF1_ANTDIV, WLC_BAND_ALL);
|
||||
MHF1_ANTDIV, BRCM_BAND_ALL);
|
||||
else
|
||||
wlapi_bmac_mhf(pi->sh->physhim, MHF1, MHF1_ANTDIV, 0,
|
||||
WLC_BAND_ALL);
|
||||
BRCM_BAND_ALL);
|
||||
}
|
||||
|
||||
if (ISNPHY(pi)) {
|
||||
@@ -2689,13 +2687,13 @@ void wlc_phy_rssi_compute(struct brcms_phy_pub *pih, void *ctx)
|
||||
struct brcms_phy *pi = (struct brcms_phy *) pih;
|
||||
|
||||
if (NORADIO_ENAB(pi->pubpi)) {
|
||||
rssi = WLC_RSSI_INVALID;
|
||||
rssi = BRCMS_RSSI_INVALID;
|
||||
goto end;
|
||||
}
|
||||
|
||||
if ((pi->sh->corerev >= 11)
|
||||
&& !(le16_to_cpu(rxh->RxStatus2) & RXS_PHYRXST_VALID)) {
|
||||
rssi = WLC_RSSI_INVALID;
|
||||
rssi = BRCMS_RSSI_INVALID;
|
||||
goto end;
|
||||
}
|
||||
|
||||
@@ -3191,7 +3189,7 @@ static void wlc_phy_upd_env_txpwr_rate_limits(struct brcms_phy *pi, u32 band)
|
||||
s8 temp, vbat;
|
||||
|
||||
for (i = 0; i < TXP_NUM_RATES; i++)
|
||||
pi->txpwr_env_limit[i] = WLC_TXPWR_MAX;
|
||||
pi->txpwr_env_limit[i] = BRCMS_TXPWR_MAX;
|
||||
|
||||
vbat = wlc_phy_env_measure_vbat(pi);
|
||||
temp = wlc_phy_env_measure_temperature(pi);
|
||||
|
||||
@@ -87,40 +87,40 @@
|
||||
#define PHY_MODE_CAL 0x0002
|
||||
#define PHY_MODE_NOISEM 0x0004
|
||||
|
||||
#define WLC_TXPWR_DB_FACTOR 4
|
||||
#define BRCMS_TXPWR_DB_FACTOR 4
|
||||
|
||||
/* a large TX Power as an init value to factor out of min() calculations,
|
||||
* keep low enough to fit in an s8, units are .25 dBm
|
||||
*/
|
||||
#define WLC_TXPWR_MAX (127) /* ~32 dBm = 1,500 mW */
|
||||
#define BRCMS_TXPWR_MAX (127) /* ~32 dBm = 1,500 mW */
|
||||
|
||||
#define WLC_NUM_RATES_CCK 4
|
||||
#define WLC_NUM_RATES_OFDM 8
|
||||
#define WLC_NUM_RATES_MCS_1_STREAM 8
|
||||
#define WLC_NUM_RATES_MCS_2_STREAM 8
|
||||
#define WLC_NUM_RATES_MCS_3_STREAM 8
|
||||
#define WLC_NUM_RATES_MCS_4_STREAM 8
|
||||
#define BRCMS_NUM_RATES_CCK 4
|
||||
#define BRCMS_NUM_RATES_OFDM 8
|
||||
#define BRCMS_NUM_RATES_MCS_1_STREAM 8
|
||||
#define BRCMS_NUM_RATES_MCS_2_STREAM 8
|
||||
#define BRCMS_NUM_RATES_MCS_3_STREAM 8
|
||||
#define BRCMS_NUM_RATES_MCS_4_STREAM 8
|
||||
|
||||
#define WLC_RSSI_INVALID 0 /* invalid RSSI value */
|
||||
#define BRCMS_RSSI_INVALID 0 /* invalid RSSI value */
|
||||
|
||||
struct txpwr_limits {
|
||||
u8 cck[WLC_NUM_RATES_CCK];
|
||||
u8 ofdm[WLC_NUM_RATES_OFDM];
|
||||
u8 cck[BRCMS_NUM_RATES_CCK];
|
||||
u8 ofdm[BRCMS_NUM_RATES_OFDM];
|
||||
|
||||
u8 ofdm_cdd[WLC_NUM_RATES_OFDM];
|
||||
u8 ofdm_cdd[BRCMS_NUM_RATES_OFDM];
|
||||
|
||||
u8 ofdm_40_siso[WLC_NUM_RATES_OFDM];
|
||||
u8 ofdm_40_cdd[WLC_NUM_RATES_OFDM];
|
||||
u8 ofdm_40_siso[BRCMS_NUM_RATES_OFDM];
|
||||
u8 ofdm_40_cdd[BRCMS_NUM_RATES_OFDM];
|
||||
|
||||
u8 mcs_20_siso[WLC_NUM_RATES_MCS_1_STREAM];
|
||||
u8 mcs_20_cdd[WLC_NUM_RATES_MCS_1_STREAM];
|
||||
u8 mcs_20_stbc[WLC_NUM_RATES_MCS_1_STREAM];
|
||||
u8 mcs_20_mimo[WLC_NUM_RATES_MCS_2_STREAM];
|
||||
u8 mcs_20_siso[BRCMS_NUM_RATES_MCS_1_STREAM];
|
||||
u8 mcs_20_cdd[BRCMS_NUM_RATES_MCS_1_STREAM];
|
||||
u8 mcs_20_stbc[BRCMS_NUM_RATES_MCS_1_STREAM];
|
||||
u8 mcs_20_mimo[BRCMS_NUM_RATES_MCS_2_STREAM];
|
||||
|
||||
u8 mcs_40_siso[WLC_NUM_RATES_MCS_1_STREAM];
|
||||
u8 mcs_40_cdd[WLC_NUM_RATES_MCS_1_STREAM];
|
||||
u8 mcs_40_stbc[WLC_NUM_RATES_MCS_1_STREAM];
|
||||
u8 mcs_40_mimo[WLC_NUM_RATES_MCS_2_STREAM];
|
||||
u8 mcs_40_siso[BRCMS_NUM_RATES_MCS_1_STREAM];
|
||||
u8 mcs_40_cdd[BRCMS_NUM_RATES_MCS_1_STREAM];
|
||||
u8 mcs_40_stbc[BRCMS_NUM_RATES_MCS_1_STREAM];
|
||||
u8 mcs_40_mimo[BRCMS_NUM_RATES_MCS_2_STREAM];
|
||||
u8 mcs32;
|
||||
};
|
||||
|
||||
|
||||
@@ -1159,7 +1159,7 @@ extern void wlc_phy_table_write_nphy(struct brcms_phy *pi, u32, u32, u32,
|
||||
((pi->ipa2g_on && CHSPEC_IS2G(pi->radio_chanspec)) || \
|
||||
(pi->ipa5g_on && CHSPEC_IS5G(pi->radio_chanspec)))
|
||||
|
||||
#define WLC_PHY_WAR_PR51571(pi) \
|
||||
#define BRCMS_PHY_WAR_PR51571(pi) \
|
||||
if (((pi)->sh->bustype == PCI_BUS) && NREV_LT((pi)->pubpi.phy_rev, 3)) \
|
||||
(void)R_REG(&(pi)->regs->maccontrol)
|
||||
|
||||
|
||||
@@ -1606,15 +1606,15 @@ static void wlc_lcnphy_txpower_reset_npt(struct brcms_phy *pi)
|
||||
void wlc_lcnphy_txpower_recalc_target(struct brcms_phy *pi)
|
||||
{
|
||||
struct phytbl_info tab;
|
||||
u32 rate_table[WLC_NUM_RATES_CCK + WLC_NUM_RATES_OFDM +
|
||||
WLC_NUM_RATES_MCS_1_STREAM];
|
||||
u32 rate_table[BRCMS_NUM_RATES_CCK + BRCMS_NUM_RATES_OFDM +
|
||||
BRCMS_NUM_RATES_MCS_1_STREAM];
|
||||
uint i, j;
|
||||
if (wlc_lcnphy_tempsense_based_pwr_ctrl_enabled(pi))
|
||||
return;
|
||||
|
||||
for (i = 0, j = 0; i < ARRAY_SIZE(rate_table); i++, j++) {
|
||||
|
||||
if (i == WLC_NUM_RATES_CCK + WLC_NUM_RATES_OFDM)
|
||||
if (i == BRCMS_NUM_RATES_CCK + BRCMS_NUM_RATES_OFDM)
|
||||
j = TXP_FIRST_MCS_20_SISO;
|
||||
|
||||
rate_table[i] = (u32) ((s32) (-pi->tx_power_offset[j]));
|
||||
|
||||
@@ -14470,7 +14470,7 @@ bool wlc_phy_attach_nphy(struct brcms_phy *pi)
|
||||
|
||||
pi->n_preamble_override = AUTO;
|
||||
if (NREV_IS(pi->pubpi.phy_rev, 3) || NREV_IS(pi->pubpi.phy_rev, 4))
|
||||
pi->n_preamble_override = WLC_N_PREAMBLE_MIXEDMODE;
|
||||
pi->n_preamble_override = BRCMS_N_PREAMBLE_MIXEDMODE;
|
||||
|
||||
pi->nphy_txrx_chain = AUTO;
|
||||
pi->phy_scraminit = AUTO;
|
||||
@@ -14929,9 +14929,8 @@ static void wlc_phy_update_mimoconfig_nphy(struct brcms_phy *pi, s32 preamble)
|
||||
bool gf_preamble = false;
|
||||
u16 val;
|
||||
|
||||
if (preamble == WLC_N_PREAMBLE_GF) {
|
||||
if (preamble == BRCMS_N_PREAMBLE_GF)
|
||||
gf_preamble = true;
|
||||
}
|
||||
|
||||
val = read_phy_reg(pi, 0xed);
|
||||
|
||||
@@ -14995,14 +14994,14 @@ void wlc_phy_stf_chain_upd_nphy(struct brcms_phy *pi)
|
||||
(NPHY_RfseqCoreActv_TxRxChain0 | NPHY_RfseqCoreActv_TxRxChain1);
|
||||
bool CoreActv_override = false;
|
||||
|
||||
if (pi->nphy_txrx_chain == WLC_N_TXRX_CHAIN0) {
|
||||
if (pi->nphy_txrx_chain == BRCMS_N_TXRX_CHAIN0) {
|
||||
txrx_chain = NPHY_RfseqCoreActv_TxRxChain0;
|
||||
CoreActv_override = true;
|
||||
|
||||
if (NREV_LE(pi->pubpi.phy_rev, 2)) {
|
||||
and_phy_reg(pi, 0xa0, ~0x20);
|
||||
}
|
||||
} else if (pi->nphy_txrx_chain == WLC_N_TXRX_CHAIN1) {
|
||||
} else if (pi->nphy_txrx_chain == BRCMS_N_TXRX_CHAIN1) {
|
||||
txrx_chain = NPHY_RfseqCoreActv_TxRxChain1;
|
||||
CoreActv_override = true;
|
||||
|
||||
@@ -16215,8 +16214,8 @@ static void wlc_phy_workarounds_nphy(struct brcms_phy *pi)
|
||||
|
||||
if (pi->sh->boardflags2 & BFL2_SINGLEANT_CCK) {
|
||||
wlapi_bmac_mhf(pi->sh->physhim, MHF4,
|
||||
MHF4_BPHY_TXCORE0,
|
||||
MHF4_BPHY_TXCORE0, WLC_BAND_ALL);
|
||||
MHF4_BPHY_TXCORE0,
|
||||
MHF4_BPHY_TXCORE0, BRCM_BAND_ALL);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -16284,7 +16283,7 @@ static void wlc_phy_workarounds_nphy(struct brcms_phy *pi)
|
||||
wlapi_bmac_mhf(pi->sh->physhim, MHF3,
|
||||
MHF3_NPHY_MLADV_WAR,
|
||||
MHF3_NPHY_MLADV_WAR,
|
||||
WLC_BAND_ALL);
|
||||
BRCM_BAND_ALL);
|
||||
|
||||
} else if (NREV_IS(pi->pubpi.phy_rev, 2)) {
|
||||
write_phy_reg(pi, 0x1e3, 0x0);
|
||||
@@ -17798,21 +17797,21 @@ wlc_phy_chanspec_radio2055_setup(struct brcms_phy *pi,
|
||||
write_radio_reg(pi, RADIO_2055_RF_PLL_MOD1, ci->RF_rf_pll_mod1);
|
||||
write_radio_reg(pi, RADIO_2055_VCO_CAP_TAIL, ci->RF_vco_cap_tail);
|
||||
|
||||
WLC_PHY_WAR_PR51571(pi);
|
||||
BRCMS_PHY_WAR_PR51571(pi);
|
||||
|
||||
write_radio_reg(pi, RADIO_2055_VCO_CAL1, ci->RF_vco_cal1);
|
||||
write_radio_reg(pi, RADIO_2055_VCO_CAL2, ci->RF_vco_cal2);
|
||||
write_radio_reg(pi, RADIO_2055_PLL_LF_C1, ci->RF_pll_lf_c1);
|
||||
write_radio_reg(pi, RADIO_2055_PLL_LF_R1, ci->RF_pll_lf_r1);
|
||||
|
||||
WLC_PHY_WAR_PR51571(pi);
|
||||
BRCMS_PHY_WAR_PR51571(pi);
|
||||
|
||||
write_radio_reg(pi, RADIO_2055_PLL_LF_C2, ci->RF_pll_lf_c2);
|
||||
write_radio_reg(pi, RADIO_2055_LGBUF_CEN_BUF, ci->RF_lgbuf_cen_buf);
|
||||
write_radio_reg(pi, RADIO_2055_LGEN_TUNE1, ci->RF_lgen_tune1);
|
||||
write_radio_reg(pi, RADIO_2055_LGEN_TUNE2, ci->RF_lgen_tune2);
|
||||
|
||||
WLC_PHY_WAR_PR51571(pi);
|
||||
BRCMS_PHY_WAR_PR51571(pi);
|
||||
|
||||
write_radio_reg(pi, RADIO_2055_CORE1_LGBUF_A_TUNE,
|
||||
ci->RF_core1_lgbuf_a_tune);
|
||||
@@ -17822,7 +17821,7 @@ wlc_phy_chanspec_radio2055_setup(struct brcms_phy *pi,
|
||||
write_radio_reg(pi, RADIO_2055_CORE1_TX_PGA_PAD_TN,
|
||||
ci->RF_core1_tx_pga_pad_tn);
|
||||
|
||||
WLC_PHY_WAR_PR51571(pi);
|
||||
BRCMS_PHY_WAR_PR51571(pi);
|
||||
|
||||
write_radio_reg(pi, RADIO_2055_CORE1_TX_MX_BGTRIM,
|
||||
ci->RF_core1_tx_mx_bgtrim);
|
||||
@@ -17832,7 +17831,7 @@ wlc_phy_chanspec_radio2055_setup(struct brcms_phy *pi,
|
||||
ci->RF_core2_lgbuf_g_tune);
|
||||
write_radio_reg(pi, RADIO_2055_CORE2_RXRF_REG1, ci->RF_core2_rxrf_reg1);
|
||||
|
||||
WLC_PHY_WAR_PR51571(pi);
|
||||
BRCMS_PHY_WAR_PR51571(pi);
|
||||
|
||||
write_radio_reg(pi, RADIO_2055_CORE2_TX_PGA_PAD_TN,
|
||||
ci->RF_core2_tx_pga_pad_tn);
|
||||
@@ -17844,7 +17843,7 @@ wlc_phy_chanspec_radio2055_setup(struct brcms_phy *pi,
|
||||
write_radio_reg(pi, RADIO_2055_VCO_CAL10, 0x05);
|
||||
write_radio_reg(pi, RADIO_2055_VCO_CAL10, 0x45);
|
||||
|
||||
WLC_PHY_WAR_PR51571(pi);
|
||||
BRCMS_PHY_WAR_PR51571(pi);
|
||||
|
||||
write_radio_reg(pi, RADIO_2055_VCO_CAL10, 0x65);
|
||||
|
||||
@@ -28697,7 +28696,7 @@ void wlc_phy_txpwrctrl_enable_nphy(struct brcms_phy *pi, u8 ctrl_type)
|
||||
|
||||
if (NREV_LT(pi->pubpi.phy_rev, 2) && IS40MHZ(pi))
|
||||
wlapi_bmac_mhf(pi->sh->physhim, MHF1, MHF1_IQSWAP_WAR,
|
||||
MHF1_IQSWAP_WAR, WLC_BAND_ALL);
|
||||
MHF1_IQSWAP_WAR, BRCM_BAND_ALL);
|
||||
|
||||
} else {
|
||||
|
||||
@@ -28756,7 +28755,7 @@ void wlc_phy_txpwrctrl_enable_nphy(struct brcms_phy *pi, u8 ctrl_type)
|
||||
|
||||
if (NREV_LT(pi->pubpi.phy_rev, 2) && IS40MHZ(pi))
|
||||
wlapi_bmac_mhf(pi->sh->physhim, MHF1, MHF1_IQSWAP_WAR,
|
||||
0x0, WLC_BAND_ALL);
|
||||
0x0, BRCM_BAND_ALL);
|
||||
|
||||
if (PHY_IPA(pi)) {
|
||||
mod_phy_reg(pi, (0 == PHY_CORE_0) ? 0x297 :
|
||||
|
||||
@@ -178,13 +178,13 @@ void wlapi_bmac_core_phypll_reset(struct phy_shim_info *physhim)
|
||||
void wlapi_bmac_ucode_wake_override_phyreg_set(struct phy_shim_info *physhim)
|
||||
{
|
||||
brcms_c_ucode_wake_override_set(physhim->wlc_hw,
|
||||
WLC_WAKE_OVERRIDE_PHYREG);
|
||||
BRCMS_WAKE_OVERRIDE_PHYREG);
|
||||
}
|
||||
|
||||
void wlapi_bmac_ucode_wake_override_phyreg_clear(struct phy_shim_info *physhim)
|
||||
{
|
||||
brcms_c_ucode_wake_override_clear(physhim->wlc_hw,
|
||||
WLC_WAKE_OVERRIDE_PHYREG);
|
||||
BRCMS_WAKE_OVERRIDE_PHYREG);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -63,9 +63,9 @@
|
||||
#define WL_ANT_IDX_2 1 /* antenna index 2 */
|
||||
|
||||
/* values for n_preamble_type */
|
||||
#define WLC_N_PREAMBLE_MIXEDMODE 0
|
||||
#define WLC_N_PREAMBLE_GF 1
|
||||
#define WLC_N_PREAMBLE_GF_BRCM 2
|
||||
#define BRCMS_N_PREAMBLE_MIXEDMODE 0
|
||||
#define BRCMS_N_PREAMBLE_GF 1
|
||||
#define BRCMS_N_PREAMBLE_GF_BRCM 2
|
||||
|
||||
#define WL_TX_POWER_RATES_LEGACY 45
|
||||
#define WL_TX_POWER_MCS20_FIRST 12
|
||||
@@ -105,8 +105,8 @@
|
||||
#define WL_TX_POWER_F_SISO 8
|
||||
|
||||
/* values to force tx/rx chain */
|
||||
#define WLC_N_TXRX_CHAIN0 0
|
||||
#define WLC_N_TXRX_CHAIN1 1
|
||||
#define BRCMS_N_TXRX_CHAIN0 0
|
||||
#define BRCMS_N_TXRX_CHAIN1 1
|
||||
|
||||
extern struct phy_shim_info *wlc_phy_shim_attach(struct brcms_hardware *wlc_hw,
|
||||
void *wl, void *wlc);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user