iwlagn: move iwl_suspend / iwl_resume to the transport layer
These flows needs to access the APM and a few other registers that can differ
between different transports.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans.h b/drivers/net/wireless/iwlwifi/iwl-trans.h
index 8eee910..c12763c 100644
--- a/drivers/net/wireless/iwlwifi/iwl-trans.h
+++ b/drivers/net/wireless/iwlwifi/iwl-trans.h
@@ -102,6 +102,8 @@
* irq, tasklet etc...
* @dbgfs_register: add the dbgfs files under this directory. Files will be
* automatically deleted.
+ * @suspend: stop the device unless WoWLAN is configured
+ * @resume: resume activity of the device
*/
struct iwl_trans_ops {
@@ -134,6 +136,8 @@
void (*free)(struct iwl_priv *priv);
int (*dbgfs_register)(struct iwl_trans *trans, struct dentry* dir);
+ int (*suspend)(struct iwl_trans *trans);
+ int (*resume)(struct iwl_trans *trans);
};
/**
@@ -244,6 +248,16 @@
return trans->ops->dbgfs_register(trans, dir);
}
+static inline int iwl_trans_suspend(struct iwl_trans *trans)
+{
+ return trans->ops->suspend(trans);
+}
+
+static inline int iwl_trans_resume(struct iwl_trans *trans)
+{
+ return trans->ops->resume(trans);
+}
+
/*****************************************************
* Transport layers implementations
******************************************************/