From patchwork Tue Jul 1 20:17:54 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "John W. Linville" X-Patchwork-Id: 4462041 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 2B635BEEAA for ; Tue, 1 Jul 2014 20:30:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5BC6320379 for ; Tue, 1 Jul 2014 20:30:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 448E920364 for ; Tue, 1 Jul 2014 20:30:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758657AbaGAUaQ (ORCPT ); Tue, 1 Jul 2014 16:30:16 -0400 Received: from charlotte.tuxdriver.com ([70.61.120.58]:42380 "EHLO smtp.tuxdriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756481AbaGAUaO (ORCPT ); Tue, 1 Jul 2014 16:30:14 -0400 Received: from uucp by smtp.tuxdriver.com with local-rmail (Exim 4.63) (envelope-from ) id 1X24gp-0000M1-VG; Tue, 01 Jul 2014 16:30:08 -0400 Received: from linville-x1.hq.tuxdriver.com (localhost.localdomain [127.0.0.1]) by linville-x1.hq.tuxdriver.com (8.14.8/8.14.6) with ESMTP id s61KI0lA000389; Tue, 1 Jul 2014 16:18:00 -0400 Received: (from linville@localhost) by linville-x1.hq.tuxdriver.com (8.14.8/8.14.8/Submit) id s61KHwqx000388; Tue, 1 Jul 2014 16:17:58 -0400 From: "John W. Linville" To: linux-wireless@vger.kernel.org Cc: "Luis R. Rodriguez" , Johannes Berg , Janusz Dziedzic , "John W. Linville" Subject: [PATCH] wireless: fixup genregdb.awk for remove of antenna gain from wireless-regdb Date: Tue, 1 Jul 2014 16:17:54 -0400 Message-Id: <1404245874-350-1-git-send-email-linville@tuxdriver.com> X-Mailer: git-send-email 1.9.3 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, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, 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 Since "wireless-regdb: remove antenna gain" was merged in the wireless-regdb tree, this script has been incompatible with the 'official' regulatory database. Let's fix it up. Signed-off-by: John W. Linville --- I think the dfs_cac stuff is still broken, since it does not account for the starting offset of the flags. net/wireless/genregdb.awk | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/net/wireless/genregdb.awk b/net/wireless/genregdb.awk index 40c37fc5b67c..c4f90ddb1a7d 100644 --- a/net/wireless/genregdb.awk +++ b/net/wireless/genregdb.awk @@ -56,21 +56,19 @@ function parse_reg_rule() end = $3 bw = $5 sub(/\),/, "", bw) - gain = $6 - sub(/\(/, "", gain) - sub(/,/, "", gain) - power = $7 + power = $6 + sub(/\(/, "", power) sub(/\)/, "", power) sub(/,/, "", power) # power might be in mW... - units = $8 + units = $7 sub(/\)/, "", units) sub(/,/, "", units) - dfs_cac = $9 + dfs_cac = $8 if (units == "mW") { power = 10 * log(power)/log(10) } else { - dfs_cac = $8 + dfs_cac = $7 } sub(/,/, "", dfs_cac) sub(/\(/, "", dfs_cac) @@ -107,7 +105,7 @@ function parse_reg_rule() } flags = flags "0" - printf "\t\tREG_RULE_EXT(%d, %d, %d, %d, %.0f, %d, %s),\n", start, end, bw, gain, power, dfs_cac, flags + printf "\t\tREG_RULE_EXT(%d, %d, %d, 0, %.0f, %d, %s),\n", start, end, bw, power, dfs_cac, flags rules++ }