rt2x00: Serialize TX operations on a queue.
authorGertjan van Wingerde <gwingerde@gmail.com>
Fri, 23 Sep 2011 16:20:00 +0000 (09:20 -0700)
committerHerton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
Tue, 27 Sep 2011 19:13:57 +0000 (16:13 -0300)
commit0a2b97bebd6495c1c9bb09aad0775f8d6a993881
tree2bd9cbea6fcd8dbf857ab6fac5ae3ea98fd609c8
parent22cdffeedc2f68f04242e947d2ad891b56517179
rt2x00: Serialize TX operations on a queue.

BugLink: https://bugs.launchpad.net/bugs/855239

The rt2x00 driver gets frequent occurrences of the following error message
when operating under load:
phy0 -> rt2x00queue_write_tx_frame: Error - Arrived at non-free entry in the
non-full queue 2.

This is caused by simultaneous attempts from mac80211 to send a frame via
rt2x00, which are not properly serialized inside rt2x00queue_write_tx_frame,
causing the second frame to fail sending with the above mentioned error
message.

Fix this by introducing a per-queue spinlock to serialize the TX operations
on that queue.

Reported-by: Andreas Hartmann <andihartmann@01019freenet.de>
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-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>
(backported from upstream commit 77a861c405da75d81e9e6e32c50eb7f9777777e8)

Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Acked-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
drivers/net/wireless/rt2x00/rt2x00queue.c
drivers/net/wireless/rt2x00/rt2x00queue.h