diff options
author | Johannes Stezenbach <js@sig21.net> | 2010-12-27 09:04:29 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-01-04 14:35:13 -0500 |
commit | c4d63244218bf93d1f0cdf4389e0906df8f506c1 (patch) | |
tree | 9ff7b22cd2f3da5cf3cb575c61d17ed1b37966bc /drivers/net/wireless/rt2x00/rt2800pci.c | |
parent | 97e2c40269e168df986daf94af1c62e07d4fc599 (diff) |
rt2x00: simplify txstatus_fifo handling
Signed-off-by: Johannes Stezenbach <js@sig21.net>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2800pci.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2800pci.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c b/drivers/net/wireless/rt2x00/rt2800pci.c index baa1468a56a8..aa97971a38af 100644 --- a/drivers/net/wireless/rt2x00/rt2800pci.c +++ b/drivers/net/wireless/rt2x00/rt2800pci.c | |||
@@ -688,14 +688,7 @@ static void rt2800pci_txdone(struct rt2x00_dev *rt2x00dev) | |||
688 | u32 status; | 688 | u32 status; |
689 | u8 qid; | 689 | u8 qid; |
690 | 690 | ||
691 | while (!kfifo_is_empty(&rt2x00dev->txstatus_fifo)) { | 691 | while (kfifo_get(&rt2x00dev->txstatus_fifo, &status)) { |
692 | /* Now remove the tx status from the FIFO */ | ||
693 | if (kfifo_out(&rt2x00dev->txstatus_fifo, &status, | ||
694 | sizeof(status)) != sizeof(status)) { | ||
695 | WARN_ON(1); | ||
696 | break; | ||
697 | } | ||
698 | |||
699 | qid = rt2x00_get_field32(status, TX_STA_FIFO_PID_QUEUE); | 692 | qid = rt2x00_get_field32(status, TX_STA_FIFO_PID_QUEUE); |
700 | if (qid >= QID_RX) { | 693 | if (qid >= QID_RX) { |
701 | /* | 694 | /* |
@@ -803,14 +796,7 @@ static void rt2800pci_txstatus_interrupt(struct rt2x00_dev *rt2x00dev) | |||
803 | if (!rt2x00_get_field32(status, TX_STA_FIFO_VALID)) | 796 | if (!rt2x00_get_field32(status, TX_STA_FIFO_VALID)) |
804 | break; | 797 | break; |
805 | 798 | ||
806 | if (kfifo_is_full(&rt2x00dev->txstatus_fifo)) { | 799 | if (!kfifo_put(&rt2x00dev->txstatus_fifo, &status)) { |
807 | WARNING(rt2x00dev, "TX status FIFO overrun," | ||
808 | " drop tx status report.\n"); | ||
809 | break; | ||
810 | } | ||
811 | |||
812 | if (kfifo_in(&rt2x00dev->txstatus_fifo, &status, | ||
813 | sizeof(status)) != sizeof(status)) { | ||
814 | WARNING(rt2x00dev, "TX status FIFO overrun," | 800 | WARNING(rt2x00dev, "TX status FIFO overrun," |
815 | "drop tx status report.\n"); | 801 | "drop tx status report.\n"); |
816 | break; | 802 | break; |