qcacld-3.0: Enable QDF lock stats feature in debug build

Enable QDF lock stats debug feature in defconfig builds to detect
spin lock abuse in driver and fix it.

Change-Id: I264120d1ca722bac871173f2268737a943c2f5e0
CRs-Fixed: 2311639
diff --git a/Kbuild b/Kbuild
index 28f42de..8fc8fec 100644
--- a/Kbuild
+++ b/Kbuild
@@ -2347,6 +2347,14 @@
 ccflags-y += -DSIR_SAP_MAX_NUM_PEERS=$(CONFIG_SIR_SAP_MAX_NUM_PEERS)
 endif
 
+ifdef CONFIG_LOCK_STATS_ON
+ccflags-y += -DQDF_LOCK_STATS=1
+ccflags-y += -DQDF_LOCK_STATS_DESTROY_PRINT=0
+ccflags-y += -DQDF_LOCK_STATS_BUG_ON=1
+ccflags-y += -DQDF_LOCK_STATS_LIST=1
+ccflags-y += -DQDF_LOCK_STATS_LIST_SIZE=256
+endif
+
 KBUILD_CPPFLAGS += $(cppflags-y)
 
 # Currently, for versions of gcc which support it, the kernel Makefile
diff --git a/configs/default_defconfig b/configs/default_defconfig
index 6f9902e..124be3a 100644
--- a/configs/default_defconfig
+++ b/configs/default_defconfig
@@ -232,6 +232,7 @@
 	# Enable Obj Mgr Degug services if slub build
 	CONFIG_WLAN_OBJMGR_DEBUG:= y
 	CONFIG_MPC_UT_FRAMEWORK := y
+	CONFIG_LOCK_STATS_ON:= y
 endif
 
 ifeq (y,$(findstring y,$(CONFIG_QCA_WIFI_SDIO) $(CONFIG_HIF_USB)))