#
8437d7d6 |
| 01-Dec-2024 |
Bjoern A. Zeeb <bz@FreeBSD.org> |
net80211: HT: add missing bit descriptions for IEEE80211_AGGR_BITS
The print mask for IEEE80211_AGGR_BITS is missing three fields. Add them for completness.
Sponsored by: The FreeBSD Foundation MFC
net80211: HT: add missing bit descriptions for IEEE80211_AGGR_BITS
The print mask for IEEE80211_AGGR_BITS is missing three fields. Add them for completness.
Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D47858
show more ...
|
Revision tags: release/14.2.0 |
|
#
c6b44f64 |
| 26-Nov-2024 |
Adrian Chadd <adrian@FreeBSD.org> |
net80211: add helper functions for determining HT transmit parameters
This adds helper functions to determine a variety of HT related transmit parameters:
* AMPDU density and size; * short-GI for 2
net80211: add helper functions for determining HT transmit parameters
This adds helper functions to determine a variety of HT related transmit parameters:
* AMPDU density and size; * short-GI for 20 and 40MHz; * Whether 40MHz transmit is allowed; * Whether HT rates have been negotiated for transmit.
It should be done here rather than drivers having to re-invent the wheel each time.
This is doubly important for AP modes where each node will hvae different supported features and this needs to be used when assembling transmit frames / configuring transmit parameters.
Differential Revision: https://reviews.freebsd.org/D47747
Reviewed by: bz
show more ...
|
Revision tags: release/13.4.0, release/14.1.0, release/13.3.0, 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, release/12.2.0 |
|
#
39ca7ca5 |
| 01-Jul-2020 |
Adrian Chadd <adrian@FreeBSD.org> |
[net80211] Commit files missing in the previous commit
These belong to my previous commit, but apparently I typed ieee80211_vhf.[ch] and forgot ht.h. Le oops.
|
#
e81d9092 |
| 14-Jun-2020 |
Adrian Chadd <adrian@FreeBSD.org> |
[net80211] Handle offloaded AMSDU in AMPDU reordering.
In the 11n world, most NICs did A-MPDU receive/transmit offloading but not A-MSDU offloading. So, the net80211 A-MPDU receive path would just
[net80211] Handle offloaded AMSDU in AMPDU reordering.
In the 11n world, most NICs did A-MPDU receive/transmit offloading but not A-MSDU offloading. So, the net80211 A-MPDU receive path would just receive MPDUs, do the reordering bit, pass it up to the rest of net80211 for crypto decap and then do A-MSDU decap before throwing ethernet frames up to the rest of the system.
However 11ac and 11ax NICs are increasingly doing A-MSDU offload (and newer 11ax stuff does socket offload, but hey I don't want to scare people JUST yet) - so although A-MPDU reordering may be done in the OS, A-MSDUs look like a normal MPDU. This means that all the MSDUs are actually faked into a set of MPDUs with matching 802.11 header - the sequence number, QoS header and any encryption verification bits (like IV) are just copied.
This shows up as MASSIVE packet loss in net80211, cause after the first MPDU we just toss the rest.
(And don't get me started about ethernet decap with A-MPDU host reordering; we'll have to cross that bridge for later 11ac and 11ax bits too.)
Anyway, this work changes each A-MPDU reorder slot into an mbufq. The mbufq is treated as a whole set of frames to pass up to the stack and reordered/de-duped as a group. The last frame in the reorder list is checked to see if it's an A-MSDU final frame so any duplicates are correctly tossed rather than double-received. Other than that, the rest of the logic is unchanged.
The previous commit did a small subset of this - if there wasn't any reordering going on then it'd accept the A-MSDUs. This is the rest of the needed work.
This is a no-op for 11n NICs doing A-MPDU reordering but needing software A-MSDU decap - they aren't tagged as A-MSDU and so any subsequent frames added to the reorder slot are tossed.
Tested:
* QCA9880 (ath10k/athp) - STA/AP mode; * RT3593 (if_rsu) - 11n STA+DWDS mode (I'm committing through it rn); * QCA9380 (if_ath) - STA/AP mode.
show more ...
|
Revision tags: release/11.4.0 |
|
#
4c368215 |
| 06-Jun-2020 |
Adrian Chadd <adrian@FreeBSD.org> |
[net80211] Fix this typo!
I've just started using this macro in upcoming amsdu/ampdu/ff rework and yes, too many parens. Oops!
|
#
ebb9b256 |
| 05-Jun-2020 |
Adrian Chadd <adrian@FreeBSD.org> |
[net80211] Add initial A-MSDU in A-MPDU negotation support.
This is hopefully a big no-op unless you're running some extra patches to flip on A-MSDU options in a driver.
802.11n supports sending A-
[net80211] Add initial A-MSDU in A-MPDU negotation support.
This is hopefully a big no-op unless you're running some extra patches to flip on A-MSDU options in a driver.
802.11n supports sending A-MSDU in A-MPDU. That lets you do things like pack small frames into an A-MSDU and stuff /those/ into an A-MPDU. It allows for much more efficient airtime because you're not wasting time sending small frames - which is still a problem when doing A-MPDU as there's still per-frame overhead and minimum A-MPDU density requirements.
It, however, is optional for 802.11n. A lot of stuff doesn't advertise it (but does it, just wait!); and I know that ath10k does it and my ath(4) driver work supports it.
Now, 802.11ac makes A-MSDU in A-MPDU something that can happen more frequently, because even though you can send very large A-MPDUs (like 1 megabyte and larger) you still have the small frame problem. So, 802.11ac NICs like ath10k and iwm will support A-MSDU in A-MPDU out of the box if it's enabled - and you can negotiate it.
So, let's lay down the ground work to enable A-MSDU in A-MPDU. This will allow hardware like iwn(4) and ath(4) which supports software A-MSDU but hardware A-MPDU to be more efficient.
Drivers that support A-MSDU in A-MPDU will set TX/RX htcap flags. Note this is separate from the software A-MSDU encap path; /that/ dictates whether net80211 is doing A-MSDU encapsulation or not. These HTC flags control negotiation, NOT encapsulation.
Once this negotiation and driver bits are done, hardware like rtwn(4), run(4), and others will be able to use A-MSDU even without A-MPDU working; right now FF and A-MSDU aren't even attempted if you're an 11n node. It's a small hold-over from the initial A-MPDU work and I know how to fix it, but to flip it on properly I need to be able to negotiate or ignore A-MSDU in A-MPDU.
Oh and the fun part - some 11ac APs I've tested will quite happily decap A-MSDU in A-MPDU even though they don't negotiate it when doing 802.11n. So hey, I know it works - I just want to properly handle things. :-)
Tested:
* AR9380, STA/AP mode
show more ...
|
Revision tags: 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 |
|
#
27c24068 |
| 22-May-2017 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r318560 through r318657.
|
#
85c4e670 |
| 20-May-2017 |
Adrian Chadd <adrian@FreeBSD.org> |
[net80211] prepare for A-MSDU/A-MPDU offload crypto / sequence number checking.
When doing AMSDU offload, the driver (for now!) presents 802.11 frames with the same sequence number and crypto sequen
[net80211] prepare for A-MSDU/A-MPDU offload crypto / sequence number checking.
When doing AMSDU offload, the driver (for now!) presents 802.11 frames with the same sequence number and crypto sequence number / IV values up to the stack. But, this will trip afoul over the sequence number detection.
So drivers now have a way to signify that a frame is part of an offloaded AMSDU group, so we can just ensure that we pass those frames up to the stack.
The logic will be a bit messy - the TL;DR will be that if it's part of the previously seen sequence number then it belongs in the same burst. But if we get a repeat of the same sequence number (eg we sent an ACK but the receiver didn't hear it) then we shouldn't be passing those frames up. So, we can't just say "all subframes go up", we need to track whether we've seen the end of a burst of frames for the given sequence number or not, so we know whether to actually pass them up or not.
The first part of doing all of this is to ensure the ieee80211_rx_stats struct is available in the RX sequence number check path and the RX ampdu reorder path. So, start by passing the pointer into these functions to avoid doing another lookup.
The actual support will come in a subsequent commit once I know the functionality actually works!
show more ...
|
#
dfabbaa0 |
| 03-Mar-2017 |
Andriy Voskoboinyk <avos@FreeBSD.org> |
net80211: fix ieee80211_htrateset setup, return EINVAL for an unsupported ucast/mcast/mgmt HT rate.
- Init global ieee80211_htrateset only once; neither ic_htcaps nor ic_txstream is changed when dev
net80211: fix ieee80211_htrateset setup, return EINVAL for an unsupported ucast/mcast/mgmt HT rate.
- Init global ieee80211_htrateset only once; neither ic_htcaps nor ic_txstream is changed when device is attached; - Move global ieee80211_htrateset structure to ieee80211com; there was a possible data race when more than 1 wireless device is used simultaneously; - Discard unsupported rates in ieee80211_ioctl_settxparams(); otherwise, an unsupported value may break connectivity (actually, 'ifconfig wlan0 ucastrate 8' for RTL8188EU results in immediate disconnect + infinite 'device timeout's after it).
Tested with: - Intel 6205, STA mode. - RTL8821AU, STA mode.
Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D9871
show more ...
|
#
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 ...
|
#
2828dafc |
| 10-Nov-2016 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r308227 through r308490.
|
#
339be86f |
| 10-Nov-2016 |
Adrian Chadd <adrian@FreeBSD.org> |
[net80211] implement "first RX defines the BAW" hack.
Unfortunately (sigh) some firmware doesn't provide the RX BA starting point, so we need to cope and set a "close enough" sequence number so we (
[net80211] implement "first RX defines the BAW" hack.
Unfortunately (sigh) some firmware doesn't provide the RX BA starting point, so we need to cope and set a "close enough" sequence number so we (hopefully!) don't discard frames as duplicates.
Tested:
* QCA9880v2, athp driver (under development), STA mode
show more ...
|
#
0cc02885 |
| 06-Nov-2016 |
Adrian Chadd <adrian@FreeBSD.org> |
[net80211] add a method to also explicitly tear down RX A-MPDU.
The ath10k firmware API doesn't pass up the ADDBA/DELBA frames, only WMI firmware notifications.
Tested:
* ath10k (QCA9880), doing a
[net80211] add a method to also explicitly tear down RX A-MPDU.
The ath10k firmware API doesn't pass up the ADDBA/DELBA frames, only WMI firmware notifications.
Tested:
* ath10k (QCA9880), doing actual (ha!) 11n!
show more ...
|
Revision tags: release/11.0.1 |
|
#
8c4282b3 |
| 24-Sep-2016 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r305892 through r306302.
|
Revision tags: release/11.0.0 |
|
#
f383e58f |
| 17-Sep-2016 |
Adrian Chadd <adrian@FreeBSD.org> |
[net80211] add a HT method to populate HTCAP based on IBSS requirements.
IBSS negotiation is a subset of the STA/AP negotiation. We always have a current channel, so base the HT capabilities on the
[net80211] add a HT method to populate HTCAP based on IBSS requirements.
IBSS negotiation is a subset of the STA/AP negotiation. We always have a current channel, so base the HT capabilities on the current channel. This is then put into IBSS probe requests to inform peers of our 11n capabilities.
show more ...
|
#
2263fb58 |
| 06-Apr-2016 |
Glen Barber <gjb@FreeBSD.org> |
MFH
Sponsored by: The FreeBSD Foundation
|
#
1c7b0c84 |
| 06-Apr-2016 |
Adrian Chadd <adrian@FreeBSD.org> |
[net80211] Initial A-MSDU support for testing / evaluation
A-MSDU is another 11n aggregation mechanism where multiple ethernet frames get LLC encapsulated (so they have a length field), padded, and
[net80211] Initial A-MSDU support for testing / evaluation
A-MSDU is another 11n aggregation mechanism where multiple ethernet frames get LLC encapsulated (so they have a length field), padded, and put in a single MPDU (802.11 MAC frame.) This means it gets sent out as a single frame, with a single seqno, it's acked as one frame, etc.
It turns out that, hah, atheros fast frames is almost but not quite like this, so I'm reusing all of the current superg/fast-frames stuff in order to actually transmit A-MSDU. Yes, this means that A-MSDU frames are also only aggregated two at a time, so it's not necessarily a huge win, but it's better than nothing.
This doesn't do anything by default - the driver needs to say it does A-MSDU as well as set the AMSDU software TX capability so this code path gets exercised.
For now, the only driver that enables this is urtwn. I'll enable it for rsu at some point soon. Tested:
* Add an amsdu encap path to aggregate two frames, same as the fast-frames path.
* Always do the superg init/teardown and node init/teardown stuff, regardless of whether the nodes are doing fast-frames (the ATH capability stuff.) That way we can reuse it for amsdu.
* Don't do AMSDU for multicast/broadcast and EAPOL frames.
* If we're doing A-MPDU, then don't bother doing FF/A-MSDU. We can likely do both together, but I don't want to change behaviour.
* Teach the fast frames approx txtime logic to support the 11n rates. But, since we don't currently have a full "current rate" support, assume it's HT20, long-gi, etc. That way we overshoot on the TX time estimation, so we're always inside the requirements. (And we only aggregate two frames for now, so we're not really going to exceed that.)
* Drop the maximum FF age default down to 2ms, otherwise we end up with some very annoyingly large latencies.
TODO:
* We only aggregate two ethernet frames, so I'm not checking the max A-MSDU size. But when it comes time to support >2 frames, we should obey that.
Tested:
* urtwn(4)
show more ...
|
Revision tags: release/10.3.0 |
|
#
11d38a57 |
| 28-Oct-2015 |
Baptiste Daroussin <bapt@FreeBSD.org> |
Merge from head
Sponsored by: Gandi.net
|
#
becbad1f |
| 13-Oct-2015 |
Baptiste Daroussin <bapt@FreeBSD.org> |
Merge from head
|
#
65dcb5bc |
| 01-Oct-2015 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r288197 through r288456.
|
#
5a2b666c |
| 01-Oct-2015 |
Baptiste Daroussin <bapt@FreeBSD.org> |
Merge from head
|