summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorVinit Deshpande <vinitd@google.com>2014-10-31 11:16:02 -0700
committerVinit Deshpande <vinitd@google.com>2014-12-03 11:43:13 -0800
commitbb73aa5a14b1cab3d4220ac0ba9f8ee7612d6d11 (patch)
tree9836c287360b2b0e847f06e1ad8c16de9b40c69a /include
parent1688082913a82db7c48f7fd35d7da6de7a5ed01d (diff)
downloadhardware_libhardware_legacy-bb73aa5a14b1cab3d4220ac0ba9f8ee7612d6d11.zip
hardware_libhardware_legacy-bb73aa5a14b1cab3d4220ac0ba9f8ee7612d6d11.tar.gz
hardware_libhardware_legacy-bb73aa5a14b1cab3d4220ac0ba9f8ee7612d6d11.tar.bz2
New Additions to WifiScanner APIs
Added single shot scan, and maxScansToCache. Also fixed getScanResults() to report scan results to listeners. Bug: 18087596 Bug: 17694040 Bug: 18059273 Change-Id: I8a6da5426561e22e72d1e99c5537205b893077dd
Diffstat (limited to 'include')
-rw-r--r--include/hardware_legacy/gscan.h20
1 files changed, 17 insertions, 3 deletions
diff --git a/include/hardware_legacy/gscan.h b/include/hardware_legacy/gscan.h
index 5163e01..cf27d13 100644
--- a/include/hardware_legacy/gscan.h
+++ b/include/hardware_legacy/gscan.h
@@ -103,7 +103,8 @@ typedef struct {
* 1 => same as 0 + report a scan completion event after scanning this bucket
* 2 => same as 1 + forward scan results (beacons/probe responses + IEs) in real time to HAL
* 3 => same as 2 + forward scan results (beacons/probe responses + IEs) in real time to
- supplicant as well (optional) . */
+ supplicant as well (optional) .
+ */
byte report_events;
int num_channels;
@@ -114,7 +115,8 @@ typedef struct {
int base_period; // base timer period in ms
int max_ap_per_scan; // number of APs to store in each scan in the
// BSSID/RSSI history buffer (keep the highest RSSI APs)
- int report_threshold; // in %, when scan buffer is this much full, wake up AP
+ int report_threshold_percent; // in %, when scan buffer is this much full, wake up AP
+ int report_threshold_num_scans; // in number of scans, wake up AP after these many scans
int num_buckets;
wifi_scan_bucket_spec buckets[MAX_BUCKETS];
} wifi_scan_cmd_params;
@@ -126,9 +128,21 @@ wifi_error wifi_start_gscan(wifi_request_id id, wifi_interface_handle iface,
/* Stop periodic GSCAN */
wifi_error wifi_stop_gscan(wifi_request_id id, wifi_interface_handle iface);
+typedef enum {
+ WIFI_SCAN_FLAG_INTERRUPTED = 1 // Indicates that scan results are not complete because
+ // probes were not sent on some channels
+} wifi_scan_flags;
+
/* Get the GSCAN cached scan results */
+typedef struct {
+ int scan_id; // a unique identifier for the scan unit
+ int flags; // a bitmask with additional information about scan
+ int num_results; // number of bssids retrieved by the scan
+ wifi_scan_result *results; // scan results - one for each bssid
+} wifi_cached_scan_results;
+
wifi_error wifi_get_cached_gscan_results(wifi_interface_handle iface, byte flush,
- int max, wifi_scan_result *results, int *num);
+ int max, wifi_cached_scan_results *results, int *num);
/* BSSID Hotlist */
typedef struct {