Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2515766ybt; Sun, 21 Jun 2020 23:39:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyj3Y1M7j3gMwAG4yBA9AEWXmDRGfE9W0iQdT06+TNu3LNATl2EGIIuVPddGFsD1uyFKgeA X-Received: by 2002:a50:f297:: with SMTP id f23mr15226775edm.222.1592807971582; Sun, 21 Jun 2020 23:39:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592807971; cv=none; d=google.com; s=arc-20160816; b=gFK7RgdgEVy0vxpdV/Exb4FMSkRf+m6KQ/azLFr/GCmCBkOtD0S4ErIlKjPFPUaBG2 4M4HrzW8FoEPu+Rp71UW/nxN/avMqNSRgsCnXAK1A2gzSk+gxjsB45gcuuB6a/OH7oAx 7DETDq3M8zzz9nyNEli+/3cG8mxuNJNsr6bZ/PnBdU30zMfN6Gpk67uQFsh4Eln7n3ZN zyrhDDRR5F4XnPbb94pPd5TXRVJe0cuDB8/KBs0qR7i/7Eq/ltaBMgWPscWjzR6MgNoY 3xk0cU/BH/V6/FwbGJqwYM/7OxEaH9JMLHG9zlVNPO8RIMWwUIZBurKqeQ29cwvd4wAp FQjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dmarc-filter:dkim-signature; bh=RXqtcuMntGVVBMWs+ZGF5Hei6F/RdSRyyKSG5a1N4AI=; b=z4mxNHXQFvjltGM5LBGp4fRRDmGMLcVqh4zhGid1tStbISruI1TxCOFJPU7YfzhpWx DqijTXuPmpcmRbTZabbHRyUstHo7eoznugq2ellkbMldU4Cx16gC3cTl8FiH4rkXZGty pcO/tOOqr7ideawKV7fHvWEYISVACYASSYK+W9t3vxTzT7ot4eZLac8zwG53LtAya6aE Nr4iGPloN2srnDcEDtCdlUDzEscfl6hz+0ll/YP0KiU2PjT8EboDg7KHyhGP3J9TQszv C+VMz5txvSBV7ZKsG4pH9zEqmmbIoRdhTMkHE9OrGtRgIRdMRt0UpnA0T1SXZ70arLjZ x2Nw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=atfQhRd2; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n23si8968342eje.711.2020.06.21.23.38.50; Sun, 21 Jun 2020 23:39:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=atfQhRd2; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726620AbgFVGiI (ORCPT + 99 others); Mon, 22 Jun 2020 02:38:08 -0400 Received: from mail29.static.mailgun.info ([104.130.122.29]:20765 "EHLO mail29.static.mailgun.info" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725933AbgFVGiH (ORCPT ); Mon, 22 Jun 2020 02:38:07 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1592807887; h=Message-Id: Date: Subject: Cc: To: From: Sender; bh=RXqtcuMntGVVBMWs+ZGF5Hei6F/RdSRyyKSG5a1N4AI=; b=atfQhRd2qgaWQSMjKOk7nxdgwGa8U1QbrkpXtME5JVtUkoZyRsi0bMNms2I8FX/1gzr/uYCJ 6Bl2wk1F0Jod8/DTRuHoCoj3BWMYFekXLRkV7kh8NNjhU0/J4WyfjmPNBxQYpw1FzKy/uPUX h3O+VzXknz8cu30oPut4ptH2iOk= X-Mailgun-Sending-Ip: 104.130.122.29 X-Mailgun-Sid: WyI3YTAwOSIsICJsaW51eC13aXJlbGVzc0B2Z2VyLmtlcm5lbC5vcmciLCAiYmU5ZTRhIl0= Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n12.prod.us-west-2.postgun.com with SMTP id 5ef051c7fe1db4db8908396b (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Mon, 22 Jun 2020 06:37:59 GMT Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 5E9D0C433C8; Mon, 22 Jun 2020 06:37:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=ALL_TRUSTED,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.0 Received: from pradeepc-linux.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: pradeepc) by smtp.codeaurora.org (Postfix) with ESMTPSA id 55193C433C6; Mon, 22 Jun 2020 06:37:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 55193C433C6 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=none smtp.mailfrom=pradeepc@codeaurora.org From: Pradeep Kumar Chitrapu To: Johannes Berg Cc: linux-wireless@vger.kernel.org, Pradeep Kumar Chitrapu Subject: [PATCH] cfg80211: fix 6ghz starting frequency Date: Sun, 21 Jun 2020 23:37:49 -0700 Message-Id: <1592807869-781-1-git-send-email-pradeepc@codeaurora.org> X-Mailer: git-send-email 1.9.1 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Fixes channel to frequency mappings per latest specification IEEE P802.11ax/D6.1 Fixes: d1a1646c ("cfg80211: adapt to new channelization of the 6GHz band") Signed-off-by: Pradeep Kumar Chitrapu --- net/wireless/util.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/net/wireless/util.c b/net/wireless/util.c index 4d3b76f94f55..0eee55476d79 100644 --- a/net/wireless/util.c +++ b/net/wireless/util.c @@ -117,15 +117,18 @@ int ieee80211_freq_khz_to_channel(u32 freq) /* see 802.11 17.3.8.3.2 and Annex J */ if (freq == 2484) return 14; + /* see 802.11ax D6.1 27.3.23.2 and Annex E */ + else if (freq == 5935) + return 2; else if (freq < 2484) return (freq - 2407) / 5; else if (freq >= 4910 && freq <= 4980) return (freq - 4000) / 5; - else if (freq < 5945) + else if (freq < 5950) return (freq - 5000) / 5; else if (freq <= 45000) /* DMG band lower limit */ - /* see 802.11ax D4.1 27.3.22.2 */ - return (freq - 5940) / 5; + /* see 802.11ax D6.1 27.3.23.2 */ + return (freq - 5950) / 5; else if (freq >= 58320 && freq <= 70200) return (freq - 56160) / 2160; else -- 1.9.1