From patchwork Tue Jun 25 11:10:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arend van Spriel X-Patchwork-Id: 11015323 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B16F314B6 for ; Tue, 25 Jun 2019 11:20:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A54522836F for ; Tue, 25 Jun 2019 11:20:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 999B728779; Tue, 25 Jun 2019 11:20:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 42E372836F for ; Tue, 25 Jun 2019 11:20:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730664AbfFYLUh (ORCPT ); Tue, 25 Jun 2019 07:20:37 -0400 Received: from rnd-relay.smtp.broadcom.com ([192.19.229.170]:48920 "EHLO rnd-relay.smtp.broadcom.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730629AbfFYLUg (ORCPT ); Tue, 25 Jun 2019 07:20:36 -0400 Received: from mail-irv-17.broadcom.com (mail-irv-17.lvn.broadcom.net [10.75.224.233]) by rnd-relay.smtp.broadcom.com (Postfix) with ESMTP id E0BD530C01F; Tue, 25 Jun 2019 04:10:31 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 rnd-relay.smtp.broadcom.com E0BD530C01F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1561461031; bh=WBqQktAQOz0qMatA1u1Asw7J6wW4knpPcYjUx/ejdw8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=g2DCvzjqTMDr0nyLmHMIOTeM9UZba7AJPxGI7TrcDdxK0a/ewNGcjjavv2MFgobVY LNK2Y4YCLX7QRMF+mcXjSVYQT4y50Hp2m9g4IkPQdSWqbrehuPz5tmUm3rCT4k+4Y0 EPjBw93MGgWUl3l2wTeeoTn+wH/RFNss9aZVFPmM= Received: from bld-bun-01.bun.broadcom.com (bld-bun-01.bun.broadcom.com [10.176.128.83]) by mail-irv-17.broadcom.com (Postfix) with ESMTP id 3BD3E60D7B; Tue, 25 Jun 2019 04:10:32 -0700 (PDT) Received: by bld-bun-01.bun.broadcom.com (Postfix, from userid 25152) id CDD93B02D05; Tue, 25 Jun 2019 13:10:29 +0200 (CEST) From: Arend van Spriel To: Johannes Berg Cc: linux-wireless@vger.kernel.org, Arend van Spriel Subject: [RFC V2 1/8] nl80211: add 6GHz band definition to enum nl80211_band Date: Tue, 25 Jun 2019 13:10:20 +0200 Message-Id: <1561461027-10793-2-git-send-email-arend.vanspriel@broadcom.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1561461027-10793-1-git-send-email-arend.vanspriel@broadcom.com> References: <1561461027-10793-1-git-send-email-arend.vanspriel@broadcom.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In the 802.11ax specification a new band is introduced, which is also proposed by FCC for unlicensed use. This band is referred to as 6GHz spanning frequency range from 5925 to 7125 MHz. Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Leon Zegers Signed-off-by: Arend van Spriel --- changes: - V2 fix ABI breakage by appending the new band definition. --- include/uapi/linux/nl80211.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h index 8fc3a43..45b9117 100644 --- a/include/uapi/linux/nl80211.h +++ b/include/uapi/linux/nl80211.h @@ -4536,6 +4536,7 @@ enum nl80211_txrate_gi { * @NL80211_BAND_2GHZ: 2.4 GHz ISM band * @NL80211_BAND_5GHZ: around 5 GHz band (4.9 - 5.7 GHz) * @NL80211_BAND_60GHZ: around 60 GHz band (58.32 - 69.12 GHz) + * @NL80211_BAND_6GHZ: around 6 GHz band (5.9 - 7.2 GHz) * @NUM_NL80211_BANDS: number of bands, avoid using this in userspace * since newer kernel versions may support more bands */ @@ -4543,6 +4544,7 @@ enum nl80211_band { NL80211_BAND_2GHZ, NL80211_BAND_5GHZ, NL80211_BAND_60GHZ, + NL80211_BAND_6GHZ, NUM_NL80211_BANDS, }; From patchwork Tue Jun 25 11:10:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arend van Spriel X-Patchwork-Id: 11015329 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A104B14B6 for ; Tue, 25 Jun 2019 11:20:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 933AE28399 for ; Tue, 25 Jun 2019 11:20:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8801F28779; Tue, 25 Jun 2019 11:20:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 03D0B28399 for ; Tue, 25 Jun 2019 11:20:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730667AbfFYLUj (ORCPT ); Tue, 25 Jun 2019 07:20:39 -0400 Received: from rnd-relay.smtp.broadcom.com ([192.19.229.170]:48878 "EHLO rnd-relay.smtp.broadcom.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727138AbfFYLUf (ORCPT ); Tue, 25 Jun 2019 07:20:35 -0400 Received: from mail-irv-17.broadcom.com (mail-irv-17.lvn.broadcom.net [10.75.224.233]) by rnd-relay.smtp.broadcom.com (Postfix) with ESMTP id 07D4130C02C; Tue, 25 Jun 2019 04:10:32 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 rnd-relay.smtp.broadcom.com 07D4130C02C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1561461032; bh=bGicLqcp1/dHgg4bDICFA/Z0PBvU7+StOn1XcGfHNdg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jiu51N28f/4qtTzmoQZZjObl4ihHeN3rH8Ek6acOKfVWV34aZ8yH2uSTWpKA8FGbv CBJet+EU9QW5JhhDlWJkQHKmV35eN8WmXQRdLYAJrnIGAci2LEwzNXWjFs3seKnzl1 paSrjRopfSacCZ7eSe1/WI4nJgGDlgRBFFbIUFQQ= Received: from bld-bun-01.bun.broadcom.com (bld-bun-01.bun.broadcom.com [10.176.128.83]) by mail-irv-17.broadcom.com (Postfix) with ESMTP id 571F260D83; Tue, 25 Jun 2019 04:10:32 -0700 (PDT) Received: by bld-bun-01.bun.broadcom.com (Postfix, from userid 25152) id CEB87B02DEB; Tue, 25 Jun 2019 13:10:29 +0200 (CEST) From: Arend van Spriel To: Johannes Berg Cc: linux-wireless@vger.kernel.org, Arend van Spriel Subject: [RFC V2 2/8] cfg80211: add 6GHz UNII band definitions Date: Tue, 25 Jun 2019 13:10:21 +0200 Message-Id: <1561461027-10793-3-git-send-email-arend.vanspriel@broadcom.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1561461027-10793-1-git-send-email-arend.vanspriel@broadcom.com> References: <1561461027-10793-1-git-send-email-arend.vanspriel@broadcom.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP For the new 6GHz there are new UNII band definitions as listed in the FCC notice [1]. [1] https://docs.fcc.gov/public/attachments/FCC-18-147A1_Rcd.pdf Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Leon Zegers Signed-off-by: Arend van Spriel --- net/wireless/reg.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/net/wireless/reg.c b/net/wireless/reg.c index 4831ad74..646107a 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c @@ -3806,8 +3806,9 @@ void wiphy_regulatory_deregister(struct wiphy *wiphy) } /* - * See http://www.fcc.gov/document/5-ghz-unlicensed-spectrum-unii, for - * UNII band definitions + * See FCC notices for UNII band definitions + * 5GHz: https://www.fcc.gov/document/5-ghz-unlicensed-spectrum-unii + * 6GHz: https://www.fcc.gov/document/fcc-proposes-more-spectrum-unlicensed-use-0 */ int cfg80211_get_unii(int freq) { @@ -3831,6 +3832,22 @@ int cfg80211_get_unii(int freq) if (freq > 5725 && freq <= 5825) return 4; + /* UNII-5 */ + if (freq > 5925 && freq <= 6425) + return 5; + + /* UNII-6 */ + if (freq > 6425 && freq <= 6525) + return 6; + + /* UNII-7 */ + if (freq > 6525 && freq <= 6875) + return 7; + + /* UNII-8 */ + if (freq > 6875 && freq <= 7125) + return 8; + return -EINVAL; } From patchwork Tue Jun 25 11:10:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arend van Spriel X-Patchwork-Id: 11015313 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6CB2E924 for ; Tue, 25 Jun 2019 11:15:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 59FC71FF7E for ; Tue, 25 Jun 2019 11:15:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4D27E28609; Tue, 25 Jun 2019 11:15:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D63111FF7E for ; Tue, 25 Jun 2019 11:15:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729806AbfFYLPf (ORCPT ); Tue, 25 Jun 2019 07:15:35 -0400 Received: from rnd-relay.smtp.broadcom.com ([192.19.229.170]:44898 "EHLO rnd-relay.smtp.broadcom.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727964AbfFYLPf (ORCPT ); Tue, 25 Jun 2019 07:15:35 -0400 X-Greylist: delayed 302 seconds by postgrey-1.27 at vger.kernel.org; Tue, 25 Jun 2019 07:15:34 EDT Received: from mail-irv-17.broadcom.com (mail-irv-17.lvn.broadcom.net [10.75.224.233]) by rnd-relay.smtp.broadcom.com (Postfix) with ESMTP id D120530C014; Tue, 25 Jun 2019 04:10:30 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 rnd-relay.smtp.broadcom.com D120530C014 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1561461030; bh=rpQAs7STKtoHtjNm9J3r/4stIf2rSMHlSRSwPmzr0wA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Udw/yJRx0W80JmHqrkI+bmTIoZXWvpPDvQQoJOlt4i1OucuwsHeVO+fbToETLWQ8c ynIoA0QkwehD3Dyk9dIjdI1KRUyjksF40Mgc1TiKO0CD5g+x/HWrHs3WfSv305z4Ds FfxtSafTXqECX9dDMNTOhvoXMTyYt8M7mNOz8Dj0= Received: from bld-bun-01.bun.broadcom.com (bld-bun-01.bun.broadcom.com [10.176.128.83]) by mail-irv-17.broadcom.com (Postfix) with ESMTP id 2C46260D7B; Tue, 25 Jun 2019 04:10:31 -0700 (PDT) Received: by bld-bun-01.bun.broadcom.com (Postfix, from userid 25152) id CC541B0025F; Tue, 25 Jun 2019 13:10:29 +0200 (CEST) From: Arend van Spriel To: Johannes Berg Cc: linux-wireless@vger.kernel.org, Arend van Spriel Subject: [RFC V2 3/8] cfg80211: util: add 6GHz channel to freq conversion and vice versa Date: Tue, 25 Jun 2019 13:10:22 +0200 Message-Id: <1561461027-10793-4-git-send-email-arend.vanspriel@broadcom.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1561461027-10793-1-git-send-email-arend.vanspriel@broadcom.com> References: <1561461027-10793-1-git-send-email-arend.vanspriel@broadcom.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Extend the functions ieee80211_channel_to_frequency() and ieee80211_frequency_to_channel() to support 6GHz band according specification in 802.11ax D4.1 27.3.22.2. Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Leon Zegers Signed-off-by: Arend van Spriel --- net/wireless/util.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/net/wireless/util.c b/net/wireless/util.c index 1c39d6a..4e633d4 100644 --- a/net/wireless/util.c +++ b/net/wireless/util.c @@ -91,6 +91,11 @@ int ieee80211_channel_to_frequency(int chan, enum nl80211_band band) else return 5000 + chan * 5; break; + case NL80211_BAND_6GHZ: + /* see 802.11ax D4.1 27.3.22.2 */ + if (chan <= 253) + return 5940 + chan * 5; + break; case NL80211_BAND_60GHZ: if (chan < 7) return 56160 + chan * 2160; @@ -111,8 +116,11 @@ int ieee80211_frequency_to_channel(int freq) return (freq - 2407) / 5; else if (freq >= 4910 && freq <= 4980) return (freq - 4000) / 5; - else if (freq <= 45000) /* DMG band lower limit */ + else if (freq < 5940) 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; else if (freq >= 58320 && freq <= 70200) return (freq - 56160) / 2160; else From patchwork Tue Jun 25 11:10:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arend van Spriel X-Patchwork-Id: 11015327 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6A9AF924 for ; Tue, 25 Jun 2019 11:20:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 599612836F for ; Tue, 25 Jun 2019 11:20:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4E8832863C; Tue, 25 Jun 2019 11:20:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 02D052836F for ; Tue, 25 Jun 2019 11:20:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730643AbfFYLUf (ORCPT ); Tue, 25 Jun 2019 07:20:35 -0400 Received: from rnd-relay.smtp.broadcom.com ([192.19.229.170]:48886 "EHLO rnd-relay.smtp.broadcom.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728900AbfFYLUe (ORCPT ); Tue, 25 Jun 2019 07:20:34 -0400 Received: from mail-irv-17.broadcom.com (mail-irv-17.lvn.broadcom.net [10.75.224.233]) by rnd-relay.smtp.broadcom.com (Postfix) with ESMTP id DE0F030C01C; Tue, 25 Jun 2019 04:10:31 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 rnd-relay.smtp.broadcom.com DE0F030C01C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1561461031; bh=wQW1g9afgWHv3wlMgELh7kRgNcwwtNlfiR3bhHlhj34=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=f/UUTtVKUrH/0wkQlIPfhveHEZaCyID36CfPsYY0VCAB0SAlt30GbY3WUff/WrOAn AHjwrrgh8MBUcCKlQ/Flbh6y2HTdHoHOfnR2ir3eoAnFJQud63sUaARXTGXsSdjiq7 Zp34NLb0eyfz2mmZ8E1M6PtC01s+wraop6Aj+CMI= Received: from bld-bun-01.bun.broadcom.com (bld-bun-01.bun.broadcom.com [10.176.128.83]) by mail-irv-17.broadcom.com (Postfix) with ESMTP id 3BF9760D7E; Tue, 25 Jun 2019 04:10:32 -0700 (PDT) Received: by bld-bun-01.bun.broadcom.com (Postfix, from userid 25152) id CE354B02A66; Tue, 25 Jun 2019 13:10:29 +0200 (CEST) From: Arend van Spriel To: Johannes Berg Cc: linux-wireless@vger.kernel.org, Arend van Spriel Subject: [RFC V2 4/8] cfg80211: extend ieee80211_operating_class_to_band() for 6GHz Date: Tue, 25 Jun 2019 13:10:23 +0200 Message-Id: <1561461027-10793-5-git-send-email-arend.vanspriel@broadcom.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1561461027-10793-1-git-send-email-arend.vanspriel@broadcom.com> References: <1561461027-10793-1-git-send-email-arend.vanspriel@broadcom.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add 6GHz operating class range as defined in 802.11ax D4.1 Annex E. Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Leon Zegers Signed-off-by: Arend van Spriel --- net/wireless/util.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/wireless/util.c b/net/wireless/util.c index 4e633d4..4462837 100644 --- a/net/wireless/util.c +++ b/net/wireless/util.c @@ -1474,6 +1474,9 @@ bool ieee80211_operating_class_to_band(u8 operating_class, case 128 ... 130: *band = NL80211_BAND_5GHZ; return true; + case 131 ... 135: + *band = NL80211_BAND_6GHZ; + return true; case 81: case 82: case 83: From patchwork Tue Jun 25 11:10:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arend van Spriel X-Patchwork-Id: 11015321 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 92BBE924 for ; Tue, 25 Jun 2019 11:20:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 863062858E for ; Tue, 25 Jun 2019 11:20:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7ADC728779; Tue, 25 Jun 2019 11:20:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1EEF92863C for ; Tue, 25 Jun 2019 11:20:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730659AbfFYLUg (ORCPT ); Tue, 25 Jun 2019 07:20:36 -0400 Received: from rnd-relay.smtp.broadcom.com ([192.19.229.170]:48876 "EHLO rnd-relay.smtp.broadcom.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729096AbfFYLUf (ORCPT ); Tue, 25 Jun 2019 07:20:35 -0400 Received: from mail-irv-17.broadcom.com (mail-irv-17.lvn.broadcom.net [10.75.224.233]) by rnd-relay.smtp.broadcom.com (Postfix) with ESMTP id 02E2930C024; Tue, 25 Jun 2019 04:10:32 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 rnd-relay.smtp.broadcom.com 02E2930C024 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1561461032; bh=5goibmUdKmSQmYE3OGu2YspPrIWECvLFDb8dFRV7RrE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lL+tX+y90aWYvY0nNfwEhzwMawpN5acrJ93rBoLW39ND9FRXaStE3dCaY1hr/xVFm ZFE77NLKmFfLN10ffr9DPPiImWAMTbGSQFlRlZODBtIF7tB0Vs/I2FfR/HGaQx1F5F gkD7P8cPPB07UbADNcc/hnQrV77HpYZAa2Cm4ozQ= Received: from bld-bun-01.bun.broadcom.com (bld-bun-01.bun.broadcom.com [10.176.128.83]) by mail-irv-17.broadcom.com (Postfix) with ESMTP id 857D460D85; Tue, 25 Jun 2019 04:10:32 -0700 (PDT) Received: by bld-bun-01.bun.broadcom.com (Postfix, from userid 25152) id CEF73B02AFA; Tue, 25 Jun 2019 13:10:29 +0200 (CEST) From: Arend van Spriel To: Johannes Berg Cc: linux-wireless@vger.kernel.org, Arend van Spriel Subject: [RFC V2 5/8] cfg80211: add 6GHz in code handling array with NUM_NL80211_BANDS entries Date: Tue, 25 Jun 2019 13:10:24 +0200 Message-Id: <1561461027-10793-6-git-send-email-arend.vanspriel@broadcom.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1561461027-10793-1-git-send-email-arend.vanspriel@broadcom.com> References: <1561461027-10793-1-git-send-email-arend.vanspriel@broadcom.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In nl80211.c there is a policy for all bands in NUM_NL80211_BANDS and in trace.h there is a callback trace for multicast rates which is per band in NUM_NL80211_BANDS. Both need to be extended for the new NL80211_BAND_6GHZ. Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Leon Zegers Signed-off-by: Arend van Spriel --- net/wireless/nl80211.c | 1 + net/wireless/trace.h | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index fc83dd1..57bc35a 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -667,6 +667,7 @@ static int validate_ie_attr(const struct nlattr *attr, nl80211_match_band_rssi_policy[NUM_NL80211_BANDS] = { [NL80211_BAND_2GHZ] = { .type = NLA_S32 }, [NL80211_BAND_5GHZ] = { .type = NLA_S32 }, + [NL80211_BAND_6GHZ] = { .type = NLA_S32 }, [NL80211_BAND_60GHZ] = { .type = NLA_S32 }, }; diff --git a/net/wireless/trace.h b/net/wireless/trace.h index 4fbb91a..d98ad2b 100644 --- a/net/wireless/trace.h +++ b/net/wireless/trace.h @@ -2446,10 +2446,11 @@ sizeof(int) * NUM_NL80211_BANDS); ), TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " - "mcast_rates [2.4GHz=0x%x, 5.2GHz=0x%x, 60GHz=0x%x]", + "mcast_rates [2.4GHz=0x%x, 5.2GHz=0x%x, 6GHz=0x%x, 60GHz=0x%x]", WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->mcast_rate[NL80211_BAND_2GHZ], __entry->mcast_rate[NL80211_BAND_5GHZ], + __entry->mcast_rate[NL80211_BAND_6GHZ], __entry->mcast_rate[NL80211_BAND_60GHZ]) ); From patchwork Tue Jun 25 11:10:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arend van Spriel X-Patchwork-Id: 11015319 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 66EAA924 for ; Tue, 25 Jun 2019 11:20:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 59D6D205A8 for ; Tue, 25 Jun 2019 11:20:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 49702288A2; Tue, 25 Jun 2019 11:20:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E03CB285A3 for ; Tue, 25 Jun 2019 11:20:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728900AbfFYLUf (ORCPT ); Tue, 25 Jun 2019 07:20:35 -0400 Received: from rnd-relay.smtp.broadcom.com ([192.19.229.170]:48888 "EHLO rnd-relay.smtp.broadcom.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730629AbfFYLUf (ORCPT ); Tue, 25 Jun 2019 07:20:35 -0400 Received: from mail-irv-17.broadcom.com (mail-irv-17.lvn.broadcom.net [10.75.224.233]) by rnd-relay.smtp.broadcom.com (Postfix) with ESMTP id DE05130C004; Tue, 25 Jun 2019 04:10:31 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 rnd-relay.smtp.broadcom.com DE05130C004 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1561461031; bh=qLgeRUgG74OOJPHvet1nvjlzYIxEnqIoFdGG1pCujsU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nbKj7pTWZC6aYZ5KvXTC+2ZTJUFKcTIK+SCpmyhWyI0Ch0cRyLH5hAi0F4q2bUs24 7Y/LbwqtbwkPGZMDr8eWibYYDnEfuaxf6k6pKwqaWcJYthsKkozJjZ5d58717ICzDZ 6AI1I8P5z65FYgasklrq58JjuvUOmnwqbva8bkQU= Received: from bld-bun-01.bun.broadcom.com (bld-bun-01.bun.broadcom.com [10.176.128.83]) by mail-irv-17.broadcom.com (Postfix) with ESMTP id 3C2BA60D81; Tue, 25 Jun 2019 04:10:32 -0700 (PDT) Received: by bld-bun-01.bun.broadcom.com (Postfix, from userid 25152) id CD68BB02E9B; Tue, 25 Jun 2019 13:10:29 +0200 (CEST) From: Arend van Spriel To: Johannes Berg Cc: linux-wireless@vger.kernel.org, Arend van Spriel Subject: [RFC V2 6/8] cfg80211: use same IR permissive rules for 6GHz band Date: Tue, 25 Jun 2019 13:10:25 +0200 Message-Id: <1561461027-10793-7-git-send-email-arend.vanspriel@broadcom.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1561461027-10793-1-git-send-email-arend.vanspriel@broadcom.com> References: <1561461027-10793-1-git-send-email-arend.vanspriel@broadcom.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The function cfg80211_ir_permissive_chan() is applicable for 6GHz band as well so make sure it is handled. Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Leon Zegers Signed-off-by: Arend van Spriel --- net/wireless/chan.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/wireless/chan.c b/net/wireless/chan.c index 7dc1bbd..7c9d204 100644 --- a/net/wireless/chan.c +++ b/net/wireless/chan.c @@ -894,7 +894,8 @@ static bool cfg80211_ir_permissive_chan(struct wiphy *wiphy, if (chan == other_chan) return true; - if (chan->band != NL80211_BAND_5GHZ) + if (chan->band != NL80211_BAND_5GHZ && + chan->band != NL80211_BAND_6GHZ) continue; r1 = cfg80211_get_unii(chan->center_freq); From patchwork Tue Jun 25 11:10:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arend van Spriel X-Patchwork-Id: 11015325 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F136E1575 for ; Tue, 25 Jun 2019 11:20:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E05512836F for ; Tue, 25 Jun 2019 11:20:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D4C03285D5; Tue, 25 Jun 2019 11:20:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6CC8328399 for ; Tue, 25 Jun 2019 11:20:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730657AbfFYLUg (ORCPT ); Tue, 25 Jun 2019 07:20:36 -0400 Received: from rnd-relay.smtp.broadcom.com ([192.19.229.170]:48890 "EHLO rnd-relay.smtp.broadcom.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730628AbfFYLUf (ORCPT ); Tue, 25 Jun 2019 07:20:35 -0400 Received: from mail-irv-17.broadcom.com (mail-irv-17.lvn.broadcom.net [10.75.224.233]) by rnd-relay.smtp.broadcom.com (Postfix) with ESMTP id DE4F930C01D; Tue, 25 Jun 2019 04:10:31 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 rnd-relay.smtp.broadcom.com DE4F930C01D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1561461031; bh=rTdnG2aRFOO0KC/KI61mstGyLoXkrAjLGr26vfgYNcg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TkvWqqmzkElxgH9E4gXbuwpvWQGU82Ed3ZrbolOu2GOJ+Rm4T9Ii/3ZYYGzZjxc1o urmjyb6ejUcon7n1hbmPJyaHNkZ3kzIbIR+7Z53U3IBVIU7W4rQkPpljLzx1zZrB1z V87O1Sn4722XR5EkdA4UCikctA2V08j15O/7Pt9w= Received: from bld-bun-01.bun.broadcom.com (bld-bun-01.bun.broadcom.com [10.176.128.83]) by mail-irv-17.broadcom.com (Postfix) with ESMTP id 3BA5560D34; Tue, 25 Jun 2019 04:10:32 -0700 (PDT) Received: by bld-bun-01.bun.broadcom.com (Postfix, from userid 25152) id CE7A2B02BBB; Tue, 25 Jun 2019 13:10:29 +0200 (CEST) From: Arend van Spriel To: Johannes Berg Cc: linux-wireless@vger.kernel.org, Arend van Spriel Subject: [RFC V2 7/8] cfg80211: ibss: use 11a mandatory rates for 6GHz band operation Date: Tue, 25 Jun 2019 13:10:26 +0200 Message-Id: <1561461027-10793-8-git-send-email-arend.vanspriel@broadcom.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1561461027-10793-1-git-send-email-arend.vanspriel@broadcom.com> References: <1561461027-10793-1-git-send-email-arend.vanspriel@broadcom.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The default mandatory rates, ie. when not specified by user-space, is determined by the band. Select 11a rateset for 6GHz band. Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Leon Zegers Signed-off-by: Arend van Spriel --- net/wireless/ibss.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/net/wireless/ibss.c b/net/wireless/ibss.c index d1743e6..ae8fe66 100644 --- a/net/wireless/ibss.c +++ b/net/wireless/ibss.c @@ -104,13 +104,19 @@ int __cfg80211_join_ibss(struct cfg80211_registered_device *rdev, * use the mandatory rate set for 11b or * 11a for maximum compatibility. */ - struct ieee80211_supported_band *sband = - rdev->wiphy.bands[params->chandef.chan->band]; + struct ieee80211_supported_band *sband; + enum nl80211_band band; + u32 flag; int j; - u32 flag = params->chandef.chan->band == NL80211_BAND_5GHZ ? - IEEE80211_RATE_MANDATORY_A : - IEEE80211_RATE_MANDATORY_B; + band = params->chandef.chan->band; + if (band == NL80211_BAND_5GHZ || + band == NL80211_BAND_6GHZ) + flag = IEEE80211_RATE_MANDATORY_A; + else + flag = IEEE80211_RATE_MANDATORY_B; + + sband = rdev->wiphy.bands[band]; for (j = 0; j < sband->n_bitrates; j++) { if (sband->bitrates[j].flags & flag) params->basic_rates |= BIT(j); From patchwork Tue Jun 25 11:10:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arend van Spriel X-Patchwork-Id: 11015317 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B6604924 for ; Tue, 25 Jun 2019 11:15:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A96C91FF7E for ; Tue, 25 Jun 2019 11:15:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9DB9B28609; Tue, 25 Jun 2019 11:15:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4ED941FF7E for ; Tue, 25 Jun 2019 11:15:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729578AbfFYLPf (ORCPT ); Tue, 25 Jun 2019 07:15:35 -0400 Received: from rnd-relay.smtp.broadcom.com ([192.19.229.170]:44900 "EHLO rnd-relay.smtp.broadcom.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728773AbfFYLPf (ORCPT ); Tue, 25 Jun 2019 07:15:35 -0400 Received: from mail-irv-17.broadcom.com (mail-irv-17.lvn.broadcom.net [10.75.224.233]) by rnd-relay.smtp.broadcom.com (Postfix) with ESMTP id 3073430C009; Tue, 25 Jun 2019 04:10:31 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 rnd-relay.smtp.broadcom.com 3073430C009 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1561461031; bh=gaOlaNzDs92SPfiE5cFW9fbJpfQKUwXR9yLVoXOFWoE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nvX3W/78oqpT+rSygYtR0mRkp/55NvMfPWDdKk2SPPYmSS1uQ/F0ALCSAsVnwpEti +JNHhyM+a1qL/v5zbs+tLoo8IaZe+Wg1oX/arHXdmtfxqRHhUuizvVJtPi6jhDPK7s 7rnId0SIRd2wjQehqOf+G18CKdF7wqrqdF0BWT04= Received: from bld-bun-01.bun.broadcom.com (bld-bun-01.bun.broadcom.com [10.176.128.83]) by mail-irv-17.broadcom.com (Postfix) with ESMTP id 7A43560D34; Tue, 25 Jun 2019 04:10:31 -0700 (PDT) Received: by bld-bun-01.bun.broadcom.com (Postfix, from userid 25152) id CCD4CB02B44; Tue, 25 Jun 2019 13:10:29 +0200 (CEST) From: Arend van Spriel To: Johannes Berg Cc: linux-wireless@vger.kernel.org, Arend van Spriel Subject: [RFC V2 8/8] cfg80211: apply same mandatory rate flags for 5GHz and 6GHz Date: Tue, 25 Jun 2019 13:10:27 +0200 Message-Id: <1561461027-10793-9-git-send-email-arend.vanspriel@broadcom.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1561461027-10793-1-git-send-email-arend.vanspriel@broadcom.com> References: <1561461027-10793-1-git-send-email-arend.vanspriel@broadcom.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP For the new 6GHz band the same rules apply for mandatory rates so add it to set_mandatory_flags_band() function. Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Leon Zegers Signed-off-by: Arend van Spriel --- net/wireless/util.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/wireless/util.c b/net/wireless/util.c index 4462837..f0558e7 100644 --- a/net/wireless/util.c +++ b/net/wireless/util.c @@ -156,6 +156,7 @@ static void set_mandatory_flags_band(struct ieee80211_supported_band *sband) switch (sband->band) { case NL80211_BAND_5GHZ: + case NL80211_BAND_6GHZ: want = 3; for (i = 0; i < sband->n_bitrates; i++) { if (sband->bitrates[i].bitrate == 60 ||