struct wlc_cm_info {
struct wlc_pub *pub;
- struct wlc_info *wlc;
+ struct brcms_c_info *wlc;
char srom_ccode[WLC_CNTRY_BUF_SZ]; /* Country Code in SROM */
uint srom_regrev; /* Regulatory Rev for the SROM ccode */
const country_info_t *country; /* current country def */
static bool wlc_valid_channel20_in_band(wlc_cm_info_t *wlc_cm, uint bandunit,
uint val);
static bool wlc_valid_channel20(wlc_cm_info_t *wlc_cm, uint val);
-static const country_info_t *wlc_country_lookup(struct wlc_info *wlc,
+static const country_info_t *wlc_country_lookup(struct brcms_c_info *wlc,
const char *ccode);
static void wlc_locale_get_channels(const locale_info_t *locale,
chanvec_t *valid_channels);
static const locale_info_t *wlc_get_locale_2g(u8 locale_idx);
static const locale_info_t *wlc_get_locale_5g(u8 locale_idx);
-static bool wlc_japan(struct wlc_info *wlc);
+static bool wlc_japan(struct brcms_c_info *wlc);
static bool wlc_japan_ccode(const char *ccode);
static void wlc_channel_min_txpower_limits_with_local_constraint(wlc_cm_info_t *
wlc_cm,
return g_mimo_5g_table[locale_idx];
}
-wlc_cm_info_t *wlc_channel_mgr_attach(struct wlc_info *wlc)
+wlc_cm_info_t *wlc_channel_mgr_attach(struct brcms_c_info *wlc)
{
wlc_cm_info_t *wlc_cm;
char country_abbrev[WLC_CNTRY_BUF_SZ];
{
const locale_mimo_info_t *li_mimo;
const locale_info_t *locale;
- struct wlc_info *wlc = wlc_cm->wlc;
+ struct brcms_c_info *wlc = wlc_cm->wlc;
char prev_country_abbrev[WLC_CNTRY_BUF_SZ];
/* save current country state */
/* disable/restore nmode based on country regulations */
li_mimo = wlc_get_mimo_2g(country->locale_mimo_2G);
if (li_mimo && (li_mimo->flags & WLC_NO_MIMO)) {
- wlc_set_nmode(wlc, OFF);
+ brcms_c_set_nmode(wlc, OFF);
wlc->stf->no_cddstbc = true;
} else {
wlc->stf->no_cddstbc = false;
if (N_ENAB(wlc->pub) != wlc->protection->nmode_user)
- wlc_set_nmode(wlc, wlc->protection->nmode_user);
+ brcms_c_set_nmode(wlc, wlc->protection->nmode_user);
}
wlc_stf_ss_update(wlc, wlc->bandstate[BAND_2G_INDEX]);
/* set or restore gmode as required by regulatory */
locale = wlc_get_locale_2g(country->locale_2G);
if (locale && (locale->flags & WLC_NO_OFDM)) {
- wlc_set_gmode(wlc, GMODE_LEGACY_B, false);
+ brcms_c_set_gmode(wlc, GMODE_LEGACY_B, false);
} else {
- wlc_set_gmode(wlc, wlc->protection->gmode_user, false);
+ brcms_c_set_gmode(wlc, wlc->protection->gmode_user, false);
}
wlc_channels_init(wlc_cm, country);
/* Lookup a country info structure from a null terminated country code
* The lookup is case sensitive.
*/
-static const country_info_t *wlc_country_lookup(struct wlc_info *wlc,
+static const country_info_t *wlc_country_lookup(struct brcms_c_info *wlc,
const char *ccode)
{
const country_info_t *country;
char *mapped_ccode,
uint *mapped_regrev)
{
- struct wlc_info *wlc = wlc_cm->wlc;
+ struct brcms_c_info *wlc = wlc_cm->wlc;
const country_info_t *country;
uint srom_regrev = wlc_cm->srom_regrev;
const char *srom_ccode = wlc_cm->srom_ccode;
static int
wlc_channels_init(wlc_cm_info_t *wlc_cm, const country_info_t *country)
{
- struct wlc_info *wlc = wlc_cm->wlc;
+ struct brcms_c_info *wlc = wlc_cm->wlc;
uint i, j;
- struct wlcband *band;
+ struct brcms_c_band *band;
const locale_info_t *li;
chanvec_t sup_chan;
const locale_mimo_info_t *li_mimo;
*/
static void wlc_channels_commit(wlc_cm_info_t *wlc_cm)
{
- struct wlc_info *wlc = wlc_cm->wlc;
+ struct brcms_c_info *wlc = wlc_cm->wlc;
uint chan;
struct txpwr_limits txpwr;
/* reset the quiet channels vector to the union of the restricted and radar channel sets */
static void wlc_quiet_channels_reset(wlc_cm_info_t *wlc_cm)
{
- struct wlc_info *wlc = wlc_cm->wlc;
+ struct brcms_c_info *wlc = wlc_cm->wlc;
uint i, j;
- struct wlcband *band;
+ struct brcms_c_band *band;
const chanvec_t *chanvec;
memset(&wlc_cm->quiet_channels, 0, sizeof(chanvec_t));
*/
static bool wlc_valid_channel20_db(wlc_cm_info_t *wlc_cm, uint val)
{
- struct wlc_info *wlc = wlc_cm->wlc;
+ struct brcms_c_info *wlc = wlc_cm->wlc;
return VALID_CHANNEL20(wlc, val) ||
(!wlc->bandlocked
/* Is the channel valid for the current locale and current band? */
static bool wlc_valid_channel20(wlc_cm_info_t *wlc_cm, uint val)
{
- struct wlc_info *wlc = wlc_cm->wlc;
+ struct brcms_c_info *wlc = wlc_cm->wlc;
return ((val < MAXCHANNEL) &&
isset(wlc_cm->bandstate[wlc->band->bandunit].valid_channels.vec,
wlc_channel_set_chanspec(wlc_cm_info_t *wlc_cm, chanspec_t chanspec,
u8 local_constraint_qdbm)
{
- struct wlc_info *wlc = wlc_cm->wlc;
+ struct brcms_c_info *wlc = wlc_cm->wlc;
struct txpwr_limits txpwr;
wlc_channel_reg_limits(wlc_cm, chanspec, &txpwr);
wlc_channel_reg_limits(wlc_cm_info_t *wlc_cm, chanspec_t chanspec,
txpwr_limits_t *txpwr)
{
- struct wlc_info *wlc = wlc_cm->wlc;
+ struct brcms_c_info *wlc = wlc_cm->wlc;
uint i;
uint chan;
int maxpwr;
int delta;
const country_info_t *country;
- struct wlcband *band;
+ struct brcms_c_band *band;
const locale_info_t *li;
int conducted_max;
int conducted_ofdm_max;
}
/* Returns true if currently set country is Japan or variant */
-static bool wlc_japan(struct wlc_info *wlc)
+static bool wlc_japan(struct brcms_c_info *wlc)
{
return wlc_japan_ccode(wlc->cmi->country_abbrev);
}
static bool
wlc_valid_chanspec_ext(wlc_cm_info_t *wlc_cm, chanspec_t chspec, bool dualband)
{
- struct wlc_info *wlc = wlc_cm->wlc;
+ struct brcms_c_info *wlc = wlc_cm->wlc;
u8 channel = CHSPEC_CHANNEL(chspec);
/* check the chanspec */