Staging: hv: remove use of internal list routines in RndisFilter
[safe/jmp/linux-2.6] / drivers / staging / sxg / sxg_ethtool.c
index 63d1258..f5a0706 100644 (file)
@@ -159,7 +159,6 @@ sxg_nic_get_strings(struct net_device *netdev, u32 stringset, u8 * data)
 
        switch(stringset) {
        case ETH_SS_TEST:
-               /* return -EOPNOTSUPP; */
                break;
        case ETH_SS_STATS:
                for (index = 0; index < SXG_NIC_STATS_LEN; index++) {
@@ -222,7 +221,7 @@ static int sxg_nic_get_settings(struct net_device *netdev,
 static u32 sxg_nic_get_rx_csum(struct net_device *netdev)
 {
        struct adapter_t *adapter = netdev_priv(netdev);
-       return ((adapter->flags & SXG_RCV_IP_CSUM_ENABLED) ||
+       return ((adapter->flags & SXG_RCV_IP_CSUM_ENABLED) &&
                 (adapter->flags & SXG_RCV_TCP_CSUM_ENABLED));
 }
 
@@ -233,9 +232,10 @@ static int sxg_nic_set_rx_csum(struct net_device *netdev, u32 data)
                adapter->flags |= SXG_RCV_IP_CSUM_ENABLED;
        else
                adapter->flags &= ~SXG_RCV_IP_CSUM_ENABLED;
-
-       /* Reset the card here (call the reset functions .. currently unavailable)*/
-
+       /*
+        * We dont need to write to the card to do checksums.
+        * It does it anyways.
+        */
        return 0;
 }
 
@@ -257,14 +257,6 @@ static void sxg_nic_get_regs(struct net_device *netdev,
        memcpy((buff+sizeof(struct sxg_hw_regs)), UcodeRegs, sizeof(struct sxg_ucode_regs));
 }
 
-static void sxg_nic_get_wol(struct net_device *netdev,
-                           struct ethtool_wolinfo *wol)
-{
-       /* We dont support wake-on-lan */
-       wol->supported = 0;
-       memset(&wol->sopass, 0, sizeof(wol->sopass));
-}
-
 static int sxg_nic_get_eeprom_len(struct net_device *netdev)
 {
        return (USER_VIEWABLE_EEPROM_SIZE);
@@ -286,7 +278,7 @@ static int sxg_nic_get_eeprom(struct net_device *netdev,
                  * Get out of here
                  */
                 printk(KERN_ERR"%s : Could not allocate memory for reading \
-                                EEPROM\n", __FUNCTION__);
+                                EEPROM\n", __func__);
                 return -ENOMEM;
         }
 
@@ -308,17 +300,16 @@ static int sxg_nic_get_eeprom(struct net_device *netdev,
        return 0;
 }
 
-struct ethtool_ops sxg_nic_ethtool_ops = {
+const struct ethtool_ops sxg_nic_ethtool_ops = {
        .get_settings = sxg_nic_get_settings,
        .set_settings = sxg_nic_set_settings,
        .get_drvinfo = sxg_nic_get_drvinfo,
        .get_regs_len = sxg_nic_get_regs_len,
        .get_regs = sxg_nic_get_regs,
        .get_link = ethtool_op_get_link,
-       .get_wol = sxg_nic_get_wol,
+//     .get_wol = sxg_nic_get_wol,
        .get_eeprom_len = sxg_nic_get_eeprom_len,
        .get_eeprom = sxg_nic_get_eeprom,
-//     .get_ringparam = sxg_nic_get_ringparam,
 //     .get_pauseparam = sxg_nic_get_pauseparam,
 //     .set_pauseparam = sxg_nic_set_pauseparam,
        .set_tx_csum = ethtool_op_set_tx_csum,