]> git.baikalelectronics.ru Git - kernel.git/commit
ath9k: fix handling of broken descriptors
authorFelix Fietkau <nbd@openwrt.org>
Sun, 7 Apr 2013 22:04:11 +0000 (00:04 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 10 Apr 2013 18:10:33 +0000 (14:10 -0400)
commit822d01899402f2f086ad8ca359551a9d2497a957
tree23f3c8856b72438a40b7bbbb47283a5ca1eb54b3
parent1ee04c017fe32a593dc6b9b596dd9fbcfeb472e6
ath9k: fix handling of broken descriptors

As the comment in ath_get_next_rx_buf indicates, if a descriptor with
the done bit set follows one with the done bit cleared, both descriptors
should be discarded, however the driver is not doing that yet.

To fix this, use the rs->rs_more flag as an indicator that the following
frame should be discarded. This also helps with the split buffer case:
if the first part of the frame is discarded, the following parts need to
be discarded as well, since they contain no valid header or usable data.

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