aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl4965-base.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c
index f5911687671b..6eee28dbdde8 100644
--- a/drivers/net/wireless/iwlwifi/iwl4965-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c
@@ -3728,16 +3728,28 @@ static ssize_t show_version(struct device *d,
3728{ 3728{
3729 struct iwl_priv *priv = d->driver_data; 3729 struct iwl_priv *priv = d->driver_data;
3730 struct iwl_alive_resp *palive = &priv->card_alive; 3730 struct iwl_alive_resp *palive = &priv->card_alive;
3731 ssize_t pos = 0;
3732 u16 eeprom_ver;
3731 3733
3732 if (palive->is_valid) 3734 if (palive->is_valid)
3733 return sprintf(buf, "fw version: 0x%01X.0x%01X.0x%01X.0x%01X\n" 3735 pos += sprintf(buf + pos,
3734 "fw type: 0x%01X 0x%01X\n", 3736 "fw version: 0x%01X.0x%01X.0x%01X.0x%01X\n"
3737 "fw type: 0x%01X 0x%01X\n",
3735 palive->ucode_major, palive->ucode_minor, 3738 palive->ucode_major, palive->ucode_minor,
3736 palive->sw_rev[0], palive->sw_rev[1], 3739 palive->sw_rev[0], palive->sw_rev[1],
3737 palive->ver_type, palive->ver_subtype); 3740 palive->ver_type, palive->ver_subtype);
3738
3739 else 3741 else
3740 return sprintf(buf, "fw not loaded\n"); 3742 pos += sprintf(buf + pos, "fw not loaded\n");
3743
3744 if (priv->eeprom) {
3745 eeprom_ver = iwl_eeprom_query16(priv, EEPROM_VERSION);
3746 pos += sprintf(buf + pos, "EEPROM version: 0x%x\n",
3747 eeprom_ver);
3748 } else {
3749 pos += sprintf(buf + pos, "EEPROM not initialzed\n");
3750 }
3751
3752 return pos;
3741} 3753}
3742 3754
3743static DEVICE_ATTR(version, S_IWUSR | S_IRUGO, show_version, NULL); 3755static DEVICE_ATTR(version, S_IWUSR | S_IRUGO, show_version, NULL);