diff options
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00usb.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00usb.c | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00usb.c b/drivers/net/wireless/rt2x00/rt2x00usb.c index 52ed3f44c843..1d2eb461329f 100644 --- a/drivers/net/wireless/rt2x00/rt2x00usb.c +++ b/drivers/net/wireless/rt2x00/rt2x00usb.c | |||
@@ -232,21 +232,22 @@ static inline void rt2x00usb_kick_tx_entry(struct queue_entry *entry) | |||
232 | struct queue_entry_priv_usb *entry_priv = entry->priv_data; | 232 | struct queue_entry_priv_usb *entry_priv = entry->priv_data; |
233 | u32 length; | 233 | u32 length; |
234 | 234 | ||
235 | if (test_and_clear_bit(ENTRY_DATA_PENDING, &entry->flags)) { | 235 | if (!test_and_clear_bit(ENTRY_DATA_PENDING, &entry->flags)) |
236 | /* | 236 | return; |
237 | * USB devices cannot blindly pass the skb->len as the | 237 | |
238 | * length of the data to usb_fill_bulk_urb. Pass the skb | 238 | /* |
239 | * to the driver to determine what the length should be. | 239 | * USB devices cannot blindly pass the skb->len as the |
240 | */ | 240 | * length of the data to usb_fill_bulk_urb. Pass the skb |
241 | length = rt2x00dev->ops->lib->get_tx_data_len(entry); | 241 | * to the driver to determine what the length should be. |
242 | */ | ||
243 | length = rt2x00dev->ops->lib->get_tx_data_len(entry); | ||
242 | 244 | ||
243 | usb_fill_bulk_urb(entry_priv->urb, usb_dev, | 245 | usb_fill_bulk_urb(entry_priv->urb, usb_dev, |
244 | usb_sndbulkpipe(usb_dev, entry->queue->usb_endpoint), | 246 | usb_sndbulkpipe(usb_dev, entry->queue->usb_endpoint), |
245 | entry->skb->data, length, | 247 | entry->skb->data, length, |
246 | rt2x00usb_interrupt_txdone, entry); | 248 | rt2x00usb_interrupt_txdone, entry); |
247 | 249 | ||
248 | usb_submit_urb(entry_priv->urb, GFP_ATOMIC); | 250 | usb_submit_urb(entry_priv->urb, GFP_ATOMIC); |
249 | } | ||
250 | } | 251 | } |
251 | 252 | ||
252 | void rt2x00usb_kick_tx_queue(struct data_queue *queue) | 253 | void rt2x00usb_kick_tx_queue(struct data_queue *queue) |