Date: Sat, 7 Jan 2017 01:56:10 +0000 (UTC) From: Adrian Chadd <adrian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311577 - head/lib/lib80211 Message-ID: <201701070156.v071uAnx008908@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: adrian Date: Sat Jan 7 01:56:10 2017 New Revision: 311577 URL: https://svnweb.freebsd.org/changeset/base/311577 Log: [lib80211] add VHT bands and channel flags. This is preparation work for 11ac support. The regulatory database needs to know about VHT channel flags and 80MHz (and later 160MHz) available channel bands. Whilst here, add the 2GHz VHT band (which is a terrible, terrible vendor extension that almost all vendors do) just in preparation, even though I don't (yet) plan on supporting it. Modified: head/lib/lib80211/lib80211_regdomain.c head/lib/lib80211/lib80211_regdomain.h Modified: head/lib/lib80211/lib80211_regdomain.c ============================================================================== --- head/lib/lib80211/lib80211_regdomain.c Sat Jan 7 01:54:32 2017 (r311576) +++ head/lib/lib80211/lib80211_regdomain.c Sat Jan 7 01:56:10 2017 (r311577) @@ -123,6 +123,10 @@ start_element(void *data, const char *na mt->curband = &mt->rd->bands_11ng; else if (iseq(mode, "11na")) mt->curband = &mt->rd->bands_11na; + else if (iseq(mode, "11ac")) + mt->curband = &mt->rd->bands_11ac; + else if (iseq(mode, "11acg")) + mt->curband = &mt->rd->bands_11acg; else warnx("unknown mode \"%s\" at line %ld", __DECONST(char *, mode), @@ -184,6 +188,14 @@ decode_flag(struct mystate *mt, const ch FLAG(IEEE80211_CHAN_G), FLAG(IEEE80211_CHAN_HT20), FLAG(IEEE80211_CHAN_HT40), + FLAG(IEEE80211_CHAN_VHT20), + FLAG(IEEE80211_CHAN_VHT40), + FLAG(IEEE80211_CHAN_VHT80), + /* + * XXX VHT80_80? This likely should be done by + * 80MHz chan logic in net80211 / ifconfig. + */ + FLAG(IEEE80211_CHAN_VHT160), FLAG(IEEE80211_CHAN_ST), FLAG(IEEE80211_CHAN_TURBO), FLAG(IEEE80211_CHAN_PASSIVE), @@ -515,6 +527,24 @@ lib80211_regdomain_readconfig(struct reg } nb->band = id; } + LIST_FOREACH(nb, &dp->bands_11ac, next) { + id = findid(rdp, nb->band, FREQBAND); + if (id == NULL) { + warnx("undefined 11ac band \"%s\"", + __DECONST(char *, nb->band)); + errors++; + } + nb->band = id; + } + LIST_FOREACH(nb, &dp->bands_11acg, next) { + id = findid(rdp, nb->band, FREQBAND); + if (id == NULL) { + warnx("undefined 11acg band \"%s\"", + __DECONST(char *, nb->band)); + errors++; + } + nb->band = id; + } } LIST_FOREACH(cp, &rdp->countries, next) { id = cp->rd; @@ -562,6 +592,8 @@ lib80211_regdomain_cleanup(struct regdat cleanup_bands(&dp->bands_11a); cleanup_bands(&dp->bands_11ng); cleanup_bands(&dp->bands_11na); + cleanup_bands(&dp->bands_11ac); + cleanup_bands(&dp->bands_11acg); if (dp->name != NULL) free(__DECONST(char *, dp->name)); } Modified: head/lib/lib80211/lib80211_regdomain.h ============================================================================== --- head/lib/lib80211/lib80211_regdomain.h Sat Jan 7 01:54:32 2017 (r311576) +++ head/lib/lib80211/lib80211_regdomain.h Sat Jan 7 01:56:10 2017 (r311577) @@ -75,6 +75,8 @@ struct regdomain { netband_head bands_11a; /* 11a operation */ netband_head bands_11ng;/* 11ng operation */ netband_head bands_11na;/* 11na operation */ + netband_head bands_11ac;/* 11ac 5GHz operation */ + netband_head bands_11acg;/* 11ac 2GHz operation */ LIST_ENTRY(regdomain) next; };
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201701070156.v071uAnx008908>