Skip to content

Commit

Permalink
iwlwifi: dbg: move debug recording stop from trans to op mode
Browse files Browse the repository at this point in the history
The op mode should stop the debug recording and not the transport layer.
Rename iwl_fwrt_stop_device into iwl_fw_dbg_stop_sync and move the debug
stop recording to it.

Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
  • Loading branch information
Shahar S Matityahu authored and Luca Coelho committed Sep 6, 2019
1 parent b721f5b commit 203c83d
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 11 deletions.
6 changes: 3 additions & 3 deletions drivers/net/wireless/intel/iwlwifi/fw/dbg.c
Original file line number Diff line number Diff line change
Expand Up @@ -2862,17 +2862,17 @@ void iwl_fw_dbg_apply_point(struct iwl_fw_runtime *fwrt,
}
IWL_EXPORT_SYMBOL(iwl_fw_dbg_apply_point);

void iwl_fwrt_stop_device(struct iwl_fw_runtime *fwrt)
void iwl_fw_dbg_stop_sync(struct iwl_fw_runtime *fwrt)
{
int i;

del_timer(&fwrt->dump.periodic_trig);
for (i = 0; i < IWL_FW_RUNTIME_DUMP_WK_NUM; i++)
iwl_fw_dbg_collect_sync(fwrt, i);

iwl_trans_stop_device(fwrt->trans);
iwl_fw_dbg_stop_recording(fwrt->trans, NULL);
}
IWL_EXPORT_SYMBOL(iwl_fwrt_stop_device);
IWL_EXPORT_SYMBOL(iwl_fw_dbg_stop_sync);

void iwl_fw_dbg_periodic_trig_handler(struct timer_list *t)
{
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/intel/iwlwifi/fw/dbg.h
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ static inline void iwl_fw_resume_timestamp(struct iwl_fw_runtime *fwrt) {}
void iwl_fw_dbg_apply_point(struct iwl_fw_runtime *fwrt,
enum iwl_fw_ini_apply_point apply_point);

void iwl_fwrt_stop_device(struct iwl_fw_runtime *fwrt);
void iwl_fw_dbg_stop_sync(struct iwl_fw_runtime *fwrt);

static inline void iwl_fw_lmac1_set_alive_err_table(struct iwl_trans *trans,
u32 lmac_error_event_table)
Expand Down
1 change: 1 addition & 0 deletions drivers/net/wireless/intel/iwlwifi/mvm/fw.c
Original file line number Diff line number Diff line change
Expand Up @@ -1140,6 +1140,7 @@ static int iwl_mvm_load_rt_fw(struct iwl_mvm *mvm)
return ret;
}

iwl_fw_dbg_stop_sync(&mvm->fwrt);
/*
* Stop and start the transport without entering low power
* mode. This will save the state of other components on the
Expand Down
3 changes: 2 additions & 1 deletion drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
Original file line number Diff line number Diff line change
Expand Up @@ -2037,7 +2037,8 @@ static inline void iwl_mvm_stop_device(struct iwl_mvm *mvm)
lockdep_assert_held(&mvm->mutex);
iwl_fw_cancel_timestamp(&mvm->fwrt);
clear_bit(IWL_MVM_STATUS_FIRMWARE_RUNNING, &mvm->status);
iwl_fwrt_stop_device(&mvm->fwrt);
iwl_fw_dbg_stop_sync(&mvm->fwrt);
iwl_trans_stop_device(mvm->trans);
iwl_free_fw_paging(&mvm->fwrt);
iwl_fw_dump_conf_clear(&mvm->fwrt);
}
Expand Down
3 changes: 0 additions & 3 deletions drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,6 @@ void _iwl_trans_pcie_gen2_stop_device(struct iwl_trans *trans, bool low_power)

trans_pcie->is_down = true;

/* Stop dbgc before stopping device */
iwl_fw_dbg_stop_recording(trans, NULL);

/* tell the device to stop sending interrupts */
iwl_disable_interrupts(trans);

Expand Down
3 changes: 0 additions & 3 deletions drivers/net/wireless/intel/iwlwifi/pcie/trans.c
Original file line number Diff line number Diff line change
Expand Up @@ -1242,9 +1242,6 @@ static void _iwl_trans_pcie_stop_device(struct iwl_trans *trans, bool low_power)

trans_pcie->is_down = true;

/* Stop dbgc before stopping device */
iwl_fw_dbg_stop_recording(trans, NULL);

/* tell the device to stop sending interrupts */
iwl_disable_interrupts(trans);

Expand Down

0 comments on commit 203c83d

Please sign in to comment.