iwlwifi: print the version number of the firmware in hex
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Thu, 2 Nov 2017 08:02:04 +0000 (10:02 +0200)
committerLuca Coelho <luciano.coelho@intel.com>
Sat, 25 Nov 2017 15:52:17 +0000 (17:52 +0200)
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>
drivers/net/wireless/intel/iwlwifi/iwl-drv.c

index 4b224d7..de8f6ae 100644 (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: {