]> git.baikalelectronics.ru Git - kernel.git/commit
ath9k: fix invalid descriptor discarding
authorFelix Fietkau <nbd@openwrt.org>
Mon, 24 Feb 2014 21:26:06 +0000 (22:26 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 25 Feb 2014 19:54:11 +0000 (14:54 -0500)
commit93350fbc2a212a10587f08f9dea367c504a11cc5
treec08be095b4713f0bf514e555a330195a9ca2b043
parentd48d8e8c4225f5983f0205da127b46c3f1cf8e47
ath9k: fix invalid descriptor discarding

Only set sc->rx.discard_next to rx_stats->rs_more when actually
discarding the current descriptor.

Also, fix a detection of broken descriptors:
First the code checks if the current descriptor is not done.
Then it checks if the next descriptor is done.
Add a check that afterwards checks the first descriptor again, because
it might have been completed in the mean time.

This fixes a regression introduced in
commit 849aedee730d53f180bf944e20b73d4c117b2a83
"ath9k: fix handling of broken descriptors"

Cc: stable@vger.kernel.org
Reported-by: Marco André Dinis <marcoandredinis@gmail.com>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/recv.c