From d0fc0ea3643a4792e63f9e8fa1ad501453088196 Mon Sep 17 00:00:00 2001 From: Manjunathappa Prakash Date: Wed, 22 Aug 2018 15:59:09 -0700 Subject: [PATCH] qcacmn: Add more debug_ids and reduce the dump log level Add more debug IDs to narrow down further funciton who is holding peer reference. Reduce the peer debug dump log level to avoid side effects of console logging. Change-Id: I9820c72bcde8a0c2b0e779cf322e1133ef8a43e6 CRs-Fixed: 2303069 --- dp/inc/cdp_txrx_mob_def.h | 26 +++++++++++++++++------- utils/logging/inc/wlan_roam_debug.h | 3 +++ utils/logging/src/wlan_roam_debug.c | 31 ++++++++++------------------- 3 files changed, 33 insertions(+), 27 deletions(-) diff --git a/dp/inc/cdp_txrx_mob_def.h b/dp/inc/cdp_txrx_mob_def.h index fdd4e37732..7af60f8a01 100644 --- a/dp/inc/cdp_txrx_mob_def.h +++ b/dp/inc/cdp_txrx_mob_def.h @@ -198,16 +198,28 @@ enum ol_tx_spec { * @PEER_DEBUG_ID_LIM_SEND_ADDBA_RESP: debug id for send ADDBA response * @PEER_DEBUG_ID_OL_RX_THREAD: debug id for rx thread * @PEER_DEBUG_ID_WMA_CCMP_REPLAY_ATTACK: debug id for CCMP replay + * @PEER_DEBUG_ID_WMA_DEL_BSS:debug id for remove BSS + * @PEER_DEBUG_ID_WMA_VDEV_STOP_RESP:debug id for vdev stop response handler + * @PEER_DEBUG_ID_OL_PEER_MAP:debug id for peer map/unmap + * @PEER_DEBUG_ID_OL_PEER_ATTACH: debug id for peer attach/detach + * @PEER_DEBUG_ID_OL_TXQ_VDEV_FL: debug id for vdev flush + * @PEER_DEBUG_ID_OL_HASH_ERS:debug id for peer find hash erase * @PEER_DEBUG_ID_MAX: debug id MAX */ enum peer_debug_id_type { - PEER_DEBUG_ID_OL_INTERNAL = 0, - PEER_DEBUG_ID_WMA_PKT_DROP = 1, - PEER_DEBUG_ID_WMA_ADDBA_REQ = 2, - PEER_DEBUG_ID_WMA_DELBA_REQ = 3, - PEER_DEBUG_ID_LIM_SEND_ADDBA_RESP = 4, - PEER_DEBUG_ID_OL_RX_THREAD = 5, - PEER_DEBUG_ID_WMA_CCMP_REPLAY_ATTACK = 6, + PEER_DEBUG_ID_OL_INTERNAL, + PEER_DEBUG_ID_WMA_PKT_DROP, + PEER_DEBUG_ID_WMA_ADDBA_REQ, + PEER_DEBUG_ID_WMA_DELBA_REQ, + PEER_DEBUG_ID_LIM_SEND_ADDBA_RESP, + PEER_DEBUG_ID_OL_RX_THREAD, + PEER_DEBUG_ID_WMA_CCMP_REPLAY_ATTACK, + PEER_DEBUG_ID_WMA_DEL_BSS, + PEER_DEBUG_ID_WMA_VDEV_STOP_RESP, + PEER_DEBUG_ID_OL_PEER_MAP, + PEER_DEBUG_ID_OL_PEER_ATTACH, + PEER_DEBUG_ID_OL_TXQ_VDEV_FL, + PEER_DEBUG_ID_OL_HASH_ERS, PEER_DEBUG_ID_MAX }; diff --git a/utils/logging/inc/wlan_roam_debug.h b/utils/logging/inc/wlan_roam_debug.h index 8332caa9e7..e49c139842 100644 --- a/utils/logging/inc/wlan_roam_debug.h +++ b/utils/logging/inc/wlan_roam_debug.h @@ -22,6 +22,9 @@ #define _WLAN_ROAM_DEBUG_H_ +#define roam_debug(args ...) \ + QDF_TRACE_DEBUG(QDF_MODULE_ID_ROAM_DEBUG, ## args) + /** * struct wlan_roam_debug_rec - roam debug information record definition * @time: timestamp when record was added diff --git a/utils/logging/src/wlan_roam_debug.c b/utils/logging/src/wlan_roam_debug.c index 44f8be0669..8988282853 100644 --- a/utils/logging/src/wlan_roam_debug.c +++ b/utils/logging/src/wlan_roam_debug.c @@ -220,13 +220,10 @@ void wlan_roam_debug_dump_table(void) current_index = qdf_atomic_read(&dbg_tbl->index); if (current_index < 0) { - QDF_TRACE(QDF_MODULE_ID_ROAM_DEBUG, QDF_TRACE_LEVEL_ERROR, - "%s: No records to dump", __func__); + roam_debug("No records to dump"); return; } - QDF_TRACE(QDF_MODULE_ID_ROAM_DEBUG, QDF_TRACE_LEVEL_ERROR, - "%s: Dumping all records. current index %d", - __func__, current_index); + roam_debug("Dumping all records. current index %d", current_index); i = current_index; do { @@ -248,23 +245,17 @@ void wlan_roam_debug_dump_table(void) 0xffffffff); delta = delta / (DEBUG_CLOCK_TICKS_PER_MSEC >> 8); - QDF_TRACE(QDF_MODULE_ID_ROAM_DEBUG, QDF_TRACE_LEVEL_ERROR, - "index = %5d timestamp = 0x%016llx delta ms = %-12u", - i, dbg_rec->time, delta); - QDF_TRACE(QDF_MODULE_ID_ROAM_DEBUG, QDF_TRACE_LEVEL_ERROR, - "info = %-24s vdev_id = %-3d mac addr = %pM", - wlan_roam_debug_string(dbg_rec->operation), - (int8_t) dbg_rec->vdev_id, dbg_rec->mac_addr.bytes); - QDF_TRACE(QDF_MODULE_ID_ROAM_DEBUG, QDF_TRACE_LEVEL_ERROR, - "peer obj = 0x%pK peer_id = %-4d", - dbg_rec->peer_obj, (int8_t) dbg_rec->peer_id); - QDF_TRACE(QDF_MODULE_ID_ROAM_DEBUG, QDF_TRACE_LEVEL_ERROR, - "arg1 = 0x%-8x arg2 = 0x%-8x", - dbg_rec->arg1, dbg_rec->arg2); + roam_debug("index = %5d timestamp = 0x%016llx delta ms = %-12u", + i, dbg_rec->time, delta); + roam_debug("info = %-24s vdev_id = %-3d mac addr = %pM", + wlan_roam_debug_string(dbg_rec->operation), + (int8_t)dbg_rec->vdev_id, dbg_rec->mac_addr.bytes); + roam_debug("peer obj = 0x%pK peer_id = %-4d", dbg_rec->peer_obj, + (int8_t)dbg_rec->peer_id); + roam_debug("arg1 = 0x%-8x arg2 = 0x%-8x", dbg_rec->arg1, + dbg_rec->arg2); } while (i != current_index); } - qdf_export_symbol(wlan_roam_debug_dump_table); #endif /* FEATURE_ROAM_DEBUG */ -