diff options
author | Santiago Leon <santil@linux.vnet.ibm.com> | 2010-09-03 14:28:47 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-09-06 21:21:49 -0400 |
commit | bc4c6f54e4e9971717d84c630acef0c7c3c75a97 (patch) | |
tree | b7c41670c2337107486848c44a699b3c40699edf /drivers/net/ibmveth.c | |
parent | 0c26b6775f36ce447722e8752bc3a006ec832df3 (diff) |
ibmveth: Remove duplicate checksum offload setup code
Remove code in the device probe function where we set up the checksum
offload feature and replace it with a call to an existing function that
is doing the same. This is done to clean up the driver in preparation
of adding IPv6 checksum offload support.
Signed-off-by: Robert Jennings <rcj@linux.vnet.ibm.com>
Signed-off-by: Santiago Leon <santil@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ibmveth.c')
-rw-r--r-- | drivers/net/ibmveth.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/drivers/net/ibmveth.c b/drivers/net/ibmveth.c index 1685e230a389..ab80d8fcccbf 100644 --- a/drivers/net/ibmveth.c +++ b/drivers/net/ibmveth.c | |||
@@ -1338,10 +1338,8 @@ static const struct net_device_ops ibmveth_netdev_ops = { | |||
1338 | static int __devinit ibmveth_probe(struct vio_dev *dev, const struct vio_device_id *id) | 1338 | static int __devinit ibmveth_probe(struct vio_dev *dev, const struct vio_device_id *id) |
1339 | { | 1339 | { |
1340 | int rc, i; | 1340 | int rc, i; |
1341 | long ret; | ||
1342 | struct net_device *netdev; | 1341 | struct net_device *netdev; |
1343 | struct ibmveth_adapter *adapter; | 1342 | struct ibmveth_adapter *adapter; |
1344 | unsigned long set_attr, ret_attr; | ||
1345 | 1343 | ||
1346 | unsigned char *mac_addr_p; | 1344 | unsigned char *mac_addr_p; |
1347 | unsigned int *mcastFilterSize_p; | 1345 | unsigned int *mcastFilterSize_p; |
@@ -1425,21 +1423,7 @@ static int __devinit ibmveth_probe(struct vio_dev *dev, const struct vio_device_ | |||
1425 | 1423 | ||
1426 | ibmveth_debug_printk("registering netdev...\n"); | 1424 | ibmveth_debug_printk("registering netdev...\n"); |
1427 | 1425 | ||
1428 | ret = h_illan_attributes(dev->unit_address, 0, 0, &ret_attr); | 1426 | ibmveth_set_csum_offload(netdev, 1, ibmveth_set_tx_csum_flags); |
1429 | |||
1430 | if (ret == H_SUCCESS && !(ret_attr & IBMVETH_ILLAN_ACTIVE_TRUNK) && | ||
1431 | !(ret_attr & IBMVETH_ILLAN_TRUNK_PRI_MASK) && | ||
1432 | (ret_attr & IBMVETH_ILLAN_PADDED_PKT_CSUM)) { | ||
1433 | set_attr = IBMVETH_ILLAN_IPV4_TCP_CSUM; | ||
1434 | |||
1435 | ret = h_illan_attributes(dev->unit_address, 0, set_attr, &ret_attr); | ||
1436 | |||
1437 | if (ret == H_SUCCESS) { | ||
1438 | adapter->rx_csum = 1; | ||
1439 | netdev->features |= NETIF_F_IP_CSUM; | ||
1440 | } else | ||
1441 | ret = h_illan_attributes(dev->unit_address, set_attr, 0, &ret_attr); | ||
1442 | } | ||
1443 | 1427 | ||
1444 | rc = register_netdev(netdev); | 1428 | rc = register_netdev(netdev); |
1445 | 1429 | ||