diff options
| -rw-r--r-- | core/mac/src/pe/lim/lim_process_mlm_req_messages.c | 7 | ||||
| -rw-r--r-- | core/mac/src/pe/lim/lim_utils.h | 1 | ||||
| -rw-r--r-- | core/sme/src/csr/csr_util.c | 2 | ||||
| -rw-r--r-- | core/utils/host_diag_log/inc/host_diag_core_event.h | 24 | ||||
| -rw-r--r-- | core/utils/host_diag_log/inc/host_diag_event_defs.h | 21 | ||||
| -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 | 28 |
7 files changed, 100 insertions, 4 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 4dc5d3810587..4796630ca879 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 @@ -1219,6 +1219,10 @@ static void lim_process_mlm_auth_req(tpAniSirGlobal mac_ctx, uint32_t *msg) goto end; } else { pe_debug("lim_process_mlm_auth_req_sae is successful"); + lim_diag_event_report(mac_ctx, + WLAN_PE_DIAG_AUTH_ALGO_NUM, + session, eSIR_SUCCESS, + eSIR_AUTH_TYPE_SAE); return; } } else @@ -1235,6 +1239,9 @@ static void lim_process_mlm_auth_req(tpAniSirGlobal mac_ctx, uint32_t *msg) auth_frame_body.authAlgoNumber = (uint8_t) mac_ctx->lim.gpLimMlmAuthReq->authType; } + lim_diag_event_report(mac_ctx, WLAN_PE_DIAG_AUTH_ALGO_NUM, + session, eSIR_SUCCESS, + auth_frame_body.authAlgoNumber); /* Prepare & send Authentication frame */ auth_frame_body.authTransactionSeqNumber = SIR_MAC_AUTH_FRAME_1; diff --git a/core/mac/src/pe/lim/lim_utils.h b/core/mac/src/pe/lim/lim_utils.h index 10d095a7dd41..46b2ea676d45 100644 --- a/core/mac/src/pe/lim/lim_utils.h +++ b/core/mac/src/pe/lim/lim_utils.h @@ -588,6 +588,7 @@ typedef enum { WLAN_PE_DIAG_DISASSOC_FRAME_EVENT, WLAN_PE_DIAG_AUTH_ACK_EVENT, WLAN_PE_DIAG_ASSOC_ACK_EVENT, + WLAN_PE_DIAG_AUTH_ALGO_NUM, } WLAN_PE_DIAG_EVENT_TYPE; #ifdef FEATURE_WLAN_DIAG_SUPPORT diff --git a/core/sme/src/csr/csr_util.c b/core/sme/src/csr/csr_util.c index 078dcb2e51d3..febf16cd208b 100644 --- a/core/sme/src/csr/csr_util.c +++ b/core/sme/src/csr/csr_util.c @@ -3768,6 +3768,8 @@ uint8_t csr_construct_rsn_ie(tHalHandle hHal, uint32_t sessionId, gp_mgmt_cipher_suite, CSR_RSN_OUI_SIZE); } #endif + host_log_rsn_info(UnicastCypher, MulticastCypher, + AuthSuite, gp_mgmt_cipher_suite); /* Add in the fixed fields plus 1 Unicast cypher, less the * IE Header length Add in the size of the Auth suite (count 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 defcaae9ddbb..b1bd37354bf2 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 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2017 The Linux Foundation. All rights reserved. + * Copyright (c) 2014-2018 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -45,6 +45,7 @@ extern "C" { #endif /* __cplusplus */ #define WAKE_LOCK_NAME_LEN 80 +#define RSN_OUI_SIZE 4 /*------------------------------------------------------------------------- Event ID: EVENT_WLAN_SECURITY @@ -308,6 +309,27 @@ enum resource_failure_type { }; /*------------------------------------------------------------------------- + Event ID: EVENT_WLAN_RSN_INFO + ------------------------------------------------------------------------- + */ +/** + * struct event_wlan_csr_rsn_info - Structure holding the + * RSN information for assoc request + * @akm_suite: Gives information about akm suites used in assoc request + * @ucast_cipher: Unicast cipher used in assoc request + * @mcast_cipher: Multicast cipher used in assoc request + * @group_mgmt: Requested group mgmt cipher suite + * + * This structure will hold the RSN information for assoc request + */ +struct event_wlan_csr_rsn_info { + uint8_t akm_suite[RSN_OUI_SIZE]; + uint8_t ucast_cipher[RSN_OUI_SIZE]; + uint8_t mcast_cipher[RSN_OUI_SIZE]; + uint8_t group_mgmt[RSN_OUI_SIZE]; +}; + +/*------------------------------------------------------------------------- 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 7ce94d9723a2..fd0a5b61d159 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 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2017 The Linux Foundation. All rights reserved. + * Copyright (c) 2014-2018 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -888,6 +888,25 @@ typedef enum { EVENT_WLAN_SSR_SHUTDOWN_SUBSYSTEM = 0xB3D, + /* + * <diag_event> + * EVENT_WLAN_RSN_INFO + * @akm_suite: Akm suites used in assoc request + * @ucast_cipher: Unicast cipher used in assoc request + * @mcast_cipher: Multicast cipher used in assoc request + * @group_mgmt: Requested group mgmt cipher suite + * + * This event is used to send RSN information used + * in assoc request. + * + * Supported Feature: STA + * + * </diag_event> + */ + + EVENT_WLAN_RSN_INFO = 0xC5B, + + 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 8cbde65201ee..b497acf004c4 100644 --- a/core/utils/host_diag_log/src/host_diag_log.c +++ b/core/utils/host_diag_log/src/host_diag_log.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2017 The Linux Foundation. All rights reserved. + * Copyright (c) 2014-2018 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -274,6 +274,25 @@ void host_log_low_resource_failure(uint8_t event_sub_type) EVENT_WLAN_LOW_RESOURCE_FAILURE); } +void host_log_rsn_info(uint8_t *ucast_cipher, uint8_t *mcast_cipher, + uint8_t *akm_suite, uint8_t *group_mgmt) +{ + WLAN_HOST_DIAG_EVENT_DEF(wlan_diag_event, + struct event_wlan_csr_rsn_info); + + qdf_mem_copy(wlan_diag_event.ucast_cipher, ucast_cipher, + RSN_OUI_SIZE); + qdf_mem_copy(wlan_diag_event.mcast_cipher, mcast_cipher, + RSN_OUI_SIZE); + qdf_mem_copy(wlan_diag_event.akm_suite, akm_suite, + RSN_OUI_SIZE); + qdf_mem_copy(wlan_diag_event.group_mgmt, group_mgmt, + RSN_OUI_SIZE); + + WLAN_HOST_DIAG_EVENT_REPORT(&wlan_diag_event, + EVENT_WLAN_RSN_INFO); +} + #ifdef FEATURE_WLAN_DIAG_SUPPORT /** * qdf_wow_wakeup_host_event()- send wow wakeup event 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 0799ba35429b..0dfe25d67dd5 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 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2016 The Linux Foundation. All rights reserved. + * Copyright (c) 2014-2018 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -107,6 +107,32 @@ static inline void host_log_low_resource_failure(uint8_t event_sub_type) #endif /* FEATURE_WLAN_DIAG_SUPPORT */ #ifdef FEATURE_WLAN_DIAG_SUPPORT +/** + * host_log_rsn_info() - This function is used to send + * requested rsn info in assoc request + * @ucast_cipher: Unicast ciphers used in assoc request + * @mcast_cipher: Group ciphers used in assoc request + * @akm_suite: Gives information about akm suites used in assoc request + * @group_mgmt: Requested group mgmt cipher suite + * + * This function is used to send RSN info used in assoc req to user space + * + * Return: None + * + */ +void host_log_rsn_info(uint8_t *ucast_cipher, uint8_t *mcast_cipher, + uint8_t *auth_suite, uint8_t *gp_mgmt_cipher); +#else +static inline void host_log_rsn_info(uint8_t *ucast_cipher, + uint8_t *mcast_cipher, + uint8_t *auth_suite, + uint8_t *gp_mgmt_cipher); +{ + +} +#endif /* FEATURE_WLAN_DIAG_SUPPORT */ + +#ifdef FEATURE_WLAN_DIAG_SUPPORT void qdf_wow_wakeup_host_event(uint8_t wow_wakeup_cause); #else static inline void qdf_wow_wakeup_host_event(uint8_t wow_wakeup_cause) |
