summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlifeng <lifeng@codeaurora.org>2018-03-19 18:31:54 +0800
committerGerrit - the friendly Code Review server <code-review@localhost>2018-03-19 21:56:35 -0700
commit90b65ae22352df6f8d08882c2bf04a3de7a50a96 (patch)
treedecce7301eadc379f6150ffa1144ca15bc8fe047
parent09b159fe239603820a9d36a9b8159fbb21453389 (diff)
qcacld-2.0: Fix the error return dismatch on msm-4.9
Fix the error return dismatch due to the error return of cnss_wlan_query_oob_status() on msm-4.9 is -EINVAL now. Change-Id: I87f76cb5282e73cff968f8b4261509bb9301ab92 CRs-Fixed: 2208256
-rw-r--r--CORE/VOSS/inc/vos_cnss.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/CORE/VOSS/inc/vos_cnss.h b/CORE/VOSS/inc/vos_cnss.h
index fa2d7f8d508e..8bfae8619cb4 100644
--- a/CORE/VOSS/inc/vos_cnss.h
+++ b/CORE/VOSS/inc/vos_cnss.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015-2017 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2015-2018 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -579,6 +579,18 @@ static inline int vos_cache_boarddata(unsigned int offset,
#endif
#if defined(CONFIG_CNSS) && defined(HIF_SDIO)
+#include <linux/version.h>
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0))
+static inline bool vos_oob_enabled(void)
+{
+ bool enabled = true;
+
+ if (-EINVAL == cnss_wlan_query_oob_status())
+ enabled = false;
+
+ return enabled;
+}
+#else
static inline bool vos_oob_enabled(void)
{
bool enabled = true;
@@ -588,6 +600,7 @@ static inline bool vos_oob_enabled(void)
return enabled;
}
+#endif
static inline int vos_register_oob_irq_handler(oob_irq_handler_t handler,
void *pm_oob)