diff options
author | Michael Buesch <mb@bu3sch.de> | 2008-01-28 17:47:41 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:09:50 -0500 |
commit | eb189d8bc9824bcb2187ffdab27d77ab469264c3 (patch) | |
tree | 612c6549f0d0261087b55b157dd5ca016386ddee /drivers/net/wireless/b43/dma.c | |
parent | 243dcfcc1d4b33aa610f1bf3ec610dafdf4d7ff7 (diff) |
b43: Add support for new firmware
This patch adds support for new firmware.
Old firmware is still supported until July 2008.
To get new firmware, go to
ftp://ftp.linksys.com/opensourcecode/wrt150nv11/1.51.3/
and download the tarball. We don't have a smaller tarball, yet.
That will be fixed later.
You can extract firmware out of the "wl_ap.o" file contained
in this tarball using latest fwcutter. You must pass the option
--unsupported to fwcutter.
Fwcutter-010 with official support for a new firmware image will
be released soon.
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wireless/b43/dma.c')
-rw-r--r-- | drivers/net/wireless/b43/dma.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/net/wireless/b43/dma.c b/drivers/net/wireless/b43/dma.c index cf92853a2180..3e73d2a523aa 100644 --- a/drivers/net/wireless/b43/dma.c +++ b/drivers/net/wireless/b43/dma.c | |||
@@ -807,7 +807,7 @@ struct b43_dmaring *b43_setup_dmaring(struct b43_wldev *dev, | |||
807 | goto err_kfree_ring; | 807 | goto err_kfree_ring; |
808 | if (for_tx) { | 808 | if (for_tx) { |
809 | ring->txhdr_cache = kcalloc(nr_slots, | 809 | ring->txhdr_cache = kcalloc(nr_slots, |
810 | sizeof(struct b43_txhdr_fw4), | 810 | b43_txhdr_size(dev), |
811 | GFP_KERNEL); | 811 | GFP_KERNEL); |
812 | if (!ring->txhdr_cache) | 812 | if (!ring->txhdr_cache) |
813 | goto err_kfree_meta; | 813 | goto err_kfree_meta; |
@@ -815,22 +815,21 @@ struct b43_dmaring *b43_setup_dmaring(struct b43_wldev *dev, | |||
815 | /* test for ability to dma to txhdr_cache */ | 815 | /* test for ability to dma to txhdr_cache */ |
816 | dma_test = dma_map_single(dev->dev->dev, | 816 | dma_test = dma_map_single(dev->dev->dev, |
817 | ring->txhdr_cache, | 817 | ring->txhdr_cache, |
818 | sizeof(struct b43_txhdr_fw4), | 818 | b43_txhdr_size(dev), |
819 | DMA_TO_DEVICE); | 819 | DMA_TO_DEVICE); |
820 | 820 | ||
821 | if (dma_mapping_error(dma_test)) { | 821 | if (dma_mapping_error(dma_test)) { |
822 | /* ugh realloc */ | 822 | /* ugh realloc */ |
823 | kfree(ring->txhdr_cache); | 823 | kfree(ring->txhdr_cache); |
824 | ring->txhdr_cache = kcalloc(nr_slots, | 824 | ring->txhdr_cache = kcalloc(nr_slots, |
825 | sizeof(struct | 825 | b43_txhdr_size(dev), |
826 | b43_txhdr_fw4), | ||
827 | GFP_KERNEL | GFP_DMA); | 826 | GFP_KERNEL | GFP_DMA); |
828 | if (!ring->txhdr_cache) | 827 | if (!ring->txhdr_cache) |
829 | goto err_kfree_meta; | 828 | goto err_kfree_meta; |
830 | 829 | ||
831 | dma_test = dma_map_single(dev->dev->dev, | 830 | dma_test = dma_map_single(dev->dev->dev, |
832 | ring->txhdr_cache, | 831 | ring->txhdr_cache, |
833 | sizeof(struct b43_txhdr_fw4), | 832 | b43_txhdr_size(dev), |
834 | DMA_TO_DEVICE); | 833 | DMA_TO_DEVICE); |
835 | 834 | ||
836 | if (dma_mapping_error(dma_test)) | 835 | if (dma_mapping_error(dma_test)) |
@@ -838,7 +837,7 @@ struct b43_dmaring *b43_setup_dmaring(struct b43_wldev *dev, | |||
838 | } | 837 | } |
839 | 838 | ||
840 | dma_unmap_single(dev->dev->dev, | 839 | dma_unmap_single(dev->dev->dev, |
841 | dma_test, sizeof(struct b43_txhdr_fw4), | 840 | dma_test, b43_txhdr_size(dev), |
842 | DMA_TO_DEVICE); | 841 | DMA_TO_DEVICE); |
843 | } | 842 | } |
844 | 843 | ||
@@ -1122,6 +1121,7 @@ static int dma_tx_fragment(struct b43_dmaring *ring, | |||
1122 | struct b43_dmadesc_meta *meta_hdr; | 1121 | struct b43_dmadesc_meta *meta_hdr; |
1123 | struct sk_buff *bounce_skb; | 1122 | struct sk_buff *bounce_skb; |
1124 | u16 cookie; | 1123 | u16 cookie; |
1124 | size_t hdrsize = b43_txhdr_size(ring->dev); | ||
1125 | 1125 | ||
1126 | #define SLOTS_PER_PACKET 2 | 1126 | #define SLOTS_PER_PACKET 2 |
1127 | B43_WARN_ON(skb_shinfo(skb)->nr_frags); | 1127 | B43_WARN_ON(skb_shinfo(skb)->nr_frags); |
@@ -1131,17 +1131,17 @@ static int dma_tx_fragment(struct b43_dmaring *ring, | |||
1131 | desc = ops->idx2desc(ring, slot, &meta_hdr); | 1131 | desc = ops->idx2desc(ring, slot, &meta_hdr); |
1132 | memset(meta_hdr, 0, sizeof(*meta_hdr)); | 1132 | memset(meta_hdr, 0, sizeof(*meta_hdr)); |
1133 | 1133 | ||
1134 | header = &(ring->txhdr_cache[slot * sizeof(struct b43_txhdr_fw4)]); | 1134 | header = &(ring->txhdr_cache[slot * hdrsize]); |
1135 | cookie = generate_cookie(ring, slot); | 1135 | cookie = generate_cookie(ring, slot); |
1136 | b43_generate_txhdr(ring->dev, header, | 1136 | b43_generate_txhdr(ring->dev, header, |
1137 | skb->data, skb->len, ctl, cookie); | 1137 | skb->data, skb->len, ctl, cookie); |
1138 | 1138 | ||
1139 | meta_hdr->dmaaddr = map_descbuffer(ring, (unsigned char *)header, | 1139 | meta_hdr->dmaaddr = map_descbuffer(ring, (unsigned char *)header, |
1140 | sizeof(struct b43_txhdr_fw4), 1); | 1140 | hdrsize, 1); |
1141 | if (dma_mapping_error(meta_hdr->dmaaddr)) | 1141 | if (dma_mapping_error(meta_hdr->dmaaddr)) |
1142 | return -EIO; | 1142 | return -EIO; |
1143 | ops->fill_descriptor(ring, desc, meta_hdr->dmaaddr, | 1143 | ops->fill_descriptor(ring, desc, meta_hdr->dmaaddr, |
1144 | sizeof(struct b43_txhdr_fw4), 1, 0, 0); | 1144 | hdrsize, 1, 0, 0); |
1145 | 1145 | ||
1146 | /* Get a slot for the payload. */ | 1146 | /* Get a slot for the payload. */ |
1147 | slot = request_slot(ring); | 1147 | slot = request_slot(ring); |
@@ -1189,7 +1189,7 @@ out_free_bounce: | |||
1189 | dev_kfree_skb_any(skb); | 1189 | dev_kfree_skb_any(skb); |
1190 | out_unmap_hdr: | 1190 | out_unmap_hdr: |
1191 | unmap_descbuffer(ring, meta_hdr->dmaaddr, | 1191 | unmap_descbuffer(ring, meta_hdr->dmaaddr, |
1192 | sizeof(struct b43_txhdr_fw4), 1); | 1192 | hdrsize, 1); |
1193 | return err; | 1193 | return err; |
1194 | } | 1194 | } |
1195 | 1195 | ||
@@ -1298,7 +1298,7 @@ void b43_dma_handle_txstatus(struct b43_wldev *dev, | |||
1298 | 1); | 1298 | 1); |
1299 | else | 1299 | else |
1300 | unmap_descbuffer(ring, meta->dmaaddr, | 1300 | unmap_descbuffer(ring, meta->dmaaddr, |
1301 | sizeof(struct b43_txhdr_fw4), 1); | 1301 | b43_txhdr_size(dev), 1); |
1302 | 1302 | ||
1303 | if (meta->is_last_fragment) { | 1303 | if (meta->is_last_fragment) { |
1304 | B43_WARN_ON(!meta->skb); | 1304 | B43_WARN_ON(!meta->skb); |