aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/broadcom/bgmac.c
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2013-02-28 07:16:54 +0000
committerDavid S. Miller <davem@davemloft.net>2013-02-28 15:37:30 -0500
commit02e711276d444343656c25b91b42996c62726712 (patch)
treef898d6d6cc38ccd16b722074c67e8bb82d6498d4 /drivers/net/ethernet/broadcom/bgmac.c
parentb2a431915d19893f047e0dd149d0c1b9d2a0b960 (diff)
downloadkernel_goldelico_gta04-02e711276d444343656c25b91b42996c62726712.zip
kernel_goldelico_gta04-02e711276d444343656c25b91b42996c62726712.tar.gz
kernel_goldelico_gta04-02e711276d444343656c25b91b42996c62726712.tar.bz2
bgmac: omit the fcs
Do not include the frame check sequence when adding the skb to netif_receive_skb(). This causes problems when this interface was bridged to a wifi ap and a big package should be forwarded from this Ethernet driver through a bride to the wifi client. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/bgmac.c')
-rw-r--r--drivers/net/ethernet/broadcom/bgmac.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/broadcom/bgmac.c b/drivers/net/ethernet/broadcom/bgmac.c
index bf985c0..bce30e7 100644
--- 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 bgmac *bgmac, struct bgmac_dma_ring *ring,
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);