1
0
mirror of https://github.com/corundum/corundum.git synced 2025-01-16 08:12:53 +08:00

Fix ethtool firmware version number reporting

This commit is contained in:
Alex Forencich 2022-01-10 11:18:58 -08:00
parent eba32ce8a5
commit 0f82e0c5f3

View File

@ -51,8 +51,9 @@ static void mqnic_get_drvinfo(struct net_device *ndev,
strscpy(drvinfo->driver, DRIVER_NAME, sizeof(drvinfo->driver));
strscpy(drvinfo->version, DRIVER_VERSION, sizeof(drvinfo->version));
snprintf(drvinfo->fw_version, sizeof(drvinfo->fw_version), "%d.%d",
mdev->fw_ver >> 16, mdev->fw_ver & 0xffff);
snprintf(drvinfo->fw_version, sizeof(drvinfo->fw_version), "%d.%d.%d.%d",
mdev->fw_ver >> 24, (mdev->fw_ver >> 16) & 0xff,
(mdev->fw_ver >> 8) & 0xff, mdev->fw_ver & 0xff);
strscpy(drvinfo->bus_info, dev_name(mdev->dev), sizeof(drvinfo->bus_info));
}