From: Ben Greear Date: Tue, 6 Mar 2012 09:41:53 +0000 (+0000) Subject: igb: Support sending custom Ethernet FCS. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6b8f092284672c6504ed215052bfee6b7171411e;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git igb: Support sending custom Ethernet FCS. Including bad FCS, used generate frames with bad FCS to test other system's handling of RX of bad packets. Signed-off-by: Ben Greear Tested-by: Jeff Pieper Signed-off-by: Jeff Kirsher --- diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c index e96cef89f121..99364edf0314 100644 --- a/drivers/net/ethernet/intel/igb/igb_main.c +++ b/drivers/net/ethernet/intel/igb/igb_main.c @@ -1964,6 +1964,8 @@ static int __devinit igb_probe(struct pci_dev *pdev, NETIF_F_IPV6_CSUM | NETIF_F_SG; + netdev->priv_flags |= IFF_SUPP_NOFCS; + if (pci_using_dac) { netdev->features |= NETIF_F_HIGHDMA; netdev->vlan_features |= NETIF_F_HIGHDMA; @@ -4293,6 +4295,8 @@ static void igb_tx_map(struct igb_ring *tx_ring, /* write last descriptor with RS and EOP bits */ cmd_type |= cpu_to_le32(size) | cpu_to_le32(IGB_TXD_DCMD); + if (unlikely(skb->no_fcs)) + cmd_type &= ~(cpu_to_le32(E1000_ADVTXD_DCMD_IFCS)); tx_desc->read.cmd_type_len = cmd_type; /* set the timestamp */