aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2010-04-28 15:09:12 -0400
committerReinette Chatre <reinette.chatre@intel.com>2010-05-10 18:08:53 -0400
commit3e4de7616fea5c68a9300af0e347a7f014ddcc63 (patch)
tree5436d7b0ea4b47124baad66cbf86681f89ccddea /drivers/net
parent1fa61b2e793dad51271c7ce39377daade51261d7 (diff)
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: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index dd1324d6f4c0..f9c9c08ab88e 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -1552,6 +1552,7 @@ static void iwl_ucode_callback(const struct firmware *ucode_raw, void *context)
1552 u32 inst_size, data_size, init_size, init_data_size, boot_size; 1552 u32 inst_size, data_size, init_size, init_data_size, boot_size;
1553 int err; 1553 int err;
1554 u16 eeprom_ver; 1554 u16 eeprom_ver;
1555 char buildstr[25];
1555 1556
1556 if (!ucode_raw) { 1557 if (!ucode_raw) {
1557 IWL_ERR(priv, "request for firmware file '%s' failed.\n", 1558 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 "from http://www.intellinuxwireless.org.\n", 1600 "from http://www.intellinuxwireless.org.\n",
1600 api_max, api_ver); 1601 api_max, api_ver);
1601 1602
1602 IWL_INFO(priv, "loaded firmware version %u.%u.%u.%u\n", 1603 if (build)
1603 IWL_UCODE_MAJOR(priv->ucode_ver), 1604 sprintf(buildstr, " build %u", build);
1604 IWL_UCODE_MINOR(priv->ucode_ver), 1605 else
1605 IWL_UCODE_API(priv->ucode_ver), 1606 buildstr[0] = '\0';
1606 IWL_UCODE_SERIAL(priv->ucode_ver)); 1607
1608 IWL_INFO(priv, "loaded firmware version %u.%u.%u.%u%s\n",
1609 IWL_UCODE_MAJOR(priv->ucode_ver),
1610 IWL_UCODE_MINOR(priv->ucode_ver),
1611 IWL_UCODE_API(priv->ucode_ver),
1612 IWL_UCODE_SERIAL(priv->ucode_ver),
1613 buildstr);
1607 1614
1608 snprintf(priv->hw->wiphy->fw_version, 1615 snprintf(priv->hw->wiphy->fw_version,
1609 sizeof(priv->hw->wiphy->fw_version), 1616 sizeof(priv->hw->wiphy->fw_version),
1610 "%u.%u.%u.%u", 1617 "%u.%u.%u.%u%s",
1611 IWL_UCODE_MAJOR(priv->ucode_ver), 1618 IWL_UCODE_MAJOR(priv->ucode_ver),
1612 IWL_UCODE_MINOR(priv->ucode_ver), 1619 IWL_UCODE_MINOR(priv->ucode_ver),
1613 IWL_UCODE_API(priv->ucode_ver), 1620 IWL_UCODE_API(priv->ucode_ver),
1614 IWL_UCODE_SERIAL(priv->ucode_ver)); 1621 IWL_UCODE_SERIAL(priv->ucode_ver),
1615 1622 buildstr);
1616 if (build)
1617 IWL_DEBUG_INFO(priv, "Build %u\n", build);
1618 1623
1619 eeprom_ver = iwl_eeprom_query16(priv, EEPROM_VERSION); 1624 eeprom_ver = iwl_eeprom_query16(priv, EEPROM_VERSION);
1620 IWL_DEBUG_INFO(priv, "NVM Type: %s, version: 0x%x\n", 1625 IWL_DEBUG_INFO(priv, "NVM Type: %s, version: 0x%x\n",