diff options
| author | Padma, Santhosh Kumar <skpadma@codeaurora.org> | 2016-08-10 19:11:40 +0530 |
|---|---|---|
| committer | qcabuildsw <qcabuildsw@localhost> | 2016-09-10 19:06:23 -0700 |
| commit | e7835652d64d0be76aec206fec6ce8f864213fe4 (patch) | |
| tree | ac9443059e5dc5e98182b9e5911658d8390a0630 | |
| parent | 79412edee31b48b6d095257b3376336fd9ba3681 (diff) | |
qcacld-3.0: Add diag events for debugging
qcacld-2.0 to qcacld-3.0 propagation
Currently there are no diag events to debug auth, assoc timeouts
and memory failure. Add such diag events which can be useful during
failures.
Change-Id: Iec4c2a9946fbef388959fdc796273944d3be8003
CRs-Fixed: 954888
(cherry picked from commit 96f330d11abe16a35c13a87346e8e60cbd0c7141)
| -rw-r--r-- | core/mac/src/pe/lim/lim_process_mlm_req_messages.c | 11 | ||||
| -rw-r--r-- | core/mac/src/pe/lim/lim_utils.h | 2 | ||||
| -rw-r--r-- | core/utils/host_diag_log/inc/host_diag_core_event.h | 25 | ||||
| -rw-r--r-- | core/utils/host_diag_log/inc/host_diag_event_defs.h | 1 | ||||
| -rw-r--r-- | core/utils/host_diag_log/src/host_diag_log.c | 21 | ||||
| -rw-r--r-- | core/utils/host_diag_log/src/i_host_diag_core_event.h | 19 |
6 files changed, 79 insertions, 0 deletions
diff --git a/core/mac/src/pe/lim/lim_process_mlm_req_messages.c b/core/mac/src/pe/lim/lim_process_mlm_req_messages.c index 328da6db77b7..1c914142c3d6 100644 --- a/core/mac/src/pe/lim/lim_process_mlm_req_messages.c +++ b/core/mac/src/pe/lim/lim_process_mlm_req_messages.c @@ -2394,6 +2394,9 @@ static void lim_process_auth_failure_timeout(tpAniSirGlobal mac_ctx) session->peSessionId, session->limMlmState, session->limSmeState); #ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM + lim_diag_event_report(mac_ctx, WLAN_PE_DIAG_AUTH_TIMEOUT, session, + 0, AUTH_FAILURE_TIMEOUT); + WLAN_HOST_DIAG_LOG_ALLOC(rssi_log, host_log_rssi_pkt_type, LOG_WLAN_RSSI_UPDATE_C); if (rssi_log) @@ -2463,6 +2466,11 @@ lim_process_auth_rsp_timeout(tpAniSirGlobal mac_ctx, uint32_t auth_idx) return; } +#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM + lim_diag_event_report(mac_ctx, WLAN_PE_DIAG_AUTH_TIMEOUT, + session, 0, AUTH_RESPONSE_TIMEOUT); +#endif + if (LIM_IS_AP_ROLE(session) || LIM_IS_IBSS_ROLE(session)) { if (auth_node->mlmState != eLIM_MLM_WT_AUTH_FRAME3_STATE) { lim_log(mac_ctx, LOGE, @@ -2524,6 +2532,9 @@ lim_process_assoc_failure_timeout(tpAniSirGlobal mac_ctx, uint32_t msg_type) return; } #ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM + lim_diag_event_report(mac_ctx, WLAN_PE_DIAG_ASSOC_TIMEOUT, + session, 0, 0); + WLAN_HOST_DIAG_LOG_ALLOC(rssi_log, host_log_rssi_pkt_type, LOG_WLAN_RSSI_UPDATE_C); diff --git a/core/mac/src/pe/lim/lim_utils.h b/core/mac/src/pe/lim/lim_utils.h index ce981a278033..6854ea0e6279 100644 --- a/core/mac/src/pe/lim/lim_utils.h +++ b/core/mac/src/pe/lim/lim_utils.h @@ -521,6 +521,8 @@ typedef enum { WLAN_PE_DIAG_ROAM_ASSOC_COMP_EVENT, RESERVED1, /* = 64 for SCAN_COMPLETE */ RESERVED2, /* = 65 for SCAN_RES_FOUND */ + WLAN_PE_DIAG_ASSOC_TIMEOUT, + WLAN_PE_DIAG_AUTH_TIMEOUT, } WLAN_PE_DIAG_EVENT_TYPE; void lim_diag_event_report(tpAniSirGlobal pMac, uint16_t eventType, diff --git a/core/utils/host_diag_log/inc/host_diag_core_event.h b/core/utils/host_diag_log/inc/host_diag_core_event.h index 538c4376f6eb..fcac6fe4a1f6 100644 --- a/core/utils/host_diag_log/inc/host_diag_core_event.h +++ b/core/utils/host_diag_log/inc/host_diag_core_event.h @@ -260,6 +260,31 @@ struct host_event_wlan_eapol { }; /*------------------------------------------------------------------------- + Event ID: EVENT_WLAN_LOW_RESOURCE_FAILURE + ------------------------------------------------------------------------*/ +/** + * struct host_event_wlan_low_resource_failure - Structure holding the + * low resource failure information + * @event_sub_type: Gives further information about reason for + * low resource condition + * + * This structure will hold the low resource failure information + */ +struct host_event_wlan_low_resource_failure { + uint8_t event_sub_type; +}; + +/** + * enum resource_failure_type - Reason for low resource failure condition + * @WIFI_EVENT_MEMORY_FAILURE: Memory failure + * + * This enum has the reason codes why the low resource situation is observed + */ +enum resource_failure_type { + WIFI_EVENT_MEMORY_FAILURE, +}; + +/*------------------------------------------------------------------------- Event ID: EVENT_WLAN_WAKE_LOCK ------------------------------------------------------------------------*/ /** diff --git a/core/utils/host_diag_log/inc/host_diag_event_defs.h b/core/utils/host_diag_log/inc/host_diag_event_defs.h index 31846008e73d..e7fd0bb06ae9 100644 --- a/core/utils/host_diag_log/inc/host_diag_event_defs.h +++ b/core/utils/host_diag_log/inc/host_diag_event_defs.h @@ -61,6 +61,7 @@ typedef enum { EVENT_WLAN_OFFLOAD_REQ = 0xAB8, EVENT_TDLS_SCAN_BLOCK = 0xAB9, EVENT_WLAN_TDLS_TX_RX_MGMT = 0xABA, + EVENT_WLAN_LOW_RESOURCE_FAILURE = 0xABB, EVENT_MAX_ID = 0x0FFF } event_id_enum_type; diff --git a/core/utils/host_diag_log/src/host_diag_log.c b/core/utils/host_diag_log/src/host_diag_log.c index 4f9d26164c2e..05c3ea25e535 100644 --- a/core/utils/host_diag_log/src/host_diag_log.c +++ b/core/utils/host_diag_log/src/host_diag_log.c @@ -262,3 +262,24 @@ void host_diag_event_report_payload(uint16_t event_Id, uint16_t length, return; } + +/** + * host_log_low_resource_failure() - This function is used to send low + * resource failure event + * @event_sub_type: Reason why the failure was observed + * + * This function is used to send low resource failure events to user space + * + * Return: None + * + */ +void host_log_low_resource_failure(uint8_t event_sub_type) +{ + WLAN_HOST_DIAG_EVENT_DEF(wlan_diag_event, + struct host_event_wlan_low_resource_failure); + + wlan_diag_event.event_sub_type = event_sub_type; + + WLAN_HOST_DIAG_EVENT_REPORT(&wlan_diag_event, + EVENT_WLAN_LOW_RESOURCE_FAILURE); +} diff --git a/core/utils/host_diag_log/src/i_host_diag_core_event.h b/core/utils/host_diag_log/src/i_host_diag_core_event.h index 3a411c46bea1..b17ac856219c 100644 --- a/core/utils/host_diag_log/src/i_host_diag_core_event.h +++ b/core/utils/host_diag_log/src/i_host_diag_core_event.h @@ -81,6 +81,16 @@ void host_diag_event_report_payload(uint16_t event_Id, uint16_t length, #endif /* FEATURE_WLAN_DIAG_SUPPORT */ +/** + * enum auth_timeout_type - authentication timeout type + * @AUTH_FAILURE_TIMEOUT: auth failure timeout + * @AUTH_RESPONSE_TIMEOUT: auth response timeout + */ +enum auth_timeout_type { + AUTH_FAILURE_TIMEOUT, + AUTH_RESPONSE_TIMEOUT, +}; + /*------------------------------------------------------------------------- Function declarations and documenation ------------------------------------------------------------------------*/ @@ -96,6 +106,15 @@ static inline void host_diag_log_wlock(uint32_t reason, } #endif /* FEATURE_WLAN_DIAG_SUPPORT */ +#ifdef FEATURE_WLAN_DIAG_SUPPORT +void host_log_low_resource_failure(uint8_t event_sub_type); +#else +static inline void host_log_low_resource_failure(uint8_t event_sub_type) +{ + +} +#endif /* FEATURE_WLAN_DIAG_SUPPORT */ + #ifdef __cplusplus } #endif /* __cplusplus */ |
