Commit 8e551e50 authored by Eliad Peller's avatar Eliad Peller Committed by Emmanuel Grumbach

iwlwifi: trans: add suspend/resume ops

Add suspend/resume trans ops that will be called from
mac80211's suspend/resume ops.
Signed-off-by: default avatarEliad Peller <eliadx.peller@intel.com>
Reviewed-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
parent 2021a89d
...@@ -534,6 +534,8 @@ struct iwl_trans_ops { ...@@ -534,6 +534,8 @@ struct iwl_trans_ops {
u32 value); u32 value);
void (*ref)(struct iwl_trans *trans); void (*ref)(struct iwl_trans *trans);
void (*unref)(struct iwl_trans *trans); void (*unref)(struct iwl_trans *trans);
void (*suspend)(struct iwl_trans *trans);
void (*resume)(struct iwl_trans *trans);
struct iwl_trans_dump_data *(*dump_data)(struct iwl_trans *trans); struct iwl_trans_dump_data *(*dump_data)(struct iwl_trans *trans);
}; };
...@@ -702,6 +704,18 @@ static inline void iwl_trans_unref(struct iwl_trans *trans) ...@@ -702,6 +704,18 @@ static inline void iwl_trans_unref(struct iwl_trans *trans)
trans->ops->unref(trans); trans->ops->unref(trans);
} }
static inline void iwl_trans_suspend(struct iwl_trans *trans)
{
if (trans->ops->suspend)
trans->ops->suspend(trans);
}
static inline void iwl_trans_resume(struct iwl_trans *trans)
{
if (trans->ops->resume)
trans->ops->resume(trans);
}
static inline struct iwl_trans_dump_data * static inline struct iwl_trans_dump_data *
iwl_trans_dump_data(struct iwl_trans *trans) iwl_trans_dump_data(struct iwl_trans *trans)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment