freebsd-skq/sys
Adrian Chadd 59fbb5304d Fix a cleanup hang if cleanup gets called _during_ an active cleanup.
During power save testing I noticed that the cleanup code is being
called during a RUN->RUN state transition.  It's because the net80211
stack is treating that (for reasons I don't quitey know yet) as a
reassociation and this calls the node cleanup code.  The reason it's
seeing a RUN->RUN transition is because during active power save
stuff it's possible that the RUN->SLEEP and SLEEP->RUN transitions
happen so quickly that the deferred net80211 vap state code
"loses" a transition, namely the intermediary SLEEP transition.

So, this was causing the node reassociation code to sometimes be called
twice in quick succession and this would result in ath_tx_tid_cleanup()
to be called again.  The code calling it would always call pause, and
then only call resume if the TID didn't have "cleanup_inprogress" set.
Unfortunately it didn't check if it was already set on entry, so it
would pause but not call resume.  Thus, paused would be called more
than once (once before each entry into ath-tx_tid_cleanup()) but resume
would only be called once when the cleanup state was finished.

This doesn't entirely fix all of the issues seen in the cleanup path
but it's a necessary first step.

Since this is a stability fix, it should be merged to stable/10 at some
point.

Tested:

* AR5416, STA mode

MFC after:	7 days
2014-04-21 01:02:49 +00:00
..
amd64 Add support for the PIT 'readback' command -- based on a patch by grehan@. 2014-04-18 16:05:12 +00:00
arm Remove uncessary cache and TLB maintenance ops. 2014-04-20 18:21:05 +00:00
boot Add the initial version of if_nf10bmac(4), a driver to support an 2014-04-17 12:33:26 +00:00
bsm IFp4 @1192291: 2014-04-07 20:44:00 +00:00
cam Properly pass the initiator address when running in proxy mode. 2014-04-16 11:00:10 +00:00
cddl MFV r264668: 2014-04-18 22:04:58 +00:00
compat In freebsd32_sendmsg(), replace the call to sockargs() followed by a 2014-04-05 18:56:01 +00:00
conf Really, really, really only allow this option for amd64/i386 builds. 2014-04-09 18:44:54 +00:00
contrib Implement the final missing sysctls by moving ipf_auth_softc_t from 2014-04-07 19:32:56 +00:00
crypto NO_MAN= has been deprecated in favor of MAN= for some time, go ahead 2014-04-13 05:21:56 +00:00
ddb ddb: Minor style cleanups. 2014-03-31 16:37:41 +00:00
dev Fix a cleanup hang if cleanup gets called _during_ an active cleanup. 2014-04-21 01:02:49 +00:00
fs Modify the NFSv4 client create/mkdir RPC so that it acquires 2014-04-20 22:19:00 +00:00
gdb
geom Make sure not to do I/O for more than MAXPHYS bytes. Doing so can cause 2014-04-15 15:41:57 +00:00
gnu Symbolic bindings for the dts files... 2014-02-28 16:51:33 +00:00
i386 Don't build EISA by default anymore. Remove from i386 GENERIC and 2014-04-18 16:53:06 +00:00
ia64 Rename __wchar_t so it no longer conflicts with __wchar_t from clang 3.4 2014-04-01 14:46:11 +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 Fix a comment typo; conversion tables are for leap years, not leap seconds. 2014-04-20 13:37:22 +00:00
kgssapi
libkern
mips Fix typo and case inconsistency in MIPS CP0 register names. 2014-04-17 20:42:03 +00:00
modules Don't build EISA by default anymore. Remove from i386 GENERIC and 2014-04-18 16:53:06 +00:00
net Backport from projects/pf r263908: 2014-04-20 09:17:48 +00:00
net80211 Remove IPX support. 2014-03-14 02:58:48 +00:00
netgraph Remove AppleTalk support. 2014-03-14 06:29:43 +00:00
netinet Add consistency checks to ensure that fragments of a user message 2014-04-20 21:11:39 +00:00
netinet6 Remove unused variable. 2014-04-17 06:40:11 +00:00
netipsec Remove _IP_VHL* macros and related ifdefs. 2014-04-16 05:31:54 +00:00
netnatm
netpfil Backport from projects/pf r263908: 2014-04-20 09:17:48 +00:00
netsmb Remove redundant unlock. 2014-04-17 12:22:08 +00:00
nfs - Remove rt_metrics_lite and simply put its members into rtentry. 2014-03-05 01:17:47 +00:00
nfsclient
nfsserver Update kernel inclusions of capability.h to use capsicum.h instead; some 2014-03-16 10:55:57 +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 Rename global cnt to vm_cnt to avoid shadowing. 2014-03-22 10:26:09 +00:00
opencrypto allow the kern.cryptodevallowsoft sysctl to enable symetric/hashes too... 2014-03-11 01:45:46 +00:00
pc98 MFi386: r257858 (by kib) 2014-04-20 05:40:13 +00:00
pci Increase the number of TX DMA segments from 32 to 35. It turned 2014-03-31 01:54:59 +00:00
powerpc Small performance optimization. Clobber only cr0, rather than the entire CR. 2014-04-11 06:17:44 +00:00
rpc Fix lock acquisition in case no request space available, missed in r260097. 2014-02-04 00:00:01 +00:00
security audit: plug FILEDESC_LOCK leak in audit_canon_path. 2014-03-21 01:30:33 +00:00
sparc64 Rename __wchar_t so it no longer conflicts with __wchar_t from clang 3.4 2014-04-01 14:46:11 +00:00
sys sys/capsicum.h: Remove not very useful visibility guards. 2014-04-19 22:18:57 +00:00
teken Fix typo. 2014-02-06 13:28:06 +00:00
tools Update NetBSD Foundation copyrights to 2-clause BSD 2014-03-18 01:40:25 +00:00
ufs Update comment to explain search order reverted to historical order 2014-03-22 11:26:39 +00:00
vm Rename global cnt to vm_cnt to avoid shadowing. 2014-03-22 10:26:09 +00:00
x86 Make this compile with gcc. 2014-04-05 22:43:18 +00:00
xdr
xen Make this compile with gcc. 2014-04-05 22:43:18 +00:00
Makefile Remove AppleTalk support. 2014-03-14 06:29:43 +00:00