diff options
Diffstat (limited to 'drivers/net/wireless/rt2x00')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2400pci.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2500pci.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2800pci.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00pci.c | 7 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00pci.h | 5 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt61pci.c | 6 |
6 files changed, 25 insertions, 11 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2400pci.c b/drivers/net/wireless/rt2x00/rt2400pci.c index 329f3283697b..137a24e520da 100644 --- a/drivers/net/wireless/rt2x00/rt2400pci.c +++ b/drivers/net/wireless/rt2x00/rt2400pci.c | |||
@@ -1368,8 +1368,10 @@ static void rt2400pci_tbtt_tasklet(unsigned long data) | |||
1368 | static void rt2400pci_rxdone_tasklet(unsigned long data) | 1368 | static void rt2400pci_rxdone_tasklet(unsigned long data) |
1369 | { | 1369 | { |
1370 | struct rt2x00_dev *rt2x00dev = (struct rt2x00_dev *)data; | 1370 | struct rt2x00_dev *rt2x00dev = (struct rt2x00_dev *)data; |
1371 | rt2x00pci_rxdone(rt2x00dev); | 1371 | if (rt2x00pci_rxdone(rt2x00dev)) |
1372 | rt2400pci_enable_interrupt(rt2x00dev, CSR8_RXDONE); | 1372 | tasklet_schedule(&rt2x00dev->rxdone_tasklet); |
1373 | else | ||
1374 | rt2400pci_enable_interrupt(rt2x00dev, CSR8_RXDONE); | ||
1373 | } | 1375 | } |
1374 | 1376 | ||
1375 | static irqreturn_t rt2400pci_interrupt(int irq, void *dev_instance) | 1377 | static irqreturn_t rt2400pci_interrupt(int irq, void *dev_instance) |
diff --git a/drivers/net/wireless/rt2x00/rt2500pci.c b/drivers/net/wireless/rt2x00/rt2500pci.c index 58277878889e..198fc0a0d77c 100644 --- a/drivers/net/wireless/rt2x00/rt2500pci.c +++ b/drivers/net/wireless/rt2x00/rt2500pci.c | |||
@@ -1500,8 +1500,10 @@ static void rt2500pci_tbtt_tasklet(unsigned long data) | |||
1500 | static void rt2500pci_rxdone_tasklet(unsigned long data) | 1500 | static void rt2500pci_rxdone_tasklet(unsigned long data) |
1501 | { | 1501 | { |
1502 | struct rt2x00_dev *rt2x00dev = (struct rt2x00_dev *)data; | 1502 | struct rt2x00_dev *rt2x00dev = (struct rt2x00_dev *)data; |
1503 | rt2x00pci_rxdone(rt2x00dev); | 1503 | if (rt2x00pci_rxdone(rt2x00dev)) |
1504 | rt2500pci_enable_interrupt(rt2x00dev, CSR8_RXDONE); | 1504 | tasklet_schedule(&rt2x00dev->rxdone_tasklet); |
1505 | else | ||
1506 | rt2500pci_enable_interrupt(rt2x00dev, CSR8_RXDONE); | ||
1505 | } | 1507 | } |
1506 | 1508 | ||
1507 | static irqreturn_t rt2500pci_interrupt(int irq, void *dev_instance) | 1509 | static irqreturn_t rt2500pci_interrupt(int irq, void *dev_instance) |
diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c b/drivers/net/wireless/rt2x00/rt2800pci.c index 808073aa9dcc..4672dc99fe46 100644 --- a/drivers/net/wireless/rt2x00/rt2800pci.c +++ b/drivers/net/wireless/rt2x00/rt2800pci.c | |||
@@ -806,8 +806,10 @@ static void rt2800pci_tbtt_tasklet(unsigned long data) | |||
806 | static void rt2800pci_rxdone_tasklet(unsigned long data) | 806 | static void rt2800pci_rxdone_tasklet(unsigned long data) |
807 | { | 807 | { |
808 | struct rt2x00_dev *rt2x00dev = (struct rt2x00_dev *)data; | 808 | struct rt2x00_dev *rt2x00dev = (struct rt2x00_dev *)data; |
809 | rt2x00pci_rxdone(rt2x00dev); | 809 | if (rt2x00pci_rxdone(rt2x00dev)) |
810 | rt2800pci_enable_interrupt(rt2x00dev, INT_MASK_CSR_RX_DONE); | 810 | tasklet_schedule(&rt2x00dev->rxdone_tasklet); |
811 | else | ||
812 | rt2800pci_enable_interrupt(rt2x00dev, INT_MASK_CSR_RX_DONE); | ||
811 | } | 813 | } |
812 | 814 | ||
813 | static void rt2800pci_autowake_tasklet(unsigned long data) | 815 | static void rt2800pci_autowake_tasklet(unsigned long data) |
diff --git a/drivers/net/wireless/rt2x00/rt2x00pci.c b/drivers/net/wireless/rt2x00/rt2x00pci.c index 4dd82b0b0520..9649bd0cd718 100644 --- a/drivers/net/wireless/rt2x00/rt2x00pci.c +++ b/drivers/net/wireless/rt2x00/rt2x00pci.c | |||
@@ -60,14 +60,15 @@ int rt2x00pci_regbusy_read(struct rt2x00_dev *rt2x00dev, | |||
60 | } | 60 | } |
61 | EXPORT_SYMBOL_GPL(rt2x00pci_regbusy_read); | 61 | EXPORT_SYMBOL_GPL(rt2x00pci_regbusy_read); |
62 | 62 | ||
63 | void rt2x00pci_rxdone(struct rt2x00_dev *rt2x00dev) | 63 | bool rt2x00pci_rxdone(struct rt2x00_dev *rt2x00dev) |
64 | { | 64 | { |
65 | struct data_queue *queue = rt2x00dev->rx; | 65 | struct data_queue *queue = rt2x00dev->rx; |
66 | struct queue_entry *entry; | 66 | struct queue_entry *entry; |
67 | struct queue_entry_priv_pci *entry_priv; | 67 | struct queue_entry_priv_pci *entry_priv; |
68 | struct skb_frame_desc *skbdesc; | 68 | struct skb_frame_desc *skbdesc; |
69 | int max_rx = 16; | ||
69 | 70 | ||
70 | while (1) { | 71 | while (--max_rx) { |
71 | entry = rt2x00queue_get_entry(queue, Q_INDEX); | 72 | entry = rt2x00queue_get_entry(queue, Q_INDEX); |
72 | entry_priv = entry->priv_data; | 73 | entry_priv = entry->priv_data; |
73 | 74 | ||
@@ -93,6 +94,8 @@ void rt2x00pci_rxdone(struct rt2x00_dev *rt2x00dev) | |||
93 | */ | 94 | */ |
94 | rt2x00lib_rxdone(entry); | 95 | rt2x00lib_rxdone(entry); |
95 | } | 96 | } |
97 | |||
98 | return !max_rx; | ||
96 | } | 99 | } |
97 | EXPORT_SYMBOL_GPL(rt2x00pci_rxdone); | 100 | EXPORT_SYMBOL_GPL(rt2x00pci_rxdone); |
98 | 101 | ||
diff --git a/drivers/net/wireless/rt2x00/rt2x00pci.h b/drivers/net/wireless/rt2x00/rt2x00pci.h index 746ce8fe8cf4..07961b8b369a 100644 --- a/drivers/net/wireless/rt2x00/rt2x00pci.h +++ b/drivers/net/wireless/rt2x00/rt2x00pci.h | |||
@@ -101,8 +101,11 @@ struct queue_entry_priv_pci { | |||
101 | /** | 101 | /** |
102 | * rt2x00pci_rxdone - Handle RX done events | 102 | * rt2x00pci_rxdone - Handle RX done events |
103 | * @rt2x00dev: Device pointer, see &struct rt2x00_dev. | 103 | * @rt2x00dev: Device pointer, see &struct rt2x00_dev. |
104 | * | ||
105 | * Returns true if there are still rx frames pending and false if all | ||
106 | * pending rx frames were processed. | ||
104 | */ | 107 | */ |
105 | void rt2x00pci_rxdone(struct rt2x00_dev *rt2x00dev); | 108 | bool rt2x00pci_rxdone(struct rt2x00_dev *rt2x00dev); |
106 | 109 | ||
107 | /* | 110 | /* |
108 | * Device initialization handlers. | 111 | * Device initialization handlers. |
diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c index 77e8113b91e1..8ee1514a7943 100644 --- a/drivers/net/wireless/rt2x00/rt61pci.c +++ b/drivers/net/wireless/rt2x00/rt61pci.c | |||
@@ -2313,8 +2313,10 @@ static void rt61pci_tbtt_tasklet(unsigned long data) | |||
2313 | static void rt61pci_rxdone_tasklet(unsigned long data) | 2313 | static void rt61pci_rxdone_tasklet(unsigned long data) |
2314 | { | 2314 | { |
2315 | struct rt2x00_dev *rt2x00dev = (struct rt2x00_dev *)data; | 2315 | struct rt2x00_dev *rt2x00dev = (struct rt2x00_dev *)data; |
2316 | rt2x00pci_rxdone(rt2x00dev); | 2316 | if (rt2x00pci_rxdone(rt2x00dev)) |
2317 | rt61pci_enable_interrupt(rt2x00dev, INT_MASK_CSR_RXDONE); | 2317 | rt2x00pci_rxdone(rt2x00dev); |
2318 | else | ||
2319 | rt61pci_enable_interrupt(rt2x00dev, INT_MASK_CSR_RXDONE); | ||
2318 | } | 2320 | } |
2319 | 2321 | ||
2320 | static void rt61pci_autowake_tasklet(unsigned long data) | 2322 | static void rt61pci_autowake_tasklet(unsigned long data) |