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:15:33 +0000 (17:15 -0700)
commit0f528a11451069fc6ea66c40fb9ab518e9d335b3
tree3c123a4b9ce7c98bf48546025fe7ba3d5be7e919
parentad9e765fb1973bf8458f4d5ad88b59040992e0e3
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