freebsd-skq/sys
Adrian Chadd bc0203e201 Fix antenna configuration, microcode version checks and rate selection
in preparation for the 5300 3x3 NIC.

During this particular adventure, I did indeed discover that a whole
swath of things made little to no sense.

Those included, and are fixed here:

* A lot of the antenna configuration bits assume the NIC has two receive
  chains.  That's blatantly untrue for NICs that don't.
* There was some disconnect between the antenna configuration when
  forming a PLCP rate DWORD (which includes the transmit antenna
  configuration), separate to the link quality antenna configuration.

  So now there's helper functions to return which antenna configurations
  to use and those are used wherever an antenna config is required.

* The 5300 does up to three stream TX/RX (so MCS0->23), however
  the link quality table has only 16 slots.  This means all of the
  rate entries are .. well, dual-stream rates.  If this is the case,
  the "last MIMO" parameter can't be 16 or it panics the firmware.
  Set it to 15.

* .. and since yes it has 16 slots, it only would try retransmitting
  from MCS8->MCS23, which can be quite .. terrible.  Hard-code the last
  two retry slots to be the lowest configured rate.

* I noticed some transmit configuration command stuff is different
  based on firmware API version, so I lifted that code from Linux.

* Add / augment some more logging to make it easier to capture this
  stuff.

Now, 3x3 is still terrible because the link quality configuration is
plainly not good enough.  I'll have to think about that.
However, the original goal of this - 3x3 operation on the Intel
5300 NIC - actually worked.

There are also rate control bugs in the way this driver handles
notifying the net80211 rate control code when AMPDU is enabled.
It always steps the rate up to the maximum rate possible - and
this eventually ends in much sadness.  I'll fix that later.

As a side note - 2GHz HT40 now works on all the NICs I have tested.

As a second side note - this exposed some bad 3x3 behaviour in
the ath(4) rate control code where it starts off at a 3-stream rate
and doesn't downgrade quickly enough.  This makes the initial
dhcp exchange take a long time.  I'll fix the ath(4) rate code
to start at a low fixed 1x1 MCS rate and step up if everything
works out.

Tested:

* Intel 2200
* Intel 2230
* Intel 5300
* Intel 5100
* Intel 6205
* Intel 100

TODO:

* Test the other NICs more thoroughly!

