OSDN Git Service

net: wireless change the header of Logger
authoreccopark@broadcom.com <eccopark@broadcom.com>
Thu, 26 Mar 2015 00:21:26 +0000 (17:21 -0700)
committereccopark@broadcom.com <eccopark@broadcom.com>
Fri, 27 Mar 2015 17:55:38 +0000 (10:55 -0700)
1) add the request_id in wifi_get_logger_supported_feature_set
2) Change the wifi_get_firmware_memory_dump API
 1) Normally the size of firmware dump is 700KB.
    Thus, Driver cannot send the data in one time because of limitation of skb length.
    In order to send such big data from kernel Driver,
    we need to send data using event continuously until we send the memory dump completely.
    In the event handler of hal, it will allocate the
    big buffer to store the data.
    Once event handler copy the data completely, event handler
    will call the function callback(on_firmware_memory_dump).
    So, upper layer has to free the buffer after handling the buffer.

Change-Id: If80b03ec8bd9349d952743e17a001c04096aac95
Signed-off-by: eccopark@broadcom.com <eccopark@broadcom.com>
include/hardware_legacy/wifi_logger.h

index daa099e..fb4edbb 100644 (file)
@@ -195,7 +195,7 @@ enum {
 };\r
 \r
 typedef struct {\r
-    u16 entry_size; // the size of payload excluding the header. \r
+    u16 entry_size; // the size of payload excluding the header.\r
     u8 flags;\r
     u8 type; // Entry type\r
     u64 timestamp; //present if has_timestamp bit is set.\r
@@ -272,9 +272,15 @@ wifi_error wifi_start_logging(wifi_request_id id, wifi_interface_handle iface, u
 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
 \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
+} 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, char **buffer, int *buffer_size);\r
+        wifi_interface_handle iface, 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
@@ -295,7 +301,7 @@ enum {
     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_interface_handle handle, unsigned int *support);\r
+wifi_error wifi_get_logger_supported_feature_set(wifi_request_id id, wifi_interface_handle iface, unsigned int *support);\r
 \r
 \r
 #ifdef __cplusplus\r