From patchwork Mon Jun 22 06:40:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pradeep Kumar Chitrapu X-Patchwork-Id: 1314614 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=bvWhriiS; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256 header.s=casper.20170209 header.b=ojPjysRd; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=mg.codeaurora.org header.i=@mg.codeaurora.org header.a=rsa-sha256 header.s=smtp header.b=uGKkkAUW; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49rFCw0ctdz9sQx for ; Tue, 23 Jun 2020 02:26:36 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:References:In-Reply-To:Message-Id:Date:Subject:To: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=mB28Wy09X2C124t1L5cwyvrE5nLGt4fctYhyuVaE7bs=; b=bvWhriiSrccM5K12zRSaLoYKlg Gw4IHfnudVxQBthsxzPPRMjFZ2svX7RHeO4WR7u2ori2coWJ3oidPekvrijKWXcCJRjDR8DgocEoQ 44MyCyBwYcIxeif5FTdx3qnpXPMgQ2d/ts+ug/LMg6IDCP9Jp1+dGfzDDRfpA4boWd8/g6+N0D1lK GFKrMWFjLWTPIGO5T1EryOG5T6ety1HT5QpoVuSQRlvsqzZunZkRkhJjM4MOJtZynl2dr63hWc95B ijVdx52oWBiTuCVc7yGjI+G/55bB9aJnaYca4/zeuDj87mY1wWGADLIxBZxK1gIfkar6r7S+y0m64 dyfXsIpw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnPFX-0007df-3M; Mon, 22 Jun 2020 16:24:47 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnLvo-0004EN-QI for hostap@merlin.infradead.org; Mon, 22 Jun 2020 12:52:14 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description; bh=w7i7mmkLLEQDsb9XXLKG25Y7L0hhoZCGI2rh//td7GY=; b=ojPjysRdggxvuF/ZOBiKH+Z5f3 KxRVXJGLKUR03JmxQxfF4QjT4r8bmXPgDYo9N4LqP1dg++qetS29poOtnhbh648xFu27g//ewrN8/ 5kv+QVJKH9Ro1xUiL6ycJO2ga23i70cqtMbfJed7pgDO9my71H2kLP9Kv3kXzkm6orlbbIq6dwm3i guB22WlVqK4SEbptmPmSRv8bhhPJ4XeQmXpuZASHLGrPorKLsa93kGTs6CM0jbb+hEoGzTxGvV39B 7vPSacOo4IBAVQPYV8YdnEiwfuLRwv6vBHVUk+MYrBF2lvJBFhGKYXJ81p8i6+aerwNYUMFJ5sAtY 60VeEYHA==; Received: from mail29.static.mailgun.info ([104.130.122.29]) by casper.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnG84-0000iw-Uy for hostap@lists.infradead.org; Mon, 22 Jun 2020 06:40:33 +0000 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1592808031; h=References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=w7i7mmkLLEQDsb9XXLKG25Y7L0hhoZCGI2rh//td7GY=; b=uGKkkAUWb2prYvqDSTDNndepInEWmV2iwVZkci2BNCYcucDAKFBTmt4N3Sfiz28Vf/uPM+qK iF+yA8c38A9bLenZnz9NXllAmLG0ndJMRy+7+npYaz+AiLr8uP+VbemcwHbPDSb9tf7Ol2WS 5Vkl+eVzhZaJq84CYP7Hn4K3lJ8= X-Mailgun-Sending-Ip: 104.130.122.29 X-Mailgun-Sid: WyJkMjNkOSIsICJob3N0YXBAbGlzdHMuaW5mcmFkZWFkLm9yZyIsICJiZTllNGEiXQ== Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n01.prod.us-west-2.postgun.com with SMTP id 5ef05255f3deea03f3797e0a (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Mon, 22 Jun 2020 06:40:21 GMT Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 82274C433CB; Mon, 22 Jun 2020 06:40:21 +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=ham autolearn_force=no version=3.4.0 Received: from pradeepc2-linux.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: pradeepc) by smtp.codeaurora.org (Postfix) with ESMTPSA id 0B446C433C6; Mon, 22 Jun 2020 06:40:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 0B446C433C6 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: hostap@lists.infradead.org Subject: [PATCH 3/3] 6G: update missing channel 2 for 6GHZ Date: Sun, 21 Jun 2020 23:40:14 -0700 Message-Id: <20200622064014.25012-3-pradeepc@codeaurora.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200622064014.25012-1-pradeepc@codeaurora.org> References: <20200622064014.25012-1-pradeepc@codeaurora.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200622_074031_703040_029EED13 X-CRM114-Status: GOOD ( 16.92 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.4 on casper.infradead.org summary: Content analysis details: (-1.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [104.130.122.29 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H4 RBL: Very Good reputation (+4) [104.130.122.29 listed in wl.mailspike.net] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-Mailman-Approved-At: Mon, 22 Jun 2020 12:24:43 -0400 X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Pradeep Kumar Chitrapu MIME-Version: 1.0 Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org This adds 6GHz channel 2 with center frequency 5935MHz which is the new addition in latest specification IEEE P802.11ax/D6.1. Signed-off-by: Pradeep Kumar Chitrapu --- src/common/ieee802_11_common.c | 18 +++++++++++++++--- wpa_supplicant/op_classes.c | 7 ++++--- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/src/common/ieee802_11_common.c b/src/common/ieee802_11_common.c index 32d429fbc9fe..625b581172e8 100644 --- a/src/common/ieee802_11_common.c +++ b/src/common/ieee802_11_common.c @@ -1029,6 +1029,11 @@ enum hostapd_hw_mode ieee80211_freq_to_channel_ext(unsigned int freq, return HOSTAPD_MODE_IEEE80211A; } + if (freq == 5935) { + *op_class = 136; + return HOSTAPD_MODE_IEEE80211A; + } + if (freq > 5950 && freq <= 7115) { int bw; u8 idx = (freq - 5950) / 5; @@ -1419,6 +1424,10 @@ static int ieee80211_chan_to_freq_global(u8 op_class, u8 chan) if (chan < 1 || chan > 233) return -1; return 5950 + chan * 5; + case 136: /* UHB channel, 20MHz: 2 */ + if (chan != 2) + return -1; + return 5935; case 180: /* 60 GHz band, channels 1..8 */ if (chan < 1 || chan > 8) return -1; @@ -2190,7 +2199,7 @@ int oper_class_bw_to_int(const struct oper_class_map *map) int center_idx_to_bw_6ghz(u8 idx) { /* channels: 1, 5, 9, 13... */ - if ((idx & 0x3) == 0x1) + if ((idx & 0x3) == 0x1 || idx == 2) return 0; /* 20 MHz */ /* channels 3, 11, 19... */ if ((idx & 0x7) == 0x3) @@ -2208,6 +2217,9 @@ int center_idx_to_bw_6ghz(u8 idx) int is_6ghz_freq(int freq) { + if (freq == 5935) + return 1; + if (freq < 5950 || freq > 7115) return 0; @@ -2220,7 +2232,7 @@ int is_6ghz_freq(int freq) int is_6ghz_op_class(u8 op_class) { - return op_class >= 131 && op_class <= 135; + return op_class >= 131 && op_class <= 136; } @@ -2228,7 +2240,7 @@ int is_6ghz_psc_frequency(int freq) { int i; - if (!is_6ghz_freq(freq)) + if (!is_6ghz_freq(freq) || freq == 5935) return 0; if ((((freq - 5950) / 5) & 0x3) != 0x1) return 0; diff --git a/wpa_supplicant/op_classes.c b/wpa_supplicant/op_classes.c index ec0b5a989c8a..b46844f82025 100644 --- a/wpa_supplicant/op_classes.c +++ b/wpa_supplicant/op_classes.c @@ -22,13 +22,14 @@ static enum chan_allowed allow_channel(struct hostapd_hw_modes *mode, unsigned int *flags) { int i; - int is_6ghz = op_class >= 131 && op_class <= 135; + int is_6ghz = op_class >= 131 && op_class <= 136; for (i = 0; i < mode->num_channels; i++) { int chan_is_6ghz; - chan_is_6ghz = mode->channels[i].freq > 5950 && - mode->channels[i].freq <= 7115; + chan_is_6ghz = mode->channels[i].freq == 5935 || + (mode->channels[i].freq > 5950 && + mode->channels[i].freq <= 7115); if (is_6ghz == chan_is_6ghz && mode->channels[i].chan == chan) break; }