Commit a1d1eabc authored by Ivo van Doorn's avatar Ivo van Doorn Committed by John W. Linville

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: default avatarIvo van Doorn <IvDoorn@gmail.com>
Acked-by: default avatarHelmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 1550c8ef
...@@ -208,7 +208,7 @@ static void rt2x00usb_interrupt_txdone(struct urb *urb) ...@@ -208,7 +208,7 @@ static void rt2x00usb_interrupt_txdone(struct urb *urb)
struct queue_entry *entry = (struct queue_entry *)urb->context; struct queue_entry *entry = (struct queue_entry *)urb->context;
struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev; struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev;
if (!__test_and_clear_bit(ENTRY_OWNER_DEVICE_DATA, &entry->flags)) if (!test_and_clear_bit(ENTRY_OWNER_DEVICE_DATA, &entry->flags))
return; return;
/* /*
...@@ -220,7 +220,7 @@ static void rt2x00usb_interrupt_txdone(struct urb *urb) ...@@ -220,7 +220,7 @@ static void rt2x00usb_interrupt_txdone(struct urb *urb)
* Check if the frame was correctly uploaded * Check if the frame was correctly uploaded
*/ */
if (urb->status) if (urb->status)
__set_bit(ENTRY_DATA_IO_FAILED, &entry->flags); set_bit(ENTRY_DATA_IO_FAILED, &entry->flags);
/* /*
* Schedule the delayed work for reading the TX status * Schedule the delayed work for reading the TX status
...@@ -407,7 +407,7 @@ static void rt2x00usb_interrupt_rxdone(struct urb *urb) ...@@ -407,7 +407,7 @@ static void rt2x00usb_interrupt_rxdone(struct urb *urb)
struct queue_entry *entry = (struct queue_entry *)urb->context; struct queue_entry *entry = (struct queue_entry *)urb->context;
struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev; struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev;
if (!__test_and_clear_bit(ENTRY_OWNER_DEVICE_DATA, &entry->flags)) if (!test_and_clear_bit(ENTRY_OWNER_DEVICE_DATA, &entry->flags))
return; return;
/* /*
...@@ -421,7 +421,7 @@ static void rt2x00usb_interrupt_rxdone(struct urb *urb) ...@@ -421,7 +421,7 @@ static void rt2x00usb_interrupt_rxdone(struct urb *urb)
* a problem. * a problem.
*/ */
if (urb->actual_length < entry->queue->desc_size || urb->status) if (urb->actual_length < entry->queue->desc_size || urb->status)
__set_bit(ENTRY_DATA_IO_FAILED, &entry->flags); set_bit(ENTRY_DATA_IO_FAILED, &entry->flags);
/* /*
* Schedule the delayed work for reading the RX status * Schedule the delayed work for reading the RX status
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment