From: Emmanuel Grumbach Date: Thu, 2 Nov 2017 08:02:04 +0000 (+0200) Subject: iwlwifi: print the version number of the firmware in hex X-Git-Tag: v5.15~9522^2~329^2~46^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=76c5bcb3941d5b35248c1f4bc05c50e0af2a03e7;p=platform%2Fkernel%2Flinux-starfive.git 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 Signed-off-by: Luca Coelho --- diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c index 4b224d7..de8f6ae 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c +++ b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c @@ -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: {