From patchwork Sun Apr 13 13:15:58 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eliad Peller X-Patchwork-Id: 3973921 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 BA1CB9F2CC for ; Sun, 13 Apr 2014 13:16:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E728E2020A for ; Sun, 13 Apr 2014 13:16:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E7B1E20204 for ; Sun, 13 Apr 2014 13:16:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754569AbaDMNQG (ORCPT ); Sun, 13 Apr 2014 09:16:06 -0400 Received: from mail-wg0-f43.google.com ([74.125.82.43]:42497 "EHLO mail-wg0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754338AbaDMNQF (ORCPT ); Sun, 13 Apr 2014 09:16:05 -0400 Received: by mail-wg0-f43.google.com with SMTP id x13so7058852wgg.26 for ; Sun, 13 Apr 2014 06:16:03 -0700 (PDT) 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; bh=4JzQIaGpOl1j9BA0dipCHtGDl5qivAuAXeeuCKySIZo=; b=L6R3rS+5YxtAqdVY+z3BTXlOptQj+PweIxLk1y2AhD0aygURgD49sVGKBwbTpKVYll kBl2CN70HkBtbDHMWBgmVMUu4Qbk1XCtEp16azVsC3tw2gAtAjA8QcWDRDMj/W7+3rEu IqA4Rj8KXQLCt/5oxwn7JjAJIaNDOTALXHT+buuwrzE6SErb6AfzZu+kPv+MR+wRdG/k uhbOTsOAY8g+H8RIZA8ChEP5guajgF/OF0n0MKtwrR67aOceFGHht0u7bGVocf0lgnYT UjowAkZLR3F+eXCDkz0tWuMdlIpeFgWsRjDOP/SZZ4yES1c9EWGnhUjtz9bmZpnJUBU8 kK4w== X-Gm-Message-State: ALoCoQnY566/BbDhnpGWoUCKj4148Nji5vEmVpoOgsLIpbPYfqNyuhnk6qkI6Bhj4fzJZwjc96xG X-Received: by 10.194.189.116 with SMTP id gh20mr28790565wjc.41.1397394963404; Sun, 13 Apr 2014 06:16:03 -0700 (PDT) Received: from muse.amr.corp.intel.com (93-172-30-100.bb.netvision.net.il. [93.172.30.100]) by mx.google.com with ESMTPSA id l12sm20339436wjr.35.2014.04.13.06.16.01 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 13 Apr 2014 06:16:02 -0700 (PDT) From: Eliad Peller To: Johannes Berg , "Luis R. Rodriguez" Cc: Subject: [PATCH] regulatory: don't rule out some valid rules Date: Sun, 13 Apr 2014 16:15:58 +0300 Message-Id: <1397394958-6827-1-git-send-email-eliad@wizery.com> X-Mailer: git-send-email 1.8.5.2.229.g4448466.dirty Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 commit 6d87df6 ("regdb: allow 40 MHz on world roaming channels 12/13") in wireless-regdb did the following change: - # Channel 12 - 13. No HT40 channel fits here - (2457 - 2482 @ 20), (3, 20), PASSIVE-SCAN, NO-IBSS + # Channel 12 - 13. + (2457 - 2482 @ 40), (3, 20), PASSIVE-SCAN, NO-IBSS in order to allow HT40+ on lower channels (such as 9). However, the current regulatory rules verification forbids such rules, as 2482 - 2457 < 40. Remove this requirement from the rules verification function. Signed-off-by: Eliad Peller --- net/wireless/reg.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/wireless/reg.c b/net/wireless/reg.c index 6c4b507..c8a5c34 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c @@ -610,8 +610,7 @@ static bool is_valid_reg_rule(const struct ieee80211_reg_rule *rule) freq_diff = freq_range->end_freq_khz - freq_range->start_freq_khz; - if (freq_range->end_freq_khz <= freq_range->start_freq_khz || - freq_range->max_bandwidth_khz > freq_diff) + if (freq_range->end_freq_khz <= freq_range->start_freq_khz) return false; return true;