diff options
author | Luciano Coelho <luciano.coelho@intel.com> | 2015-03-30 13:46:32 -0400 |
---|---|---|
committer | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2015-04-02 02:26:46 -0400 |
commit | 484b3d13b4ac3d721f3479433ad82100e1277580 (patch) | |
tree | 259c881d448c4d3af5320f85b64f95db1ea3f24c /drivers/net/wireless | |
parent | 7b9d74e44a9f504e22a505e36327a00dc301a968 (diff) |
iwlwifi: mvm: add debugfs entry with the number of net-detect scans
Our testers need to know the number of scans performed while in
net-detect mode before the device wakes up. The firmware already
passes this information to the driver, so we can save it and report it
in a debugfs entry.
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/d3.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/debugfs.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/mvm.h | 1 |
3 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/d3.c b/drivers/net/wireless/iwlwifi/mvm/d3.c index e730ea2b0812..a6c48c7b1e16 100644 --- a/drivers/net/wireless/iwlwifi/mvm/d3.c +++ b/drivers/net/wireless/iwlwifi/mvm/d3.c | |||
@@ -1726,6 +1726,10 @@ iwl_mvm_netdetect_query_results(struct iwl_mvm *mvm, | |||
1726 | results->matched_profiles = le32_to_cpu(query->matched_profiles); | 1726 | results->matched_profiles = le32_to_cpu(query->matched_profiles); |
1727 | memcpy(results->matches, query->matches, sizeof(results->matches)); | 1727 | memcpy(results->matches, query->matches, sizeof(results->matches)); |
1728 | 1728 | ||
1729 | #ifdef CPTCFG_IWLWIFI_DEBUGFS | ||
1730 | mvm->last_netdetect_scans = le32_to_cpu(query->n_scans_done); | ||
1731 | #endif | ||
1732 | |||
1729 | out_free_resp: | 1733 | out_free_resp: |
1730 | iwl_free_resp(&cmd); | 1734 | iwl_free_resp(&cmd); |
1731 | return ret; | 1735 | return ret; |
diff --git a/drivers/net/wireless/iwlwifi/mvm/debugfs.c b/drivers/net/wireless/iwlwifi/mvm/debugfs.c index 01b97a0c88dc..9ac04c1ea706 100644 --- a/drivers/net/wireless/iwlwifi/mvm/debugfs.c +++ b/drivers/net/wireless/iwlwifi/mvm/debugfs.c | |||
@@ -1569,6 +1569,9 @@ int iwl_mvm_dbgfs_register(struct iwl_mvm *mvm, struct dentry *dbgfs_dir) | |||
1569 | if (!debugfs_create_bool("d3_wake_sysassert", S_IRUSR | S_IWUSR, | 1569 | if (!debugfs_create_bool("d3_wake_sysassert", S_IRUSR | S_IWUSR, |
1570 | mvm->debugfs_dir, &mvm->d3_wake_sysassert)) | 1570 | mvm->debugfs_dir, &mvm->d3_wake_sysassert)) |
1571 | goto err; | 1571 | goto err; |
1572 | if (!debugfs_create_u32("last_netdetect_scans", S_IRUSR, | ||
1573 | mvm->debugfs_dir, &mvm->last_netdetect_scans)) | ||
1574 | goto err; | ||
1572 | MVM_DEBUGFS_ADD_FILE(netdetect, mvm->debugfs_dir, S_IRUSR | S_IWUSR); | 1575 | MVM_DEBUGFS_ADD_FILE(netdetect, mvm->debugfs_dir, S_IRUSR | S_IWUSR); |
1573 | #endif | 1576 | #endif |
1574 | 1577 | ||
diff --git a/drivers/net/wireless/iwlwifi/mvm/mvm.h b/drivers/net/wireless/iwlwifi/mvm/mvm.h index 3513f27c888f..a3f2078e8dcd 100644 --- a/drivers/net/wireless/iwlwifi/mvm/mvm.h +++ b/drivers/net/wireless/iwlwifi/mvm/mvm.h | |||
@@ -748,6 +748,7 @@ struct iwl_mvm { | |||
748 | void *d3_resume_sram; | 748 | void *d3_resume_sram; |
749 | u32 d3_test_pme_ptr; | 749 | u32 d3_test_pme_ptr; |
750 | struct ieee80211_vif *keep_vif; | 750 | struct ieee80211_vif *keep_vif; |
751 | u32 last_netdetect_scans; /* no. of scans in the last net-detect wake */ | ||
751 | #endif | 752 | #endif |
752 | #endif | 753 | #endif |
753 | 754 | ||