Browse Source

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
Jeff Johnson 9 years ago
parent
commit
398b3d640f
1 changed files with 2 additions and 0 deletions
  1. 2 0
      core/hdd/inc/wlan_hdd_main.h

+ 2 - 0
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__)))