]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
[net80211] Add initial A-MSDU in A-MPDU negotation support.
authorAdrian Chadd <adrian@FreeBSD.org>
Fri, 5 Jun 2020 07:38:10 +0000 (07:38 +0000)
committerAdrian Chadd <adrian@FreeBSD.org>
Fri, 5 Jun 2020 07:38:10 +0000 (07:38 +0000)
commitebb9b256724793e0c2be54265daf5d45a0d48c88
tree0d1ab2259bb6edf045ce069302e9b1b4d2f1ae31
parentd20ff6e6805a5ad5b244b4e96e10ea824971a045
[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
sys/net80211/_ieee80211.h
sys/net80211/ieee80211_ht.c
sys/net80211/ieee80211_ht.h