Commit 59e1221f authored by Johannes Berg's avatar Johannes Berg Committed by Luca Coelho

iwlwifi: mvm: align locking in D3 test debugfs

Since commit a05829a7 ("cfg80211: avoid holding the RTNL when
calling the driver") we're not only holding the RTNL when going
in and out of suspend, but also the wiphy->mtx. Add that to the
D3 test debugfs in iwlwifi since it's required for various calls
to mac80211.

Fixes: a05829a7 ("cfg80211: avoid holding the RTNL when calling the driver")
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Fixes: a05829a7 ("cfg80211: avoid holding the RTNL when calling the driver")
Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20220129105618.fcec0204e162.Ib73bf787ab4d83581de20eb89b1f8dbfcaaad0e3@changeidSigned-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
parent 8a265d1a
...@@ -2697,7 +2697,9 @@ static int iwl_mvm_d3_test_open(struct inode *inode, struct file *file) ...@@ -2697,7 +2697,9 @@ static int iwl_mvm_d3_test_open(struct inode *inode, struct file *file)
/* start pseudo D3 */ /* start pseudo D3 */
rtnl_lock(); rtnl_lock();
wiphy_lock(mvm->hw->wiphy);
err = __iwl_mvm_suspend(mvm->hw, mvm->hw->wiphy->wowlan_config, true); err = __iwl_mvm_suspend(mvm->hw, mvm->hw->wiphy->wowlan_config, true);
wiphy_unlock(mvm->hw->wiphy);
rtnl_unlock(); rtnl_unlock();
if (err > 0) if (err > 0)
err = -EINVAL; err = -EINVAL;
...@@ -2753,7 +2755,9 @@ static int iwl_mvm_d3_test_release(struct inode *inode, struct file *file) ...@@ -2753,7 +2755,9 @@ static int iwl_mvm_d3_test_release(struct inode *inode, struct file *file)
iwl_fw_dbg_read_d3_debug_data(&mvm->fwrt); iwl_fw_dbg_read_d3_debug_data(&mvm->fwrt);
rtnl_lock(); rtnl_lock();
wiphy_lock(mvm->hw->wiphy);
__iwl_mvm_resume(mvm, true); __iwl_mvm_resume(mvm, true);
wiphy_unlock(mvm->hw->wiphy);
rtnl_unlock(); rtnl_unlock();
iwl_mvm_resume_tcm(mvm); iwl_mvm_resume_tcm(mvm);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment