#
89c1e54a |
| 18-Feb-2024 |
Bjoern A. Zeeb <bz@FreeBSD.org> |
ath(4): always enable 11n
Enabling 11n for ath(4) so far was handled by a kernel option, which was only enabled for certain kernel configurations. In order to allow loading ath(4) as a module with 1
ath(4): always enable 11n
Enabling 11n for ath(4) so far was handled by a kernel option, which was only enabled for certain kernel configurations. In order to allow loading ath(4) as a module with 11n support on all platforms, remove the kernel option and unconditionally enable 11n in ath(4).
Reported by: pkubaj Discussed with: adrian in D43549. Reviewed by: adrian, imp Differential Revision: https://reviews.freebsd.org/D43964
show more ...
|
Revision tags: release/14.0.0 |
|
#
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, release/12.4.0, release/13.1.0, release/12.3.0, release/13.0.0 |
|
#
61c83c4e |
| 01-Apr-2021 |
Adrian Chadd <adrian@FreeBSD.org> |
[ath] Add ath_hal_getnav and ath_hal_setnav so the driver layer can check the NAV as appropriate.
|
#
fb3edd4f |
| 13-Mar-2021 |
Adrian Chadd <adrian@FreeBSD.org> |
[ath] do a cold reset if TSFOOR triggers
TSFOOR happens if a beacon with a given TSF isn't received within the programmed/expected TSF value, plus/minus a fudge range. (OOR == out of range.)
If thi
[ath] do a cold reset if TSFOOR triggers
TSFOOR happens if a beacon with a given TSF isn't received within the programmed/expected TSF value, plus/minus a fudge range. (OOR == out of range.)
If this happens then it could be because the baseband/mac is stuck, or the baseband is deaf. So, do a cold reset and resync the beacon to try and unstick the hardware.
It also happens when a bad AP decides to err, slew its TSF because they themselves are resetting and they don't preserve the TSF "well."
This has fixed a bunch of weird corner cases on my 2GHz AP radio upstairs here where it occasionally goes deaf due to how much 2GHz noise is up here (and ANI gets a little sideways) and this unsticks the station VAP.
For AP modes a hung baseband/mac usually ends up as a stuck beacon and those have been addressed for a long time by just resetting the hardware. But similar hangs in station mode didn't have a similar recovery mechanism.
Tested:
* AR9380, STA mode, 2GHz/5GHz * AR9580, STA mode, 5GHz * QCA9344 SoC w/ on-board wifi (TL-WDR4300/3600 devices); 2GHz STA mode
show more ...
|
#
c1e16b65 |
| 08-Dec-2020 |
Adrian Chadd <adrian@FreeBSD.org> |
[ath] also remove the magic size value here for the transmit antenna statistics.
|
Revision tags: release/12.2.0 |
|
#
9966c0f9 |
| 01-Sep-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
ath: clean up empty lines in .c and .h files
|
Revision tags: release/11.4.0 |
|
#
cce63444 |
| 15-May-2020 |
Adrian Chadd <adrian@FreeBSD.org> |
[ath] [ath_rate] Extend ath_rate_sample to better handle 11n rates and aggregates.
My initial rate control code was .. suboptimal. I wanted to at least get MCS rates sent, but it didn't do anywhere
[ath] [ath_rate] Extend ath_rate_sample to better handle 11n rates and aggregates.
My initial rate control code was .. suboptimal. I wanted to at least get MCS rates sent, but it didn't do anywhere near enough to handle low signal level links or remotely keep accurate statistics.
So, 8 years later, here's what I should've done back then.
* Firstly, I wasn't at all tracking packet sizes other than the two buckets (250 and 1600 bytes.) So, extend it to include 4096, 8192, 16384, 32768 and 65536. I may go add 2048 at some point if I find it's useful.
This is important for a few reasons. First, when forming A-MPDU or AMSDU aggregates the frame sizes are larger, and thus the TX time calculation is woefully, increasingly wrong. Secondly, the behaviour of 802.11 channels isn't some fixed thing, both due to channel conditions and radios themselves. Notably, there was some observations done a few years ago on 11n chipsets which noticed longer aggregates showed an increase in failed A-MPDU sub-frame reception as you got further along in the transmit time. It could be due to a variety of things - transmitter linearity, channel conditions changing, frequency/phase drift, etc - but the observation was to potentially form shorter aggregates to improve BER.
* .. and then modify the ath TX path to report the length of the aggregate sent, so as the statistics kept would line up with the correct bucket.
* Then on the rate control look-up side - i was also only using the first frame length for an A-MPDU rate control lookup which isn't good enough here. So, add a new method that walks the TID software queue for that node to find out what the likely length of data available is. It isn't ALL of the data in the queue because we'll only ever send enough data to fit inside the block-ack window, so limit how many bytes we return to roughly what ath_tx_form_aggr() would do.
* .. and cache that in the first ath_buf in the aggregate so it and the eventual AMPDU length can be returned to the rate control code.
* THEN, modify the rate control code to look at them both when deciding which bucket to attribute the sent frame on. I'm erring on the side of caution and using the size bucket that the lookup is based on.
Ok, so now the rate lookups and statistics are "more correct". However, MCS rates are not the same as 11abg rates in that they're not a monotonically incrementing set of faster rates and you can't assume that just because a given MCS rate fails, the next higher one wouldn't work better or be a lower average tx time.
So, I had to do a bunch of surgery to the best rate and sample rate math. This is the bit that's a WIP.
* First, simplify the statistics updates (update_stats()) to do a single pass on all rates. * Next, make sure that each rate average tx time is updated based on /its/ failure/success. Eg if you sent a frame with { MCS15, MCS12, MCS8 } and MCS8 succeeded, MCS15 and MCS 12 would have their average tx time updated for /their/ part of the transmission, not the whole transmission. * Next, EWMA wasn't being fully calculated based on the /failures/ in each of the rate attempts. So, if MCS15, MCS12 failed above but MCS8 didn't, then ensure that the statistics noted that /all/ subframes failed at those rates, rather than the eventual set of transmitted/sent frames. This ensures the EWMA /and/ average TX time are updated correctly. * When picking a sample rate and initial rate, probe rates aroud the current MCS but limit it to MCS0..7 /for all spatial streams/, rather than doing crazy things like hitting MCS7 and then probing MCS8 - MCS8 is basically MCS0 but two spatial streams. It's a /lot/ slower than MCS7. Also, the reverse is true - if we're at MCS8 then don't probe MCS7 as part of it, it's not likely to succeed. * Fix bugs in pick_best_rate() where I was /immediately/ choosing the highest MCS rate if there weren't any frames yet transmitted. I was defaulting to 25% EWMA and .. then each comparison would accept the higher rate. Just skip those; sampling will fill in the details.
So, this seems to work a lot better. It's not perfect; I'm still seeing a lot of instability around higher MCS rates because there are bursts of loss/retransmissions that aren't /too/ bad. But i'll keep iterating over this and tidying up my hacks.
Ok, so why this still something I'm poking at? rather than porting minstrel_ht?
ath_rate_sample tries to minimise airtime, not maximise throughput. I have extended it with an EWMA based on sub-frame success/failures - high MCS rates that have partially successful receptions still show super short average frame times, but a /lot/ of retransmits have to happen for that to work. So for MCS rates I also track this EWMA and ensure that the rates I'm choosing don't have super crappy packet failures. I don't mind not getting lower peak throughput versus minstrel_ht; instead I want to see if I can make "minimise airtime" work well.
Tested:
* AR9380, STA mode * AR9344, STA mode * AR9580, STA/AP mode
show more ...
|
Revision tags: release/12.1.0, release/11.3.0 |
|
#
7648bc9f |
| 13-May-2019 |
Alan Somers <asomers@FreeBSD.org> |
MFHead @347527
Sponsored by: The FreeBSD Foundation
|
#
7d450faa |
| 05-May-2019 |
Adrian Chadd <adrian@FreeBSD.org> |
[ath] [ath_rate] Fix ANI calibration during non-ACTIVE states; start poking at rate control
These are some fun issues I've found with my upstairs wifi link at such a ridiculous low signal level (lik
[ath] [ath_rate] Fix ANI calibration during non-ACTIVE states; start poking at rate control
These are some fun issues I've found with my upstairs wifi link at such a ridiculous low signal level (like, < 5dB.)
* Add per-station tx/rx rssi statistics, in potential preparation to use that in the RX rate control.
* Call the rate control on each received frame to let it potentially use it as a hint for what rates to potentially use. It's a no-op right now.
* Do ANI calibration during scan as well. The ath_newstate() call was disabling the ANI timer and only re-enabling it during transitions to _RUN. This has the unfortunate side-effect that if ANI deafened the NIC because of interference and it disassociated, it wouldn't be reset and the scan would never hear beacons.
The ANI configuration is stored at least globally on some HALs and per-channel on others. Because of this a NIC reset wouldn't help; the ANI parameters would simply be programmed back in.
Now, I have a feeling I also need to do this during AUTH/ASSOC too and maybe, if I'm feeling clever, I need to reset the ANI parameters on a given channel during a transition through INIT or if the VAP is destroyed/re-created. However for now this gets me out of the immediate weeds with connectivity upstairs (and thus I /can/ commit); I'll keep chipping away at tidying this stuff up in subsequent commits.
Tested:
* AR9344 (Wasp), 2G STA mode
show more ...
|
#
a8083b9c |
| 21-Apr-2019 |
Adrian Chadd <adrian@FreeBSD.org> |
[ath] [ath_hal] [ath_hal_9300] Extend the start PCU receive to handle resetting ANI.
One of the fun issues with scanning has been how the existing ANI values were programmed into the hardware when c
[ath] [ath_hal] [ath_hal_9300] Extend the start PCU receive to handle resetting ANI.
One of the fun issues with scanning has been how the existing ANI values were programmed into the hardware when channels were changed. If you're on a really crappy channel and ANI has made you deaf then when you scan you continue to be deaf on all channels.
This code passes in a flag to startpcureceive which in AR5416 and later is also used to enable ANI. This allows it to know if it's a normal operation or a scan operation.
This fixes my situation at home where a temporary spot of a device going deaf due to interference starts scanning and .. can't hear anything until I restart.
Now, this isn't the full fix - ideally:
(a) all the ANI config and per-channel information would be migrated to the shared HAL stuff and enabled for all of the NICs; (b) when a station reassociates and some other error conditions (like missed beacons, NF calibration failures, etc) a knob to reset ANI parameters would likely help recovery.
But hey, I'm committing bits of code again! woo!
Tested:
* AR9344 (2G), STA operation
show more ...
|
#
3a9d0aca |
| 19-Apr-2019 |
Adrian Chadd <adrian@FreeBSD.org> |
[ath] Fix return value check to not complain.
Compilers complain more about things, so let's keep them happy.
|
Revision tags: release/12.0.0, release/11.2.0 |
|
#
718cf2cc |
| 27-Nov-2017 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
sys/dev: further 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
sys/dev: further 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.
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.
|
#
a678f779 |
| 07-Feb-2017 |
Enji Cooper <ngie@FreeBSD.org> |
MFhead@r313380
|
#
f45d974e |
| 07-Feb-2017 |
Adrian Chadd <adrian@FreeBSD.org> |
[ath] prepare for station side quiet time support.
* Track the current quiet time configuration in the ath_vap struct. * Add an accessor method for calling the quiet time HAL method.
|
Revision tags: release/11.0.1, release/11.0.0 |
|
#
aaf8b608 |
| 09-Jul-2016 |
Adrian Chadd <adrian@FreeBSD.org> |
[ath] add a new buf flag, marking a buffer as involved with ToA/ToD positioning.
|
#
5f01bf54 |
| 08-Jul-2016 |
Adrian Chadd <adrian@FreeBSD.org> |
[ath] include ath_hal accessor macro changes.
I missed this in the previous commit.
|
#
359eeea7 |
| 23-Jun-2016 |
Adrian Chadd <adrian@FreeBSD.org> |
[ath] fix comments!
I keep asking myself "what do these fields mean" and so now I've clarified it for myself.
Tested:
* Reading the comments, going "a-ha!" a couple times.
Approved by: re (gjb)
|
#
bcf5fc49 |
| 02-Jun-2016 |
Adrian Chadd <adrian@FreeBSD.org> |
[ath] commit initial bluetooth coexistence support for the MCI NICs.
This is the initial framework to call into the MCI HAL routines and drive the basic state engine.
The MCI bluetooth coex model u
[ath] commit initial bluetooth coexistence support for the MCI NICs.
This is the initial framework to call into the MCI HAL routines and drive the basic state engine.
The MCI bluetooth coex model uses a command channel between wlan and bluetooth, rather than a 2-wire or 3-wire signaling protocol to control things. This means the wlan and bluetooth chip exchange a lot more information and signaling, even at the per-packet level. The NICs in question can share the input LNA and output PA on the die, so they absolutely can't stomp on each other in a silly fashion. It also allows for the bluetooth side to signal when profiles come and go, so the driver can take appropriate control. There's also the possibility of dynamic bluetooth/wlan duty cycle control which I haven't yet really played with.
It configures things up with a static "wlan wins everything" coexistence, configures up the available 2GHz channel map for bluetooth, sets a static duty cycle for bluetooth/wifi traffic priority and drives the basics needed to keep the MCI HAL code happy.
It doesn't do any actual coexistence except to default to "wlan wins everything", which at least demonstrates that things do indeed work. Bluetooth inquiry frames still trump wifi (including beacons), so that demonstrates things really do indeed seem to work.
Tested:
* AR9462 (WB222), STA mode + bt * QCA9565 (WB335), STA mode + bt
TODO:
* .. the rest of coexistence. yes, bluetooth, not people. That stuff's hard. * It doesn't do the initial BT side calibration, which requires a WLAN chip reset. I'll fix up the reset path a bit more first before I enable that. * The 1-ant and 2-ant configuration bits aren't being set correctly in if_ath_btcoex.c - I'll dig into that and fix it in a subsequent commit. * It's not enabled by default for WB222/WB225 even though I believe it now can be - I'll chase that up in a subsequent commit.
Obtained from: Qualcomm Atheros, Linux ath9k
show more ...
|
#
f6b6084b |
| 02-May-2016 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
dev/ath: minor spelling fixes in comments.
No functional change.
Reviewed by: adrian
|
#
9f3a9150 |
| 26-Apr-2016 |
Adrian Chadd <adrian@FreeBSD.org> |
[ath] add LDPC capability support and LDPC RX support.
This enables LDPC receive support for the AR9300 chips that support it. It'll announce LDPC support via net80211.
Tested:
* AR9380, STA mode
[ath] add LDPC capability support and LDPC RX support.
This enables LDPC receive support for the AR9300 chips that support it. It'll announce LDPC support via net80211.
Tested:
* AR9380, STA mode * AR9331, (to verify the HAL didn't attach it to a chip which doesn't support LDPC.)
TODO:
* Add in net80211 machinery to make this configurable at runtime.
show more ...
|
Revision tags: release/10.3.0 |
|
#
b626f5a7 |
| 04-Jan-2016 |
Glen Barber <gjb@FreeBSD.org> |
MFH r289384-r293170
Sponsored by: The FreeBSD Foundation
|
#
a5d8944a |
| 19-Nov-2015 |
Navdeep Parhar <np@FreeBSD.org> |
Catch up with head (r291075).
|
#
f50e4ebf |
| 09-Nov-2015 |
Adrian Chadd <adrian@FreeBSD.org> |
ath(4): begin fleshing out a "reset type" extension to force cold/warn resets.
Right now the only way to force a cold reset is:
* The HAL itself detects it's needed, or * The sysctl, setting all re
ath(4): begin fleshing out a "reset type" extension to force cold/warn resets.
Right now the only way to force a cold reset is:
* The HAL itself detects it's needed, or * The sysctl, setting all resets to be cold.
Trouble is, cold resets take quite a bit longer than warm resets.
However, there are situations where a cold reset would be nice. Specifically, after a stuck beacon, BB/MAC hang, stuck calibration results, etc.
The vendor HAL has a separate method to set the reset reason (which is how HAL_RESET_BBPANIC gets set) which informs the HAL during the reset path why it occured. This is almost but not quite the same; I may eventually unify both approaches in the future.
This commit just extends HAL_RESET_TYPE to include both status (eg BBPANIC) and type (eg do COLD.) None of the HAL code uses it yet though; that'll come later.
It also is a big no-op in each HAL - I need to go teach each of the HALs about cold/warm reset through this path.
show more ...
|