ath9k: fix rx descriptor related race condition
authorFelix Fietkau <nbd@openwrt.org>
Sat, 10 Aug 2013 13:59:15 +0000 (15:59 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Sep 2013 00:21:45 +0000 (17:21 -0700)
commit452c0dc821996470f847ac57dd3ca51a34a4c017
treef7d75af4a593d69c5ad748ca7ad592a60fb9b9b5
parent6b8aad8df84daa0175627f36b2f299ba8e7b55e6
ath9k: fix rx descriptor related race condition

commit e96542e55a2aacf4bdeccfe2f17b77c4895b4df2 upstream.

Similar to a race condition that exists in the tx path, the hardware
might re-read the 'next' pointer of a descriptor of the last completed
frame. This only affects non-EDMA (pre-AR93xx) devices.

To deal with this race, defer clearing and re-linking a completed rx
descriptor until the next one has been processed.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/ath/ath9k/ath9k.h
drivers/net/wireless/ath/ath9k/recv.c