freebsd-dev/sys
Adrian Chadd f1481c8d3b [net80211] Migrate HT/legacy protection mode and preamble calculation to per-VAP flags
The later firmware devices (including iwn!) support multiple configuration
contexts for a lot of things, leaving it up to the firmware to decide
which channel and vap is active.  This allows for things like off-channel
p2p sta/ap operation and other weird things.

However, net80211 is still focused on a "net80211 drives all" when it comes to driving
the NIC, and as part of this history a lot of these options are global and not per-VAP.
This is fine when net80211 drives things and all VAPs share a single channel - these
parameters importantly really reflect the state of the channel! - but it will increasingly
be not fine when we start supporting more weird configurations and more recent NICs.
Yeah, recent like iwn/iwm.

Anyway - so, migrate all of the HT protection, legacy protection and preamble
stuff to be per-VAP.  The global flags are still there; they're now calculated
in a deferred taskqueue that mirrors the old behaviour.  Firmware based drivers
which have per-VAP configuration of these parameters can now just listen to the
per-VAP options.

What do I mean by per-channel? Well, the above configuration parameters really
are about interoperation with other devices on the same channel. Eg, HT protection
mode will flip to legacy/mixed if it hears ANY BSS that supports non-HT stations or
indicates it has non-HT stations associated.  So, these flags really should be
per-channel rather than per-VAP, and then for things like "do i need short preamble
or long preamble?" turn into a "do I need it for this current operating channel".
Then any VAP using it can query the channel that it's on, reflecting the real
required state.

This patch does none of the above paragraph just yet.

I'm also cheating a bit - I'm currently not using separate taskqueues for
the beacon updates and the per-VAP configuration updates.  I can always further
split it later if I need to but I didn't think it was SUPER important here.

So:

* Create vap taskqueue entries for ERP/protection, HT protection and short/long
  preamble;
* Migrate the HT station count, short/long slot station count, etc - into per-VAP
  variables rather than global;
* Fix a bug with my WME work from a while ago which made it per-VAP - do the WME
  beacon update /after/ the WME update taskqueue runs, not before;
* Any time the HT protmode configuration changes or the ERP protection mode
  config changes - schedule the task, which will call the driver without the
  net80211 lock held and all correctly serialised;
* Use the global flags for beacon IEs and VAP flags for probe responses and
  other IE situations.

The primary consumer of this is ath10k.  iwn could use it when sending RXON,
but we don't support IBSS or AP modes on it yet, and I'm not yet sure whether
it's required in STA mode (ie whether the firmware parses beacons to change
protection mode or whether we need to.)

Tested:

