From: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
To: linux-wireless@vger.kernel.org
Cc: Johannes Berg <johannes.berg@intel.com>,
Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Subject: [PATCH 26/41] iwlwifi: clean up transport debugfs handling
Date: Tue, 1 Dec 2015 11:58:52 +0200 [thread overview]
Message-ID: <1448963947-24302-26-git-send-email-emmanuel.grumbach@intel.com> (raw)
In-Reply-To: <0BA3FCBA62E2DC44AF3030971E174FB32E905B07@hasmsx107.ger.corp.intel.com>
From: Johannes Berg <johannes.berg@intel.com>
Transport code currently calls itself through the transport ops,
which is quite pointless. Clean up all of this. While at it,
remove the unnecessary dir argument and the redundant IDI code.
In slave transports, call both the common slave debugfs and the
transport's own. SDIO has no files, so remove it all there.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
---
drivers/net/wireless/intel/iwlwifi/iwl-trans.h | 9 ---------
drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 2 +-
drivers/net/wireless/intel/iwlwifi/pcie/internal.h | 9 +++++++++
drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 18 ++++--------------
4 files changed, 14 insertions(+), 24 deletions(-)
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-trans.h b/drivers/net/wireless/intel/iwlwifi/iwl-trans.h
index 607f4f7..3d089ae 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-trans.h
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-trans.h
@@ -542,8 +542,6 @@ struct iwl_trans_txq_scd_cfg {
* @wait_tx_queue_empty: wait until tx queues are empty. May sleep.
* @freeze_txq_timer: prevents the timer of the queue from firing until the
* queue is set to awake. Must be atomic.
- * @dbgfs_register: add the dbgfs files under this directory. Files will be
- * automatically deleted.
* @write8: write a u8 to a register at offset ofs from the BAR
* @write32: write a u32 to a register at offset ofs from the BAR
* @read32: read a u32 register at offset ofs from the BAR
@@ -599,7 +597,6 @@ struct iwl_trans_ops {
void (*txq_disable)(struct iwl_trans *trans, int queue,
bool configure_scd);
- int (*dbgfs_register)(struct iwl_trans *trans, struct dentry* dir);
int (*wait_tx_queue_empty)(struct iwl_trans *trans, u32 txq_bm);
void (*freeze_txq_timer)(struct iwl_trans *trans, unsigned long txqs,
bool freeze);
@@ -1022,12 +1019,6 @@ static inline int iwl_trans_wait_tx_queue_empty(struct iwl_trans *trans,
return trans->ops->wait_tx_queue_empty(trans, txqs);
}
-static inline int iwl_trans_dbgfs_register(struct iwl_trans *trans,
- struct dentry *dir)
-{
- return trans->ops->dbgfs_register(trans, dir);
-}
-
static inline void iwl_trans_write8(struct iwl_trans *trans, u32 ofs, u8 val)
{
trans->ops->write8(trans, ofs, val);
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
index 639761f..a52710f 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
@@ -598,7 +598,7 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
set_dflt_pwr_limit(iwl_trans, pdev);
/* register transport layer debugfs here */
- ret = iwl_trans_dbgfs_register(iwl_trans, iwl_trans->dbgfs_dir);
+ ret = iwl_trans_pcie_dbgfs_register(iwl_trans);
if (ret)
goto out_free_drv;
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/internal.h b/drivers/net/wireless/intel/iwlwifi/pcie/internal.h
index bf41543..44dc09d 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/internal.h
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/internal.h
@@ -569,4 +569,13 @@ static inline void __iwl_trans_pcie_set_bit(struct iwl_trans *trans,
void iwl_trans_pcie_rf_kill(struct iwl_trans *trans, bool state);
+#ifdef CONFIG_IWLWIFI_DEBUGFS
+int iwl_trans_pcie_dbgfs_register(struct iwl_trans *trans);
+#else
+static inline int iwl_trans_pcie_dbgfs_register(struct iwl_trans *trans)
+{
+ return 0;
+}
+#endif
+
#endif /* __iwl_trans_int_pcie_h__ */
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
index 50614e4d..efef487 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
@@ -2107,13 +2107,11 @@ DEBUGFS_READ_FILE_OPS(rx_queue);
DEBUGFS_READ_FILE_OPS(tx_queue);
DEBUGFS_WRITE_FILE_OPS(csr);
-/*
- * Create the debugfs files and directories
- *
- */
-static int iwl_trans_pcie_dbgfs_register(struct iwl_trans *trans,
- struct dentry *dir)
+/* Create the debugfs files and directories */
+int iwl_trans_pcie_dbgfs_register(struct iwl_trans *trans)
{
+ struct dentry *dir = trans->dbgfs_dir;
+
DEBUGFS_ADD_FILE(rx_queue, dir, S_IRUSR);
DEBUGFS_ADD_FILE(tx_queue, dir, S_IRUSR);
DEBUGFS_ADD_FILE(interrupt, dir, S_IWUSR | S_IRUSR);
@@ -2125,12 +2123,6 @@ err:
IWL_ERR(trans, "failed to create the trans debugfs entry\n");
return -ENOMEM;
}
-#else
-static int iwl_trans_pcie_dbgfs_register(struct iwl_trans *trans,
- struct dentry *dir)
-{
- return 0;
-}
#endif /*CONFIG_IWLWIFI_DEBUGFS */
static u32 iwl_trans_pcie_get_cmdlen(struct iwl_tfd *tfd)
@@ -2473,8 +2465,6 @@ static const struct iwl_trans_ops trans_ops_pcie = {
.txq_disable = iwl_trans_pcie_txq_disable,
.txq_enable = iwl_trans_pcie_txq_enable,
- .dbgfs_register = iwl_trans_pcie_dbgfs_register,
-
.wait_tx_queue_empty = iwl_trans_pcie_wait_txq_empty,
.freeze_txq_timer = iwl_trans_pcie_freeze_txq_timer,
--
2.5.0
next prev parent reply other threads:[~2015-12-01 9:59 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-01 9:56 pull request: iwlwifi-next 2015-12-01 Grumbach, Emmanuel
2015-12-01 9:58 ` [PATCH 01/41] iwlwifi: nvm: fix up phy section when reading it Emmanuel Grumbach
2015-12-01 9:58 ` [PATCH 02/41] iwlwifi: add support for 12K Receive Buffers Emmanuel Grumbach
2015-12-01 9:58 ` [PATCH 03/41] iwlwifi: dvm: remove Kconfig default Emmanuel Grumbach
2015-12-01 9:58 ` [PATCH 04/41] iwlwifi: trans: make various conversion macros inlines Emmanuel Grumbach
2015-12-01 9:58 ` [PATCH 05/41] iwlwifi: mvm: Configure fragmented scan for scheduled scan Emmanuel Grumbach
2015-12-01 9:58 ` [PATCH 06/41] iwlwifi: dvm: remove stray debug code Emmanuel Grumbach
2015-12-01 9:58 ` [PATCH 07/41] iwlwifi: mvm: Enable MPLUT only on supported hw Emmanuel Grumbach
2015-12-01 9:58 ` [PATCH 08/41] iwlwifi: mvm: ignore LMAC scan notifications when running UMAC scans Emmanuel Grumbach
2015-12-01 9:58 ` [PATCH 09/41] iwlwifi: mvm: check FW's response for nvm access write cmd Emmanuel Grumbach
2015-12-01 9:58 ` [PATCH 10/41] iwlwifi: pcie: remove ICT allocation message Emmanuel Grumbach
2015-12-01 9:58 ` [PATCH 11/41] iwlwifi: generalize d0i3_entry_timeout module parameter Emmanuel Grumbach
2015-12-01 9:58 ` [PATCH 12/41] iwlwifi: mvm: change name of iwl_mvm_d3_update_gtk Emmanuel Grumbach
2015-12-01 9:58 ` [PATCH 13/41] iwlwifi: mvm: use build-time assertion for fw trigger ID Emmanuel Grumbach
2015-12-01 9:58 ` [PATCH 14/41] iwlwifi: mvm: add trigger for firmware dump upon TDLS events Emmanuel Grumbach
2015-12-01 9:58 ` [PATCH 15/41] iwlwifi: mvm: remove redundant d0i3 flag from the config struct Emmanuel Grumbach
2015-12-01 9:58 ` [PATCH 16/41] iwlwifi: mvm: add bt settings to debugfs Emmanuel Grumbach
2015-12-01 9:58 ` [PATCH 17/41] iwlwifi: mvm: add bt rrc and ttc " Emmanuel Grumbach
2015-12-01 9:58 ` [PATCH 18/41] iwlwifi: mvm: remove stray nd_config element Emmanuel Grumbach
2015-12-01 9:58 ` [PATCH 19/41] iwlwifi: mvm: drop low_latency_agg_frame_cnt_limit Emmanuel Grumbach
2015-12-01 9:58 ` [PATCH 20/41] iwlwifi: export the _no_grab version of PRPH IO functions Emmanuel Grumbach
2015-12-01 9:58 ` [PATCH 21/41] iwlwifi: dump prph registers in a common place for all transports Emmanuel Grumbach
2015-12-01 9:58 ` [PATCH 22/41] iwlwifi: mvm: flush all used TX queues before suspending Emmanuel Grumbach
2015-12-01 9:58 ` [PATCH 23/41] iwlwifi: mvm: remove unnecessary check in iwl_mvm_is_d0i3_supported() Emmanuel Grumbach
2015-12-01 9:58 ` [PATCH 24/41] iwlwifi: mvm: move fw-dbg code to separate file Emmanuel Grumbach
2015-12-01 18:52 ` Kalle Valo
2015-12-01 19:14 ` Grumbach, Emmanuel
2015-12-01 19:26 ` Emmanuel Grumbach
2015-12-01 19:29 ` Kalle Valo
2015-12-03 15:32 ` Kalle Valo
2015-12-01 9:58 ` [PATCH 25/41] iwlwifi: mvm: Support setting continuous recording debug mode Emmanuel Grumbach
2015-12-01 9:58 ` Emmanuel Grumbach [this message]
2015-12-01 9:58 ` [PATCH 27/41] iwlwifi: pcie: remove pointer from debug message Emmanuel Grumbach
2015-12-01 9:58 ` [PATCH 28/41] iwlwifi: mvm: fix incorrect fallthrough in iwl_mvm_check_running_scans() Emmanuel Grumbach
2015-12-01 9:58 ` [PATCH 29/41] iwlwifi: mvm: use firmware station lookup, combine code Emmanuel Grumbach
2015-12-01 9:58 ` [PATCH 30/41] iwlwifi: mvm: refactor d3 key update functions Emmanuel Grumbach
2015-12-01 9:58 ` [PATCH 31/41] iwlwifi: Add new PCI IDs for 9260 and 5165 series Emmanuel Grumbach
2015-12-01 9:58 ` [PATCH 32/41] iwlwifi: Add PCI IDs for the new 3168 series Emmanuel Grumbach
2015-12-01 9:58 ` [PATCH 33/41] iwlwifi: Add PCI IDs for the new series 8165 Emmanuel Grumbach
2015-12-01 9:59 ` [PATCH 34/41] iwlwifi: mvm: Align bt-coex priority with requirements Emmanuel Grumbach
2015-12-01 9:59 ` [PATCH 35/41] iwlwifi: change the Intel Wireless email address Emmanuel Grumbach
2015-12-01 9:59 ` [PATCH 36/41] iwlwifi: print index in api/capa flags parsing message Emmanuel Grumbach
2015-12-01 9:59 ` [PATCH 37/41] iwlwifi: mvm: rs: fix a warning message Emmanuel Grumbach
2015-12-01 9:59 ` [PATCH 38/41] iwlwifi: mvm: report wakeup for wowlan Emmanuel Grumbach
2015-12-01 9:59 ` [PATCH 39/41] iwlwifi: mvm: add 9000-series RX API Emmanuel Grumbach
2015-12-01 9:59 ` [PATCH 40/41] iwlwifi: mvm: ROC: Extend the ROC max delay duration & limit ROC duration Emmanuel Grumbach
2015-12-01 9:59 ` [PATCH 41/41] iwlwifi: remove IWL_DL_LED Emmanuel Grumbach
2015-12-03 15:28 ` pull request: iwlwifi-next 2015-12-01 Kalle Valo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1448963947-24302-26-git-send-email-emmanuel.grumbach@intel.com \
--to=emmanuel.grumbach@intel.com \
--cc=johannes.berg@intel.com \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).