diff options
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/ops.c')
| -rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 32 | 
1 files changed, 24 insertions, 8 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c index 9ffff6ed8133..3da5ec40aaea 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c @@ -1149,21 +1149,37 @@ static void iwl_mvm_fw_error_dump_wk(struct work_struct *work)  	mutex_lock(&mvm->mutex); -	/* stop recording */  	if (mvm->cfg->device_family == IWL_DEVICE_FAMILY_7000) { +		/* stop recording */  		iwl_set_bits_prph(mvm->trans, MON_BUFF_SAMPLE_CTL, 0x100); + +		iwl_mvm_fw_error_dump(mvm); + +		/* start recording again if the firmware is not crashed */ +		if (!test_bit(STATUS_FW_ERROR, &mvm->trans->status) && +		    mvm->fw->dbg_dest_tlv) +			iwl_clear_bits_prph(mvm->trans, +					    MON_BUFF_SAMPLE_CTL, 0x100);  	} else { +		u32 in_sample = iwl_read_prph(mvm->trans, DBGC_IN_SAMPLE); +		u32 out_ctrl = iwl_read_prph(mvm->trans, DBGC_OUT_CTRL); + +		/* stop recording */  		iwl_write_prph(mvm->trans, DBGC_IN_SAMPLE, 0); -		/* wait before we collect the data till the DBGC stop */  		udelay(100); -	} +		iwl_write_prph(mvm->trans, DBGC_OUT_CTRL, 0); +		/* wait before we collect the data till the DBGC stop */ +		udelay(500); -	iwl_mvm_fw_error_dump(mvm); +		iwl_mvm_fw_error_dump(mvm); -	/* start recording again if the firmware is not crashed */ -	WARN_ON_ONCE((!test_bit(STATUS_FW_ERROR, &mvm->trans->status)) && -		     mvm->fw->dbg_dest_tlv && -		     iwl_mvm_start_fw_dbg_conf(mvm, mvm->fw_dbg_conf)); +		/* start recording again if the firmware is not crashed */ +		if (!test_bit(STATUS_FW_ERROR, &mvm->trans->status) && +		    mvm->fw->dbg_dest_tlv) { +			iwl_write_prph(mvm->trans, DBGC_IN_SAMPLE, in_sample); +			iwl_write_prph(mvm->trans, DBGC_OUT_CTRL, out_ctrl); +		} +	}  	mutex_unlock(&mvm->mutex);  |