aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2x00queue.h
diff options
context:
space:
mode:
authorGertjan van Wingerde <gwingerde@gmail.com>2011-07-06 22:56:24 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2011-10-16 14:14:53 -0700
commit8a60d75bbc5feca1291edd728d6696be9e8dd465 (patch)
tree38e1683ded98d892aaeb5921b6f1653542a30942 /drivers/net/wireless/rt2x00/rt2x00queue.h
parenta94a36c352abcf3c7126b238cfbf9a79314a609b (diff)
downloadkernel_samsung_smdk4412-8a60d75bbc5feca1291edd728d6696be9e8dd465.zip
kernel_samsung_smdk4412-8a60d75bbc5feca1291edd728d6696be9e8dd465.tar.gz
kernel_samsung_smdk4412-8a60d75bbc5feca1291edd728d6696be9e8dd465.tar.bz2
rt2x00: Serialize TX operations on a queue.
commit 77a861c405da75d81e9e6e32c50eb7f9777777e8 upstream. 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> Cc: Tim Gardner <tim.gardner@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00queue.h')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00queue.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.h b/drivers/net/wireless/rt2x00/rt2x00queue.h
index 167d458..ad3d527 100644
--- a/drivers/net/wireless/rt2x00/rt2x00queue.h
+++ b/drivers/net/wireless/rt2x00/rt2x00queue.h
@@ -432,6 +432,7 @@ enum data_queue_flags {
* @flags: Entry flags, see &enum queue_entry_flags.
* @status_lock: The mutex for protecting the start/stop/flush
* handling on this queue.
+ * @tx_lock: Spinlock to serialize tx operations on this queue.
* @index_lock: Spinlock to protect index handling. Whenever @index, @index_done or
* @index_crypt needs to be changed this lock should be grabbed to prevent
* index corruption due to concurrency.
@@ -458,6 +459,7 @@ struct data_queue {
unsigned long flags;
struct mutex status_lock;
+ spinlock_t tx_lock;
spinlock_t index_lock;
unsigned int count;