Skip to content

Commit

Permalink
r8169: Support RX-FCS flag.
Browse files Browse the repository at this point in the history
This allows the NIC to receive the Ethernet FCS
and pass it up the stack, allowing sniffers and
other interested programs to inspect the FCS.

Signed-off-by: Ben Greear <greearb@candelatech.com>
  • Loading branch information
Ben Greear authored and Jeff Kirsher committed Feb 24, 2012
1 parent 6bbe021 commit 79d0c1d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/net/ethernet/realtek/r8169.c
Original file line number Diff line number Diff line change
Expand Up @@ -4186,6 +4186,7 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
dev->hw_features &= ~NETIF_F_HW_VLAN_RX;

dev->hw_features |= NETIF_F_RXALL;
dev->hw_features |= NETIF_F_RXFCS;

tp->hw_start = cfg->hw_start;
tp->event_slow = cfg->event_slow;
Expand Down Expand Up @@ -5773,7 +5774,10 @@ static int rtl_rx(struct net_device *dev, struct rtl8169_private *tp, u32 budget

process_pkt:
addr = le64_to_cpu(desc->addr);
pkt_size = (status & 0x00003fff) - 4;
if (likely(!(dev->features & NETIF_F_RXFCS)))
pkt_size = (status & 0x00003fff) - 4;
else
pkt_size = status & 0x00003fff;

/*
* The driver does not support incoming fragmented
Expand Down

0 comments on commit 79d0c1d

Please sign in to comment.