aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43legacy
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2011-07-21 18:25:00 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-07-22 10:47:10 -0400
commit8c95b74d8d8acd8b0741b942a46fdb6f81d974ed (patch)
tree858f1cabec23f6dfdcc2c18cfa7d2e8e6f3ce7c9 /drivers/net/wireless/b43legacy
parentbb78c71d6c6947322a701580df7865409032dbf6 (diff)
b43legacy: dma: cache translation (routing bits)
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Tested-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/b43legacy')
-rw-r--r--drivers/net/wireless/b43legacy/b43legacy.h2
-rw-r--r--drivers/net/wireless/b43legacy/dma.c7
2 files changed, 6 insertions, 3 deletions
diff --git a/drivers/net/wireless/b43legacy/b43legacy.h b/drivers/net/wireless/b43legacy/b43legacy.h
index 23583be1ee0b..17a130d18dc9 100644
--- a/drivers/net/wireless/b43legacy/b43legacy.h
+++ b/drivers/net/wireless/b43legacy/b43legacy.h
@@ -532,6 +532,8 @@ struct b43legacy_dma {
532 532
533 struct b43legacy_dmaring *rx_ring0; 533 struct b43legacy_dmaring *rx_ring0;
534 struct b43legacy_dmaring *rx_ring3; /* only on core.rev < 5 */ 534 struct b43legacy_dmaring *rx_ring3; /* only on core.rev < 5 */
535
536 u32 translation; /* Routing bits */
535}; 537};
536 538
537/* Data structures for PIO transmission, per 80211 core. */ 539/* Data structures for PIO transmission, per 80211 core. */
diff --git a/drivers/net/wireless/b43legacy/dma.c b/drivers/net/wireless/b43legacy/dma.c
index c33934ad6cd2..704ee62101bd 100644
--- a/drivers/net/wireless/b43legacy/dma.c
+++ b/drivers/net/wireless/b43legacy/dma.c
@@ -73,7 +73,7 @@ static void op32_fill_descriptor(struct b43legacy_dmaring *ring,
73 addr = (u32)(dmaaddr & ~SSB_DMA_TRANSLATION_MASK); 73 addr = (u32)(dmaaddr & ~SSB_DMA_TRANSLATION_MASK);
74 addrext = (u32)(dmaaddr & SSB_DMA_TRANSLATION_MASK) 74 addrext = (u32)(dmaaddr & SSB_DMA_TRANSLATION_MASK)
75 >> SSB_DMA_TRANSLATION_SHIFT; 75 >> SSB_DMA_TRANSLATION_SHIFT;
76 addr |= ssb_dma_translation(ring->dev->dev); 76 addr |= ring->dev->dma.translation;
77 ctl = (bufsize - ring->frameoffset) 77 ctl = (bufsize - ring->frameoffset)
78 & B43legacy_DMA32_DCTL_BYTECNT; 78 & B43legacy_DMA32_DCTL_BYTECNT;
79 if (slot == ring->nr_slots - 1) 79 if (slot == ring->nr_slots - 1)
@@ -175,7 +175,7 @@ static void op64_fill_descriptor(struct b43legacy_dmaring *ring,
175 addrhi = (((u64)dmaaddr >> 32) & ~SSB_DMA_TRANSLATION_MASK); 175 addrhi = (((u64)dmaaddr >> 32) & ~SSB_DMA_TRANSLATION_MASK);
176 addrext = (((u64)dmaaddr >> 32) & SSB_DMA_TRANSLATION_MASK) 176 addrext = (((u64)dmaaddr >> 32) & SSB_DMA_TRANSLATION_MASK)
177 >> SSB_DMA_TRANSLATION_SHIFT; 177 >> SSB_DMA_TRANSLATION_SHIFT;
178 addrhi |= ssb_dma_translation(ring->dev->dev); 178 addrhi |= ring->dev->dma.translation;
179 if (slot == ring->nr_slots - 1) 179 if (slot == ring->nr_slots - 1)
180 ctl0 |= B43legacy_DMA64_DCTL0_DTABLEEND; 180 ctl0 |= B43legacy_DMA64_DCTL0_DTABLEEND;
181 if (start) 181 if (start)
@@ -709,7 +709,7 @@ static int dmacontroller_setup(struct b43legacy_dmaring *ring)
709 int err = 0; 709 int err = 0;
710 u32 value; 710 u32 value;
711 u32 addrext; 711 u32 addrext;
712 u32 trans = ssb_dma_translation(ring->dev->dev); 712 u32 trans = ring->dev->dma.translation;
713 713
714 if (ring->tx) { 714 if (ring->tx) {
715 if (ring->type == B43legacy_DMA_64BIT) { 715 if (ring->type == B43legacy_DMA_64BIT) {
@@ -1093,6 +1093,7 @@ int b43legacy_dma_init(struct b43legacy_wldev *dev)
1093 return -EOPNOTSUPP; 1093 return -EOPNOTSUPP;
1094#endif 1094#endif
1095 } 1095 }
1096 dma->translation = ssb_dma_translation(dev->dev);
1096 1097
1097 err = -ENOMEM; 1098 err = -ENOMEM;
1098 /* setup TX DMA channels. */ 1099 /* setup TX DMA channels. */