diff options
author | Matti Gottlieb <matti.gottlieb@intel.com> | 2013-07-30 15:29:37 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-08-06 10:30:21 +0200 |
commit | 3848ab66827bddd7eb760c58dec909f0af1c00a5 (patch) | |
tree | 84d2257b8367df3a63106b230276fe3096ebc028 /drivers/net/wireless/iwlwifi/mvm/rx.c | |
parent | 147fc9be81d10e6e863323c0b54e140b42fd1ed6 (diff) | |
download | blackbird-op-linux-3848ab66827bddd7eb760c58dec909f0af1c00a5.tar.gz blackbird-op-linux-3848ab66827bddd7eb760c58dec909f0af1c00a5.zip |
iwlwifi: mvm: Add RX statistics debugfs entry
Add a debugfs entry for the RX statistics received from
the firmware.
Signed-off-by: Matti Gottlieb <matti.gottlieb@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/rx.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/rx.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/rx.c b/drivers/net/wireless/iwlwifi/mvm/rx.c index 6fd7fae30c0a..5057fd3bcb50 100644 --- a/drivers/net/wireless/iwlwifi/mvm/rx.c +++ b/drivers/net/wireless/iwlwifi/mvm/rx.c @@ -378,6 +378,18 @@ int iwl_mvm_rx_rx_mpdu(struct iwl_mvm *mvm, struct iwl_rx_cmd_buffer *rxb, return 0; } +static void iwl_mvm_update_rx_statistics(struct iwl_mvm *mvm, + struct iwl_notif_statistics *stats) +{ + /* + * NOTE FW aggregates the statistics - BUT the statistics are cleared + * when the driver issues REPLY_STATISTICS_CMD 0x9c with CLEAR_STATS + * bit set. + */ + lockdep_assert_held(&mvm->mutex); + memcpy(&mvm->rx_stats, &stats->rx, sizeof(struct mvm_statistics_rx)); +} + /* * iwl_mvm_rx_statistics - STATISTICS_NOTIFICATION handler * @@ -396,6 +408,7 @@ int iwl_mvm_rx_statistics(struct iwl_mvm *mvm, mvm->temperature = le32_to_cpu(common->temperature); iwl_mvm_tt_handler(mvm); } + iwl_mvm_update_rx_statistics(mvm, stats); return 0; } |