diff options
Diffstat (limited to 'drivers/net/ethernet/intel/e1000e/ethtool.c')
-rw-r--r-- | drivers/net/ethernet/intel/e1000e/ethtool.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/net/ethernet/intel/e1000e/ethtool.c b/drivers/net/ethernet/intel/e1000e/ethtool.c index 69c9d2199140..6d8f0ed33214 100644 --- a/drivers/net/ethernet/intel/e1000e/ethtool.c +++ b/drivers/net/ethernet/intel/e1000e/ethtool.c | |||
@@ -579,26 +579,24 @@ static void e1000_get_drvinfo(struct net_device *netdev, | |||
579 | struct ethtool_drvinfo *drvinfo) | 579 | struct ethtool_drvinfo *drvinfo) |
580 | { | 580 | { |
581 | struct e1000_adapter *adapter = netdev_priv(netdev); | 581 | struct e1000_adapter *adapter = netdev_priv(netdev); |
582 | char firmware_version[32]; | ||
583 | 582 | ||
584 | strncpy(drvinfo->driver, e1000e_driver_name, | 583 | strlcpy(drvinfo->driver, e1000e_driver_name, |
585 | sizeof(drvinfo->driver) - 1); | 584 | sizeof(drvinfo->driver)); |
586 | strncpy(drvinfo->version, e1000e_driver_version, | 585 | strncpy(drvinfo->version, e1000e_driver_version, |
587 | sizeof(drvinfo->version) - 1); | 586 | sizeof(drvinfo->version)); |
588 | 587 | ||
589 | /* | 588 | /* |
590 | * EEPROM image version # is reported as firmware version # for | 589 | * EEPROM image version # is reported as firmware version # for |
591 | * PCI-E controllers | 590 | * PCI-E controllers |
592 | */ | 591 | */ |
593 | snprintf(firmware_version, sizeof(firmware_version), "%d.%d-%d", | 592 | snprintf(drvinfo->fw_version, sizeof(drvinfo->fw_version), |
593 | "%d.%d-%d", | ||
594 | (adapter->eeprom_vers & 0xF000) >> 12, | 594 | (adapter->eeprom_vers & 0xF000) >> 12, |
595 | (adapter->eeprom_vers & 0x0FF0) >> 4, | 595 | (adapter->eeprom_vers & 0x0FF0) >> 4, |
596 | (adapter->eeprom_vers & 0x000F)); | 596 | (adapter->eeprom_vers & 0x000F)); |
597 | 597 | ||
598 | strncpy(drvinfo->fw_version, firmware_version, | 598 | strlcpy(drvinfo->bus_info, pci_name(adapter->pdev), |
599 | sizeof(drvinfo->fw_version) - 1); | 599 | sizeof(drvinfo->bus_info)); |
600 | strncpy(drvinfo->bus_info, pci_name(adapter->pdev), | ||
601 | sizeof(drvinfo->bus_info) - 1); | ||
602 | drvinfo->regdump_len = e1000_get_regs_len(netdev); | 600 | drvinfo->regdump_len = e1000_get_regs_len(netdev); |
603 | drvinfo->eedump_len = e1000_get_eeprom_len(netdev); | 601 | drvinfo->eedump_len = e1000_get_eeprom_len(netdev); |
604 | } | 602 | } |