freebsd-skq/sys
adrian 7b8778fe5a Flesh out some slightly dirty reset/channel change serialisation code
for the ath(4) driver.

Currently, there's nothing stopping reset, channel change and general
TX/RX from overlapping with each other. This wasn't a big deal with
pre-11n traffic as it just results in some dropped frames.
It's possible this may have also caused some inconsistencies and
badly-setup hardware.

Since locks can't be held across all of this (the Linux solution)
due to LORs with the network stack locks, some state counter
variables are used to track what parts of the code the driver is
currently in.

When the hardware is being reset, it disables the taskqueue and
waits for pending interrupts, tx, rx and tx completion before
it begins the reset or channel change.

TX and RX both abort if called during an active reset or channel
change.

Finally, the reset path now doesn't flush frames if ATH_RESET_NOLOSS
is set. Instead, completed TX and RX frames are passed back up to
net80211 before the reset occurs.

This is not without problems:

* Raw frame xmit are just dropped, rather than placed on a queue.
  The net80211 stack should be the one which queues these frames
  rather than the driver.

* It's all very messy. It'd be better if these hardware operations
  were serialised on some kind of work queue, rather than hoping
  they can be run in parallel.

* The taskqueue block/unblock may occur in parallel with the
  newstate() function - which shuts down the taskqueue and restarts
  it once the new state is known. It's likely these operations should
  be refcounted so the taskqueue is restored once no other areas
  in the code wish to suspend operations.

* .. interrupt disable/enable should likely be refcounted as well.

With this work, the driver does not drop frames during stuck beacon
or fatal errors and thus 11n traffic continues to run correctly.
Default and full resets however do still drop frames and it's possible
this may occur, causing traffic loss and session stalls.

