summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorAnurag Chouhan <achouhan@codeaurora.org>2016-02-16 18:18:03 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2016-03-24 11:57:34 -0700
commitce0dc99ca85170769a4ea0a68b30308743d3e409 (patch)
tree6dc095d3ceb06623b23e2b6fa7496eccb0ac116c /core
parent43d47fa65920a8a91ca17b315701a324d9bcef61 (diff)
qcacld-3.0: Add qdf event API's
Replace CDF event API's with QDF event API's Change-Id: I1d75c9ca01cc6bd7cac42f1ae4c1dd78f37b3d26 CRs-Fixed: 981188
Diffstat (limited to 'core')
-rw-r--r--core/cdf/inc/cdf_event.h154
-rw-r--r--core/cdf/inc/cdf_list.h1
-rw-r--r--core/cdf/inc/cdf_lock.h1
-rw-r--r--core/cdf/inc/cdf_mc_timer.h1
-rw-r--r--core/cdf/inc/cdf_status.h1
-rw-r--r--core/cdf/inc/cdf_trace.h1
-rw-r--r--core/cdf/src/cdf_event.c270
-rw-r--r--core/cdf/src/i_cdf_atomic.h1
-rw-r--r--core/cdf/src/i_cdf_defer.h1
-rw-r--r--core/cdf/src/i_cdf_event.h62
-rw-r--r--core/cdf/src/i_cdf_util.h1
-rw-r--r--core/cds/inc/cds_api.h3
-rw-r--r--core/cds/inc/cds_crypto.h5
-rw-r--r--core/cds/inc/cds_mq.h35
-rw-r--r--core/cds/inc/cds_packet.h3
-rw-r--r--core/cds/inc/cds_sched.h37
-rw-r--r--core/cds/inc/cds_utils.h15
-rw-r--r--core/cds/src/cds_api.c74
-rw-r--r--core/cds/src/cds_concurrency.c45
-rw-r--r--core/dp/txrx/ol_txrx.c6
-rw-r--r--core/dp/txrx/ol_txrx_types.h2
-rw-r--r--core/hdd/inc/wlan_hdd_ftm.h3
-rw-r--r--core/hdd/inc/wlan_hdd_main.h6
-rw-r--r--core/hdd/inc/wlan_hdd_wext.h6
-rw-r--r--core/hdd/src/wlan_hdd_cfg80211.c20
-rw-r--r--core/hdd/src/wlan_hdd_driver_ops.c1
-rw-r--r--core/hdd/src/wlan_hdd_ftm.c36
-rw-r--r--core/hdd/src/wlan_hdd_hostapd.c49
-rw-r--r--core/hdd/src/wlan_hdd_main.c25
-rw-r--r--core/hdd/src/wlan_hdd_wext.c31
-rw-r--r--core/mac/src/sys/common/inc/wlan_qct_sys.h27
-rw-r--r--core/mac/src/sys/common/src/wlan_qct_sys.c27
-rw-r--r--core/sme/inc/csr_internal.h1
-rw-r--r--core/sme/inc/sme_inside.h3
-rw-r--r--core/sme/inc/sme_internal.h3
-rw-r--r--core/utils/logging/inc/wlan_logging_sock_svc.h3
-rw-r--r--core/utils/ptt/inc/wlan_ptt_sock_svc.h1
-rw-r--r--core/utils/ptt/src/wlan_ptt_sock_svc.c6
-rw-r--r--core/wma/inc/wma.h21
-rw-r--r--core/wma/src/wma_data.c19
-rw-r--r--core/wma/src/wma_dev_if.c8
-rw-r--r--core/wma/src/wma_features.c42
42 files changed, 305 insertions, 752 deletions
diff --git a/core/cdf/inc/cdf_event.h b/core/cdf/inc/cdf_event.h
deleted file mode 100644
index e18588063636..000000000000
--- a/core/cdf/inc/cdf_event.h
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
- * Copyright (c) 2014-2015 The Linux Foundation. All rights reserved.
- *
- * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
- *
- *
- * Permission to use, copy, modify, and/or distribute this software for
- * any purpose with or without fee is hereby granted, provided that the
- * above copyright notice and this permission notice appear in all
- * copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
- * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/*
- * This file was originally distributed by Qualcomm Atheros, Inc.
- * under proprietary terms before Copyright ownership was assigned
- * to the Linux Foundation.
- */
-
-#if !defined(__CDF_EVENT_H)
-#define __CDF_EVENT_H
-
-/**
- * DOC: cdf_event.h
- *
- * Connectivity driver framework (CDF) events API
- *
- **/
-
-/* Include Files */
-#include "cdf_status.h"
-#include "cdf_types.h"
-#include "i_cdf_event.h"
-
-/* Preprocessor definitions and constants */
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-/* Type declarations */
-
-/* Function declarations and documenation */
-
-/**
- * cdf_event_init() - initializes the specified event
- *
- * @event: Pointer to CDF event object to initialize
- *
- * Initializes the specified event. Upon successful initialization the state
- * of the event becomes initialized and not signaled.
- *
- * Return:
- * CDF_STATUS_SUCCESS - Event was successfully initialized and is ready to
- * be used
- * Otherwise failure CDF reason code
- */
-
-CDF_STATUS cdf_event_init(cdf_event_t *event);
-
-/**
- * cdf_event_set() - set a CDF event
- *
- * @event: Pointer of CDF event to set to the signalled state
- *
- * The state of the specified event is set to 'signalled by calling
- * cdf_event_set(). The state of the event remains signalled until an
- * explicit call to cdf_event_reset().
- *
- * Any threads waiting on the event as a result of a cdf_event_wait() will
- * be unblocked and available to be scheduled for execution when the event
- * is signaled by a call to cdf_event_set().
- *
- * Return:
- * CDF_STATUS_SUCCESS - Event was successfully set
- * Otherwise failure CDF reason code
- */
-CDF_STATUS cdf_event_set(cdf_event_t *event);
-
-/**
- * cdf_event_reset() - reset a CDF event
- *
- * @event: Pointer of CDF event to reset
- *
- * The state of the specified event is set to 'NOT signalled' by calling
- * cdf_event_reset(). The state of the event remains NOT signalled until an
- * explicit call to cdf_event_set().
- *
- * This function sets the event to a NOT signalled state even if the event was
- * signalled multiple times before being signaled.
- *
- * Return:
- * CDF_STATUS_SUCCESS - Event was successfully reset
- * Otherwise failure CDF reason code
- */
-CDF_STATUS cdf_event_reset(cdf_event_t *event);
-
-/**
- * cdf_event_destroy() - destroy a CDF event
- *
- * @event: Pointer of CDF event to destroy
- *
- * The function destroys the event object referenced by event.
- * After a successful return from cdf_event_destroy() the event object becomes,
- * in effect, uninitialized.
- *
- * A destroyed event object can be reinitialized using cdf_event_init();
- * the results of otherwise referencing the object after it has been destroyed
- * are undefined. Calls to CDF event functions to manipulate the lock such
- * as cdf_event_set() will fail if the event is destroyed. Therefore,
- * don't use the event after it has been destroyed until it has
- * been re-initialized.
- *
- * Return:
- * CDF_STATUS_SUCCESS - Event was successfully destroyed
- * Otherwise failure CDF reason code
- */
-CDF_STATUS cdf_event_destroy(cdf_event_t *event);
-
-/**
- * cdf_wait_single_event() - wait for a single input CDF event to be set
- *
- * @event: Pointer of CDF event to wait on
- * @timeout: Timeout value in milli seconds
- *
- * This API waits for the event to be set. This function returns
- * if this interval elapses, regardless if any of the events have
- * been set. An input value of 0 for this timeout parameter means
- * to wait infinitely, meaning a timeout will never occur.
- *
- *
- * Return:
- * CDF_STATUS_SUCCESS - the wait was satisifed by the event being
- * set.
- *
- * CDF_STATUS_E_TIMEOUT - the timeout interval elapsed before the
- * event was set.
- *
- * CDF_STATUS_E_INVAL - The value specified by event is invalid.
- */
-CDF_STATUS cdf_wait_single_event(cdf_event_t *pEvent,
- uint32_t timeout);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-#endif /* __CDF_EVENT_H */
diff --git a/core/cdf/inc/cdf_list.h b/core/cdf/inc/cdf_list.h
index 2076e1c3988e..427847a91bef 100644
--- a/core/cdf/inc/cdf_list.h
+++ b/core/cdf/inc/cdf_list.h
@@ -50,6 +50,7 @@
/* Include Files */
#include <cdf_types.h>
#include <cdf_status.h>
+#include <qdf_status.h>
#include <cdf_trace.h>
#include <linux/list.h>
diff --git a/core/cdf/inc/cdf_lock.h b/core/cdf/inc/cdf_lock.h
index 83a5c4164e01..a477f9b586b7 100644
--- a/core/cdf/inc/cdf_lock.h
+++ b/core/cdf/inc/cdf_lock.h
@@ -40,6 +40,7 @@
/* Include Files */
#include "cdf_status.h"
+#include "qdf_status.h"
#include "i_cdf_lock.h"
/* Preprocessor definitions and constants */
diff --git a/core/cdf/inc/cdf_mc_timer.h b/core/cdf/inc/cdf_mc_timer.h
index b8740d78315e..c0992e9911a4 100644
--- a/core/cdf/inc/cdf_mc_timer.h
+++ b/core/cdf/inc/cdf_mc_timer.h
@@ -37,6 +37,7 @@
/* Include Files */
#include <cdf_types.h>
#include <cdf_status.h>
+#include <qdf_status.h>
#include <cdf_lock.h>
#include <i_cdf_mc_timer.h>
diff --git a/core/cdf/inc/cdf_status.h b/core/cdf/inc/cdf_status.h
index 635b4ad33bc2..306209105bd5 100644
--- a/core/cdf/inc/cdf_status.h
+++ b/core/cdf/inc/cdf_status.h
@@ -28,6 +28,7 @@
#if !defined(__CDF_STATUS_H)
#define __CDF_STATUS_H
+#include <qdf_status.h>
/**
* DOC: cdf_status
*
diff --git a/core/cdf/inc/cdf_trace.h b/core/cdf/inc/cdf_trace.h
index bbf78b9cf6b6..fd0e41d44c58 100644
--- a/core/cdf/inc/cdf_trace.h
+++ b/core/cdf/inc/cdf_trace.h
@@ -41,6 +41,7 @@
#include <cdf_types.h> /* For CDF_MODULE_ID... */
#include <stdarg.h> /* For va_list... */
#include <cdf_status.h>
+#include <qdf_status.h>
#include <cdf_nbuf.h>
#include <cds_packet.h>
#include <i_cdf_types.h>
diff --git a/core/cdf/src/cdf_event.c b/core/cdf/src/cdf_event.c
deleted file mode 100644
index ce39b4854636..000000000000
--- a/core/cdf/src/cdf_event.c
+++ /dev/null
@@ -1,270 +0,0 @@
-/*
- * Copyright (c) 2014-2015 The Linux Foundation. All rights reserved.
- *
- * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
- *
- *
- * Permission to use, copy, modify, and/or distribute this software for
- * any purpose with or without fee is hereby granted, provided that the
- * above copyright notice and this permission notice appear in all
- * copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
- * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/*
- * This file was originally distributed by Qualcomm Atheros, Inc.
- * under proprietary terms before Copyright ownership was assigned
- * to the Linux Foundation.
- */
-
-/**
- * DOC: cdf_event.c
- *
- * This source file contains linux specific definitions for CDF event APIs
- * The APIs mentioned in this file are used for initializing, setting,
- * resetting, destroying an event and waiting on an occurance of an event
- * among multiple events.
- */
-
-/* Include Files */
-#include "cdf_event.h"
-#include "cdf_trace.h"
-
-/* Preprocessor Definitions and Constants */
-
-/* Type Declarations */
-
-/* Global Data Definitions */
-
-/* Static Variable Definitions */
-
-/* Function Definitions and Documentation */
-
-/**
- * cdf_event_init() - initializes a CDF event
- * @event: Pointer to the opaque event object to initialize
- *
- * The cdf_event_init() function initializes the specified event. Upon
- * successful initialization, the state of the event becomes initialized
- * and not signaled.
- *
- * An event must be initialized before it may be used in any other event
- * functions.
- *
- * Attempting to initialize an already initialized event results in
- * a failure.
- *
- * Return: CDF status
- */
-CDF_STATUS cdf_event_init(cdf_event_t *event)
-{
- /* check for null pointer */
- if (NULL == event) {
- CDF_TRACE(CDF_MODULE_ID_CDF, CDF_TRACE_LEVEL_FATAL,
- "NULL event passed into %s", __func__);
- CDF_ASSERT(0);
- return CDF_STATUS_E_FAULT;
- }
-
- /* check for 'already initialized' event */
- if (LINUX_EVENT_COOKIE == event->cookie) {
- CDF_TRACE(CDF_MODULE_ID_CDF, CDF_TRACE_LEVEL_FATAL,
- "Initialized event passed into %s", __func__);
- CDF_ASSERT(0);
- return CDF_STATUS_E_BUSY;
- }
-
- /* initialize new event */
- init_completion(&event->complete);
- event->cookie = LINUX_EVENT_COOKIE;
-
- return CDF_STATUS_SUCCESS;
-}
-
-/**
- * cdf_event_set() - sets a CDF event
- * @event: The event to set to the signalled state
- *
- * The state of the specified event is set to signalled by calling
- * cdf_event_set().
- *
- * Any threads waiting on the event as a result of a cdf_event_wait() will
- * be unblocked and available to be scheduled for execution when the event
- * is signaled by a call to cdf_event_set().
- *
- *
- * Return: CDF status
- */
-
-CDF_STATUS cdf_event_set(cdf_event_t *event)
-{
- /* check for null pointer */
- if (NULL == event) {
- CDF_TRACE(CDF_MODULE_ID_CDF, CDF_TRACE_LEVEL_FATAL,
- "NULL event passed into %s", __func__);
- CDF_ASSERT(0);
- return CDF_STATUS_E_FAULT;
- }
-
- /* check if event refers to an initialized object */
- if (LINUX_EVENT_COOKIE != event->cookie) {
- CDF_TRACE(CDF_MODULE_ID_CDF, CDF_TRACE_LEVEL_FATAL,
- "Uninitialized event passed into %s", __func__);
- CDF_ASSERT(0);
- return CDF_STATUS_E_INVAL;
- }
-
- complete(&event->complete);
-
- return CDF_STATUS_SUCCESS;
-}
-
-/**
- * cdf_event_reset() - resets a CDF event
- * @event: The event to set to the NOT signalled state
- *
- * This function isn't required for Linux. Therefore, it doesn't do much.
- *
- * The state of the specified event is set to 'NOT signalled' by calling
- * cdf_event_reset(). The state of the event remains NOT signalled until an
- * explicit call to cdf_event_set().
- *
- * This function sets the event to a NOT signalled state even if the event was
- * signalled multiple times before being signaled.
- *
- *
- * Return: CDF status
- */
-CDF_STATUS cdf_event_reset(cdf_event_t *event)
-{
- /* check for null pointer */
- if (NULL == event) {
- CDF_TRACE(CDF_MODULE_ID_CDF, CDF_TRACE_LEVEL_FATAL,
- "NULL event passed into %s", __func__);
- CDF_ASSERT(0);
- return CDF_STATUS_E_FAULT;
- }
-
- /* check to make sure it is an 'already initialized' event */
- if (LINUX_EVENT_COOKIE != event->cookie) {
- CDF_TRACE(CDF_MODULE_ID_CDF, CDF_TRACE_LEVEL_FATAL,
- "Uninitialized event passed into %s", __func__);
- CDF_ASSERT(0);
- return CDF_STATUS_E_INVAL;
- }
-
- /* (re)initialize event */
- INIT_COMPLETION(event->complete);
- return CDF_STATUS_SUCCESS;
-}
-
-/**
- * cdf_event_destroy() - Destroys a CDF event
- * @event: The event object to be destroyed.
- *
- * This function doesn't do much in Linux. There is no need for the caller
- * to explicitly destroy an event after use.
- *
- * The os_event_destroy() function shall destroy the event object
- * referenced by event. After a successful return from cdf_event_destroy()
- * the event object becomes, in effect, uninitialized.
- *
- * A destroyed event object can be reinitialized using cdf_event_init();
- * the results of otherwise referencing the object after it has been destroyed
- * are undefined. Calls to CDF event functions to manipulate the lock such
- * as cdf_event_set() will fail if the event is destroyed. Therefore,
- * don't use the event after it has been destroyed until it has
- * been re-initialized.
- *
- * Return: CDF status
- */
-
-CDF_STATUS cdf_event_destroy(cdf_event_t *event)
-{
- /* check for null pointer */
- if (NULL == event) {
- CDF_TRACE(CDF_MODULE_ID_CDF, CDF_TRACE_LEVEL_FATAL,
- "NULL event passed into %s", __func__);
- CDF_ASSERT(0);
- return CDF_STATUS_E_FAULT;
- }
-
- /* check to make sure it is an 'already initialized' event */
- if (LINUX_EVENT_COOKIE != event->cookie) {
- CDF_TRACE(CDF_MODULE_ID_CDF, CDF_TRACE_LEVEL_FATAL,
- "Uninitialized event passed into %s", __func__);
- CDF_ASSERT(0);
- return CDF_STATUS_E_INVAL;
- }
-
- /* make sure nobody is waiting on the event */
- complete_all(&event->complete);
-
- /* destroy the event */
- memset(event, 0, sizeof(cdf_event_t));
-
- return CDF_STATUS_SUCCESS;
-}
-
-/**
- * cdf_wait_single_event() - Waits for a single event to be set.
- *
- * This API waits for the event to be set.
- *
- * @pEvent: Pointer to an event to wait on.
- * @timeout: Timeout value (in milliseconds). This function returns
- * if this interval elapses, regardless if any of the events have
- * been set. An input value of 0 for this timeout parameter means
- * to wait infinitely, meaning a timeout will never occur.
- *
- * Return: CDF status
- */
-CDF_STATUS cdf_wait_single_event(cdf_event_t *event, uint32_t timeout)
-{
- if (in_interrupt()) {
- CDF_TRACE(CDF_MODULE_ID_CDF, CDF_TRACE_LEVEL_FATAL,
- "%s cannot be called from interrupt context!!!",
- __func__);
- CDF_ASSERT(0);
- return CDF_STATUS_E_FAULT;
- }
-
- /* check for null pointer */
- if (NULL == event) {
- CDF_TRACE(CDF_MODULE_ID_CDF, CDF_TRACE_LEVEL_FATAL,
- "NULL event passed into %s", __func__);
- CDF_ASSERT(0);
- return CDF_STATUS_E_FAULT;
- }
-
- /* check if cookie is same as that of initialized event */
- if (LINUX_EVENT_COOKIE != event->cookie) {
- CDF_TRACE(CDF_MODULE_ID_CDF, CDF_TRACE_LEVEL_FATAL,
- "Uninitialized event passed into %s", __func__);
- CDF_ASSERT(0);
- return CDF_STATUS_E_INVAL;
- }
-
- if (timeout) {
- long ret;
- ret = wait_for_completion_timeout(&event->complete,
- msecs_to_jiffies(timeout));
- if (0 >= ret)
- return CDF_STATUS_E_TIMEOUT;
- } else {
- CDF_ASSERT(0);
- CDF_TRACE(CDF_MODULE_ID_CDF, CDF_TRACE_LEVEL_FATAL,
- "Zero timeout value passed into %s", __func__);
- return CDF_STATUS_E_FAULT;
- }
-
- return CDF_STATUS_SUCCESS;
-}
diff --git a/core/cdf/src/i_cdf_atomic.h b/core/cdf/src/i_cdf_atomic.h
index 178c3275b490..9a0f89b09547 100644
--- a/core/cdf/src/i_cdf_atomic.h
+++ b/core/cdf/src/i_cdf_atomic.h
@@ -28,6 +28,7 @@
#define I_CDF_ATOMIC_H
#include <cdf_status.h> /* CDF_STATUS */
+#include <qdf_status.h> /* QDF_STATUS */
#include <linux/atomic.h>
diff --git a/core/cdf/src/i_cdf_defer.h b/core/cdf/src/i_cdf_defer.h
index a21b618f5434..11bc076421b6 100644
--- a/core/cdf/src/i_cdf_defer.h
+++ b/core/cdf/src/i_cdf_defer.h
@@ -36,6 +36,7 @@
#endif
#include <cdf_types.h>
#include <cdf_status.h>
+#include <qdf_status.h>
#include <cdf_trace.h>
typedef struct tasklet_struct __cdf_bh_t;
diff --git a/core/cdf/src/i_cdf_event.h b/core/cdf/src/i_cdf_event.h
deleted file mode 100644
index beac5d93fd2b..000000000000
--- a/core/cdf/src/i_cdf_event.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 2014-2015 The Linux Foundation. All rights reserved.
- *
- * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
- *
- *
- * Permission to use, copy, modify, and/or distribute this software for
- * any purpose with or without fee is hereby granted, provided that the
- * above copyright notice and this permission notice appear in all
- * copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
- * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/*
- * This file was originally distributed by Qualcomm Atheros, Inc.
- * under proprietary terms before Copyright ownership was assigned
- * to the Linux Foundation.
- */
-
-#if !defined(__I_CDF_EVENT_H)
-#define __I_CDF_EVENT_H
-
-/**
- * DOC: i_cdf_event.h
- *
- * Linux-specific definitions for CDF Events
- */
-
-/* Include Files */
-#include <cdf_types.h>
-#include <linux/completion.h>
-
-/* Preprocessor definitions and constants */
-#define LINUX_EVENT_COOKIE 0x12341234
-
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0))
-#define INIT_COMPLETION(event) reinit_completion(&event)
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-/* Type declarations */
-
-typedef struct evt {
- struct completion complete;
- uint32_t cookie;
-} cdf_event_t;
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-#endif /* __I_CDF_EVENT_H */
diff --git a/core/cdf/src/i_cdf_util.h b/core/cdf/src/i_cdf_util.h
index 80ab1ae7ddf8..68977de5dc77 100644
--- a/core/cdf/src/i_cdf_util.h
+++ b/core/cdf/src/i_cdf_util.h
@@ -37,6 +37,7 @@
#include <cdf_types.h>
#include <cdf_status.h>
+#include <qdf_status.h>
#include <asm/byteorder.h>
/*
* Generic compiler-dependent macros if defined by the OS
diff --git a/core/cds/inc/cds_api.h b/core/cds/inc/cds_api.h
index 3356003e88dd..0852d199cf49 100644
--- a/core/cds/inc/cds_api.h
+++ b/core/cds/inc/cds_api.h
@@ -36,10 +36,11 @@
#include <cdf_types.h>
#include <cdf_status.h>
+#include <qdf_status.h>
#include <cdf_memory.h>
#include <cdf_list.h>
#include <cdf_trace.h>
-#include <cdf_event.h>
+#include <qdf_event.h>
#include <cdf_lock.h>
#include <cds_reg_service.h>
#include <cds_mq.h>
diff --git a/core/cds/inc/cds_crypto.h b/core/cds/inc/cds_crypto.h
index 25fbfdfd7bc7..daa01b4cbc67 100644
--- a/core/cds/inc/cds_crypto.h
+++ b/core/cds/inc/cds_crypto.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014-2015 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014-2016 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -36,10 +36,11 @@
#include <cdf_types.h>
#include <cdf_status.h>
+#include <qdf_status.h>
#include <cdf_memory.h>
#include <cdf_list.h>
#include <cdf_trace.h>
-#include <cdf_event.h>
+#include <qdf_event.h>
#include <cdf_lock.h>
#include <cds_reg_service.h>
#include <cds_mq.h>
diff --git a/core/cds/inc/cds_mq.h b/core/cds/inc/cds_mq.h
index 8f76bee22447..74b396d94a4e 100644
--- a/core/cds/inc/cds_mq.h
+++ b/core/cds/inc/cds_mq.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014-2016 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -25,7 +25,7 @@
* to the Linux Foundation.
*/
-#if !defined( __CDS_MQ_H )
+#if !defined(__CDS_MQ_H)
#define __CDS_MQ_H
/**=========================================================================
@@ -43,6 +43,7 @@
------------------------------------------------------------------------*/
#include <cdf_types.h>
#include <cdf_status.h>
+#include <qdf_status.h>
/*--------------------------------------------------------------------------
Preprocessor definitions and constants
@@ -120,24 +121,24 @@ typedef enum {
</ul>
\param msgQueueId - identifies the message queue upon which the message
- will be posted.
+ will be posted.
\param message - a pointer to a message buffer. Memory for this message
- buffer is allocated by the caller and free'd by the CDF after the
- message is posted to the message queue. If the consumer of the
- message needs anything in this message, it needs to copy the contents
- before returning from the message queue handler.
+ buffer is allocated by the caller and free'd by the CDF after the
+ message is posted to the message queue. If the consumer of the
+ message needs anything in this message, it needs to copy the contents
+ before returning from the message queue handler.
\return CDF_STATUS_SUCCESS - the message has been successfully posted
- to the message queue.
+ to the message queue.
- CDF_STATUS_E_INVAL - The value specified by msgQueueId does not
- refer to a valid Message Queue Id.
+ CDF_STATUS_E_INVAL - The value specified by msgQueueId does not
+ refer to a valid Message Queue Id.
- CDF_STATUS_E_FAULT - message is an invalid pointer.
+ CDF_STATUS_E_FAULT - message is an invalid pointer.
- CDF_STATUS_E_FAILURE - the message queue handler has reported
- an unknown failure.
+ CDF_STATUS_E_FAILURE - the message queue handler has reported
+ an unknown failure.
\sa
@@ -149,13 +150,13 @@ CDF_STATUS cds_mq_post_message(CDS_MQ_ID msgQueueId, cds_msg_t *message);
\brief cds_send_mb_message_to_mac() - post a message to a message queue
\param pBuf is a buffer allocated by caller. The actual structure varies
- base on message type
+ base on message type
\return CDF_STATUS_SUCCESS - the message has been successfully posted
- to the message queue.
+ to the message queue.
- CDF_STATUS_E_FAILURE - the message queue handler has reported
- an unknown failure.
+ CDF_STATUS_E_FAILURE - the message queue handler has reported
+ an unknown failure.
\sa
--------------------------------------------------------------------------*/
diff --git a/core/cds/inc/cds_packet.h b/core/cds/inc/cds_packet.h
index 1fb7de36ab25..14940f3a0de3 100644
--- a/core/cds/inc/cds_packet.h
+++ b/core/cds/inc/cds_packet.h
@@ -25,7 +25,7 @@
* to the Linux Foundation.
*/
-#if !defined( __CDS_PKT_H )
+#if !defined(__CDS_PKT_H)
#define __CDS_PKT_H
/**=========================================================================
@@ -43,6 +43,7 @@
------------------------------------------------------------------------*/
#include <cdf_types.h>
#include <cdf_status.h>
+#include <qdf_status.h>
/*--------------------------------------------------------------------------
Preprocessor definitions and constants
diff --git a/core/cds/inc/cds_sched.h b/core/cds/inc/cds_sched.h
index 0d8d5003c81c..8186e50e91e8 100644
--- a/core/cds/inc/cds_sched.h
+++ b/core/cds/inc/cds_sched.h
@@ -25,7 +25,7 @@
* to the Linux Foundation.
*/
-#if !defined( __CDS_SCHED_H )
+#if !defined(__CDS_SCHED_H)
#define __CDS_SCHED_H
/**=========================================================================
@@ -39,7 +39,7 @@
/*--------------------------------------------------------------------------
Include Files
------------------------------------------------------------------------*/
-#include <cdf_event.h>
+#include <qdf_event.h>
#include "i_cdf_types.h"
#include <linux/wait.h>
#if defined(WLAN_OPEN_SOURCE) && defined(CONFIG_HAS_WAKELOCK)
@@ -250,11 +250,11 @@ typedef struct _cds_context_type {
/* MAC Module Context */
void *pMACContext;
- cdf_event_t ProbeEvent;
+ qdf_event_t ProbeEvent;
uint32_t driver_state;
- cdf_event_t wmaCompleteEvent;
+ qdf_event_t wmaCompleteEvent;
/* WMA Context */
void *pWMAContext;
@@ -284,7 +284,7 @@ typedef struct _cds_context_type {
uint32_t fw_debug_log_level;
struct cds_log_complete log_complete;
cdf_spinlock_t bug_report_lock;
- cdf_event_t connection_update_done_evt;
+ qdf_event_t connection_update_done_evt;
cdf_mutex_t cdf_conc_list_lock;
} cds_context_type, *p_cds_contextType;
@@ -372,22 +372,21 @@ void cds_free_ol_rx_pkt_freeq(p_cds_sched_context pSchedContext);
\param p_cds_context - pointer to the global CDF Context
\param p_cds_sched_context - pointer to a previously allocated buffer big
- enough to hold a scheduler context.
- \
+ enough to hold a scheduler context.
\return CDF_STATUS_SUCCESS - Scheduler was successfully initialized and
- is ready to be used.
+ is ready to be used.
- CDF_STATUS_E_RESOURCES - System resources (other than memory)
- are unavailable to initilize the scheduler
+ CDF_STATUS_E_RESOURCES - System resources (other than memory)
+ are unavailable to initilize the scheduler
- CDF_STATUS_E_NOMEM - insufficient memory exists to initialize
- the scheduler
+ CDF_STATUS_E_NOMEM - insufficient memory exists to initialize
+ the scheduler
- CDF_STATUS_E_INVAL - Invalid parameter passed to the scheduler Open
- function
+ CDF_STATUS_E_INVAL - Invalid parameter passed to the scheduler Open
+ function
- CDF_STATUS_E_FAILURE - Failure to initialize the scheduler/
+ CDF_STATUS_E_FAILURE - Failure to initialize the scheduler/
\sa cds_sched_open()
@@ -411,12 +410,12 @@ CDF_STATUS cds_sched_open(void *p_cds_context,
\param p_cds_context - pointer to the global CDF Context
\return CDF_STATUS_SUCCESS - Scheduler was successfully initialized and
- is ready to be used.
+ is ready to be used.
- CDF_STATUS_E_INVAL - Invalid parameter passed to the scheduler Open
- function
+ CDF_STATUS_E_INVAL - Invalid parameter passed to the scheduler Open
+ function
- CDF_STATUS_E_FAILURE - Failure to initialize the scheduler/
+ CDF_STATUS_E_FAILURE - Failure to initialize the scheduler/
\sa cds_sched_close()
diff --git a/core/cds/inc/cds_utils.h b/core/cds/inc/cds_utils.h
index 5e4b2f61d6ea..3604b754c83d 100644
--- a/core/cds/inc/cds_utils.h
+++ b/core/cds/inc/cds_utils.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014-2015 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014-2016 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -25,7 +25,7 @@
* to the Linux Foundation.
*/
-#if !defined( __CDS_UTILS_H )
+#if !defined(__CDS_UTILS_H)
#define __CDS_UTILS_H
/**=========================================================================
@@ -43,7 +43,8 @@
------------------------------------------------------------------------*/
#include <cdf_types.h>
#include <cdf_status.h>
-#include <cdf_event.h>
+#include <qdf_status.h>
+#include <qdf_event.h>
#include "ani_global.h"
/*--------------------------------------------------------------------------
@@ -132,9 +133,9 @@ CDF_STATUS cds_rand_get_bytes(uint32_t handle, uint8_t *pbBuf,
*
*/
CDF_STATUS cds_sha1_hmac_str(uint32_t cryptHandle, /* Handle */
- uint8_t * text, /* pointer to data stream */
+ uint8_t *text, /* pointer to data stream */
uint32_t textLen, /* length of data stream */
- uint8_t * key, /* pointer to authentication key */
+ uint8_t *key, /* pointer to authentication key */
uint32_t keyLen, /* length of authentication key */
uint8_t digest[CDS_DIGEST_SHA1_SIZE]); /* caller digest to be filled in */
@@ -161,9 +162,9 @@ CDF_STATUS cds_sha1_hmac_str(uint32_t cryptHandle, /* Handle */
*
*/
CDF_STATUS cds_md5_hmac_str(uint32_t cryptHandle, /* Handle */
- uint8_t * text, /* pointer to data stream */
+ uint8_t *text, /* pointer to data stream */
uint32_t textLen, /* length of data stream */
- uint8_t * key, /* pointer to authentication key */
+ uint8_t *key, /* pointer to authentication key */
uint32_t keyLen, /* length of authentication key */
uint8_t digest[CDS_DIGEST_MD5_SIZE]); /* caller digest to be filled in */
diff --git a/core/cds/src/cds_api.c b/core/cds/src/cds_api.c
index 6e3f9ffa0568..9d1165720d5b 100644
--- a/core/cds/src/cds_api.c
+++ b/core/cds/src/cds_api.c
@@ -194,14 +194,14 @@ CDF_STATUS cds_open(void)
cds_init_log_completion();
/* Initialize the probe event */
- if (cdf_event_init(&gp_cds_context->ProbeEvent) != CDF_STATUS_SUCCESS) {
+ if (qdf_event_create(&gp_cds_context->ProbeEvent) != QDF_STATUS_SUCCESS) {
CDF_TRACE(CDF_MODULE_ID_CDF, CDF_TRACE_LEVEL_FATAL,
"%s: Unable to init probeEvent", __func__);
CDF_ASSERT(0);
return CDF_STATUS_E_FAILURE;
}
- if (cdf_event_init(&(gp_cds_context->wmaCompleteEvent)) !=
- CDF_STATUS_SUCCESS) {
+ if (qdf_event_create(&(gp_cds_context->wmaCompleteEvent)) !=
+ QDF_STATUS_SUCCESS) {
CDF_TRACE(CDF_MODULE_ID_CDF, CDF_TRACE_LEVEL_FATAL,
"%s: Unable to init wmaCompleteEvent", __func__);
CDF_ASSERT(0);
@@ -470,10 +470,10 @@ err_msg_queue:
cds_mq_deinit(&gp_cds_context->freeVosMq);
err_wma_complete_event:
- cdf_event_destroy(&gp_cds_context->wmaCompleteEvent);
+ qdf_event_destroy(&gp_cds_context->wmaCompleteEvent);
err_probe_event:
- cdf_event_destroy(&gp_cds_context->ProbeEvent);
+ qdf_event_destroy(&gp_cds_context->ProbeEvent);
return CDF_STATUS_E_FAILURE;
} /* cds_open() */
@@ -487,6 +487,7 @@ err_probe_event:
CDF_STATUS cds_pre_enable(v_CONTEXT_t cds_context)
{
CDF_STATUS cdf_status = CDF_STATUS_SUCCESS;
+ QDF_STATUS qdf_status = QDF_STATUS_SUCCESS;
p_cds_contextType p_cds_context = (p_cds_contextType) cds_context;
void *scn;
CDF_TRACE(CDF_MODULE_ID_SYS, CDF_TRACE_LEVEL_INFO, "cds prestart");
@@ -520,7 +521,7 @@ CDF_STATUS cds_pre_enable(v_CONTEXT_t cds_context)
}
/* Reset wma wait event */
- cdf_event_reset(&gp_cds_context->wmaCompleteEvent);
+ qdf_event_reset(&gp_cds_context->wmaCompleteEvent);
/*call WMA pre start */
cdf_status = wma_pre_start(gp_cds_context);
@@ -532,10 +533,10 @@ CDF_STATUS cds_pre_enable(v_CONTEXT_t cds_context)
}
/* Need to update time out of complete */
- cdf_status = cdf_wait_single_event(&gp_cds_context->wmaCompleteEvent,
+ qdf_status = qdf_wait_single_event(&gp_cds_context->wmaCompleteEvent,
CDS_WMA_TIMEOUT);
- if (cdf_status != CDF_STATUS_SUCCESS) {
- if (cdf_status == CDF_STATUS_E_TIMEOUT) {
+ if (qdf_status != QDF_STATUS_SUCCESS) {
+ if (qdf_status == QDF_STATUS_E_TIMEOUT) {
CDF_TRACE(CDF_MODULE_ID_CDF, CDF_TRACE_LEVEL_ERROR,
"%s: Timeout occurred before WMA complete",
__func__);
@@ -593,6 +594,7 @@ CDF_STATUS cds_pre_enable(v_CONTEXT_t cds_context)
CDF_STATUS cds_enable(v_CONTEXT_t cds_context)
{
CDF_STATUS cdf_status = CDF_STATUS_SUCCESS;
+ QDF_STATUS qdf_status = QDF_STATUS_SUCCESS;
tSirRetStatus sirStatus = eSIR_SUCCESS;
p_cds_contextType p_cds_context = (p_cds_contextType) cds_context;
tHalMacStartParameters halStartParams;
@@ -679,7 +681,7 @@ err_mac_stop:
mac_stop(p_cds_context->pMACContext, HAL_STOP_TYPE_SYS_RESET);
err_wma_stop:
- cdf_event_reset(&(gp_cds_context->wmaCompleteEvent));
+ qdf_event_reset(&(gp_cds_context->wmaCompleteEvent));
cdf_status = wma_stop(p_cds_context, HAL_STOP_TYPE_RF_KILL);
if (!CDF_IS_STATUS_SUCCESS(cdf_status)) {
CDF_TRACE(CDF_MODULE_ID_CDF, CDF_TRACE_LEVEL_ERROR,
@@ -687,11 +689,11 @@ err_wma_stop:
CDF_ASSERT(CDF_IS_STATUS_SUCCESS(cdf_status));
wma_setneedshutdown(cds_context);
} else {
- cdf_status =
- cdf_wait_single_event(&(gp_cds_context->wmaCompleteEvent),
+ qdf_status =
+ qdf_wait_single_event(&(gp_cds_context->wmaCompleteEvent),
CDS_WMA_TIMEOUT);
- if (cdf_status != CDF_STATUS_SUCCESS) {
- if (cdf_status == CDF_STATUS_E_TIMEOUT) {
+ if (qdf_status != QDF_STATUS_SUCCESS) {
+ if (qdf_status == QDF_STATUS_E_TIMEOUT) {
CDF_TRACE(CDF_MODULE_ID_CDF,
CDF_TRACE_LEVEL_FATAL,
"%s: Timeout occurred before WMA_stop complete",
@@ -724,7 +726,7 @@ CDF_STATUS cds_disable(v_CONTEXT_t cds_context)
* pending responses will not be handled during uninitialization of
* WLAN driver
*/
- cdf_event_reset(&(gp_cds_context->wmaCompleteEvent));
+ qdf_event_reset(&(gp_cds_context->wmaCompleteEvent));
cdf_status = wma_stop(cds_context, HAL_STOP_TYPE_RF_KILL);
@@ -758,6 +760,7 @@ CDF_STATUS cds_disable(v_CONTEXT_t cds_context)
CDF_STATUS cds_close(v_CONTEXT_t cds_context)
{
CDF_STATUS cdf_status;
+ QDF_STATUS qdf_status;
cdf_status = wma_wmi_work_close(cds_context);
if (!CDF_IS_STATUS_SUCCESS(cdf_status)) {
@@ -813,18 +816,18 @@ CDF_STATUS cds_close(v_CONTEXT_t cds_context)
cds_mq_deinit(&((p_cds_contextType) cds_context)->freeVosMq);
- cdf_status = cdf_event_destroy(&gp_cds_context->wmaCompleteEvent);
- if (!CDF_IS_STATUS_SUCCESS(cdf_status)) {
+ qdf_status = qdf_event_destroy(&gp_cds_context->wmaCompleteEvent);
+ if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
CDF_TRACE(CDF_MODULE_ID_CDF, CDF_TRACE_LEVEL_ERROR,
"%s: failed to destroy wmaCompleteEvent", __func__);
- CDF_ASSERT(CDF_IS_STATUS_SUCCESS(cdf_status));
+ CDF_ASSERT(QDF_IS_STATUS_SUCCESS(qdf_status));
}
- cdf_status = cdf_event_destroy(&gp_cds_context->ProbeEvent);
- if (!CDF_IS_STATUS_SUCCESS(cdf_status)) {
+ qdf_status = qdf_event_destroy(&gp_cds_context->ProbeEvent);
+ if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
CDF_TRACE(CDF_MODULE_ID_CDF, CDF_TRACE_LEVEL_ERROR,
"%s: failed to destroy ProbeEvent", __func__);
- CDF_ASSERT(CDF_IS_STATUS_SUCCESS(cdf_status));
+ CDF_ASSERT(QDF_IS_STATUS_SUCCESS(qdf_status));
}
cds_deinit_log_completion();
@@ -1357,9 +1360,9 @@ void cds_sys_probe_thread_cback(void *pUserData)
return;
}
- if (cdf_event_set(&gp_cds_context->ProbeEvent) != CDF_STATUS_SUCCESS) {
+ if (qdf_event_set(&gp_cds_context->ProbeEvent) != QDF_STATUS_SUCCESS) {
CDF_TRACE(CDF_MODULE_ID_CDF, CDF_TRACE_LEVEL_ERROR,
- "%s: cdf_event_set failed", __func__);
+ "%s: qdf_event_set failed", __func__);
return;
}
} /* cds_sys_probe_thread_cback() */
@@ -1378,10 +1381,10 @@ void cds_wma_complete_cback(void *pUserData)
return;
}
- if (cdf_event_set(&gp_cds_context->wmaCompleteEvent) !=
- CDF_STATUS_SUCCESS) {
+ if (qdf_event_set(&gp_cds_context->wmaCompleteEvent) !=
+ QDF_STATUS_SUCCESS) {
CDF_TRACE(CDF_MODULE_ID_CDF, CDF_TRACE_LEVEL_ERROR,
- "%s: cdf_event_set failed", __func__);
+ "%s: qdf_event_set failed", __func__);
return;
}
} /* cds_wma_complete_cback() */
@@ -1430,6 +1433,7 @@ void cds_core_return_msg(void *pVContext, p_cds_msg_wrapper pMsgWrapper)
CDF_STATUS cds_shutdown(v_CONTEXT_t cds_context)
{
CDF_STATUS cdf_status;
+ QDF_STATUS qdf_status;
tpAniSirGlobal pmac = (((p_cds_contextType)cds_context)->pMACContext);
ol_txrx_pdev_detach(gp_cds_context->pdev_txrx_ctx, 1);
@@ -1495,18 +1499,18 @@ CDF_STATUS cds_shutdown(v_CONTEXT_t cds_context)
cds_mq_deinit(&((p_cds_contextType) cds_context)->freeVosMq);
- cdf_status = cdf_event_destroy(&gp_cds_context->wmaCompleteEvent);
- if (!CDF_IS_STATUS_SUCCESS(cdf_status)) {
+ qdf_status = qdf_event_destroy(&gp_cds_context->wmaCompleteEvent);
+ if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
CDF_TRACE(CDF_MODULE_ID_CDF, CDF_TRACE_LEVEL_ERROR,
"%s: failed to destroy wmaCompleteEvent", __func__);
- CDF_ASSERT(CDF_IS_STATUS_SUCCESS(cdf_status));
+ CDF_ASSERT(QDF_IS_STATUS_SUCCESS(qdf_status));
}
- cdf_status = cdf_event_destroy(&gp_cds_context->ProbeEvent);
- if (!CDF_IS_STATUS_SUCCESS(cdf_status)) {
+ qdf_status = qdf_event_destroy(&gp_cds_context->ProbeEvent);
+ if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
CDF_TRACE(CDF_MODULE_ID_CDF, CDF_TRACE_LEVEL_ERROR,
"%s: failed to destroy ProbeEvent", __func__);
- CDF_ASSERT(CDF_IS_STATUS_SUCCESS(cdf_status));
+ CDF_ASSERT(QDF_IS_STATUS_SUCCESS(qdf_status));
}
return CDF_STATUS_SUCCESS;
@@ -1615,7 +1619,7 @@ bool cds_is_packet_log_enabled(void)
void cds_trigger_recovery(void)
{
tp_wma_handle wma_handle = cds_get_context(CDF_MODULE_ID_WMA);
- CDF_STATUS status = CDF_STATUS_SUCCESS;
+ QDF_STATUS status = QDF_STATUS_SUCCESS;
if (!wma_handle) {
CDF_TRACE(CDF_MODULE_ID_CDF, CDF_TRACE_LEVEL_ERROR,
@@ -1625,10 +1629,10 @@ void cds_trigger_recovery(void)
wma_crash_inject(wma_handle, RECOVERY_SIM_SELF_RECOVERY, 0);
- status = cdf_wait_single_event(&wma_handle->recovery_event,
+ status = qdf_wait_single_event(&wma_handle->recovery_event,
WMA_CRASH_INJECT_TIMEOUT);
- if (CDF_STATUS_SUCCESS != status) {
+ if (QDF_STATUS_SUCCESS != status) {
CDF_TRACE(CDF_MODULE_ID_CDF, CDF_TRACE_LEVEL_ERROR,
"CRASH_INJECT command is timed out!");
#ifdef CONFIG_CNSS
diff --git a/core/cds/src/cds_concurrency.c b/core/cds/src/cds_concurrency.c
index 39b2f0a1cb30..a7b62e7e9040 100644
--- a/core/cds/src/cds_concurrency.c
+++ b/core/cds/src/cds_concurrency.c
@@ -7262,6 +7262,7 @@ void cds_restart_sap(hdd_adapter_t *ap_adapter)
hdd_ap_ctx_t *hdd_ap_ctx;
hdd_hostapd_state_t *hostapd_state;
CDF_STATUS cdf_status;
+ QDF_STATUS qdf_status;
hdd_context_t *hdd_ctx = WLAN_HDD_GET_CTX(ap_adapter);
#ifdef CFG80211_DEL_STA_V2
struct tagCsrDelStaParams delStaParams;
@@ -7288,14 +7289,14 @@ void cds_restart_sap(hdd_adapter_t *ap_adapter)
#endif
hdd_cleanup_actionframe(hdd_ctx, ap_adapter);
hostapd_state = WLAN_HDD_GET_HOSTAP_STATE_PTR(ap_adapter);
- cdf_event_reset(&hostapd_state->cdf_stop_bss_event);
+ qdf_event_reset(&hostapd_state->cdf_stop_bss_event);
if (CDF_STATUS_SUCCESS == wlansap_stop_bss(sap_ctx)) {
- cdf_status =
- cdf_wait_single_event(&hostapd_state->
+ qdf_status =
+ qdf_wait_single_event(&hostapd_state->
cdf_stop_bss_event,
BSS_WAIT_TIMEOUT);
- if (!CDF_IS_STATUS_SUCCESS(cdf_status)) {
+ if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
cds_err("SAP Stop Failed");
goto end;
}
@@ -7320,10 +7321,10 @@ void cds_restart_sap(hdd_adapter_t *ap_adapter)
}
cds_info("Waiting for SAP to start");
- cdf_status =
- cdf_wait_single_event(&hostapd_state->cdf_event,
+ qdf_status =
+ qdf_wait_single_event(&hostapd_state->cdf_event,
BSS_WAIT_TIMEOUT);
- if (!CDF_IS_STATUS_SUCCESS(cdf_status)) {
+ if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
cds_err("SAP Start failed");
goto end;
}
@@ -7743,7 +7744,7 @@ bool cds_is_sta_active_connection_exists(void)
*/
CDF_STATUS cdf_wait_for_connection_update(void)
{
- CDF_STATUS status;
+ QDF_STATUS status;
p_cds_contextType cds_context;
cds_context = cds_get_global_context();
@@ -7752,11 +7753,11 @@ CDF_STATUS cdf_wait_for_connection_update(void)
return CDF_STATUS_E_FAILURE;
}
- status = cdf_wait_single_event(
+ status = qdf_wait_single_event(
&cds_context->connection_update_done_evt,
CONNECTION_UPDATE_TIMEOUT);
- if (!CDF_IS_STATUS_SUCCESS(status)) {
+ if (!QDF_IS_STATUS_SUCCESS(status)) {
cds_err("wait for event failed");
return CDF_STATUS_E_FAILURE;
}
@@ -7773,7 +7774,7 @@ CDF_STATUS cdf_wait_for_connection_update(void)
*/
CDF_STATUS cdf_reset_connection_update(void)
{
- CDF_STATUS status;
+ QDF_STATUS status;
p_cds_contextType cds_context;
cds_context = cds_get_global_context();
@@ -7782,9 +7783,9 @@ CDF_STATUS cdf_reset_connection_update(void)
return CDF_STATUS_E_FAILURE;
}
- status = cdf_event_reset(&cds_context->connection_update_done_evt);
+ status = qdf_event_reset(&cds_context->connection_update_done_evt);
- if (!CDF_IS_STATUS_SUCCESS(status)) {
+ if (!QDF_IS_STATUS_SUCCESS(status)) {
cds_err("clear event failed");
return CDF_STATUS_E_FAILURE;
}
@@ -7801,23 +7802,23 @@ CDF_STATUS cdf_reset_connection_update(void)
*/
CDF_STATUS cdf_set_connection_update(void)
{
- CDF_STATUS status;
+ QDF_STATUS status;
p_cds_contextType cds_context;
cds_context = cds_get_global_context();
if (!cds_context) {
cds_err("Invalid CDS context");
- return CDF_STATUS_E_FAILURE;
+ return QDF_STATUS_E_FAILURE;
}
- status = cdf_event_set(&cds_context->connection_update_done_evt);
+ status = qdf_event_set(&cds_context->connection_update_done_evt);
- if (!CDF_IS_STATUS_SUCCESS(status)) {
+ if (!QDF_IS_STATUS_SUCCESS(status)) {
cds_err("set event failed");
- return CDF_STATUS_E_FAILURE;
+ return QDF_STATUS_E_FAILURE;
}
- return CDF_STATUS_SUCCESS;
+ return QDF_STATUS_SUCCESS;
}
/**
@@ -7829,7 +7830,7 @@ CDF_STATUS cdf_set_connection_update(void)
*/
CDF_STATUS cdf_init_connection_update(void)
{
- CDF_STATUS status;
+ QDF_STATUS qdf_status;
p_cds_contextType cds_context;
cds_context = cds_get_global_context();
@@ -7838,9 +7839,9 @@ CDF_STATUS cdf_init_connection_update(void)
return CDF_STATUS_E_FAILURE;
}
- status = cdf_event_init(&cds_context->connection_update_done_evt);
+ qdf_status = qdf_event_create(&cds_context->connection_update_done_evt);
- if (!CDF_IS_STATUS_SUCCESS(status)) {
+ if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
cds_err("init event failed");
return CDF_STATUS_E_FAILURE;
}
diff --git a/core/dp/txrx/ol_txrx.c b/core/dp/txrx/ol_txrx.c
index ef86e3abb5f4..6fd096a8b528 100644
--- a/core/dp/txrx/ol_txrx.c
+++ b/core/dp/txrx/ol_txrx.c
@@ -1332,7 +1332,7 @@ ol_txrx_peer_attach(ol_txrx_pdev_handle pdev,
peer_mac_addr[4], peer_mac_addr[5]);
if (cdf_atomic_read(&temp_peer->delete_in_progress)) {
vdev->wait_on_peer_id = temp_peer->local_id;
- cdf_event_init(&vdev->wait_delete_comp);
+ qdf_event_create(&vdev->wait_delete_comp);
wait_on_deletion = true;
} else {
cdf_spin_unlock_bh(&pdev->peer_ref_mutex);
@@ -1344,7 +1344,7 @@ ol_txrx_peer_attach(ol_txrx_pdev_handle pdev,
if (wait_on_deletion) {
/* wait for peer deletion */
- rc = cdf_wait_single_event(&vdev->wait_delete_comp,
+ rc = qdf_wait_single_event(&vdev->wait_delete_comp,
cdf_system_msecs_to_ticks(PEER_DELETION_TIMEOUT));
if (!rc) {
TXRX_PRINT(TXRX_PRINT_LEVEL_ERR,
@@ -1729,7 +1729,7 @@ void ol_txrx_peer_unref_delete(ol_txrx_peer_handle peer)
* with registered peer id.
*/
if (peer_id == vdev->wait_on_peer_id) {
- cdf_event_set(&vdev->wait_delete_comp);
+ qdf_event_set(&vdev->wait_delete_comp);
vdev->wait_on_peer_id = OL_TXRX_INVALID_LOCAL_PEER_ID;
}
diff --git a/core/dp/txrx/ol_txrx_types.h b/core/dp/txrx/ol_txrx_types.h
index 3fa183ee1921..da06c7ded089 100644
--- a/core/dp/txrx/ol_txrx_types.h
+++ b/core/dp/txrx/ol_txrx_types.h
@@ -849,7 +849,7 @@ struct ol_txrx_vdev_t {
ol_txrx_tx_flow_control_fp osif_flow_control_cb;
void *osif_fc_ctx;
uint16_t wait_on_peer_id;
- cdf_event_t wait_delete_comp;
+ qdf_event_t wait_delete_comp;
#if defined(FEATURE_TSO)
struct {
int pool_elems; /* total number of elements in the pool */
diff --git a/core/hdd/inc/wlan_hdd_ftm.h b/core/hdd/inc/wlan_hdd_ftm.h
index c9ed3557052c..0571dc5b95bc 100644
--- a/core/hdd/inc/wlan_hdd_ftm.h
+++ b/core/hdd/inc/wlan_hdd_ftm.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2015 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2016 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -35,6 +35,7 @@
*/
#include "cdf_status.h"
+#include "qdf_status.h"
#include "cds_mq.h"
#include "cds_api.h"
#include "msg.h"
diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h
index 6eca6692ecf3..57139a07c97d 100644
--- a/core/hdd/inc/wlan_hdd_main.h
+++ b/core/hdd/inc/wlan_hdd_main.h
@@ -399,7 +399,7 @@ typedef enum {
typedef struct roaming_info_s {
HDD_ROAM_STATE roamingState;
- cdf_event_t roamingEvent;
+ qdf_event_t roamingEvent;
tSirMacAddr bssid;
tSirMacAddr peerMac;
@@ -672,8 +672,8 @@ struct hdd_station_ctx {
#define BSS_START 1
typedef struct hdd_hostapd_state_s {
int bssState;
- cdf_event_t cdf_event;
- cdf_event_t cdf_stop_bss_event;
+ qdf_event_t cdf_event;
+ qdf_event_t cdf_stop_bss_event;
CDF_STATUS cdf_status;
bool bCommit;
diff --git a/core/hdd/inc/wlan_hdd_wext.h b/core/hdd/inc/wlan_hdd_wext.h
index 428e4f76160c..ca84c666724b 100644
--- a/core/hdd/inc/wlan_hdd_wext.h
+++ b/core/hdd/inc/wlan_hdd_wext.h
@@ -34,7 +34,7 @@
#include <linux/wireless.h>
#include <net/iw_handler.h>
#include <linux/timer.h>
-#include "cdf_event.h"
+#include "qdf_event.h"
/*
* order of parameters in addTs private ioctl
@@ -250,9 +250,9 @@ typedef struct hdd_wext_state_s {
int32_t authKeyMgmt;
/* cdf event */
- cdf_event_t hdd_cdf_event;
+ qdf_event_t hdd_cdf_event;
- cdf_event_t scanevent;
+ qdf_event_t scanevent;
/**Counter measure state, Started/Stopped*/
bool mTKIPCounterMeasures;
diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c
index 886fd3547396..018e3b58ae0f 100644
--- a/core/hdd/src/wlan_hdd_cfg80211.c
+++ b/core/hdd/src/wlan_hdd_cfg80211.c
@@ -9332,8 +9332,7 @@ static int __wlan_hdd_cfg80211_join_ibss(struct wiphy *wiphy,
return status;
if (NULL !=
- params->chandef.chan)
- {
+ params->chandef.chan) {
uint32_t numChans = WNI_CFG_VALID_CHANNEL_LIST_LEN;
uint8_t validChan[WNI_CFG_VALID_CHANNEL_LIST_LEN];
tHalHandle hHal = WLAN_HDD_GET_HAL_CTX(pAdapter);
@@ -9831,6 +9830,7 @@ int __wlan_hdd_cfg80211_del_station(struct wiphy *wiphy,
hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev);
hdd_context_t *pHddCtx;
CDF_STATUS cdf_status = CDF_STATUS_E_FAILURE;
+ QDF_STATUS qdf_status = QDF_STATUS_E_FAILURE;
hdd_hostapd_state_t *hapd_state;
int status;
uint8_t staId;
@@ -9892,7 +9892,7 @@ int __wlan_hdd_cfg80211_del_station(struct wiphy *wiphy,
DFS_CAC_IN_PROGRESS)
goto fn_end;
- cdf_event_reset(&hapd_state->cdf_event);
+ qdf_event_reset(&hapd_state->cdf_event);
hdd_softap_sta_disassoc(pAdapter,
mac);
cdf_status =
@@ -9901,12 +9901,12 @@ int __wlan_hdd_cfg80211_del_station(struct wiphy *wiphy,
if (CDF_IS_STATUS_SUCCESS(cdf_status)) {
pAdapter->aStaInfo[i].
isDeauthInProgress = true;
- cdf_status =
- cdf_wait_single_event(
+ qdf_status =
+ qdf_wait_single_event(
&hapd_state->cdf_event,
1000);
- if (!CDF_IS_STATUS_SUCCESS(
- cdf_status))
+ if (!QDF_IS_STATUS_SUCCESS(
+ qdf_status))
hddLog(LOGE,
"%s: Deauth wait time expired",
__func__);
@@ -9956,7 +9956,7 @@ int __wlan_hdd_cfg80211_del_station(struct wiphy *wiphy,
if (pHddCtx->dev_dfs_cac_status == DFS_CAC_IN_PROGRESS)
goto fn_end;
- cdf_event_reset(&hapd_state->cdf_event);
+ qdf_event_reset(&hapd_state->cdf_event);
hdd_softap_sta_disassoc(pAdapter, mac);
cdf_status = hdd_softap_sta_deauth(pAdapter,
pDelStaParams);
@@ -9969,10 +9969,10 @@ int __wlan_hdd_cfg80211_del_station(struct wiphy *wiphy,
MAC_ADDR_ARRAY(mac));
return -ENOENT;
} else {
- cdf_status = cdf_wait_single_event(
+ qdf_status = qdf_wait_single_event(
&hapd_state->cdf_event,
1000);
- if (!CDF_IS_STATUS_SUCCESS(cdf_status))
+ if (!QDF_IS_STATUS_SUCCESS(qdf_status))
hddLog(LOGE,
"%s: Deauth wait time expired",
__func__);
diff --git a/core/hdd/src/wlan_hdd_driver_ops.c b/core/hdd/src/wlan_hdd_driver_ops.c
index 85abb7cf97de..c66dcbbfe2c9 100644
--- a/core/hdd/src/wlan_hdd_driver_ops.c
+++ b/core/hdd/src/wlan_hdd_driver_ops.c
@@ -39,6 +39,7 @@
#endif /* HIF_PCI */
#include "cds_api.h"
#include "cdf_status.h"
+#include "qdf_status.h"
#include "cdf_lock.h"
#include "cds_sched.h"
#include "osdep.h"
diff --git a/core/hdd/src/wlan_hdd_ftm.c b/core/hdd/src/wlan_hdd_ftm.c
index 4cd57dce2982..65585520d064 100644
--- a/core/hdd/src/wlan_hdd_ftm.c
+++ b/core/hdd/src/wlan_hdd_ftm.c
@@ -195,15 +195,15 @@ static CDF_STATUS wlan_ftm_cds_open(v_CONTEXT_t p_cds_context,
}
/* Initialize the probe event */
- if (cdf_event_init(&gp_cds_context->ProbeEvent) != CDF_STATUS_SUCCESS) {
+ if (qdf_event_create(&gp_cds_context->ProbeEvent) != QDF_STATUS_SUCCESS) {
CDF_TRACE(CDF_MODULE_ID_CDF, CDF_TRACE_LEVEL_ERROR,
"%s: Unable to init probeEvent", __func__);
CDF_ASSERT(0);
return CDF_STATUS_E_FAILURE;
}
- if (cdf_event_init(&(gp_cds_context->wmaCompleteEvent)) !=
- CDF_STATUS_SUCCESS) {
+ if (qdf_event_create(&(gp_cds_context->wmaCompleteEvent)) !=
+ QDF_STATUS_SUCCESS) {
CDF_TRACE(CDF_MODULE_ID_CDF, CDF_TRACE_LEVEL_ERROR,
"%s: Unable to init wmaCompleteEvent", __func__);
CDF_ASSERT(0);
@@ -392,10 +392,10 @@ err_msg_queue:
cds_mq_deinit(&gp_cds_context->freeVosMq);
err_wma_complete_event:
- cdf_event_destroy(&gp_cds_context->wmaCompleteEvent);
+ qdf_event_destroy(&gp_cds_context->wmaCompleteEvent);
err_probe_event:
- cdf_event_destroy(&gp_cds_context->ProbeEvent);
+ qdf_event_destroy(&gp_cds_context->ProbeEvent);
return CDF_STATUS_E_FAILURE;
@@ -412,6 +412,7 @@ err_probe_event:
static CDF_STATUS wlan_ftm_cds_close(v_CONTEXT_t cds_context)
{
CDF_STATUS cdf_status;
+ QDF_STATUS qdf_status;
p_cds_contextType gp_cds_context = (p_cds_contextType) cds_context;
#ifndef QCA_WIFI_FTM
@@ -457,20 +458,20 @@ static CDF_STATUS wlan_ftm_cds_close(v_CONTEXT_t cds_context)
cds_mq_deinit(&((p_cds_contextType) cds_context)->freeVosMq);
- cdf_status = cdf_event_destroy(&gp_cds_context->ProbeEvent);
- if (!CDF_IS_STATUS_SUCCESS(cdf_status)) {
+ qdf_status = qdf_event_destroy(&gp_cds_context->ProbeEvent);
+ if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
CDF_TRACE(CDF_MODULE_ID_CDF, CDF_TRACE_LEVEL_ERROR,
"%s: Failed to destroy ProbeEvent %d", __func__,
- cdf_status);
- CDF_ASSERT(CDF_IS_STATUS_SUCCESS(cdf_status));
+ qdf_status);
+ CDF_ASSERT(QDF_IS_STATUS_SUCCESS(qdf_status));
}
- cdf_status = cdf_event_destroy(&gp_cds_context->wmaCompleteEvent);
- if (!CDF_IS_STATUS_SUCCESS(cdf_status)) {
+ qdf_status = qdf_event_destroy(&gp_cds_context->wmaCompleteEvent);
+ if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
CDF_TRACE(CDF_MODULE_ID_CDF, CDF_TRACE_LEVEL_ERROR,
"%s: Failed to destroy wmaCompleteEvent %d", __func__,
- cdf_status);
- CDF_ASSERT(CDF_IS_STATUS_SUCCESS(cdf_status));
+ qdf_status);
+ CDF_ASSERT(QDF_IS_STATUS_SUCCESS(qdf_status));
}
return CDF_STATUS_SUCCESS;
@@ -489,6 +490,7 @@ static CDF_STATUS wlan_ftm_cds_close(v_CONTEXT_t cds_context)
static CDF_STATUS cds_ftm_pre_start(v_CONTEXT_t cds_context)
{
CDF_STATUS vStatus = CDF_STATUS_SUCCESS;
+ QDF_STATUS qdf_status = QDF_STATUS_SUCCESS;
p_cds_contextType p_cds_context = (p_cds_contextType) cds_context;
#if defined(QCA_WIFI_FTM)
p_cds_contextType gp_cds_context =
@@ -504,7 +506,7 @@ static CDF_STATUS cds_ftm_pre_start(v_CONTEXT_t cds_context)
}
/* Reset WMA wait event */
- cdf_event_reset(&p_cds_context->wmaCompleteEvent);
+ qdf_event_reset(&p_cds_context->wmaCompleteEvent);
/*call WMA pre start */
vStatus = wma_pre_start(p_cds_context);
@@ -516,10 +518,10 @@ static CDF_STATUS cds_ftm_pre_start(v_CONTEXT_t cds_context)
}
/* Need to update time out of complete */
- vStatus = cdf_wait_single_event(&p_cds_context->wmaCompleteEvent,
+ qdf_status = qdf_wait_single_event(&p_cds_context->wmaCompleteEvent,
HDD_FTM_WMA_PRE_START_TIMEOUT);
- if (vStatus != CDF_STATUS_SUCCESS) {
- if (vStatus == CDF_STATUS_E_TIMEOUT) {
+ if (qdf_status != QDF_STATUS_SUCCESS) {
+ if (qdf_status == QDF_STATUS_E_TIMEOUT) {
CDF_TRACE(CDF_MODULE_ID_CDF, CDF_TRACE_LEVEL_ERROR,
"%s: Timeout occurred before WMA complete",
__func__);
diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c
index 0a568e51c3a5..f10dcb8cff66 100644
--- a/core/hdd/src/wlan_hdd_hostapd.c
+++ b/core/hdd/src/wlan_hdd_hostapd.c
@@ -857,6 +857,7 @@ CDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent,
int i = 0;
uint8_t staId;
CDF_STATUS cdf_status;
+ QDF_STATUS qdf_status;
bool bWPSState;
bool bAuthRequired = true;
tpSap_AssocMacAddr pAssocStasArray = NULL;
@@ -933,9 +934,9 @@ CDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent,
pHostapdState->cdf_status =
pSapEvent->sapevt.sapStartBssCompleteEvent.status;
- cdf_status = cdf_event_set(&pHostapdState->cdf_event);
+ qdf_status = qdf_event_set(&pHostapdState->cdf_event);
- if (!CDF_IS_STATUS_SUCCESS(cdf_status)
+ if (!QDF_IS_STATUS_SUCCESS(qdf_status)
|| pHostapdState->cdf_status) {
hddLog(LOGE, ("ERROR: startbss event failed!!"));
goto stopbss;
@@ -1443,8 +1444,8 @@ CDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent,
hddLog(LOG1, " disassociated " MAC_ADDRESS_STR,
MAC_ADDR_ARRAY(wrqu.addr.sa_data));
- cdf_status = cdf_event_set(&pHostapdState->cdf_event);
- if (!CDF_IS_STATUS_SUCCESS(cdf_status))
+ qdf_status = qdf_event_set(&pHostapdState->cdf_event);
+ if (!QDF_IS_STATUS_SUCCESS(qdf_status))
hddLog(LOGE, "ERR: Station Deauth event Set failed");
if (pSapEvent->sapevt.sapStationDisassocCompleteEvent.reason ==
@@ -1863,7 +1864,7 @@ stopbss:
* not be touched since they are now subject to being deleted
* by another thread */
if (eSAP_STOP_BSS_EVENT == sapEvent)
- cdf_event_set(&pHostapdState->cdf_stop_bss_event);
+ qdf_event_set(&pHostapdState->cdf_stop_bss_event);
/* notify userspace that the BSS has stopped */
memset(&we_custom_event, '\0', sizeof(we_custom_event));
@@ -5035,6 +5036,7 @@ __iw_softap_stopbss(struct net_device *dev,
{
hdd_adapter_t *pHostapdAdapter = (netdev_priv(dev));
CDF_STATUS status = CDF_STATUS_SUCCESS;
+ QDF_STATUS qdf_status = QDF_STATUS_SUCCESS;
hdd_context_t *hdd_ctx;
ENTER();
@@ -5048,7 +5050,7 @@ __iw_softap_stopbss(struct net_device *dev,
hdd_hostapd_state_t *pHostapdState =
WLAN_HDD_GET_HOSTAP_STATE_PTR(pHostapdAdapter);
- cdf_event_reset(&pHostapdState->cdf_stop_bss_event);
+ qdf_event_reset(&pHostapdState->cdf_stop_bss_event);
#ifdef WLAN_FEATURE_MBSSID
status =
wlansap_stop_bss(WLAN_HDD_GET_SAP_CTX_PTR(pHostapdAdapter));
@@ -5058,12 +5060,12 @@ __iw_softap_stopbss(struct net_device *dev,
pcds_context);
#endif
if (CDF_IS_STATUS_SUCCESS(status)) {
- status =
- cdf_wait_single_event(&pHostapdState->
+ qdf_status =
+ qdf_wait_single_event(&pHostapdState->
cdf_stop_bss_event,
10000);
- if (!CDF_IS_STATUS_SUCCESS(status)) {
+ if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
hddLog(LOGE,
FL("wait for single_event failed!!"));
CDF_ASSERT(0);
@@ -5989,6 +5991,7 @@ CDF_STATUS hdd_init_ap_mode(hdd_adapter_t *pAdapter)
struct net_device *dev = pAdapter->dev;
hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
CDF_STATUS status;
+ QDF_STATUS qdf_status;
#ifdef WLAN_FEATURE_MBSSID
v_CONTEXT_t p_cds_context = (WLAN_HDD_GET_CTX(pAdapter))->pcds_context;
v_CONTEXT_t sapContext = NULL;
@@ -6033,23 +6036,23 @@ CDF_STATUS hdd_init_ap_mode(hdd_adapter_t *pAdapter)
return status;
}
- status = cdf_event_init(&phostapdBuf->cdf_event);
- if (!CDF_IS_STATUS_SUCCESS(status)) {
+ qdf_status = qdf_event_create(&phostapdBuf->cdf_event);
+ if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
hddLog(LOGE, ("ERROR: Hostapd HDD cdf event init failed!!"));
#ifdef WLAN_FEATURE_MBSSID
wlansap_close(sapContext);
#endif
- return status;
+ return qdf_status;
}
- status = cdf_event_init(&phostapdBuf->cdf_stop_bss_event);
- if (!CDF_IS_STATUS_SUCCESS(status)) {
+ qdf_status = qdf_event_create(&phostapdBuf->cdf_stop_bss_event);
+ if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
CDF_TRACE(CDF_MODULE_ID_HDD, CDF_TRACE_LEVEL_ERROR,
("ERROR: Hostapd HDD stop bss event init failed!!"));
#ifdef WLAN_FEATURE_MBSSID
wlansap_close(sapContext);
#endif
- return status;
+ return qdf_status;
}
init_completion(&pAdapter->session_close_comp_var);
@@ -7314,6 +7317,7 @@ static int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter,
eCsrEncryptionType RSNEncryptType;
eCsrEncryptionType mcRSNEncryptType;
int status = CDF_STATUS_SUCCESS, ret;
+ int qdf_status = QDF_STATUS_SUCCESS;
tpWLAN_SAPEventCB pSapEventCallback;
hdd_hostapd_state_t *pHostapdState;
#ifndef WLAN_FEATURE_MBSSID
@@ -7775,7 +7779,7 @@ static int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter,
(WLAN_HDD_GET_AP_CTX_PTR(pHostapdAdapter))->dfs_cac_block_tx = true;
- cdf_event_reset(&pHostapdState->cdf_event);
+ qdf_event_reset(&pHostapdState->cdf_event);
status = wlansap_start_bss(
#ifdef WLAN_FEATURE_MBSSID
WLAN_HDD_GET_SAP_CTX_PTR
@@ -7795,11 +7799,11 @@ static int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter,
hddLog(LOG1,
FL("Waiting for Scan to complete(auto mode) and BSS to start"));
- status = cdf_wait_single_event(&pHostapdState->cdf_event, 10000);
+ qdf_status = qdf_wait_single_event(&pHostapdState->cdf_event, 10000);
wlansap_reset_sap_config_add_ie(pConfig, eUPDATE_IE_ALL);
- if (!CDF_IS_STATUS_SUCCESS(status)) {
+ if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
hddLog(LOGE,
FL("ERROR: HDD cdf wait for single_event failed!!"));
cds_set_connection_in_progress(false);
@@ -7859,6 +7863,7 @@ static int __wlan_hdd_cfg80211_stop_ap(struct wiphy *wiphy,
hdd_scaninfo_t *pScanInfo = NULL;
hdd_adapter_t *staAdapter = NULL;
CDF_STATUS status = CDF_STATUS_E_FAILURE;
+ QDF_STATUS qdf_status = QDF_STATUS_E_FAILURE;
tSirUpdateIE updateIE;
beacon_data_t *old;
int ret;
@@ -7957,19 +7962,19 @@ static int __wlan_hdd_cfg80211_stop_ap(struct wiphy *wiphy,
hdd_hostapd_state_t *pHostapdState =
WLAN_HDD_GET_HOSTAP_STATE_PTR(pAdapter);
- cdf_event_reset(&pHostapdState->cdf_stop_bss_event);
+ qdf_event_reset(&pHostapdState->cdf_stop_bss_event);
#ifdef WLAN_FEATURE_MBSSID
status = wlansap_stop_bss(WLAN_HDD_GET_SAP_CTX_PTR(pAdapter));
#else
status = wlansap_stop_bss(pHddCtx->pcds_context);
#endif
if (CDF_IS_STATUS_SUCCESS(status)) {
- status =
- cdf_wait_single_event(&pHostapdState->
+ qdf_status =
+ qdf_wait_single_event(&pHostapdState->
cdf_stop_bss_event,
10000);
- if (!CDF_IS_STATUS_SUCCESS(status)) {
+ if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
hddLog(LOGE,
FL("HDD cdf wait for single_event failed!!"));
CDF_ASSERT(0);
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c
index 854ea7e6971d..2ac866def031 100644
--- a/core/hdd/src/wlan_hdd_main.c
+++ b/core/hdd/src/wlan_hdd_main.c
@@ -2906,6 +2906,7 @@ CDF_STATUS hdd_stop_adapter(hdd_context_t *hdd_ctx, hdd_adapter_t *adapter,
mutex_lock(&hdd_ctx->sap_lock);
if (test_bit(SOFTAP_BSS_STARTED, &adapter->event_flags)) {
CDF_STATUS status;
+ QDF_STATUS qdf_status;
/* Stop Bss. */
#ifdef WLAN_FEATURE_MBSSID
@@ -2919,19 +2920,19 @@ CDF_STATUS hdd_stop_adapter(hdd_context_t *hdd_ctx, hdd_adapter_t *adapter,
if (CDF_IS_STATUS_SUCCESS(status)) {
hdd_hostapd_state_t *hostapd_state =
WLAN_HDD_GET_HOSTAP_STATE_PTR(adapter);
- cdf_event_reset(&hostapd_state->
+ qdf_event_reset(&hostapd_state->
cdf_stop_bss_event);
- status =
- cdf_wait_single_event(&hostapd_state->
+ qdf_status =
+ qdf_wait_single_event(&hostapd_state->
cdf_stop_bss_event,
BSS_WAIT_TIMEOUT);
- if (!CDF_IS_STATUS_SUCCESS(status)) {
+ if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
hddLog(LOGE,
FL(
"failure waiting for wlansap_stop_bss %d"
),
- status);
+ qdf_status);
}
} else {
hddLog(LOGE, FL("failure in wlansap_stop_bss"));
@@ -6555,7 +6556,7 @@ void wlan_hdd_stop_sap(hdd_adapter_t *ap_adapter)
{
hdd_ap_ctx_t *hdd_ap_ctx;
hdd_hostapd_state_t *hostapd_state;
- CDF_STATUS cdf_status;
+ QDF_STATUS qdf_status;
hdd_context_t *hdd_ctx;
#ifdef CFG80211_DEL_STA_V2
struct station_del_parameters delStaParams;
@@ -6592,13 +6593,13 @@ void wlan_hdd_stop_sap(hdd_adapter_t *ap_adapter)
hostapd_state = WLAN_HDD_GET_HOSTAP_STATE_PTR(ap_adapter);
hddLog(CDF_TRACE_LEVEL_INFO_HIGH,
FL("Now doing SAP STOPBSS"));
- cdf_event_reset(&hostapd_state->cdf_stop_bss_event);
+ qdf_event_reset(&hostapd_state->cdf_stop_bss_event);
if (CDF_STATUS_SUCCESS == wlansap_stop_bss(hdd_ap_ctx->
sapContext)) {
- cdf_status = cdf_wait_single_event(&hostapd_state->
+ qdf_status = qdf_wait_single_event(&hostapd_state->
cdf_stop_bss_event,
BSS_WAIT_TIMEOUT);
- if (!CDF_IS_STATUS_SUCCESS(cdf_status)) {
+ if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
mutex_unlock(&hdd_ctx->sap_lock);
hddLog(CDF_TRACE_LEVEL_ERROR,
FL("SAP Stop Failed"));
@@ -6630,7 +6631,7 @@ void wlan_hdd_start_sap(hdd_adapter_t *ap_adapter)
{
hdd_ap_ctx_t *hdd_ap_ctx;
hdd_hostapd_state_t *hostapd_state;
- CDF_STATUS cdf_status;
+ QDF_STATUS qdf_status;
hdd_context_t *hdd_ctx;
tsap_Config_t *sap_config;
@@ -6673,9 +6674,9 @@ void wlan_hdd_start_sap(hdd_adapter_t *ap_adapter)
hddLog(CDF_TRACE_LEVEL_INFO_HIGH,
FL("Waiting for SAP to start"));
- cdf_status = cdf_wait_single_event(&hostapd_state->cdf_event,
+ qdf_status = qdf_wait_single_event(&hostapd_state->cdf_event,
BSS_WAIT_TIMEOUT);
- if (!CDF_IS_STATUS_SUCCESS(cdf_status)) {
+ if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
hddLog(CDF_TRACE_LEVEL_ERROR, FL("SAP Start failed"));
goto end;
}
diff --git a/core/hdd/src/wlan_hdd_wext.c b/core/hdd/src/wlan_hdd_wext.c
index 9485fd23335c..24e33289ff6e 100644
--- a/core/hdd/src/wlan_hdd_wext.c
+++ b/core/hdd/src/wlan_hdd_wext.c
@@ -1448,7 +1448,7 @@ void hdd_statistics_cb(void *pStats, void *pContext)
hdd_adapter_t *pAdapter = (hdd_adapter_t *) pContext;
hdd_stats_t *pStatsCache = NULL;
hdd_wext_state_t *pWextState;
- CDF_STATUS cdf_status = CDF_STATUS_SUCCESS;
+ QDF_STATUS qdf_status = QDF_STATUS_SUCCESS;
tCsrSummaryStatsInfo *pSummaryStats = NULL;
tCsrGlobalClassAStatsInfo *pClassAStats = NULL;
@@ -1487,9 +1487,9 @@ void hdd_statistics_cb(void *pStats, void *pContext)
if (pAdapter) {
pWextState = WLAN_HDD_GET_WEXT_STATE_PTR(pAdapter);
- cdf_status = cdf_event_set(&pWextState->hdd_cdf_event);
- if (!CDF_IS_STATUS_SUCCESS(cdf_status)) {
- hddLog(LOGE, FL("cdf_event_set failed"));
+ qdf_status = qdf_event_set(&pWextState->hdd_cdf_event);
+ if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
+ hddLog(LOGE, FL("qdf_event_set failed"));
return;
}
}
@@ -2228,6 +2228,7 @@ static int __iw_get_bitrate(struct net_device *dev,
union iwreq_data *wrqu, char *extra)
{
CDF_STATUS cdf_status = CDF_STATUS_SUCCESS;
+ QDF_STATUS qdf_status = QDF_STATUS_SUCCESS;
CDF_STATUS status = CDF_STATUS_SUCCESS;
hdd_wext_state_t *pWextState;
hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev);
@@ -2273,11 +2274,11 @@ static int __iw_get_bitrate(struct net_device *dev,
pWextState = WLAN_HDD_GET_WEXT_STATE_PTR(pAdapter);
- cdf_status =
- cdf_wait_single_event(&pWextState->hdd_cdf_event,
+ qdf_status =
+ qdf_wait_single_event(&pWextState->hdd_cdf_event,
WLAN_WAIT_TIME_STATS);
- if (!CDF_IS_STATUS_SUCCESS(cdf_status)) {
+ if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
hddLog(CDF_TRACE_LEVEL_ERROR,
"%s: SME timeout while retrieving statistics",
__func__);
@@ -8812,7 +8813,7 @@ static int __iw_get_statistics(struct net_device *dev,
union iwreq_data *wrqu, char *extra)
{
- CDF_STATUS cdf_status = CDF_STATUS_SUCCESS;
+ QDF_STATUS qdf_status = QDF_STATUS_SUCCESS;
CDF_STATUS status = CDF_STATUS_SUCCESS;
hdd_wext_state_t *pWextState;
hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev);
@@ -8856,10 +8857,10 @@ static int __iw_get_statistics(struct net_device *dev,
pWextState = WLAN_HDD_GET_WEXT_STATE_PTR(pAdapter);
- cdf_status =
- cdf_wait_single_event(&pWextState->hdd_cdf_event,
+ qdf_status =
+ qdf_wait_single_event(&pWextState->hdd_cdf_event,
WLAN_WAIT_TIME_STATS);
- if (!CDF_IS_STATUS_SUCCESS(cdf_status)) {
+ if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
hddLog(CDF_TRACE_LEVEL_ERROR,
"%s: SME timeout while retrieving statistics",
__func__);
@@ -10751,7 +10752,7 @@ int hdd_register_wext(struct net_device *dev)
{
hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev);
hdd_wext_state_t *pwextBuf = WLAN_HDD_GET_WEXT_STATE_PTR(pAdapter);
- CDF_STATUS status;
+ QDF_STATUS status;
ENTER();
@@ -10763,20 +10764,20 @@ int hdd_register_wext(struct net_device *dev)
status = hdd_set_wext(pAdapter);
- if (!CDF_IS_STATUS_SUCCESS(status)) {
+ if (!QDF_IS_STATUS_SUCCESS(status)) {
CDF_TRACE(CDF_MODULE_ID_HDD, CDF_TRACE_LEVEL_ERROR,
("ERROR: hdd_set_wext failed!!"));
return CDF_STATUS_E_FAILURE;
}
- if (!CDF_IS_STATUS_SUCCESS(cdf_event_init(&pwextBuf->hdd_cdf_event))) {
+ if (!QDF_IS_STATUS_SUCCESS(qdf_event_create(&pwextBuf->hdd_cdf_event))) {
CDF_TRACE(CDF_MODULE_ID_HDD, CDF_TRACE_LEVEL_ERROR,
("ERROR: HDD cdf event init failed!!"));
return CDF_STATUS_E_FAILURE;
}
- if (!CDF_IS_STATUS_SUCCESS(cdf_event_init(&pwextBuf->scanevent))) {
+ if (!QDF_IS_STATUS_SUCCESS(qdf_event_create(&pwextBuf->scanevent))) {
CDF_TRACE(CDF_MODULE_ID_HDD, CDF_TRACE_LEVEL_ERROR,
("ERROR: HDD scan event init failed!!"));
return CDF_STATUS_E_FAILURE;
diff --git a/core/mac/src/sys/common/inc/wlan_qct_sys.h b/core/mac/src/sys/common/inc/wlan_qct_sys.h
index c80b641a2035..ef0c89d6a2a4 100644
--- a/core/mac/src/sys/common/inc/wlan_qct_sys.h
+++ b/core/mac/src/sys/common/inc/wlan_qct_sys.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2015 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2016 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -25,7 +25,7 @@
* to the Linux Foundation.
*/
-#if !defined( WLAN_QCT_SYS_H__ )
+#if !defined(WLAN_QCT_SYS_H__)
#define WLAN_QCT_SYS_H__
/**===========================================================================
@@ -43,6 +43,7 @@
-------------------------------------------------------------------------*/
#include <cdf_types.h>
#include <cdf_status.h>
+#include <qdf_status.h>
#include <cds_mq.h>
/*---------------------------------------------------------------------------
@@ -61,7 +62,7 @@
modules in the system.
\param pUserData - user data that is passed to the Callback function
- when it is invoked.
+ when it is invoked.
\return Nothing
@@ -97,12 +98,12 @@ typedef enum {
specific message being built.
\note There are internal / reserved items in a SYS message that must be
- set correctly for the message to be recognized as a SYS message by
- the SYS message handlers. It is important for every SYS message to
- be setup / built / initialized through this function.
+ set correctly for the message to be recognized as a SYS message by
+ the SYS message handlers. It is important for every SYS message to
+ be setup / built / initialized through this function.
\param sysMsgId - a valid message ID for a SYS message. See the
- SYS_MSG_ID enum for all the valid SYS message IDs.
+ SYS_MSG_ID enum for all the valid SYS message IDs.
\param pMsg - pointer to the message structure to be setup.
@@ -123,15 +124,15 @@ CDF_STATUS sys_build_message_header(SYS_MSG_ID sysMsgId, cds_msg_t *pMsg);
\param p_cds_context - pointer to the CDS Context
\param userCallback - this is a callback that is called when the SYS
- has completed the 'start' funciton.
+ has completed the 'start' funciton.
\param pUserData - pointer to some user data entity that is passed to
- the callback function as a parameter when invoked.
+ the callback function as a parameter when invoked.
\return CDF_STATUS_SUCCESS -
\todo: We have not 'status' on the callback. How do we notify the
- callback that there is a failure ?
+ callback that there is a failure ?
\sa
@@ -151,7 +152,7 @@ CDF_STATUS sysMcStart(v_CONTEXT_t p_cds_context, sysResponseCback userCallback,
\return CDF_STATUS_SUCCESS - the SYS module is stopped.
- CDF_STATUS_E_FAILURE - the SYS module open failed to stop.
+ CDF_STATUS_E_FAILURE - the SYS module open failed to stop.
\sa
@@ -182,8 +183,8 @@ CDF_STATUS sys_stop(v_CONTEXT_t p_cds_context);
\return - CDF_STATUS_SUCCESS - the message was processed successfully.
- CDF_STATUS_E_BADMSG - a bad (unknown type) message was received
- and subsequently not processed.
+ CDF_STATUS_E_BADMSG - a bad (unknown type) message was received
+ and subsequently not processed.
\sa
--------------------------------------------------------------------------*/
diff --git a/core/mac/src/sys/common/src/wlan_qct_sys.c b/core/mac/src/sys/common/src/wlan_qct_sys.c
index 212af83a949a..1c1452f01098 100644
--- a/core/mac/src/sys/common/src/wlan_qct_sys.c
+++ b/core/mac/src/sys/common/src/wlan_qct_sys.c
@@ -45,7 +45,7 @@
/* SYS stop timeout 30 seconds */
#define SYS_STOP_TIMEOUT (30000)
-static cdf_event_t g_stop_evt;
+static qdf_event_t g_stop_evt;
/**
* sys_build_message_header() - to build the sys message header
@@ -74,10 +74,10 @@ CDF_STATUS sys_build_message_header(SYS_MSG_ID sysMsgId, cds_msg_t *pMsg)
*/
void sys_stop_complete_cb(void *pUserData)
{
- cdf_event_t *pStopEvt = (cdf_event_t *) pUserData;
- CDF_STATUS cdf_status = cdf_event_set(pStopEvt);
+ qdf_event_t *pStopEvt = (qdf_event_t *) pUserData;
+ QDF_STATUS qdf_status = qdf_event_set(pStopEvt);
- CDF_ASSERT(CDF_IS_STATUS_SUCCESS(cdf_status));
+ CDF_ASSERT(QDF_IS_STATUS_SUCCESS(qdf_status));
}
@@ -92,13 +92,14 @@ void sys_stop_complete_cb(void *pUserData)
CDF_STATUS sys_stop(v_CONTEXT_t p_cds_context)
{
CDF_STATUS cdf_status = CDF_STATUS_SUCCESS;
+ QDF_STATUS qdf_status = QDF_STATUS_SUCCESS;
cds_msg_t sysMsg;
/* Initialize the stop event */
- cdf_status = cdf_event_init(&g_stop_evt);
+ qdf_status = qdf_event_create(&g_stop_evt);
- if (!CDF_IS_STATUS_SUCCESS(cdf_status))
- return cdf_status;
+ if (!QDF_IS_STATUS_SUCCESS(qdf_status))
+ return qdf_status;
/* post a message to SYS module in MC to stop SME and MAC */
sys_build_message_header(SYS_MSG_ID_MC_STOP, &sysMsg);
@@ -112,13 +113,13 @@ CDF_STATUS sys_stop(v_CONTEXT_t p_cds_context)
if (!CDF_IS_STATUS_SUCCESS(cdf_status))
cdf_status = CDF_STATUS_E_BADMSG;
- cdf_status = cdf_wait_single_event(&g_stop_evt, SYS_STOP_TIMEOUT);
- CDF_ASSERT(CDF_IS_STATUS_SUCCESS(cdf_status));
+ qdf_status = qdf_wait_single_event(&g_stop_evt, SYS_STOP_TIMEOUT);
+ CDF_ASSERT(QDF_IS_STATUS_SUCCESS(qdf_status));
- cdf_status = cdf_event_destroy(&g_stop_evt);
- CDF_ASSERT(CDF_IS_STATUS_SUCCESS(cdf_status));
+ qdf_status = qdf_event_destroy(&g_stop_evt);
+ CDF_ASSERT(QDF_IS_STATUS_SUCCESS(qdf_status));
- return cdf_status;
+ return qdf_status;
}
/**
@@ -253,7 +254,7 @@ CDF_STATUS sys_mc_process_msg(v_CONTEXT_t p_cds_context, cds_msg_t *pMsg)
if (pMsg->bodyptr)
cdf_mem_free(pMsg->bodyptr);
}
- return (cdf_status);
+ return cdf_status;
}
/**
diff --git a/core/sme/inc/csr_internal.h b/core/sme/inc/csr_internal.h
index 5c04a15006b6..d422b8b0278c 100644
--- a/core/sme/inc/csr_internal.h
+++ b/core/sme/inc/csr_internal.h
@@ -34,6 +34,7 @@
#define CSRINTERNAL_H__
#include "cdf_status.h"
+#include "qdf_status.h"
#include "cdf_lock.h"
#include "cdf_mc_timer.h"
diff --git a/core/sme/inc/sme_inside.h b/core/sme/inc/sme_inside.h
index ed5f1a8ec59d..7974b4ee2c6f 100644
--- a/core/sme/inc/sme_inside.h
+++ b/core/sme/inc/sme_inside.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2015 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2016 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -38,6 +38,7 @@
Include Files
------------------------------------------------------------------------*/
#include "cdf_status.h"
+#include "qdf_status.h"
#include "cdf_lock.h"
#include "cdf_trace.h"
#include "cdf_memory.h"
diff --git a/core/sme/inc/sme_internal.h b/core/sme/inc/sme_internal.h
index 9c0437b7f4e4..a86fb9cfa61d 100644
--- a/core/sme/inc/sme_internal.h
+++ b/core/sme/inc/sme_internal.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2015 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2016 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -38,6 +38,7 @@
Include Files
------------------------------------------------------------------------*/
#include "cdf_status.h"
+#include "qdf_status.h"
#include "cdf_lock.h"
#include "cdf_trace.h"
#include "cdf_memory.h"
diff --git a/core/utils/logging/inc/wlan_logging_sock_svc.h b/core/utils/logging/inc/wlan_logging_sock_svc.h
index c9070ab23480..5aa52459265f 100644
--- a/core/utils/logging/inc/wlan_logging_sock_svc.h
+++ b/core/utils/logging/inc/wlan_logging_sock_svc.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014-2015 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014-2016 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -35,6 +35,7 @@
#include <wlan_nlink_srv.h>
#include <cdf_status.h>
+#include <qdf_status.h>
#include <cdf_trace.h>
#include <wlan_nlink_common.h>
diff --git a/core/utils/ptt/inc/wlan_ptt_sock_svc.h b/core/utils/ptt/inc/wlan_ptt_sock_svc.h
index a328d8ecc3d0..cc843856616b 100644
--- a/core/utils/ptt/inc/wlan_ptt_sock_svc.h
+++ b/core/utils/ptt/inc/wlan_ptt_sock_svc.h
@@ -34,6 +34,7 @@
#include <wlan_nlink_srv.h>
#include <cdf_types.h>
#include <cdf_status.h>
+#include <qdf_status.h>
#include <cdf_trace.h>
#include <wlan_nlink_common.h>
/*
diff --git a/core/utils/ptt/src/wlan_ptt_sock_svc.c b/core/utils/ptt/src/wlan_ptt_sock_svc.c
index b9a9c12c3320..409d3cfe24a3 100644
--- a/core/utils/ptt/src/wlan_ptt_sock_svc.c
+++ b/core/utils/ptt/src/wlan_ptt_sock_svc.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2015 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2016 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -33,6 +33,7 @@
#include <wlan_nlink_srv.h>
#include <cdf_types.h>
#include <cdf_status.h>
+#include <qdf_status.h>
#include <cdf_trace.h>
#include <wlan_nlink_common.h>
#include <wlan_ptt_sock_svc.h>
@@ -96,7 +97,8 @@ int ptt_sock_send_msg_to_app(tAniHdr *wmsg, int radio, int src_mod, int pid)
}
payload_len = wmsg_length + 4; /* 4 extra bytes for the radio idx */
tot_msg_len = NLMSG_SPACE(payload_len);
- if ((skb = dev_alloc_skb(tot_msg_len)) == NULL) {
+ skb = dev_alloc_skb(tot_msg_len);
+ if (skb == NULL) {
PTT_TRACE(CDF_TRACE_LEVEL_ERROR,
"%s: dev_alloc_skb() failed for msg size[%d]\n",
__func__, tot_msg_len);
diff --git a/core/wma/inc/wma.h b/core/wma/inc/wma.h
index 456f08ed4c10..6dfbcaf71c62 100644
--- a/core/wma/inc/wma.h
+++ b/core/wma/inc/wma.h
@@ -32,13 +32,14 @@
#include "cdf_types.h"
#include "osapi_linux.h"
#include "htc_packet.h"
-#include "i_cdf_event.h"
+#include "i_qdf_event.h"
#include "wmi_services.h"
#include "wmi_unified.h"
#include "wmi_version.h"
#include "cdf_types.h"
#include "cfg_api.h"
#include "cdf_status.h"
+#include "qdf_status.h"
#include "cds_sched.h"
#include "ol_txrx_api.h"
#include "sir_mac_prot_def.h"
@@ -1174,11 +1175,11 @@ typedef struct {
void *htc_handle;
void *cds_context;
void *mac_context;
- cdf_event_t wma_ready_event;
- cdf_event_t wma_resume_event;
- cdf_event_t target_suspend;
- cdf_event_t runtime_suspend;
- cdf_event_t recovery_event;
+ qdf_event_t wma_ready_event;
+ qdf_event_t wma_resume_event;
+ qdf_event_t target_suspend;
+ qdf_event_t runtime_suspend;
+ qdf_event_t recovery_event;
uint16_t max_station;
uint16_t max_bssid;
uint32_t frame_xln_reqd;
@@ -1205,14 +1206,14 @@ typedef struct {
uint32_t frameTransRequired;
tBssSystemRole wmaGlobalSystemRole;
pWMATxRxCompFunc tx_frm_download_comp_cb;
- cdf_event_t tx_frm_download_comp_event;
+ qdf_event_t tx_frm_download_comp_event;
/*
* Dummy event to wait for draining MSDUs left in hardware tx
* queue and before requesting VDEV_STOP. Nobody will set this
* and wait will timeout, and code will poll the pending tx
* descriptors number to be zero.
*/
- cdf_event_t tx_queue_empty_event;
+ qdf_event_t tx_queue_empty_event;
pWMAAckFnTxComp umac_ota_ack_cb[SIR_MAC_MGMT_RESERVED15];
pWMAAckFnTxComp umac_data_ota_ack_cb;
v_TIME_t last_umac_data_ota_timestamp;
@@ -1361,9 +1362,9 @@ typedef struct {
* @wlan_resource_config: resource config
*/
struct wma_target_cap {
- /* wmi services bitmap received from Target */
+ /* wmi services bitmap received from Target */
uint32_t wmi_service_bitmap[WMI_SERVICE_BM_SIZE];
- /* default resource config,the os shim can overwrite it */
+ /* default resource config,the os shim can overwrite it */
wmi_resource_config wlan_resource_config;
};
diff --git a/core/wma/src/wma_data.c b/core/wma/src/wma_data.c
index f82f428d586f..d56a92f6b3a8 100644
--- a/core/wma/src/wma_data.c
+++ b/core/wma/src/wma_data.c
@@ -1586,7 +1586,7 @@ static void
wma_mgmt_tx_dload_comp_hldr(void *wma_context, cdf_nbuf_t netbuf,
int32_t status)
{
- CDF_STATUS cdf_status = CDF_STATUS_SUCCESS;
+ QDF_STATUS qdf_status = QDF_STATUS_SUCCESS;
tp_wma_handle wma_handle = (tp_wma_handle) wma_context;
void *mac_context = wma_handle->mac_context;
@@ -1605,8 +1605,8 @@ wma_mgmt_tx_dload_comp_hldr(void *wma_context, cdf_nbuf_t netbuf,
wma_handle->tx_frm_download_comp_cb = NULL;
/* Set the Tx Mgmt Complete Event */
- cdf_status = cdf_event_set(&wma_handle->tx_frm_download_comp_event);
- if (!CDF_IS_STATUS_SUCCESS(cdf_status))
+ qdf_status = qdf_event_set(&wma_handle->tx_frm_download_comp_event);
+ if (!QDF_IS_STATUS_SUCCESS(qdf_status))
WMA_LOGP("%s: Event Set failed - tx_frm_comp_event", __func__);
}
@@ -1674,10 +1674,10 @@ CDF_STATUS wma_tx_detach(tp_wma_handle wma_handle)
}
}
/* Destroy Tx Frame Complete event */
- cdf_event_destroy(&wma_handle->tx_frm_download_comp_event);
+ qdf_event_destroy(&wma_handle->tx_frm_download_comp_event);
/* Tx queue empty check event (dummy event) */
- cdf_event_destroy(&wma_handle->tx_queue_empty_event);
+ qdf_event_destroy(&wma_handle->tx_queue_empty_event);
/* Reset Tx Frm Callbacks */
wma_handle->tx_frm_download_comp_cb = NULL;
@@ -2444,6 +2444,7 @@ CDF_STATUS wma_tx_packet(void *wma_context, void *tx_frame, uint16_t frmLen,
tp_wma_handle wma_handle = (tp_wma_handle) (wma_context);
int32_t status;
CDF_STATUS cdf_status = CDF_STATUS_SUCCESS;
+ QDF_STATUS qdf_status = QDF_STATUS_SUCCESS;
int32_t is_high_latency;
ol_txrx_vdev_handle txrx_vdev;
enum frame_index tx_frm_index = GENERIC_NODOWNLD_NOACK_COMP_INDEX;
@@ -2740,7 +2741,7 @@ CDF_STATUS wma_tx_packet(void *wma_context, void *tx_frame, uint16_t frmLen,
/* Reset the Tx Frame Complete Event */
cdf_status =
- cdf_event_reset(&wma_handle->tx_frm_download_comp_event);
+ qdf_event_reset(&wma_handle->tx_frm_download_comp_event);
if (!CDF_IS_STATUS_SUCCESS(cdf_status)) {
WMA_LOGP("%s: Event Reset failed tx comp event %x",
@@ -2817,12 +2818,12 @@ CDF_STATUS wma_tx_packet(void *wma_context, void *tx_frame, uint16_t frmLen,
* @ Integrated : Dxe Complete
* @ Discrete : Target Download Complete
*/
- cdf_status =
- cdf_wait_single_event(&wma_handle->
+ qdf_status =
+ qdf_wait_single_event(&wma_handle->
tx_frm_download_comp_event,
WMA_TX_FRAME_COMPLETE_TIMEOUT);
- if (!CDF_IS_STATUS_SUCCESS(cdf_status)) {
+ if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
WMA_LOGP("Wait Event failed txfrm_comp_event");
/*
* @Integrated: Something Wrong with Dxe
diff --git a/core/wma/src/wma_dev_if.c b/core/wma/src/wma_dev_if.c
index 5b39b08a2b04..f69b5320ef9c 100644
--- a/core/wma/src/wma_dev_if.c
+++ b/core/wma/src/wma_dev_if.c
@@ -1739,8 +1739,7 @@ int wma_vdev_stop_resp_handler(void *handle, uint8_t *cmd_param_info,
}
if (wma_is_vdev_in_ibss_mode(wma, resp_event->vdev_id))
wma_delete_all_ibss_peers(wma, resp_event->vdev_id);
- else
- {
+ else {
if (wma_is_vdev_in_ap_mode(wma, resp_event->vdev_id)) {
wma_delete_all_ap_remote_peers(wma,
resp_event->vdev_id);
@@ -2749,8 +2748,7 @@ void wma_vdev_resp_timer(void *data)
}
if (wma_is_vdev_in_ibss_mode(wma, tgt_req->vdev_id))
wma_delete_all_ibss_peers(wma, tgt_req->vdev_id);
- else
- {
+ else {
if (wma_is_vdev_in_ap_mode(wma, tgt_req->vdev_id)) {
wma_delete_all_ap_remote_peers(wma,
tgt_req->
@@ -4714,7 +4712,7 @@ void wma_delete_bss(tp_wma_handle wma, tpDeleteBssParams params)
while (ol_txrx_get_tx_pending(pdev) && max_wait_iterations) {
WMA_LOGW(FL("Waiting for outstanding packet to drain."));
- cdf_wait_single_event(&wma->tx_queue_empty_event,
+ qdf_wait_single_event(&wma->tx_queue_empty_event,
WMA_TX_Q_RECHECK_TIMER_MAX_WAIT);
max_wait_iterations--;
}
diff --git a/core/wma/src/wma_features.c b/core/wma/src/wma_features.c
index 72b412f93155..f767b9e26cb9 100644
--- a/core/wma/src/wma_features.c
+++ b/core/wma/src/wma_features.c
@@ -2845,7 +2845,7 @@ int wma_wow_wakeup_host_event(void *handle, uint8_t *event,
wma_wow_wake_reason_str(wake_info->wake_reason),
wake_info->wake_reason, wake_info->vdev_id);
- cdf_event_set(&wma->wma_resume_event);
+ qdf_event_set(&wma->wma_resume_event);
switch (wake_info->wake_reason) {
case WOW_REASON_AUTH_REQ_RECV:
@@ -3088,7 +3088,7 @@ int wma_pdev_resume_event_handler(void *handle, uint8_t *event, uint32_t len)
WMA_LOGA("Received PDEV resume event");
- cdf_event_set(&wma->wma_resume_event);
+ qdf_event_set(&wma->wma_resume_event);
return 0;
}
@@ -3576,7 +3576,7 @@ CDF_STATUS wma_enable_wow_in_fw(WMA_HANDLE handle)
cmd->pause_iface_config == WOW_IFACE_PAUSE_ENABLED ?
"WOW_IFACE_PAUSE_ENABLED" : "WOW_IFACE_PAUSE_DISABLED");
- cdf_event_reset(&wma->target_suspend);
+ qdf_event_reset(&wma->target_suspend);
wma->wow_nack = 0;
host_credits = wmi_get_host_credits(wma->wmi_handle);
@@ -3603,9 +3603,9 @@ CDF_STATUS wma_enable_wow_in_fw(WMA_HANDLE handle)
wmi_set_target_suspend(wma->wmi_handle, true);
- if (cdf_wait_single_event(&wma->target_suspend,
+ if (qdf_wait_single_event(&wma->target_suspend,
WMA_TGT_SUSPEND_COMPLETE_TIMEOUT)
- != CDF_STATUS_SUCCESS) {
+ != QDF_STATUS_SUCCESS) {
WMA_LOGE("Failed to receive WoW Enable Ack from FW");
WMA_LOGE("Credits:%d; Pending_Cmds: %d",
wmi_get_host_credits(wma->wmi_handle),
@@ -4201,7 +4201,7 @@ static void wma_notify_suspend_req_procesed(tp_wma_handle wma,
if (type == CDF_SYSTEM_SUSPEND)
wma_send_status_to_suspend_ind(wma, true);
else if (type == CDF_RUNTIME_SUSPEND)
- cdf_event_set(&wma->runtime_suspend);
+ qdf_event_set(&wma->runtime_suspend);
}
/**
@@ -4256,6 +4256,7 @@ static CDF_STATUS wma_send_host_wakeup_ind_to_fw(tp_wma_handle wma)
wmi_wow_hostwakeup_from_sleep_cmd_fixed_param *cmd;
wmi_buf_t buf;
CDF_STATUS cdf_status = CDF_STATUS_SUCCESS;
+ QDF_STATUS qdf_status = QDF_STATUS_SUCCESS;
int32_t len;
int ret;
#ifdef CONFIG_CNSS
@@ -4281,7 +4282,7 @@ static CDF_STATUS wma_send_host_wakeup_ind_to_fw(tp_wma_handle wma)
WMITLV_GET_STRUCT_TLVLEN
(wmi_wow_hostwakeup_from_sleep_cmd_fixed_param));
- cdf_event_reset(&wma->wma_resume_event);
+ qdf_event_reset(&wma->wma_resume_event);
ret = wmi_unified_cmd_send(wma->wmi_handle, buf, len,
WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID);
@@ -4293,9 +4294,9 @@ static CDF_STATUS wma_send_host_wakeup_ind_to_fw(tp_wma_handle wma)
WMA_LOGD("Host wakeup indication sent to fw");
- cdf_status = cdf_wait_single_event(&(wma->wma_resume_event),
+ qdf_status = qdf_wait_single_event(&(wma->wma_resume_event),
WMA_RESUME_TIMEOUT);
- if (CDF_STATUS_SUCCESS != cdf_status) {
+ if (QDF_STATUS_SUCCESS != qdf_status) {
WMA_LOGP("%s: Timeout waiting for resume event from FW",
__func__);
WMA_LOGP("%s: Pending commands %d credits %d", __func__,
@@ -4932,7 +4933,7 @@ static int wma_add_clear_mcbc_filter(tp_wma_handle wma_handle, uint8_t vdev_id,
* Return: CDF status
*/
CDF_STATUS wma_process_mcbc_set_filter_req(tp_wma_handle wma_handle,
- tSirRcvFltMcAddrList * mcbc_param)
+ tSirRcvFltMcAddrList *mcbc_param)
{
uint8_t vdev_id = 0;
int i;
@@ -6367,7 +6368,7 @@ static CDF_STATUS wma_post_runtime_suspend_msg(WMA_HANDLE handle)
CDF_STATUS cdf_status;
tp_wma_handle wma = (tp_wma_handle) handle;
- cdf_event_reset(&wma->runtime_suspend);
+ qdf_event_reset(&wma->runtime_suspend);
cds_msg.bodyptr = NULL;
cds_msg.type = WMA_RUNTIME_PM_SUSPEND_IND;
@@ -6376,9 +6377,9 @@ static CDF_STATUS wma_post_runtime_suspend_msg(WMA_HANDLE handle)
if (cdf_status != CDF_STATUS_SUCCESS)
goto failure;
- if (cdf_wait_single_event(&wma->runtime_suspend,
+ if (qdf_wait_single_event(&wma->runtime_suspend,
WMA_TGT_SUSPEND_COMPLETE_TIMEOUT) !=
- CDF_STATUS_SUCCESS) {
+ QDF_STATUS_SUCCESS) {
WMA_LOGE("Failed to get runtime suspend event");
goto failure;
}
@@ -6573,7 +6574,7 @@ int wma_suspend_target(WMA_HANDLE handle, int disable_target_intr)
} else {
cmd->suspend_opt = WMI_PDEV_SUSPEND;
}
- cdf_event_reset(&wma_handle->target_suspend);
+ qdf_event_reset(&wma_handle->target_suspend);
ret = wmi_unified_cmd_send(wma_handle->wmi_handle, wmibuf, len,
WMI_PDEV_SUSPEND_CMDID);
if (ret < 0) {
@@ -6583,9 +6584,9 @@ int wma_suspend_target(WMA_HANDLE handle, int disable_target_intr)
wmi_set_target_suspend(wma_handle->wmi_handle, true);
- if (cdf_wait_single_event(&wma_handle->target_suspend,
+ if (qdf_wait_single_event(&wma_handle->target_suspend,
WMA_TGT_SUSPEND_COMPLETE_TIMEOUT)
- != CDF_STATUS_SUCCESS) {
+ != QDF_STATUS_SUCCESS) {
WMA_LOGE("Failed to get ACK from firmware for pdev suspend");
wmi_set_target_suspend(wma_handle->wmi_handle, false);
#ifdef CONFIG_CNSS
@@ -6632,7 +6633,7 @@ void wma_target_suspend_acknowledge(void *context)
}
wma->wow_nack = wow_nack;
- cdf_event_set(&wma->target_suspend);
+ qdf_event_set(&wma->target_suspend);
if (wow_nack)
cdf_wake_lock_timeout_acquire(&wma->wow_wake_lock,
WMA_WAKE_LOCK_TIMEOUT,
@@ -6652,6 +6653,7 @@ int wma_resume_target(WMA_HANDLE handle)
wmi_buf_t wmibuf;
wmi_pdev_resume_cmd_fixed_param *cmd;
CDF_STATUS cdf_status = CDF_STATUS_SUCCESS;
+ QDF_STATUS qdf_status = QDF_STATUS_SUCCESS;
#ifdef CONFIG_CNSS
tpAniSirGlobal pMac = cds_get_context(CDF_MODULE_ID_PE);
if (NULL == pMac) {
@@ -6670,7 +6672,7 @@ int wma_resume_target(WMA_HANDLE handle)
WMITLV_GET_STRUCT_TLVLEN
(wmi_pdev_resume_cmd_fixed_param));
cmd->reserved0 = 0;
- cdf_event_reset(&wma->wma_resume_event);
+ qdf_event_reset(&wma->wma_resume_event);
ret = wmi_unified_cmd_send(wma->wmi_handle, wmibuf, sizeof(*cmd),
WMI_PDEV_RESUME_CMDID);
if (ret != EOK) {
@@ -6678,9 +6680,9 @@ int wma_resume_target(WMA_HANDLE handle)
wmi_buf_free(wmibuf);
}
- cdf_status = cdf_wait_single_event(&(wma->wma_resume_event),
+ qdf_status = qdf_wait_single_event(&(wma->wma_resume_event),
WMA_RESUME_TIMEOUT);
- if (CDF_STATUS_SUCCESS != cdf_status) {
+ if (QDF_STATUS_SUCCESS != qdf_status) {
WMA_LOGP("%s: Timeout waiting for resume event from FW",
__func__);
WMA_LOGP("%s: Pending commands %d credits %d", __func__,