summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNaveen Rawat <nrawat@qca.qualcomm.com>2014-06-05 14:33:52 -0700
committerAkash Patel <c_akashp@qca.qualcomm.com>2014-06-13 11:49:50 -0700
commita84fbcc1205cc5c5ac83f5c6f3955caad906decd (patch)
tree875b47f1d67c9f6991d50237133ff24316dc7f02
parent382d1ead4bcad4b90ab179259ee5feabbfca8a75 (diff)
qcacld: Fix for scan list getting empty
Roaming scan being high priority will preempt low priority scan issued from GUI. Current implementation of host will abort the scan when it receives PREEMPT event from firmware. Firmware is capable of restarting the suspended low priority scan, so following changes are done: 1) Host should ignore both scan PREEMPT and scan RESTART events. 2) But in case better AP event has come from firmware, that needs to be processed with prority, so cancel the existing scan on reception of better AP event. 3) Also whatever the status of scan returned from firmware, host should always send success status so that existing resutls in LIM cache can be returned to host side. CRs-Fixed: 676924 Change-Id: I1cd8e775d994a904c22ec96266c13233bfa9a1a0
-rw-r--r--CORE/SERVICES/WMA/wma.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c
index 4e8d01e86763..a070d55ad145 100644
--- a/CORE/SERVICES/WMA/wma.c
+++ b/CORE/SERVICES/WMA/wma.c
@@ -17485,6 +17485,12 @@ static int wma_scan_event_callback(WMA_HANDLE handle, u_int8_t *data,
switch (wmi_event->event) {
case WMI_SCAN_EVENT_COMPLETED:
+ /*
+ * return success always so that SME can pick whatever scan
+ * results is available in scan cache(due to partial or
+ * aborted scan)
+ */
+ scan_event->reasonCode = eSIR_SME_SUCCESS;
if (wmi_event->scan_id == scan_id)
wma_reset_scan_info(wma_handle, vdev_id);
else
@@ -17495,14 +17501,10 @@ static int wma_scan_event_callback(WMA_HANDLE handle, u_int8_t *data,
scan_event->reasonCode = eSIR_SME_SCAN_FAILED;
break;
case WMI_SCAN_EVENT_PREEMPTED:
- {
- tAbortScanParams abortScan;
- abortScan.SessionId = vdev_id;
- wma_stop_scan(wma_handle, &abortScan);
+ WMA_LOGW("%s: Unhandled Scan Event WMI_SCAN_EVENT_PREEMPTED", __func__);
break;
- }
case WMI_SCAN_EVENT_RESTARTED:
- WMA_LOGW("%s: Unexpected Scan Event %u", __func__, wmi_event->event);
+ WMA_LOGW("%s: Unhandled Scan Event WMI_SCAN_EVENT_RESTARTED", __func__);
break;
}
@@ -17730,6 +17732,12 @@ static VOS_STATUS wma_tx_detach(tp_wma_handle wma_handle)
static void wma_roam_better_ap_handler(tp_wma_handle wma, u_int32_t vdev_id)
{
VOS_STATUS ret;
+ /* abort existing scan if any */
+ if (wma->interfaces[vdev_id].scan_info.scan_id != 0) {
+ tAbortScanParams abortScan;
+ abortScan.SessionId = vdev_id;
+ wma_stop_scan(wma, &abortScan);
+ }
ret = tlshim_mgmt_roam_event_ind(wma->vos_context, vdev_id);
}