From: Liad Kaufman Date: Sun, 4 Jan 2015 09:03:13 +0000 (+0200) Subject: iwlwifi: mvm: make sure state isn't in d0i3 when stopping fw monitor X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e93475a0ff492000bfd911f44626a3d1d44025b5;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git iwlwifi: mvm: make sure state isn't in d0i3 when stopping fw monitor In case platform is in d0i3 - make sure it is awake when writing the registers to stop the monitor when collecting FW debug data. Plus, remove unneeded mutex locking currently done. Signed-off-by: Liad Kaufman Signed-off-by: Emmanuel Grumbach --- diff --git a/drivers/net/wireless/iwlwifi/mvm/debugfs.c b/drivers/net/wireless/iwlwifi/mvm/debugfs.c index f89b795fd4be..afd1986a3216 100644 --- a/drivers/net/wireless/iwlwifi/mvm/debugfs.c +++ b/drivers/net/wireless/iwlwifi/mvm/debugfs.c @@ -988,9 +988,14 @@ static ssize_t iwl_dbgfs_fw_dbg_collect_write(struct iwl_mvm *mvm, char *buf, size_t count, loff_t *ppos) { - mutex_lock(&mvm->mutex); + int ret = iwl_mvm_ref_sync(mvm, IWL_MVM_REF_PRPH_WRITE); + + if (ret) + return ret; + iwl_mvm_fw_dbg_collect(mvm); - mutex_unlock(&mvm->mutex); + + iwl_mvm_unref(mvm, IWL_MVM_REF_PRPH_WRITE); return count; }