diff options
author | Haim Dreyfuss <haim.dreyfuss@intel.com> | 2017-12-27 15:21:18 +0200 |
---|---|---|
committer | Luca Coelho <luciano.coelho@intel.com> | 2018-03-02 10:19:59 +0200 |
commit | 7f8ae00f63725e835b5ed8a97bc18bf1c950acb2 (patch) | |
tree | a64214c9a67c028709c0939e1c425853880527cf /drivers/net/wireless/intel/iwlwifi/fw/debugfs.h | |
parent | 78dc897b7ee67205423dbbc6b56be49fb18d15b5 (diff) | |
download | linux-7f8ae00f63725e835b5ed8a97bc18bf1c950acb2.tar.gz linux-7f8ae00f63725e835b5ed8a97bc18bf1c950acb2.tar.bz2 linux-7f8ae00f63725e835b5ed8a97bc18bf1c950acb2.zip |
iwlwifi: Cancel and set MARKER_CMD timer during suspend-resume
While entering to D3 mode there is a gap between the time the
driver handles the D3_CONFIG_CMD response to the time the host is going
to sleep.
In between there might be cases which MARKER_CMD can tailgate.
Also during resume flow the MARKER_CMD might get sent while D0I3_CMD
is being handled in the FW.
Cancel MARKER_CMD timer and set it again properly during suspend
resume flows to prevent this command from being sent accidentlly.
Signed-off-by: Haim Dreyfuss <haim.dreyfuss@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/fw/debugfs.h')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/fw/debugfs.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/debugfs.h b/drivers/net/wireless/intel/iwlwifi/fw/debugfs.h index e57ff92a68ae..3da468d2cc92 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/debugfs.h +++ b/drivers/net/wireless/intel/iwlwifi/fw/debugfs.h @@ -75,6 +75,20 @@ static inline void iwl_fw_cancel_timestamp(struct iwl_fw_runtime *fwrt) cancel_delayed_work_sync(&fwrt->timestamp.wk); } +static inline void iwl_fw_suspend_timestamp(struct iwl_fw_runtime *fwrt) +{ + cancel_delayed_work_sync(&fwrt->timestamp.wk); +} + +static inline void iwl_fw_resume_timestamp(struct iwl_fw_runtime *fwrt) +{ + if (!fwrt->timestamp.delay) + return; + + schedule_delayed_work(&fwrt->timestamp.wk, + round_jiffies_relative(fwrt->timestamp.delay)); +} + #else static inline int iwl_fwrt_dbgfs_register(struct iwl_fw_runtime *fwrt, struct dentry *dbgfs_dir) @@ -84,4 +98,8 @@ static inline int iwl_fwrt_dbgfs_register(struct iwl_fw_runtime *fwrt, static inline void iwl_fw_cancel_timestamp(struct iwl_fw_runtime *fwrt) {} +static inline void iwl_fw_suspend_timestamp(struct iwl_fw_runtime *fwrt) {} + +static inline void iwl_fw_resume_timestamp(struct iwl_fw_runtime *fwrt) {} + #endif /* CONFIG_IWLWIFI_DEBUGFS */ |