]> git.baikalelectronics.ru Git - kernel.git/commit
rt2x00: Fix race between dma mapping and clearing rx entries in rt2800pci
authorHelmut Schaa <helmut.schaa@googlemail.com>
Sat, 2 Oct 2010 09:29:30 +0000 (11:29 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 5 Oct 2010 17:35:27 +0000 (13:35 -0400)
commit0d05d1ac1e0cc17bdbcd6fb85758e27aa9505f8e
treea6120e7e1828de19b8b6eda5b366db45a85cd45d
parent46e88ba0e1653e30d32b85bea0facd75a7b6c027
rt2x00: Fix race between dma mapping and clearing rx entries in rt2800pci

During rx, rt2x00lib calls rt2800pci_fill_rxdone to read the RX
descriptor. At that time the skb is already dma unmapped but no new skb
was dma mapped for this entry again. However, rt2800pci_fill_rxdone also
moves the hw rx queue index, marking this entry to be available for
reuse. Since no new skb was dma mapped and also the previous skb was
unmapped this might lead to strange hw behavior.

To fix this issue move the hw rx queue index increment to
rt2800pci_clear_entry where a new skb was already dma mapped and can be
safely used by the hw.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rt2x00/rt2800pci.c