aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2x00pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00pci.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00pci.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00pci.c b/drivers/net/wireless/rt2x00/rt2x00pci.c
index 62449da577e5..e33bd0f150c5 100644
--- a/drivers/net/wireless/rt2x00/rt2x00pci.c
+++ b/drivers/net/wireless/rt2x00/rt2x00pci.c
@@ -36,20 +36,17 @@
36 */ 36 */
37int rt2x00pci_write_tx_data(struct queue_entry *entry) 37int rt2x00pci_write_tx_data(struct queue_entry *entry)
38{ 38{
39 struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev;
39 struct queue_entry_priv_pci *entry_priv = entry->priv_data; 40 struct queue_entry_priv_pci *entry_priv = entry->priv_data;
40 struct skb_frame_desc *skbdesc; 41 struct skb_frame_desc *skbdesc;
41 u32 word;
42
43 rt2x00_desc_read(entry_priv->desc, 0, &word);
44 42
45 /* 43 /*
46 * This should not happen, we already checked the entry 44 * This should not happen, we already checked the entry
47 * was ours. When the hardware disagrees there has been 45 * was ours. When the hardware disagrees there has been
48 * a queue corruption! 46 * a queue corruption!
49 */ 47 */
50 if (unlikely(rt2x00_get_field32(word, TXD_ENTRY_OWNER_NIC) || 48 if (unlikely(rt2x00dev->ops->lib->get_entry_state(entry))) {
51 rt2x00_get_field32(word, TXD_ENTRY_VALID))) { 49 ERROR(rt2x00dev,
52 ERROR(entry->queue->rt2x00dev,
53 "Corrupt queue %d, accessing entry which is not ours.\n" 50 "Corrupt queue %d, accessing entry which is not ours.\n"
54 "Please file bug report to %s.\n", 51 "Please file bug report to %s.\n",
55 entry->queue->qid, DRV_PROJECT); 52 entry->queue->qid, DRV_PROJECT);
@@ -76,14 +73,12 @@ void rt2x00pci_rxdone(struct rt2x00_dev *rt2x00dev)
76 struct queue_entry *entry; 73 struct queue_entry *entry;
77 struct queue_entry_priv_pci *entry_priv; 74 struct queue_entry_priv_pci *entry_priv;
78 struct skb_frame_desc *skbdesc; 75 struct skb_frame_desc *skbdesc;
79 u32 word;
80 76
81 while (1) { 77 while (1) {
82 entry = rt2x00queue_get_entry(queue, Q_INDEX); 78 entry = rt2x00queue_get_entry(queue, Q_INDEX);
83 entry_priv = entry->priv_data; 79 entry_priv = entry->priv_data;
84 rt2x00_desc_read(entry_priv->desc, 0, &word);
85 80
86 if (rt2x00_get_field32(word, RXD_ENTRY_OWNER_NIC)) 81 if (rt2x00dev->ops->lib->get_entry_state(entry))
87 break; 82 break;
88 83
89 /* 84 /*