~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to drivers/net/spider_net.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
994
994
        skb->protocol = eth_type_trans(skb, netdev);
995
995
 
996
996
        /* checksum offload */
997
 
        if (card->options.rx_csum) {
 
997
        skb_checksum_none_assert(skb);
 
998
        if (netdev->features & NETIF_F_RXCSUM) {
998
999
                if ( ( (data_status & SPIDER_NET_DATA_STATUS_CKSUM_MASK) ==
999
1000
                       SPIDER_NET_DATA_STATUS_CKSUM_MASK) &&
1000
1001
                     !(data_error & SPIDER_NET_DATA_ERR_CKSUM_MASK))
1001
1002
                        skb->ip_summed = CHECKSUM_UNNECESSARY;
1002
 
                else
1003
 
                        skb_checksum_none_assert(skb);
1004
 
        } else
1005
 
                skb_checksum_none_assert(skb);
 
1003
        }
1006
1004
 
1007
1005
        if (data_status & SPIDER_NET_VLAN_PACKET) {
1008
1006
                /* further enhancements: HW-accel VLAN
2322
2320
        card->aneg_timer.function = spider_net_link_phy;
2323
2321
        card->aneg_timer.data = (unsigned long) card;
2324
2322
 
2325
 
        card->options.rx_csum = SPIDER_NET_RX_CSUM_DEFAULT;
2326
 
 
2327
2323
        netif_napi_add(netdev, &card->napi,
2328
2324
                       spider_net_poll, SPIDER_NET_NAPI_WEIGHT);
2329
2325
 
2330
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
2332
        /* some time: NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX |
2334
2333
         *              NETIF_F_HW_VLAN_FILTER */
2335
2334