Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp206302imj; Thu, 14 Feb 2019 18:40:48 -0800 (PST) X-Google-Smtp-Source: AHgI3Ibcw4TFLkDFr0F5wZmr/GHdpTS58bSgKRywg+y+itpStBZKZLnxscKbY85/xQ+0gcjlwM6S X-Received: by 2002:a62:2ad6:: with SMTP id q205mr7380837pfq.243.1550198448490; Thu, 14 Feb 2019 18:40:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550198448; cv=none; d=google.com; s=arc-20160816; b=rS7rkC0WRA1N/Sv3uWI2XP0lRpE/lZE8tLyM4c/1Fycz6SRO5gAFQm4OwvvrNYt8vX zyD/lXPEz5ZtgFNYWJs+0NzWVEKI2jDth7vcHXWrYKunRPts8MOoveVczdyhqhxQKNpi A1LbKZpkqSzE7fi8i/pWTlMUb34/JD6bXM9aJgH4YoKi+eXkIQLQdWzGkdXt66Z1gNBA PbI7UiGw+GDZHPi+n9maqVKy3ng/IQViuNuF0YLcGSKVG81OXu7vJmDnxyyHoTcj8wcp phO57Wqd1qIZZWpzrrPJvL21+6KMPWwX+wGimx2Vo4D9pUWnOvRcWnKWlQb1wMf+O6JL xZ7g== 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=bpsjr8iZpn16v0PYHZxuvuyUxsPdgUu6UwKD076crHI=; b=WyjfUjuJOOwd4jayOu47Jwhjv+i6xX1NaYlEFiaKGMkAjhawO6s/zHRmg5O11yiAcr 2R0CXjLEu1Uo4Rv1xsqJVRiiPJKYn/GfzybZHaqawaPhoE5FjkzaskyBuL9u8Y4N7qNA YV8spFNOokl1rij0zkYZlbF8+DE2uTXNHMQxd8R9cd7/Oe/iGi02ZojVgHiC/GhwAi2g c9l/zXRoMi0tGH20gyrHedBkePkJepCccWhS1pGNziUiBmZwdHglOYwca1UMGHtsHfJe 6pDM2r/wkWtRaSBnlZh4RlnEXpvw2R7WqBunEo/ONpz/ZcwyIollWeuv7ysWnk714Rib VGqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=J0NIXwkq; 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 k1si3887631pgq.144.2019.02.14.18.40.32; Thu, 14 Feb 2019 18:40:48 -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=J0NIXwkq; 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 S2387950AbfBOCfm (ORCPT + 99 others); Thu, 14 Feb 2019 21:35:42 -0500 Received: from mail.kernel.org ([198.145.29.99]:51150 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732098AbfBOCLE (ORCPT ); Thu, 14 Feb 2019 21:11:04 -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 6C4FC222C9; Fri, 15 Feb 2019 02:11:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1550196663; bh=R22q3kjPP7wnu7FbPwSOOUQiJT8xPk+HbIVi7pYoiCY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=J0NIXwkqVPtloFZFlvNI7eqMBLqxAh+w7pG7tXnIXqz1e5nGgabHjRiWEzkALCnam FqBRRIr7XnuR8pa85rVlmYlOTbovwAyMdMm28VtrPQ2FOjrK9z7U8N+jucro+ulzT+ qWaO3vncOt/2vn5asTZWa8GLOqWJRGTO7OtDul6E= 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 4.20 72/77] cfg80211: extend range deviation for DMG Date: Thu, 14 Feb 2019 21:08:50 -0500 Message-Id: <20190215020855.176727-72-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190215020855.176727-1-sashal@kernel.org> References: <20190215020855.176727-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 ecfb1a06dbb2..cce4c16eaaa0 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c @@ -1255,7 +1255,7 @@ static bool is_valid_rd(const struct ieee80211_regdomain *rd) * 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". @@ -1270,7 +1270,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