All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luca Coelho <luca@coelho.fi>
To: kvalo@codeaurora.org
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH v2 21/21] iwlwifi: dbg: remove iwl_fw_cancel_dumps function
Date: Thu,  5 Sep 2019 16:22:20 +0300	[thread overview]
Message-ID: <20190905132220.23970-22-luca@coelho.fi> (raw)
In-Reply-To: <20190905132220.23970-1-luca@coelho.fi>

From: Shahar S Matityahu <shahar.s.matityahu@intel.com>

Use cancel_delayed_work_sync on the dump workers only in case of
unloading the op mode. In any other case use iwl_fw_flush_dumps or
iwl_fw_dbg_stop_sync (depends if the op mode mutex is held or not).
This way, the driver will wait until debug data is collected in all
cases but op mode unloading.

Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/fw/dbg.h       | 11 -----------
 drivers/net/wireless/intel/iwlwifi/fw/runtime.h   |  4 ++++
 drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c |  1 -
 3 files changed, 4 insertions(+), 12 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/fw/dbg.h b/drivers/net/wireless/intel/iwlwifi/fw/dbg.h
index 14181e6dc00d..e3b5dd34643f 100644
--- a/drivers/net/wireless/intel/iwlwifi/fw/dbg.h
+++ b/drivers/net/wireless/intel/iwlwifi/fw/dbg.h
@@ -321,17 +321,6 @@ static inline void iwl_fw_flush_dumps(struct iwl_fw_runtime *fwrt)
 	}
 }
 
-static inline void iwl_fw_cancel_dumps(struct iwl_fw_runtime *fwrt)
-{
-	int i;
-
-	iwl_dbg_tlv_del_timers(fwrt->trans);
-	for (i = 0; i < IWL_FW_RUNTIME_DUMP_WK_NUM; i++) {
-		cancel_delayed_work_sync(&fwrt->dump.wks[i].wk);
-		fwrt->dump.wks[i].ini_trig_id = IWL_FW_TRIGGER_ID_INVALID;
-	}
-}
-
 #ifdef CONFIG_IWLWIFI_DEBUGFS
 static inline void iwl_fw_cancel_timestamp(struct iwl_fw_runtime *fwrt)
 {
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/runtime.h b/drivers/net/wireless/intel/iwlwifi/fw/runtime.h
index 8b8ab6d692b6..be436c18a047 100644
--- a/drivers/net/wireless/intel/iwlwifi/fw/runtime.h
+++ b/drivers/net/wireless/intel/iwlwifi/fw/runtime.h
@@ -203,6 +203,10 @@ static inline void iwl_fw_runtime_free(struct iwl_fw_runtime *fwrt)
 		kfree(active->trig);
 		active->trig = NULL;
 	}
+
+	iwl_dbg_tlv_del_timers(fwrt->trans);
+	for (i = 0; i < IWL_FW_RUNTIME_DUMP_WK_NUM; i++)
+		cancel_delayed_work_sync(&fwrt->dump.wks[i].wk);
 }
 
 void iwl_fw_runtime_suspend(struct iwl_fw_runtime *fwrt);
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
index 11b24d143cb6..2d14c59ccbdb 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
@@ -1243,7 +1243,6 @@ static void iwl_mvm_mac_stop(struct ieee80211_hw *hw)
 	 */
 	clear_bit(IWL_MVM_STATUS_FIRMWARE_RUNNING, &mvm->status);
 
-	iwl_fw_cancel_dumps(&mvm->fwrt);
 	cancel_delayed_work_sync(&mvm->cs_tx_unblock_dwork);
 	cancel_delayed_work_sync(&mvm->scan_timeout_dwork);
 	iwl_fw_free_dump_desc(&mvm->fwrt);
-- 
2.23.0.rc1


      parent reply	other threads:[~2019-09-05 13:23 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-05 13:21 [PATCH v2 00/21] iwlwifi: updates intended for v5.4 2019-09-03-2 Luca Coelho
2019-09-05 13:22 ` [PATCH v2 01/21] iwlwifi: separate elements from cfg that are needed by trans_alloc Luca Coelho
2019-09-05 13:22 ` [PATCH v2 02/21] iwlwifi: pcie: use the cfg we passed to iwl_trans_pcie_alloc() Luca Coelho
2019-09-05 13:22 ` [PATCH v2 03/21] iwlwifi: pcie: move some cfg mangling from trans_pcie_alloc to probe Luca Coelho
2019-09-05 13:22 ` [PATCH v2 04/21] iwlwifi: pcie: set iwl_trans->cfg later in the probe function Luca Coelho
2019-09-05 13:22 ` [PATCH v2 05/21] iwlwifi: pass the iwl_config_trans_params when needed Luca Coelho
2019-09-05 13:22 ` [PATCH v2 06/21] iwlwifi: add a pointer to the trans_cfg directly in trans Luca Coelho
2019-09-05 13:22 ` [PATCH v2 07/21] iwlwifi: pass the iwl_trans instead of cfg to some functions Luca Coelho
2019-09-05 13:22 ` [PATCH v2 08/21] iwlwifi: always access the trans configuration via trans Luca Coelho
2019-09-05 13:22 ` [PATCH v2 09/21] iwlwifi: fix warning iwl-trans.h is included more than once Luca Coelho
2019-09-05 13:22 ` [PATCH v2 10/21] iwlwifi: add support for suspend-resume flow for new device generation Luca Coelho
2019-09-05 13:22 ` [PATCH v2 11/21] iwlwifi: add sta_id to WOWLAN_CONFIG_CMD Luca Coelho
2019-09-05 13:22 ` [PATCH v2 12/21] iwlwifi: mvm: drop BA sessions on too many old-SN frames Luca Coelho
2019-09-05 13:22 ` [PATCH v2 13/21] iwlwifi: mvm: handle BAR_FRAME_RELEASE (0xc2) notification Luca Coelho
2019-09-05 13:22 ` [PATCH v2 14/21] iwlwifi: mvm: add support for single antenna diversity Luca Coelho
2019-09-05 13:22 ` [PATCH v2 15/21] iwlwifi: mvm: don't log un-decrypted frames Luca Coelho
2019-09-05 13:22 ` [PATCH v2 16/21] iwlwifi: add iwl_tlv_array_len() Luca Coelho
2019-09-05 13:22 ` [PATCH v2 17/21] iwlwifi: dbg_ini: remove apply point, switch to time point API Luca Coelho
2019-09-05 13:22 ` [PATCH v2 18/21] iwlwifi: fw api: add DRAM buffer allocation command Luca Coelho
2019-09-05 13:22 ` [PATCH v2 19/21] iwlwifi: dbg_ini: fix dump structs doc Luca Coelho
2019-09-05 13:22 ` [PATCH v2 20/21] iwlwifi: dbg_ini: remove periodic trigger Luca Coelho
2019-09-05 13:22 ` Luca Coelho [this message]

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=20190905132220.23970-22-luca@coelho.fi \
    --to=luca@coelho.fi \
    --cc=kvalo@codeaurora.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.