#
1832eb10 |
| 04-Jan-2025 |
Bjoern A. Zeeb <bz@FreeBSD.org> |
net80211: add missing 80Mhz and 160Mhz channel ranges
We have two arrays, one for 80Mhz and one for 160Mhz. Both were lacking frequency ranges for more possibly available configurations (the other
net80211: add missing 80Mhz and 160Mhz channel ranges
We have two arrays, one for 80Mhz and one for 160Mhz. Both were lacking frequency ranges for more possibly available configurations (the other bits of what is valid are for regdomain to set right).
Sponsored by: The FreeBSD Foundation MFC after: 3 days Fixes: 67f4aa3878efa, 04e7bb08a5750 Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D48357
show more ...
|
Revision tags: release/14.2.0 |
|
#
243f6925 |
| 29-Nov-2024 |
Bjoern A. Zeeb <bz@FreeBSD.org> |
net80211: 11ac: add options to manage VHT STBC
Add IEEE80211_FVHT_STBC_(TX|RX) flags to allow userspace to manage if STBC will be allowed for VHT RX/TX. For RX this will only allow us to turn it off
net80211: 11ac: add options to manage VHT STBC
Add IEEE80211_FVHT_STBC_(TX|RX) flags to allow userspace to manage if STBC will be allowed for VHT RX/TX. For RX this will only allow us to turn it off but no fine grained control of the number of supported spatial streams.
Introduce IEEE80211_FVHT_CHANWIDTH_MASK as a helper to make the spelling out of the IEEE80211_FVHT_MASK more readable.
Update ifconfig to allow setting of these flags.
Sponsored by: The FreeBSD Foundation MFC atfer: 3 days Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D47838
show more ...
|
Revision tags: release/13.4.0 |
|
#
2589197a |
| 06-Jun-2024 |
Adrian Chadd <adrian@FreeBSD.org> |
net80211: migrate the group/unicast key check into inline functions
The way that net80211 and drivers are checking for the /type/ of key is to check if it's in the vap WEP key array and if so, it's
net80211: migrate the group/unicast key check into inline functions
The way that net80211 and drivers are checking for the /type/ of key is to check if it's in the vap WEP key array and if so, it's a group key. If not, it's a unicast key.
That's not only kind of terrible, but it's also going to be problematic with future 802.11 support (for multiple unicast keys and IGTK keys for management frame protection.)
So as part of this, remove the places where this is done and instead use a pair inline functions - ieee80211_is_key_global() and ieee80211_is_key_unicast(). They currenly still use the same logic but the drivers and net80211 stack isn't doing it itself.
There are still open questions about why keys are not being correctly tagged as GROUP, GTK, PTK, etc. That will be investigated and addressed in follow-up work as a pre-cursor to MFP, IGTK, etc. as mentioned above.
Testing:
* iwn, rtwn - STA mode
Differential Revision: https://reviews.freebsd.org/D45516
show more ...
|
#
aa386085 |
| 28-Jun-2024 |
Zhenlei Huang <zlei@FreeBSD.org> |
net: Remove unneeded NULL check for the allocated ifnet
Change 4787572d0580 made if_alloc_domain() never fail, then also do the wrappers if_alloc(), if_alloc_dev(), and if_gethandle().
No functiona
net: Remove unneeded NULL check for the allocated ifnet
Change 4787572d0580 made if_alloc_domain() never fail, then also do the wrappers if_alloc(), if_alloc_dev(), and if_gethandle().
No functional change intended.
Reviewed by: kp, imp, glebius, stevek MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D45740
show more ...
|
Revision tags: release/14.1.0 |
|
#
c7f5f140 |
| 23-Apr-2024 |
Adrian Chadd <adrian@FreeBSD.org> |
net80211: add initial key management suites from 802.11-2016, APIs to register them
The WPA1/WPA2 driver capabilities aren't really enough in today's world. There are a /lot/ more key management sui
net80211: add initial key management suites from 802.11-2016, APIs to register them
The WPA1/WPA2 driver capabilities aren't really enough in today's world. There are a /lot/ more key management suites to support!
So, add initial support for net80211 and drivers to announce what key management suites are supported. These are the list from 802.11-2016 section 9.4.2.25.3 (AKM suites.)
The flags are for software supported key management.
Drivers may support more key management suites and are welcome to announce more; net80211 will only announce ones that we know net80211 knows "enough" about to support correctly.
There /are/ other suites that may be interesting to some people in the future that are not part of this set - eg if anyone ever wants to support the Chinese WAPI standard - so this bitmap is not specifically just the AKM suites in the RSN OUI.
This should eventually be communicated up to the wpa_supplicant and hostapd via a replacement driver/vap capabilities call so they know what to enable rather than just IEEE80211_C_WPA1 / IEEE80211_C_WPA2.
Differential Revision: https://reviews.freebsd.org/D44919 Reviewed by: bz
show more ...
|
#
e9961ea1 |
| 18-Apr-2024 |
Adrian Chadd <adrian@FreeBSD.org> |
net80211: add driver / crypto methods to set the hardware / software cipher suites
Drivers currently announce hardware crypto cipher support by setting up ic_cryptocaps.
This adds two public functi
net80211: add driver / crypto methods to set the hardware / software cipher suites
Drivers currently announce hardware crypto cipher support by setting up ic_cryptocaps.
This adds two public function calls:
* ieee80211_set_software_ciphers() - set the software cipher set; * ieee80211_set_hardware_ciphers() - set the hardware cipher set.
For now these just call into the newly crypto routines to set the ciphers.
This then adds the two crypto routines, similarly named, to set the hardware/software cipher suite.
This is a no-op right now - wep/tkip/ccmp are already set by default so drivers aren't required to call these routines for software encryption, and drivers already set ic_cryptocaps for hardware encryption.
Differential Revision: https://reviews.freebsd.org/D44827
show more ...
|
Revision tags: release/13.3.0 |
|
#
713db49d |
| 10-Jan-2024 |
Bjoern A. Zeeb <bz@FreeBSD.org> |
net80211: deal with lost state transitions
Since 5efea30f039c4 we can possibly lose a state transition which can cause trouble further down the road. The reproducer from 643d6dce6c1e can trigger the
net80211: deal with lost state transitions
Since 5efea30f039c4 we can possibly lose a state transition which can cause trouble further down the road. The reproducer from 643d6dce6c1e can trigger these for example. Drivers for firmware based wireless cards have worked around some of this (and other) problems in the past.
Add an array of tasks rather than a single one as we would simply get npending > 1 and lose order with other tasks. Try to keep state changes updated as queued in case we end up with more than one at a time. While this is not ideal either (call it a hack) it will sort the problem for now. We will queue in ieee80211_new_state_locked() and do checks there and dequeue in ieee80211_newstate_cb(). If we still overrun the (currently) 8 slots we will drop the state change rather than overwrite the last one. When dequeing we will update iv_nstate and keep it around for historic reasons for the moment.
The longer term we should make the callers of ieee80211_new_state[_locked]() actually use the returned errors and act appropriately but that will touch a lot more places and drivers (possibly incl. changed behaviour for ioctls).
rtwn(4) and rum(4) should probably be revisted and net80211 internals removed (for rum(4) at least the current logic still seems prone to races).
PR: 271979, 271988, 275255, 263613, 274003 Sponsored by: The FreeBSD Foundation (in 2023) MFC after: 3 days Reviewed by: cc Differential Revision: https://reviews.freebsd.org/D43389
show more ...
|
Revision tags: release/14.0.0 |
|
#
562adbe1 |
| 27-Oct-2023 |
Bjoern A. Zeeb <bz@FreeBSD.org> |
net80211: migrate ic_vhtcaps, ic_vht_mcsinfo, ic_flags_vht
Like for the VAP rename ic_flags_vht to ic_vht_flags for consistency to keep "VHT" fields together and merge ic_vhtcaps and ic_vht_mcsinfo
net80211: migrate ic_vhtcaps, ic_vht_mcsinfo, ic_flags_vht
Like for the VAP rename ic_flags_vht to ic_vht_flags for consistency to keep "VHT" fields together and merge ic_vhtcaps and ic_vht_mcsinfo into struct ieee80211_vht_cap ic_vht_cap.
While the structure layout changes no other functional changes intended.
Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: adrian, cc Differential Revision: https://reviews.freebsd.org/D42421
show more ...
|
#
fbba0d6b |
| 27-Oct-2023 |
Bjoern A. Zeeb <bz@FreeBSD.org> |
net80211: combine iv_vhtcaps and iv_vht_mcsinfo
The iv_vhtcaps and iv_vht_mcsinfo fields together form struct ieee80211_vht_cap so combine them into one field in the VAP and keep the information tog
net80211: combine iv_vhtcaps and iv_vht_mcsinfo
The iv_vhtcaps and iv_vht_mcsinfo fields together form struct ieee80211_vht_cap so combine them into one field in the VAP and keep the information together.
While the structure layout changes no other functional changes intended.
Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: adrian, cc Differential Revision: https://reviews.freebsd.org/D42420
show more ...
|
#
ef48d4fa |
| 27-Oct-2023 |
Bjoern A. Zeeb <bz@FreeBSD.org> |
net80211: rename iv_flags_vht to iv_vht_flags
While the flag field is internal start naming it as well as "iv_vht*" so we keep all "VHT" fields together. This breaks with what was done done for HT
net80211: rename iv_flags_vht to iv_vht_flags
While the flag field is internal start naming it as well as "iv_vht*" so we keep all "VHT" fields together. This breaks with what was done done for HT but with HE, EHT, .. coming one day seems the more logic choice.
No functional changes intended.
Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: adrian, cc Differential Revision: https://reviews.freebsd.org/D42419
show more ...
|
#
685dc743 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
#
4d846d26 |
| 10-May-2023 |
Warner Losh <imp@FreeBSD.org> |
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause.
Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
show more ...
|
Revision tags: release/13.2.0 |
|
#
3d0d5b21 |
| 23-Jan-2023 |
Justin Hibbits <jhibbits@FreeBSD.org> |
IfAPI: Explicitly include <net/if_private.h> in netstack
Summary: In preparation of making if_t completely opaque outside of the netstack, explicitly include the header. <net/if_var.h> will stop in
IfAPI: Explicitly include <net/if_private.h> in netstack
Summary: In preparation of making if_t completely opaque outside of the netstack, explicitly include the header. <net/if_var.h> will stop including the header in the future.
Sponsored by: Juniper Networks, Inc. Reviewed by: glebius, melifaro Differential Revision: https://reviews.freebsd.org/D38200
show more ...
|
Revision tags: release/12.4.0 |
|
#
d78a9076 |
| 07-Sep-2022 |
Gordon Bergling <gbe@FreeBSD.org> |
net80211(4): Correct a grammar mistake in a source code comment
- s/the/be the/ - s/Mhz/MHz/ - s/it'll/it will/
Reported by: bz, danfe MFC after: 3 days
|
#
8f538e27 |
| 04-Sep-2022 |
Gordon Bergling <gbe@FreeBSD.org> |
net80211(4): Remove a double word in a source code comment
- s/the the/the/
MFC after: 3 days
|
#
bd29f817 |
| 17-Aug-2022 |
Bjoern A. Zeeb <bz@FreeBSD.org> |
net80211: consistently use the IEEE80211_M_ memory related options
Replace a malloc() by IEEE80211_MALLOC(). For malloc flags even in the local ieee80211_freebsd.c there was a mix of both versions M
net80211: consistently use the IEEE80211_M_ memory related options
Replace a malloc() by IEEE80211_MALLOC(). For malloc flags even in the local ieee80211_freebsd.c there was a mix of both versions M_ and IEEE80211_M_. Consistently use the IEEE80211_M_ malloc options everywhere. If the field is changed for malloc, it'll also be changed for the other accessor functions taking a "how" field to avoid any confusion.
Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D36249
show more ...
|
#
656d0e8f |
| 29-Jul-2022 |
Bjoern A. Zeeb <bz@FreeBSD.org> |
net80211: add VHT5G and VHT2G checks/return to media_status
Add the fields for VHT (2Ghz and 5Ghz) to report back by media_status so we actually have a chance to get the right information.
Sponsore
net80211: add VHT5G and VHT2G checks/return to media_status
Add the fields for VHT (2Ghz and 5Ghz) to report back by media_status so we actually have a chance to get the right information.
Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D35977
show more ...
|
Revision tags: release/13.1.0 |
|
#
32cf376a |
| 14-Feb-2022 |
Bjoern A. Zeeb <bz@FreeBSD.org> |
net80211: enhance (disabled) debugging
Add maxchans to the disabled debugging in addchan() and copychan_prev() to aid debugging possible errors rreturned due to reaching maxchans limits.
Sponsored
net80211: enhance (disabled) debugging
Add maxchans to the disabled debugging in addchan() and copychan_prev() to aid debugging possible errors rreturned due to reaching maxchans limits.
Sponsored by: The FreeBSD Foundation MFC after: 3 days
show more ...
|
Revision tags: release/12.3.0 |
|
#
9a669553 |
| 06-Jun-2021 |
Bjoern A. Zeeb <bz@FreeBSD.org> |
net80211/drivers: improve ieee80211_rx_stats for band
While IEEE80211_R_BAND was defined, there was no place to store the band. Add a field for that, adjust ieee80211_lookup_channel_rxstatus() to r
net80211/drivers: improve ieee80211_rx_stats for band
While IEEE80211_R_BAND was defined, there was no place to store the band. Add a field for that, adjust ieee80211_lookup_channel_rxstatus() to require it, and update drivers passing "R_{FREQ|IEEE}" in already to provide the band as well. For the moment keep the fall-back code requiring all three fields.
Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D30662
show more ...
|
Revision tags: release/13.0.0, release/12.2.0 |
|
#
04e7bb08 |
| 18-Oct-2020 |
Bjoern A. Zeeb <bz@FreeBSD.org> |
net80211: update for (more) VHT160 support
Implement two macros IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_IS_160MHZ() and its 80+80 counter part to check in vhtcaps for appropriate levels of support and use
net80211: update for (more) VHT160 support
Implement two macros IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_IS_160MHZ() and its 80+80 counter part to check in vhtcaps for appropriate levels of support and use the macros throughout the code.
Add vht160_chan_ranges/is_vht160_valid_freq and handle analogue to vht80 in various parts of the code.
Add ieee80211_add_channel_cbw() which also takes the CBW flag fields and make the former ieee80211_add_channel() a wrapper to it. With the CBW flags we can add HT/VHT channels passing them to getflags() for the 2/5ghz functions.
In ifconfig(8) add the regdomain_addchans() support for VHT160 and VHT80P80.
With this (+ regdoain.xml updates) VHT160 channels can be configured, listed, and pass regdomain where appropriate.
Tested with: iwlwifi Reviewed by: adrian MFC after: 10 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D26712
show more ...
|
#
1e375f3a |
| 07-Oct-2020 |
Bjoern A. Zeeb <bz@FreeBSD.org> |
80211: non-functional changes
Sort a few VHT160 and 80+80 lines, update some comments, and remove a superfluous ','.
No functional changes intended.
MFC after: 1 week Sponsored by: The FreeBSD Fou
80211: non-functional changes
Sort a few VHT160 and 80+80 lines, update some comments, and remove a superfluous ','.
No functional changes intended.
MFC after: 1 week Sponsored by: The FreeBSD Foundation
show more ...
|
#
e2515283 |
| 27-Aug-2020 |
Glen Barber <gjb@FreeBSD.org> |
MFH
Sponsored by: Rubicon Communications, LLC (netgate.com)
|
#
2b9f12f6 |
| 24-Aug-2020 |
Bjoern A. Zeeb <bz@FreeBSD.org> |
net80211: enhance getflags*() and ieee80211_add_channel*()
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
net80211: enhance getflags*() and ieee80211_add_channel*()
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) which 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: adrian, gnn Sponsored by: Rubicon Communications, LLC (d/b/a "Netgate") Differential revision: https://reviews.freebsd.org/D26091
show more ...
|
#
8f32e493 |
| 23-Aug-2020 |
Bjoern A. Zeeb <bz@FreeBSD.org> |
net80211: improve media information for VHT5GHZ
Improve ieee80211_media_setup(), media2mode(), and ieee80211_rate2media() for VHT5GHZ at least.
Reviewed by: adrian, gnn MFC after: 2 weeks Sponsored
net80211: improve media information for VHT5GHZ
Improve ieee80211_media_setup(), media2mode(), and ieee80211_rate2media() for VHT5GHZ at least.
Reviewed by: adrian, gnn MFC after: 2 weeks Sponsored by: Rubicon Communications, LLC (d/b/a "Netgate") Differential Revision: https://reviews.freebsd.org/D26089
show more ...
|
#
30fdd33c |
| 23-Aug-2020 |
Bjoern A. Zeeb <bz@FreeBSD.org> |
net80211: set_vht_extchan() reverse order to always return best
In set_vht_extchan() the checks are performed in the order of VHT20/40/80. That means if a channel has a lower and higheer VHT flag se
net80211: set_vht_extchan() reverse order to always return best
In set_vht_extchan() the checks are performed in the order of VHT20/40/80. That means if a channel has a lower and higheer VHT flag set we would return the lower first. We normally do not set more than one VHT flag so this change is supposed to be a NOP but follows the logical thinking order of returning the best first. Also we nowhere assert a single VHT flag so make sure we'll not be stuck with VHT20 when we could do more.
While here add the debugging printfs for VHT160 and VHT80P80 which still need doing once we deal with a driver at that level.
Reviewed by: adrian, gnn MFC after: 2 weeks Sponsored by: Rubicon Communications, LLC (d/b/a "Netgate") Differential Revision: https://reviews.freebsd.org/D26088
show more ...
|