Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1016653ybt; Fri, 19 Jun 2020 21:43:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxtPEOp4T6J0NxTeEBNxurEooXGDxiY8rf7xHMUPJPhlpWmL84RI6Y1Ba6GQmkzAdlQqZXg X-Received: by 2002:a17:906:57d3:: with SMTP id u19mr6764041ejr.401.1592628235775; Fri, 19 Jun 2020 21:43:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592628235; cv=none; d=google.com; s=arc-20160816; b=u3RkAVf6M8yNT9fWviQpW0l8lRukvTIjrWfpD/lUTQd/phDjIyoC+Fdzs5b6ryL7tH vN8w89mwoeD+7C3uotk4jN4+NllXxeJVA9r7UE4kXx/Ags69VQLJk6MtmP2pt7xfC5vG Ki2TH+SyhZOz1BSFI/Gd+ByW5zc6SNDKY/DJT3rSEH4ydYR05meAfwWKIHN0zi+5PUCw Ex67OqBEv2ORUUQeQpnQzWlM4dPX4x3nm1ErhPwOUyoSo2NmKHwKSB6YWLLPsX7uT4lq 4MxGjdDqpW/IoXLysIB2rBcIDKYSdRuGONC/tYuWsiFSWxrgUtDGIIITSF45GMbhZw89 p6oA== 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; bh=vDz4WUi/yVTvjCgYvHe4Y3dGLlrwbVonRb1KcENoxRA=; b=HLhp0ZmIEQifyb27dWmv9pslzr9gL1Q6PRfxvGNGx1kM4BgYucd3cZJZfW3E+1+cnZ nnpDkqnlx7+o9u8Sym9d24j11w4RQNi2MXm4e0s5nlT2Dvsr0lNdTS28ldB4QIms3YeB sdoltfH9rwcSYx1dEkRSsvoE6d8FsphvGeq/qrmWN+4FOAjNbDKxcCpsyFkWD7QCIm1P qoBbT80jB1pbhCtSrZg0Z+pNJw8LMa5yS8+PcsU8Vy9xeJCVazhegwXV1m0tgTtgGVmN tfsAKCofk00NsD7+BvUNq5jqyGKGJ/6GkePzLQMBJJzrVB3Y/KeLwsO7Tf+o88YR5FY/ 6ZgQ== ARC-Authentication-Results: i=1; mx.google.com; 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 dn14si6590305ejc.414.2020.06.19.21.43.19; Fri, 19 Jun 2020 21:43:55 -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; 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 S2391103AbgFSUwT (ORCPT + 99 others); Fri, 19 Jun 2020 16:52:19 -0400 Received: from alexa-out-sd-01.qualcomm.com ([199.106.114.38]:1483 "EHLO alexa-out-sd-01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388929AbgFSUwT (ORCPT ); Fri, 19 Jun 2020 16:52:19 -0400 Received: from unknown (HELO ironmsg01-sd.qualcomm.com) ([10.53.140.141]) by alexa-out-sd-01.qualcomm.com with ESMTP; 19 Jun 2020 13:52:18 -0700 Received: from asinghal-linux.qualcomm.com ([10.234.220.60]) by ironmsg01-sd.qualcomm.com with ESMTP; 19 Jun 2020 13:52:18 -0700 Received: by asinghal-linux.qualcomm.com (Postfix, from userid 73644) id 0F3A73EBA; Fri, 19 Jun 2020 13:52:17 -0700 (PDT) From: Amar Singhal To: linux-wireless@vger.kernel.org, johannes@sipsolutions.net, jouni@codeaaurora.org Cc: asinghal@codeaurora.org Subject: [PATCH] cfg80211: Adjust 6ghz frequencies per channelization Date: Fri, 19 Jun 2020 13:52:01 -0700 Message-Id: <1592599921-10607-1-git-send-email-asinghal@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 Per 11ax draft 6.1, 6ghz frequencies need adjustment. Also orphan channel of frequency 5935 MHz has been added. Modify utilities accordingly. Signed-off-by: Amar Singhal --- net/wireless/util.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/net/wireless/util.c b/net/wireless/util.c index df75e58..3fb4f4b 100644 --- a/net/wireless/util.c +++ b/net/wireless/util.c @@ -92,9 +92,11 @@ u32 ieee80211_channel_to_freq_khz(int chan, enum nl80211_band band) return MHZ_TO_KHZ(5000 + chan * 5); break; case NL80211_BAND_6GHZ: - /* see 802.11ax D4.1 27.3.22.2 */ - if (chan <= 253) - return 5940 + chan * 5; + /* see 802.11ax D6.1 27.3.22.2 */ + if (chan == 2) + return 5925 + chan * 5; + if (chan <= 233) + return 5950 + chan * 5; break; case NL80211_BAND_60GHZ: if (chan < 7) @@ -119,11 +121,13 @@ int ieee80211_freq_khz_to_channel(u32 freq) return (freq - 2407) / 5; else if (freq >= 4910 && freq <= 4980) return (freq - 4000) / 5; - else if (freq < 5945) + else if (freq < 5925) return (freq - 5000) / 5; + else if (freq == 5935) + return (freq - 5925) / 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.22.2 */ + return (freq - 5950) / 5; else if (freq >= 58320 && freq <= 70200) return (freq - 56160) / 2160; else -- 1.9.1