From patchwork Mon Dec 1 15:51:32 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arik Nemtsov X-Patchwork-Id: 5413261 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 740F09F1CD for ; Mon, 1 Dec 2014 15:51:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7CE1E20266 for ; Mon, 1 Dec 2014 15:51:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9E83E2026F for ; Mon, 1 Dec 2014 15:51:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753953AbaLAPvk (ORCPT ); Mon, 1 Dec 2014 10:51:40 -0500 Received: from mail-wi0-f182.google.com ([209.85.212.182]:49245 "EHLO mail-wi0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753685AbaLAPvj (ORCPT ); Mon, 1 Dec 2014 10:51:39 -0500 Received: by mail-wi0-f182.google.com with SMTP id h11so17800945wiw.9 for ; Mon, 01 Dec 2014 07:51:38 -0800 (PST) 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=j7ag31JHVHX5y2u3XhfQERF7h0XgLs7w7VIywGNq7Ac=; b=lFAU6lEDoPSz8jWdirHjz1gdCG5LLZMmOX3XKomswSEYZSbL36jvYS047qppjfU+NS rsqGFjtxVTwnuGXs2IzLB3uUM8r/Rk8sTFEDK6tHsVqkmdL/o+2XnJgKjfj8vQjocY6w XlBip7HwBt2PziAvoDu9tg/Tg3LfbGG6n/Au31ff0GhwMEktasLWgNxnsQhDwbmElJgU 0SHh4BZq8vsgIIcxT3A27yEnqM5uGToa4dNs24vKFnzoZMLPiv8fK5IRxEqe38JJcxK8 fShMA/KWwyr6A3TEMdPFOMa8jS1Y+xQKWcduLLeyvV0QZj26nT+IztY1LC6EX/FvdEn1 fDDg== X-Gm-Message-State: ALoCoQm+V1f6xy5ukTfBQmhwrqgrWkSsyrw5R6Up4CLwRoPaYe/8SbZ3uA+G2XYPVE3N2hWZHIMl X-Received: by 10.194.62.76 with SMTP id w12mr76868550wjr.5.1417449098485; Mon, 01 Dec 2014 07:51:38 -0800 (PST) Received: from athena.amr.corp.intel.com (85-250-108-142.bb.netvision.net.il. [85.250.108.142]) by mx.google.com with ESMTPSA id l10sm42580516wif.20.2014.12.01.07.51.37 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 01 Dec 2014 07:51:37 -0800 (PST) From: Arik Nemtsov To: Cc: Johannes Berg , "Luis R. Rodriguez" , Arik Nemtsov Subject: [PATCH 3/4] iw: fix attr max for reg_rule Date: Mon, 1 Dec 2014 17:51:32 +0200 Message-Id: <1417449093-9470-3-git-send-email-arik@wizery.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1417449093-9470-1-git-send-email-arik@wizery.com> References: <1417449093-9470-1-git-send-email-arik@wizery.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, 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 Signed-off-by: Arik Nemtsov --- reg.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/reg.c b/reg.c index 9af8e7e..a02c982 100644 --- a/reg.c +++ b/reg.c @@ -127,7 +127,7 @@ static int print_reg_handler(struct nl_msg *msg, void *arg) struct nlattr *nl_rule; int rem_rule; enum nl80211_dfs_regions dfs_domain; - static struct nla_policy reg_rule_policy[NL80211_FREQUENCY_ATTR_MAX + 1] = { + static struct nla_policy reg_rule_policy[NL80211_REG_RULE_ATTR_MAX + 1] = { [NL80211_ATTR_REG_RULE_FLAGS] = { .type = NLA_U32 }, [NL80211_ATTR_FREQ_RANGE_START] = { .type = NLA_U32 }, [NL80211_ATTR_FREQ_RANGE_END] = { .type = NLA_U32 }, @@ -159,10 +159,10 @@ static int print_reg_handler(struct nl_msg *msg, void *arg) printf("country %c%c: %s\n", alpha2[0], alpha2[1], dfs_domain_name(dfs_domain)); nla_for_each_nested(nl_rule, tb_msg[NL80211_ATTR_REG_RULES], rem_rule) { - struct nlattr *tb_rule[NL80211_FREQUENCY_ATTR_MAX + 1]; + struct nlattr *tb_rule[NL80211_REG_RULE_ATTR_MAX + 1]; __u32 flags, start_freq_khz, end_freq_khz, max_bw_khz, max_ant_gain_mbi, max_eirp_mbm; - nla_parse(tb_rule, NL80211_FREQUENCY_ATTR_MAX, nla_data(nl_rule), nla_len(nl_rule), reg_rule_policy); + nla_parse(tb_rule, NL80211_REG_RULE_ATTR_MAX, nla_data(nl_rule), nla_len(nl_rule), reg_rule_policy); flags = nla_get_u32(tb_rule[NL80211_ATTR_REG_RULE_FLAGS]); start_freq_khz = nla_get_u32(tb_rule[NL80211_ATTR_FREQ_RANGE_START]);