mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 07:37:31 -04:00
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)
This commit is contained in:
parent
79412edee3
commit
e7835652d6
6 changed files with 79 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -259,6 +259,31 @@ struct host_event_wlan_eapol {
|
|||
uint8_t src_addr[6];
|
||||
};
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
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
|
||||
------------------------------------------------------------------------*/
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Reference in a new issue