aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2x00usb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00usb.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00usb.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00usb.c b/drivers/net/wireless/rt2x00/rt2x00usb.c
index 34b8a887831b..9957579248c4 100644
--- a/drivers/net/wireless/rt2x00/rt2x00usb.c
+++ b/drivers/net/wireless/rt2x00/rt2x00usb.c
@@ -458,13 +458,14 @@ static bool rt2x00usb_flush_entry(struct queue_entry *entry, void* data)
458 return false; 458 return false;
459} 459}
460 460
461void rt2x00usb_flush_queue(struct data_queue *queue) 461void rt2x00usb_flush_queue(struct data_queue *queue, bool drop)
462{ 462{
463 struct work_struct *completion; 463 struct work_struct *completion;
464 unsigned int i; 464 unsigned int i;
465 465
466 rt2x00queue_for_each_entry(queue, Q_INDEX_DONE, Q_INDEX, NULL, 466 if (drop)
467 rt2x00usb_flush_entry); 467 rt2x00queue_for_each_entry(queue, Q_INDEX_DONE, Q_INDEX, NULL,
468 rt2x00usb_flush_entry);
468 469
469 /* 470 /*
470 * Obtain the queue completion handler 471 * Obtain the queue completion handler
@@ -483,7 +484,7 @@ void rt2x00usb_flush_queue(struct data_queue *queue)
483 return; 484 return;
484 } 485 }
485 486
486 for (i = 0; i < 20; i++) { 487 for (i = 0; i < 10; i++) {
487 /* 488 /*
488 * Check if the driver is already done, otherwise we 489 * Check if the driver is already done, otherwise we
489 * have to sleep a little while to give the driver/hw 490 * have to sleep a little while to give the driver/hw