* [PATCH 0/2] wireless-regdb: DFS master changes @ 2011-12-21 0:04 Luis R. Rodriguez 2011-12-21 0:04 ` [PATCH 1/2] wireless-regdb: Add master DFS region support Luis R. Rodriguez 2011-12-21 0:04 ` [PATCH 2/2] wireless-regdb: add FCC as the DFS region for US Luis R. Rodriguez 0 siblings, 2 replies; 5+ messages in thread From: Luis R. Rodriguez @ 2011-12-21 0:04 UTC (permalink / raw) To: linville; +Cc: linux-wireless, kgiori, zefir.kurtisi, Luis R. Rodriguez From: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> Now that DFS master patches are merged for cfg80211 wireless-regdb can use being updated with support for exposing the DFS region. This is a repost with no changes made, just a poke. Zefir may next want to add a patch for whatever country he's looking to support with ETSI, for example. TI, may want to do the same :D Luis R. Rodriguez (2): wireless-regdb: Add master DFS region support wireless-regdb: add FCC as the DFS region for US db.txt | 2 +- db2bin.py | 2 +- dbparse.py | 25 ++++++++++++++++++++----- 3 files changed, 22 insertions(+), 7 deletions(-) -- 1.7.4.15.g7811d ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] wireless-regdb: Add master DFS region support 2011-12-21 0:04 [PATCH 0/2] wireless-regdb: DFS master changes Luis R. Rodriguez @ 2011-12-21 0:04 ` Luis R. Rodriguez 2011-12-21 0:04 ` [PATCH 2/2] wireless-regdb: add FCC as the DFS region for US Luis R. Rodriguez 1 sibling, 0 replies; 5+ messages in thread From: Luis R. Rodriguez @ 2011-12-21 0:04 UTC (permalink / raw) To: linville; +Cc: linux-wireless, kgiori, zefir.kurtisi, Luis R. Rodriguez From: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> To support master DFS we add the three known DFS regions which countries are known to support. In order to modify the regulatory database schema in a backward compatible way we use one of the two pad bytes which were unused. By using one of the two pad bytes we end up keeping new regulatory databases with DFS region support compatible with older verions of CRDA, the DFS region would just not be sent to the kernel when using an old version of CRDA. DFS master is only required for modes of operation which iniate radiation on DFS channels, we will start supporting DFS with AP mode of operation. Without DFS master support you cannot intiate radiation on those channels (AP, Mesh, IBSS, P2P). Apart from support from wireless-regd, crda and the 802.11 stack you'll also need proper DFS support on your device driver. A country can only map to one DFS region at a time for all frequency regions. After this patch countries can start being mapped to their own DFS region. Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> --- db2bin.py | 2 +- dbparse.py | 25 ++++++++++++++++++++----- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/db2bin.py b/db2bin.py index 23d3ee2..41d3741 100755 --- a/db2bin.py +++ b/db2bin.py @@ -116,7 +116,7 @@ countrynames.sort() for alpha2 in countrynames: coll = countries[alpha2] # struct regdb_file_reg_country - output.write(struct.pack('>ccxxI', str(alpha2[0]), str(alpha2[1]), reg_rules_collections[coll.permissions])) + output.write(struct.pack('>ccxBI', str(alpha2[0]), str(alpha2[1]), coll.dfs_region, reg_rules_collections[coll.permissions])) if len(sys.argv) > 3: diff --git a/dbparse.py b/dbparse.py index 2c0d738..893d64e 100755 --- a/dbparse.py +++ b/dbparse.py @@ -18,6 +18,12 @@ flag_definitions = { 'NO-HT40': 1<<10, } +dfs_regions = { + 'DFS-FCC': 1, + 'DFS-ETSI': 2, + 'DFS-JP': 3, +} + class FreqBand(object): def __init__(self, start, end, bw, comments=None): self.start = start @@ -61,6 +67,10 @@ class PowerRestriction(object): s = self return hash((s.max_ant_gain, s.max_eirp)) +class DFSRegionError(Exception): + def __init__(self, dfs_region): + self.dfs_region = dfs_region + class FlagError(Exception): def __init__(self, flag): self.flag = flag @@ -90,9 +100,15 @@ class Permission(object): return hash(self._as_tuple()) class Country(object): - def __init__(self, permissions=None, comments=None): + def __init__(self, dfs_region, permissions=None, comments=None): self._permissions = permissions or [] self.comments = comments or [] + self.dfs_region = 0 + + if dfs_region: + if not dfs_region in dfs_regions: + raise DFSRegionError(dfs_region) + self.dfs_region = dfs_regions[dfs_region] def add(self, perm): assert isinstance(perm, Permission) @@ -224,11 +240,10 @@ class DBParser(object): def _parse_country(self, line): try: - cname, line = line.split(':', 1) + cname, cvals= line.split(':', 1) + dfs_region = cvals.strip() if not cname: self._syntax_error("'country' keyword must be followed by name") - if line: - self._syntax_error("extra data at end of country line") except ValueError: self._syntax_error("country name must be followed by colon") @@ -239,7 +254,7 @@ class DBParser(object): if len(cname) != 2: self._warn("country '%s' not alpha2" % cname) if not cname in self._countries: - self._countries[cname] = Country(comments=self._comments) + self._countries[cname] = Country(dfs_region, comments=self._comments) self._current_countries[cname] = self._countries[cname] self._comments = [] -- 1.7.4.15.g7811d ^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] wireless-regdb: add FCC as the DFS region for US 2011-12-21 0:04 [PATCH 0/2] wireless-regdb: DFS master changes Luis R. Rodriguez 2011-12-21 0:04 ` [PATCH 1/2] wireless-regdb: Add master DFS region support Luis R. Rodriguez @ 2011-12-21 0:04 ` Luis R. Rodriguez 1 sibling, 0 replies; 5+ messages in thread From: Luis R. Rodriguez @ 2011-12-21 0:04 UTC (permalink / raw) To: linville; +Cc: linux-wireless, kgiori, zefir.kurtisi, Luis R. Rodriguez From: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> DFS master support in the US requires consideration for DFS requirements as defined by the FCC rules. Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> --- db.txt | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/db.txt b/db.txt index f0b46d8..4b7e879 100644 --- a/db.txt +++ b/db.txt @@ -651,7 +651,7 @@ country TR: country UA: (2402 - 2482 @ 40), (N/A, 20) -country US: +country US: DFS-FCC (2402 - 2472 @ 40), (3, 27) (5170 - 5250 @ 40), (3, 17) (5250 - 5330 @ 40), (3, 20), DFS -- 1.7.4.15.g7811d ^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH RESEND 0/2] wireless-regdb: DFS master changes @ 2012-01-17 0:12 Luis R. Rodriguez 2012-01-17 0:12 ` [PATCH 2/2] wireless-regdb: add FCC as the DFS region for US Luis R. Rodriguez 0 siblings, 1 reply; 5+ messages in thread From: Luis R. Rodriguez @ 2012-01-17 0:12 UTC (permalink / raw) To: linville; +Cc: linux-wireless, Luis R. Rodriguez From: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> * This is a simple resend. Everything else is the same except this line. * Now that DFS master patches are merged for cfg80211 wireless-regdb can use being updated with support for exposing the DFS region. This is a repost with no changes made, just a poke. Zefir may next want to add a patch for whatever country he's looking to support with ETSI, for example. TI, may want to do the same :D Luis R. Rodriguez (2): wireless-regdb: Add master DFS region support wireless-regdb: add FCC as the DFS region for US db.txt | 2 +- db2bin.py | 2 +- dbparse.py | 25 ++++++++++++++++++++----- 3 files changed, 22 insertions(+), 7 deletions(-) -- 1.7.4.15.g7811d ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/2] wireless-regdb: add FCC as the DFS region for US 2012-01-17 0:12 [PATCH RESEND 0/2] wireless-regdb: DFS master changes Luis R. Rodriguez @ 2012-01-17 0:12 ` Luis R. Rodriguez 0 siblings, 0 replies; 5+ messages in thread From: Luis R. Rodriguez @ 2012-01-17 0:12 UTC (permalink / raw) To: linville; +Cc: linux-wireless, Luis R. Rodriguez From: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> DFS master support in the US requires consideration for DFS requirements as defined by the FCC rules. Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> --- db.txt | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/db.txt b/db.txt index f0b46d8..4b7e879 100644 --- a/db.txt +++ b/db.txt @@ -651,7 +651,7 @@ country TR: country UA: (2402 - 2482 @ 40), (N/A, 20) -country US: +country US: DFS-FCC (2402 - 2472 @ 40), (3, 27) (5170 - 5250 @ 40), (3, 17) (5250 - 5330 @ 40), (3, 20), DFS -- 1.7.4.15.g7811d ^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v2 0/7] wireless: add DFS master support @ 2011-10-11 17:58 Luis R. Rodriguez 2011-10-11 17:58 ` [PATCH 2/2] wireless-regdb: add FCC as the DFS region for US Luis R. Rodriguez 0 siblings, 1 reply; 5+ messages in thread From: Luis R. Rodriguez @ 2011-10-11 17:58 UTC (permalink / raw) To: linville, johannes; +Cc: linux-wireless, Luis R. Rodriguez This is v2 of my DFS master support patches. The v2 addresses only 2 bits on the wireless-regdb and leaves open what we do for the rest of the 6 bits. The nl80211 interface remains the same but I also fixed a typo I had made in my previous patches for the dfs region enums. I also throw in the fix for CRDA for the odd behaviour observed on the last pad byte. This set of 7 patches adds DFS master support to the Linux wireless subsystem. I've reviewed future possible changes to DFS master regions and it seems that we are not going to be having multiple DFS regions for one country, instead we'll always have one DFS region for one country. The changes here are spread out throughout wireless-regdb, crda the kernel and lastly iw. The changes made allow for older verions of CRDA to work with new wireless-regdb files with DFS region support. If you want DFS master region support you'll need to upgrade your CRDA, your kernel and then hope someone implements DFS master support for your respective driver. This patch series does not have specific driver changes, although some seem to be backing in the oven right now. Luis R. Rodriguez (6): wireless-regdb: Add master DFS region support wireless-regdb: add FCC as the DFS region for US crda: fix null string assumption for alpha2 crda: add support to send DFS master region cfg80211: process regulatory DFS region for countries cfg80211: pass DFS region to drivers through reg_notifier() iw: add DFS region parsing support db.txt | 2 +- db2bin.py | 2 +- dbparse.py | 25 ++++++++++++++++++++----- 3 files changed, 22 insertions(+), 7 deletions(-) crda.c | 5 +++-- nl80211.h | 21 +++++++++++++++++++++ regdb.h | 3 ++- reglib.h | 13 ------------- 4 files changed, 26 insertions(+), 16 deletions(-) include/linux/nl80211.h | 21 +++++++++++++++++++++ include/net/regulatory.h | 6 ++++++ net/wireless/nl80211.c | 15 +++++++++++++++ net/wireless/reg.c | 39 +++++++++++++++++++++++++++++++++++++++ net/wireless/reg.h | 1 + 5 files changed, 82 insertions(+), 0 deletions(-) nl80211.h | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ reg.c | 31 +++++++++++++++++++++++++++++ 2 files changed, 96 insertions(+), 0 deletions(-) -- 1.7.4.15.g7811d ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/2] wireless-regdb: add FCC as the DFS region for US 2011-10-11 17:58 [PATCH v2 0/7] wireless: add DFS master support Luis R. Rodriguez @ 2011-10-11 17:58 ` Luis R. Rodriguez 0 siblings, 0 replies; 5+ messages in thread From: Luis R. Rodriguez @ 2011-10-11 17:58 UTC (permalink / raw) To: linville, johannes; +Cc: linux-wireless, Luis R. Rodriguez DFS master support in the US requires consideration for DFS requirements as defined by the FCC rules. Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> --- db.txt | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/db.txt b/db.txt index f0b46d8..4b7e879 100644 --- a/db.txt +++ b/db.txt @@ -651,7 +651,7 @@ country TR: country UA: (2402 - 2482 @ 40), (N/A, 20) -country US: +country US: DFS-FCC (2402 - 2472 @ 40), (3, 27) (5170 - 5250 @ 40), (3, 17) (5250 - 5330 @ 40), (3, 20), DFS -- 1.7.4.15.g7811d ^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-01-17 0:14 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-12-21 0:04 [PATCH 0/2] wireless-regdb: DFS master changes Luis R. Rodriguez 2011-12-21 0:04 ` [PATCH 1/2] wireless-regdb: Add master DFS region support Luis R. Rodriguez 2011-12-21 0:04 ` [PATCH 2/2] wireless-regdb: add FCC as the DFS region for US Luis R. Rodriguez -- strict thread matches above, loose matches on Subject: below -- 2012-01-17 0:12 [PATCH RESEND 0/2] wireless-regdb: DFS master changes Luis R. Rodriguez 2012-01-17 0:12 ` [PATCH 2/2] wireless-regdb: add FCC as the DFS region for US Luis R. Rodriguez 2011-10-11 17:58 [PATCH v2 0/7] wireless: add DFS master support Luis R. Rodriguez 2011-10-11 17:58 ` [PATCH 2/2] wireless-regdb: add FCC as the DFS region for US Luis R. Rodriguez
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox