qcacld-3.0: Add option to avoid timestamp in version string

Adding timestamp in version string is causing long compile times
for wlan project. Add option to avoid timestamp so that developers
can avoid long compile times.

Change-Id: Iaa5fd4f432549844ae319451cb43929a2d4b68ea
CRs-Fixed: 2064805
diff --git a/Kbuild b/Kbuild
index 07bc362..6f7a83d 100644
--- a/Kbuild
+++ b/Kbuild
@@ -46,6 +46,10 @@
 	# These are configurable via Kconfig for kernel-based builds
 	# Need to explicitly configure for Android-based builds
 
+	ifneq ($(DEVELOPER_DISABLE_BUILD_TIMESTAMP),y)
+	CONFIG_BUILD_TIMESTAMP := y
+	endif
+
 	ifeq ($(CONFIG_ARCH_MDM9630), y)
 	CONFIG_MOBILE_ROUTER := y
 	endif
@@ -2201,9 +2205,11 @@
 CDEFINES += -DWLAN_HDD_ADAPTER_MAGIC=$(WLAN_HDD_ADAPTER_MAGIC)
 endif
 
+# inject some build related information
+ifeq ($(CONFIG_BUILD_TIMESTAMP), y)
+CDEFINES += -DBUILD_TIMESTAMP=\"$(shell date -u +'%Y-%m-%dT%H:%M:%SZ')\"
+endif
+
 # Module information used by KBuild framework
 obj-$(CONFIG_QCA_CLD_WLAN) += $(MODNAME).o
 $(MODNAME)-y := $(OBJS)
-
-# inject some build related information
-CDEFINES += -DBUILD_TIMESTAMP=\"$(shell date -u +'%Y-%m-%dT%H:%M:%SZ')\"
diff --git a/Kconfig b/Kconfig
index 1f00105..6536ec7 100644
--- a/Kconfig
+++ b/Kconfig
@@ -140,4 +140,7 @@
 	bool "Enable ICMP packet disable powersave feature"
 	default n
 
+config CONFIG_BUILD_TIMESTAMP
+	bool "Embed timestamp in wlan version"
+	default n
 endif # QCA_CLD_WLAN
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c
index a5f89a9..de69733 100644
--- a/core/hdd/src/wlan_hdd_main.c
+++ b/core/hdd/src/wlan_hdd_main.c
@@ -280,6 +280,10 @@
  * post processing
  */
 uint8_t g_wlan_driver_version[] = QWLAN_VERSIONSTR;
+
+#ifndef BUILD_TIMESTAMP
+#define BUILD_TIMESTAMP ""
+#endif
 uint8_t g_wlan_driver_timestamp[] = BUILD_TIMESTAMP;
 
 /**
@@ -10707,7 +10711,7 @@
 	pr_err("%s: Loading driver v%s (%s)%s\n",
 	       WLAN_MODULE_NAME,
 	       QWLAN_VERSIONSTR,
-	       BUILD_TIMESTAMP,
+	       g_wlan_driver_timestamp,
 	       TIMER_MANAGER_STR MEMORY_DEBUG_STR);
 
 	ret = wlan_hdd_state_ctrl_param_create();