diff options
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/b43/Kconfig | 48 | ||||
-rw-r--r-- | drivers/net/wireless/b43/Makefile | 9 | ||||
-rw-r--r-- | drivers/net/wireless/b43/b43.h | 45 | ||||
-rw-r--r-- | drivers/net/wireless/b43/debugfs.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/b43/dma.c | 19 | ||||
-rw-r--r-- | drivers/net/wireless/b43/dma.h | 50 | ||||
-rw-r--r-- | drivers/net/wireless/b43/main.c | 84 | ||||
-rw-r--r-- | drivers/net/wireless/b43/xmit.c | 17 |
8 files changed, 21 insertions, 252 deletions
diff --git a/drivers/net/wireless/b43/Kconfig b/drivers/net/wireless/b43/Kconfig index fdbc351ac333..8aa5e3458dcd 100644 --- a/drivers/net/wireless/b43/Kconfig +++ b/drivers/net/wireless/b43/Kconfig | |||
@@ -83,51 +83,3 @@ config B43_DEBUG | |||
83 | 83 | ||
84 | Say Y, if you want to find out why the driver does not | 84 | Say Y, if you want to find out why the driver does not |
85 | work for you. | 85 | work for you. |
86 | |||
87 | config B43_DMA | ||
88 | bool | ||
89 | depends on B43 | ||
90 | config B43_PIO | ||
91 | bool | ||
92 | depends on B43 | ||
93 | |||
94 | choice | ||
95 | prompt "Broadcom 43xx data transfer mode" | ||
96 | depends on B43 | ||
97 | default B43_DMA_AND_PIO_MODE | ||
98 | |||
99 | config B43_DMA_AND_PIO_MODE | ||
100 | bool "DMA + PIO" | ||
101 | select B43_DMA | ||
102 | select B43_PIO | ||
103 | ---help--- | ||
104 | Include both, Direct Memory Access (DMA) and Programmed I/O (PIO) | ||
105 | data transfer modes. | ||
106 | The actually used mode is selectable through the module | ||
107 | parameter "pio". If the module parameter is pio=0, DMA is used. | ||
108 | Otherwise PIO is used. DMA is default. | ||
109 | |||
110 | If unsure, choose this option. | ||
111 | |||
112 | config B43_DMA_MODE | ||
113 | bool "DMA (Direct Memory Access) only" | ||
114 | select B43_DMA | ||
115 | ---help--- | ||
116 | Only include Direct Memory Access (DMA). | ||
117 | This reduces the size of the driver module, by omitting the PIO code. | ||
118 | |||
119 | config B43_PIO_MODE | ||
120 | bool "PIO (Programmed I/O) only" | ||
121 | select B43_PIO | ||
122 | ---help--- | ||
123 | Only include Programmed I/O (PIO). | ||
124 | This reduces the size of the driver module, by omitting the DMA code. | ||
125 | Please note that PIO transfers are slow (compared to DMA). | ||
126 | |||
127 | Also note that not all devices of the 43xx series support PIO. | ||
128 | The 4306 (Apple Airport Extreme and others) supports PIO, while | ||
129 | the 4318 is known to _not_ support PIO. | ||
130 | |||
131 | Only use PIO, if DMA does not work for you. | ||
132 | |||
133 | endchoice | ||
diff --git a/drivers/net/wireless/b43/Makefile b/drivers/net/wireless/b43/Makefile index dc270474b33c..1e11ca8022a9 100644 --- a/drivers/net/wireless/b43/Makefile +++ b/drivers/net/wireless/b43/Makefile | |||
@@ -1,4 +1,3 @@ | |||
1 | # b43 core | ||
2 | b43-y += main.o | 1 | b43-y += main.o |
3 | b43-y += tables.o | 2 | b43-y += tables.o |
4 | b43-y += phy.o | 3 | b43-y += phy.o |
@@ -6,16 +5,10 @@ b43-y += sysfs.o | |||
6 | b43-y += xmit.o | 5 | b43-y += xmit.o |
7 | b43-y += lo.o | 6 | b43-y += lo.o |
8 | b43-y += wa.o | 7 | b43-y += wa.o |
9 | # b43 RFKILL button support | 8 | b43-y += dma.o |
10 | b43-$(CONFIG_B43_RFKILL) += rfkill.o | 9 | b43-$(CONFIG_B43_RFKILL) += rfkill.o |
11 | # b43 LED support | ||
12 | b43-$(CONFIG_B43_LEDS) += leds.o | 10 | b43-$(CONFIG_B43_LEDS) += leds.o |
13 | # b43 PCMCIA support | ||
14 | b43-$(CONFIG_B43_PCMCIA) += pcmcia.o | 11 | b43-$(CONFIG_B43_PCMCIA) += pcmcia.o |
15 | # b43 debugging | ||
16 | b43-$(CONFIG_B43_DEBUG) += debugfs.o | 12 | b43-$(CONFIG_B43_DEBUG) += debugfs.o |
17 | # b43 DMA and PIO | ||
18 | b43-$(CONFIG_B43_DMA) += dma.o | ||
19 | b43-$(CONFIG_B43_PIO) += pio.o | ||
20 | 13 | ||
21 | obj-$(CONFIG_B43) += b43.o | 14 | obj-$(CONFIG_B43) += b43.o |
diff --git a/drivers/net/wireless/b43/b43.h b/drivers/net/wireless/b43/b43.h index bcaa60924381..104d0b2ba02e 100644 --- a/drivers/net/wireless/b43/b43.h +++ b/drivers/net/wireless/b43/b43.h | |||
@@ -68,11 +68,6 @@ | |||
68 | #define B43_MMIO_DMA64_BASE3 0x2C0 | 68 | #define B43_MMIO_DMA64_BASE3 0x2C0 |
69 | #define B43_MMIO_DMA64_BASE4 0x300 | 69 | #define B43_MMIO_DMA64_BASE4 0x300 |
70 | #define B43_MMIO_DMA64_BASE5 0x340 | 70 | #define B43_MMIO_DMA64_BASE5 0x340 |
71 | /* PIO */ | ||
72 | #define B43_MMIO_PIO1_BASE 0x300 | ||
73 | #define B43_MMIO_PIO2_BASE 0x310 | ||
74 | #define B43_MMIO_PIO3_BASE 0x320 | ||
75 | #define B43_MMIO_PIO4_BASE 0x330 | ||
76 | 71 | ||
77 | #define B43_MMIO_PHY_VER 0x3E0 | 72 | #define B43_MMIO_PHY_VER 0x3E0 |
78 | #define B43_MMIO_PHY_RADIO 0x3E2 | 73 | #define B43_MMIO_PHY_RADIO 0x3E2 |
@@ -579,14 +574,6 @@ struct b43_dma { | |||
579 | struct b43_dmaring *rx_ring3; /* only available on core.rev < 5 */ | 574 | struct b43_dmaring *rx_ring3; /* only available on core.rev < 5 */ |
580 | }; | 575 | }; |
581 | 576 | ||
582 | /* Data structures for PIO transmission, per 80211 core. */ | ||
583 | struct b43_pio { | ||
584 | struct b43_pioqueue *queue0; | ||
585 | struct b43_pioqueue *queue1; | ||
586 | struct b43_pioqueue *queue2; | ||
587 | struct b43_pioqueue *queue3; | ||
588 | }; | ||
589 | |||
590 | /* Context information for a noise calculation (Link Quality). */ | 577 | /* Context information for a noise calculation (Link Quality). */ |
591 | struct b43_noise_calculation { | 578 | struct b43_noise_calculation { |
592 | u8 channel_at_start; | 579 | u8 channel_at_start; |
@@ -705,7 +692,6 @@ struct b43_wldev { | |||
705 | /* Saved init status for handling suspend. */ | 692 | /* Saved init status for handling suspend. */ |
706 | int suspend_init_status; | 693 | int suspend_init_status; |
707 | 694 | ||
708 | bool __using_pio; /* Internal, use b43_using_pio(). */ | ||
709 | bool bad_frames_preempt; /* Use "Bad Frames Preemption" (default off) */ | 695 | bool bad_frames_preempt; /* Use "Bad Frames Preemption" (default off) */ |
710 | bool reg124_set_0x4; /* Some variable to keep track of IRQ stuff. */ | 696 | bool reg124_set_0x4; /* Some variable to keep track of IRQ stuff. */ |
711 | bool short_preamble; /* TRUE, if short preamble is enabled. */ | 697 | bool short_preamble; /* TRUE, if short preamble is enabled. */ |
@@ -714,12 +700,9 @@ struct b43_wldev { | |||
714 | 700 | ||
715 | /* PHY/Radio device. */ | 701 | /* PHY/Radio device. */ |
716 | struct b43_phy phy; | 702 | struct b43_phy phy; |
717 | union { | 703 | |
718 | /* DMA engines. */ | 704 | /* DMA engines. */ |
719 | struct b43_dma dma; | 705 | struct b43_dma dma; |
720 | /* PIO engines. */ | ||
721 | struct b43_pio pio; | ||
722 | }; | ||
723 | 706 | ||
724 | /* Various statistics about the physical device. */ | 707 | /* Various statistics about the physical device. */ |
725 | struct b43_stats stats; | 708 | struct b43_stats stats; |
@@ -774,28 +757,6 @@ static inline struct b43_wl *hw_to_b43_wl(struct ieee80211_hw *hw) | |||
774 | return hw->priv; | 757 | return hw->priv; |
775 | } | 758 | } |
776 | 759 | ||
777 | /* Helper function, which returns a boolean. | ||
778 | * TRUE, if PIO is used; FALSE, if DMA is used. | ||
779 | */ | ||
780 | #if defined(CONFIG_B43_DMA) && defined(CONFIG_B43_PIO) | ||
781 | static inline int b43_using_pio(struct b43_wldev *dev) | ||
782 | { | ||
783 | return dev->__using_pio; | ||
784 | } | ||
785 | #elif defined(CONFIG_B43_DMA) | ||
786 | static inline int b43_using_pio(struct b43_wldev *dev) | ||
787 | { | ||
788 | return 0; | ||
789 | } | ||
790 | #elif defined(CONFIG_B43_PIO) | ||
791 | static inline int b43_using_pio(struct b43_wldev *dev) | ||
792 | { | ||
793 | return 1; | ||
794 | } | ||
795 | #else | ||
796 | # error "Using neither DMA nor PIO? Confused..." | ||
797 | #endif | ||
798 | |||
799 | static inline struct b43_wldev *dev_to_b43_wldev(struct device *dev) | 760 | static inline struct b43_wldev *dev_to_b43_wldev(struct device *dev) |
800 | { | 761 | { |
801 | struct ssb_device *ssb_dev = dev_to_ssb_dev(dev); | 762 | struct ssb_device *ssb_dev = dev_to_ssb_dev(dev); |
diff --git a/drivers/net/wireless/b43/debugfs.c b/drivers/net/wireless/b43/debugfs.c index f84d06382632..93e5030aa6c3 100644 --- a/drivers/net/wireless/b43/debugfs.c +++ b/drivers/net/wireless/b43/debugfs.c | |||
@@ -34,7 +34,6 @@ | |||
34 | #include "main.h" | 34 | #include "main.h" |
35 | #include "debugfs.h" | 35 | #include "debugfs.h" |
36 | #include "dma.h" | 36 | #include "dma.h" |
37 | #include "pio.h" | ||
38 | #include "xmit.h" | 37 | #include "xmit.h" |
39 | 38 | ||
40 | 39 | ||
diff --git a/drivers/net/wireless/b43/dma.c b/drivers/net/wireless/b43/dma.c index f3552acffdf7..63217b1e312d 100644 --- a/drivers/net/wireless/b43/dma.c +++ b/drivers/net/wireless/b43/dma.c | |||
@@ -915,11 +915,7 @@ static void b43_destroy_dmaring(struct b43_dmaring *ring) | |||
915 | 915 | ||
916 | void b43_dma_free(struct b43_wldev *dev) | 916 | void b43_dma_free(struct b43_wldev *dev) |
917 | { | 917 | { |
918 | struct b43_dma *dma; | 918 | struct b43_dma *dma = &dev->dma; |
919 | |||
920 | if (b43_using_pio(dev)) | ||
921 | return; | ||
922 | dma = &dev->dma; | ||
923 | 919 | ||
924 | b43_destroy_dmaring(dma->rx_ring3); | 920 | b43_destroy_dmaring(dma->rx_ring3); |
925 | dma->rx_ring3 = NULL; | 921 | dma->rx_ring3 = NULL; |
@@ -954,16 +950,11 @@ int b43_dma_init(struct b43_wldev *dev) | |||
954 | 950 | ||
955 | err = ssb_dma_set_mask(dev->dev, dmamask); | 951 | err = ssb_dma_set_mask(dev->dev, dmamask); |
956 | if (err) { | 952 | if (err) { |
957 | #ifdef B43_PIO | 953 | b43err(dev->wl, "The machine/kernel does not support " |
958 | b43warn(dev->wl, "DMA for this device not supported. " | 954 | "the required DMA mask (0x%08X%08X)\n", |
959 | "Falling back to PIO\n"); | 955 | (unsigned int)((dmamask & 0xFFFFFFFF00000000ULL) >> 32), |
960 | dev->__using_pio = 1; | 956 | (unsigned int)(dmamask & 0x00000000FFFFFFFFULL)); |
961 | return -EAGAIN; | ||
962 | #else | ||
963 | b43err(dev->wl, "DMA for this device not supported and " | ||
964 | "no PIO support compiled in\n"); | ||
965 | return -EOPNOTSUPP; | 957 | return -EOPNOTSUPP; |
966 | #endif | ||
967 | } | 958 | } |
968 | 959 | ||
969 | err = -ENOMEM; | 960 | err = -ENOMEM; |
diff --git a/drivers/net/wireless/b43/dma.h b/drivers/net/wireless/b43/dma.h index 3eed185be725..58db03ac536e 100644 --- a/drivers/net/wireless/b43/dma.h +++ b/drivers/net/wireless/b43/dma.h | |||
@@ -170,8 +170,6 @@ struct b43_dmadesc_generic { | |||
170 | #define B43_DMA0_RX_BUFFERSIZE (2304 + 100) | 170 | #define B43_DMA0_RX_BUFFERSIZE (2304 + 100) |
171 | #define B43_DMA3_RX_BUFFERSIZE 16 | 171 | #define B43_DMA3_RX_BUFFERSIZE 16 |
172 | 172 | ||
173 | #ifdef CONFIG_B43_DMA | ||
174 | |||
175 | struct sk_buff; | 173 | struct sk_buff; |
176 | struct b43_private; | 174 | struct b43_private; |
177 | struct b43_txstatus; | 175 | struct b43_txstatus; |
@@ -286,52 +284,4 @@ void b43_dma_handle_txstatus(struct b43_wldev *dev, | |||
286 | 284 | ||
287 | void b43_dma_rx(struct b43_dmaring *ring); | 285 | void b43_dma_rx(struct b43_dmaring *ring); |
288 | 286 | ||
289 | #else /* CONFIG_B43_DMA */ | ||
290 | |||
291 | static inline int b43_dma_init(struct b43_wldev *dev) | ||
292 | { | ||
293 | return 0; | ||
294 | } | ||
295 | static inline void b43_dma_free(struct b43_wldev *dev) | ||
296 | { | ||
297 | } | ||
298 | static inline | ||
299 | int b43_dmacontroller_rx_reset(struct b43_wldev *dev, | ||
300 | u16 dmacontroller_mmio_base, int dma64) | ||
301 | { | ||
302 | return 0; | ||
303 | } | ||
304 | static inline | ||
305 | int b43_dmacontroller_tx_reset(struct b43_wldev *dev, | ||
306 | u16 dmacontroller_mmio_base, int dma64) | ||
307 | { | ||
308 | return 0; | ||
309 | } | ||
310 | static inline | ||
311 | void b43_dma_get_tx_stats(struct b43_wldev *dev, | ||
312 | struct ieee80211_tx_queue_stats *stats) | ||
313 | { | ||
314 | } | ||
315 | static inline | ||
316 | int b43_dma_tx(struct b43_wldev *dev, | ||
317 | struct sk_buff *skb, struct ieee80211_tx_control *ctl) | ||
318 | { | ||
319 | return 0; | ||
320 | } | ||
321 | static inline | ||
322 | void b43_dma_handle_txstatus(struct b43_wldev *dev, | ||
323 | const struct b43_txstatus *status) | ||
324 | { | ||
325 | } | ||
326 | static inline void b43_dma_rx(struct b43_dmaring *ring) | ||
327 | { | ||
328 | } | ||
329 | static inline void b43_dma_tx_suspend(struct b43_wldev *dev) | ||
330 | { | ||
331 | } | ||
332 | static inline void b43_dma_tx_resume(struct b43_wldev *dev) | ||
333 | { | ||
334 | } | ||
335 | |||
336 | #endif /* CONFIG_B43_DMA */ | ||
337 | #endif /* B43_DMA_H_ */ | 287 | #endif /* B43_DMA_H_ */ |
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index 6b3013c2d96d..2add839f5045 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c | |||
@@ -46,7 +46,6 @@ | |||
46 | #include "debugfs.h" | 46 | #include "debugfs.h" |
47 | #include "phy.h" | 47 | #include "phy.h" |
48 | #include "dma.h" | 48 | #include "dma.h" |
49 | #include "pio.h" | ||
50 | #include "sysfs.h" | 49 | #include "sysfs.h" |
51 | #include "xmit.h" | 50 | #include "xmit.h" |
52 | #include "lo.h" | 51 | #include "lo.h" |
@@ -58,17 +57,6 @@ MODULE_AUTHOR("Stefano Brivio"); | |||
58 | MODULE_AUTHOR("Michael Buesch"); | 57 | MODULE_AUTHOR("Michael Buesch"); |
59 | MODULE_LICENSE("GPL"); | 58 | MODULE_LICENSE("GPL"); |
60 | 59 | ||
61 | extern char *nvram_get(char *name); | ||
62 | |||
63 | #if defined(CONFIG_B43_DMA) && defined(CONFIG_B43_PIO) | ||
64 | static int modparam_pio; | ||
65 | module_param_named(pio, modparam_pio, int, 0444); | ||
66 | MODULE_PARM_DESC(pio, "enable(1) / disable(0) PIO mode"); | ||
67 | #elif defined(CONFIG_B43_DMA) | ||
68 | # define modparam_pio 0 | ||
69 | #elif defined(CONFIG_B43_PIO) | ||
70 | # define modparam_pio 1 | ||
71 | #endif | ||
72 | 60 | ||
73 | static int modparam_bad_frames_preempt; | 61 | static int modparam_bad_frames_preempt; |
74 | module_param_named(bad_frames_preempt, modparam_bad_frames_preempt, int, 0444); | 62 | module_param_named(bad_frames_preempt, modparam_bad_frames_preempt, int, 0444); |
@@ -1447,20 +1435,12 @@ static void b43_interrupt_tasklet(struct b43_wldev *dev) | |||
1447 | handle_irq_noise(dev); | 1435 | handle_irq_noise(dev); |
1448 | 1436 | ||
1449 | /* Check the DMA reason registers for received data. */ | 1437 | /* Check the DMA reason registers for received data. */ |
1450 | if (dma_reason[0] & B43_DMAIRQ_RX_DONE) { | 1438 | if (dma_reason[0] & B43_DMAIRQ_RX_DONE) |
1451 | if (b43_using_pio(dev)) | 1439 | b43_dma_rx(dev->dma.rx_ring0); |
1452 | b43_pio_rx(dev->pio.queue0); | 1440 | if (dma_reason[3] & B43_DMAIRQ_RX_DONE) |
1453 | else | 1441 | b43_dma_rx(dev->dma.rx_ring3); |
1454 | b43_dma_rx(dev->dma.rx_ring0); | ||
1455 | } | ||
1456 | B43_WARN_ON(dma_reason[1] & B43_DMAIRQ_RX_DONE); | 1442 | B43_WARN_ON(dma_reason[1] & B43_DMAIRQ_RX_DONE); |
1457 | B43_WARN_ON(dma_reason[2] & B43_DMAIRQ_RX_DONE); | 1443 | B43_WARN_ON(dma_reason[2] & B43_DMAIRQ_RX_DONE); |
1458 | if (dma_reason[3] & B43_DMAIRQ_RX_DONE) { | ||
1459 | if (b43_using_pio(dev)) | ||
1460 | b43_pio_rx(dev->pio.queue3); | ||
1461 | else | ||
1462 | b43_dma_rx(dev->dma.rx_ring3); | ||
1463 | } | ||
1464 | B43_WARN_ON(dma_reason[4] & B43_DMAIRQ_RX_DONE); | 1444 | B43_WARN_ON(dma_reason[4] & B43_DMAIRQ_RX_DONE); |
1465 | B43_WARN_ON(dma_reason[5] & B43_DMAIRQ_RX_DONE); | 1445 | B43_WARN_ON(dma_reason[5] & B43_DMAIRQ_RX_DONE); |
1466 | 1446 | ||
@@ -1472,29 +1452,8 @@ static void b43_interrupt_tasklet(struct b43_wldev *dev) | |||
1472 | spin_unlock_irqrestore(&dev->wl->irq_lock, flags); | 1452 | spin_unlock_irqrestore(&dev->wl->irq_lock, flags); |
1473 | } | 1453 | } |
1474 | 1454 | ||
1475 | static void pio_irq_workaround(struct b43_wldev *dev, u16 base, int queueidx) | ||
1476 | { | ||
1477 | u16 rxctl; | ||
1478 | |||
1479 | rxctl = b43_read16(dev, base + B43_PIO_RXCTL); | ||
1480 | if (rxctl & B43_PIO_RXCTL_DATAAVAILABLE) | ||
1481 | dev->dma_reason[queueidx] |= B43_DMAIRQ_RX_DONE; | ||
1482 | else | ||
1483 | dev->dma_reason[queueidx] &= ~B43_DMAIRQ_RX_DONE; | ||
1484 | } | ||
1485 | |||
1486 | static void b43_interrupt_ack(struct b43_wldev *dev, u32 reason) | 1455 | static void b43_interrupt_ack(struct b43_wldev *dev, u32 reason) |
1487 | { | 1456 | { |
1488 | if (b43_using_pio(dev) && | ||
1489 | (dev->dev->id.revision < 3) && | ||
1490 | (!(reason & B43_IRQ_PIO_WORKAROUND))) { | ||
1491 | /* Apply a PIO specific workaround to the dma_reasons */ | ||
1492 | pio_irq_workaround(dev, B43_MMIO_PIO1_BASE, 0); | ||
1493 | pio_irq_workaround(dev, B43_MMIO_PIO2_BASE, 1); | ||
1494 | pio_irq_workaround(dev, B43_MMIO_PIO3_BASE, 2); | ||
1495 | pio_irq_workaround(dev, B43_MMIO_PIO4_BASE, 3); | ||
1496 | } | ||
1497 | |||
1498 | b43_write32(dev, B43_MMIO_GEN_IRQ_REASON, reason); | 1457 | b43_write32(dev, B43_MMIO_GEN_IRQ_REASON, reason); |
1499 | 1458 | ||
1500 | b43_write32(dev, B43_MMIO_DMA0_REASON, dev->dma_reason[0]); | 1459 | b43_write32(dev, B43_MMIO_DMA0_REASON, dev->dma_reason[0]); |
@@ -2225,14 +2184,6 @@ static int b43_chip_init(struct b43_wldev *dev) | |||
2225 | b43_write32(dev, B43_MMIO_MACCTL, b43_read32(dev, B43_MMIO_MACCTL) | 2184 | b43_write32(dev, B43_MMIO_MACCTL, b43_read32(dev, B43_MMIO_MACCTL) |
2226 | | B43_MACCTL_INFRA); | 2185 | | B43_MACCTL_INFRA); |
2227 | 2186 | ||
2228 | if (b43_using_pio(dev)) { | ||
2229 | b43_write32(dev, 0x0210, 0x00000100); | ||
2230 | b43_write32(dev, 0x0230, 0x00000100); | ||
2231 | b43_write32(dev, 0x0250, 0x00000100); | ||
2232 | b43_write32(dev, 0x0270, 0x00000100); | ||
2233 | b43_shm_write16(dev, B43_SHM_SHARED, 0x0034, 0x0000); | ||
2234 | } | ||
2235 | |||
2236 | /* Probe Response Timeout value */ | 2187 | /* Probe Response Timeout value */ |
2237 | /* FIXME: Default to 0, has to be set by ioctl probably... :-/ */ | 2188 | /* FIXME: Default to 0, has to be set by ioctl probably... :-/ */ |
2238 | b43_shm_write16(dev, B43_SHM_SHARED, 0x0074, 0x0000); | 2189 | b43_shm_write16(dev, B43_SHM_SHARED, 0x0074, 0x0000); |
@@ -2513,19 +2464,13 @@ static int b43_op_tx(struct ieee80211_hw *hw, | |||
2513 | struct b43_wl *wl = hw_to_b43_wl(hw); | 2464 | struct b43_wl *wl = hw_to_b43_wl(hw); |
2514 | struct b43_wldev *dev = wl->current_dev; | 2465 | struct b43_wldev *dev = wl->current_dev; |
2515 | int err = -ENODEV; | 2466 | int err = -ENODEV; |
2516 | unsigned long flags; | ||
2517 | 2467 | ||
2518 | if (unlikely(!dev)) | 2468 | if (unlikely(!dev)) |
2519 | goto out; | 2469 | goto out; |
2520 | if (unlikely(b43_status(dev) < B43_STAT_STARTED)) | 2470 | if (unlikely(b43_status(dev) < B43_STAT_STARTED)) |
2521 | goto out; | 2471 | goto out; |
2522 | /* DMA-TX is done without a global lock. */ | 2472 | /* DMA-TX is done without a global lock. */ |
2523 | if (b43_using_pio(dev)) { | 2473 | err = b43_dma_tx(dev, skb, ctl); |
2524 | spin_lock_irqsave(&wl->irq_lock, flags); | ||
2525 | err = b43_pio_tx(dev, skb, ctl); | ||
2526 | spin_unlock_irqrestore(&wl->irq_lock, flags); | ||
2527 | } else | ||
2528 | err = b43_dma_tx(dev, skb, ctl); | ||
2529 | out: | 2474 | out: |
2530 | if (unlikely(err)) | 2475 | if (unlikely(err)) |
2531 | return NETDEV_TX_BUSY; | 2476 | return NETDEV_TX_BUSY; |
@@ -2551,10 +2496,7 @@ static int b43_op_get_tx_stats(struct ieee80211_hw *hw, | |||
2551 | goto out; | 2496 | goto out; |
2552 | spin_lock_irqsave(&wl->irq_lock, flags); | 2497 | spin_lock_irqsave(&wl->irq_lock, flags); |
2553 | if (likely(b43_status(dev) >= B43_STAT_STARTED)) { | 2498 | if (likely(b43_status(dev) >= B43_STAT_STARTED)) { |
2554 | if (b43_using_pio(dev)) | 2499 | b43_dma_get_tx_stats(dev, stats); |
2555 | b43_pio_get_tx_stats(dev, stats); | ||
2556 | else | ||
2557 | b43_dma_get_tx_stats(dev, stats); | ||
2558 | err = 0; | 2500 | err = 0; |
2559 | } | 2501 | } |
2560 | spin_unlock_irqrestore(&wl->irq_lock, flags); | 2502 | spin_unlock_irqrestore(&wl->irq_lock, flags); |
@@ -3336,7 +3278,6 @@ static void b43_wireless_core_exit(struct b43_wldev *dev) | |||
3336 | 3278 | ||
3337 | b43_leds_exit(dev); | 3279 | b43_leds_exit(dev); |
3338 | b43_rng_exit(dev->wl); | 3280 | b43_rng_exit(dev->wl); |
3339 | b43_pio_free(dev); | ||
3340 | b43_dma_free(dev); | 3281 | b43_dma_free(dev); |
3341 | b43_chip_exit(dev); | 3282 | b43_chip_exit(dev); |
3342 | b43_radio_turn_off(dev, 1); | 3283 | b43_radio_turn_off(dev, 1); |
@@ -3430,17 +3371,10 @@ static int b43_wireless_core_init(struct b43_wldev *dev) | |||
3430 | /* Maximum Contention Window */ | 3371 | /* Maximum Contention Window */ |
3431 | b43_shm_write16(dev, B43_SHM_SCRATCH, B43_SHM_SC_MAXCONT, 0x3FF); | 3372 | b43_shm_write16(dev, B43_SHM_SCRATCH, B43_SHM_SC_MAXCONT, 0x3FF); |
3432 | 3373 | ||
3433 | do { | 3374 | err = b43_dma_init(dev); |
3434 | if (b43_using_pio(dev)) { | ||
3435 | err = b43_pio_init(dev); | ||
3436 | } else { | ||
3437 | err = b43_dma_init(dev); | ||
3438 | if (!err) | ||
3439 | b43_qos_init(dev); | ||
3440 | } | ||
3441 | } while (err == -EAGAIN); | ||
3442 | if (err) | 3375 | if (err) |
3443 | goto err_chip_exit; | 3376 | goto err_chip_exit; |
3377 | b43_qos_init(dev); | ||
3444 | 3378 | ||
3445 | //FIXME | 3379 | //FIXME |
3446 | #if 1 | 3380 | #if 1 |
@@ -3890,8 +3824,6 @@ static int b43_one_core_attach(struct ssb_device *dev, struct b43_wl *wl) | |||
3890 | tasklet_init(&wldev->isr_tasklet, | 3824 | tasklet_init(&wldev->isr_tasklet, |
3891 | (void (*)(unsigned long))b43_interrupt_tasklet, | 3825 | (void (*)(unsigned long))b43_interrupt_tasklet, |
3892 | (unsigned long)wldev); | 3826 | (unsigned long)wldev); |
3893 | if (modparam_pio) | ||
3894 | wldev->__using_pio = 1; | ||
3895 | INIT_LIST_HEAD(&wldev->list); | 3827 | INIT_LIST_HEAD(&wldev->list); |
3896 | 3828 | ||
3897 | err = b43_wireless_core_attach(wldev); | 3829 | err = b43_wireless_core_attach(wldev); |
diff --git a/drivers/net/wireless/b43/xmit.c b/drivers/net/wireless/b43/xmit.c index 3d3127685881..419aca1fc4fe 100644 --- a/drivers/net/wireless/b43/xmit.c +++ b/drivers/net/wireless/b43/xmit.c | |||
@@ -30,7 +30,7 @@ | |||
30 | #include "xmit.h" | 30 | #include "xmit.h" |
31 | #include "phy.h" | 31 | #include "phy.h" |
32 | #include "dma.h" | 32 | #include "dma.h" |
33 | #include "pio.h" | 33 | |
34 | 34 | ||
35 | /* Extract the bitrate out of a CCK PLCP header. */ | 35 | /* Extract the bitrate out of a CCK PLCP header. */ |
36 | static u8 b43_plcp_get_bitrate_cck(struct b43_plcp_hdr6 *plcp) | 36 | static u8 b43_plcp_get_bitrate_cck(struct b43_plcp_hdr6 *plcp) |
@@ -604,10 +604,7 @@ void b43_handle_txstatus(struct b43_wldev *dev, | |||
604 | dev->wl->ieee_stats.dot11RTSSuccessCount++; | 604 | dev->wl->ieee_stats.dot11RTSSuccessCount++; |
605 | } | 605 | } |
606 | 606 | ||
607 | if (b43_using_pio(dev)) | 607 | b43_dma_handle_txstatus(dev, status); |
608 | b43_pio_handle_txstatus(dev, status); | ||
609 | else | ||
610 | b43_dma_handle_txstatus(dev, status); | ||
611 | } | 608 | } |
612 | 609 | ||
613 | /* Handle TX status report as received through DMA/PIO queues */ | 610 | /* Handle TX status report as received through DMA/PIO queues */ |
@@ -636,19 +633,13 @@ void b43_handle_hwtxstatus(struct b43_wldev *dev, | |||
636 | /* Stop any TX operation on the device (suspend the hardware queues) */ | 633 | /* Stop any TX operation on the device (suspend the hardware queues) */ |
637 | void b43_tx_suspend(struct b43_wldev *dev) | 634 | void b43_tx_suspend(struct b43_wldev *dev) |
638 | { | 635 | { |
639 | if (b43_using_pio(dev)) | 636 | b43_dma_tx_suspend(dev); |
640 | b43_pio_freeze_txqueues(dev); | ||
641 | else | ||
642 | b43_dma_tx_suspend(dev); | ||
643 | } | 637 | } |
644 | 638 | ||
645 | /* Resume any TX operation on the device (resume the hardware queues) */ | 639 | /* Resume any TX operation on the device (resume the hardware queues) */ |
646 | void b43_tx_resume(struct b43_wldev *dev) | 640 | void b43_tx_resume(struct b43_wldev *dev) |
647 | { | 641 | { |
648 | if (b43_using_pio(dev)) | 642 | b43_dma_tx_resume(dev); |
649 | b43_pio_thaw_txqueues(dev); | ||
650 | else | ||
651 | b43_dma_tx_resume(dev); | ||
652 | } | 643 | } |
653 | 644 | ||
654 | #if 0 | 645 | #if 0 |