diff options
author | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2010-01-15 16:43:35 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-01-19 16:25:10 -0500 |
commit | 11fc524941248dc717f1af5dfa844eceb7c0217f (patch) | |
tree | b4d4284c8f6910c0667068eec737051a89edf0b7 /drivers/net/wireless | |
parent | e3ef2164386a13a37714ec033e30811d052c7999 (diff) |
iwlwifi: add num_of_sos_stats to statistics counter
When uCode detects number of beacon missed consecutively above the
internal missed beacon threshold (set by uCode), it will reset and
re-tune the radio in order to get out of bad PHY state.
This "num_of_sos_states" counter monitors number of time uCode
encounters this bad condition and has to re-tune the radio.
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-commands.h | 7 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-debugfs.c | 8 |
2 files changed, 13 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-commands.h b/drivers/net/wireless/iwlwifi/iwl-commands.h index 3320cce3d57b..8dc34a3d4f7e 100644 --- a/drivers/net/wireless/iwlwifi/iwl-commands.h +++ b/drivers/net/wireless/iwlwifi/iwl-commands.h | |||
@@ -3095,7 +3095,12 @@ struct statistics_general { | |||
3095 | __le32 ttl_timestamp; | 3095 | __le32 ttl_timestamp; |
3096 | struct statistics_div div; | 3096 | struct statistics_div div; |
3097 | __le32 rx_enable_counter; | 3097 | __le32 rx_enable_counter; |
3098 | __le32 reserved1; | 3098 | /* |
3099 | * num_of_sos_states: | ||
3100 | * count the number of times we have to re-tune | ||
3101 | * in order to get out of bad PHY status | ||
3102 | */ | ||
3103 | __le32 num_of_sos_states; | ||
3099 | __le32 reserved2; | 3104 | __le32 reserved2; |
3100 | __le32 reserved3; | 3105 | __le32 reserved3; |
3101 | } __attribute__ ((packed)); | 3106 | } __attribute__ ((packed)); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-debugfs.c b/drivers/net/wireless/iwlwifi/iwl-debugfs.c index 2264cbd95a00..19c7fab47939 100644 --- a/drivers/net/wireless/iwlwifi/iwl-debugfs.c +++ b/drivers/net/wireless/iwlwifi/iwl-debugfs.c | |||
@@ -1728,7 +1728,7 @@ static ssize_t iwl_dbgfs_ucode_general_stats_read(struct file *file, | |||
1728 | struct iwl_priv *priv = file->private_data; | 1728 | struct iwl_priv *priv = file->private_data; |
1729 | int pos = 0; | 1729 | int pos = 0; |
1730 | char *buf; | 1730 | char *buf; |
1731 | int bufsz = sizeof(struct statistics_general) * 8 + 250; | 1731 | int bufsz = sizeof(struct statistics_general) * 10 + 300; |
1732 | ssize_t ret; | 1732 | ssize_t ret; |
1733 | struct statistics_general *general, *accum_general; | 1733 | struct statistics_general *general, *accum_general; |
1734 | struct statistics_general *delta_general, *max_general; | 1734 | struct statistics_general *delta_general, *max_general; |
@@ -1828,6 +1828,12 @@ static ssize_t iwl_dbgfs_ucode_general_stats_read(struct file *file, | |||
1828 | accum_general->rx_enable_counter, | 1828 | accum_general->rx_enable_counter, |
1829 | delta_general->rx_enable_counter, | 1829 | delta_general->rx_enable_counter, |
1830 | max_general->rx_enable_counter); | 1830 | max_general->rx_enable_counter); |
1831 | pos += scnprintf(buf + pos, bufsz - pos, ucode_stats_format, | ||
1832 | "num_of_sos_states:", | ||
1833 | le32_to_cpu(general->num_of_sos_states), | ||
1834 | accum_general->num_of_sos_states, | ||
1835 | delta_general->num_of_sos_states, | ||
1836 | max_general->num_of_sos_states); | ||
1831 | ret = simple_read_from_buffer(user_buf, count, ppos, buf, pos); | 1837 | ret = simple_read_from_buffer(user_buf, count, ppos, buf, pos); |
1832 | kfree(buf); | 1838 | kfree(buf); |
1833 | return ret; | 1839 | return ret; |