aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@openwrt.org>2013-02-28 13:27:21 +0000
committerHauke Mehrtens <hauke@openwrt.org>2013-02-28 13:27:21 +0000
commitf425635b168523cda1d9bc01b286ee9355e2fd27 (patch)
tree0f20cb0a1f9f264c7ce312bc3f340064ca1febb6 /target
parent131abb7401db3505fd6d9cf09c70aabf825c4148 (diff)
downloadmaster-187ad058-f425635b168523cda1d9bc01b286ee9355e2fd27.tar.gz
master-187ad058-f425635b168523cda1d9bc01b286ee9355e2fd27.tar.bz2
master-187ad058-f425635b168523cda1d9bc01b286ee9355e2fd27.zip
brcm47xx: bgmac: omit the fcs
This fixes #13058 and hopefully #12927 git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35834 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target')
-rw-r--r--target/linux/brcm47xx/patches-3.6/765-bgmac-omit-the-fcs.patch19
-rw-r--r--target/linux/brcm47xx/patches-3.8/765-bgmac-omit-the-fcs.patch19
2 files changed, 38 insertions, 0 deletions
diff --git a/target/linux/brcm47xx/patches-3.6/765-bgmac-omit-the-fcs.patch b/target/linux/brcm47xx/patches-3.6/765-bgmac-omit-the-fcs.patch
new file mode 100644
index 0000000000..9d8733fef2
--- /dev/null
+++ b/target/linux/brcm47xx/patches-3.6/765-bgmac-omit-the-fcs.patch
@@ -0,0 +1,19 @@
+--- a/drivers/net/ethernet/broadcom/bgmac.c
++++ b/drivers/net/ethernet/broadcom/bgmac.c
+@@ -301,12 +301,16 @@ static int bgmac_dma_rx_read(struct bgma
+ bgmac_err(bgmac, "Found poisoned packet at slot %d, DMA issue!\n",
+ ring->start);
+ } else {
++ /* Omit CRC. */
++ len -= ETH_FCS_LEN;
++
+ new_skb = netdev_alloc_skb_ip_align(bgmac->net_dev, len);
+ if (new_skb) {
+ skb_put(new_skb, len);
+ skb_copy_from_linear_data_offset(skb, BGMAC_RX_FRAME_OFFSET,
+ new_skb->data,
+ len);
++ skb_checksum_none_assert(skb);
+ new_skb->protocol =
+ eth_type_trans(new_skb, bgmac->net_dev);
+ netif_receive_skb(new_skb);
diff --git a/target/linux/brcm47xx/patches-3.8/765-bgmac-omit-the-fcs.patch b/target/linux/brcm47xx/patches-3.8/765-bgmac-omit-the-fcs.patch
new file mode 100644
index 0000000000..9d8733fef2
--- /dev/null
+++ b/target/linux/brcm47xx/patches-3.8/765-bgmac-omit-the-fcs.patch
@@ -0,0 +1,19 @@
+--- a/drivers/net/ethernet/broadcom/bgmac.c
++++ b/drivers/net/ethernet/broadcom/bgmac.c
+@@ -301,12 +301,16 @@ static int bgmac_dma_rx_read(struct bgma
+ bgmac_err(bgmac, "Found poisoned packet at slot %d, DMA issue!\n",
+ ring->start);
+ } else {
++ /* Omit CRC. */
++ len -= ETH_FCS_LEN;
++
+ new_skb = netdev_alloc_skb_ip_align(bgmac->net_dev, len);
+ if (new_skb) {
+ skb_put(new_skb, len);
+ skb_copy_from_linear_data_offset(skb, BGMAC_RX_FRAME_OFFSET,
+ new_skb->data,
+ len);
++ skb_checksum_none_assert(skb);
+ new_skb->protocol =
+ eth_type_trans(new_skb, bgmac->net_dev);
+ netif_receive_skb(new_skb);