typedef int wifi_radio;\r
typedef int wifi_ring_buffer_id;\r
\r
+typedef struct {\r
+ u8 direction:1; // 0: TX, 1: RX\r
+ u8 success:1; // whether packet was transmitted or received/decrypted successfully\r
+ u8 has_80211_header:1; // has full 802.11 header, else has 802.3 header\r
+ u8 protected_packet:1; // whether packet was encrypted\r
+ u8 tid:4; // transmit or received tid\r
+ u8 MCS; // modulation and bandwidth\r
+ u8 rssi; // TX: RSSI of ACK for that packet\r
+ // RX: RSSI of packet\r
+ u8 num_retries; // number of attempted retries\r
+ u16 last_transmit_rate; // last transmit rate in .5 mbps\r
+ u16 link_layer_transmit_sequence; // transmit/reeive sequence for that MPDU packet\r
+ u64 firmware_entry_timestamp; // TX: firmware timestamp (us) when packet is queued within firmware buffer\r
+ // for SDIO/HSIC or into PCIe buffer\r
+ // RX : firmware receive timestamp\r
+ u64 start_contention_timestamp; // firmware timestamp (us) when packet start contending for the\r
+ // medium for the first time, at head of its AC queue,\r
+ // or as part of an MPDU or A-MPDU. This timestamp is not updated\r
+ // for each retry, only the first transmit attempt.\r
+ u64 transmit_success_timestamp; // fimrware timestamp (us) when packet is successfully transmitted\r
+ // or aborted because it has exhausted its maximum number of retries\r
+ u8 data[0]; // packet data. The length of packet data is determined by the entry_size field of\r
+ // the wifi_ring_buffer_entry structure. It is expected that first bytes of the\r
+ // packet, or packet headers only (up to TCP or RTP/UDP headers) will be copied into the ring\r
+} wifi_ring_per_packet_status_entry;\r
+\r
+\r
+\r
+#define WIFI_EVENT_ASSOCIATION_REQUESTED 0 // driver receive association command from kernel\r
+#define WIFI_EVENT_AUTH_COMPLETE 1\r
+#define WIFI_EVENT_ASSOC_COMPLETE 2\r
+#define WIFI_EVENT_FW_AUTH_STARTED 3 // received firmware event indicating auth frames are sent\r
+#define WIFI_EVENT_FW_ASSOC_STARTED 4 // received firmware event indicating assoc frames are sent\r
+#define WIFI_EVENT_FW_RE_ASSOC_STARTED 5 // received firmware event indicating reassoc frames are sent\r
+#define WIFI_EVENT_DRIVER_SCAN_REQUESTED 6\r
+#define WIFI_EVENT_DRIVER_SCAN_RESULT_FOUND 7\r
+#define WIFI_EVENT_DRIVER_SCAN_COMPLETE 8\r
+#define WIFI_EVENT_G_SCAN_STARTED 9\r
+#define WIFI_EVENT_G_SCAN_COMPLETE 10\r
+#define WIFI_EVENT_DISASSOCIATION_REQUESTED 11\r
+#define WIFI_EVENT_RE_ASSOCIATION_REQUESTED 12\r
+#define WIFI_EVENT_ROAM_REQUESTED 13\r
+#define WIFI_EVENT_BEACON_RECEIVED 14 // received beacon from AP (event enabled only in verbose mode)\r
+#define WIFI_EVENT_ROAM_SCAN_STARTED 15 // firmware has triggered a roam scan (not g-scan)\r
+#define WIFI_EVENT_ROAM_SCAN_COMPLETE 16 // firmware has completed a roam scan (not g-scan)\r
+#define WIFI_EVENT_ROAM_SEARCH_STARTED 17 // firmware has started searching for roam candidates (with reason =xx)\r
+#define WIFI_EVENT_ROAM_SEARCH_STOPPED 18 // firmware has stopped searching for roam candidates (with reason =xx)\r
+#define WIFI_EVENT_CHANNEL_SWITCH_ANOUNCEMENT 20 // received channel switch anouncement from AP\r
+#define WIFI_EVENT_FW_EAPOL_FRAME_TRANSMIT_START 21 // fw start transmit eapol frame, with EAPOL index 1-4\r
+#define WIFI_EVENT_FW_EAPOL_FRAME_TRANSMIT_STOP 22 // fw gives up eapol frame, with rate, success/failure and number retries\r
+#define WIFI_EVENT_DRIVER_EAPOL_FRAME_TRANSMIT_REQUESTED 23 // kernel queue EAPOL for transmission in tdriver\r
+ // with EAPOL index 1-4\r
+#define WIFI_EVENT_FW_EAPOL_FRAME_RECEIVED 24 // with rate, regardless of the fact that EAPOL frame\r
+ // is accepted or rejected by firmware\r
+#define WIFI_EVENT_DRIVER_EAPOL_FRAME_RECEIVED 26 // with rate, and eapol index, driver has received EAPOL\r
+ //frame and will queue it up to wpa_supplicant\r
+#define WIFI_EVENT_BLOCK_ACK_NEGOTIATION_COMPLETE 27 // with success/failure, parameters\r
+#define WIFI_EVENT_BT_COEX_BT_SCO_START 28\r
+#define WIFI_EVENT_BT_COEX_BT_SCO_STOP 29\r
+#define WIFI_EVENT_BT_COEX_BT_SCAN_START 30 // for paging/scan etc..., when BT starts transmiting twice per BT slot\r
+#define WIFI_EVENT_BT_COEX_BT_SCAN_STOP 31\r
+#define WIFI_EVENT_BT_COEX_BT_HID_START 32\r
+#define WIFI_EVENT_BT_COEX_BT_HID_STOP 33\r
+#define WIFI_EVENT_ROAM_AUTH_STARTED 34 // firmware sends auth frame in roaming to next candidate\r
+#define WIFI_EVENT_ROAM_AUTH_COMPLETE 35 // firmware receive auth confirm from ap\r
+#define WIFI_EVENT_ROAM_ASSOC_STARTED 36 // firmware sends assoc/reassoc frame in roaming to next candidate\r
+#define WIFI_EVENT_ROAM_ASSOC_COMPLETE 37 // firmware receive assoc/reassoc confirm from ap\r
+\r
+\r
+typedef struct {\r
+ u16 event;\r
+ u8 event_data[0]; // separate parameter structure per event to be provided and optional data\r
+ // the event_data is expected to include an official android part, with some parameter\r
+ // as transmit rate, num retries, num scan result found etc...\r
+ // as well, event_data can include a vendor proprietary part which is understood\r
+ // by the developer only.\r
+} wifi_ring_buffer_driver_connectivity_event;\r
+\r
+\r
/**\r
* This structure represent a logger entry within a ring.\r
* Binary entries can be used so as to store packet data or vendor specific information.\r