diff mbox

crda: display DFS regulatory domain in regdbdump

Message ID 1364997118-14072-1-git-send-email-zefir.kurtisi@neratec.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Zefir Kurtisi April 3, 2013, 1:51 p.m. UTC
Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com>
---
 print-regdom.c |   19 ++++++++++++++++++-
 1 files changed, 18 insertions(+), 1 deletions(-)

Comments

Luis R. Rodriguez April 3, 2013, 9:45 p.m. UTC | #1
On Wed, Apr 3, 2013 at 6:51 AM, Zefir Kurtisi <zefir.kurtisi@neratec.com> wrote:
> Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com>

Applied and pushed all, thanks!

  Luis
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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");