From patchwork Tue Jan 14 17:29:28 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janusz.Dziedzic@tieto.com X-Patchwork-Id: 3487131 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1010DC02DD for ; Tue, 14 Jan 2014 17:29:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 12F3320237 for ; Tue, 14 Jan 2014 17:29:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0DF932022F for ; Tue, 14 Jan 2014 17:29:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751719AbaANR3w (ORCPT ); Tue, 14 Jan 2014 12:29:52 -0500 Received: from mail-ee0-f53.google.com ([74.125.83.53]:38810 "EHLO mail-ee0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751662AbaANR3s (ORCPT ); Tue, 14 Jan 2014 12:29:48 -0500 Received: by mail-ee0-f53.google.com with SMTP id t10so375507eei.12 for ; Tue, 14 Jan 2014 09:29:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tieto.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=sQUSPPC7irI9nytfkIWLR7a+JA5zAmY1kWUEVFPCMLE=; b=zxX8tGFmck5EDSOPQbNjl3fOXKAo1uWx+mi157vNJGPEUCUcJnaG+i3i/sT44D10qf kuO2OYB5VF4sp9ePJSjEaXUfxBnk4GOFqG14xdQQJZg6bbR6/Ylc/OLnIe2uiMb9S806 lDvmQx9gwRcXrn5jL+m0zF3EOb+A+SUCYxOws= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=sQUSPPC7irI9nytfkIWLR7a+JA5zAmY1kWUEVFPCMLE=; b=U3lZ06mjC7up4GmpqMqskzFoZCSVP9PiLbUI/ONkK2f0T5VfdCBhn8Y2YYhX7GYqyM v2lrKiSw3UbzjkC1QlEo0Kos7nfrvNIkLPP/ZqlpjYTyYwZ8SNUN0ZcB2jpQr9NDATW9 KHzz9Wyhxd+qOEMqc5/TKrzqAhcvSrl45goiajLedHsawxThNyYto9VhPPAaO0AFw0WL 7WiOWy+UCgjzXKnTCdn9ix1kZ/jpWsW1qdmw4GTm71fteat1bPhaSQAaNcfP7MrIHkQ9 Skso19FF3qlQse7jTfaiAdxTsg8ZWPDU0jI0JNmA9fp1nwEKE2uqH4e2+QX4fCROhclZ f6Ww== X-Gm-Message-State: ALoCoQmEj0gxbQz4IYo5RbLLAmJxupnkBAGqfPrD8ZDSuKdroaO43Km6MZKxqHfUy1IiBYDd1VeRPvT9TXkYUW52Hei6XL+j6t2cfTrEDX9wusEsm9f3tRk= X-Received: by 10.15.75.200 with SMTP id l48mr3461551eey.109.1389720587254; Tue, 14 Jan 2014 09:29:47 -0800 (PST) Received: from localhost.localdomain (host-62-141-194-198.swidnica.mm.pl. [62.141.194.198]) by mx.google.com with ESMTPSA id x2sm680440eeo.8.2014.01.14.09.29.45 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 14 Jan 2014 09:29:46 -0800 (PST) From: Janusz Dziedzic To: linux-wireless@vger.kernel.org Cc: johannes@sipsolutions.net, mcgrof@do-not-panic.com, Janusz Dziedzic Subject: [RFC 3/5] cfg80211: parse DFS CAC time for internal regdb option Date: Tue, 14 Jan 2014 18:29:28 +0100 Message-Id: <1389720570-2430-4-git-send-email-janusz.dziedzic@tieto.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1389720570-2430-1-git-send-email-janusz.dziedzic@tieto.com> References: <1389720570-2430-1-git-send-email-janusz.dziedzic@tieto.com> X-DomainID: tieto.com Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add support for parsing DFS CAC time when internal regulatory database is used. Signed-off-by: Janusz Dziedzic --- net/wireless/genregdb.awk | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/net/wireless/genregdb.awk b/net/wireless/genregdb.awk index 9a8217d..d48f881 100644 --- a/net/wireless/genregdb.awk +++ b/net/wireless/genregdb.awk @@ -66,6 +66,7 @@ function parse_reg_rule() units = $8 sub(/\)/, "", units) sub(/,/, "", units) + dfs_cac = $9 if (units == "mW") { if (power == 100) { power = 20 @@ -78,7 +79,12 @@ function parse_reg_rule() } else { print "Unknown power value in database!" } + } else { + dfs_cac = $8 } + sub(/,/, "", dfs_cac) + sub(/\(/, "", dfs_cac) + sub(/\)/, "", dfs_cac) flagstr = "" for (i=8; i<=NF; i++) flagstr = flagstr $i @@ -109,7 +115,7 @@ function parse_reg_rule() } flags = flags "0" - printf "\t\tREG_RULE(%d, %d, %d, %d, %d, %s),\n", start, end, bw, gain, power, flags + printf "\t\tREG_RULE_DFS(%d, %d, %d, %d, %d, %d, %s),\n", start, end, bw, gain, power, dfs_cac, flags rules++ }