#
674362e2 |
| 01-Jun-2025 |
Adrian Chadd <adrian@FreeBSD.org> |
net80211: migrate direct printf() to net80211_printf()
Mechanically migrate printf() -> net80211_printf(). A few places looked like they should be using net80211_vap_printf(), so migrate those appro
net80211: migrate direct printf() to net80211_printf()
Mechanically migrate printf() -> net80211_printf(). A few places looked like they should be using net80211_vap_printf(), so migrate those appropriately.
Differential Revision: https://reviews.freebsd.org/D50644 Reviewed by: bz
show more ...
|
Revision tags: release/13.4.0-p5, release/13.5.0-p1, release/14.2.0-p3, release/13.5.0, release/14.2.0-p2, release/14.1.0-p8, release/13.4.0-p4, release/14.1.0-p7, release/14.2.0-p1, release/13.4.0-p3 |
|
#
38075f7d |
| 02-Jan-2025 |
Adrian Chadd <adrian@FreeBSD.org> |
net80211: remove direct use of ni->ni_txrate, add indirection methods
The summary:
* Refactor ni_txrate access into ieee80211_node_get_txrate_dot11rate() and ieee80211_node_set_txrate_dot11rate()
net80211: remove direct use of ni->ni_txrate, add indirection methods
The summary:
* Refactor ni_txrate access into ieee80211_node_get_txrate_dot11rate() and ieee80211_node_set_txrate_dot11rate(). These wrap the ni->ni_txrate access and will eventually be able to do runtime sanity checks and fallback where necessary.
* Refactor ieee80211_node_get_txrate_kbit() from the ioctl code which sets isi_txmbps (which is in 0.5Mbit/s units.) This new routine returns the TX rate in kbit/s units.
* Also use ieee80211_node_get_txrate_kbit() in various places in the code where the dot11rate was turned into a Mbit/sec value, which was very wrong for HT (but also only used for logging, so it didn't have an effect on normal runtime.)
* Mb -> Mbit/s
The long version:
The current ni->ni_txrate value is what net80211's phy code calls a 'dot11rate'. Inside the ieee80211_phy.c tables you'll find a bunch of tables which represent:
* for legacy rates its in 1/2 mbit units. * for turbo (Atheros 40MHz OFDM) it's the non-turbo rates, but the turbo rate speed in kbit/sec. * for 802.11n rates its the MCS, starting at 0x80.
However there are a couple of catches with this:
* Basic rates are represented in the pre-11n rates using the high bit (IEEE80211_RATE_BASIC) * 11n rates are also represented using the high bit (IEEE80211_RATE_MCS)
Now, ni->ni_txrate will clear the IEEE80211_RATE_BASIC flag before storing it, so if the high bit exists it must be an 802.11n rate. However, there's still a bunch of code everywhere that purposefully filters that out.
The goals of this commit:
* Provide an easy API to migrate existing drivers and other consumers to - ieee80211_node_get_txrate_dot11rate() is defined as "will return the normal legacy or HT rate" so all the existing code can work. * Lay the ground work for extending ni_txrate (and a rate representation in general) that can represent legacy, HT, VHT, EHT, HE, etc rates. * Create a central place where ni_txrate is updated from rate control, drivers that will update ni_txrate itself, and consumers, so we can provide some basic runtime checks / logging as VHT, EHT, HE, etc rates are eventually added.
For example, a VHT driver will eventually receive VHT rates, but an existing HT driver will not, so the API should log and return a sensible default when something like a VHT rate shows up on a HT only device.
The rate control code currently returns a rix, and sets ni_txrate to the dot11rate. Drivers can choose either. However, choosing the rix is risky because you need to know if it's the ni_rates or ni_htrates, which requires a lot of duplicate work that lines up consistently at all layers (see the AMRR code for an example.)
Differential Revision: https://reviews.freebsd.org/D48601 Reviewed by: bz, thj
show more ...
|
Revision tags: release/14.2.0, release/13.4.0, release/14.1.0, release/13.3.0, release/14.0.0 |
|
#
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, release/12.4.0, release/13.1.0, release/12.3.0, release/13.0.0, release/12.2.0 |
|
#
662c1305 |
| 01-Sep-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
net: clean up empty lines in .c and .h files
|
Revision tags: release/11.4.0 |
|
#
a6ca7ce3 |
| 05-Jun-2020 |
Adrian Chadd <adrian@FreeBSD.org> |
[net80211] Add some more debugging during scanning
I'm trying to chase down more weird "I am not doing an incremental scan when being asked" issues so these debugging statements help. Notably, I've
[net80211] Add some more debugging during scanning
I'm trying to chase down more weird "I am not doing an incremental scan when being asked" issues so these debugging statements help. Notably, I've added more debugging around reasons why the scan is skipped - eg because the cache is considered hot.
This should be a no-op unless you care about the debugging output!
show more ...
|
Revision tags: release/12.1.0, release/11.3.0 |
|
#
c2c227a5 |
| 03-Feb-2019 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r343571 through r343711.
|
#
2ce6d2b5 |
| 03-Feb-2019 |
Andriy Voskoboinyk <avos@FreeBSD.org> |
net80211(4): fix rate check when 'roaming' ifconfig(8) option is set to 'auto'
Do not try to clear 'basic rate' bit from roamRate; it cannot be here and, actually, this operation clears 'MCS rate' b
net80211(4): fix rate check when 'roaming' ifconfig(8) option is set to 'auto'
Do not try to clear 'basic rate' bit from roamRate; it cannot be here and, actually, this operation clears 'MCS rate' bit instead, breaking comparison for 11n / 11ac modes.
Tested with RTL8188CUS, HOSTAP mode + RTL8821AU, STA mode.
MFC after: 3 days
show more ...
|
#
511e2766 |
| 03-Feb-2019 |
Andriy Voskoboinyk <avos@FreeBSD.org> |
net80211(4): do not setup roaming parameters for unsupported modes.
ifconfig(8) prints per-mode parameters if they are non-zero; since we have 13 possible modes with 3...5 typically supported this c
net80211(4): do not setup roaming parameters for unsupported modes.
ifconfig(8) prints per-mode parameters if they are non-zero; since we have 13 possible modes with 3...5 typically supported this change should greatly reduce amount of information for 'ifconfig <wlan> list roam' command.
While here ensure that sta_roam_check() will not use roaming parameters for unsupported modes (it should not).
This change effectively reverts r188776.
MFC after: 2 weeks
show more ...
|
#
7e565c55 |
| 30-Jan-2019 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r343320 through r343570.
|
#
7e2bcba4 |
| 23-Jan-2019 |
Andriy Voskoboinyk <avos@FreeBSD.org> |
net80211: turn channel mode check into assertion.
There is may be only 11b channel (since chanflags[] table maps MODE_AUTO to the corresponding 11b channel flags).
Checked with RTL8812AU, STA mode.
net80211: turn channel mode check into assertion.
There is may be only 11b channel (since chanflags[] table maps MODE_AUTO to the corresponding 11b channel flags).
Checked with RTL8812AU, STA mode.
MFC after: 5 days
show more ...
|
#
d514ab89 |
| 23-Jan-2019 |
Andriy Voskoboinyk <avos@FreeBSD.org> |
net80211: fix channel list construction for non-auto operating mode.
Change the way how channel list mode <-> desired mode match is done: - Match channel list mode for next non-auto desired modes:
net80211: fix channel list construction for non-auto operating mode.
Change the way how channel list mode <-> desired mode match is done: - Match channel list mode for next non-auto desired modes: * 11b: 11g, 11ng, 11acg; * 11a: 11na, 11ac - Add pre-defined channels only when one of the next conditions met: * the desired channel mode is 'auto' or * the desired channel and selected channel list modes are exactly the same or * the previous rule (11g / 11n / 11ac promotion) applies.
Before r275875 construction work properly for all except 11ng / 11na / 11acg / 11ac modes - these were broken at all (i.e., the scan list was empty); after r275875 all checks were removed, so scan table was populated by all device-compatible channels (desired mode was ignored).
For example, if I will set 'ifconfig wlan0 mode 11ng' for RTL8821AU: - pre-r275875: nothing, scan will not work; - after r275875: both 11ng and 11na bands were scanned; also, since 11b channel list was used, 14th channel was scanned too. - after this change: only 11ng - 1-13 channels - are used for scanning.
Tested with: * RTL8188EE, STA mode. * RTL8821AU, STA mode.
MFC after: 5 days
show more ...
|
Revision tags: release/12.0.0, release/11.2.0 |
|
#
4fc74049 |
| 29-Dec-2017 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r327169 through r327340.
|
#
caa7e52f |
| 27-Dec-2017 |
Eitan Adler <eadler@FreeBSD.org> |
kernel: Fix several typos and minor errors
- duplicate words - typos - references to old versions of FreeBSD
Reviewed by: imp, benno
|
#
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 |
|
#
d370fd1c |
| 14-Jan-2017 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r311940 through r312200.
|
#
51172f62 |
| 13-Jan-2017 |
Adrian Chadd <adrian@FreeBSD.org> |
[net80211] Initial VHT node upgrade/downgrade support and initial IE parsing.
This is the bulk of the magic to start enabling VHT channel negotiation. It is absolutely, positively not yet even a com
[net80211] Initial VHT node upgrade/downgrade support and initial IE parsing.
This is the bulk of the magic to start enabling VHT channel negotiation. It is absolutely, positively not yet even a complete VHT wave-1 implementation.
* parse IEs in scan, assoc req/resp, probe req/resp; * break apart the channel upgrade from the HT IE parsing - do it after the VHT IEs are parsed; * (dirty! sigh) add channel width decision making in ieee80211_ht.c htinfo_update_chw(). This is the main bit where negotiated channel promotion through IEs occur. * Shoehorn in VHT node init ,teardown, rate control, etc calls like the HT versions; * Do VHT channel adjustment where appropriate
Tested:
* monitor mode, ath10k port * STA mode, ath10k port - VHT20, VHT40, VHT80 modes
TODO:
* IBSS; * hostap; * (ignore mesh, wds for now); * finish 11n state engine - channel width change, opmode notifications, SMPS, etc; * VHT basic rate negotiation and acceptance criteria when scanning, associating, etc; * VHT control/management frame handling (group managment and operating mode being the two big ones); * Verify TX/RX VHT rate negotiation is actually working correctly.
Whilst here, add some comments about seqno allocation and locking. To achieve the full VHT rates I need to push seqno allocation into the drivers and finally remove the IEEE80211_TX_LOCK() I added years ago to fix issues. :/
show more ...
|
#
67bc8c8b |
| 19-Nov-2016 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r308491 through r308841.
|
#
260b8f08 |
| 17-Nov-2016 |
Imre Vadász <ivadasz@FreeBSD.org> |
[net80211] Don't check bgscanidle setting in net80211 for full-offload scan.
If full-offload scan is used, the NIC driver (or rather the firmware of the NIC) should take care of interrupting and con
[net80211] Don't check bgscanidle setting in net80211 for full-offload scan.
If full-offload scan is used, the NIC driver (or rather the firmware of the NIC) should take care of interrupting and continuing the background scan. So net80211 should ignore the vap->iv_bgscanidle setting then, instead the NIC driver might look at this setting and pass it on to the firmware in some way if possible.
Since full-offload scans won't be explicitly interrupted by net80211, it also doesn't really make sense to check the vap->iv_bgscanidle condition in that case, before starting a background scan. If the NIC driver advertises background scan support and full-offload scanning, the firmware should be able to execute that scan without interfering too much with our data traffic.
Reviewed by: adrian, avos Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D8539
show more ...
|
Revision tags: release/11.0.1, release/11.0.0 |
|
#
6dbbec93 |
| 19-May-2016 |
Andriy Voskoboinyk <avos@FreeBSD.org> |
net80211: fix more compiler warnings.
ieee80211.c: add_chanlist(): 'error' variable will be uninitialized if no channels were passed; return '0' instead. ieee80211_action.c: ieee8
net80211: fix more compiler warnings.
ieee80211.c: add_chanlist(): 'error' variable will be uninitialized if no channels were passed; return '0' instead. ieee80211_action.c: ieee80211_send_action_register(): drop 'break' after 'return'. ieee80211_crypto_none.c: none_encap(): 'keyid' is not used in non-debug builds; hide it behind IEEE80211_DEBUG ifdef. ieee80211_freebsd.c: Staticize global 'ieee80211_debug' variable (used only in this file). ieee80211_hostap.c: Fix a comment (associatio -> association). ieee80211_ht.c: ieee80211_setup_htrates(): initialize 'maxunequalmcs' to 0 to mute compiler warning. ieee80211_hwmp.c: hwmp_recv_preq(): copy 'prep' between conditional blocks to fix -Wshadow warning. ieee80211_mesh.c: mesh_newstate(): remove duplicate 'ni' definition. mesh_recv_group_data(): fix -Wempty-body warning in non-debug builds. ieee80211_phy.c: ieee80211_compute_duration(): remove 'break' after panic() call. ieee80211_scan_sta.c: Hide some TDMA-specific macros under IEEE80211_SUPPORT_TDMA ifdef adhoc_pick_bss(): remove 'ic' pointer redefinition. ieee80211_sta.c: sta_beacon_miss(): remove 'ic' pointer redefinition. ieee80211_superg.c: superg_ioctl_set80211(): drop unreachable return.
Tested with clang 3.8.0, gcc 4.6.4 and gcc 5.3.0.
show more ...
|
#
31021a2b |
| 20-Apr-2016 |
Andriy Voskoboinyk <avos@FreeBSD.org> |
net80211: replace internal LE_READ_*/LE_WRITE_* macro with system le*dec / le*enc functions.
Replace net80211 specific macros with system-wide bytestream encoding/decoding functions: - LE_READ_2 ->
net80211: replace internal LE_READ_*/LE_WRITE_* macro with system le*dec / le*enc functions.
Replace net80211 specific macros with system-wide bytestream encoding/decoding functions: - LE_READ_2 -> le16dec - LE_READ_4 -> le32dec - LE_WRITE_2 -> le16enc - LE_WRITE_4 -> le32enc
+ drop ieee80211_input.h include, where it was included for these operations only.
Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D6030
show more ...
|
#
d6084013 |
| 05-Apr-2016 |
Glen Barber <gjb@FreeBSD.org> |
MFH
Sponsored by: The FreeBSD Foundation
|
#
b8e29e06 |
| 30-Mar-2016 |
Adrian Chadd <adrian@FreeBSD.org> |
[net80211] migrate the time_* macros to ieee80211_* namespace.
It turns out that these will clash very annoyingly with the linux macros in the linuxkpi layer, so let the wookie^Wlinux win.
The only
[net80211] migrate the time_* macros to ieee80211_* namespace.
It turns out that these will clash very annoyingly with the linux macros in the linuxkpi layer, so let the wookie^Wlinux win.
The only user that I can find is ath(4), so fix it there too.
show more ...
|
Revision tags: release/10.3.0 |
|
#
82aa34e6 |
| 04-Mar-2016 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r296007 through r296368.
|