Commit 3e4de761 authored by Johannes Berg's avatar Johannes Berg Committed by Reinette Chatre

iwlagn: show and store firmware build number

We currently display the build number only if debugging
is enabled, but it is really helpful so show it all the
time. Also store it so it can be retrieved later via
ethtool.
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarReinette Chatre <reinette.chatre@intel.com>
parent 1fa61b2e
...@@ -1552,6 +1552,7 @@ static void iwl_ucode_callback(const struct firmware *ucode_raw, void *context) ...@@ -1552,6 +1552,7 @@ static void iwl_ucode_callback(const struct firmware *ucode_raw, void *context)
u32 inst_size, data_size, init_size, init_data_size, boot_size; u32 inst_size, data_size, init_size, init_data_size, boot_size;
int err; int err;
u16 eeprom_ver; u16 eeprom_ver;
char buildstr[25];
if (!ucode_raw) { if (!ucode_raw) {
IWL_ERR(priv, "request for firmware file '%s' failed.\n", IWL_ERR(priv, "request for firmware file '%s' failed.\n",
...@@ -1599,22 +1600,26 @@ static void iwl_ucode_callback(const struct firmware *ucode_raw, void *context) ...@@ -1599,22 +1600,26 @@ static void iwl_ucode_callback(const struct firmware *ucode_raw, void *context)
"from http://www.intellinuxwireless.org.\n", "from http://www.intellinuxwireless.org.\n",
api_max, api_ver); api_max, api_ver);
IWL_INFO(priv, "loaded firmware version %u.%u.%u.%u\n", if (build)
sprintf(buildstr, " build %u", build);
else
buildstr[0] = '\0';
IWL_INFO(priv, "loaded firmware version %u.%u.%u.%u%s\n",
IWL_UCODE_MAJOR(priv->ucode_ver), IWL_UCODE_MAJOR(priv->ucode_ver),
IWL_UCODE_MINOR(priv->ucode_ver), IWL_UCODE_MINOR(priv->ucode_ver),
IWL_UCODE_API(priv->ucode_ver), IWL_UCODE_API(priv->ucode_ver),
IWL_UCODE_SERIAL(priv->ucode_ver)); IWL_UCODE_SERIAL(priv->ucode_ver),
buildstr);
snprintf(priv->hw->wiphy->fw_version, snprintf(priv->hw->wiphy->fw_version,
sizeof(priv->hw->wiphy->fw_version), sizeof(priv->hw->wiphy->fw_version),
"%u.%u.%u.%u", "%u.%u.%u.%u%s",
IWL_UCODE_MAJOR(priv->ucode_ver), IWL_UCODE_MAJOR(priv->ucode_ver),
IWL_UCODE_MINOR(priv->ucode_ver), IWL_UCODE_MINOR(priv->ucode_ver),
IWL_UCODE_API(priv->ucode_ver), IWL_UCODE_API(priv->ucode_ver),
IWL_UCODE_SERIAL(priv->ucode_ver)); IWL_UCODE_SERIAL(priv->ucode_ver),
buildstr);
if (build)
IWL_DEBUG_INFO(priv, "Build %u\n", build);
eeprom_ver = iwl_eeprom_query16(priv, EEPROM_VERSION); eeprom_ver = iwl_eeprom_query16(priv, EEPROM_VERSION);
IWL_DEBUG_INFO(priv, "NVM Type: %s, version: 0x%x\n", IWL_DEBUG_INFO(priv, "NVM Type: %s, version: 0x%x\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment