summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVinit Deshpande <vinitd@google.com>2015-03-14 22:10:17 -0700
committerVinit Deshpande <vinitd@google.com>2015-03-14 22:10:17 -0700
commit9dd29f7bebbccd3771119c3cf934b90285a87421 (patch)
treed060d169482b4ecedc87609b784183bd2963f2d9
parent05ece39af25fca175fdf63dbf1259da493307d2e (diff)
parentec5301b3af1f35ceeb11a9c4971143a9dea3ae29 (diff)
downloadhardware_libhardware_legacy-9dd29f7bebbccd3771119c3cf934b90285a87421.zip
hardware_libhardware_legacy-9dd29f7bebbccd3771119c3cf934b90285a87421.tar.gz
hardware_libhardware_legacy-9dd29f7bebbccd3771119c3cf934b90285a87421.tar.bz2
am "clarify comments and complete EPNO API"
merged from goog/mirror-m-wireless-internal-release ec5301b clarify comments and complete EPNO API
-rw-r--r--include/hardware_legacy/gscan.h33
-rw-r--r--include/hardware_legacy/wifi_config.h1
-rw-r--r--include/hardware_legacy/wifi_logger.h13
3 files changed, 39 insertions, 8 deletions
diff --git a/include/hardware_legacy/gscan.h b/include/hardware_legacy/gscan.h
index 368ca9d..bdb9bc7 100644
--- a/include/hardware_legacy/gscan.h
+++ b/include/hardware_legacy/gscan.h
@@ -227,6 +227,12 @@ wifi_error wifi_set_scanning_mac_oui(wifi_interface_handle handle, oui scan_oui)
#define WIFI_PNO_AUTH_CODE_PSK 2 // WPA_PSK or WPA2PSK
#define WIFI_PNO_AUTH_CODE_EAPOL 4 // any EAPOL
+// Enhanced PNO:
+// for each network framework will either specify a ssid or a crc32
+// if ssid is specified (i.e. ssid[0] != 0) then crc32 field shall be ignored.
+// A PNO network shall be reported once, that is, once a network is reported by firmware
+// its entry shall be marked as "done" until framework call wifi_set_epno_list.
+ // Calling wifi_set_epno_list shall reset the "done" status of pno networks in firmware.
typedef struct {
char ssid[32];
char rssi_threshold; // threshold for considering this SSID as found
@@ -235,13 +241,32 @@ typedef struct {
// i.e. not passing the whole SSID
// in firmware and instead storing a shorter string
char auth_bit_field; // auth bitfield for matching WPA IE
-} wifi_pno_network;
+} wifi_epno_network;
/* PNO list */
typedef struct {
- int num_ssid; // number of SSIDs
- char wifi_pno_network[MAX_PNO_SSID]; // SSIDs
-} wifi_pno_params;
+ int num_networks; // number of SSIDs
+ wifi_epno_network networks[]; // PNO networks
+} wifi_epno_params;
+
+typedef struct {
+ int network_index; // index of the network found in the pno list
+ char ssid[32];
+ wifi_channel channel;
+ int rssi;
+} wifi_epno_result;
+
+
+typedef struct {
+ // on results
+ void (*on_network_found)(wifi_request_id id,
+ unsigned num_results, wifi_epno_result *results);
+} wifi_epno_handler;
+
+
+/* Set the PNO list */
+wifi_error wifi_set_epno_list(wifi_request_id id, wifi_interface_handle iface,
+ int num_networks, wifi_epno_network *networks, wifi_epno_handler handler);
#endif
diff --git a/include/hardware_legacy/wifi_config.h b/include/hardware_legacy/wifi_config.h
index c19099d..88e5286 100644
--- a/include/hardware_legacy/wifi_config.h
+++ b/include/hardware_legacy/wifi_config.h
@@ -15,6 +15,7 @@ extern "C"
typedef int wifi_radio;
// whether the wifi chipset wakes at every dtim beacon or a multiple of the dtim period
+// if extended_dtim is set to 3, the STA shall wake up every 3 DTIM beacons
wifi_error wifi_extended_dtim_config_set(wifi_request_id id,
wifi_interface_handle iface, int extended_dtim);
diff --git a/include/hardware_legacy/wifi_logger.h b/include/hardware_legacy/wifi_logger.h
index a201b49..d7b7cfb 100644
--- a/include/hardware_legacy/wifi_logger.h
+++ b/include/hardware_legacy/wifi_logger.h
@@ -42,6 +42,7 @@ typedef struct {
} wifi_ring_per_packet_status_entry;
+// Below events refer to the wifi_connectivity_event ring and shall be supported
#define WIFI_EVENT_ASSOCIATION_REQUESTED 0 // driver receive association command from kernel
#define WIFI_EVENT_AUTH_COMPLETE 1
@@ -93,6 +94,7 @@ typedef struct {
// by the developer only.
} wifi_ring_buffer_driver_connectivity_event;
+static char connectivity_event_ring_name[] = "wifi_connectivity_events"; //ring buffer name for connectivity events ring
/**
* This structure represent a logger entry within a ring buffer.
@@ -117,7 +119,10 @@ typedef struct {
u8 type; // Per ring specific
u8 resvd;
u64 timestamp; //present if has_timestamp bit is set.
- u8 data[0];
+ union {
+ u8 data[0];
+ wifi_ring_buffer_driver_connectivity_event connectivity_event;
+ };
} wifi_ring_buffer_entry;
#define WIFI_RING_BUFFER_FLAG_HAS_BINARY_ENTRIES 0x00000001 // set if binary entries are present
@@ -144,12 +149,12 @@ typedef struct {
/**
* API to trigger the debug collection.
* Unless his API is invoked - logging is not triggered.
- * - verbose_level 0 corresponds to minimal or no collection
- * - verbose_level 1+ are TBD
+ * - verbose_level 0 corresponds to no collection
+ * - verbose_level 1+ are TBD, with increasing level of logging
*
* buffer_name represent the name of the ring for which data collection shall start.
*/
-wifi_error wifi_start_logging(wifi_interface_handle iface, u32 verbose_level, u8 * buffer_name);
+wifi_error wifi_set_logging_level(wifi_interface_handle iface, u32 verbose_level, u8 * buffer_name);
/* callback for reporting ring buffer status */
typedef struct {