* AR9280, STA/AP
* AR9380, DWDS STA+STA/AP
* ath10k work, STA/AP
* Intel 6235, STA
* Various rtwn / run NICs, DWDS STA and STA configurations
2020-07-01 00:23:49 +00:00
..
amd64 linuxolator: implement memfd_create syscall 2020-06-29 03:09:14 +00:00
arm Fix reboot command on the Raspberry Pi series. 2020-06-22 08:12:21 +00:00
arm64 Coresight: provide device_attach method for FDT bus. 2020-06-29 12:59:09 +00:00
bsm bsm: add AUE_CLOSERANGE 2020-04-24 01:27:25 +00:00
cam Use the more descriptive src_ccb and dst_ccb for the two ccbs being merged. 2020-06-20 04:07:23 +00:00
cddl Fix "current" variable name conflict with openzfs 2020-06-27 00:57:48 +00:00
compat Make linprocfs(5) create the /proc/<PID>/task/ directores. 2020-06-30 16:24:28 +00:00
conf Add dwc_otg_acpi 2020-06-30 15:58:29 +00:00
contrib Rename nvpair.c to bsd_nvpair.c to not conflict with openzfs' version. 2020-06-27 00:55:03 +00:00
crypto Use zfree() instead of bzero() and free(). 2020-06-25 20:20:22 +00:00
ddb [PowerPC] More relocation fixes 2020-06-21 03:39:26 +00:00
dev Add dwc_otg_acpi 2020-06-30 15:58:29 +00:00
dts Remove licenses 2020-06-04 17:20:58 +00:00
fs Add a boolean argument to nfscl_reqstart() to indicate that ext_pgs mbufs 2020-06-26 03:11:54 +00:00
gdb Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
geom Use explicit_bzero() instead of bzero() for sensitive data. 2020-06-25 20:25:35 +00:00
gnu dts: patch the am33xx dts for upcoming clock support 2020-06-05 20:14:54 +00:00
i386 linuxolator: implement memfd_create syscall 2020-06-29 03:09:14 +00:00
isa sc(4) md bits: stop setting sc->kbd entirely 2019-12-30 02:07:55 +00:00
kern Fix a panic when unloading firmware 2020-06-29 21:35:50 +00:00
kgssapi Add support for optional separate output buffers to in-kernel crypto. 2020-05-25 22:12:04 +00:00
libkern libkern: Add arc4random_uniform 2020-05-23 17:51:06 +00:00
mips Add dwc_otg_acpi 2020-06-30 15:58:29 +00:00
modules ena: fix module build after r362530 2020-06-26 09:32:57 +00:00
net iflib: fix compilation issue introduced in r362621 2020-06-25 20:43:21 +00:00
net80211 [net80211] Migrate HT/legacy protection mode and preamble calculation to per-VAP flags 2020-07-01 00:23:49 +00:00
netgraph Update event masks constant to Bluetooth core spec V5.2 2020-06-15 14:58:40 +00:00
netinet Fix a bug introduced in https://svnweb.freebsd.org/changeset/base/362173 2020-06-30 21:50:05 +00:00
netinet6 Add the SCTP_SUPPORT kernel option. 2020-06-18 19:32:34 +00:00
netipsec Simplify IPsec transform-specific teardown. 2020-06-25 23:59:16 +00:00
netpfil ipfw(4): make O_IPVER/ipversion match IPv4 or 6, not just IPv4. 2020-06-24 15:46:33 +00:00
netsmb Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
nfs Use epoch(9) for rtentries to simplify control plane operations. 2020-05-23 10:21:02 +00:00
nfsclient
nfsserver
nlm Fix export_args ex_flags field so that is 64bits, the same as mnt_flags. 2020-06-14 00:10:18 +00:00
ofed Convert OFED rtable interactions to the new routing KPI. 2020-04-15 13:06:55 +00:00
opencrypto Convert cryptostats to a counter_u64 array. 2020-06-30 22:01:21 +00:00
powerpc [PowerPC] More relocation fixes 2020-06-21 03:39:26 +00:00
riscv Only invalidate the early DTB mapping if it exists 2020-06-24 15:21:12 +00:00
rpc Fix up a comment added by r362455. 2020-06-21 02:49:56 +00:00
security mac_veriexec_fingerprint_check_vnode: v_writecount > 0 means active writers 2020-06-12 21:51:20 +00:00
sys Bump the version since r362639 changed the internal API between the NFS 2020-06-26 03:14:30 +00:00
teken
tests Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
tools vfs: stop null checking routines in vop wrappers 2020-01-26 00:41:38 +00:00
ufs The binary representation of the superblock (the fs structure) is written 2020-06-19 01:04:25 +00:00
vm vm: Add missing WITNESS warnings for M_WAITOK allocation 2020-06-29 16:54:00 +00:00
x86 Assume all TSCs are synchronized for AMD Family 17h processors and later 2020-06-22 20:42:58 +00:00
xdr Split XDR into separate kernel module. Make krpc depend on xdr. 2020-04-17 06:04:20 +00:00
xen Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (16 of many) 2020-02-25 19:04:39 +00:00
Makefile Remove sparc64 kernel support 2020-02-03 17:35:11 +00:00