Thank you to Michael Kosarev <russiane39@gmail.com> for donating the
Intel 5300 NIC and pestering me about it since last year to try and
make it all work.
2014-08-28 03:18:27 +00:00
..
amd64 Implement the 0x2B SUB instruction, and the OR variant of 0x81. 2014-08-27 00:53:56 +00:00
arm Rewrite of ti_i2c based on gonzo's patch, fix the following bugs/problems: 2014-08-20 17:02:37 +00:00
boot Since the size of GPT entry may differ from the sizeof(struct gpt_ent), 2014-08-25 07:15:14 +00:00
bsm IFp4 @1192291: 2014-04-07 20:44:00 +00:00
cam We should never enter the PROBE_SETAN phase if we're not ATAPI, since 2014-08-22 13:15:59 +00:00
cddl Restore the correct value when disabling probes. Otherwise the instrumented 2014-08-24 17:10:47 +00:00
compat Regen. 2014-08-27 01:02:19 +00:00
conf Update to the Intel Base driver for the Intel XL710 Ethernet Controller Family 2014-08-22 18:59:19 +00:00
contrib Add iwn-100 firmware. 2014-08-28 00:05:02 +00:00
crypto Put the aesni_cipher_setup() and aesni_cipher_process() functions into 2014-06-24 06:55:49 +00:00
ddb ins is only set and unused, but only when we're not doing software 2014-08-14 16:01:51 +00:00
dev Fix antenna configuration, microcode version checks and rate selection 2014-08-28 03:18:27 +00:00
fs Fix bug that, assuming a/ is a root of NFS filesystem mounted on autofs, 2014-08-24 17:03:52 +00:00
gdb Pull in r267961 and r267973 again. Fix for issues reported will follow. 2014-06-28 03:56:17 +00:00
geom Deal explicitly with possible failures of make_dev_alias_p() in GEOM. 2014-08-18 19:27:47 +00:00
gnu New DTS files to suppport the SAM9260EK eval board. Derived, in part, 2014-08-19 03:51:05 +00:00
i386 Fix build of si(4) and enable it in LINT on amd64 and i386. 2014-08-20 16:07:17 +00:00
isa Remove vestiges of knowing the ISA bus, which we gave up on around 20 2014-03-19 21:03:04 +00:00
kern vt(4): Add cngrab() and cnungrab() callbacks 2014-08-27 10:04:10 +00:00
kgssapi
libkern Bring in the new automounter, similar to what's provided in most other 2014-08-17 09:44:42 +00:00
mips Change pmap_enter(9) interface to take flags parameter and superpage 2014-08-08 17:12:03 +00:00
modules Add iwn-100 firmware. 2014-08-28 00:05:02 +00:00
net * Add new net/sff8436.h containing constants used to access 2014-08-21 17:54:42 +00:00
net80211 After much toying around with this AMRR initial rate stuff, 2014-08-20 09:10:03 +00:00
netgraph Remove any stale mbuf tags from packets being injected into a netgraph 2014-07-01 07:54:12 +00:00
netinet Announce SCTP support in the kern.features sysctl variables. 2014-08-26 21:15:34 +00:00
netinet6 Add some missing checks for unsupported interfaces (e.g. pflog(4)) when 2014-08-22 19:21:08 +00:00
netipsec Change pr_output's prototype to avoid the need for explicit casts. 2014-08-15 02:43:02 +00:00
netnatm
netpfil Whitespace/style changes merged from projects/ipfw. 2014-08-23 17:57:06 +00:00
netsmb Remove redundant unlock. 2014-04-17 12:22:08 +00:00
nfs Fix/improve fhe_stats sysctl output. 2014-06-14 12:26:12 +00:00
nfsclient
nfsserver Change NFS readdir() to only ignore cookies preceding the given offset for 2014-07-01 20:00:35 +00:00
nlm Correct a typo in nlm_find_host_by_addr(): the intention of the 2014-03-11 00:25:55 +00:00
ofed - Update the OFED Linux Emulation layer as a preparation for a 2014-08-27 13:21:53 +00:00
opencrypto allow the kern.cryptodevallowsoft sysctl to enable symetric/hashes too... 2014-03-11 01:45:46 +00:00
pc98 Compile fixes: 2014-06-28 17:36:18 +00:00
pci Fix various NIC drivers to properly cleanup static DMA resources. 2014-06-11 14:53:58 +00:00
powerpc vt(4): Add vd_bitblt_bmp_t callback 2014-08-23 20:35:33 +00:00
rpc Merge the NFSv4.1 server code in projects/nfsv4.1-server over 2014-07-01 20:47:16 +00:00
security Replace dev_clone with cdevpriv(9) KPI in audit_pipe code. 2014-08-20 16:04:30 +00:00
sparc64 For CPUs which do hardware cache line unaliasing, use direct map to 2014-08-23 18:11:54 +00:00
sys vt(4): Add cngrab() and cnungrab() callbacks 2014-08-27 10:04:10 +00:00
teken
tools Call cpp with -P to avoid printing line markings. 2014-06-10 06:24:01 +00:00
ufs Rather than using an hardcoded reclaim age, rely on an LRU-like approach 2014-08-25 17:06:18 +00:00
vm Back in the days when the kernel was single threaded, testing 2014-08-26 16:40:20 +00:00
x86 atpic: make sure atpic_init is called after IO APIC initialization 2014-08-07 17:00:50 +00:00
xdr
xen xen: implement event channel PIRQ support 2014-08-04 08:42:29 +00:00
Makefile Remove ia64. 2014-07-07 00:27:09 +00:00