wlan: Modify wlan driver to support msm-4.9 kernel
Upgrade wlan driver to support msm-4.9 kernel and also
maintain backward compatibility with previous kernel versions.
Change-Id: Iaae91fe559bfba05b1da4be9b9ef9a12d6f9df28
CRs-Fixed: 2180168
diff --git a/CORE/HDD/src/wlan_hdd_early_suspend.c b/CORE/HDD/src/wlan_hdd_early_suspend.c
index 6057705..375adab 100644
--- a/CORE/HDD/src/wlan_hdd_early_suspend.c
+++ b/CORE/HDD/src/wlan_hdd_early_suspend.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -43,7 +43,14 @@
#include <linux/wait.h>
#include <wlan_hdd_includes.h>
#include <wlan_qct_driver.h>
+
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0)) && \
+ defined(WLAN_OPEN_SOURCE)
+#include <linux/device.h>
+#include <linux/pm_wakeup.h>
+#else
#include <linux/wakelock.h>
+#endif
#include "halTypes.h"
#include "sme_Api.h"