Lines Matching refs:ic

49 null_getradiocaps(struct ieee80211com *ic, int maxchan,
53 if (maxchan > ic->ic_nchans)
54 maxchan = ic->ic_nchans;
55 memcpy(c, ic->ic_channels, maxchan*sizeof(struct ieee80211_channel));
60 null_setregdomain(struct ieee80211com *ic,
68 ieee80211_regdomain_attach(struct ieee80211com *ic)
70 if (ic->ic_regdomain.regdomain == 0 &&
71 ic->ic_regdomain.country == CTRY_DEFAULT) {
72 ic->ic_regdomain.location = ' '; /* both */
75 ic->ic_getradiocaps = null_getradiocaps;
76 ic->ic_setregdomain = null_setregdomain;
80 ieee80211_regdomain_detach(struct ieee80211com *ic)
82 if (ic->ic_countryie != NULL) {
83 IEEE80211_FREE(ic->ic_countryie, M_80211_NODE_IE);
84 ic->ic_countryie = NULL;
114 ieee80211_init_channels(struct ieee80211com *ic,
117 struct ieee80211_channel *chans = ic->ic_channels;
118 int *nchans = &ic->ic_nchans;
122 ht40 = !!(ic->ic_htcaps & IEEE80211_HTCAP_CHWIDTH40);
147 ic->ic_regdomain = *rd;
212 ieee80211_alloc_countryie(struct ieee80211com *ic)
238 const struct ieee80211_regdomain *rd = &ic->ic_regdomain;
247 ic_printf(ic, "%s: unable to allocate memory for country ie\n",
255 ic_printf(ic, "no ISO country string for cc %d; using blanks\n",
277 skip = skipflags[ieee80211_chan2mode(ic->ic_bsschan)];
278 if (IEEE80211_IS_CHAN_5GHZ(ic->ic_bsschan))
280 else if (IEEE80211_IS_CHAN_2GHZ(ic->ic_bsschan))
282 for (i = 0; i < ic->ic_nchans; i++) {
283 const struct ieee80211_channel *c = &ic->ic_channels[i];
293 ic_printf(ic, "%s: country ie too big, "
322 allvapsdown(struct ieee80211com *ic)
326 IEEE80211_LOCK_ASSERT(ic);
327 TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next)
337 struct ieee80211com *ic = vap->iv_ic;
388 IEEE80211_LOCK(ic);
390 if (!allvapsdown(ic)) {
391 IEEE80211_UNLOCK(ic);
396 error = ic->ic_setregdomain(ic, &reg->rd,
399 IEEE80211_UNLOCK(ic);
422 memcpy(&ic->ic_regdomain, &reg->rd, sizeof(reg->rd));
424 memcpy(ic->ic_channels, reg->chaninfo.ic_chans,
426 ic->ic_nchans = reg->chaninfo.ic_nchans;
427 memset(&ic->ic_channels[ic->ic_nchans], 0,
428 (IEEE80211_CHAN_MAX - ic->ic_nchans) *
430 ieee80211_chan_init(ic);
435 if (ic->ic_countryie != NULL) {
436 IEEE80211_FREE(ic->ic_countryie, M_80211_NODE_IE);
437 ic->ic_countryie = NULL;
440 ieee80211_dfs_reset(ic);
442 c = ieee80211_find_channel(ic, desfreq, desflags);
446 IEEE80211_UNLOCK(ic);