aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZefir Kurtisi <zefir.kurtisi@neratec.com>2013-04-03 15:51:58 +0200
committerLuis R. Rodriguez <mcgrof@do-not-panic.com>2013-04-03 14:45:13 -0700
commitd169aaf0290c2a6f8b38769e22ced4d3850da7a9 (patch)
tree70810da6374e893f94015596cce924641fed0cb4
parentb3e778cc502a4a1ce5aec3b2a359f6fe0a253065 (diff)
downloadcrda-d169aaf0290c2a6f8b38769e22ced4d3850da7a9.tar.gz
crda: display DFS regulatory domain in regdbdump
Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com> Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
-rw-r--r--print-regdom.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/print-regdom.c b/print-regdom.c
index 075eea8..9c65872 100644
--- a/print-regdom.c
+++ b/print-regdom.c
@@ -7,6 +7,22 @@
#include "reglib.h"
+static const char *dfs_domain_name(enum nl80211_dfs_regions region)
+{
+ switch (region) {
+ case NL80211_DFS_UNSET:
+ return "DFS-UNSET";
+ case NL80211_DFS_FCC:
+ return "DFS-FCC";
+ case NL80211_DFS_ETSI:
+ return "DFS-ETSI";
+ case NL80211_DFS_JP:
+ return "DFS-JP";
+ default:
+ return "DFS-invalid";
+ }
+}
+
static void print_reg_rule(struct ieee80211_reg_rule *rule)
{
struct ieee80211_freq_range *freq;
@@ -57,7 +73,8 @@ static void print_reg_rule(struct ieee80211_reg_rule *rule)
void print_regdom(struct ieee80211_regdomain *rd)
{
unsigned int i;
- printf("country %.2s:\n", rd->alpha2);
+ printf("country %.2s: %s\n", rd->alpha2,
+ dfs_domain_name(rd->dfs_region));
for (i = 0; i < rd->n_reg_rules; i++)
print_reg_rule(&rd->reg_rules[i]);
printf("\n");