Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 103272
b: refs/heads/master
c: f236a26
h: refs/heads/master
v: v3
  • Loading branch information
Tomas Winkler authored and John W. Linville committed Jun 30, 2008
1 parent 1eff6f1 commit edf6dbc
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 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: 853554accce19d16b03476676bdcb1ccdd44caae
refs/heads/master: f236a2657794b6f10b582bf6ccfbca7bf0d5ec82
20 changes: 16 additions & 4 deletions trunk/drivers/net/wireless/iwlwifi/iwl4965-base.c
Original file line number Diff line number Diff line change
Expand Up @@ -3728,16 +3728,28 @@ static ssize_t show_version(struct device *d,
{
struct iwl_priv *priv = d->driver_data;
struct iwl_alive_resp *palive = &priv->card_alive;
ssize_t pos = 0;
u16 eeprom_ver;

if (palive->is_valid)
return sprintf(buf, "fw version: 0x%01X.0x%01X.0x%01X.0x%01X\n"
"fw type: 0x%01X 0x%01X\n",
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
return sprintf(buf, "fw not loaded\n");
pos += sprintf(buf + pos, "fw not loaded\n");

if (priv->eeprom) {
eeprom_ver = iwl_eeprom_query16(priv, EEPROM_VERSION);
pos += sprintf(buf + pos, "EEPROM version: 0x%x\n",
eeprom_ver);
} else {
pos += sprintf(buf + pos, "EEPROM not initialzed\n");
}

return pos;
}

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

0 comments on commit edf6dbc

Please sign in to comment.