diff options
author | Stephen Hemminger <shemminger@linux-foundation.org> | 2007-06-11 22:35:23 +0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-06-21 03:09:33 +0400 |
commit | 3a2c892daaf54b31a70785c2821771e8094188ed (patch) | |
tree | 36ff4915ef938d70a398c282d7628a26126c43fb /drivers/net/spider_net.c | |
parent | 128c6e2e519fe7d0a15de04f3dde00700145cec4 (diff) | |
download | linux-3a2c892daaf54b31a70785c2821771e8094188ed.tar.xz |
spidernet: checksum and ethtool
It doesn't look like spidernet hardware can really checksum all protocols,
the code looks like it does IPV4 only. If so, it should use NETIF_F_IP_CSUM
instead of NETIF_F_HW_CSUM.
The driver doesn't need it's own get/set for ethtool tx csum, and it
should use the standard ethtool_op_get_link.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/spider_net.c')
-rw-r--r-- | drivers/net/spider_net.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/spider_net.c b/drivers/net/spider_net.c index 0e79bacd7870..7a4aa6a9f949 100644 --- a/drivers/net/spider_net.c +++ b/drivers/net/spider_net.c @@ -718,7 +718,7 @@ spider_net_prepare_tx_descr(struct spider_net_card *card, SPIDER_NET_DESCR_CARDOWNED | SPIDER_NET_DMAC_NOCS; spin_unlock_irqrestore(&chain->lock, flags); - if (skb->protocol == htons(ETH_P_IP) && skb->ip_summed == CHECKSUM_PARTIAL) + if (skb->ip_summed == CHECKSUM_PARTIAL) switch (ip_hdr(skb)->protocol) { case IPPROTO_TCP: hwdescr->dmac_cmd_status |= SPIDER_NET_DMAC_TCP; @@ -2260,7 +2260,7 @@ spider_net_setup_netdev(struct spider_net_card *card) spider_net_setup_netdev_ops(netdev); - netdev->features = NETIF_F_HW_CSUM | NETIF_F_LLTX; + netdev->features = NETIF_F_IP_CSUM | NETIF_F_LLTX; /* some time: NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX | * NETIF_F_HW_VLAN_FILTER */ |