mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-12 21:44:06 +08:00
iwlwifi: mvm: rfi: don't lock mvm->mutex when sending config command
The mutex is already locked in iwl_mvm_mac_start.
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Fixes: 21254908cb
("iwlwifi: mvm: add RFI-M support")
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/iwlwifi.20210326125611.703288ea058d.I82a0312389032d07c3b478bef3e938e06bfa7df6@changeid
This commit is contained in:
parent
08f4b0b1c0
commit
39fb06f791
@ -1786,10 +1786,13 @@ static ssize_t iwl_dbgfs_rfi_freq_table_write(struct iwl_mvm *mvm, char *buf,
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
/* value zero triggers re-sending the default table to the device */
|
/* value zero triggers re-sending the default table to the device */
|
||||||
if (!op_id)
|
if (!op_id) {
|
||||||
|
mutex_lock(&mvm->mutex);
|
||||||
ret = iwl_rfi_send_config_cmd(mvm, NULL);
|
ret = iwl_rfi_send_config_cmd(mvm, NULL);
|
||||||
else
|
mutex_unlock(&mvm->mutex);
|
||||||
|
} else {
|
||||||
ret = -EOPNOTSUPP; /* in the future a new table will be added */
|
ret = -EOPNOTSUPP; /* in the future a new table will be added */
|
||||||
|
}
|
||||||
|
|
||||||
return ret ?: count;
|
return ret ?: count;
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2020 Intel Corporation
|
* Copyright (C) 2020 - 2021 Intel Corporation
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "mvm.h"
|
#include "mvm.h"
|
||||||
@ -66,6 +66,8 @@ int iwl_rfi_send_config_cmd(struct iwl_mvm *mvm, struct iwl_rfi_lut_entry *rfi_t
|
|||||||
if (!fw_has_capa(&mvm->fw->ucode_capa, IWL_UCODE_TLV_CAPA_RFIM_SUPPORT))
|
if (!fw_has_capa(&mvm->fw->ucode_capa, IWL_UCODE_TLV_CAPA_RFIM_SUPPORT))
|
||||||
return -EOPNOTSUPP;
|
return -EOPNOTSUPP;
|
||||||
|
|
||||||
|
lockdep_assert_held(&mvm->mutex);
|
||||||
|
|
||||||
/* in case no table is passed, use the default one */
|
/* in case no table is passed, use the default one */
|
||||||
if (!rfi_table) {
|
if (!rfi_table) {
|
||||||
memcpy(cmd.table, iwl_rfi_table, sizeof(cmd.table));
|
memcpy(cmd.table, iwl_rfi_table, sizeof(cmd.table));
|
||||||
@ -75,9 +77,7 @@ int iwl_rfi_send_config_cmd(struct iwl_mvm *mvm, struct iwl_rfi_lut_entry *rfi_t
|
|||||||
cmd.oem = 1;
|
cmd.oem = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
mutex_lock(&mvm->mutex);
|
|
||||||
ret = iwl_mvm_send_cmd(mvm, &hcmd);
|
ret = iwl_mvm_send_cmd(mvm, &hcmd);
|
||||||
mutex_unlock(&mvm->mutex);
|
|
||||||
|
|
||||||
if (ret)
|
if (ret)
|
||||||
IWL_ERR(mvm, "Failed to send RFI config cmd %d\n", ret);
|
IWL_ERR(mvm, "Failed to send RFI config cmd %d\n", ret);
|
||||||
|
Loading…
Reference in New Issue
Block a user