提交 4ff78181 编写于 作者: E Eliad Peller 提交者: Emmanuel Grumbach

iwlwifi: mvm: unref SCAN ref on scan completion

The scan reference wasn't released in case of offloaded scan,
causing the refcount to go wrong and prevent the device
from going into d0i3.
Signed-off-by: NEliad Peller <eliadx.peller@intel.com>
Reviewed-by: NJohannes Berg <johannes.berg@intel.com>
Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
上级 d8bafeaf
...@@ -673,6 +673,7 @@ int iwl_mvm_rx_scan_offload_complete_notif(struct iwl_mvm *mvm, ...@@ -673,6 +673,7 @@ int iwl_mvm_rx_scan_offload_complete_notif(struct iwl_mvm *mvm,
mvm->scan_status = IWL_MVM_SCAN_NONE; mvm->scan_status = IWL_MVM_SCAN_NONE;
ieee80211_scan_completed(mvm->hw, ieee80211_scan_completed(mvm->hw,
status == IWL_SCAN_OFFLOAD_ABORTED); status == IWL_SCAN_OFFLOAD_ABORTED);
iwl_mvm_unref(mvm, IWL_MVM_REF_SCAN);
} }
mvm->last_ebs_successful = !ebs_status; mvm->last_ebs_successful = !ebs_status;
...@@ -1107,8 +1108,12 @@ int iwl_mvm_scan_offload_stop(struct iwl_mvm *mvm, bool notify) ...@@ -1107,8 +1108,12 @@ int iwl_mvm_scan_offload_stop(struct iwl_mvm *mvm, bool notify)
/* /*
* Clear the scan status so the next scan requests will succeed. This * Clear the scan status so the next scan requests will succeed. This
* also ensures the Rx handler doesn't do anything, as the scan was * also ensures the Rx handler doesn't do anything, as the scan was
* stopped from above. * stopped from above. Since the rx handler won't do anything now,
* we have to release the scan reference here.
*/ */
if (mvm->scan_status == IWL_MVM_SCAN_OS)
iwl_mvm_unref(mvm, IWL_MVM_REF_SCAN);
mvm->scan_status = IWL_MVM_SCAN_NONE; mvm->scan_status = IWL_MVM_SCAN_NONE;
if (notify) { if (notify) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册