#
2c8b0d62 |
| 29-Dec-2024 |
Bjoern A. Zeeb <bz@FreeBSD.org> |
net80211 / LinuxKPI 802.11: correct enum ieee80211_sta_rx_bw
When moving the enum from LinuxKPI to net80211 it got adjusted to be used in net80211 style in order to use it with a print_mask (%b). Tu
net80211 / LinuxKPI 802.11: correct enum ieee80211_sta_rx_bw
When moving the enum from LinuxKPI to net80211 it got adjusted to be used in net80211 style in order to use it with a print_mask (%b). Turns out that change broke assumptions given the minimum value of BW_20 no longer was 0. Adjust it back to a plain enum starting at 0 and use an inline function to convert to value names.
Pointy hat to: bz Fixes: ca389486a9599768e0ba69dca13c208020623083 MFC after: 3 days Sponsored by: The FreeBSD Foundation Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D48375
show more ...
|
#
ca389486 |
| 03-Dec-2024 |
Bjoern A. Zeeb <bz@FreeBSD.org> |
net80211 / LinuxKPI 802.11: use enum ieee80211_sta_rx_bw for ni_chw
net80211 node ni_chw currently encodes the channel width as Mhz number. LinuxKPI 802.11 uses enum ieee80211_sta_rx_bw for the same
net80211 / LinuxKPI 802.11: use enum ieee80211_sta_rx_bw for ni_chw
net80211 node ni_chw currently encodes the channel width as Mhz number. LinuxKPI 802.11 uses enum ieee80211_sta_rx_bw for the same.
Rather than keeping the "20" and "40" throughout the code (eventually expanded to 80/160/320) switch them over to use the enum throughout and add a print mask for debug output. While designed as bitmask it is not supposed to be used as such; the bitmask is only used to be able to use %b with a print mask.
Once we get to 320Mhz channel widths we would otherwise also need to extend the uint8_t in struct ieee80211_node; making enum ieee80211_sta_rx_bw __packed allows us for three more channel widths without breaking the KBI (if we were not to use %b with a print_mask but use a lookup function for the string we could extend it for a long time).
Sponsored by: The FreeBSD Foundation MFC after: 14 days Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D47891
show more ...
|
Revision tags: release/14.2.0, release/13.4.0, release/14.1.0, release/13.3.0, release/14.0.0 |
|
#
21888521 |
| 02-Oct-2023 |
Bjoern A. Zeeb <bz@FreeBSD.org> |
net80211: de-inline ieee80211_ref_node()
Make ieee80211_ref_node() a macro so we can pass __func__, __LINE__ in for IEEE80211_DEBUG_REFCNT as we do for other refcount related functions. Add the app
net80211: de-inline ieee80211_ref_node()
Make ieee80211_ref_node() a macro so we can pass __func__, __LINE__ in for IEEE80211_DEBUG_REFCNT as we do for other refcount related functions. Add the appropriate IEEE80211_DPRINTF() call to the _ieee80211_ref_node() implementation to support wlandebug(8) +node printf style tracing. As a plus we can now also use Dtrace fbt on the _ieee80211_{ref,free}_node() implementations with futher logic, gathering backtraces, etc. more flexibly.
Sponsored by: The FreeBSD Foundation X-MFC: never
show more ...
|
#
1137943b |
| 02-Oct-2023 |
Bjoern A. Zeeb <bz@FreeBSD.org> |
net80211: remove ieee80211_unref_node()
ieee80211_unref_node() was only used in two error cases in ieee80211_send_nulldata(). There we do not need to guard against ni pointer reuse after decrementi
net80211: remove ieee80211_unref_node()
ieee80211_unref_node() was only used in two error cases in ieee80211_send_nulldata(). There we do not need to guard against ni pointer reuse after decrementing the refcount of the ni as we only update the stats and return.
Update the man page and remove the link for the now gone function.
Sponsored by: The FreeBSD Foundation X-MFC: never Reviewed by: adrian, emaste Differential Revision: https://reviews.freebsd.org/D42035
show more ...
|
#
db195a52 |
| 02-Oct-2023 |
Bjoern A. Zeeb <bz@FreeBSD.org> |
net80211: make ieee80211_alloc_node() private
Looking through the allocation/free and reference cycle of nodes we have a few (publicly) (almost) unused macros and functions. Start making them privat
net80211: make ieee80211_alloc_node() private
Looking through the allocation/free and reference cycle of nodes we have a few (publicly) (almost) unused macros and functions. Start making them private and reducing the amount of entry paths to the same/similar functionality. First is to make ieee80211_alloc_node() static as it is nowhere used in the tree outside this file.
Sponsored by: The FreeBSD Foundation X-MFC: no
show more ...
|
#
95ee2897 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: two-line .h pattern
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\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 |
|
#
1f078120 |
| 07-Dec-2022 |
John Baldwin <jhb@FreeBSD.org> |
net80211: Fix mismatches in array bounds.
Reported by: GCC -Warray-parameter Reviewed by: imp, emaste (earlier version) Differential Revision: https://reviews.freebsd.org/D37546
|
Revision tags: release/12.4.0 |
|
#
4a8e4d15 |
| 29-Nov-2022 |
Bjoern A. Zeeb <bz@FreeBSD.org> |
net80211: fix IEEE80211_DEBUG_REFCNT builds
Remove the KPI/KBI changes from ieee80211_node.h and always use the macros to pass in __func__ and __LINE__ to the functions. The actual implementations a
net80211: fix IEEE80211_DEBUG_REFCNT builds
Remove the KPI/KBI changes from ieee80211_node.h and always use the macros to pass in __func__ and __LINE__ to the functions. The actual implementations are prefixed by "_" rather than suffixed by "_debug" as they no longer are "debug"-specific.
Some of the select functions were not actually using the passed in func, line options; however they are calling other functions which use them. Directly call the internal implementation in those cases passing the arguments on.
Use a file-local __debrefcnt_used define to mark the arguments __unused in cases when we compile without IEEE80211_DEBUG_REFCNT and hope the toolchain is intelligent enough to not pass them at all in those cases.
Also _ieee80211_free_node() now has a conflict so make the previous _ieee80211_free_node() the new __ieee80211_free_node().
Add IEEE80211_DEBUG_REFCNT to the NOTES file on amd64 to keep exercising the option.
Sponsored by: The FreeBSD Foundation X-MFC: never Discussed on: freebsd-wireless Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D37529
show more ...
|
Revision tags: release/13.1.0, release/12.3.0 |
|
#
917181dd |
| 31-Oct-2021 |
Bjoern A. Zeeb <bz@FreeBSD.org> |
net80211: add a driver-private pointer to struct ieee80211_node
Add a void *ni_drv_data field to struct ieee80211_node that drivers can use to backtrack to their internal state from a net80211 node.
net80211: add a driver-private pointer to struct ieee80211_node
Add a void *ni_drv_data field to struct ieee80211_node that drivers can use to backtrack to their internal state from a net80211 node.
Sponsored by: The FreeBSD Foundation MFC after: 1 week X-Differential Revision: https://reviews.freebsd.org/D30654 (abandoned)
show more ...
|
Revision tags: release/13.0.0, release/12.2.0 |
|
#
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 ...
|
#
f1481c8d |
| 01-Jul-2020 |
Adrian Chadd <adrian@FreeBSD.org> |
[net80211] Migrate HT/legacy protection mode and preamble calculation to per-VAP flags
The later firmware devices (including iwn!) support multiple configuration contexts for a lot of things, leavin
[net80211] Migrate HT/legacy protection mode and preamble calculation to per-VAP flags
The later firmware devices (including iwn!) support multiple configuration contexts for a lot of things, leaving it up to the firmware to decide which channel and vap is active. This allows for things like off-channel p2p sta/ap operation and other weird things.
However, net80211 is still focused on a "net80211 drives all" when it comes to driving the NIC, and as part of this history a lot of these options are global and not per-VAP. This is fine when net80211 drives things and all VAPs share a single channel - these parameters importantly really reflect the state of the channel! - but it will increasingly be not fine when we start supporting more weird configurations and more recent NICs. Yeah, recent like iwn/iwm.
Anyway - so, migrate all of the HT protection, legacy protection and preamble stuff to be per-VAP. The global flags are still there; they're now calculated in a deferred taskqueue that mirrors the old behaviour. Firmware based drivers which have per-VAP configuration of these parameters can now just listen to the per-VAP options.
What do I mean by per-channel? Well, the above configuration parameters really are about interoperation with other devices on the same channel. Eg, HT protection mode will flip to legacy/mixed if it hears ANY BSS that supports non-HT stations or indicates it has non-HT stations associated. So, these flags really should be per-channel rather than per-VAP, and then for things like "do i need short preamble or long preamble?" turn into a "do I need it for this current operating channel". Then any VAP using it can query the channel that it's on, reflecting the real required state.
This patch does none of the above paragraph just yet.
I'm also cheating a bit - I'm currently not using separate taskqueues for the beacon updates and the per-VAP configuration updates. I can always further split it later if I need to but I didn't think it was SUPER important here.
So:
* Create vap taskqueue entries for ERP/protection, HT protection and short/long preamble; * Migrate the HT station count, short/long slot station count, etc - into per-VAP variables rather than global; * Fix a bug with my WME work from a while ago which made it per-VAP - do the WME beacon update /after/ the WME update taskqueue runs, not before; * Any time the HT protmode configuration changes or the ERP protection mode config changes - schedule the task, which will call the driver without the net80211 lock held and all correctly serialised; * Use the global flags for beacon IEs and VAP flags for probe responses and other IE situations.
The primary consumer of this is ath10k. iwn could use it when sending RXON, but we don't support IBSS or AP modes on it yet, and I'm not yet sure whether it's required in STA mode (ie whether the firmware parses beacons to change protection mode or whether we need to.)
Tested:
* AR9280, STA/AP * AR9380, DWDS STA+STA/AP * ath10k work, STA/AP * Intel 6235, STA * Various rtwn / run NICs, DWDS STA and STA configurations
show more ...
|
#
8379e8db |
| 16-Jun-2020 |
Adrian Chadd <adrian@FreeBSD.org> |
[net80211] Add initial U-APSD negotiation support.
U-APSD (unscheduled automatic power save delivery) is a power save method that's a bit better than legacy PS-POLL - stations can mark frames with a
[net80211] Add initial U-APSD negotiation support.
U-APSD (unscheduled automatic power save delivery) is a power save method that's a bit better than legacy PS-POLL - stations can mark frames with an extra flag that tells the AP to leak out more frames after it sends its own frames rather than needing to send a PS-POLL to get another frame from the AP.
Now, this code just handles the negotiation bits; it doesn't actually implement U-APSD. That's up to drivers, and nothing in the tree yet implements this. I /may/ implement this for ath(4) if I eventually care enough but right now I plan on just implementing it for firmware offload based NICs that handle this in the NIC.
I'll commit the ifconfig bit after this and I may have some follow-up commits as this gets used more by me in local testing.
This should be a glorious no-op for everyone else. If things change for anyone that isn't fixed by a complete recompile then please reach out to me.
show more ...
|
Revision tags: release/11.4.0, release/12.1.0, release/11.3.0, release/12.0.0, release/11.2.0 |
|
#
fe267a55 |
| 27-Nov-2017 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
sys: general adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error pro
sys: general adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task.
The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts.
No functional change intended.
show more ...
|
Revision tags: release/10.4.0, release/11.1.0 |
|
#
1a36faad |
| 11-Feb-2017 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r313301 through r313643.
|
#
4d3dcce5 |
| 09-Feb-2017 |
Adrian Chadd <adrian@FreeBSD.org> |
[net80211] quiet IE handling improvements
* on the station side, only call the quiet time IE method if we have a quiet IE - otherwise call the NULL method once, and then don't waste time calling
[net80211] quiet IE handling improvements
* on the station side, only call the quiet time IE method if we have a quiet IE - otherwise call the NULL method once, and then don't waste time calling NULL
* on the beacon generation side - force a beacon regeneration each time quiet time is enabled/disabled. Without this, enabling/disabling quiet time IE would cause the beacon contents to be corrupted since none of the "move contents around" logic (like for CSA and TIM handling) is implemented.
This changes the size of ieee80211_node so it requires a kernel recompile, but no userland recompile.
Tested:
* AR9380, AP mode, enabling/disabling quiet time IE * AR9380, STA mode, with upcoming driver changes.
show more ...
|
#
9b3ece1c |
| 04-Feb-2017 |
Enji Cooper <ngie@FreeBSD.org> |
MFhead@r313243
|
#
a4aa656a |
| 22-Jan-2017 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r312309 through r312623.
|
#
c5bba9da |
| 21-Jan-2017 |
Andriy Voskoboinyk <avos@FreeBSD.org> |
net80211: allow to configure LDPC support
Tested with RTL8821AU, STA mode (Tx support only)
Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D9268
|
#
69415bc5 |
| 08-Jan-2017 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r311546 through r311683.
|
#
6d0ef1b9 |
| 07-Jan-2017 |
Adrian Chadd <adrian@FreeBSD.org> |
[net80211] add VHT node flag; parsed chanwidth.
The VHT operational element (VHTOPMODE) isn't a uint32_t - it's the MCS sets, freq1/freq2 parameters and channel width. So, store the channel width to
[net80211] add VHT node flag; parsed chanwidth.
The VHT operational element (VHTOPMODE) isn't a uint32_t - it's the MCS sets, freq1/freq2 parameters and channel width. So, store the channel width too in lieu of just storing the IE struct.
This changes the VHT parameter layout in ieee80211_node but it doesn't change ABI at all.
show more ...
|
#
3ffd3530 |
| 16-Dec-2016 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r309817 through r310168.
|
#
fdbc9e6e |
| 16-Dec-2016 |
Adrian Chadd <adrian@FreeBSD.org> |
[net80211] start laying down the foundation for 11ac support.
This is a work in progress and some of this stuff may change; but hopefully I'm laying down enough stuff and space in fields to allow it
[net80211] start laying down the foundation for 11ac support.
This is a work in progress and some of this stuff may change; but hopefully I'm laying down enough stuff and space in fields to allow it to grow without another major recompile.
We'll see!
* Add a net80211 PHY type for VHT 2G and VHT 5G.
Note - yes, VHT is supposed to be for 5GHZ, however some vendors (*cough* most of them) support some subset of VHT rate support in 2GHz. No - not 80MHz wide channels, but at least some MCS8-9 support, maybe some beamforming, and maybe some longer A-MPDU aggregates. I don't want to even think about MU-MIMO on 2GHz.
* Add an ifmedia placeholder type for VHT rates.
* Add channel flags for VHT, VHT20/40U/40D/80/80+80/160 * Add channel macros for the above * Add ieee80211_channel fields for the VHT information and flags, along with some padding (so this struct definitely grows.) * Add a phy type flag for VHT - 'v'
* Bump the number of channels to a much higher amount - until we get something like the linux mac80211 chanctx abstraction (where the stack provides a current channel configuration via callbacks, versus the driver ever checking ic->ic_curchan or similar) we'll have to populate VHT+HT combinations.
Eg, there'll likely be a full set of duplicate VHT20/40 channels to match HT channels. There will also be a full set of duplicate VHT80 channels - note that for VHT80, its assumed you're doing VHT40 as a base, so we don't need a duplicate of VHT80 + 20MHz only primary channels, only a duplicate of all the VHT40 combinations.
I don't want to think about VHT80+80 or VHT160 for now - and I won't, as the current device I'm doing 11ac bringup on (QCA9880) only does VHT80.
I'll likely revisit the channel configuration and scanning related stuff after I get VHT20/40 up.
* Add vht flags and the basic MCS rate setup to ieee80211com, ieee80211vap and ieee80211_node in preparation for 11ac configuration. There is zero code that uses this right now. * Whilst here, add some more placeholders in case I need to extend out things by some uint32_t flag sized fields. Hopefully I won't!
What I haven't yet done:
* any of the code that uses this * any of the beamforming related fields * any of the MU-MIMO fields required for STA/AP operation * any of the IE fields in beacon frame / probe request/response handling and the calculations required for shifting beacon contents around when the TIM grows/shrinks
This will require a full rebuild of net80211 related programs - ifconfig, hostapd, wpa_supplicant.
show more ...
|
#
0ed76ec8 |
| 24-Nov-2016 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r308870 through r309105.
|
#
74a54be9 |
| 22-Nov-2016 |
Adrian Chadd <adrian@FreeBSD.org> |
[net80211] store references to VHT and related IEs.
This just stores pointers to the IE; it doesn't yet parse anything.
Note: it blows out the size of ieee80211_node, so this will require ye olde k
[net80211] store references to VHT and related IEs.
This just stores pointers to the IE; it doesn't yet parse anything.
Note: it blows out the size of ieee80211_node, so this will require ye olde kernel/modules recompile.
show more ...
|