parent
9805096f48
commit
04af8bd108
@ -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);
|
@ -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);
|
Loading…
Reference in new issue