iwlwifi: avoid code duplication in stopping fw debug data recording

Make all FW debug data stop recording flows to use
iwl_fw_dbg_stop_recording function instead of writing to FW
registers directly.

Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
这个提交包含在:
Shahar S Matityahu
2018-05-03 09:52:12 +03:00
提交者 Luca Coelho
父节点 c5f97542aa
当前提交 ae17404e38
修改 5 个文件,包含 11 行新增18 行删除

查看文件

@@ -55,6 +55,7 @@
#include "iwl-context-info.h"
#include "iwl-context-info-gen3.h"
#include "internal.h"
#include "fw/dbg.h"
/*
* Start up NIC's basic functionality after it has been reset
@@ -164,9 +165,7 @@ 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_write_prph(trans, DBGC_IN_SAMPLE, 0);
udelay(100);
iwl_write_prph(trans, DBGC_OUT_CTRL, 0);
iwl_fw_dbg_stop_recording(trans);
/* tell the device to stop sending interrupts */
iwl_disable_interrupts(trans);

查看文件

@@ -1243,13 +1243,7 @@ static void _iwl_trans_pcie_stop_device(struct iwl_trans *trans, bool low_power)
trans_pcie->is_down = true;
/* Stop dbgc before stopping device */
if (trans->cfg->device_family == IWL_DEVICE_FAMILY_7000) {
iwl_set_bits_prph(trans, MON_BUFF_SAMPLE_CTL, 0x100);
} else {
iwl_write_prph(trans, DBGC_IN_SAMPLE, 0);
udelay(100);
iwl_write_prph(trans, DBGC_OUT_CTRL, 0);
}
iwl_fw_dbg_stop_recording(trans);
/* tell the device to stop sending interrupts */
iwl_disable_interrupts(trans);