From patchwork Wed Apr 3 13:51:58 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zefir Kurtisi X-Patchwork-Id: 2387381 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id AE00BDFB79 for ; Wed, 3 Apr 2013 13:52:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757938Ab3DCNwI (ORCPT ); Wed, 3 Apr 2013 09:52:08 -0400 Received: from mail.neratec.com ([80.75.119.105]:35448 "EHLO mail.neratec.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757874Ab3DCNwH (ORCPT ); Wed, 3 Apr 2013 09:52:07 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.neratec.com (Postfix) with ESMTP id 781BF8BDF96; Wed, 3 Apr 2013 15:52:03 +0200 (CEST) X-Virus-Scanned: amavisd-new at neratec.com Received: from mail.neratec.com ([127.0.0.1]) by localhost (mail.neratec.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YypNhi3Tk7oP; Wed, 3 Apr 2013 15:52:03 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail.neratec.com (Postfix) with ESMTP id 2D25C8BDF95; Wed, 3 Apr 2013 15:52:03 +0200 (CEST) X-Virus-Scanned: amavisd-new at neratec.com Received: from mail.neratec.com ([127.0.0.1]) by localhost (mail.neratec.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id kyx1xPKpiYna; Wed, 3 Apr 2013 15:52:02 +0200 (CEST) Received: from CHL500308.neratec.local (CHL500308.neratec.local [192.168.11.104]) by mail.neratec.com (Postfix) with ESMTPSA id CCCA88BDF8F; Wed, 3 Apr 2013 15:52:02 +0200 (CEST) From: Zefir Kurtisi To: johannes@sipsolutions.net, rodrigue@qca.qualcomm.com Cc: linux-wireless@vger.kernel.org, Zefir Kurtisi Subject: [PATCH] crda: display DFS regulatory domain in regdbdump Date: Wed, 3 Apr 2013 15:51:58 +0200 Message-Id: <1364997118-14072-1-git-send-email-zefir.kurtisi@neratec.com> X-Mailer: git-send-email 1.7.4.1 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Signed-off-by: Zefir Kurtisi --- 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");