diff options
author | Felix Fietkau <nbd@openwrt.org> | 2009-01-10 00:55:38 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2009-01-10 00:55:38 +0000 |
commit | f57651b0426f32ef561844028c8e9a4378485336 (patch) | |
tree | e082363dd0e3c0ccc5719136f420326366dbe7df /target/linux/brcm-2.4/patches/110-b44_alignment.patch | |
parent | df5b0fe1cac82aca0da66f56bda57d4993856008 (diff) | |
download | mtk-20170518-f57651b0426f32ef561844028c8e9a4378485336.zip mtk-20170518-f57651b0426f32ef561844028c8e9a4378485336.tar.gz mtk-20170518-f57651b0426f32ef561844028c8e9a4378485336.tar.bz2 |
fix a memory corruption bug in the linux 2.4 version of b44
SVN-Revision: 13955
Diffstat (limited to 'target/linux/brcm-2.4/patches/110-b44_alignment.patch')
-rw-r--r-- | target/linux/brcm-2.4/patches/110-b44_alignment.patch | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/target/linux/brcm-2.4/patches/110-b44_alignment.patch b/target/linux/brcm-2.4/patches/110-b44_alignment.patch index c1f0782..1f6e975 100644 --- a/target/linux/brcm-2.4/patches/110-b44_alignment.patch +++ b/target/linux/brcm-2.4/patches/110-b44_alignment.patch @@ -10,19 +10,19 @@ /* minimum number of free TX descriptors required to wake up TX process */ #define B44_TX_WAKEUP_THRESH (B44_TX_RING_SIZE / 4) -@@ -734,10 +735,9 @@ static int b44_alloc_rx_skb(struct b44 * +@@ -734,10 +735,8 @@ static int b44_alloc_rx_skb(struct b44 * mapping = pci_map_single(bp->pdev, skb->data, RX_PKT_BUF_SZ, PCI_DMA_FROMDEVICE); - skb_reserve(skb, bp->rx_offset); - rh = (struct rx_header *) +- rh = (struct rx_header *) - (skb->data - bp->rx_offset); -+ (skb->data - RX_HEADER_OFS); ++ rh = (struct rx_header *) skb->data; rh->len = 0; rh->flags = 0; -@@ -747,13 +747,13 @@ static int b44_alloc_rx_skb(struct b44 * +@@ -747,13 +746,13 @@ static int b44_alloc_rx_skb(struct b44 * if (src_map != NULL) src_map->skb = NULL; @@ -38,7 +38,7 @@ return RX_PKT_BUF_SZ; } -@@ -812,7 +812,7 @@ static int b44_rx(struct b44 *bp, int bu +@@ -812,7 +811,7 @@ static int b44_rx(struct b44 *bp, int bu PCI_DMA_FROMDEVICE); rh = (struct rx_header *) skb->data; len = cpu_to_le16(rh->len); @@ -47,7 +47,7 @@ (rh->flags & cpu_to_le16(RX_FLAG_ERRORS))) { drop_it: b44_recycle_rx(bp, cons, bp->rx_prod); -@@ -844,8 +844,8 @@ static int b44_rx(struct b44 *bp, int bu +@@ -844,8 +843,8 @@ static int b44_rx(struct b44 *bp, int bu pci_unmap_single(bp->pdev, map, skb_size, PCI_DMA_FROMDEVICE); /* Leave out rx_header */ @@ -58,7 +58,7 @@ } else { struct sk_buff *copy_skb; -@@ -858,7 +858,7 @@ static int b44_rx(struct b44 *bp, int bu +@@ -858,7 +857,7 @@ static int b44_rx(struct b44 *bp, int bu skb_reserve(copy_skb, 2); skb_put(copy_skb, len); /* DMA sync done above, copy just the actual packet */ @@ -67,7 +67,7 @@ skb = copy_skb; } -@@ -1344,7 +1344,7 @@ static void b44_init_hw(struct b44 *bp) +@@ -1344,7 +1343,7 @@ static void b44_init_hw(struct b44 *bp) bw32(B44_DMATX_CTRL, DMATX_CTRL_ENABLE); bw32(B44_DMATX_ADDR, bp->tx_ring_dma + bp->dma_offset); bw32(B44_DMARX_CTRL, (DMARX_CTRL_ENABLE | @@ -76,7 +76,7 @@ bw32(B44_DMARX_ADDR, bp->rx_ring_dma + bp->dma_offset); bw32(B44_DMARX_PTR, bp->rx_pending); -@@ -1873,13 +1873,7 @@ static int __devinit b44_get_invariants( +@@ -1873,13 +1872,7 @@ static int __devinit b44_get_invariants( bp->mdc_port = (eeprom[90] >> 14) & 0x1; } |