aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHaim Dreyfuss <haim.dreyfuss@intel.com>2015-01-13 04:54:51 -0500
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2015-02-01 08:57:23 -0500
commit5a4b2afa77dea0e0ce6aa1c3f0dbf90dd9a681eb (patch)
treeaf71b78cd8ced244bfdda1df7371639cafc760ae
parent4cf677fd547d7671835d799e4d377b949510c642 (diff)
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>
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/ops.c3
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/scan.c13
2 files changed, 13 insertions, 3 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/ops.c b/drivers/net/wireless/iwlwifi/mvm/ops.c
index b6181efa9921..2dffc3600ed3 100644
--- a/drivers/net/wireless/iwlwifi/mvm/ops.c
+++ b/drivers/net/wireless/iwlwifi/mvm/ops.c
@@ -568,6 +568,9 @@ iwl_op_mode_mvm_start(struct iwl_trans *trans, const struct iwl_cfg *cfg,
568 if (!mvm->scan_cmd) 568 if (!mvm->scan_cmd)
569 goto out_free; 569 goto out_free;
570 570
571 /* Set EBS as successful as long as not stated otherwise by the FW. */
572 mvm->last_ebs_successful = true;
573
571 err = iwl_mvm_mac_setup_register(mvm); 574 err = iwl_mvm_mac_setup_register(mvm);
572 if (err) 575 if (err)
573 goto out_free; 576 goto out_free;
diff --git a/drivers/net/wireless/iwlwifi/mvm/scan.c b/drivers/net/wireless/iwlwifi/mvm/scan.c
index 3bd5f34d3285..4169e3d7c109 100644
--- a/drivers/net/wireless/iwlwifi/mvm/scan.c
+++ b/drivers/net/wireless/iwlwifi/mvm/scan.c
@@ -704,7 +704,8 @@ int iwl_mvm_rx_scan_offload_complete_notif(struct iwl_mvm *mvm,
704 iwl_mvm_unref(mvm, IWL_MVM_REF_SCAN); 704 iwl_mvm_unref(mvm, IWL_MVM_REF_SCAN);
705 } 705 }
706 706
707 mvm->last_ebs_successful = !ebs_status; 707 if (ebs_status)
708 mvm->last_ebs_successful = false;
708 709
709 return 0; 710 return 0;
710} 711}
@@ -2025,7 +2026,9 @@ int iwl_mvm_rx_umac_scan_complete_notif(struct iwl_mvm *mvm,
2025 notif->ebs_status == IWL_SCAN_EBS_SUCCESS ? 2026 notif->ebs_status == IWL_SCAN_EBS_SUCCESS ?
2026 "success" : "failed"); 2027 "success" : "failed");
2027 2028
2028 mvm->last_ebs_successful = !notif->ebs_status; 2029 if (notif->ebs_status)
2030 mvm->last_ebs_successful = false;
2031
2029 mvm->scan_uid[uid_idx] = 0; 2032 mvm->scan_uid[uid_idx] = 0;
2030 2033
2031 if (!sched) { 2034 if (!sched) {
@@ -2058,10 +2061,14 @@ static bool iwl_scan_umac_done_check(struct iwl_notif_wait_data *notif_wait,
2058 2061
2059 /* 2062 /*
2060 * Clear scan uid of scans that was aborted from above and completed 2063 * Clear scan uid of scans that was aborted from above and completed
2061 * in FW so the RX handler does nothing. 2064 * in FW so the RX handler does nothing. Set last_ebs_successful here if
2065 * needed.
2062 */ 2066 */
2063 scan_done->mvm->scan_uid[uid_idx] = 0; 2067 scan_done->mvm->scan_uid[uid_idx] = 0;
2064 2068
2069 if (notif->ebs_status)
2070 scan_done->mvm->last_ebs_successful = false;
2071
2065 return !iwl_mvm_find_scan_type(scan_done->mvm, scan_done->type); 2072 return !iwl_mvm_find_scan_type(scan_done->mvm, scan_done->type);
2066} 2073}
2067 2074