diff options
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2800usb.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2800usb.c | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c index 507559361d87..dbf501ca317f 100644 --- a/drivers/net/wireless/rt2x00/rt2800usb.c +++ b/drivers/net/wireless/rt2x00/rt2800usb.c | |||
@@ -464,6 +464,15 @@ static bool rt2800usb_txdone_entry_check(struct queue_entry *entry, u32 reg) | |||
464 | int wcid, ack, pid; | 464 | int wcid, ack, pid; |
465 | int tx_wcid, tx_ack, tx_pid; | 465 | int tx_wcid, tx_ack, tx_pid; |
466 | 466 | ||
467 | if (test_bit(ENTRY_OWNER_DEVICE_DATA, &entry->flags) || | ||
468 | !test_bit(ENTRY_DATA_STATUS_PENDING, &entry->flags)) { | ||
469 | WARNING(entry->queue->rt2x00dev, | ||
470 | "Data pending for entry %u in queue %u\n", | ||
471 | entry->entry_idx, entry->queue->qid); | ||
472 | cond_resched(); | ||
473 | return false; | ||
474 | } | ||
475 | |||
467 | wcid = rt2x00_get_field32(reg, TX_STA_FIFO_WCID); | 476 | wcid = rt2x00_get_field32(reg, TX_STA_FIFO_WCID); |
468 | ack = rt2x00_get_field32(reg, TX_STA_FIFO_TX_ACK_REQUIRED); | 477 | ack = rt2x00_get_field32(reg, TX_STA_FIFO_TX_ACK_REQUIRED); |
469 | pid = rt2x00_get_field32(reg, TX_STA_FIFO_PID_TYPE); | 478 | pid = rt2x00_get_field32(reg, TX_STA_FIFO_PID_TYPE); |
@@ -529,12 +538,11 @@ static void rt2800usb_txdone(struct rt2x00_dev *rt2x00dev) | |||
529 | entry = rt2x00queue_get_entry(queue, Q_INDEX_DONE); | 538 | entry = rt2x00queue_get_entry(queue, Q_INDEX_DONE); |
530 | if (rt2800usb_txdone_entry_check(entry, reg)) | 539 | if (rt2800usb_txdone_entry_check(entry, reg)) |
531 | break; | 540 | break; |
541 | entry = NULL; | ||
532 | } | 542 | } |
533 | 543 | ||
534 | if (!entry || rt2x00queue_empty(queue)) | 544 | if (entry) |
535 | break; | 545 | rt2800_txdone_entry(entry, reg); |
536 | |||
537 | rt2800_txdone_entry(entry, reg); | ||
538 | } | 546 | } |
539 | } | 547 | } |
540 | 548 | ||
@@ -558,8 +566,10 @@ static void rt2800usb_work_txdone(struct work_struct *work) | |||
558 | while (!rt2x00queue_empty(queue)) { | 566 | while (!rt2x00queue_empty(queue)) { |
559 | entry = rt2x00queue_get_entry(queue, Q_INDEX_DONE); | 567 | entry = rt2x00queue_get_entry(queue, Q_INDEX_DONE); |
560 | 568 | ||
561 | if (test_bit(ENTRY_OWNER_DEVICE_DATA, &entry->flags)) | 569 | if (test_bit(ENTRY_OWNER_DEVICE_DATA, &entry->flags) || |
570 | !test_bit(ENTRY_DATA_STATUS_PENDING, &entry->flags)) | ||
562 | break; | 571 | break; |
572 | |||
563 | if (test_bit(ENTRY_DATA_IO_FAILED, &entry->flags)) | 573 | if (test_bit(ENTRY_DATA_IO_FAILED, &entry->flags)) |
564 | rt2x00lib_txdone_noinfo(entry, TXDONE_FAILURE); | 574 | rt2x00lib_txdone_noinfo(entry, TXDONE_FAILURE); |
565 | else if (rt2x00queue_status_timeout(entry)) | 575 | else if (rt2x00queue_status_timeout(entry)) |
@@ -921,6 +931,8 @@ static struct usb_device_id rt2800usb_device_table[] = { | |||
921 | { USB_DEVICE(0x07d1, 0x3c16) }, | 931 | { USB_DEVICE(0x07d1, 0x3c16) }, |
922 | /* Draytek */ | 932 | /* Draytek */ |
923 | { USB_DEVICE(0x07fa, 0x7712) }, | 933 | { USB_DEVICE(0x07fa, 0x7712) }, |
934 | /* DVICO */ | ||
935 | { USB_DEVICE(0x0fe9, 0xb307) }, | ||
924 | /* Edimax */ | 936 | /* Edimax */ |
925 | { USB_DEVICE(0x7392, 0x7711) }, | 937 | { USB_DEVICE(0x7392, 0x7711) }, |
926 | { USB_DEVICE(0x7392, 0x7717) }, | 938 | { USB_DEVICE(0x7392, 0x7717) }, |