summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/hardware_legacy/gscan.h171
-rw-r--r--include/hardware_legacy/link_layer_stats.h15
-rw-r--r--include/hardware_legacy/wifi_hal.h23
-rw-r--r--include/hardware_legacy/wifi_logger.h146
4 files changed, 289 insertions, 66 deletions
diff --git a/include/hardware_legacy/gscan.h b/include/hardware_legacy/gscan.h
index 5d62dd9..3cc8050 100644
--- a/include/hardware_legacy/gscan.h
+++ b/include/hardware_legacy/gscan.h
@@ -21,6 +21,7 @@ const unsigned MAX_BUCKETS = 16;
const unsigned MAX_HOTLIST_APS = 128;
const unsigned MAX_SIGNIFICANT_CHANGE_APS = 64;
const unsigned MAX_PNO_SSID = 128;
+const unsigned MAX_HOTLIST_SSID = 8;
wifi_error wifi_get_valid_channels(wifi_interface_handle handle,
int band, int max_channels, wifi_channel *channels, int *num_channels);
@@ -182,6 +183,35 @@ wifi_error wifi_set_bssid_hotlist(wifi_request_id id, wifi_interface_handle ifac
/* Clear the BSSID Hotlist */
wifi_error wifi_reset_bssid_hotlist(wifi_request_id id, wifi_interface_handle iface);
+/* SSID Hotlist */
+typedef struct {
+ void (*on_hotlist_ssid_found)(wifi_request_id id,
+ unsigned num_results, wifi_scan_result *results);
+ void (*on_hotlist_ssid_lost)(wifi_request_id id,
+ unsigned num_results, wifi_scan_result *results);
+} wifi_hotlist_ssid_handler;
+
+typedef struct {
+ char ssid[32+1]; // SSID
+ wifi_band band; // band for this set of threshold params
+ wifi_rssi low; // low threshold
+ wifi_rssi high; // high threshold
+} ssid_threshold_param;
+
+typedef struct {
+ int lost_ssid_sample_size;
+ int num_ap; // number of hotlist APs
+ ssid_threshold_param ssid[MAX_HOTLIST_APS]; // hotlist APs
+} wifi_ssid_hotlist_params;
+
+
+/* Set the SSID Hotlist */
+wifi_error wifi_set_ssid_hotlist(wifi_request_id id, wifi_interface_handle iface,
+ wifi_ssid_hotlist_params params, wifi_hotlist_ssid_handler handler);
+
+/* Clear the SSID Hotlist */
+wifi_error wifi_reset_ssid_hotlist(wifi_request_id id, wifi_interface_handle iface);
+
/* Significant wifi change */
typedef struct {
mac_addr bssid; // BSSID
@@ -218,9 +248,14 @@ wifi_error wifi_reset_significant_change_handler(wifi_request_id id, wifi_interf
/* Random MAC OUI for PNO */
wifi_error wifi_set_scanning_mac_oui(wifi_interface_handle handle, oui scan_oui);
-
-#define WIFI_PNO_FLAG_DIRECTED_SCAN = 1 // whether directed scan needs to be performed (for hidden SSIDs)
-#define WIFI_PNO_FLAG_HASH_PROVIDED = 2 // whether a crc32 hash of the ssid is provided instead of the ssid
+// Whether directed scan needs to be performed (for hidden SSIDs)
+#define WIFI_PNO_FLAG_DIRECTED_SCAN = 1
+// Whether PNO event shall be triggered if the network is found on A band
+#define WIFI_PNO_FLAG_A_BAND = 2
+// Whether PNO event shall be triggered if the network is found on G band
+#define WIFI_PNO_FLAG_G_BAND = 4
+// Whether strict matching is required (i.e. firmware shall not match on the entire SSID)
+#define WIFI_PNO_FLAG_STRICT_MATCH = 8
// Code for matching the beacon AUTH IE - additional codes TBD
#define WIFI_PNO_AUTH_CODE_OPEN 1 // open
@@ -228,39 +263,35 @@ wifi_error wifi_set_scanning_mac_oui(wifi_interface_handle handle, oui scan_oui)
#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.
+// Enhanced PNO feature is expected to be enabled all of the time (e.g. screen lit) and may thus
+// requires firmware to store a large number of networks, covering the whole list of known network.
+// Therefore, it is acceptable for firmware to store a crc24, crc32 or other short hash of the SSID,
+// such that a low but non-zero probability of collision exist. With that scheme it should be
+// possible for firmware to keep an entry as small as 4 bytes for each pno network.
+// For instance, a firmware pn0 entry can be implemented in the form of:
+// PNO ENTRY = crc24(3 bytes) | RSSI_THRESHOLD>>3 (5 bits) | auth flags(3 bits)
+//
// 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.
+// its entry shall be marked as "done" until framework calls wifi_set_epno_list again.
+// 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
- char flags;
- int crc32; // crc32 of the SSID, this allows for memory size optimization
- // 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
+ char ssid[32+1];
+ char rssi_threshold; // threshold for considering this SSID as found, required granularity for
+ // this threshold is 4dBm to 8dBm
+ char flags; // WIFI_PNO_FLAG_XXX
+ char auth_bit_field; // auth bit field for matching WPA IE
} wifi_epno_network;
/* PNO list */
typedef struct {
- int num_networks; // number of SSIDs
+ 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+1]; // null terminated
- 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);
+ unsigned num_results, wifi_scan_result *results);
} wifi_epno_handler;
@@ -272,7 +303,8 @@ wifi_error wifi_set_epno_list(wifi_request_id id, wifi_interface_handle iface,
/* SSID white list */
/* Note that this feature requires firmware to be able to indicate to kernel sme and wpa_supplicant
* that the SSID of the network has changed
- * and thus requires further changed in cfg80211 stack, for instance, the below function would change:
+ * and thus requires further changed in cfg80211 stack, for instance,
+ * the below function would change:
void __cfg80211_roamed(struct wireless_dev *wdev,
struct cfg80211_bss *bss,
@@ -288,10 +320,93 @@ typedef struct {
wifi_error wifi_set_ssid_white_list(wifi_request_id id, wifi_interface_handle iface,
int num_networks, wifi_ssid *ssids);
+/* Set G-SCAN roam parameters */
+/**
+ * Firmware roaming is implemented with two modes:
+ * 1- "Alert" mode roaming, (Note: alert roaming is the pre-L roaming, whereas firmware is
+ * "urgently" hunting for another BSSID because the RSSI is low, or because many successive
+ * beacons have been lost or other bad link conditions).
+ * 2- "Lazy" mode, where firmware is hunting for a better BSSID or white listed SSID even though
+ * the RSSI of the link is good.
+ * Lazy mode is configured thru G-scan, that is, the results of G-scans are compared to the
+ * current RSSI and fed thru the roaming engine.
+ * Lazy scan will be enabled (and or throttled down by reducing the number of G-scans) by
+ * framework only in certain conditions, such as:
+ * - no real time (VO/VI) traffic at the interface
+ * - low packet rate for BE/BK packets a the interface
+ * - system conditions (screen lit/dark) etc...
+ *
+ * For consistency, the roam parameters will always be configured by framework such that:
+ *
+ * condition 1- A_band_boost_threshold >= (alert_roam_rssi_trigger + 10)
+ * This condition ensures that Lazy roam doesn't cause the device to roam to a 5GHz BSSID whose RSSI
+ * is lower than the alert threshold, which would consequently trigger a roam to a low RSSI BSSID,
+ * hence triggering alert mode roaming.
+ * In other words, in alert mode, the A_band parameters may safely be ignored by WiFi chipset.
+ *
+ * condition 2- A_band_boost_threshold > A_band_penalty_factor
+ *
+ */
+
+/**
+ * Example:
+ * A_band_boost_threshold = -65
+ * A_band_penalty_threshold = -75
+ * A_band_boost_factor = 4
+ * A_band_penalty_factor = 2
+ * A_band_max_boost = 50
+ *
+ * a 5GHz RSSI value is transformed as below:
+ * -20 -> -20+ 50 = 30
+ * -60 -> -60 + 4 * (-60 - A_band_boost_threshold) = -60 + 16 = -44
+ * -70 -> -70
+ * -80 -> -80 - 2 * (A_band_penalty_threshold - (-80)) = -80 - 10 = -90
+ */
+
+typedef struct {
+ // Lazy roam parameters
+ // A_band_XX parameters are applied to 5GHz BSSIDs when comparing with a 2.4GHz BSSID
+ // they may not be applied when comparing two 5GHz BSSIDs
+ int A_band_boost_threshold; // RSSI threshold above which 5GHz RSSI is favored
+ int A_band_penalty_threshold; // RSSI threshold below which 5GHz RSSI is penalized
+ int A_band_boost_factor; // factor by which 5GHz RSSI is boosted
+ // boost=RSSI_measured-5GHz_boost_threshold)*5GHz_boost_factor
+ int A_band_penalty_factor; // factor by which 5GHz RSSI is penalized
+ // penalty=(5GHz_penalty_factor-RSSI_measured)*5GHz_penalty_factor
+ int A_band_max_boost; // maximum boost that can be applied to a 5GHz RSSI
+
+ // Hysteresis: ensuring the currently associated BSSID is favored
+ // so as to prevent ping-pong situations
+ int lazy_roam_histeresys; // boost applied to current BSSID
+
+ // Alert mode enable, i.e. configuring when firmware enters alert mode
+ int alert_roam_rssi_trigger; // RSSI below which "Alert" roam is enabled
+} wifi_roam_params;
+
+wifi_error wifi_set_gscan_roam_params(wifi_request_id id, wifi_interface_handle iface,
+ wifi_roam_params * params);
+
+/**
+ * Enable/Disable "Lazy" roam
+ */
+wifi_error wifi_enable_lazy_roam(wifi_request_id id, wifi_interface_handle iface, int enable);
+
+/**
+ * Per BSSID preference
+ */
+typedef struct {
+ char bssid[6];
+ int rssi_modifier; // modifier applied to the RSSI of the BSSID for the purpose of comparing
+ // it with other roam candidate
+} wifi_bssid_preference;
+
+wifi_error wifi_set_bssid_preference(wifi_request_id id, wifi_interface_handle iface,
+ int num_bssid, wifi_bssid_preference *prefs);
+
typedef struct {
- int max_number_epno_networks_by_crc32; //max number of epno entries if crc32 is specified
- int max_number_epno_networks_by_ssid; //max number of epno entries if ssid is specified
- int max_number_of_white_losted_ssid; //max number of white listed SSIDs, M target is 2 to 4 */
+ int max_number_epno_networks; // max number of epno entries, M target is 64
+ int max_number_of_white_listed_ssid; // max number of white listed SSIDs, M target is 2 to 4
+ int max_number_of_hotlist_ssid; // max number of hotlist SSIDs, M target is 4
} wifi_roam_autojoin_offload_capabilities;
wifi_error wifi_get_roam_autojoin_offload_capabilities(wifi_interface_handle handle,
diff --git a/include/hardware_legacy/link_layer_stats.h b/include/hardware_legacy/link_layer_stats.h
index 172c73e..c6202ad 100644
--- a/include/hardware_legacy/link_layer_stats.h
+++ b/include/hardware_legacy/link_layer_stats.h
@@ -12,21 +12,6 @@ extern "C"
#define STATS_MINOR_VERSION 0
#define STATS_MICRO_VERSION 0
-typedef int wifi_radio;
-typedef int wifi_channel;
-
-/* channel operating width */
-typedef enum {
- WIFI_CHAN_WIDTH_20 = 0,
- WIFI_CHAN_WIDTH_40 = 1,
- WIFI_CHAN_WIDTH_80 = 2,
- WIFI_CHAN_WIDTH_160 = 3,
- WIFI_CHAN_WIDTH_80P80 = 4,
- WIFI_CHAN_WIDTH_5 = 5,
- WIFI_CHAN_WIDTH_10 = 6,
- WIFI_CHAN_WIDTH_INVALID = -1
-} wifi_channel_width;
-
typedef enum {
WIFI_DISCONNECTED = 0,
WIFI_AUTHENTICATING = 1,
diff --git a/include/hardware_legacy/wifi_hal.h b/include/hardware_legacy/wifi_hal.h
index be4e985..2f14526 100644
--- a/include/hardware_legacy/wifi_hal.h
+++ b/include/hardware_legacy/wifi_hal.h
@@ -19,6 +19,29 @@
#include <stdint.h>
+/* WiFi Common definitions */
+/* channel operating width */
+typedef enum {
+ WIFI_CHAN_WIDTH_20 = 0,
+ WIFI_CHAN_WIDTH_40 = 1,
+ WIFI_CHAN_WIDTH_80 = 2,
+ WIFI_CHAN_WIDTH_160 = 3,
+ WIFI_CHAN_WIDTH_80P80 = 4,
+ WIFI_CHAN_WIDTH_5 = 5,
+ WIFI_CHAN_WIDTH_10 = 6,
+ WIFI_CHAN_WIDTH_INVALID = -1
+} wifi_channel_width;
+
+typedef int wifi_radio;
+typedef int wifi_channel;
+
+typedef struct {
+ wifi_channel_width width;
+ int center_frequency0;
+ int center_frequency1;
+ int primary_frequency;
+} wifi_channel_spec;
+
typedef enum {
WIFI_SUCCESS = 0,
WIFI_ERROR_NONE = 0,
diff --git a/include/hardware_legacy/wifi_logger.h b/include/hardware_legacy/wifi_logger.h
index d7b7cfb..f586d73 100644
--- a/include/hardware_legacy/wifi_logger.h
+++ b/include/hardware_legacy/wifi_logger.h
@@ -12,6 +12,27 @@ extern "C"
#define LOGGER_MINOR_VERSION 0
#define LOGGER_MICRO_VERSION 0
+
+
+/**
+ * WiFi logger life cycle is as follow:
+ *
+ * - at initialization time, framework will call wifi_get_ring_buffers_status so as to obtain the
+ * names and list of supported buffers
+ * - when WiFi operation start framework will call wifi_start_logging so as to trigger log collection
+ * - Developper UI will provide an option to the user, so as it can set the verbose level of individual buffer
+ * as reported by wifi_get_ring_buffers_status
+ * - during wifi operations, driver will periodically report per ring data to framework by invoking the
+ * on_ring_buffer_data call back
+ * - when capturing a bug report, framework will indicate to driver that all the data has to be uploaded,
+ * urgently, by calling wifi_get_ring_data
+ *
+ * The data uploaded by driver will be stored by framework in separate files, with one stream of file per ring.
+ * Framework will store the files in pcapng format, allowing for easy merging and parsing with network
+ * analyzer tools.
+ */
+
+
typedef int wifi_radio;
typedef int wifi_ring_buffer_id;
@@ -41,6 +62,7 @@ typedef struct {
// packet, or packet headers only (up to TCP or RTP/UDP headers) will be copied into the ring
} wifi_ring_per_packet_status_entry;
+static char per_packet_status_ring_name[] = "wifi_per_packet_status"; // Ring buffer name for per-packet status ring
// Below events refer to the wifi_connectivity_event ring and shall be supported
@@ -70,31 +92,78 @@ typedef struct {
// with EAPOL index 1-4
#define WIFI_EVENT_FW_EAPOL_FRAME_RECEIVED 24 // with rate, regardless of the fact that EAPOL frame
// is accepted or rejected by firmware
-#define WIFI_EVENT_DRIVER_EAPOL_FRAME_RECEIVED 26 // with rate, and eapol index, driver has received EAPOL
- //frame and will queue it up to wpa_supplicant
+#define WIFI_EVENT_DRIVER_EAPOL_FRAME_RECEIVED 26 // with rate, and eapol index, driver has received
+ // EAPOL frame and will queue it up to wpa_supplicant
#define WIFI_EVENT_BLOCK_ACK_NEGOTIATION_COMPLETE 27 // with success/failure, parameters
#define WIFI_EVENT_BT_COEX_BT_SCO_START 28
#define WIFI_EVENT_BT_COEX_BT_SCO_STOP 29
-#define WIFI_EVENT_BT_COEX_BT_SCAN_START 30 // for paging/scan etc..., when BT starts transmiting twice per BT slot
+#define WIFI_EVENT_BT_COEX_BT_SCAN_START 30 // for paging/scan etc..., when BT starts transmiting
+ // twice per BT slot
#define WIFI_EVENT_BT_COEX_BT_SCAN_STOP 31
#define WIFI_EVENT_BT_COEX_BT_HID_START 32
#define WIFI_EVENT_BT_COEX_BT_HID_STOP 33
#define WIFI_EVENT_ROAM_AUTH_STARTED 34 // firmware sends auth frame in roaming to next candidate
#define WIFI_EVENT_ROAM_AUTH_COMPLETE 35 // firmware receive auth confirm from ap
-#define WIFI_EVENT_ROAM_ASSOC_STARTED 36 // firmware sends assoc/reassoc frame in roaming to next candidate
+#define WIFI_EVENT_ROAM_ASSOC_STARTED 36 // firmware sends assoc/reassoc frame in
+ // roaming to next candidate
#define WIFI_EVENT_ROAM_ASSOC_COMPLETE 37 // firmware receive assoc/reassoc confirm from ap
+
+// Parameters of wifi logger events are TLVs
+// Event parameters tags are defined as:
+#define WIFI_TAG_VENDOR_SPECIFIC 0 // take a byte stream as parameter
+#define WIFI_TAG_BSSID 1 // takes a 6 bytes MAC address as parameter
+#define WIFI_TAG_ADDR 2 // takes a 6 bytes MAC address as parameter
+#define WIFI_TAG_SSID 3 // takes a 32 bytes SSID address as parameter
+#define WIFI_TAG_STATUS 4 // takes an integer as parameter
+#define WIFI_TAG_CHANNEL_SPEC 5 // takes one or more wifi_channel_spec as parameter
+#define WIFI_TAG_WAKE_LOCK_EVENT 6 // takes a wake_lock_event struct as parameter
+#define WIFI_TAG_ADDR1 7 // takes a 6 bytes MAC address as parameter
+#define WIFI_TAG_ADDR2 8 // takes a 6 bytes MAC address as parameter
+#define WIFI_TAG_ADDR3 9 // takes a 6 bytes MAC address as parameter
+#define WIFI_TAG_ADDR4 10 // takes a 6 bytes MAC address as parameter
+#define WIFI_TAG_TSF 11 // take a 64 bits TSF value as parameter
+#define WIFI_TAG_IE 12 // take one or more specific 802.11 IEs parameter, IEs are in turn indicated
+ // in TLV format as per 802.11 spec
+#define WIFI_TAG_INTERFACE 13 // take interface name as parameter
+#define WIFI_TAG_REASON_CODE 14 // take a reason code as per 802.11 as parameter
+#define WIFI_TAG_RATE_MBPS 15 // take a wifi rate in 0.5 mbps
+
+typedef struct {
+ u16 tag;
+ u16 length; // length of value
+ u8 value[0];
+} tlv_log;
+
typedef struct {
u16 event;
- u8 event_data[0]; // separate parameter structure per event to be provided and optional data
- // the event_data is expected to include an official android part, with some parameter
- // as transmit rate, num retries, num scan result found etc...
- // as well, event_data can include a vendor proprietary part which is understood
- // by the developer only.
+ tlv_log tlvs[0]; // separate parameter structure per event to be provided and optional data
+ // the event_data is expected to include an official android part, with some
+ // parameter as transmit rate, num retries, num scan result found etc...
+ // as well, event_data can include a vendor proprietary part which is
+ // understood 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
+// Ring buffer name for connectivity events ring
+static char connectivity_event_ring_name[] = "wifi_connectivity_events";
+
+// Ring buffer name for power events ring. note that power event are extremely frequents
+// and thus should be stored in their own ring/file so as not to clobber connectivity events
+
+typedef struct {
+ int status; // 0 taken, 1 released
+ int reason; // reason why this wake lock is taken
+ char name[0]; // null terminated
+} wake_lock_event;
+
+typedef struct {
+ u16 event;
+ tlv_log tlvs[0];
+} wifi_power_event;
+
+static char power_event_ring_name[] = "wifi_power_events";
+
/**
* This structure represent a logger entry within a ring buffer.
@@ -122,11 +191,12 @@ typedef struct {
union {
u8 data[0];
wifi_ring_buffer_driver_connectivity_event connectivity_event;
+ wifi_ring_per_packet_status_entry packet_status;
};
} wifi_ring_buffer_entry;
-#define WIFI_RING_BUFFER_FLAG_HAS_BINARY_ENTRIES 0x00000001 // set if binary entries are present
-#define WIFI_RING_BUFFER_FLAG_HAS_ASCII_ENTRIES 0x00000002 // set if ascii entries are present
+#define WIFI_RING_BUFFER_FLAG_HAS_BINARY_ENTRIES 0x00000001 // set if binary entries are present
+#define WIFI_RING_BUFFER_FLAG_HAS_ASCII_ENTRI 0x00000002 // set if ascii entries are present
/* ring buffer params */
/**
@@ -139,31 +209,62 @@ typedef struct {
typedef struct {
u8 name[32];
u32 flags;
- u64 fd; // linux file descriptor for that buffer
+ wifi_ring_buffer_id ring_id; // unique integer representing the ring
u32 ring_buffer_byte_size; // total memory size allocated for the buffer
u32 verbose_level; //
u32 written_bytes; // number of bytes that was written to the buffer by driver, monotonously increasing integer
u32 read_bytes; // number of bytes that was read from the buffer by user land, monotonously increasing integer
+ u32 written_records; // number of records that was written to the buffer by driver, monotonously increasing integer
+
} wifi_ring_buffer_status;
/**
+ * Callback for reporting ring data
+ *
+ * The ring buffer data collection is event based:
+ * - driver calls on_ring_buffer_data when new records are available, the wifi_ring_buffer_status
+ * passed up to framework in the call back indicates to framework if more data is available in
+ * the ring buffer. It is not expected that driver will necessarily always empty the ring
+ * immediately as data is available, instead driver will report data every X seconds or if
+ * N bytes are available.
+ * - in the case where a bug report has to be captured, framework will require driver to upload
+ * all data immediately. This is indicated to driver when framework calls wifi_get_ringdata.
+ * When framework calls wifi_get_ring_data, driver will start sending all available data in the
+ * indicated ring by repeatedly invoking the on_ring_buffer_data callback
+ *
+ * The callback is called by driver whenever new data is
+ */
+typedef struct {
+ void (*on_ring_buffer_data) (wifi_request_id id, wifi_ring_buffer_id ring_id, char *buffer, int buffer_size, wifi_ring_buffer_status *status);
+} wifi_ring_buffer_data_handler;
+
+
+/* api for framework to indicate driver has to upload and drain all data of a given ring */
+wifi_error wifi_get_ring_data(wifi_request_id id,
+ wifi_interface_handle iface, wifi_ring_buffer_id ring_id);
+
+
+/**
* API to trigger the debug collection.
* Unless his API is invoked - logging is not triggered.
* - verbose_level 0 corresponds to no collection
- * - verbose_level 1+ are TBD, with increasing level of logging
+ * - verbose_level 1 correspond to normal log level, with minimal user impact. this is the default value
+ * - verbose_level 2 are enabled when user is lazily trying to reproduce a problem, wifi performances and power
+ * can be impacted but device should not otherwise be significantly impacted
+ * - verbose_level 3+ are used when trying to actively debug a problem
*
* buffer_name represent the name of the ring for which data collection shall start.
+ *
+ * flags: TBD parameter used to enable/disable specific events on a ring
+ * max_interval: maximum interval in seconds for driver to invoke on_ring_buffer_data, ignore if zero
+ * min_data_size: minimum data size in buffer for driver to invoke on_ring_buffer_data, ignore if zero
*/
-wifi_error wifi_set_logging_level(wifi_interface_handle iface, u32 verbose_level, u8 * buffer_name);
-/* callback for reporting ring buffer status */
-typedef struct {
- void (*on_ring_buffer_status_results) (wifi_request_id id, u32 num_buffers, wifi_ring_buffer_status *status);
-} wifi_ring_buffer_status_result_handler;
+wifi_error wifi_start_logging(wifi_interface_handle iface, u32 verbose_level, u32 flags, u32 max_interval_sec, u32 min_data_size, u8 *buffer_name, wifi_ring_buffer_data_handler handler);
-/* api to get the status of a ring buffer */
-wifi_error wifi_get_ring_buffer_status(wifi_request_id id,
- wifi_interface_handle iface, wifi_ring_buffer_id ring_id, wifi_ring_buffer_status_result_handler handler);
+/* api to get the status of all ring buffers supported by driver */
+wifi_error wifi_get_ring_buffers_status(wifi_request_id id,
+ wifi_interface_handle iface, u32 num_buffers, wifi_ring_buffer_status *status);
/* api to collect a firmware memory dump for a given iface */
wifi_error wifi_get_firmware_memory_dump(wifi_request_id id,
@@ -177,7 +278,6 @@ wifi_error wifi_get_firmware_version(wifi_request_id id,
wifi_error wifi_get_driver_version(wifi_request_id id,
wifi_interface_handle iface, char * buffer, int buffer_size);
-
/* Feature set */
#define WIFI_LOGGER_MEMORY_DUMP_SUPPORTED 1
#define WIFI_LOGGER_PER_PACKET_TX_RX_STATUS_SUPPORTED 2