diff options
author | Michał Mirosław <mirq-linux@rere.qmqm.pl> | 2011-04-15 00:50:49 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-04-15 18:50:39 -0400 |
commit | 6de240b7f714d63ca2a53d52c7eefb37e7eb3f1b (patch) | |
tree | 999bda93edb96c1010fec51e51bb0e44c911f998 /drivers/net/spider_net.c | |
parent | 911cb193f3eb0370f20fbba712211e55ffede4de (diff) |
net: spider_net: convert to hw_features
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/spider_net.c')
-rw-r--r-- | drivers/net/spider_net.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/net/spider_net.c b/drivers/net/spider_net.c index cb6bcca9d541..949f124e1278 100644 --- a/drivers/net/spider_net.c +++ b/drivers/net/spider_net.c | |||
@@ -994,15 +994,13 @@ spider_net_pass_skb_up(struct spider_net_descr *descr, | |||
994 | skb->protocol = eth_type_trans(skb, netdev); | 994 | skb->protocol = eth_type_trans(skb, netdev); |
995 | 995 | ||
996 | /* checksum offload */ | 996 | /* checksum offload */ |
997 | if (card->options.rx_csum) { | 997 | skb_checksum_none_assert(skb); |
998 | if (netdev->features & NETIF_F_RXCSUM) { | ||
998 | if ( ( (data_status & SPIDER_NET_DATA_STATUS_CKSUM_MASK) == | 999 | if ( ( (data_status & SPIDER_NET_DATA_STATUS_CKSUM_MASK) == |
999 | SPIDER_NET_DATA_STATUS_CKSUM_MASK) && | 1000 | SPIDER_NET_DATA_STATUS_CKSUM_MASK) && |
1000 | !(data_error & SPIDER_NET_DATA_ERR_CKSUM_MASK)) | 1001 | !(data_error & SPIDER_NET_DATA_ERR_CKSUM_MASK)) |
1001 | skb->ip_summed = CHECKSUM_UNNECESSARY; | 1002 | skb->ip_summed = CHECKSUM_UNNECESSARY; |
1002 | else | 1003 | } |
1003 | skb_checksum_none_assert(skb); | ||
1004 | } else | ||
1005 | skb_checksum_none_assert(skb); | ||
1006 | 1004 | ||
1007 | if (data_status & SPIDER_NET_VLAN_PACKET) { | 1005 | if (data_status & SPIDER_NET_VLAN_PACKET) { |
1008 | /* further enhancements: HW-accel VLAN | 1006 | /* further enhancements: HW-accel VLAN |
@@ -2322,14 +2320,15 @@ spider_net_setup_netdev(struct spider_net_card *card) | |||
2322 | card->aneg_timer.function = spider_net_link_phy; | 2320 | card->aneg_timer.function = spider_net_link_phy; |
2323 | card->aneg_timer.data = (unsigned long) card; | 2321 | card->aneg_timer.data = (unsigned long) card; |
2324 | 2322 | ||
2325 | card->options.rx_csum = SPIDER_NET_RX_CSUM_DEFAULT; | ||
2326 | |||
2327 | netif_napi_add(netdev, &card->napi, | 2323 | netif_napi_add(netdev, &card->napi, |
2328 | spider_net_poll, SPIDER_NET_NAPI_WEIGHT); | 2324 | spider_net_poll, SPIDER_NET_NAPI_WEIGHT); |
2329 | 2325 | ||
2330 | spider_net_setup_netdev_ops(netdev); | 2326 | spider_net_setup_netdev_ops(netdev); |
2331 | 2327 | ||
2332 | netdev->features = NETIF_F_IP_CSUM | NETIF_F_LLTX; | 2328 | netdev->hw_features = NETIF_F_RXCSUM | NETIF_F_IP_CSUM; |
2329 | if (SPIDER_NET_RX_CSUM_DEFAULT) | ||
2330 | netdev->features |= NETIF_F_RXCSUM; | ||
2331 | netdev->features |= NETIF_F_IP_CSUM | NETIF_F_LLTX; | ||
2333 | /* some time: NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX | | 2332 | /* some time: NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX | |
2334 | * NETIF_F_HW_VLAN_FILTER */ | 2333 | * NETIF_F_HW_VLAN_FILTER */ |
2335 | 2334 | ||