ethtool: fix drvinfo strings set in drivers
[deliverable/linux.git] / drivers / net / ethernet / marvell / pxa168_eth.c
index 10d678d3dd018bf40d4ca857459de4c81cd438d6..c7f2fa60fe6f221538c211955d1550721d529dc1 100644 (file)
@@ -627,7 +627,6 @@ static int pxa168_eth_set_mac_address(struct net_device *dev, void *addr)
        if (!is_valid_ether_addr(sa->sa_data))
                return -EADDRNOTAVAIL;
        memcpy(oldMac, dev->dev_addr, ETH_ALEN);
-       dev->addr_assign_type &= ~NET_ADDR_RANDOM;
        memcpy(dev->dev_addr, sa->sa_data, ETH_ALEN);
        netif_addr_lock_bh(dev);
        update_hash_table_mac_address(pep, oldMac, dev->dev_addr);
@@ -1444,10 +1443,10 @@ static int pxa168_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
 static void pxa168_get_drvinfo(struct net_device *dev,
                               struct ethtool_drvinfo *info)
 {
-       strncpy(info->driver, DRIVER_NAME, 32);
-       strncpy(info->version, DRIVER_VERSION, 32);
-       strncpy(info->fw_version, "N/A", 32);
-       strncpy(info->bus_info, "N/A", 32);
+       strlcpy(info->driver, DRIVER_NAME, sizeof(info->driver));
+       strlcpy(info->version, DRIVER_VERSION, sizeof(info->version));
+       strlcpy(info->fw_version, "N/A", sizeof(info->fw_version));
+       strlcpy(info->bus_info, "N/A", sizeof(info->bus_info));
 }
 
 static const struct ethtool_ops pxa168_ethtool_ops = {
This page took 0.027037 seconds and 5 git commands to generate.