aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorIvo van Doorn <ivdoorn@gmail.com>2010-10-11 09:38:45 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-10-11 15:04:26 -0400
commita1d1eabc8c42ddf5fd3ea4184094561b3edd127b (patch)
tree8e014ed75832f2343bfcfad9f5761b49b7feae14 /drivers
parent1550c8ef835af17df322045e92541561afa0f017 (diff)
rt2x00: Make queue_entry flags access atomic
All access to the queue_entry->flags can be done concurrently, so all flags must use the atomic operators. On most locations this was already done, so just fix the last few non-atomic versions. Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Acked-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00usb.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00usb.c b/drivers/net/wireless/rt2x00/rt2x00usb.c
index 451d637377a2..769c53451b21 100644
--- a/drivers/net/wireless/rt2x00/rt2x00usb.c
+++ b/drivers/net/wireless/rt2x00/rt2x00usb.c
@@ -208,7 +208,7 @@ static void rt2x00usb_interrupt_txdone(struct urb *urb)
208 struct queue_entry *entry = (struct queue_entry *)urb->context; 208 struct queue_entry *entry = (struct queue_entry *)urb->context;
209 struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev; 209 struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev;
210 210
211 if (!__test_and_clear_bit(ENTRY_OWNER_DEVICE_DATA, &entry->flags)) 211 if (!test_and_clear_bit(ENTRY_OWNER_DEVICE_DATA, &entry->flags))
212 return; 212 return;
213 213
214 /* 214 /*
@@ -220,7 +220,7 @@ static void rt2x00usb_interrupt_txdone(struct urb *urb)
220 * Check if the frame was correctly uploaded 220 * Check if the frame was correctly uploaded
221 */ 221 */
222 if (urb->status) 222 if (urb->status)
223 __set_bit(ENTRY_DATA_IO_FAILED, &entry->flags); 223 set_bit(ENTRY_DATA_IO_FAILED, &entry->flags);
224 224
225 /* 225 /*
226 * Schedule the delayed work for reading the TX status 226 * Schedule the delayed work for reading the TX status
@@ -407,7 +407,7 @@ static void rt2x00usb_interrupt_rxdone(struct urb *urb)
407 struct queue_entry *entry = (struct queue_entry *)urb->context; 407 struct queue_entry *entry = (struct queue_entry *)urb->context;
408 struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev; 408 struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev;
409 409
410 if (!__test_and_clear_bit(ENTRY_OWNER_DEVICE_DATA, &entry->flags)) 410 if (!test_and_clear_bit(ENTRY_OWNER_DEVICE_DATA, &entry->flags))
411 return; 411 return;
412 412
413 /* 413 /*
@@ -421,7 +421,7 @@ static void rt2x00usb_interrupt_rxdone(struct urb *urb)
421 * a problem. 421 * a problem.
422 */ 422 */
423 if (urb->actual_length < entry->queue->desc_size || urb->status) 423 if (urb->actual_length < entry->queue->desc_size || urb->status)
424 __set_bit(ENTRY_DATA_IO_FAILED, &entry->flags); 424 set_bit(ENTRY_DATA_IO_FAILED, &entry->flags);
425 425
426 /* 426 /*
427 * Schedule the delayed work for reading the RX status 427 * Schedule the delayed work for reading the RX status