diff options
author | Lazar Alexei <qca_ailizaro@qca.qualcomm.com> | 2017-11-14 15:25:44 +0200 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2017-12-02 16:19:17 +0200 |
commit | bd8bdc6ca8180afe21724cbd362847517a73b213 (patch) | |
tree | c11adc407b545bb478eb7831154d98adbeaedc8d /drivers/net/wireless/ath/wil6210/pcie_bus.c | |
parent | 05898dd98830f62e60faa41a4ec6acecb9d6cdd1 (diff) |
wil6210: update statistics for suspend
Currently the statistics show how many successful/failed
suspend/resume operations the system had.
Update the statistics by splitting each successful/failed
suspend/resume operations to radio on/off.
Signed-off-by: Lazar Alexei <qca_ailizaro@qca.qualcomm.com>
Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/wil6210/pcie_bus.c')
-rw-r--r-- | drivers/net/wireless/ath/wil6210/pcie_bus.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/drivers/net/wireless/ath/wil6210/pcie_bus.c b/drivers/net/wireless/ath/wil6210/pcie_bus.c index 0592c73745cb..42a5480c764d 100644 --- a/drivers/net/wireless/ath/wil6210/pcie_bus.c +++ b/drivers/net/wireless/ath/wil6210/pcie_bus.c @@ -391,14 +391,16 @@ static int wil6210_suspend(struct device *dev, bool is_runtime) rc = wil_suspend(wil, is_runtime, keep_radio_on); if (!rc) { - wil->suspend_stats.successful_suspends++; - /* In case radio stays on, platform device will control * PCIe master */ - if (!keep_radio_on) + if (!keep_radio_on) { /* disable bus mastering */ pci_clear_master(pdev); + wil->suspend_stats.r_off.successful_suspends++; + } else { + wil->suspend_stats.r_on.successful_suspends++; + } } out: return rc; @@ -424,11 +426,17 @@ static int wil6210_resume(struct device *dev, bool is_runtime) rc = wil_resume(wil, is_runtime, keep_radio_on); if (rc) { wil_err(wil, "device failed to resume (%d)\n", rc); - wil->suspend_stats.failed_resumes++; - if (!keep_radio_on) + if (!keep_radio_on) { pci_clear_master(pdev); + wil->suspend_stats.r_off.failed_resumes++; + } else { + wil->suspend_stats.r_on.failed_resumes++; + } } else { - wil->suspend_stats.successful_resumes++; + if (keep_radio_on) + wil->suspend_stats.r_on.successful_resumes++; + else + wil->suspend_stats.r_off.successful_resumes++; } return rc; |