Page MenuHomeFreeBSD

net80211: enhance getflags*() and ieee80211_add_channel*()
ClosedPublic

Authored by bz on Aug 17 2020, 8:00 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Apr 9, 8:38 AM
Unknown Object (File)
Feb 21 2024, 1:36 PM
Unknown Object (File)
Jan 13 2024, 11:25 AM
Unknown Object (File)
Dec 27 2023, 1:51 PM
Unknown Object (File)
Nov 4 2023, 11:26 AM
Unknown Object (File)
Sep 18 2023, 12:45 AM
Unknown Object (File)
Sep 13 2023, 11:33 PM
Unknown Object (File)
Aug 7 2023, 1:09 PM
Subscribers

Details

Summary

For ieee80211_add_channel+*() we are passing in an int flag for
ht40 and in some cases another int flag for vht80 where we'd only
need two bits really.
Convert these variables to a bitflag and fold them together into one.
This also allows for VHT160 and VHT80P80 and whatever may come to
be considered. Define the various options currently needed.

Change the drivers (rtwn and rsu) who actually set this bit to non-0.
For convenience the "1" currently used for HT40 is preserved.

Enahnce getflags_5ghz() to handle the full set of VHT flags based
on the input flags from the the driver.

Update the regdomain implementation as well to make use of the new
flags and deal with higher [V]HT bandwidths.

ieee80211_add_channel() specifically did not take flags so it will
not support naything beyond 20Mhz channels.

Note: I am not entirely happy with the "cbw_flag[s]" name, but we
do use chan_flags elsewhere already.

MFC After: 2 weeks
Reviewed by: ...
Sponsored by: Rubicon Communications, LLC (d/b/a "Netgate")

Note2: I also have the athp change along with this and will put that
out the next days.
Note3: how does ath(4) do this as I could not figure it out unless
the ath_regdomain code populates it all by itself bypassing the
net80211 logic?

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bz requested review of this revision.Aug 17 2020, 8:00 PM
sys/dev/rtwn/if_rtwn.c
1544 ↗(On Diff #75904)

Unrelated whitespace change to be removed before commit.

gnn requested changes to this revision.Aug 18 2020, 9:17 PM
gnn added inline comments.
sys/net80211/ieee80211_regdomain.c
154 ↗(On Diff #75904)

What is this and why is it defined mid code?

This revision now requires changes to proceed.Aug 18 2020, 9:17 PM

The MS-SM stuff being defined half way through the code is left over from sam-days.

It'd be nice to tidy it up by naming it something net80211-y and using that rather than MS/SM everywhere.

(ath also uses MS/SM, but it's a global thing; it comes from the ath hal)

sys/net80211/ieee80211_regdomain.c
154 ↗(On Diff #75904)

See @adrian 's reply above.
I'll be happy to follow his advise and renamed the macros and provide them in a general place (possibly even beyond net80211) after some research as a follow-up change if that's alright?

Any further comments? I'd love to commit this Monday morning UTC.

This revision is now accepted and ready to land.Aug 20 2020, 11:13 PM
sys/net80211/ieee80211_regdomain.c
158 ↗(On Diff #75904)

This needs to be 80P80 after the previous changes in the tree now.

sys/net80211/ieee80211_regdomain.c
158 ↗(On Diff #75904)

I guess I had just missed it when I manually converted them all from 80_80 to 80P80 in various trees. Fixed in the local tree.