Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 159389
b: refs/heads/master
c: abdc2d6
h: refs/heads/master
i:
  159387: b0e20cf
v: v3
  • Loading branch information
Jay Sternberg authored and John W. Linville committed Aug 4, 2009
1 parent c92cd12 commit 86284e1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 35 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a11c4d000b84f7f49ebefc018c24bbfa3c9c0f3b
refs/heads/master: abdc2d62be335b85091e8f74081336563277a163
40 changes: 6 additions & 34 deletions trunk/drivers/net/wireless/iwlwifi/iwl-agn.c
Original file line number Diff line number Diff line change
Expand Up @@ -1291,6 +1291,7 @@ static int iwl_read_ucode(struct iwl_priv *priv)
size_t len;
u32 api_ver, build;
u32 inst_size, data_size, init_size, init_data_size, boot_size;
u16 eeprom_ver;

/* Ask kernel firmware_class module to get the boot firmware off disk.
* request_firmware() is synchronous, file is in memory on return. */
Expand Down Expand Up @@ -1368,6 +1369,11 @@ static int iwl_read_ucode(struct iwl_priv *priv)
if (build)
IWL_DEBUG_INFO(priv, "Build %u\n", build);

eeprom_ver = iwl_eeprom_query16(priv, EEPROM_VERSION);
IWL_DEBUG_INFO(priv, "NVM Type: %s, version: 0x%x\n",
(priv->nvm_device_type == NVM_DEVICE_TYPE_OTP)
? "OTP" : "EEPROM", eeprom_ver);

IWL_DEBUG_INFO(priv, "f/w package hdr ucode version raw = 0x%x\n",
priv->ucode_ver);
IWL_DEBUG_INFO(priv, "f/w package hdr runtime inst size = %u\n",
Expand Down Expand Up @@ -2483,39 +2489,6 @@ static DEVICE_ATTR(debug_level, S_IWUSR | S_IRUGO,
#endif /* CONFIG_IWLWIFI_DEBUG */


static ssize_t show_version(struct device *d,
struct device_attribute *attr, char *buf)
{
struct iwl_priv *priv = dev_get_drvdata(d);
struct iwl_alive_resp *palive = &priv->card_alive;
ssize_t pos = 0;
u16 eeprom_ver;

if (palive->is_valid)
pos += sprintf(buf + pos,
"fw version: 0x%01X.0x%01X.0x%01X.0x%01X\n"
"fw type: 0x%01X 0x%01X\n",
palive->ucode_major, palive->ucode_minor,
palive->sw_rev[0], palive->sw_rev[1],
palive->ver_type, palive->ver_subtype);
else
pos += sprintf(buf + pos, "fw not loaded\n");

if (priv->eeprom) {
eeprom_ver = iwl_eeprom_query16(priv, EEPROM_VERSION);
pos += sprintf(buf + pos, "NVM Type: %s, version: 0x%x\n",
(priv->nvm_device_type == NVM_DEVICE_TYPE_OTP)
? "OTP" : "EEPROM", eeprom_ver);

} else {
pos += sprintf(buf + pos, "EEPROM not initialzed\n");
}

return pos;
}

static DEVICE_ATTR(version, S_IWUSR | S_IRUGO, show_version, NULL);

static ssize_t show_temperature(struct device *d,
struct device_attribute *attr, char *buf)
{
Expand Down Expand Up @@ -2779,7 +2752,6 @@ static struct attribute *iwl_sysfs_entries[] = {
#ifdef CONFIG_IWLWIFI_DEBUG
&dev_attr_debug_level.attr,
#endif
&dev_attr_version.attr,
NULL
};

Expand Down

0 comments on commit 86284e1

Please sign in to comment.