summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/realtek
diff options
context:
space:
mode:
authorBen Greear <greearb@candelatech.com>2012-02-10 15:04:34 +0000
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2012-02-24 01:56:32 -0800
commit79d0c1d26e1eac0dc5b201e66b65cc5e4e706743 (patch)
tree919ebc8ef8156bbf6affcfab210166c90c673b67 /drivers/net/ethernet/realtek
parent6bbe021d405fff46b64a08dca51b06897b897a67 (diff)
r8169: Support RX-FCS flag.
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>
Diffstat (limited to 'drivers/net/ethernet/realtek')
-rw-r--r--drivers/net/ethernet/realtek/r8169.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
index 0517a6a252f1..fbd855bcd9f0 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -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;
@@ -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