iwlwifi: print the version number of the firmware in hex

Starting from a version 35, the minor version should be
printed in hexa.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
This commit is contained in:
Emmanuel Grumbach 2017-11-02 10:02:04 +02:00 committed by Luca Coelho
parent debdc23b17
commit 76c5bcb394
1 changed files with 8 additions and 3 deletions

View File

@ -919,9 +919,14 @@ static int iwl_parse_tlv_firmware(struct iwl_drv *drv,
minor = le32_to_cpup(ptr++);
local_comp = le32_to_cpup(ptr);
snprintf(drv->fw.fw_version,
sizeof(drv->fw.fw_version), "%u.%u.%u",
major, minor, local_comp);
if (major >= 35)
snprintf(drv->fw.fw_version,
sizeof(drv->fw.fw_version),
"%u.%08x.%u", major, minor, local_comp);
else
snprintf(drv->fw.fw_version,
sizeof(drv->fw.fw_version),
"%u.%u.%u", major, minor, local_comp);
break;
}
case IWL_UCODE_TLV_FW_DBG_DEST: {