linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Arend Van Spriel <arend.vanspriel@broadcom.com>
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 11:53:28 +0200	[thread overview]
Message-ID: <19c8ea7e8b0f78036cda9ecf55484755582cf6bb.camel@sipsolutions.net> (raw)
In-Reply-To: <edf07cdd-ad15-4012-3afd-d8b961a80b69@broadcom.com> (sfid-20200529_114146_502376_6F982EE1)

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.

johannes


  reply	other threads:[~2020-05-29  9:53 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 [this message]
2020-05-29 11:46     ` Arend Van Spriel

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=19c8ea7e8b0f78036cda9ecf55484755582cf6bb.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=arend.vanspriel@broadcom.com \
    --cc=j@w1.fi \
    --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).