summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/iwlwifi/iwl-trans.h
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2011-08-25 23:10:50 -0700
committerJohn W. Linville <linville@tuxdriver.com>2011-08-29 15:25:32 -0400
commit87e5666c0722d5f4cad3560ab5c180c8bba62b8b (patch)
treed1cb4c0349cc7270a0d67e1a4aee77baebb6e4d0 /drivers/net/wireless/iwlwifi/iwl-trans.h
parent6fbfae8e65139061080c70c8c337f74c50e8fd55 (diff)
iwlagn: transport handler can register debugfs entries
Add a handler in iwl_trans_ops to allow it to add entries under debugfs dir given by the upper level. 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>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-trans.h')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-trans.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans.h b/drivers/net/wireless/iwlwifi/iwl-trans.h
index 4a0c7867cb6e..a9b3157994e9 100644
--- a/drivers/net/wireless/iwlwifi/iwl-trans.h
+++ b/drivers/net/wireless/iwlwifi/iwl-trans.h
@@ -63,6 +63,8 @@
#ifndef __iwl_trans_h__
#define __iwl_trans_h__
+#include <linux/debugfs.h>
+
/*This file includes the declaration that are exported from the transport
* layer */
@@ -98,6 +100,8 @@ struct iwl_shared;
* layer shall not pass any Rx.
* @free: release all the ressource for the transport layer itself such as
* irq, tasklet etc...
+ * @dbgfs_register: add the dbgfs files under this directory. Files will be
+ * automatically deleted.
*/
struct iwl_trans_ops {
@@ -128,6 +132,8 @@ struct iwl_trans_ops {
void (*sync_irq)(struct iwl_priv *priv);
void (*free)(struct iwl_priv *priv);
+
+ int (*dbgfs_register)(struct iwl_trans *trans, struct dentry* dir);
};
/**
@@ -232,6 +238,12 @@ static inline void iwl_trans_free(struct iwl_trans *trans)
trans->ops->free(priv(trans));
}
+static inline int iwl_trans_dbgfs_register(struct iwl_trans *trans,
+ struct dentry *dir)
+{
+ return trans->ops->dbgfs_register(trans, dir);
+}
+
/*****************************************************
* Transport layers implementations
******************************************************/