diff options
Diffstat (limited to 'core/utils')
| -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 |
4 files changed, 90 insertions, 4 deletions
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) |
