Lines Matching +full:rates +full:- +full:ofdm

41  * maxpwr[0] - channels [34-48]
42 * maxpwr[1] - channels [52-60]
43 * maxpwr[2] - channels [62-64]
44 * maxpwr[3] - channels [100-140]
45 * maxpwr[4] - channels [149-165]
60 #define BRCM_2GHZ_2412_2462 REG_RULE(2412-10, 2462+10, 40, 0, 19, 0)
61 #define BRCM_2GHZ_2467_2472 REG_RULE(2467-10, 2472+10, 20, 0, 19, \
64 #define BRCM_5GHZ_5180_5240 REG_RULE(5180-10, 5240+10, 40, 0, 21, \
66 #define BRCM_5GHZ_5260_5320 REG_RULE(5260-10, 5320+10, 40, 0, 21, \
69 #define BRCM_5GHZ_5500_5700 REG_RULE(5500-10, 5700+10, 40, 0, 21, \
72 #define BRCM_5GHZ_5745_5825 REG_RULE(5745-10, 5825+10, 40, 0, 21, \
88 /* locale per-channel tx power limits for MIMO frames
90 * by sub-band for 5 GHz limits using CHANNEL_POWER_IDX_5G(channel)
117 * MIMO Locale Definitions - 2.4 GHz
133 * MIMO Locale Definitions - 5 GHz
185 * do not match ISO 3166-1 user assigned country codes
190 ccode[0] == 'X' || /* XA - XZ */
191 (ccode[0] == 'Q' && /* QM - QZ */
207 if (!strncmp(regdom, cntry_locales[i].regdomain->alpha2, len)) {
221 /* JP, J1 - J10 are Japan ccodes */
235 /* CCK Rates */
237 txpwr->cck[j] = min(txpwr->cck[j], local_constraint_qdbm);
239 /* 20 MHz Legacy OFDM SISO */
241 txpwr->ofdm[j] = min(txpwr->ofdm[j], local_constraint_qdbm);
243 /* 20 MHz Legacy OFDM CDD */
245 txpwr->ofdm_cdd[j] =
246 min(txpwr->ofdm_cdd[j], local_constraint_qdbm);
248 /* 40 MHz Legacy OFDM SISO */
250 txpwr->ofdm_40_siso[j] =
251 min(txpwr->ofdm_40_siso[j], local_constraint_qdbm);
253 /* 40 MHz Legacy OFDM CDD */
255 txpwr->ofdm_40_cdd[j] =
256 min(txpwr->ofdm_40_cdd[j], local_constraint_qdbm);
258 /* 20MHz MCS 0-7 SISO */
260 txpwr->mcs_20_siso[j] =
261 min(txpwr->mcs_20_siso[j], local_constraint_qdbm);
263 /* 20MHz MCS 0-7 CDD */
265 txpwr->mcs_20_cdd[j] =
266 min(txpwr->mcs_20_cdd[j], local_constraint_qdbm);
268 /* 20MHz MCS 0-7 STBC */
270 txpwr->mcs_20_stbc[j] =
271 min(txpwr->mcs_20_stbc[j], local_constraint_qdbm);
273 /* 20MHz MCS 8-15 MIMO */
275 txpwr->mcs_20_mimo[j] =
276 min(txpwr->mcs_20_mimo[j], local_constraint_qdbm);
278 /* 40MHz MCS 0-7 SISO */
280 txpwr->mcs_40_siso[j] =
281 min(txpwr->mcs_40_siso[j], local_constraint_qdbm);
283 /* 40MHz MCS 0-7 CDD */
285 txpwr->mcs_40_cdd[j] =
286 min(txpwr->mcs_40_cdd[j], local_constraint_qdbm);
288 /* 40MHz MCS 0-7 STBC */
290 txpwr->mcs_40_stbc[j] =
291 min(txpwr->mcs_40_stbc[j], local_constraint_qdbm);
293 /* 40MHz MCS 8-15 MIMO */
295 txpwr->mcs_40_mimo[j] =
296 min(txpwr->mcs_40_mimo[j], local_constraint_qdbm);
299 txpwr->mcs32 = min(txpwr->mcs32, local_constraint_qdbm);
312 struct brcms_c_info *wlc = wlc_cm->wlc;
314 if ((wlc->pub->_n_enab & SUPPORT_11N) !=
315 wlc->protection->nmode_user)
318 brcms_c_stf_ss_update(wlc, wlc->bandstate[BAND_2G_INDEX]);
319 brcms_c_stf_ss_update(wlc, wlc->bandstate[BAND_5G_INDEX]);
321 brcms_c_set_gmode(wlc, wlc->protection->gmode_user, false);
329 struct brcms_pub *pub = wlc->pub;
330 struct ssb_sprom *sprom = &wlc->hw->d11core->bus->sprom;
331 const char *ccode = sprom->alpha2;
332 int ccode_len = sizeof(sprom->alpha2);
337 wlc_cm->pub = pub;
338 wlc_cm->wlc = wlc;
339 wlc->cmi = wlc_cm;
342 wlc_cm->world_regd = brcms_world_regd(ccode, ccode_len);
344 memcpy(wlc->pub->srom_ccode, ccode, ccode_len);
350 if (!wlc_cm->world_regd) {
351 wlc_cm->world_regd = brcms_default_world_regd();
352 ccode = wlc_cm->world_regd->regdomain->alpha2;
353 ccode_len = BRCM_CNTRY_BUF_SZ - 1;
357 memcpy(wlc->country_default, ccode, ccode_len);
360 memcpy(wlc->autocountry_default, ccode, ccode_len);
362 brcms_c_set_country(wlc_cm, wlc_cm->world_regd);
376 struct brcms_c_info *wlc = wlc_cm->wlc;
377 struct ieee80211_channel *ch = wlc->pub->ieee_hw->conf.chandef.chan;
387 if (ch->flags & IEEE80211_CHAN_NO_OFDM)
390 brcms_c_set_gmode(wlc, wlc->protection->gmode_user, false);
392 brcms_b_set_chanspec(wlc->hw, chanspec,
393 !!(ch->flags & IEEE80211_CHAN_NO_IR),
401 struct brcms_c_info *wlc = wlc_cm->wlc;
402 struct ieee80211_channel *ch = wlc->pub->ieee_hw->conf.chandef.chan;
420 country = &wlc_cm->world_regd->country;
423 band = wlc->bandstate[chspec_bandunit(chanspec)];
424 li_mimo = (band->bandtype == BRCM_BAND_5G) ?
425 brcms_c_get_mimo_5g(country->locale_mimo_5G) :
426 brcms_c_get_mimo_2g(country->locale_mimo_2G);
428 delta = band->antgain;
430 if (band->bandtype == BRCM_BAND_2G)
433 maxpwr = QDB(ch->max_power) - delta;
438 if (band->bandtype == BRCM_BAND_2G) {
440 txpwr->cck[i] = (u8) maxpwr;
444 txpwr->ofdm[i] = (u8) maxpwr;
447 * OFDM 40 MHz SISO has the same power as the corresponding
448 * MCS0-7 rate unless overridden by the locale specific code.
450 * a possibility) and then copy the MCS0-7 value to the 40 MHz
453 txpwr->ofdm_40_siso[i] = 0;
455 txpwr->ofdm_cdd[i] = (u8) maxpwr;
457 txpwr->ofdm_40_cdd[i] = 0;
461 if (band->antgain > QDB(6))
462 delta = band->antgain - QDB(6); /* Excess over 6 dB */
464 if (band->bandtype == BRCM_BAND_2G)
465 maxpwr_idx = (chan - 1);
469 maxpwr20 = li_mimo->maxpwr20[maxpwr_idx];
470 maxpwr40 = li_mimo->maxpwr40[maxpwr_idx];
472 maxpwr20 = maxpwr20 - delta;
474 maxpwr40 = maxpwr40 - delta;
477 /* Fill in the MCS 0-7 (SISO) rates */
481 * 20 MHz has the same power as the corresponding OFDM rate
484 txpwr->mcs_20_siso[i] = txpwr->ofdm[i];
485 txpwr->mcs_40_siso[i] = 0;
488 /* Fill in the MCS 0-7 CDD rates */
490 txpwr->mcs_20_cdd[i] = (u8) maxpwr20;
491 txpwr->mcs_40_cdd[i] = (u8) maxpwr40;
506 txpwr->mcs_20_siso[i] = (u8) maxpwr20;
507 txpwr->mcs_40_siso[i] = (u8) maxpwr40;
511 /* Fill in the MCS 0-7 STBC rates */
513 txpwr->mcs_20_stbc[i] = 0;
514 txpwr->mcs_40_stbc[i] = 0;
517 /* Fill in the MCS 8-15 SDM rates */
519 txpwr->mcs_20_mimo[i] = (u8) maxpwr20;
520 txpwr->mcs_40_mimo[i] = (u8) maxpwr40;
524 txpwr->mcs32 = (u8) maxpwr40;
527 if (txpwr->ofdm_40_cdd[i] == 0)
528 txpwr->ofdm_40_cdd[i] = txpwr->mcs_40_cdd[j];
531 if (txpwr->ofdm_40_cdd[i] == 0)
532 txpwr->ofdm_40_cdd[i] = txpwr->mcs_40_cdd[j];
537 * Copy the 40 MHZ MCS 0-7 CDD value to the 40 MHZ MCS 0-7 SISO
541 if (txpwr->mcs_40_siso[i] == 0)
542 txpwr->mcs_40_siso[i] = txpwr->mcs_40_cdd[i];
546 if (txpwr->ofdm_40_siso[i] == 0)
547 txpwr->ofdm_40_siso[i] = txpwr->mcs_40_siso[j];
550 if (txpwr->ofdm_40_siso[i] == 0)
551 txpwr->ofdm_40_siso[i] = txpwr->mcs_40_siso[j];
556 * Copy the 20 and 40 MHz MCS0-7 CDD values to the corresponding
560 if (txpwr->mcs_20_stbc[i] == 0)
561 txpwr->mcs_20_stbc[i] = txpwr->mcs_20_cdd[i];
563 if (txpwr->mcs_40_stbc[i] == 0)
564 txpwr->mcs_40_stbc[i] = txpwr->mcs_40_cdd[i];
604 struct brcms_c_info *wlc = wlc_cm->wlc;
609 brcms_err(wlc->hw->d11core, "wl%d: malformed chanspec 0x%x\n",
610 wlc->pub->unit, chspec);
614 if (CHANNEL_BANDUNIT(wlc_cm->wlc, channel) !=
637 sband = wiphy->bands[NL80211_BAND_5GHZ];
641 for (i = 0; i < sband->n_channels; i++) {
642 ch = &sband->channels[i];
644 if (!brcms_is_radar_freq(ch->center_freq))
651 if (!(ch->flags & IEEE80211_CHAN_DISABLED))
652 ch->flags |= IEEE80211_CHAN_RADAR |
667 sband = wiphy->bands[band];
671 for (i = 0; i < sband->n_channels; i++) {
672 ch = &sband->channels[i];
674 if (ch->flags &
680 MHZ_TO_KHZ(ch->center_freq));
684 if (!(rule->flags & NL80211_RRF_NO_IR))
685 ch->flags &= ~IEEE80211_CHAN_NO_IR;
686 } else if (ch->beacon_found) {
687 ch->flags &= ~IEEE80211_CHAN_NO_IR;
697 struct brcms_info *wl = hw->priv;
698 struct brcms_c_info *wlc = wl->wlc;
706 if (request->initiator == NL80211_REGDOM_SET_BY_COUNTRY_IE)
707 brcms_reg_apply_beaconing_flags(wiphy, request->initiator);
711 sband = wiphy->bands[band];
715 for (i = 0; !ch_found && i < sband->n_channels; i++) {
716 ch = &sband->channels[i];
718 if (!(ch->flags & IEEE80211_CHAN_DISABLED))
724 mboolclr(wlc->pub->radio_disabled, WL_RADIO_COUNTRY_DISABLE);
726 mboolset(wlc->pub->radio_disabled, WL_RADIO_COUNTRY_DISABLE);
727 brcms_err(wlc->hw->d11core,
729 wlc->pub->unit, __func__, request->alpha2);
732 if (wlc->pub->_nbands > 1 || wlc->band->bandtype == BRCM_BAND_2G)
733 wlc_phy_chanspec_ch14_widefilter_set(wlc->band->pi,
734 brcms_c_japan_ccode(request->alpha2));
739 struct wiphy *wiphy = wlc->wiphy;
740 const struct brcms_regd *regd = wlc->cmi->world_regd;
748 for (band_idx = 0; band_idx < wlc->pub->_nbands; band_idx++) {
749 band = wlc->bandstate[band_idx];
751 wlc_phy_chanspec_band_validch(band->pi, band->bandtype,
755 sband = wiphy->bands[NL80211_BAND_2GHZ];
757 sband = wiphy->bands[NL80211_BAND_5GHZ];
759 for (i = 0; i < sband->n_channels; i++) {
760 ch = &sband->channels[i];
761 if (!isset(sup_chan.vec, ch->hw_value))
762 ch->flags |= IEEE80211_CHAN_DISABLED;
766 wlc->wiphy->reg_notifier = brcms_reg_notifier;
767 wlc->wiphy->regulatory_flags |= REGULATORY_CUSTOM_REG |
769 wiphy_apply_custom_regulatory(wlc->wiphy, regd->regdomain);