From 0edbd8cc082ff38681ff04b5eab2fb8a9df732ea Mon Sep 17 00:00:00 2001 From: "Sen, Devendra" Date: Mon, 13 Feb 2017 20:44:15 +0530 Subject: [PATCH] qcacmn: Add host diag events for wlan disconnection state Add new diag events for the wlan disconnection these events will be used to inform the wlan disconnection scenario. Change-Id: I6bdddb2d3f45deca2dc92a94e2abf59f46d7c38f CRs-Fixed: 1108380 --- .../host_diag_log/inc/host_diag_core_event.h | 113 ++++++++++++++++++ .../host_diag_log/inc/host_diag_event_defs.h | 85 +++++++++++++ 2 files changed, 198 insertions(+) diff --git a/utils/host_diag_log/inc/host_diag_core_event.h b/utils/host_diag_log/inc/host_diag_core_event.h index 89cb8263f8de..6dcb1f6851cf 100644 --- a/utils/host_diag_log/inc/host_diag_core_event.h +++ b/utils/host_diag_log/inc/host_diag_core_event.h @@ -306,6 +306,119 @@ struct host_event_wlan_log_complete { uint32_t reserved; }; +/*------------------------------------------------------------------------- + Event ID: EVENT_WLAN_STA_KICKOUT + ------------------------------------------------------------------------*/ +/** + * struct host_event_wlan_kickout - Holds diag event details + * @reasoncode: Indicates the reasoncode of event + * @peer_macaddr: Indicates the peer macaddr + * @vdev_id: Indicate unique id for identifying the VDEV + * + * This structure holds the diag event related information + */ + +struct host_event_wlan_kickout { + uint32_t reasoncode; + uint8_t peer_mac[QDF_MAC_ADDR_SIZE]; + uint8_t vdev_id; +}; + +/*------------------------------------------------------------------------- + Event ID: EVENT_WLAN_SOFTAP_DATASTALL/EVENT_WLAN_STA_DATASTALL + ------------------------------------------------------------------------*/ +/** + * struct host_event_wlan_softap_datastall - Holds diag event details + * @reason: Indicates the reason of event + * + *This structure holds the host diag event related information + */ + +struct host_event_wlan_datastall { + uint32_t reason; +}; + +/*------------------------------------------------------------------------- + Event ID: EVENT_WLAN_SSR_REINIT_SUBSYSTEM + ------------------------------------------------------------------------*/ +/** + * struct host_event_wlan_ssr_reinit - Holds diag event details + * @status: Indicates the status of event + * + *This structure holds the host diag event related information + */ + +struct host_event_wlan_ssr_reinit { + uint32_t status; +}; + +/*------------------------------------------------------------------------- + Event ID: EVENT_WLAN_SSR_SHUTDOWN_SUBSYSTEM + ------------------------------------------------------------------------*/ +/** + * struct host_event_wlan_ssr_shutdown - Holds diag event details + * @status: Indicates the status of event + * + *This structure holds the host diag event related information + */ + +struct host_event_wlan_ssr_shutdown { + uint32_t status; +}; + + +/*------------------------------------------------------------------------- + Function declarations and documenation + ------------------------------------------------------------------------*/ +/** + * enum host_sta_kickout_events - Enum containing sta kickout subtype + * @HOST_STA_KICKOUT_REASON_BMISS: Indicate sta got disconnected reason + * beacon miss + * @HOST_STA_KICKOUT_REASON_XRETRY: Indicate sta got disconnected reason xretry + * @HOST_STA_KICKOUT_REASON_UNSPECIFIED: Indicate sta disconnection + * reason unspecified + * @HOST_STA_KICKOUT_REASON_KEEP_ALIVE: Indicate sta is disconnected + * because of keep alive + * + * This enum contains the event subtype + */ +enum host_sta_kickout_events { + HOST_STA_KICKOUT_REASON_BMISS, + HOST_STA_KICKOUT_REASON_XRETRY, + HOST_STA_KICKOUT_REASON_UNSPECIFIED, + HOST_STA_KICKOUT_REASON_KEEP_ALIVE, +}; + +/*------------------------------------------------------------------------- + Function declarations and documenation + ------------------------------------------------------------------------*/ +/** + * enum host_datastall_events - Enum containing datastall subtype + * @STA_TX_TIMEOUT: Indicate sta tx timeout + * @SOFTAP_TX_TIMEOUT:Indicate softap tx timeout + * + * This enum contains the event subtype + */ +enum host_datastall_events { + STA_TX_TIMEOUT, + SOFTAP_TX_TIMEOUT, +}; + +/*------------------------------------------------------------------------- + Function declarations and documenation + ------------------------------------------------------------------------*/ +/** + * enum host_ssr_events - Enum containing ssr subtype + * @SSR_SUB_SYSTEM_REINIT: Indicate ssr reinit state + * @SSR_SUB_SYSTEM_SHUTDOWN: Indicate ssr shutdown state + * + * This enum contains the event subtype + */ +enum host_ssr_events { + SSR_SUB_SYSTEM_REINIT, + SSR_SUB_SYSTEM_SHUTDOWN, +}; + /** * struct host_event_tdls_teardown - tdls teardown diag event * @reason: reason for tear down diff --git a/utils/host_diag_log/inc/host_diag_event_defs.h b/utils/host_diag_log/inc/host_diag_event_defs.h index 722be005fa05..33e1f4a63aeb 100644 --- a/utils/host_diag_log/inc/host_diag_event_defs.h +++ b/utils/host_diag_log/inc/host_diag_event_defs.h @@ -811,6 +811,91 @@ typedef enum { * */ EVENT_WLAN_POWERSAVE_WOW_STATS = 0xB33, + + /* + * + * EVENT_WLAN_STA_KICKOUT + * @reasoncode: Indicates the reasoncode of event + * @peer_macaddr: Indicates the peer macaddr + * @vdev_id: Indicate unique id for identifying the VDEV + * + * This event is used to send sta kickout information + * Values for parameters are defined below: + * Reasoncode: offset: 0 length: 4 + * Peer macaddr: offset: 4 length: 6 + * VDEV ID: offset: 10 length 1 + * + * Supported Feature: STA + * + * + */ + + EVENT_WLAN_STA_KICKOUT = 0xB39, + + /* + * + * EVENT_WLAN_STA_DATASTALL + * @reason: Indicates the reason of event + * + * This event is used to send sta datastall information + * Values for parameters are defined below: + * Reason: offset:0 length: 4 + * + * Supported Feature: STA + * + * + */ + + EVENT_WLAN_STA_DATASTALL = 0xB3A, + + /* + * + * EVENT_WLAN_SOFTAP_DATASTALL + * @reason: Indicates the reason of event + * + * This event is used to send SAP datastall information + * Values for parameters are defined below: + * Reason: offset:0 length: 4 + * + * Supported Feature: SAP + * + * + */ + + EVENT_WLAN_SOFTAP_DATASTALL = 0xB3B, + + /* + * + * EVENT_WLAN_SSR_REINIT_SUBSYSTEM + * @status: Indicates the status of event + * + * This event is used to send ssr reinit status + * Values for parameters are defined below: + * Status: offset: 0 length: 4 + * + * Supported Feature: SSR + * + * + */ + + EVENT_WLAN_SSR_REINIT_SUBSYSTEM = 0xB3C, + + /* + * + * EVENT_WLAN_SSR_SHUTDOWN_SUBSYSTEM + * @status: Indicates the status of event + * + * This event is used to send ssr shutdown status + * Values for parameters are defined below: + * Status: offset: 0 length: 4 + * + * Supported Feature: SSR + * + * + */ + + EVENT_WLAN_SSR_SHUTDOWN_SUBSYSTEM = 0xB3D, + EVENT_MAX_ID = 0x0FFF } event_id_enum_type;