// packet, or packet headers only (up to TCP or RTP/UDP headers) will be copied into the ring\r
} __attribute__((packed)) wifi_ring_per_packet_status_entry;\r
\r
-static char per_packet_status_ring_name[] = "wifi_per_packet_status"; // Ring buffer name for per-packet status ring\r
\r
// Below events refer to the wifi_connectivity_event ring and shall be supported\r
\r
// understood by the developer only.\r
} __attribute__((packed)) wifi_ring_buffer_driver_connectivity_event;\r
\r
-// Ring buffer name for connectivity events ring\r
-static char connectivity_event_ring_name[] = "wifi_connectivity_events";\r
\r
// Ring buffer name for power events ring. note that power event are extremely frequents\r
// and thus should be stored in their own ring/file so as not to clobber connectivity events\r
tlv_log tlvs[0];\r
} __attribute__((packed)) wifi_power_event;\r
\r
-static char power_event_ring_name[] = "wifi_power_events";\r
-\r
/**\r
* This structure represent a logger entry within a ring buffer.\r
* Wifi driver are responsible to manage the ring buffer and write the debug\r
* The callback is called by driver whenever new data is\r
*/\r
typedef struct {\r
- 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);\r
+ void (*on_ring_buffer_data) (char *ring_name, char *buffer, int buffer_size,\r
+ wifi_ring_buffer_status *status);\r
} wifi_ring_buffer_data_handler;\r
\r
+/* api to set the log handler for getting ring data */\r
+wifi_error wifi_set_log_handler(wifi_request_id id, wifi_interface_handle iface,\r
+ wifi_ring_buffer_data_handler handler);\r
+\r
+/* api to reset the log handler */\r
+wifi_error wifi_reset_log_handler(wifi_request_id id, wifi_interface_handle iface);\r
+\r
+\r
+typedef struct {\r
+ void (*on_alert) (wifi_request_id id, char *buffer, int buffer_size, int err_code);\r
+} wifi_alert_handler;\r
+\r
+/* api to set the alert handler for the alert case in Wi-Fi Chip */\r
+wifi_error wifi_set_alert_handler(wifi_request_id id, wifi_interface_handle iface,\r
+ wifi_alert_handler handler);\r
+\r
+\r
+/* api to reset the alert handler */\r
+wifi_error wifi_reset_alert_handler(wifi_request_id id, wifi_interface_handle iface);\r
+\r
\r
/* api for framework to indicate driver has to upload and drain all data of a given ring */\r
-wifi_error wifi_get_ring_data(wifi_request_id id,\r
- wifi_interface_handle iface, wifi_ring_buffer_id ring_id);\r
+wifi_error wifi_get_ring_data(wifi_interface_handle iface, char *ring_name);\r
\r
\r
/**\r
* can be impacted but device should not otherwise be significantly impacted\r
* - verbose_level 3+ are used when trying to actively debug a problem\r
*\r
- * buffer_name represent the name of the ring for which data collection shall start.\r
+ * ring_name represent the name of the ring for which data collection shall start.\r
*\r
* flags: TBD parameter used to enable/disable specific events on a ring\r
* max_interval: maximum interval in seconds for driver to invoke on_ring_buffer_data, ignore if zero\r
* min_data_size: minimum data size in buffer for driver to invoke on_ring_buffer_data, ignore if zero\r
*/\r
\r
-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);\r
+wifi_error wifi_start_logging(wifi_interface_handle iface, u32 verbose_level, u32 flags,\r
+ u32 max_interval_sec, u32 min_data_size, char *ring_name);\r
\r
/* api to get the status of all ring buffers supported by driver */\r
-wifi_error wifi_get_ring_buffers_status(wifi_request_id id,\r
- wifi_interface_handle iface, u32 *num_rings, wifi_ring_buffer_status **status);\r
+wifi_error wifi_get_ring_buffers_status(wifi_interface_handle iface, u32 *num_rings,\r
+ wifi_ring_buffer_status **status);\r
\r
-/* Upper layer has to free the memory indicated by buffer pointer */\r
typedef struct {\r
- void (*on_firmware_memory_dump) (wifi_request_id id, char *buffer, int buffer_size);\r
+ void (*on_firmware_memory_dump) (char *buffer, int buffer_size);\r
} wifi_firmware_memory_dump_handler;\r
\r
\r
/* api to collect a firmware memory dump for a given iface */\r
-wifi_error wifi_get_firmware_memory_dump(wifi_request_id id,\r
- wifi_interface_handle iface, wifi_firmware_memory_dump_handler handler);\r
+wifi_error wifi_get_firmware_memory_dump(wifi_interface_handle iface,\r
+ wifi_firmware_memory_dump_handler handler);\r
\r
/* api to collect a firmware version string */\r
-wifi_error wifi_get_firmware_version(wifi_request_id id,\r
- wifi_interface_handle iface, char **buffer, int *buffer_size);\r
+wifi_error wifi_get_firmware_version(wifi_interface_handle iface, char **buffer, int *buffer_size);\r
\r
/* api to collect a driver version string */\r
-wifi_error wifi_get_driver_version(wifi_request_id id,\r
- wifi_interface_handle iface, char **buffer, int *buffer_size);\r
+wifi_error wifi_get_driver_version(wifi_interface_handle iface, char **buffer, int *buffer_size);\r
\r
\r
/* Feature set */\r
WIFI_LOGGER_VERBOSE_SUPPORTED = (1 << (5)), // verbose log of FW\r
WIFI_LOGGER_WATCHDOG_TIMER_SUPPORTED = (1 << (6)) // monitor the health of FW\r
};\r
-wifi_error wifi_get_logger_supported_feature_set(wifi_request_id id, wifi_interface_handle iface, unsigned int *support);\r
+wifi_error wifi_get_logger_supported_feature_set(wifi_interface_handle iface, unsigned int *support);\r
\r
\r
#ifdef __cplusplus\r