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>
This commit is contained in:
committed by
David S. Miller
parent
b2a431915d
commit
02e711276d
@@ -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",
|
bgmac_err(bgmac, "Found poisoned packet at slot %d, DMA issue!\n",
|
||||||
ring->start);
|
ring->start);
|
||||||
} else {
|
} else {
|
||||||
|
/* Omit CRC. */
|
||||||
|
len -= ETH_FCS_LEN;
|
||||||
|
|
||||||
new_skb = netdev_alloc_skb_ip_align(bgmac->net_dev, len);
|
new_skb = netdev_alloc_skb_ip_align(bgmac->net_dev, len);
|
||||||
if (new_skb) {
|
if (new_skb) {
|
||||||
skb_put(new_skb, len);
|
skb_put(new_skb, len);
|
||||||
skb_copy_from_linear_data_offset(skb, BGMAC_RX_FRAME_OFFSET,
|
skb_copy_from_linear_data_offset(skb, BGMAC_RX_FRAME_OFFSET,
|
||||||
new_skb->data,
|
new_skb->data,
|
||||||
len);
|
len);
|
||||||
|
skb_checksum_none_assert(skb);
|
||||||
new_skb->protocol =
|
new_skb->protocol =
|
||||||
eth_type_trans(new_skb, bgmac->net_dev);
|
eth_type_trans(new_skb, bgmac->net_dev);
|
||||||
netif_receive_skb(new_skb);
|
netif_receive_skb(new_skb);
|
||||||
|
Reference in New Issue
Block a user