Search Linux Wireless

Re: [PATCH V2] cfg80211: adapt to new channelization of the 6GHz band

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux