X-Git-Url: http://bbs.cooldavid.org/git/?a=blobdiff_plain;ds=sidebyside;f=jme.c;h=2dd1ac7ba34a5ea797cfba23d0a817a72734218a;hb=1a0b42f41b88ca2b74138c83fb0d5485bb84b421;hp=0c7720817a5c286f9f8dbf27d0173a9be7d68554;hpb=a82e368cd73298926df536929339cfbdb802878c;p=jme.git diff --git a/jme.c b/jme.c index 0c77208..2dd1ac7 100644 --- a/jme.c +++ b/jme.c @@ -2150,21 +2150,13 @@ jme_change_mtu(struct net_device *netdev, int new_mtu) } if (new_mtu > 1900) { - netdev->features &= ~(NETIF_F_HW_CSUM | - NETIF_F_TSO -#ifdef NETIF_F_TSO6 - | NETIF_F_TSO6 -#endif - ); + netdev->features &= ~(NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM | + NETIF_F_TSO | NETIF_F_TSO6); } else { if (test_bit(JME_FLAG_TXCSUM, &jme->flags)) - netdev->features |= NETIF_F_HW_CSUM; + netdev->features |= NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM; if (test_bit(JME_FLAG_TSO, &jme->flags)) - netdev->features |= NETIF_F_TSO -#ifdef NETIF_F_TSO6 - | NETIF_F_TSO6 -#endif - ; + netdev->features |= NETIF_F_TSO | NETIF_F_TSO6; } netdev->mtu = new_mtu; @@ -2613,10 +2605,12 @@ jme_set_tx_csum(struct net_device *netdev, u32 on) if (on) { set_bit(JME_FLAG_TXCSUM, &jme->flags); if (netdev->mtu <= 1900) - netdev->features |= NETIF_F_HW_CSUM; + netdev->features |= + NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM; } else { clear_bit(JME_FLAG_TXCSUM, &jme->flags); - netdev->features &= ~NETIF_F_HW_CSUM; + netdev->features &= + ~(NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM); } return 0; @@ -2630,18 +2624,10 @@ jme_set_tso(struct net_device *netdev, u32 on) if (on) { set_bit(JME_FLAG_TSO, &jme->flags); if (netdev->mtu <= 1900) - netdev->features |= NETIF_F_TSO -#ifdef NETIF_F_TSO6 - | NETIF_F_TSO6 -#endif - ; + netdev->features |= NETIF_F_TSO | NETIF_F_TSO6; } else { clear_bit(JME_FLAG_TSO, &jme->flags); - netdev->features &= ~(NETIF_F_TSO -#ifdef NETIF_F_TSO6 - | NETIF_F_TSO6 -#endif - ); + netdev->features &= ~(NETIF_F_TSO | NETIF_F_TSO6); } return 0; @@ -2949,12 +2935,11 @@ jme_init_one(struct pci_dev *pdev, #endif netdev->ethtool_ops = &jme_ethtool_ops; netdev->watchdog_timeo = TX_TIMEOUT; - netdev->features = NETIF_F_HW_CSUM | + netdev->features = NETIF_F_IP_CSUM | + NETIF_F_IPV6_CSUM | NETIF_F_SG | NETIF_F_TSO | -#ifdef NETIF_F_TSO6 NETIF_F_TSO6 | -#endif NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; if (using_dac) @@ -3109,11 +3094,7 @@ jme_init_one(struct pci_dev *pdev, * Tell stack that we are not ready to work until open() */ netif_carrier_off(netdev); - netif_stop_queue(netdev); - /* - * Register netdev - */ rc = register_netdev(netdev); if (rc) { pr_err("Cannot register net device\n");