summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSrinivas Girigowda <sgirigow@qca.qualcomm.com>2015-05-21 16:29:48 -0700
committerAnjaneedevi Kapparapu <akappa@codeaurora.org>2015-06-09 19:23:09 +0530
commit8bc3ea519bb45b5691af5c497c8a84b08fb21212 (patch)
treec9c8e47f803a53665e392a59b9d2b98a10b50303
parent971815d3cad061a539aa60b5a09bb8b1d6448374 (diff)
qcacld-2.0: Add support for report_events bit field
Now from the framework, report events is passed as a bit field. Add the host driver changes to check for appropriate bit and set the corresponding flags. Change-Id: Icf0804463c693f751dc56a6d3169e78f904f385a CRs-Fixed: 841940
-rw-r--r--CORE/SERVICES/WMA/wma.c51
1 files changed, 43 insertions, 8 deletions
diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c
index 5432192a1f42..901ed176cec8 100644
--- a/CORE/SERVICES/WMA/wma.c
+++ b/CORE/SERVICES/WMA/wma.c
@@ -190,6 +190,27 @@
#define WMA_LOG_COMPLETION_TIMER 10000 /* 10 seconds */
+#ifdef FEATURE_WLAN_EXTSCAN
+/**
+ * enum extscan_report_events_type - extscan report events type
+ * @EXTSCAN_REPORT_EVENTS_BUFFER_FULL: report only when scan history is % full
+ * @EXTSCAN_REPORT_EVENTS_EACH_SCAN: report a scan completion event after scan
+ * @EXTSCAN_REPORT_EVENTS_FULL_RESULTS: forward scan results
+ * (beacons/probe responses + IEs)
+ * in real time to HAL, in addition to completion events.
+ * Note: To keep backward compatibility,
+ * fire completion events regardless of REPORT_EVENTS_EACH_SCAN.
+ * @EXTSCAN_REPORT_EVENTS_NO_BATCH: controls batching,
+ * 0 => batching, 1 => no batching
+ */
+enum extscan_report_events_type {
+ EXTSCAN_REPORT_EVENTS_BUFFER_FULL = 0x00,
+ EXTSCAN_REPORT_EVENTS_EACH_SCAN = 0x01,
+ EXTSCAN_REPORT_EVENTS_FULL_RESULTS = 0x02,
+ EXTSCAN_REPORT_EVENTS_NO_BATCH = 0x04,
+};
+#endif
+
/* Data rate 100KBPS based on IE Index */
struct index_data_rate_type
{
@@ -22769,20 +22790,34 @@ static VOS_STATUS wma_process_ll_stats_getReq
dest_blist->channel_band = src_bucket->band;
dest_blist->num_channels = src_bucket->numChannels;
dest_blist->notify_extscan_events = 0;
- if (src_bucket->reportEvents >= 2) {
+
+ if (src_bucket->reportEvents & EXTSCAN_REPORT_EVENTS_EACH_SCAN)
+ dest_blist->notify_extscan_events =
+ WMI_EXTSCAN_BUCKET_COMPLETED_EVENT;
+
+ if (src_bucket->reportEvents &
+ EXTSCAN_REPORT_EVENTS_FULL_RESULTS) {
dest_blist->forwarding_flags =
WMI_EXTSCAN_FORWARD_FRAME_TO_HOST;
+ dest_blist->notify_extscan_events |=
+ WMI_EXTSCAN_BUCKET_COMPLETED_EVENT |
+ WMI_EXTSCAN_CYCLE_STARTED_EVENT |
+ WMI_EXTSCAN_CYCLE_COMPLETED_EVENT;
} else {
dest_blist->forwarding_flags =
WMI_EXTSCAN_NO_FORWARDING;
}
- if (src_bucket->reportEvents >= 1)
- dest_blist->notify_extscan_events =
- WMI_EXTSCAN_BUCKET_COMPLETED_EVENT;
- if (src_bucket->reportEvents >= 2)
- dest_blist->notify_extscan_events |=
- WMI_EXTSCAN_CYCLE_STARTED_EVENT |
- WMI_EXTSCAN_CYCLE_COMPLETED_EVENT;
+
+ if (src_bucket->reportEvents & EXTSCAN_REPORT_EVENTS_NO_BATCH)
+ dest_blist->configuration_flags = 0;
+ else
+ dest_blist->configuration_flags =
+ WMI_EXTSCAN_BUCKET_CACHE_RESULTS;
+
+ WMA_LOGI("%s: ntfy_extscan_events:%u cfg_flags:%u fwd_flags:%u",
+ __func__, dest_blist->notify_extscan_events,
+ dest_blist->configuration_flags,
+ dest_blist->forwarding_flags);
dest_blist->min_dwell_time_active = src_bucket->min_dwell_time_active;
dest_blist->max_dwell_time_active = src_bucket->max_dwell_time_active;