qcacmn: Record station connect/disconnect event
Add connect/disconnect log ring buffer to existing ROAM debug functionality to record OS IF layer event. Change-Id: Ifcbcd9a38ead27d60757983a0f56a37ae5d8af81 CRs-Fixed: 2852405
このコミットが含まれているのは:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2013-2019 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2013-2019, 2021 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
|
||||
@@ -21,47 +21,24 @@
|
||||
#ifndef _WLAN_ROAM_DEBUG_H_
|
||||
#define _WLAN_ROAM_DEBUG_H_
|
||||
|
||||
|
||||
#define roam_debug(args ...) \
|
||||
QDF_TRACE_DEBUG(QDF_MODULE_ID_ROAM_DEBUG, ## args)
|
||||
QDF_TRACE_DEBUG_NO_FL(QDF_MODULE_ID_ROAM_DEBUG, ## args)
|
||||
#define roam_info(args ...) \
|
||||
QDF_TRACE_INFO_NO_FL(QDF_MODULE_ID_ROAM_DEBUG, ## args)
|
||||
|
||||
/**
|
||||
* struct wlan_roam_debug_rec - roam debug information record definition
|
||||
* @time: timestamp when record was added
|
||||
* @operation: identifier for operation, command, event, etc.
|
||||
* @vdev_id: vdev identifier
|
||||
* @peer_id: peer_id. Range 0 - 255, 0xffff is invalid peer_id.
|
||||
* @mac_addr: mac address of peer
|
||||
* @peer_obj: pointer to peer object
|
||||
* @arg1: Optional argument #1
|
||||
* @arg2: Opttional argument #2
|
||||
*/
|
||||
struct wlan_roam_debug_rec {
|
||||
uint64_t time;
|
||||
uint8_t operation;
|
||||
uint8_t vdev_id;
|
||||
uint16_t peer_id;
|
||||
struct qdf_mac_addr mac_addr;
|
||||
void *peer_obj;
|
||||
uint32_t arg1;
|
||||
uint32_t arg2;
|
||||
};
|
||||
#define wlan_rec_conn_info(vdev_id, op, mac_addr, arg1, arg2) \
|
||||
wlan_rec_debug_log(REC_CONN, vdev_id, op, 0, mac_addr, 0, arg1,\
|
||||
arg2)
|
||||
|
||||
#ifndef WLAN_ROAM_DEBUG_MAX_REC
|
||||
#define WLAN_ROAM_DEBUG_MAX_REC 256
|
||||
#define WLAN_ROAM_DEBUG_MAX_REC 128
|
||||
#endif
|
||||
|
||||
/**
|
||||
* struct wlan_roam_debug_info - Buffer to store the wma debug records
|
||||
* @index: index of the most recent entry in the circular buffer
|
||||
* @num_max_rec: maximum records stored in the records array
|
||||
* @rec: array to store wma debug records, used in circular fashion
|
||||
*/
|
||||
struct wlan_roam_debug_info {
|
||||
qdf_atomic_t index;
|
||||
uint32_t num_max_rec;
|
||||
struct wlan_roam_debug_rec rec[WLAN_ROAM_DEBUG_MAX_REC];
|
||||
};
|
||||
typedef enum {
|
||||
REC_ROAM,
|
||||
REC_CONN,
|
||||
REC_MAX,
|
||||
} wlan_rec_type;
|
||||
|
||||
/**
|
||||
* @DEBUG_PEER_CREATE_SEND: sent peer_create command to firmware
|
||||
@@ -78,8 +55,16 @@ struct wlan_roam_debug_info {
|
||||
* @DEBUG_ROAM_EVENT: received roam event
|
||||
* @DEBUG_BUS_SUSPEND: host going into suspend mode
|
||||
* @DEBUG_BUS_RESUME: host operation resumed
|
||||
* @DEBUG_CONN_CONNECTING: trace connecting to bssid
|
||||
* @DEBUG_CONN_ASSOCIATION: trace association completion
|
||||
* @DEBUG_CONN_CONNECT_RESULT: trace connect result to os
|
||||
* @DEBUG_CONN_ROAMING: trace station roaming propagtion
|
||||
* @DEBUG_CONN_ROAMED: trace roamed to bssid
|
||||
* @DEBUG_CONN_ROAMED_IND: trace roam indication
|
||||
* @DEBUG_CONN_DISCONNECT: trace station disconnect
|
||||
* @DEBUG_CONN_DISCONNECT_HANDLER: trace disconnect handler
|
||||
* @DEBUG_CONN_DISCONNECT_IND: trace disconnect indication
|
||||
*/
|
||||
|
||||
enum peer_debug_op {
|
||||
DEBUG_PEER_CREATE_SEND = 0,
|
||||
DEBUG_PEER_CREATE_RESP,
|
||||
@@ -97,6 +82,52 @@ enum peer_debug_op {
|
||||
DEBUG_BUS_SUSPEND,
|
||||
DEBUG_BUS_RESUME,
|
||||
DEBUG_WOW_REASON,
|
||||
DEBUG_CONN_CONNECTING,
|
||||
DEBUG_CONN_ASSOCIATION,
|
||||
DEBUG_CONN_CONNECT_RESULT,
|
||||
DEBUG_CONN_ROAMING,
|
||||
DEBUG_CONN_ROAMED,
|
||||
DEBUG_CONN_ROAMED_IND,
|
||||
DEBUG_CONN_DISCONNECT,
|
||||
DEBUG_CONN_DISCONNECT_HANDLER,
|
||||
DEBUG_CONN_DISCONNECT_IND,
|
||||
};
|
||||
|
||||
/**
|
||||
* struct wlan_roam_debug_rec - roam debug information record definition
|
||||
* @time: timestamp when record was added
|
||||
* @operation: identifier for operation, command, event, etc.
|
||||
* @vdev_id: vdev identifier
|
||||
* @peer_id: peer_id. Range 0 - 255, 0xffff is invalid peer_id.
|
||||
* @mac_addr: mac address of peer
|
||||
* @peer_obj: pointer to peer object
|
||||
* @arg1: Optional argument #1
|
||||
* @arg2: Opttional argument #2
|
||||
*/
|
||||
struct wlan_roam_debug_rec {
|
||||
uint64_t time;
|
||||
enum peer_debug_op operation;
|
||||
uint8_t vdev_id;
|
||||
uint16_t peer_id;
|
||||
struct qdf_mac_addr mac_addr;
|
||||
void *peer_obj;
|
||||
uint32_t arg1;
|
||||
uint32_t arg2;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct wlan_roam_debug_info - Buffer to store the wma debug records
|
||||
* @index: index of the most recent entry in the circular buffer
|
||||
* @num_max_rec: maximum records stored in the records array
|
||||
* @rec: array to store wma debug records, used in circular fashion
|
||||
*/
|
||||
struct wlan_roam_debug_info {
|
||||
qdf_atomic_t index;
|
||||
uint32_t num_max_rec;
|
||||
void (*rec_print)(struct wlan_roam_debug_rec *dbg_rec,
|
||||
uint32_t idx, uint32_t delta,
|
||||
bool to_kernel);
|
||||
struct wlan_roam_debug_rec rec[WLAN_ROAM_DEBUG_MAX_REC];
|
||||
};
|
||||
|
||||
#define DEBUG_INVALID_PEER_ID 0xffff
|
||||
@@ -118,6 +149,22 @@ enum peer_debug_op {
|
||||
void wlan_roam_debug_log(uint8_t vdev_id, uint8_t op,
|
||||
uint16_t peer_id, void *mac_addr,
|
||||
void *peer_obj, uint32_t arg1, uint32_t arg2);
|
||||
/**
|
||||
* wlan_rec_debug_log() - Add a debug log entry to wlan debug records
|
||||
* @rec_type: record type
|
||||
* @vdev_id: vdev identifier
|
||||
* @op: operation identifier
|
||||
* @peer_id: peer id
|
||||
* @mac_addr: mac address of peer, can be NULL
|
||||
* @peer_obj: peer object address, can be NULL
|
||||
* @arg1: extra argument #1
|
||||
* @arg2: extra argument #2
|
||||
*
|
||||
* Return: none
|
||||
*/
|
||||
void wlan_rec_debug_log(wlan_rec_type rec_type, uint8_t vdev_id, uint8_t op,
|
||||
uint16_t peer_id, const void *mac_addr,
|
||||
void *peer_obj, uint32_t arg1, uint32_t arg2);
|
||||
|
||||
/**
|
||||
* wlan_roam_debug_dump_table() - Print the roam debug log records
|
||||
@@ -127,6 +174,19 @@ void wlan_roam_debug_log(uint8_t vdev_id, uint8_t op,
|
||||
*/
|
||||
void wlan_roam_debug_dump_table(void);
|
||||
|
||||
/**
|
||||
* wlan_rec_debug_dump_table() - Print the wlan roam debug log records
|
||||
* @rec_type: recorad type
|
||||
* @count: count of records to print
|
||||
* @to_kernel: print to kernel or not
|
||||
*
|
||||
* print all the valid debug records in the order of timestamp
|
||||
*
|
||||
* Return: none
|
||||
*/
|
||||
void wlan_rec_debug_dump_table(wlan_rec_type rec_type, uint32_t count,
|
||||
bool to_kernel);
|
||||
|
||||
#ifdef WLAN_LOGGING_BUFFERS_DYNAMICALLY
|
||||
/**
|
||||
* wlan_roam_debug_init() - Allocate log buffer dynamically
|
||||
@@ -158,10 +218,23 @@ wlan_roam_debug_log(uint8_t vdev_id, uint8_t op,
|
||||
{
|
||||
}
|
||||
|
||||
static inline void wlan_rec_debug_log(
|
||||
wlan_rec_type rec_type, uint8_t vdev_id, uint8_t op,
|
||||
uint16_t peer_id, const void *mac_addr,
|
||||
void *peer_obj, uint32_t arg1, uint32_t arg2)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void wlan_roam_debug_dump_table(void)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void wlan_rec_debug_dump_table(wlan_rec_type rec_type,
|
||||
uint32_t count,
|
||||
bool to_kernel)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void wlan_roam_debug_init(void)
|
||||
{
|
||||
}
|
||||
|
新しいイシューから参照
ユーザーをブロックする