qcacmn: Add diag events for debugging

Currently there are no diag events to inform user space about
used AKM Suite, requested pairwise cipher, group cipher, and
group key management in assoc request and algo num used in auth
req.

Add such diag events which can be useful in automation.

Change-Id: I25336d541f507bfa16e3b6e10b0653fcce898021
CRs-Fixed: 2225883
Bu işleme şunda yer alıyor:
Abhinav Kumar
2018-04-17 12:51:15 +05:30
işlemeyi yapan: nshrivas
ebeveyn 2a44c1c811
işleme 5fb51321a8
4 değiştirilmiş dosya ile 88 ekleme ve 0 silme

Dosyayı Görüntüle

@@ -45,6 +45,7 @@ extern "C" {
#endif /* __cplusplus */
#define WAKE_LOCK_NAME_LEN 80
#define RSN_OUI_SIZE 4
/**
* enum wifi_frm_type: type of frame
@@ -560,6 +561,27 @@ enum resource_failure_type {
WIFI_EVENT_MEMORY_FAILURE,
};
/*-------------------------------------------------------------------------
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: Multi cast 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
------------------------------------------------------------------------*/

Dosyayı Görüntüle

@@ -895,6 +895,25 @@ typedef enum {
EVENT_WLAN_HOST_MGMT_RX_V2 = 0xC53,
EVENT_WLAN_CONN_STATS_V2 = 0xC56,
/*
* <diag_event>
* EVENT_WLAN_RSN_INFO
* @akm_suite: Gives information about akm suites used in assoc request
* @ucast_cipher: Unicast cipher used in assoc request
* @mcast_cipher: Multi cast 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;

Dosyayı Görüntüle

@@ -275,6 +275,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

Dosyayı Görüntüle

@@ -106,6 +106,34 @@ 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);