]> git.karo-electronics.de Git - linux-beck.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)
commit95192339c2de1e1a61baf289af3e3332403371c9
treea6120e7e1828de19b8b6eda5b366db45a85cd45d
parentd13a97f07d86f462096007dbf0f2e0338692abc0
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