1 --- a/drivers/net/ethernet/atheros/atlx/atl1.c
2 +++ b/drivers/net/ethernet/atheros/atlx/atl1.c
3 @@ -2912,8 +2912,10 @@ static const struct net_device_ops atl1_
4 .ndo_validate_addr = eth_validate_addr,
5 .ndo_set_mac_address = atl1_set_mac,
6 .ndo_change_mtu = atl1_change_mtu,
7 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39))
8 .ndo_fix_features = atlx_fix_features,
9 .ndo_set_features = atlx_set_features,
10 +#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) */
11 .ndo_do_ioctl = atlx_ioctl,
12 .ndo_tx_timeout = atlx_tx_timeout,
13 #ifdef CONFIG_NET_POLL_CONTROLLER
14 @@ -3020,11 +3025,13 @@ static int atl1_probe(struct pci_dev *pd
15 netdev->features |= NETIF_F_SG;
16 netdev->features |= (NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_CTAG_RX);
18 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39))
19 netdev->hw_features = NETIF_F_HW_CSUM | NETIF_F_SG | NETIF_F_TSO |
20 NETIF_F_HW_VLAN_CTAG_RX;
22 /* is this valid? see atl1_setup_mac_ctrl() */
23 netdev->features |= NETIF_F_RXCSUM;
24 +#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) */
27 * patch for some L1 of old version,
28 @@ -3640,6 +3644,14 @@ static int atl1_set_pauseparam(struct ne
32 +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39))
33 +/* FIXME: is this right? -- CHS */
34 +static u32 atl1_get_rx_csum(struct net_device *netdev)
38 +#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)) */
40 static void atl1_get_strings(struct net_device *netdev, u32 stringset,
43 @@ -3712,4 +3724,10 @@ static const struct ethtool_ops atl1_eth
44 .nway_reset = atl1_nway_reset,
45 .get_ethtool_stats = atl1_get_ethtool_stats,
46 .get_sset_count = atl1_get_sset_count,
47 +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39))
48 + .get_rx_csum = atl1_get_rx_csum,
49 + .set_tx_csum = ethtool_op_set_tx_hw_csum,
50 + .set_sg = ethtool_op_set_sg,
51 + .set_tso = ethtool_op_set_tso,
52 +#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)) */