mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-06 04:33:58 +08:00
iwlwifi: mvm: Fix a few EBS error handling bugs
Last EBS status wasn't set to success in the initialization, which caused the first scan to be without EBS. Fix that. When EBS is not enabled by the driver, the FW still sends ebs_status success, which can override EBS failure state. Consider only EBS failures, to avoid such override. Last_ebs_success is set back to true upon disconnection. Last_ebs_success wasn't set in umac scan abort flow, fix that too. Signed-off-by: Haim Dreyfuss <haim.dreyfuss@intel.com> Signed-off-by: David Spinadel <david.spinadel@intel.com> Reviewed-by: Alexander Bondar <alexander.bondar@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
This commit is contained in:
parent
4cf677fd54
commit
5a4b2afa77
@ -568,6 +568,9 @@ iwl_op_mode_mvm_start(struct iwl_trans *trans, const struct iwl_cfg *cfg,
|
||||
if (!mvm->scan_cmd)
|
||||
goto out_free;
|
||||
|
||||
/* Set EBS as successful as long as not stated otherwise by the FW. */
|
||||
mvm->last_ebs_successful = true;
|
||||
|
||||
err = iwl_mvm_mac_setup_register(mvm);
|
||||
if (err)
|
||||
goto out_free;
|
||||
|
@ -704,7 +704,8 @@ int iwl_mvm_rx_scan_offload_complete_notif(struct iwl_mvm *mvm,
|
||||
iwl_mvm_unref(mvm, IWL_MVM_REF_SCAN);
|
||||
}
|
||||
|
||||
mvm->last_ebs_successful = !ebs_status;
|
||||
if (ebs_status)
|
||||
mvm->last_ebs_successful = false;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -2025,7 +2026,9 @@ int iwl_mvm_rx_umac_scan_complete_notif(struct iwl_mvm *mvm,
|
||||
notif->ebs_status == IWL_SCAN_EBS_SUCCESS ?
|
||||
"success" : "failed");
|
||||
|
||||
mvm->last_ebs_successful = !notif->ebs_status;
|
||||
if (notif->ebs_status)
|
||||
mvm->last_ebs_successful = false;
|
||||
|
||||
mvm->scan_uid[uid_idx] = 0;
|
||||
|
||||
if (!sched) {
|
||||
@ -2058,10 +2061,14 @@ static bool iwl_scan_umac_done_check(struct iwl_notif_wait_data *notif_wait,
|
||||
|
||||
/*
|
||||
* Clear scan uid of scans that was aborted from above and completed
|
||||
* in FW so the RX handler does nothing.
|
||||
* in FW so the RX handler does nothing. Set last_ebs_successful here if
|
||||
* needed.
|
||||
*/
|
||||
scan_done->mvm->scan_uid[uid_idx] = 0;
|
||||
|
||||
if (notif->ebs_status)
|
||||
scan_done->mvm->last_ebs_successful = false;
|
||||
|
||||
return !iwl_mvm_find_scan_type(scan_done->mvm, scan_done->type);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user