summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGanesh Kondabattini <ganeshk@qti.qualcomm.com>2014-01-22 10:07:38 +0530
committerPrakash Dhavali <pdhavali@qca.qualcomm.com>2014-01-26 21:37:00 -0800
commit99599293448b6ca4e2462155f8d62ad1c9ecfc52 (patch)
tree211256469baf0186a33d759044fb41256549b1e4
parente98096306a273cf762e453623d135c3aa2355f12 (diff)
CLD-SCAN: Handle the missing scan events.
When firmware aborting the scan which is not yet scheduled, it is goint to send the scan event with DEQUEUED reason code. But host is not registering for these events, So host is not receiving this event and blocking all other subsequent scan requests. Change-Id: I3a0b0c047baabedd89ec727be1df7eecbc5147e0 CRs-Fixed: 600976
-rw-r--r--CORE/SERVICES/WMA/wma.c23
1 files changed, 21 insertions, 2 deletions
diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c
index 5173e7836962..542079d2c08a 100644
--- a/CORE/SERVICES/WMA/wma.c
+++ b/CORE/SERVICES/WMA/wma.c
@@ -3506,7 +3506,10 @@ VOS_STATUS wma_get_buf_start_scan_cmd(tp_wma_handle wma_handle,
cmd->notify_scan_events = WMI_SCAN_EVENT_STARTED |
WMI_SCAN_EVENT_START_FAILED |
WMI_SCAN_EVENT_FOREIGN_CHANNEL |
- WMI_SCAN_EVENT_COMPLETED;
+ WMI_SCAN_EVENT_COMPLETED |
+ WMI_SCAN_EVENT_DEQUEUED |
+ WMI_SCAN_EVENT_PREEMPTED |
+ WMI_SCAN_EVENT_RESTARTED;
cmd->dwell_time_active = scan_req->maxChannelTime;
cmd->dwell_time_passive = scan_req->maxChannelTime;
@@ -13912,11 +13915,27 @@ static int wma_scan_event_callback(WMA_HANDLE handle, u_int8_t *data,
else
scan_event->reasonCode = eSIR_SME_SCAN_FAILED;
- if (wmi_event->event == WMI_SCAN_EVENT_COMPLETED) {
+ switch (wmi_event->event) {
+ case WMI_SCAN_EVENT_COMPLETED:
if (wmi_event->scan_id == scan_id)
wma_reset_scan_info(wma_handle, vdev_id);
else
WMA_LOGE("Scan id not matched for SCAN COMPLETE event");
+ break;
+ case WMI_SCAN_EVENT_DEQUEUED:
+ scan_event->event = WMI_SCAN_EVENT_COMPLETED;
+ 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);
+ break;
+ }
+ case WMI_SCAN_EVENT_RESTARTED:
+ WMA_LOGP("Unexpected Scan Event %lu", wmi_event->event);
+ break;
}
wma_send_msg(wma_handle, WDA_RX_SCAN_EVENT, (void *) scan_event, 0) ;
return 0;