From 398b3d640f7f7b410798c6bc3bbcd902679a5cd4 Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Wed, 10 Feb 2016 17:19:39 -0800 Subject: [PATCH] qcacld-3.0: Introduce ENTER_DEV() logging macro Currently HDD defines an ENTER() macro which is used to log entry into certain HDD functions. Many of the functions HDD registers with the kernel are called with either a netdev or wdev parameter. When logging entry into those functions it would be beneficial to log the name of the netdev so that in subsequent log analysis we not only know which functions were called but also know which device was being used. Introduce a new ENTER_DEV() macro for this purpose which will log both the function name and the device name. Change-Id: I32ef2bcc958b8148e6d439b30b21102be144a327 CRs-Fixed: 938146 --- core/hdd/inc/wlan_hdd_main.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h index d9c5ca0d7302..776ec510a1f6 100644 --- a/core/hdd/inc/wlan_hdd_main.h +++ b/core/hdd/inc/wlan_hdd_main.h @@ -178,6 +178,8 @@ hdd_logfl(QDF_TRACE_LEVEL_DEBUG, format, ## args) #define ENTER() hdd_logfl(QDF_TRACE_LEVEL_INFO_LOW, "enter") +#define ENTER_DEV(dev) \ + hdd_logfl(QDF_TRACE_LEVEL_INFO_LOW, "enter(%s)", (dev)->name) #define EXIT() hdd_logfl(QDF_TRACE_LEVEL_INFO_LOW, "exit") #define WLAN_HDD_GET_PRIV_PTR(__dev__) (hdd_adapter_t *)(netdev_priv((__dev__)))