Skip to content

Commit

Permalink
igb: Support sending custom Ethernet FCS.
Browse files Browse the repository at this point in the history
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 <greearb@candelatech.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
  • Loading branch information
Ben Greear authored and Jeff Kirsher committed Mar 17, 2012
1 parent 126a3fd commit 6b8f092
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/net/ethernet/intel/igb/igb_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 */
Expand Down

0 comments on commit 6b8f092

Please sign in to comment.