USB: usbmon: fix bug in mon_buff_area_shrink
[safe/jmp/linux-2.6] / drivers / net / atl1c / atl1c_ethtool.c
index 45c5b73..9b1e0ea 100644 (file)
@@ -232,11 +232,11 @@ static void atl1c_get_drvinfo(struct net_device *netdev,
 {
        struct atl1c_adapter *adapter = netdev_priv(netdev);
 
-       strncpy(drvinfo->driver,  atl1c_driver_name, sizeof(drvinfo->driver));
-       strncpy(drvinfo->version, atl1c_driver_version,
+       strlcpy(drvinfo->driver,  atl1c_driver_name, sizeof(drvinfo->driver));
+       strlcpy(drvinfo->version, atl1c_driver_version,
                sizeof(drvinfo->version));
-       strncpy(drvinfo->fw_version, "N/A", sizeof(drvinfo->fw_version));
-       strncpy(drvinfo->bus_info, pci_name(adapter->pdev),
+       strlcpy(drvinfo->fw_version, "N/A", sizeof(drvinfo->fw_version));
+       strlcpy(drvinfo->bus_info, pci_name(adapter->pdev),
                sizeof(drvinfo->bus_info));
        drvinfo->n_stats = 0;
        drvinfo->testinfo_len = 0;
@@ -271,7 +271,7 @@ static int atl1c_set_wol(struct net_device *netdev, struct ethtool_wolinfo *wol)
        struct atl1c_adapter *adapter = netdev_priv(netdev);
 
        if (wol->wolopts & (WAKE_ARP | WAKE_MAGICSECURE |
-                           WAKE_MCAST | WAKE_BCAST | WAKE_MCAST))
+                           WAKE_UCAST | WAKE_BCAST | WAKE_MCAST))
                return -EOPNOTSUPP;
        /* these settings will always override what we currently have */
        adapter->wol = 0;
@@ -281,6 +281,8 @@ static int atl1c_set_wol(struct net_device *netdev, struct ethtool_wolinfo *wol)
        if (wol->wolopts & WAKE_PHY)
                adapter->wol |= AT_WUFC_LNKC;
 
+       device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol);
+
        return 0;
 }
 
@@ -292,7 +294,7 @@ static int atl1c_nway_reset(struct net_device *netdev)
        return 0;
 }
 
-static struct ethtool_ops atl1c_ethtool_ops = {
+static const struct ethtool_ops atl1c_ethtool_ops = {
        .get_settings           = atl1c_get_settings,
        .set_settings           = atl1c_set_settings,
        .get_drvinfo            = atl1c_get_drvinfo,