2013-04-03 13:52:07

by Zefir Kurtisi

[permalink] [raw]
Subject: [PATCH] crda: display DFS regulatory domain in regdbdump

Signed-off-by: Zefir Kurtisi <[email protected]>
---
print-regdom.c | 19 ++++++++++++++++++-
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");
--
1.7.4.1



2013-04-03 21:45:56

by Luis R. Rodriguez

[permalink] [raw]
Subject: Re: [PATCH] crda: display DFS regulatory domain in regdbdump

On Wed, Apr 3, 2013 at 6:51 AM, Zefir Kurtisi <[email protected]> wrote:
> Signed-off-by: Zefir Kurtisi <[email protected]>

Applied and pushed all, thanks!

Luis