linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arend Van Spriel <arend.vanspriel@broadcom.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: "linux-wireless" <linux-wireless@vger.kernel.org>,
	Pradeep Kumar Chitrapu <pradeepc@codeaurora.org>,
	Jouni Malinen <j@w1.fi>
Subject: Re: [PATCH V2] cfg80211: adapt to new channelization of the 6GHz band
Date: Fri, 29 May 2020 13:46:36 +0200	[thread overview]
Message-ID: <17260415d60.279b.9b12b7fc0a3841636cfb5e919b41b954@broadcom.com> (raw)
In-Reply-To: <19c8ea7e8b0f78036cda9ecf55484755582cf6bb.camel@sipsolutions.net>

On May 29, 2020 11:53:30 AM Johannes Berg <johannes@sipsolutions.net> wrote:

> On Fri, 2020-05-29 at 11:41 +0200, Arend Van Spriel wrote:
>> It also fixes a missing MHZ_TO_KHZ() macro for 6GHz channels while at it.
>
> Yeah, I actually saw and fixed that earlier, but whatever. I can fix up
> any issues.
>
>> case NL80211_BAND_6GHZ:
>> - /* see 802.11ax D4.1 27.3.22.2 */
>> + /* see 802.11ax D6.1 27.3.23.2 */
>> + if (chan == 2)
>> + return MHZ_TO_KHZ(5935);
>> if (chan <= 253)
>> - return 5940 + chan * 5;
>> + return MHZ_TO_KHZ(5950 + chan * 5);
>
> So this can return 5950+5*253 == 7215
>
>> @@ -119,11 +121,14 @@ int ieee80211_freq_khz_to_channel(u32 freq)
>
>> 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;
>
> and here you have no real upper bound, which is fine
>
>> @@ -1662,6 +1667,40 @@ bool ieee80211_chandef_to_operating_class(struct
>
>> + /* 6GHz, channels 1..233 */
>> + if (freq == 5935) {
>> + if (chandef->width != NL80211_CHAN_WIDTH_20)
>> + return false;
>> +
>> + *op_class = 136;
>> + return true;
>> + } else if (freq > 5935 && freq <= 7115) {
>
> but here both the comment and the code say 7115? Should that be 1..253
> and 7215, respectively?
>
> I can fix, no need to resend.

The 802.11 spec specifies the 1..253 range. The FCC has proposed the U-NII 
bands 5 to 8 for the 6G band. U-NII-8 ends at 7125 so the highest 20MHz 
center freq is 7115, ie. channel 233. Have to admit that mixing the two in 
this patch can be confusing. I leave it at your discretion how to fix it. I 
can also resend if necessary.

Regards,
Arend




      reply	other threads:[~2020-05-29 11:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1590744414-55473-1-git-send-email-arend.vanspriel@broadcom.com>
2020-05-29  9:41 ` [PATCH V2] cfg80211: adapt to new channelization of the 6GHz band Arend Van Spriel
2020-05-29  9:53   ` Johannes Berg
2020-05-29 11:46     ` Arend Van Spriel [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=17260415d60.279b.9b12b7fc0a3841636cfb5e919b41b954@broadcom.com \
    --to=arend.vanspriel@broadcom.com \
    --cc=j@w1.fi \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=pradeepc@codeaurora.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).