Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1017058ybt; Fri, 19 Jun 2020 21:44:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzn0JC5sdCgo1EiNvSexJ7M8X6hKCSc7fW1hMkwJaw53+PBcdvrgkYNd1hXLdD1Uqdl3JCS X-Received: by 2002:a17:906:7c07:: with SMTP id t7mr579516ejo.487.1592628283584; Fri, 19 Jun 2020 21:44:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592628283; cv=none; d=google.com; s=arc-20160816; b=KZC2xQcacEzIRnABiCLUwx1HaLFE7QdRZZ21+LhReoxwvLYlJECBxTeyRhdsTY9pO7 4gxKrKNAZ8jiwy56lXd8Ixsj163tZSm5ixKX9RdUsfEmwc9pX9b6pVCw4g44IdNuzVC5 o3GEdvImpvUh98PkA0VdVAtdgJX42fv2hMaKQXwE6Gtyqo+hzYdjEt8Tdw4Pf4UeXIha r4QM5i5JSW71I2/573w7XFKUrN5m+cutau2iyc2CAqUU+v4S+HbTQtUrptqR3zid/Ip1 02Jp1Y/KC3XyyENzVeysTfQl3Fj5kLxdP2IKosDdFmlI3/0lANWGC0HUyDjpC5hzdnH7 UUvQ== 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=CO7DnmSZBWrbNwUBAgwGrdHT20QVpXDVNTY/tK9rMlE=; b=bKiv5AJ1quB1Zv8QOGODuJIQDot8lsXeKYERjPtDSWvuJxoqrrIDPCaS1gIoj/89oW u9NU7SvhBEUpCW8Q3GgUFKs84rkIwUXXV55M8lKKDr/DC2E9FKqMfsvCicxF2vz/K/4H VovxVspWTrI5IYlKkWqtcUn0mtDjHMz7kkv0hb3/bDJcgdixiC2E6Zjy4XLA8dBuIvjO 0L/L1A/JRGFDqJFc2/yUudcPfQ4+3OnAaT3LAGHW6IynYd/QjHCmM/f3VjjVj2Vdf5MG p96KBCmK1Dc0tMG3nU6HOiPwVM2Yg8oPXJ4lJ9GD8c8srH/RF4eQf5lc4NoP3VIqMQp4 4/EA== 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 21si5411666edv.510.2020.06.19.21.44.21; Fri, 19 Jun 2020 21:44:43 -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 S2391622AbgFSVKj (ORCPT + 99 others); Fri, 19 Jun 2020 17:10:39 -0400 Received: from alexa-out-sd-02.qualcomm.com ([199.106.114.39]:8158 "EHLO alexa-out-sd-02.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389497AbgFSVKj (ORCPT ); Fri, 19 Jun 2020 17:10:39 -0400 Received: from unknown (HELO ironmsg02-sd.qualcomm.com) ([10.53.140.142]) by alexa-out-sd-02.qualcomm.com with ESMTP; 19 Jun 2020 14:10:38 -0700 Received: from asinghal-linux.qualcomm.com ([10.234.220.60]) by ironmsg02-sd.qualcomm.com with ESMTP; 19 Jun 2020 14:10:38 -0700 Received: by asinghal-linux.qualcomm.com (Postfix, from userid 73644) id E9A6E3EBA; Fri, 19 Jun 2020 14:10:35 -0700 (PDT) From: Amar Singhal To: linux-wireless@vger.kernel.org, johannes@sipsolutions.net, jouni@codeaurora.org Cc: asinghal@codeaurora.org Subject: [PATCH] cfg80211: Adjust 6ghz frequencies per channelization Date: Fri, 19 Jun 2020 14:10:28 -0700 Message-Id: <1592601028-20319-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. Change-Id: I3a10fbef7ece7b86f44ac9bd09556f9d89d1844c 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..f64af43 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.23.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.23.2 */ + return (freq - 5950) / 5; else if (freq >= 58320 && freq <= 70200) return (freq - 56160) / 2160; else -- 1.9.1