diff options
author | Eliad Peller <eliad@wizery.com> | 2015-06-04 20:59:32 +0200 |
---|---|---|
committer | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2015-08-04 09:11:47 +0200 |
commit | c43fe907fec2c1925d423777ba14e0baf30c672c (patch) | |
tree | 6796a5875fddaa5d450b9393416aea920db57fb8 /drivers/net/wireless/iwlwifi/iwl-trans.h | |
parent | Revert "iwlwifi: mvm: move deferred d0i3 exit to resume_complete op" (diff) | |
download | linux-c43fe907fec2c1925d423777ba14e0baf30c672c.tar.xz linux-c43fe907fec2c1925d423777ba14e0baf30c672c.zip |
iwlwifi: return error if d0i3 was aborted
Allow the transport layer to return an error upon suspend.
Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Reviewed-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/iwlwifi/iwl-trans.h')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-trans.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans.h b/drivers/net/wireless/iwlwifi/iwl-trans.h index 8f67004faf4d..e698ed5e34cc 100644 --- a/drivers/net/wireless/iwlwifi/iwl-trans.h +++ b/drivers/net/wireless/iwlwifi/iwl-trans.h @@ -598,7 +598,7 @@ struct iwl_trans_ops { u32 value); void (*ref)(struct iwl_trans *trans); void (*unref)(struct iwl_trans *trans); - void (*suspend)(struct iwl_trans *trans); + int (*suspend)(struct iwl_trans *trans); void (*resume)(struct iwl_trans *trans); struct iwl_trans_dump_data *(*dump_data)(struct iwl_trans *trans); @@ -807,10 +807,12 @@ static inline void iwl_trans_unref(struct iwl_trans *trans) trans->ops->unref(trans); } -static inline void iwl_trans_suspend(struct iwl_trans *trans) +static inline int iwl_trans_suspend(struct iwl_trans *trans) { - if (trans->ops->suspend) - trans->ops->suspend(trans); + if (!trans->ops->suspend) + return 0; + + return trans->ops->suspend(trans); } static inline void iwl_trans_resume(struct iwl_trans *trans) |