diff options
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00usb.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00usb.c | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00usb.c b/drivers/net/wireless/rt2x00/rt2x00usb.c index 6cc7aa418d87..aec6440d364a 100644 --- a/drivers/net/wireless/rt2x00/rt2x00usb.c +++ b/drivers/net/wireless/rt2x00/rt2x00usb.c | |||
@@ -213,6 +213,11 @@ static void rt2x00usb_interrupt_txdone(struct urb *urb) | |||
213 | return; | 213 | return; |
214 | 214 | ||
215 | /* | 215 | /* |
216 | * Report the frame as DMA done | ||
217 | */ | ||
218 | rt2x00lib_dmadone(entry); | ||
219 | |||
220 | /* | ||
216 | * Check if the frame was correctly uploaded | 221 | * Check if the frame was correctly uploaded |
217 | */ | 222 | */ |
218 | if (urb->status) | 223 | if (urb->status) |
@@ -283,13 +288,14 @@ void rt2x00usb_kill_tx_queue(struct data_queue *queue) | |||
283 | } | 288 | } |
284 | EXPORT_SYMBOL_GPL(rt2x00usb_kill_tx_queue); | 289 | EXPORT_SYMBOL_GPL(rt2x00usb_kill_tx_queue); |
285 | 290 | ||
286 | static void rt2x00usb_watchdog_reset_tx(struct data_queue *queue) | 291 | static void rt2x00usb_watchdog_tx_dma(struct data_queue *queue) |
287 | { | 292 | { |
288 | struct queue_entry *entry; | 293 | struct queue_entry *entry; |
289 | struct queue_entry_priv_usb *entry_priv; | 294 | struct queue_entry_priv_usb *entry_priv; |
290 | unsigned short threshold = queue->threshold; | 295 | unsigned short threshold = queue->threshold; |
291 | 296 | ||
292 | WARNING(queue->rt2x00dev, "TX queue %d timed out, invoke reset", queue->qid); | 297 | WARNING(queue->rt2x00dev, "TX queue %d DMA timed out," |
298 | " invoke forced forced reset", queue->qid); | ||
293 | 299 | ||
294 | /* | 300 | /* |
295 | * Temporarily disable the TX queue, this will force mac80211 | 301 | * Temporarily disable the TX queue, this will force mac80211 |
@@ -331,13 +337,23 @@ static void rt2x00usb_watchdog_reset_tx(struct data_queue *queue) | |||
331 | ieee80211_wake_queue(queue->rt2x00dev->hw, queue->qid); | 337 | ieee80211_wake_queue(queue->rt2x00dev->hw, queue->qid); |
332 | } | 338 | } |
333 | 339 | ||
340 | static void rt2x00usb_watchdog_tx_status(struct data_queue *queue) | ||
341 | { | ||
342 | WARNING(queue->rt2x00dev, "TX queue %d status timed out," | ||
343 | " invoke forced tx handler", queue->qid); | ||
344 | |||
345 | ieee80211_queue_work(queue->rt2x00dev->hw, &queue->rt2x00dev->txdone_work); | ||
346 | } | ||
347 | |||
334 | void rt2x00usb_watchdog(struct rt2x00_dev *rt2x00dev) | 348 | void rt2x00usb_watchdog(struct rt2x00_dev *rt2x00dev) |
335 | { | 349 | { |
336 | struct data_queue *queue; | 350 | struct data_queue *queue; |
337 | 351 | ||
338 | tx_queue_for_each(rt2x00dev, queue) { | 352 | tx_queue_for_each(rt2x00dev, queue) { |
353 | if (rt2x00queue_dma_timeout(queue)) | ||
354 | rt2x00usb_watchdog_tx_dma(queue); | ||
339 | if (rt2x00queue_timeout(queue)) | 355 | if (rt2x00queue_timeout(queue)) |
340 | rt2x00usb_watchdog_reset_tx(queue); | 356 | rt2x00usb_watchdog_tx_status(queue); |
341 | } | 357 | } |
342 | } | 358 | } |
343 | EXPORT_SYMBOL_GPL(rt2x00usb_watchdog); | 359 | EXPORT_SYMBOL_GPL(rt2x00usb_watchdog); |
@@ -383,6 +399,11 @@ static void rt2x00usb_interrupt_rxdone(struct urb *urb) | |||
383 | return; | 399 | return; |
384 | 400 | ||
385 | /* | 401 | /* |
402 | * Report the frame as DMA done | ||
403 | */ | ||
404 | rt2x00lib_dmadone(entry); | ||
405 | |||
406 | /* | ||
386 | * Check if the received data is simply too small | 407 | * Check if the received data is simply too small |
387 | * to be actually valid, or if the urb is signaling | 408 | * to be actually valid, or if the urb is signaling |
388 | * a problem. | 409 | * a problem. |