diff options
| -rw-r--r-- | drivers/net/wireless/rt2x00/rt2800usb.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c index 939563162fb3..2cb25ea13c52 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); |
| @@ -558,8 +567,10 @@ static void rt2800usb_work_txdone(struct work_struct *work) | |||
| 558 | while (!rt2x00queue_empty(queue)) { | 567 | while (!rt2x00queue_empty(queue)) { |
| 559 | entry = rt2x00queue_get_entry(queue, Q_INDEX_DONE); | 568 | entry = rt2x00queue_get_entry(queue, Q_INDEX_DONE); |
| 560 | 569 | ||
| 561 | if (test_bit(ENTRY_OWNER_DEVICE_DATA, &entry->flags)) | 570 | if (test_bit(ENTRY_OWNER_DEVICE_DATA, &entry->flags) || |
| 571 | !test_bit(ENTRY_DATA_STATUS_PENDING, &entry->flags)) | ||
| 562 | break; | 572 | break; |
| 573 | |||
| 563 | if (test_bit(ENTRY_DATA_IO_FAILED, &entry->flags)) | 574 | if (test_bit(ENTRY_DATA_IO_FAILED, &entry->flags)) |
| 564 | rt2x00lib_txdone_noinfo(entry, TXDONE_FAILURE); | 575 | rt2x00lib_txdone_noinfo(entry, TXDONE_FAILURE); |
| 565 | else if (rt2x00queue_status_timeout(entry)) | 576 | else if (rt2x00queue_status_timeout(entry)) |
