Skip to content

Commit 484b3d1

Browse files
lucacoelhoegrumbach
authored andcommitted
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 <[email protected]> Reviewed-by: Johannes Berg <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
1 parent 7b9d74e commit 484b3d1

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

drivers/net/wireless/iwlwifi/mvm/d3.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1726,6 +1726,10 @@ iwl_mvm_netdetect_query_results(struct iwl_mvm *mvm,
17261726
results->matched_profiles = le32_to_cpu(query->matched_profiles);
17271727
memcpy(results->matches, query->matches, sizeof(results->matches));
17281728

1729+
#ifdef CPTCFG_IWLWIFI_DEBUGFS
1730+
mvm->last_netdetect_scans = le32_to_cpu(query->n_scans_done);
1731+
#endif
1732+
17291733
out_free_resp:
17301734
iwl_free_resp(&cmd);
17311735
return ret;

drivers/net/wireless/iwlwifi/mvm/debugfs.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1569,6 +1569,9 @@ int iwl_mvm_dbgfs_register(struct iwl_mvm *mvm, struct dentry *dbgfs_dir)
15691569
if (!debugfs_create_bool("d3_wake_sysassert", S_IRUSR | S_IWUSR,
15701570
mvm->debugfs_dir, &mvm->d3_wake_sysassert))
15711571
goto err;
1572+
if (!debugfs_create_u32("last_netdetect_scans", S_IRUSR,
1573+
mvm->debugfs_dir, &mvm->last_netdetect_scans))
1574+
goto err;
15721575
MVM_DEBUGFS_ADD_FILE(netdetect, mvm->debugfs_dir, S_IRUSR | S_IWUSR);
15731576
#endif
15741577

drivers/net/wireless/iwlwifi/mvm/mvm.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -748,6 +748,7 @@ struct iwl_mvm {
748748
void *d3_resume_sram;
749749
u32 d3_test_pme_ptr;
750750
struct ieee80211_vif *keep_vif;
751+
u32 last_netdetect_scans; /* no. of scans in the last net-detect wake */
751752
#endif
752753
#endif
753754

0 commit comments

Comments
 (0)