aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuis R. Rodriguez <mcgrof@do-not-panic.com>2013-05-30 14:23:14 -0700
committerLuis R. Rodriguez <mcgrof@do-not-panic.com>2013-05-30 18:54:52 -0700
commitba2cbc35596856c8e7a431d93813f8bae1c9c208 (patch)
treea98c7a8d3aad551ec6f103cd703d75df49e60b24
parent89fbf36fca8c09df83ff55b4278e1105a9170d2c (diff)
downloadcrda-ba2cbc35596856c8e7a431d93813f8bae1c9c208.tar.gz
crda: add regdb_dfs_regions
These are already in dbparse.py. As it stands silicon vendor DFS solutions group up DFS compliance requirements into three categorical groups. Each country that requires DFS has opted to follow one type of group category set of rules. CRDA was already reading the DFS regions but using nl80211.h definitions for its parsing and printing of these flags, its best to use our own OS agnostic definitions. Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
-rw-r--r--regdb.h24
1 files changed, 22 insertions, 2 deletions
diff --git a/regdb.h b/regdb.h
index afb7284..4508621 100644
--- a/regdb.h
+++ b/regdb.h
@@ -7,6 +7,10 @@
* WARNING: This file needs to be kept in sync with
* - the parser (dbparse.py)
* - the generator code (db2bin.py)
+ *
+ * As it is only Linux is using these so we have a direct one to
+ * one map for flags. Each respective OS flag is listed where
+ * appropriate.
*/
/* spells "RGDB" */
@@ -61,8 +65,9 @@ struct regdb_file_power_rule {
uint32_t max_eirp;
};
-/* must match <linux/nl80211.h> enum nl80211_reg_rule_flags */
-
+/*
+ * The Linux map defined in <linux/uapi/nl80211.h> enum nl80211_reg_rule_flags
+ */
enum reg_rule_flags {
RRF_NO_OFDM = 1<<0, /* OFDM modulation not allowed */
RRF_NO_CCK = 1<<1, /* CCK modulation not allowed */
@@ -78,6 +83,21 @@ enum reg_rule_flags {
RRF_NO_IBSS = 1<<8, /* IBSS is not allowed */
};
+/**
+ * enum regdb_dfs_regions - regulatory DFS regions
+ *
+ * @REGDB_DFS_UNSET: Country has no DFS master region specified
+ * @REGDB_DFS_FCC: Country follows DFS master rules from FCC
+ * @REGDB_DFS_ETSI: Country follows DFS master rules from ETSI
+ * @REGDB_DFS_JP: Country follows DFS master rules from JP/MKK/Telec
+ */
+enum regdb_dfs_regions {
+ REGDB_DFS_UNSET = 0,
+ REGDB_DFS_FCC = 1,
+ REGDB_DFS_ETSI = 2,
+ REGDB_DFS_JP = 3,
+};
+
struct regdb_file_reg_rule {
/* pointers (offsets) into the file */
uint32_t freq_range_ptr; /* pointer to a struct regdb_file_freq_range */