Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp199841imj; Thu, 14 Feb 2019 18:32:07 -0800 (PST) X-Google-Smtp-Source: AHgI3IYQSRbT9uUUp1FCRsq4cRj5gsSp/1s3NNa54TeUOSkeHU7wDjO5oKIoRkU6vYhCS50q448n X-Received: by 2002:a17:902:b60e:: with SMTP id b14mr7369293pls.301.1550197927681; Thu, 14 Feb 2019 18:32:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550197927; cv=none; d=google.com; s=arc-20160816; b=n/M/ubJUekVK4Y+kxMTbXt041UHVwUiUvkR0kVE5AHvYxwm1kBGGRbyWvotHiuNlEw vf7y4vfNyblT79PD0XNpS/Wq59doCcmuS1H53STgR3mOu60GL1kX+sUPuDsK3fcURQNO XelhAz9mX7+lEhx1vvjVkDhJlLD6r5Iu5QnbW8bBb/0ik1R34l06Yen9UXP7D1SZIF5u nHTKIZQY/Z/D13waoqWuZzX9uqvGoP3vL6XFEVVlxwQHBk31DLT0d7oo9L7iu4J5Azst SI3S5/Nq5rEMgm4jRTE3FcxzemTtDO5rPosIZ9rFUjx8q67fCGAA2OBuB6fbbeSkkRQt +6gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=qC+dW3g6xOKHq87/UQbIL/zIiP6mgPmExM47eUw2maU=; b=asbX4pwR5jPfvlKmOJSF2CZF8MOaD+G4/xPOefvWEqhEXzb6j5PMszeG5W1yzcRU9z 1ZHo94d0lC4u4dkN0K2joEH3AHy2D3P3tI9/9+XtVm4R97EQ+d2AUnlgU+dxbUrfXFpD bGljHwGhBkpBvFZYL9t10UIrNcy301S4tIz90YJA/GitT/FxzjXiq966hleEzG22ffap XnoR5iJCGoATa9lEODovLmx3IXgmNfli5N4ePbTnkgQj0/Tfj7m6sgHEipAum/1cgkSI b0CmwzeV5cQ/ovIP+ZFSpK2ozcEKXoWyAF7IizYBY+iFPWpIGZV+RlukHUckarc/9w06 PqbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=m1tXVvIT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j64si1537226pgd.126.2019.02.14.18.31.51; Thu, 14 Feb 2019 18:32:07 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=m1tXVvIT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732303AbfBOCQh (ORCPT + 99 others); Thu, 14 Feb 2019 21:16:37 -0500 Received: from mail.kernel.org ([198.145.29.99]:55640 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2392232AbfBOCQJ (ORCPT ); Thu, 14 Feb 2019 21:16:09 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 299FF222D0; Fri, 15 Feb 2019 02:16:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1550196969; bh=if5qCwGp3gg/2aWBbI6KVEAGZjT99gnX5BbS+0Asud8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=m1tXVvITrQoUsbqKcidCHkMaEb5AWKRyW8PJ21X5ZTXrgr7sVCmSHVMyLPUERSR6V A2b1svyOnVSbN3F145rn6UD52I/DvgWW2HBexHX6sHUnKQ3iP7hyNaBbOsyRQ+IfyE YQqsnbAAohqe1/pGGVc6arg8mZ9uJJkc7FHqx21g= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Chaitanya Tata , Chaitanya Tata , Johannes Berg , Sasha Levin , linux-wireless@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH AUTOSEL 3.18 15/16] cfg80211: extend range deviation for DMG Date: Thu, 14 Feb 2019 21:15:45 -0500 Message-Id: <20190215021546.179605-15-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190215021546.179605-1-sashal@kernel.org> References: <20190215021546.179605-1-sashal@kernel.org> MIME-Version: 1.0 X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Chaitanya Tata [ Upstream commit 93183bdbe73bbdd03e9566c8dc37c9d06b0d0db6 ] Recently, DMG frequency bands have been extended till 71GHz, so extend the range check till 20GHz (45-71GHZ), else some channels will be marked as disabled. Signed-off-by: Chaitanya Tata Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin --- net/wireless/reg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/wireless/reg.c b/net/wireless/reg.c index 306464b3acdb..2f1b39577a84 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c @@ -688,7 +688,7 @@ static bool reg_does_bw_fit(const struct ieee80211_freq_range *freq_range, * definitions (the "2.4 GHz band", the "5 GHz band" and the "60GHz band"), * however it is safe for now to assume that a frequency rule should not be * part of a frequency's band if the start freq or end freq are off by more - * than 2 GHz for the 2.4 and 5 GHz bands, and by more than 10 GHz for the + * than 2 GHz for the 2.4 and 5 GHz bands, and by more than 20 GHz for the * 60 GHz band. * This resolution can be lowered and should be considered as we add * regulatory rule support for other "bands". @@ -703,7 +703,7 @@ static bool freq_in_rule_band(const struct ieee80211_freq_range *freq_range, * with the Channel starting frequency above 45 GHz. */ u32 limit = freq_khz > 45 * ONE_GHZ_IN_KHZ ? - 10 * ONE_GHZ_IN_KHZ : 2 * ONE_GHZ_IN_KHZ; + 20 * ONE_GHZ_IN_KHZ : 2 * ONE_GHZ_IN_KHZ; if (abs(freq_khz - freq_range->start_freq_khz) <= limit) return true; if (abs(freq_khz - freq_range->end_freq_khz) <= limit) -- 2.19.1