Sponsored by:	Hobnob, Inc.
2011-11-18 05:06:30 +00:00
..
amd64 Fix SIGATOMIC_M{IN,AX} on x86-64. These are meant to be the minimum values that are allowed in a sig_atomic_t, but it looks like they were just copied from the x86 versions, so these definitions violate the C and C++ specs. Mismatch was spotted by the libc++ test suite. 2011-11-12 20:16:06 +00:00
arm Introduce the option VFS_ALLOW_NONMPSAFE and turn it on by default on 2011-11-08 10:18:07 +00:00
boot Wire the kernel text RWX, rather than RX. We're not quite ready 2011-11-17 15:51:03 +00:00
bsm Add ECAPMODE, "Not permitted in capability mode", a new kernel errno 2011-03-01 13:14:28 +00:00
cam Introduce CAM_SIM_POLLED SIM flag, indicating that it works in polling mode. 2011-11-17 21:07:56 +00:00
cddl Correct the types of the arguments to return probes of the syscall 2011-11-11 03:49:42 +00:00
compat - Split out a kern_posix_fadvise() from the posix_fadvise() system call so 2011-11-14 18:00:15 +00:00
conf Add unicode support to msdosfs and smbfs; original pathes from imura, 2011-11-18 03:05:20 +00:00
contrib Add missing PF_UNLOCK in pf_test 2011-10-30 14:55:00 +00:00
crypto Update Copyright. 2011-10-27 14:15:26 +00:00
ddb Follow up to r225203 refining break-to-debugger run-time configuration 2011-08-27 14:24:27 +00:00
dev Flesh out some slightly dirty reset/channel change serialisation code 2011-11-18 05:06:30 +00:00
fs Add unicode support to msdosfs and smbfs; original pathes from imura, 2011-11-18 03:05:20 +00:00
gdb Modify kdb_trap() so that it re-calls the dbbe_trap function as long as 2011-02-18 22:25:11 +00:00
geom Temporary revert r227009 to fix freeze on UP systems without PREEMPTION. 2011-11-14 19:32:05 +00:00
gnu Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs. 2011-11-07 15:43:11 +00:00
i386 Weaken the part of assertions added in the r227394. Only check that the 2011-11-11 04:10:36 +00:00
ia64 Introduce the option VFS_ALLOW_NONMPSAFE and turn it on by default on 2011-11-08 10:18:07 +00:00
isa MFC 2011-05-09 18:53:13 +00:00
kern Add unicode support to msdosfs and smbfs; original pathes from imura, 2011-11-18 03:05:20 +00:00
kgssapi Add missing break statement to make sure all 3DES etypes really are treated 2011-10-10 09:13:07 +00:00
libkern Add unicode support to msdosfs and smbfs; original pathes from imura, 2011-11-18 03:05:20 +00:00
mips Do pmap update only on active CPUs. 2011-11-17 13:14:59 +00:00
modules Add unicode support to msdosfs and smbfs; original pathes from imura, 2011-11-18 03:05:20 +00:00
net Bring in support for netmap, a framework for very efficient packet 2011-11-17 12:17:39 +00:00
net80211 .. add missing include from an incorrect merge. 2011-11-08 14:34:01 +00:00
netatalk
netgraph In r191367 the need for if_free_type() was removed and a new member 2011-11-11 22:57:52 +00:00
netinet Set the MTU of an path to an approriate value if the interface MTU 2011-11-15 20:41:50 +00:00
netinet6 Return the correct value for the IPV6_MULTICAST_HOPS getsockopt() call. 2011-11-13 02:32:10 +00:00
netipsec Add missing va_end() in an error case to clean up after va_start() 2011-10-07 21:00:26 +00:00
netipx Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs. 2011-11-07 15:43:11 +00:00
netnatm
netncp Change ncp_scan_bindery_object() to pass a constant search string. 2011-10-16 08:44:03 +00:00
netsmb Add unicode support to msdosfs and smbfs; original pathes from imura, 2011-11-18 03:05:20 +00:00
nfs Mark MALLOC_DEFINEs static that have no corresponding MALLOC_DECLAREs. 2011-11-07 06:44:47 +00:00
nfsclient Finish making 'wcommitsize' an NFS client mount option. 2011-11-14 18:52:07 +00:00
nfsserver Fix the NFS servers so that they can do a Lookup of "..", 2011-09-03 00:28:53 +00:00
nlm Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs. 2011-11-07 15:43:11 +00:00
ofed Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs. 2011-11-07 15:43:11 +00:00
opencrypto Add the fo_chown and fo_chmod methods to struct fileops and use them 2011-08-16 20:07:47 +00:00
pc98 Introduce the option VFS_ALLOW_NONMPSAFE and turn it on by default on 2011-11-08 10:18:07 +00:00
pci Add preliminary support for RTL8168/8111F PCIe Gigabit ethernet. 2011-11-17 22:07:50 +00:00
powerpc Use a global __pure2 function instead of a global register variable for 2011-11-17 15:49:42 +00:00
rpc Both a crash reported on freebsd-current on Oct. 18 under the 2011-11-03 14:38:03 +00:00
security Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs. 2011-11-07 15:43:11 +00:00
sparc64 Fix make universe. 2011-11-16 18:42:43 +00:00
sys Add unicode support to msdosfs and smbfs; original pathes from imura, 2011-11-18 03:05:20 +00:00
teken Link the demo application against ncursesw to make Unicode work. 2011-10-13 14:20:27 +00:00
tools Restore the comment that I removed by accident. 2011-11-09 13:26:59 +00:00
ufs Use implementation independent inoNN_t scalars for on-disk UFS structures 2011-11-09 07:48:48 +00:00
vm Eliminate end-of-line white space. 2011-11-17 06:54:49 +00:00
x86 Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs. 2011-11-07 15:43:11 +00:00
xdr
xen Properly handle suspend/resume events in the Xen device 2011-09-20 23:44:34 +00:00
Makefile Include sys/xen in cscope tag file generation. 2011-06-10 20:51:41 +00:00