diff options
author | Michael Buesch <mb@bu3sch.de> | 2009-09-04 16:56:19 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-09-08 16:31:07 -0400 |
commit | 77ca07ffe1797a0f2f41aa4997c9a5ae433a0be8 (patch) | |
tree | 890f5d0b61e8ea7b91a2996edf4b1f331f79269f /drivers | |
parent | 637dae3f637eb7dab447e74362e0dfeded775c7c (diff) |
b43: Remove PIO RX workqueue
This removes the PIO RX work. It's not needed anymore, because
we can sleep in the threaded interrupt handler.
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/b43/main.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/b43/pio.c | 36 | ||||
-rw-r--r-- | drivers/net/wireless/b43/pio.h | 4 |
3 files changed, 7 insertions, 34 deletions
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index fca2fe947d7d..23de3db4f6de 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c | |||
@@ -3883,7 +3883,6 @@ redo: | |||
3883 | while (skb_queue_len(&wl->tx_queue)) | 3883 | while (skb_queue_len(&wl->tx_queue)) |
3884 | dev_kfree_skb(skb_dequeue(&wl->tx_queue)); | 3884 | dev_kfree_skb(skb_dequeue(&wl->tx_queue)); |
3885 | 3885 | ||
3886 | b43_pio_stop(dev); | ||
3887 | b43_mac_suspend(dev); | 3886 | b43_mac_suspend(dev); |
3888 | free_irq(dev->dev->irq, dev); | 3887 | free_irq(dev->dev->irq, dev); |
3889 | b43dbg(wl, "Wireless interface stopped\n"); | 3888 | b43dbg(wl, "Wireless interface stopped\n"); |
diff --git a/drivers/net/wireless/b43/pio.c b/drivers/net/wireless/b43/pio.c index 4635baa9b998..3498b68385e7 100644 --- a/drivers/net/wireless/b43/pio.c +++ b/drivers/net/wireless/b43/pio.c | |||
@@ -32,9 +32,6 @@ | |||
32 | #include <linux/delay.h> | 32 | #include <linux/delay.h> |
33 | 33 | ||
34 | 34 | ||
35 | static void b43_pio_rx_work(struct work_struct *work); | ||
36 | |||
37 | |||
38 | static u16 generate_cookie(struct b43_pio_txqueue *q, | 35 | static u16 generate_cookie(struct b43_pio_txqueue *q, |
39 | struct b43_pio_txpacket *pack) | 36 | struct b43_pio_txpacket *pack) |
40 | { | 37 | { |
@@ -182,7 +179,6 @@ static struct b43_pio_rxqueue *b43_setup_pioqueue_rx(struct b43_wldev *dev, | |||
182 | q->rev = dev->dev->id.revision; | 179 | q->rev = dev->dev->id.revision; |
183 | q->mmio_base = index_to_pioqueue_base(dev, index) + | 180 | q->mmio_base = index_to_pioqueue_base(dev, index) + |
184 | pio_rxqueue_offset(dev); | 181 | pio_rxqueue_offset(dev); |
185 | INIT_WORK(&q->rx_work, b43_pio_rx_work); | ||
186 | 182 | ||
187 | /* Enable Direct FIFO RX (PIO) on the engine. */ | 183 | /* Enable Direct FIFO RX (PIO) on the engine. */ |
188 | b43_dma_direct_fifo_rx(dev, index, 1); | 184 | b43_dma_direct_fifo_rx(dev, index, 1); |
@@ -247,13 +243,6 @@ void b43_pio_free(struct b43_wldev *dev) | |||
247 | destroy_queue_tx(pio, tx_queue_AC_BK); | 243 | destroy_queue_tx(pio, tx_queue_AC_BK); |
248 | } | 244 | } |
249 | 245 | ||
250 | void b43_pio_stop(struct b43_wldev *dev) | ||
251 | { | ||
252 | if (!b43_using_pio_transfers(dev)) | ||
253 | return; | ||
254 | cancel_work_sync(&dev->pio.rx_queue->rx_work); | ||
255 | } | ||
256 | |||
257 | int b43_pio_init(struct b43_wldev *dev) | 246 | int b43_pio_init(struct b43_wldev *dev) |
258 | { | 247 | { |
259 | struct b43_pio *pio = &dev->pio; | 248 | struct b43_pio *pio = &dev->pio; |
@@ -745,30 +734,19 @@ rx_error: | |||
745 | return 1; | 734 | return 1; |
746 | } | 735 | } |
747 | 736 | ||
748 | /* RX workqueue. We can sleep, yay! */ | 737 | void b43_pio_rx(struct b43_pio_rxqueue *q) |
749 | static void b43_pio_rx_work(struct work_struct *work) | ||
750 | { | 738 | { |
751 | struct b43_pio_rxqueue *q = container_of(work, struct b43_pio_rxqueue, | 739 | unsigned int count = 0; |
752 | rx_work); | ||
753 | unsigned int budget = 50; | ||
754 | bool stop; | 740 | bool stop; |
755 | 741 | ||
756 | do { | 742 | while (1) { |
757 | mutex_lock(&q->dev->wl->mutex); | ||
758 | stop = (pio_rx_frame(q) == 0); | 743 | stop = (pio_rx_frame(q) == 0); |
759 | mutex_unlock(&q->dev->wl->mutex); | ||
760 | cond_resched(); | ||
761 | if (stop) | 744 | if (stop) |
762 | break; | 745 | break; |
763 | } while (--budget); | 746 | cond_resched(); |
764 | } | 747 | if (WARN_ON_ONCE(++count > 10000)) |
765 | 748 | break; | |
766 | /* Called with IRQs disabled. */ | 749 | } |
767 | void b43_pio_rx(struct b43_pio_rxqueue *q) | ||
768 | { | ||
769 | /* Due to latency issues we must run the RX path in | ||
770 | * a workqueue to be able to schedule between packets. */ | ||
771 | ieee80211_queue_work(q->dev->wl->hw, &q->rx_work); | ||
772 | } | 750 | } |
773 | 751 | ||
774 | static void b43_pio_tx_suspend_queue(struct b43_pio_txqueue *q) | 752 | static void b43_pio_tx_suspend_queue(struct b43_pio_txqueue *q) |
diff --git a/drivers/net/wireless/b43/pio.h b/drivers/net/wireless/b43/pio.h index a976bbdd6f44..7dd649c9ddad 100644 --- a/drivers/net/wireless/b43/pio.h +++ b/drivers/net/wireless/b43/pio.h | |||
@@ -104,9 +104,6 @@ struct b43_pio_rxqueue { | |||
104 | struct b43_wldev *dev; | 104 | struct b43_wldev *dev; |
105 | u16 mmio_base; | 105 | u16 mmio_base; |
106 | 106 | ||
107 | /* Work to reduce latency issues on RX. */ | ||
108 | struct work_struct rx_work; | ||
109 | |||
110 | /* Shortcut to the 802.11 core revision. This is to | 107 | /* Shortcut to the 802.11 core revision. This is to |
111 | * avoid horrible pointer dereferencing in the fastpaths. */ | 108 | * avoid horrible pointer dereferencing in the fastpaths. */ |
112 | u8 rev; | 109 | u8 rev; |
@@ -160,7 +157,6 @@ static inline void b43_piorx_write32(struct b43_pio_rxqueue *q, | |||
160 | 157 | ||
161 | 158 | ||
162 | int b43_pio_init(struct b43_wldev *dev); | 159 | int b43_pio_init(struct b43_wldev *dev); |
163 | void b43_pio_stop(struct b43_wldev *dev); | ||
164 | void b43_pio_free(struct b43_wldev *dev); | 160 | void b43_pio_free(struct b43_wldev *dev); |
165 | 161 | ||
166 | int b43_pio_tx(struct b43_wldev *dev, struct sk_buff *skb); | 162 | int b43_pio_tx(struct b43_wldev *dev, struct sk_buff *skb); |