Lines Matching refs:band

189 /* values for band specific 40MHz capabilities */
361 return wlc->band->basic_rate[mcs_table[rspec & RSPEC_RATE_MASK]
363 return wlc->band->basic_rate[rspec & RSPEC_RATE_MASK];
373 /* currently the best mechanism for determining SIFS is the band in use */
374 static u16 get_sifs(struct brcms_band *band)
376 return band->bandtype == BRCM_BAND_5G ? APHY_SIFS_TIME :
650 if (wlc->band->bandtype == BRCM_BAND_2G)
662 if (wlc->band->bandtype == BRCM_BAND_2G)
721 brcms_c_write_mhf(wlc_hw, wlc_hw->band->mhfs);
723 /* do band-specific ucode IHR, SHM, and SCR inits */
725 if (BRCMS_ISNPHY(wlc_hw->band))
734 if (BRCMS_ISLCNPHY(wlc_hw->band))
782 /* low-level band switch utility routine */
788 wlc_hw->band = wlc_hw->bandstate[bandunit];
792 * until we eliminate need for wlc->band refs in low level code
794 wlc_hw->wlc->band = wlc_hw->wlc->bandstate[bandunit];
807 /* switch to new band but leave it inactive */
823 wlc_phy_switch_radio(wlc_hw->band->pi, OFF);
1090 if (BRCMS_ISNPHY(wlc_hw->band) && NREV_LT(wlc_hw->band->phyrev, 2)) {
1109 * ucode host flag 2 needed for pio mode, independent of band and fifo
1182 brcms_c_mhfdef(wlc, wlc_hw->band->mhfs, pio_mhf2);
1314 * bands values are: BRCM_BAND_AUTO <--- Current band only
1315 * BRCM_BAND_5G <--- 5G band only
1316 * BRCM_BAND_2G <--- 2G band only
1328 struct brcms_hw_band *band;
1334 /* Current band only or all bands,
1335 * then set the band to current band
1339 band = wlc_hw->band;
1342 band = wlc_hw->bandstate[BAND_5G_INDEX];
1345 band = wlc_hw->bandstate[BAND_2G_INDEX];
1348 band = NULL; /* error condition */
1351 if (band) {
1352 save = band->mhfs[idx];
1353 band->mhfs[idx] = (band->mhfs[idx] & ~mask) | val;
1356 * changed band is the current band
1358 if (wlc_hw->clk && (band->mhfs[idx] != save)
1359 && (band == wlc_hw->band))
1361 (u16) band->mhfs[idx]);
1556 wlc_hw->band->CWmin = newmin;
1566 wlc_hw->band->CWmax = newmax;
1583 wlc_phy_bw_state_set(wlc_hw->band->pi, bw);
1586 wlc_phy_init(wlc_hw->band->pi, wlc_phy_chanspec_get(wlc_hw->band->pi));
1599 if (BRCMS_ISLCNPHY(wlc->band))
1601 else if (BRCMS_ISNPHY(wlc->band) && (NREV_GE(wlc->band->phyrev, 3)))
1671 if (!BRCMS_PHY_11N_CAP(wlc_hw->band))
1694 /* band-specific init */
1700 wlc_hw->band->bandunit);
1704 wlc_phy_init(wlc_hw->band->pi, chanspec);
1709 * cwmin is band-specific, update hardware
1710 * with value for current band
1712 brcms_b_set_cwmin(wlc_hw, wlc_hw->band->CWmin);
1713 brcms_b_set_cwmax(wlc_hw, wlc_hw->band->CWmax);
1716 wlc_hw->band->bandtype == BRCM_BAND_5G ?
1720 brcms_b_write_shm(wlc_hw, M_PHYTYPE, (u16) wlc_hw->band->phytype);
1721 brcms_b_write_shm(wlc_hw, M_PHYVER, (u16) wlc_hw->band->phyrev);
1755 if (!BRCMS_ISNPHY(wlc_hw->band))
1775 struct brcms_phy_pub *pih = wlc_hw->band->pi;
1783 phy_bw_clkbits = wlc_phy_clk_bwbits(wlc_hw->band->pi);
1786 if (BRCMS_ISNPHY(wlc_hw->band) && NREV_GE(wlc_hw->band->phyrev, 3) &&
1787 NREV_LE(wlc_hw->band->phyrev, 4)) {
1811 /* switch to and initialize new band */
1830 /* band-specific initializations */
1922 if (wlc_hw->band && wlc_hw->band->pi)
1923 wlc_phy_hw_clk_state_upd(wlc_hw->band->pi, false);
1997 flags = (wlc_hw->band->pi ? wlc_hw->band->core_flags : 0);
2030 * band->pi is invalid. need to enable PHY CLK
2048 if (wlc_hw->band && wlc_hw->band->pi)
2049 wlc_phy_hw_clk_state_upd(wlc_hw->band->pi, true);
2148 } else if (BRCMS_ISLCNPHY(wlc_hw->band)) {
2213 wlc_phy_antsel_init(wlc_hw->band->pi, false);
2275 if (BRCMS_ISNPHY(wlc_hw->band)) {
2284 if (BRCMS_ISLCNPHY(wlc_hw->band)) {
2318 wlc_phy_antsel_type_set(wlc_hw->band->pi, antsel_type);
2447 if (BRCMS_PHY_11N_CAP(wlc_hw->band))
2452 if (BRCMS_PHY_11N_CAP(wlc_hw->band))
2505 wlc_phy_mute_upd(wlc_hw->band->pi, mute_tx, 0);
2637 wlc_hw->band->bandunit);
2705 wlc->band->bandunit);
2871 wlc_phy_switch_radio(wlc_hw->band->pi, OFF);
2874 wlc_phy_anacore(wlc_hw->band->pi, OFF);
2881 wlc_phy_hw_clk_state_upd(wlc_hw->band->pi, false);
3202 if (BRCMS_ISNPHY(wlc_hw->band))
3209 if (BRCMS_ISLCNPHY(wlc_hw->band))
3265 /* band-specific inits done by wlc_bsinit() */
3349 /* set up the specified band and chanspec */
3351 wlc_phy_chanspec_radio_set(wlc_hw->band->pi, chanspec);
3354 wlc_phy_cal_init(wlc_hw->band->pi);
3359 /* band-specific inits */
3394 brcms_c_stf_ss_update(wlc, wlc->band);
3400 brcms_c_rateset_default(rs, NULL, wlc->band->phytype,
3401 wlc->band->bandtype, false, BRCMS_RATE_MASK_FULL,
3407 /* derive wlc->band->basic_rate[] table from 'rateset' */
3415 u8 *br = wlc->band->basic_rate;
3449 * basic_rate = wlc->band->basic_rate[tx_rate]
3456 for (i = 0; i < wlc->band->hw_rateset.count; i++) {
3457 rate = wlc->band->hw_rateset.rates[i];
3511 * power-cycled (hibernate). Figure out the right band to park on
3515 parkband = wlc->band->bandunit;
3518 /* park on the band of the specified chanspec */
3526 /* make each band operational, software state init */
3530 wlc->band = wlc->bandstate[j];
3535 brcms_c_rateset_filter(&default_rateset, &wlc->band->hw_rateset,
3584 if (wlc->home_chanspec == wlc_phy_chanspec_get(wlc->band->pi)) {
3595 if (BRCMS_PHY_11N_CAP(wlc->band))
3643 if (BRCMS_PHY_11N_CAP(wlc->band)) {
3644 if (wlc->band->bandtype == BRCM_BAND_5G)
3648 } else if (wlc->band->gmode)
3686 /* band-specific init */
3690 wlc->pub->unit, wlc->band->bandunit);
3695 /* update some band specific mac configuration */
3793 if (wlc_hw->band->bandtype == BRCM_BAND_2G && wlc_hw->up) {
3842 if (wlc_hw->band->bandunit != bandunit) {
3844 * use light band switch if not up yet
3857 wlc_phy_initcal_enable(wlc_hw->band->pi, !mute_tx);
3861 wlc_phy_txpower_limit_set(wlc_hw->band->pi, txpwr,
3863 wlc_phy_chanspec_radio_set(wlc_hw->band->pi, chanspec);
3865 wlc_phy_chanspec_set(wlc_hw->band->pi, chanspec);
3866 wlc_phy_txpower_limit_set(wlc_hw->band->pi, txpwr, chanspec);
3873 /* switch to and initialize new band */
3877 wlc->band = wlc->bandstate[bandunit];
3885 /* band-specific initializations */
3903 if (wlc->band->bandunit != bandunit || wlc->bandinit_pending) {
3906 "wl%d: %s: chspec %d band is locked!\n",
3916 * band, or the following brcms_b_set_chanspec() may
3933 brcms_c_rateset_bw_mcs_filter(&wlc->band->hw_rateset,
3934 wlc->band->mimo_cap_40 ? brcms_chspec_bw(chanspec) : 0);
3955 if (BRCMS_PHY_11N_CAP(wlc->band))
4032 wlc_phy_ldpc_override_set(wlc->band->pi, (val ? true : false));
4210 wlc_phy_watchdog(wlc_hw->band->pi);
4245 if (BRCMS_ISNPHY(wlc->band) &&
4378 * initialize software state for each core and band
4407 wlc_hw->band = wlc_hw->bandstate[0];
4547 /* initialize software state for each core and band */
4556 wlc_hw->band->bandunit = j;
4557 wlc_hw->band->bandtype = j ? BRCM_BAND_5G : BRCM_BAND_2G;
4558 wlc->band->bandunit = j;
4559 wlc->band->bandtype = j ? BRCM_BAND_5G : BRCM_BAND_2G;
4573 /* Get a phy for this band */
4574 wlc_hw->band->pi =
4576 wlc_hw->band->bandtype,
4578 if (wlc_hw->band->pi == NULL) {
4585 wlc_phy_machwcap_set(wlc_hw->band->pi, wlc_hw->machwcap);
4587 wlc_phy_get_phyversion(wlc_hw->band->pi, &wlc_hw->band->phytype,
4588 &wlc_hw->band->phyrev,
4589 &wlc_hw->band->radioid,
4590 &wlc_hw->band->radiorev);
4591 wlc_hw->band->abgphy_encore =
4592 wlc_phy_get_encore(wlc_hw->band->pi);
4593 wlc->band->abgphy_encore = wlc_phy_get_encore(wlc_hw->band->pi);
4594 wlc_hw->band->core_flags =
4595 wlc_phy_get_coreflags(wlc_hw->band->pi);
4598 if (BRCMS_ISNPHY(wlc_hw->band)) {
4599 if (NCONF_HAS(wlc_hw->band->phyrev))
4603 } else if (BRCMS_ISLCNPHY(wlc_hw->band)) {
4604 if (LCNCONF_HAS(wlc_hw->band->phyrev))
4612 wlc_hw->band->phytype, wlc_hw->band->phyrev);
4619 * BMAC_NOTE: wlc->band->pi should not be set below and should
4622 * wlc_hw->band->pi. Instead do the wlc->band->pi init below,
4623 * keeping wlc_hw->band->pi as well for incremental update of
4627 wlc->band->pi = wlc_hw->band->pi;
4628 wlc->band->phytype = wlc_hw->band->phytype;
4629 wlc->band->phyrev = wlc_hw->band->phyrev;
4630 wlc->band->radioid = wlc_hw->band->radioid;
4631 wlc->band->radiorev = wlc_hw->band->radiorev;
4633 wlc->band->phytype, wlc->band->phyrev,
4634 wlc->band->radioid, wlc->band->radiorev);
4636 wlc_hw->band->CWmin = APHY_CWMIN;
4637 wlc_hw->band->CWmax = PHY_CWMAX;
4695 bandtype = wlc->band->bandtype;
4721 wlc->band->antgain = sprom->antenna_gain.a1;
4723 wlc->band->antgain = sprom->antenna_gain.a0;
4731 struct brcms_band *band;
4744 /* find the band of our default channel */
4745 band = wlc->band;
4747 band->bandunit != chspec_bandunit(chanspec))
4748 band = wlc->bandstate[OTHERBANDUNIT(wlc)];
4750 /* init bss rates to the band specific default rate set */
4751 brcms_c_rateset_default(&bi->rateset, NULL, band->phytype,
4752 band->bandtype, false, BRCMS_RATE_MASK_FULL,
4763 struct brcms_band *band;
4766 band = wlc->bandstate[i];
4767 if (band->bandtype == BRCM_BAND_5G) {
4770 band->mimo_cap_40 = true;
4772 band->mimo_cap_40 = false;
4775 band->mimo_cap_40 = true;
4777 band->mimo_cap_40 = false;
4816 struct brcms_hw_band *band;
4821 band = wlc_hw->band;
4823 if (band->pi) {
4824 /* Detach this band's phy */
4825 wlc_phy_detach(band->pi);
4826 band->pi = NULL;
4828 band = wlc_hw->bandstate[OTHERBANDUNIT(wlc)];
4910 wlc_phy_por_inform(wlc_hw->band->pi);
4966 wlc_phy_hw_state_upd(wlc_hw->band->pi, true);
5107 callbacks += wlc_phy_down(wlc_hw->band->pi);
5121 wlc_phy_hw_state_upd(wlc_hw->band->pi, false);
5128 wlc_phy_hw_clk_state_upd(wlc_hw->band->pi, false);
5198 wlc_phy_mute_upd(wlc->band->pi, false, PHY_MUTE_ALL);
5219 struct brcms_band *band;
5227 /* verify that we are dealing with 2G band and grab the band pointer */
5228 if (wlc->band->bandtype == BRCM_BAND_2G)
5229 band = wlc->band;
5232 band = wlc->bandstate[OTHERBANDUNIT(wlc)];
5273 band->gmode = gmode;
5338 /* try the current band */
5339 bandunit = wlc->band->bandunit;
5346 /* try the other band */
5371 wlc_phy_ofdm_rateset_war(wlc->band->pi, false);
5386 if (wlc->band->bandunit != chspec_bandunit(chspec))
5395 if (wlc->pub->up && (wlc_phy_chanspec_get(wlc->band->pi) != chspec)) {
5510 return wlc->band->phytype;
5519 * currently on the 5G band
5521 if (wlc->band->bandtype == BRCM_BAND_5G)
5737 sifs = get_sifs(wlc->band);
5767 if (wlc->band->bandtype == BRCM_BAND_2G)
5798 * Return true if the specified rate is supported by the specified band.
5799 * BRCM_BAND_AUTO indicates the current band.
5801 static bool brcms_c_valid_rate(struct brcms_c_info *wlc, u32 rspec, int band,
5807 if ((band == BRCM_BAND_AUTO) || (band == wlc->band->bandtype))
5808 hw_rateset = &wlc->band->hw_rateset;
5812 /* other band specified and we are a single band device */
6073 sifs = get_sifs(wlc->band);
6105 if (BRCMS_ISLCNPHY(wlc->band)) {
6124 } else if (is_cck_rate(rspec) && !BRCMS_ISLCNPHY(wlc->band)
6125 && !BRCMS_ISSSLPNPHY(wlc->band)) {
6256 hw->wiphy->bands[tx_info->band]->n_bitrates)) {
6258 hw->wiphy->bands[tx_info->band]->
6264 rspec[k] = mac80211_wlc_set_nrate(wlc, wlc->band,
6335 wlc->band->pi))
6416 if (BRCMS_ISNPHY(wlc->band) && is_ofdm_rate(rspec[k])) {
6486 if (wlc->band->bandtype == BRCM_BAND_5G)
6489 if (CHSPEC_IS40(wlc_phy_chanspec_get(wlc->band->pi)))
6651 xfts |= CHSPEC_CHANNEL(wlc_phy_chanspec_get(wlc->band->pi)) <<
6668 if (BRCMS_PHY_11N_CAP(wlc->band)) {
6900 else if (wlc->band->gmode && wlc->protection->_g && !is_cck_rate(rspec))
6916 if (BRCMS_PHY_11N_CAP(wlc->band)) {
6917 /* set rts txbw to correct side band */
7013 rx_status->band =
7016 ieee80211_channel_to_frequency(channel, rx_status->band);
7018 rx_status->signal = wlc_phy_rssi_compute(wlc->hw->band->pi, rxh);
7081 if (rx_status->band == NL80211_BAND_5GHZ)
7197 sifs = get_sifs(wlc->band);
7488 wlc_phy_hold_upd(wlc->band->pi, PHY_HOLD_FOR_SCAN, true);
7493 wlc_phy_hold_upd(wlc->band->pi, PHY_HOLD_FOR_SCAN, false);
7521 return wlc->band->bandunit;
7579 return wlc_phy_txpower_set(wlc->band->pi, qdbm, false);
7587 wlc_phy_txpower_get(wlc->band->pi, &qdbm, &override);
7762 wlc_phy_noise_sample_intr(wlc_hw->band->pi);
7852 /* band-specific inits */
7918 wlc->band = wlc->bandstate[0];
7942 pub->phy_11ncapable = BRCMS_PHY_11N_CAP(wlc->band);
7951 if (BRCMS_ISNPHY(wlc->band) && (wlc->stf->txstreams == 1))
7955 wlc_phy_stf_chain_init(wlc->band->pi, wlc->stf->hw_txchain,
7966 wlc->band = wlc->bandstate[j];
7974 wlc->band->CWmin = APHY_CWMIN;
7975 wlc->band->CWmax = PHY_CWMAX;
7978 if (wlc->band->bandtype == BRCM_BAND_2G) {
7979 wlc->band->gmode = GMODE_AUTO;
7981 wlc->band->gmode);
7985 if (BRCMS_PHY_11N_CAP(wlc->band)) {
7993 /* init per-band default rateset, depend on band->gmode */
7994 brcms_default_rateset(wlc, &wlc->band->defrateset);
7997 brcms_c_rateset_filter(&wlc->band->defrateset,
7998 &wlc->band->hw_rateset, false,
8049 } else if (BRCMS_ISSSLPNPHY(wlc->band)) {