diff options
author | Jay Sternberg <jay.e.sternberg@intel.com> | 2009-07-31 17:28:09 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-08-04 16:44:23 -0400 |
commit | abdc2d62be335b85091e8f74081336563277a163 (patch) | |
tree | a3c1920fcf6845c27382959da690cef2f9fd02d0 | |
parent | a11c4d000b84f7f49ebefc018c24bbfa3c9c0f3b (diff) |
iwlwifi: remove duplicated version info from sysfs
version info in sysfs had been determined to be unnecessary as it
is already provided in syslog info. nvm version is added to syslog
version info as a debug level message to provide all info that was
in the version sysfs data.
Signed-off-by: Jay Sternberg <jay.e.sternberg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 40 |
1 files changed, 6 insertions, 34 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index 467c8617cb7d..db580cbf5982 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -1291,6 +1291,7 @@ static int iwl_read_ucode(struct iwl_priv *priv) | |||
1291 | size_t len; | 1291 | size_t len; |
1292 | u32 api_ver, build; | 1292 | u32 api_ver, build; |
1293 | u32 inst_size, data_size, init_size, init_data_size, boot_size; | 1293 | u32 inst_size, data_size, init_size, init_data_size, boot_size; |
1294 | u16 eeprom_ver; | ||
1294 | 1295 | ||
1295 | /* Ask kernel firmware_class module to get the boot firmware off disk. | 1296 | /* Ask kernel firmware_class module to get the boot firmware off disk. |
1296 | * request_firmware() is synchronous, file is in memory on return. */ | 1297 | * request_firmware() is synchronous, file is in memory on return. */ |
@@ -1368,6 +1369,11 @@ static int iwl_read_ucode(struct iwl_priv *priv) | |||
1368 | if (build) | 1369 | if (build) |
1369 | IWL_DEBUG_INFO(priv, "Build %u\n", build); | 1370 | IWL_DEBUG_INFO(priv, "Build %u\n", build); |
1370 | 1371 | ||
1372 | eeprom_ver = iwl_eeprom_query16(priv, EEPROM_VERSION); | ||
1373 | IWL_DEBUG_INFO(priv, "NVM Type: %s, version: 0x%x\n", | ||
1374 | (priv->nvm_device_type == NVM_DEVICE_TYPE_OTP) | ||
1375 | ? "OTP" : "EEPROM", eeprom_ver); | ||
1376 | |||
1371 | IWL_DEBUG_INFO(priv, "f/w package hdr ucode version raw = 0x%x\n", | 1377 | IWL_DEBUG_INFO(priv, "f/w package hdr ucode version raw = 0x%x\n", |
1372 | priv->ucode_ver); | 1378 | priv->ucode_ver); |
1373 | IWL_DEBUG_INFO(priv, "f/w package hdr runtime inst size = %u\n", | 1379 | IWL_DEBUG_INFO(priv, "f/w package hdr runtime inst size = %u\n", |
@@ -2483,39 +2489,6 @@ static DEVICE_ATTR(debug_level, S_IWUSR | S_IRUGO, | |||
2483 | #endif /* CONFIG_IWLWIFI_DEBUG */ | 2489 | #endif /* CONFIG_IWLWIFI_DEBUG */ |
2484 | 2490 | ||
2485 | 2491 | ||
2486 | static ssize_t show_version(struct device *d, | ||
2487 | struct device_attribute *attr, char *buf) | ||
2488 | { | ||
2489 | struct iwl_priv *priv = dev_get_drvdata(d); | ||
2490 | struct iwl_alive_resp *palive = &priv->card_alive; | ||
2491 | ssize_t pos = 0; | ||
2492 | u16 eeprom_ver; | ||
2493 | |||
2494 | if (palive->is_valid) | ||
2495 | pos += sprintf(buf + pos, | ||
2496 | "fw version: 0x%01X.0x%01X.0x%01X.0x%01X\n" | ||
2497 | "fw type: 0x%01X 0x%01X\n", | ||
2498 | palive->ucode_major, palive->ucode_minor, | ||
2499 | palive->sw_rev[0], palive->sw_rev[1], | ||
2500 | palive->ver_type, palive->ver_subtype); | ||
2501 | else | ||
2502 | pos += sprintf(buf + pos, "fw not loaded\n"); | ||
2503 | |||
2504 | if (priv->eeprom) { | ||
2505 | eeprom_ver = iwl_eeprom_query16(priv, EEPROM_VERSION); | ||
2506 | pos += sprintf(buf + pos, "NVM Type: %s, version: 0x%x\n", | ||
2507 | (priv->nvm_device_type == NVM_DEVICE_TYPE_OTP) | ||
2508 | ? "OTP" : "EEPROM", eeprom_ver); | ||
2509 | |||
2510 | } else { | ||
2511 | pos += sprintf(buf + pos, "EEPROM not initialzed\n"); | ||
2512 | } | ||
2513 | |||
2514 | return pos; | ||
2515 | } | ||
2516 | |||
2517 | static DEVICE_ATTR(version, S_IWUSR | S_IRUGO, show_version, NULL); | ||
2518 | |||
2519 | static ssize_t show_temperature(struct device *d, | 2492 | static ssize_t show_temperature(struct device *d, |
2520 | struct device_attribute *attr, char *buf) | 2493 | struct device_attribute *attr, char *buf) |
2521 | { | 2494 | { |
@@ -2779,7 +2752,6 @@ static struct attribute *iwl_sysfs_entries[] = { | |||
2779 | #ifdef CONFIG_IWLWIFI_DEBUG | 2752 | #ifdef CONFIG_IWLWIFI_DEBUG |
2780 | &dev_attr_debug_level.attr, | 2753 | &dev_attr_debug_level.attr, |
2781 | #endif | 2754 | #endif |
2782 | &dev_attr_version.attr, | ||
2783 | NULL | 2755 | NULL |
2784 | }; | 2756 | }; |
2785 | 2757 | ||