diff options
| author | Anurag Chouhan <achouhan@codeaurora.org> | 2016-02-18 20:11:33 +0530 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2016-03-24 11:57:42 -0700 |
| commit | 50220ce67c2d9a67decf6995ccdadf96f21b815b (patch) | |
| tree | 91a62aac16c3f8bba2328252c7cfb9696f76e332 | |
| parent | fb54ab0eac58d30a0ea9ae60628a87e3ea2edf1c (diff) | |
qcacld-3.0: Add qdf time API's
Replace CDF time API's with QDF time API's.
Change-Id: I3418f5603e5a05219a8470de3a9197928a3a8f13
CRs-Fixed: 981188
| -rw-r--r-- | core/cdf/inc/cdf_time.h | 202 | ||||
| -rw-r--r-- | core/cdf/inc/osdep.h | 12 | ||||
| -rw-r--r-- | core/cdf/src/cdf_trace.c | 8 | ||||
| -rw-r--r-- | core/cdf/src/i_cdf_time.h | 217 | ||||
| -rw-r--r-- | core/cds/src/cds_api.c | 2 | ||||
| -rw-r--r-- | core/dp/htt/htt_rx.c | 2 | ||||
| -rw-r--r-- | core/dp/htt/htt_tx.c | 2 | ||||
| -rw-r--r-- | core/dp/txrx/ol_rx_defrag.c | 8 | ||||
| -rw-r--r-- | core/dp/txrx/ol_rx_pn.c | 4 | ||||
| -rw-r--r-- | core/dp/txrx/ol_rx_reorder.c | 6 | ||||
| -rw-r--r-- | core/dp/txrx/ol_rx_reorder_timeout.c | 8 | ||||
| -rw-r--r-- | core/dp/txrx/ol_tx_desc.c | 4 | ||||
| -rw-r--r-- | core/dp/txrx/ol_tx_send.c | 10 | ||||
| -rw-r--r-- | core/dp/txrx/ol_txrx.c | 6 | ||||
| -rw-r--r-- | core/hdd/inc/wlan_hdd_main.h | 2 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_ext_scan.c | 4 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_main.c | 2 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_tx_rx.c | 2 | ||||
| -rw-r--r-- | core/sap/dfs/inc/dfs.h | 4 | ||||
| -rw-r--r-- | core/sap/dfs/src/dfs_nol.c | 20 | ||||
| -rw-r--r-- | core/sme/src/csr/csr_neighbor_roam.c | 2 | ||||
| -rw-r--r-- | core/utils/logging/src/wlan_logging_sock_svc.c | 6 | ||||
| -rw-r--r-- | core/wmi/wmi_unified.c | 30 |
23 files changed, 72 insertions, 491 deletions
diff --git a/core/cdf/inc/cdf_time.h b/core/cdf/inc/cdf_time.h deleted file mode 100644 index 58314c18106a..000000000000 --- a/core/cdf/inc/cdf_time.h +++ /dev/null @@ -1,202 +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_time - * This file abstracts time related functionality. - */ - -#ifndef _CDF_OS_TIME_H -#define _CDF_OS_TIME_H - -#include <i_cdf_time.h> -#ifdef CONFIG_CNSS -#include <net/cnss.h> -#endif - -typedef __cdf_time_t cdf_time_t; - -/** - * cdf_system_ticks() - Count the number of ticks elapsed from the time when - * the system booted - * - * Return: ticks - */ -static inline unsigned long cdf_system_ticks(void) -{ - return __cdf_system_ticks(); -} - -/** - * cdf_system_ticks_to_msecs() - convert ticks to milliseconds - * @clock_ticks: Number of ticks - * - * Return: Time in milliseconds - */ -static inline uint32_t cdf_system_ticks_to_msecs(unsigned long clock_ticks) -{ - return __cdf_system_ticks_to_msecs(clock_ticks); -} - -/** - * cdf_system_msecs_to_ticks() - convert milliseconds to ticks - * @msec: Time in milliseconds - * - * Return: number of ticks - */ -static inline unsigned long cdf_system_msecs_to_ticks(uint32_t msecs) -{ - return __cdf_system_msecs_to_ticks(msecs); -} - -/** - * cdf_get_system_uptime() - Return a monotonically increasing time. - * This increments once per HZ ticks - * - * Return: system up time - */ -static inline unsigned long cdf_get_system_uptime(void) -{ - return __cdf_get_system_uptime(); -} - -/** - * cdf_get_system_timestamp() - brief Return current timestamp - * - * Return: none - */ -static inline unsigned long cdf_get_system_timestamp(void) -{ - return __cdf_get_system_timestamp(); -} - -/** - * cdf_udelay() - delay in microseconds - * @usecs: Number of microseconds to delay - * - * Return: none - */ -static inline void cdf_udelay(int usecs) -{ - __cdf_udelay(usecs); -} - -/** - * cdf_mdelay() - Delay in milliseconds. - * @msec: Number of milliseconds to delay - * - * Return: none - */ -static inline void cdf_mdelay(int msecs) -{ - __cdf_mdelay(msecs); -} - -/* Check if _a is later than _b */ -#define cdf_system_time_after(_a, _b) __cdf_system_time_after(_a, _b) - -/* Check if _a is prior to _b */ -#define cdf_system_time_before(_a, _b) __cdf_system_time_before(_a, _b) - -/* Check if _a atleast as recent as _b, if not later */ -#define cdf_system_time_after_eq(_a, _b) __cdf_system_time_after_eq(_a, _b) - -/** - * enum cdf_timestamp_unit - what unit the cdf timestamp is in - * @KERNEL_LOG: boottime time in uS (micro seconds) - * @KERNEL_LOG: QTIME in (1/19200)S - * - * This enum is used to distinguish which timer source is used. - */ -enum cdf_timestamp_unit { - KERNEL_LOG, - QTIMER, -}; - -#ifdef QCA_WIFI_3_0_ADRASTEA -#define CDF_LOG_TIMESTAMP_UNIT QTIMER -#else -#define CDF_LOG_TIMESTAMP_UNIT KERNEL_LOG -#endif - -#ifdef QCA_WIFI_3_0_ADRASTEA -/** - * cdf_get_log_timestamp() - get time stamp for logging - * - * For adrastea this API returns QTIMER tick which is needed to synchronize - * host and fw log timestamps - * - * For ROME and other discrete solution this API returns system boot time stamp - * - * Return: - * QTIMER ticks(19.2MHz) for adrastea - * System tick for rome and other future discrete solutions - */ -static inline uint64_t cdf_get_log_timestamp(void) -{ - return __cdf_get_qtimer_ticks(); -} -#else -/** - * cdf_get_log_timestamp() - get time stamp for logging - * - * For adrastea this API returns QTIMER tick which is needed to synchronize - * host and fw log timestamps - * - * For ROME and other discrete solution this API returns system boot time stamp - * - * Return: - * QTIMER ticks(19.2MHz) for adrastea - * System tick for rome and other future discrete solutions - */ -static inline uint64_t cdf_get_log_timestamp(void) -{ -#ifdef CONFIG_CNSS - struct timespec ts; - - cnss_get_boottime(&ts); - - return ((uint64_t) ts.tv_sec * 1000000) + (ts.tv_nsec / 1000); -#else - return cdf_system_ticks_to_msecs(cdf_system_ticks()) * 1000; -#endif /* CONFIG_CNSS */ -} -#endif /* QCA_WIFI_3_0_ADRASTEA */ - -/** - * cdf_get_monotonic_boottime() - get monotonic kernel boot time - * This API is similar to cdf_get_system_boottime but it includes - * time spent in suspend. - * - * Return: Time in microseconds - */ -static inline uint64_t cdf_get_monotonic_boottime(void) -{ - return __cdf_get_monotonic_boottime(); -} - -#endif diff --git a/core/cdf/inc/osdep.h b/core/cdf/inc/osdep.h index a14a65390512..3f249fd74898 100644 --- a/core/cdf/inc/osdep.h +++ b/core/cdf/inc/osdep.h @@ -31,7 +31,7 @@ #include <cdf_types.h> #include <cdf_memory.h> #include <cdf_lock.h> -#include <cdf_time.h> +#include <qdf_time.h> #include <cdf_softirq_timer.h> #include <cdf_defer.h> #include <cdf_nbuf.h> @@ -138,7 +138,7 @@ typedef struct hal_bus_context { /* * Normal Delay functions. Time specified in microseconds. */ -#define OS_DELAY(_us) cdf_udelay(_us) +#define OS_DELAY(_us) qdf_udelay(_us) /* * memory data manipulation functions. @@ -182,12 +182,12 @@ typedef struct hal_bus_context { /* * System time interface */ -typedef cdf_time_t systime_t; -typedef cdf_time_t systick_t; +typedef qdf_time_t systime_t; +typedef qdf_time_t systick_t; -static INLINE cdf_time_t os_get_timestamp(void) +static INLINE qdf_time_t os_get_timestamp(void) { - return cdf_system_ticks(); /* Fix double conversion from jiffies to ms */ + return qdf_system_ticks(); /* Fix double conversion from jiffies to ms */ } struct _NIC_DEV; diff --git a/core/cdf/src/cdf_trace.c b/core/cdf/src/cdf_trace.c index 1d1cba9eea5a..f0ad0ec95661 100644 --- a/core/cdf/src/cdf_trace.c +++ b/core/cdf/src/cdf_trace.c @@ -38,12 +38,12 @@ #include <cdf_trace.h> #include <ani_global.h> #include <wlan_logging_sock_svc.h> -#include "cdf_time.h" +#include "qdf_time.h" /* Preprocessor definitions and constants */ #define CDF_TRACE_BUFFER_SIZE (512) -enum cdf_timestamp_unit cdf_log_timestamp_type = CDF_LOG_TIMESTAMP_UNIT; +enum qdf_timestamp_unit qdf_log_timestamp_type = QDF_LOG_TIMESTAMP_UNIT; /* macro to map cdf trace levels into the bitmask */ #define CDF_TRACE_LEVEL_TO_MODULE_BITMASK(_level) ((1 << (_level))) @@ -539,7 +539,7 @@ void cdf_trace(uint8_t module, uint8_t code, uint16_t session, uint32_t data) rec->code = code; rec->session = session; rec->data = data; - rec->time = cdf_get_log_timestamp(); + rec->time = qdf_get_log_timestamp(); rec->module = module; rec->pid = (in_interrupt() ? 0 : current->pid); g_cdf_trace_data.numSinceLastDump++; @@ -927,7 +927,7 @@ register_record: break; } } - rec->time = cdf_get_log_timestamp(); + rec->time = qdf_get_log_timestamp(); rec->pid = (in_interrupt() ? 0 : current->pid); spin_unlock_bh(&l_dp_trace_lock); } diff --git a/core/cdf/src/i_cdf_time.h b/core/cdf/src/i_cdf_time.h deleted file mode 100644 index 08cf5b4a15e4..000000000000 --- a/core/cdf/src/i_cdf_time.h +++ /dev/null @@ -1,217 +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: i_cdf_time.h - * - * Linux specific CDF timing APIs implementation - */ - -#ifndef _I_CDF_TIME_H -#define _I_CDF_TIME_H - -#include <linux/jiffies.h> -#include <linux/delay.h> -#include <asm/arch_timer.h> -#ifdef CONFIG_CNSS -#include <net/cnss.h> -#endif - -typedef unsigned long __cdf_time_t; - -/** - * __cdf_system_ticks() - get system ticks - * - * Return: system tick in jiffies - */ -static inline __cdf_time_t __cdf_system_ticks(void) -{ - return jiffies; -} - -/** - * __cdf_system_ticks_to_msecs() - convert system ticks into milli seconds - * @ticks: System ticks - * - * Return: system tick converted into milli seconds - */ -static inline uint32_t __cdf_system_ticks_to_msecs(unsigned long ticks) -{ - return jiffies_to_msecs(ticks); -} - -/** - * __cdf_system_msecs_to_ticks() - convert milli seconds into system ticks - * @msecs: Milli seconds - * - * Return: milli seconds converted into system ticks - */ -static inline __cdf_time_t __cdf_system_msecs_to_ticks(uint32_t msecs) -{ - return msecs_to_jiffies(msecs); -} - -/** - * __cdf_get_system_uptime() - get system uptime - * - * Return: system uptime in jiffies - */ -static inline __cdf_time_t __cdf_get_system_uptime(void) -{ - return jiffies; -} - -static inline __cdf_time_t __cdf_get_system_timestamp(void) -{ - return (jiffies / HZ) * 1000 + (jiffies % HZ) * (1000 / HZ); -} - -/** - * __cdf_udelay() - delay execution for given microseconds - * @usecs: Micro seconds to delay - * - * Return: none - */ -static inline void __cdf_udelay(uint32_t usecs) -{ -#ifdef CONFIG_ARM - /* - * This is in support of XScale build. They have a limit on the udelay - * value, so we have to make sure we don't approach the limit - */ - - uint32_t mticks; - uint32_t leftover; - int i; - - /* slice into 1024 usec chunks (simplifies calculation) */ - - mticks = usecs >> 10; - leftover = usecs - (mticks << 10); - - for (i = 0; i < mticks; i++) - udelay(1024); - - udelay(leftover); - -#else - /* Normal Delay functions. Time specified in microseconds */ - udelay(usecs); - -#endif -} - -/** - * __cdf_mdelay() - delay execution for given milli seconds - * @usecs: Milli seconds to delay - * - * Return: none - */ -static inline void __cdf_mdelay(uint32_t msecs) -{ - mdelay(msecs); -} - -/** - * __cdf_system_time_after() - Check if a is later than b - * @a: Time stamp value a - * @b: Time stamp value b - * - * Return: - * true if a < b else false - */ -static inline bool __cdf_system_time_after(__cdf_time_t a, __cdf_time_t b) -{ - return (long)(b) - (long)(a) < 0; -} - -/** - * __cdf_system_time_before() - Check if a is before b - * @a: Time stamp value a - * @b: Time stamp value b - * - * Return: - * true if a is before b else false - */ -static inline bool __cdf_system_time_before(__cdf_time_t a, __cdf_time_t b) -{ - return __cdf_system_time_after(b, a); -} - -/** - * __cdf_system_time_before() - Check if a atleast as recent as b, if not - * later - * @a: Time stamp value a - * @b: Time stamp value b - * - * Return: - * true if a >= b else false - */ -static inline bool __cdf_system_time_after_eq(__cdf_time_t a, __cdf_time_t b) -{ - return (long)(a) - (long)(b) >= 0; -} - -/** - * __cdf_get_monotonic_boottime() - get monotonic kernel boot time - * This API is similar to cdf_get_system_boottime but it includes - * time spent in suspend. - * - * Return: Time in microseconds - */ -#ifdef CONFIG_CNSS -static inline uint64_t __cdf_get_monotonic_boottime(void) -{ - struct timespec ts; - - cnss_get_monotonic_boottime(&ts); - - return ((uint64_t) ts.tv_sec * 1000000) + (ts.tv_nsec / 1000); -} -#else -static inline uint64_t __cdf_get_monotonic_boottime(void) -{ - return __cdf_system_ticks_to_msecs(__cdf_system_ticks()) * 1000; -} -#endif /* CONFIG_CNSS */ - -#ifdef QCA_WIFI_3_0_ADRASTEA -/** - * __cdf_get_qtimer_ticks() - get QTIMER ticks - * - * Returns QTIMER(19.2 MHz) clock ticks. To convert it into seconds - * divide it by 19200. - * - * Return: QTIMER(19.2 MHz) clock ticks - */ -static inline uint64_t __cdf_get_qtimer_ticks(void) -{ - return arch_counter_get_cntpct(); -} -#endif /* QCA_WIFI_3_0_ADRASTEA */ - -#endif diff --git a/core/cds/src/cds_api.c b/core/cds/src/cds_api.c index 7b49adf4516a..b1455353f0bb 100644 --- a/core/cds/src/cds_api.c +++ b/core/cds/src/cds_api.c @@ -1663,7 +1663,7 @@ uint64_t cds_get_monotonic_boottime(void) cnss_get_monotonic_boottime(&ts); return ((uint64_t) ts.tv_sec * 1000000) + (ts.tv_nsec / 1000); #else - return ((uint64_t)cdf_system_ticks_to_msecs(cdf_system_ticks()) * + return ((uint64_t)qdf_system_ticks_to_msecs(qdf_system_ticks()) * 1000); #endif } diff --git a/core/dp/htt/htt_rx.c b/core/dp/htt/htt_rx.c index 6e6a9142d6a4..768736f22a31 100644 --- a/core/dp/htt/htt_rx.c +++ b/core/dp/htt/htt_rx.c @@ -877,7 +877,7 @@ htt_rx_amsdu_pop_ll(htt_pdev_handle pdev, while (dbg_iter && (!((*(uint32_t *) &rx_desc->attention) & RX_ATTENTION_0_MSDU_DONE_MASK))) { - cdf_mdelay(1); + qdf_mdelay(1); cdf_invalidate_range((void *)rx_desc, (void *)((char *)rx_desc + diff --git a/core/dp/htt/htt_tx.c b/core/dp/htt/htt_tx.c index 499ccad7c7ea..d0255ca210fc 100644 --- a/core/dp/htt/htt_tx.c +++ b/core/dp/htt/htt_tx.c @@ -40,7 +40,7 @@ #include <cdf_types.h> /* cdf_dma_addr_t */ #include <cdf_memory.h> /* cdf_os_mem_alloc_consistent et al */ #include <cdf_nbuf.h> /* cdf_nbuf_t, etc. */ -#include <cdf_time.h> /* cdf_mdelay */ +#include <qdf_time.h> /* qdf_mdelay */ #include <htt.h> /* htt_tx_msdu_desc_t */ #include <htc.h> /* HTC_HDR_LENGTH */ diff --git a/core/dp/txrx/ol_rx_defrag.c b/core/dp/txrx/ol_rx_defrag.c index 33e829ed5ebf..74cbe897998a 100644 --- a/core/dp/txrx/ol_rx_defrag.c +++ b/core/dp/txrx/ol_rx_defrag.c @@ -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. * @@ -68,7 +68,7 @@ #include <cdf_memory.h> #include <ol_rx_defrag.h> #include <enet.h> -#include <cdf_time.h> /* cdf_system_time */ +#include <qdf_time.h> /* qdf_system_time */ #define DEFRAG_IEEE80211_ADDR_EQ(a1, a2) \ (cdf_mem_compare(a1, a2, IEEE80211_ADDR_LEN) == 0) @@ -279,7 +279,7 @@ ol_rx_reorder_store_frag(ol_txrx_pdev_handle pdev, peer->tids_rx_reorder[tid].defrag_timeout_ms = 0; peer->tids_last_seq[tid] = seq_num; } else if (pdev->rx.flags.defrag_timeout_check) { - uint32_t now_ms = cdf_system_ticks_to_msecs(cdf_system_ticks()); + uint32_t now_ms = qdf_system_ticks_to_msecs(qdf_system_ticks()); peer->tids_rx_reorder[tid].defrag_timeout_ms = now_ms + pdev->rx.defrag.timeout_ms; @@ -419,7 +419,7 @@ void ol_rx_defrag_waitlist_remove(struct ol_txrx_peer_t *peer, unsigned tid) void ol_rx_defrag_waitlist_flush(struct ol_txrx_pdev_t *pdev) { struct ol_rx_reorder_t *rx_reorder, *tmp; - uint32_t now_ms = cdf_system_ticks_to_msecs(cdf_system_ticks()); + uint32_t now_ms = qdf_system_ticks_to_msecs(qdf_system_ticks()); TAILQ_FOREACH_SAFE(rx_reorder, &pdev->rx.defrag.waitlist, defrag_waitlist_elem, tmp) { diff --git a/core/dp/txrx/ol_rx_pn.c b/core/dp/txrx/ol_rx_pn.c index 74ffdda985e9..f61ccd1b447b 100644 --- a/core/dp/txrx/ol_rx_pn.c +++ b/core/dp/txrx/ol_rx_pn.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2013-2015 The Linux Foundation. All rights reserved. + * Copyright (c) 2011, 2013-2016 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -161,7 +161,7 @@ ol_rx_pn_check_base(struct ol_txrx_vdev_t *vdev, */ msdu = mpdu; current_time_ms = - cdf_system_ticks_to_msecs(cdf_system_ticks()); + qdf_system_ticks_to_msecs(qdf_system_ticks()); if (TXRX_PN_CHECK_FAILURE_PRINT_PERIOD_MS < (current_time_ms - last_pncheck_print_time)) { last_pncheck_print_time = current_time_ms; diff --git a/core/dp/txrx/ol_rx_reorder.c b/core/dp/txrx/ol_rx_reorder.c index da0d486dddeb..79e42e743306 100644 --- a/core/dp/txrx/ol_rx_reorder.c +++ b/core/dp/txrx/ol_rx_reorder.c @@ -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. * @@ -656,8 +656,8 @@ ol_rx_pn_ind_handler(ol_txrx_pdev_handle pdev, htt_rx_mpdu_desc_pn(htt_pdev, rx_desc, &pn, pn_len); - current_time_ms = cdf_system_ticks_to_msecs( - cdf_system_ticks()); + current_time_ms = qdf_system_ticks_to_msecs( + qdf_system_ticks()); if (TXRX_PN_CHECK_FAILURE_PRINT_PERIOD_MS < (current_time_ms - last_pncheck_print_time)) { diff --git a/core/dp/txrx/ol_rx_reorder_timeout.c b/core/dp/txrx/ol_rx_reorder_timeout.c index cc2e2a32c78f..f4e80775877e 100644 --- a/core/dp/txrx/ol_rx_reorder_timeout.c +++ b/core/dp/txrx/ol_rx_reorder_timeout.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. * @@ -29,7 +29,7 @@ /* generic utilities */ #include <cdf_nbuf.h> /* cdf_nbuf_t, etc. */ #include <cdf_softirq_timer.h> -#include <cdf_time.h> +#include <qdf_time.h> /* datapath internal interfaces */ #include <ol_txrx_types.h> /* ol_txrx_pdev_t, etc. */ @@ -91,7 +91,7 @@ ol_rx_reorder_timeout_add(struct ol_txrx_peer_t *peer, uint8_t tid) list_elem->tid = tid; /* set the expiration timestamp */ - time_now_ms = cdf_system_ticks_to_msecs(cdf_system_ticks()); + time_now_ms = qdf_system_ticks_to_msecs(qdf_system_ticks()); list_elem->timestamp_ms = time_now_ms + rx_reorder_timeout_ac->duration_ms; @@ -133,7 +133,7 @@ static void ol_rx_reorder_timeout(void *arg) struct ol_tx_reorder_cat_timeout_t *rx_reorder_timeout_ac; rx_reorder_timeout_ac = (struct ol_tx_reorder_cat_timeout_t *)arg; - time_now_ms = cdf_system_ticks_to_msecs(cdf_system_ticks()); + time_now_ms = qdf_system_ticks_to_msecs(qdf_system_ticks()); pdev = rx_reorder_timeout_ac->pdev; cdf_spin_lock(&pdev->rx.mutex); diff --git a/core/dp/txrx/ol_tx_desc.c b/core/dp/txrx/ol_tx_desc.c index 48499e818a8e..4a70fdb81462 100644 --- a/core/dp/txrx/ol_tx_desc.c +++ b/core/dp/txrx/ol_tx_desc.c @@ -30,7 +30,7 @@ #include <cdf_util.h> /* cdf_assert */ #include <cdf_lock.h> /* cdf_spinlock */ #ifdef QCA_COMPUTE_TX_DELAY -#include <cdf_time.h> /* cdf_system_ticks */ +#include <qdf_time.h> /* qdf_system_ticks */ #endif #include <ol_htt_tx_api.h> /* htt_tx_desc_id */ @@ -79,7 +79,7 @@ static inline void ol_tx_desc_compute_delay(struct ol_tx_desc_t *tx_desc) __func__, tx_desc->entry_timestamp_ticks); cdf_assert(0); } - tx_desc->entry_timestamp_ticks = cdf_system_ticks(); + tx_desc->entry_timestamp_ticks = qdf_system_ticks(); } static inline void ol_tx_desc_reset_timestamp(struct ol_tx_desc_t *tx_desc) { diff --git a/core/dp/txrx/ol_tx_send.c b/core/dp/txrx/ol_tx_send.c index bc762694cecf..e729f0241e78 100644 --- a/core/dp/txrx/ol_tx_send.c +++ b/core/dp/txrx/ol_tx_send.c @@ -27,7 +27,7 @@ #include <cdf_atomic.h> /* cdf_atomic_inc, etc. */ #include <cdf_lock.h> /* cdf_os_spinlock */ -#include <cdf_time.h> /* cdf_system_ticks, etc. */ +#include <qdf_time.h> /* qdf_system_ticks, etc. */ #include <cdf_nbuf.h> /* cdf_nbuf_t */ #include <cdf_net_types.h> /* ADF_NBUF_TX_EXT_TID_INVALID */ @@ -655,7 +655,7 @@ ol_tx_inspect_handler(ol_txrx_pdev_handle pdev, void ol_tx_set_compute_interval(ol_txrx_pdev_handle pdev, uint32_t interval) { - pdev->tx_delay.avg_period_ticks = cdf_system_msecs_to_ticks(interval); + pdev->tx_delay.avg_period_ticks = qdf_system_msecs_to_ticks(interval); } void @@ -707,7 +707,7 @@ ol_tx_delay(ol_txrx_pdev_handle pdev, ol_tx_delay_avg(data->avgs.transmit_sum_ticks, data->avgs.transmit_num); *tx_delay_microsec = - cdf_system_ticks_to_msecs(avg_delay_ticks * 1000); + qdf_system_ticks_to_msecs(avg_delay_ticks * 1000); } else { /* * This case should only happen if there's a query @@ -720,7 +720,7 @@ ol_tx_delay(ol_txrx_pdev_handle pdev, ol_tx_delay_avg(data->avgs.queue_sum_ticks, data->avgs.queue_num); *queue_delay_microsec = - cdf_system_ticks_to_msecs(avg_delay_ticks * 1000); + qdf_system_ticks_to_msecs(avg_delay_ticks * 1000); } else { /* * This case should only happen if there's a query @@ -889,7 +889,7 @@ ol_tx_delay_compute(struct ol_txrx_pdev_t *pdev, uint16_t *desc_ids, int num_msdus) { int i, index, cat; - uint32_t now_ticks = cdf_system_ticks(); + uint32_t now_ticks = qdf_system_ticks(); uint32_t tx_delay_transmit_ticks, tx_delay_queue_ticks; uint32_t avg_time_ticks; struct ol_tx_delay_data *data; diff --git a/core/dp/txrx/ol_txrx.c b/core/dp/txrx/ol_txrx.c index 9e49c6dcf8f4..f8629ba4315f 100644 --- a/core/dp/txrx/ol_txrx.c +++ b/core/dp/txrx/ol_txrx.c @@ -874,11 +874,11 @@ ol_txrx_pdev_attach(ol_txrx_pdev_handle pdev) cdf_spinlock_init(&pdev->tx_delay.mutex); /* initialize compute interval with 5 seconds (ESE default) */ - pdev->tx_delay.avg_period_ticks = cdf_system_msecs_to_ticks(5000); + pdev->tx_delay.avg_period_ticks = qdf_system_msecs_to_ticks(5000); { uint32_t bin_width_1000ticks; bin_width_1000ticks = - cdf_system_msecs_to_ticks + qdf_system_msecs_to_ticks (QCA_TX_DELAY_HIST_INTERNAL_BIN_WIDTH_MS * 1000); /* @@ -1345,7 +1345,7 @@ ol_txrx_peer_attach(ol_txrx_pdev_handle pdev, if (wait_on_deletion) { /* wait for peer deletion */ rc = qdf_wait_single_event(&vdev->wait_delete_comp, - cdf_system_msecs_to_ticks(PEER_DELETION_TIMEOUT)); + qdf_system_msecs_to_ticks(PEER_DELETION_TIMEOUT)); if (!rc) { TXRX_PRINT(TXRX_PRINT_LEVEL_ERR, "timedout waiting for peer(%d) deletion\n", diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h index fb6a0eb517b8..8b05e0c35388 100644 --- a/core/hdd/inc/wlan_hdd_main.h +++ b/core/hdd/inc/wlan_hdd_main.h @@ -806,7 +806,7 @@ struct hdd_netif_queue_stats { * @pause_map: pause map */ struct hdd_netif_queue_history { - cdf_time_t time; + qdf_time_t time; uint16_t netif_action; uint16_t netif_reason; uint32_t pause_map; diff --git a/core/hdd/src/wlan_hdd_ext_scan.c b/core/hdd/src/wlan_hdd_ext_scan.c index 65d31d5d780d..d2179910cabc 100644 --- a/core/hdd/src/wlan_hdd_ext_scan.c +++ b/core/hdd/src/wlan_hdd_ext_scan.c @@ -544,7 +544,7 @@ wlan_hdd_cfg80211_extscan_hotlist_match_ind(void *ctx, data->ap_found); for (i = 0; i < data->numOfAps; i++) { - data->ap[i].ts = cdf_get_monotonic_boottime(); + data->ap[i].ts = qdf_get_monotonic_boottime(); hddLog(LOG1, "[i=%d] Timestamp %llu " "Ssid: %s " @@ -3256,7 +3256,7 @@ __wlan_hdd_cfg80211_extscan_start(struct wiphy *wiphy, goto fail; } - pHddCtx->ext_scan_start_since_boot = cdf_get_monotonic_boottime(); + pHddCtx->ext_scan_start_since_boot = qdf_get_monotonic_boottime(); hddLog(LOG1, FL("Timestamp since boot: %llu"), pHddCtx->ext_scan_start_since_boot); diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 1f26a1bb802e..ba20df84a534 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -4443,7 +4443,7 @@ void wlan_hdd_display_netif_queue_history(hdd_context_t *hdd_ctx) for (i = 0; i < WLAN_HDD_MAX_HISTORY_ENTRY; i++) { hddLog(CDF_TRACE_LEVEL_ERROR, "%d: %u: %s: %s: %x", - i, cdf_system_ticks_to_msecs( + i, qdf_system_ticks_to_msecs( adapter->queue_oper_history[i].time), hdd_action_type_to_string( adapter->queue_oper_history[i].netif_action), diff --git a/core/hdd/src/wlan_hdd_tx_rx.c b/core/hdd/src/wlan_hdd_tx_rx.c index 1aec90ab677c..3826d725c048 100644 --- a/core/hdd/src/wlan_hdd_tx_rx.c +++ b/core/hdd/src/wlan_hdd_tx_rx.c @@ -1044,7 +1044,7 @@ void wlan_hdd_netif_queue_control(hdd_adapter_t *adapter, wlan_hdd_update_queue_oper_stats(adapter, action, reason); adapter->queue_oper_history[adapter->history_index].time = - cdf_system_ticks(); + qdf_system_ticks(); adapter->queue_oper_history[adapter->history_index].netif_action = action; adapter->queue_oper_history[adapter->history_index].netif_reason = diff --git a/core/sap/dfs/inc/dfs.h b/core/sap/dfs/inc/dfs.h index f3bdff8e7efb..e65543fbf519 100644 --- a/core/sap/dfs/inc/dfs.h +++ b/core/sap/dfs/inc/dfs.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005-2015 The Linux Foundation. All rights reserved. + * Copyright (c) 2005-2016 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -53,7 +53,7 @@ #include <cdf_util.h> /* cdf_assert */ #include <cdf_lock.h> /* cdf_spinlock */ #include <cds_queue.h> /* TAILQ */ -#include <cdf_time.h> +#include <qdf_time.h> #include <cdf_softirq_timer.h> #include <cdf_memory.h> #include <osdep.h> diff --git a/core/sap/dfs/src/dfs_nol.c b/core/sap/dfs/src/dfs_nol.c index 278bc31bc452..400e5159ea16 100644 --- a/core/sap/dfs/src/dfs_nol.c +++ b/core/sap/dfs/src/dfs_nol.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2015 The Linux Foundation. All rights reserved. + * Copyright (c) 2002-2016 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -27,7 +27,7 @@ /*=========================================================================== - dfs_nol.c + dfs_nol.c OVERVIEW: @@ -41,7 +41,7 @@ /*=========================================================================== - EDIT HISTORY FOR FILE + EDIT HISTORY FOR FILE This section contains comments describing changes made to the module. Notice that changes are listed in reverse chronological order. @@ -63,7 +63,7 @@ #if defined(ATH_SUPPORT_DFS) && !defined(ATH_DFS_RADAR_DETECTION_ONLY) #include "dfs_ioctl.h" #include "dfs_ioctl_private.h" -#include "cdf_time.h" /* cdf_time_t, cdf_system_time_after */ +#include "qdf_time.h" /* qdf_time_t, qdf_system_time_after */ static void dfs_nol_delete(struct ath_dfs *dfs, uint16_t delfreq, uint16_t delchwidth); @@ -113,7 +113,7 @@ void dfs_print_nol(struct ath_dfs *dfs) DFS_DPRINTK(dfs, ATH_DEBUG_DFS_NOL, "%s: NOL", __func__); while (nol != NULL) { diff_ms = - cdf_system_ticks_to_msecs(cdf_system_ticks() - + qdf_system_ticks_to_msecs(qdf_system_ticks() - nol->nol_start_ticks); diff_ms = (nol->nol_timeout_ms - diff_ms); remaining_sec = diff_ms / 1000; /* convert to seconds */ @@ -160,7 +160,7 @@ void dfs_set_nol(struct ath_dfs *dfs, struct dfsreq_nolelem *dfs_nol, int nchan) for (i = 0; i < nchan; i++) { nol_time_left_ms = - cdf_system_ticks_to_msecs(cdf_system_ticks() - + qdf_system_ticks_to_msecs(qdf_system_ticks() - dfs_nol[i].nol_start_ticks); if (nol_time_left_ms < dfs_nol[i].nol_timeout_ms) { chan.ic_freq = dfs_nol[i].nol_freq; @@ -198,7 +198,7 @@ dfs_nol_addchan(struct ath_dfs *dfs, struct dfs_ieee80211_channel *chan, while (nol != NULL) { if ((nol->nol_freq == chan->ic_freq) && (nol->nol_chwidth == ch_width)) { - nol->nol_start_ticks = cdf_system_ticks(); + nol->nol_start_ticks = qdf_system_ticks(); nol->nol_timeout_ms = dfs_nol_timeout * TIME_IN_MS; DFS_DPRINTK(dfs, ATH_DEBUG_DFS_NOL, "%s: Update OS Ticks for NOL %d MHz / %d MHz", @@ -228,7 +228,7 @@ dfs_nol_addchan(struct ath_dfs *dfs, struct dfs_ieee80211_channel *chan, } elem->nol_freq = chan->ic_freq; elem->nol_chwidth = ch_width; - elem->nol_start_ticks = cdf_system_ticks(); + elem->nol_start_ticks = qdf_system_ticks(); elem->nol_timeout_ms = dfs_nol_timeout * TIME_IN_MS; elem->nol_next = NULL; if (prev) { @@ -285,8 +285,8 @@ dfs_nol_delete(struct ath_dfs *dfs, uint16_t delfreq, uint16_t delchwidth) DFS_DPRINTK(dfs, ATH_DEBUG_DFS_NOL, "%s removing channel %d/%dMHz from NOL tstamp=%d", __func__, nol->nol_freq, nol->nol_chwidth, - (cdf_system_ticks_to_msecs - (cdf_system_ticks()) / 1000)); + (qdf_system_ticks_to_msecs + (qdf_system_ticks()) / 1000)); OS_CANCEL_TIMER(&nol->nol_timer); OS_FREE(nol); nol = NULL; diff --git a/core/sme/src/csr/csr_neighbor_roam.c b/core/sme/src/csr/csr_neighbor_roam.c index ba92198d1d09..41034a8d8e4a 100644 --- a/core/sme/src/csr/csr_neighbor_roam.c +++ b/core/sme/src/csr/csr_neighbor_roam.c @@ -1402,7 +1402,7 @@ csr_neighbor_roam_process_scan_results(tpAniSirGlobal mac_ctx, uint32_t cur_ap_rssi; uint32_t age_ticks = 0; uint32_t limit_ticks = - cdf_system_msecs_to_ticks(ROAM_AP_AGE_LIMIT_MS); + qdf_system_msecs_to_ticks(ROAM_AP_AGE_LIMIT_MS); uint8_t num_candidates = 0; uint8_t num_dropped = 0; /* diff --git a/core/utils/logging/src/wlan_logging_sock_svc.c b/core/utils/logging/src/wlan_logging_sock_svc.c index 60cbfb3b1bb6..09fec12a8890 100644 --- a/core/utils/logging/src/wlan_logging_sock_svc.c +++ b/core/utils/logging/src/wlan_logging_sock_svc.c @@ -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,7 +35,7 @@ #include <cds_api.h> #include <wlan_logging_sock_svc.h> #include <kthread.h> -#include <cdf_time.h> +#include <qdf_time.h> #include <wlan_ptt_sock_svc.h> #include "pktlog_ac.h" #include <host_diag_core_event.h> @@ -322,7 +322,7 @@ int wlan_log_to_user(CDF_TRACE_LEVEL log_level, char *to_be_sent, int length) return 0; } - ts = cdf_get_log_timestamp(); + ts = qdf_get_log_timestamp(); tlen = wlan_add_user_log_time_stamp(tbuf, sizeof(tbuf), ts); /* 1+1 indicate '\n'+'\0' */ diff --git a/core/wmi/wmi_unified.c b/core/wmi/wmi_unified.c index e57c4610fceb..4daab4026b80 100644 --- a/core/wmi/wmi_unified.c +++ b/core/wmi/wmi_unified.c @@ -70,7 +70,7 @@ struct wmi_event_debug wmi_rx_event_log_buffer[WMI_EVENT_DEBUG_MAX_ENTRY]; wmi_command_log_buffer[g_wmi_command_buf_idx].command = a; \ cdf_mem_copy(wmi_command_log_buffer[g_wmi_command_buf_idx].data, b, 16); \ wmi_command_log_buffer[g_wmi_command_buf_idx].time = \ - cdf_get_log_timestamp(); \ + qdf_get_log_timestamp(); \ g_wmi_command_buf_idx++; \ } @@ -81,7 +81,7 @@ struct wmi_event_debug wmi_rx_event_log_buffer[WMI_EVENT_DEBUG_MAX_ENTRY]; cdf_mem_copy(wmi_command_tx_cmp_log_buffer \ [g_wmi_command_tx_cmp_buf_idx].data, b, 16); \ wmi_command_tx_cmp_log_buffer[g_wmi_command_tx_cmp_buf_idx].time = \ - cdf_get_log_timestamp(); \ + qdf_get_log_timestamp(); \ g_wmi_command_tx_cmp_buf_idx++; \ } @@ -91,17 +91,17 @@ struct wmi_event_debug wmi_rx_event_log_buffer[WMI_EVENT_DEBUG_MAX_ENTRY]; wmi_event_log_buffer[g_wmi_event_buf_idx].event = a; \ cdf_mem_copy(wmi_event_log_buffer[g_wmi_event_buf_idx].data, b, 16); \ wmi_event_log_buffer[g_wmi_event_buf_idx].time = \ - cdf_get_log_timestamp(); \ + qdf_get_log_timestamp(); \ g_wmi_event_buf_idx++; \ } -#define WMI_RX_EVENT_RECORD(a,b) { \ +#define WMI_RX_EVENT_RECORD(a, b) { \ if (WMI_EVENT_DEBUG_MAX_ENTRY <= g_wmi_rx_event_buf_idx) \ g_wmi_rx_event_buf_idx = 0; \ wmi_rx_event_log_buffer[g_wmi_rx_event_buf_idx].event = a; \ cdf_mem_copy(wmi_rx_event_log_buffer[g_wmi_rx_event_buf_idx].data, b, 16); \ wmi_rx_event_log_buffer[g_wmi_rx_event_buf_idx].time = \ - cdf_get_log_timestamp(); \ + qdf_get_log_timestamp(); \ g_wmi_rx_event_buf_idx++; \ } /* wmi_mgmt commands */ @@ -130,7 +130,7 @@ wmi_mgmt_event_log_buffer[WMI_MGMT_EVENT_DEBUG_MAX_ENTRY]; wmi_mgmt_command_log_buffer[g_wmi_mgmt_command_buf_idx].data,\ b, 16); \ wmi_mgmt_command_log_buffer[g_wmi_mgmt_command_buf_idx].time = \ - cdf_get_log_timestamp(); \ + qdf_get_log_timestamp(); \ g_wmi_mgmt_command_buf_idx++; \ } @@ -144,7 +144,7 @@ wmi_mgmt_event_log_buffer[WMI_MGMT_EVENT_DEBUG_MAX_ENTRY]; [g_wmi_mgmt_command_tx_cmp_buf_idx].data, b, 16); \ wmi_mgmt_command_tx_cmp_log_buffer[g_wmi_mgmt_command_tx_cmp_buf_idx].\ time =\ - cdf_get_log_timestamp(); \ + qdf_get_log_timestamp(); \ g_wmi_mgmt_command_tx_cmp_buf_idx++; \ } @@ -155,7 +155,7 @@ wmi_mgmt_event_log_buffer[WMI_MGMT_EVENT_DEBUG_MAX_ENTRY]; cdf_mem_copy(wmi_mgmt_event_log_buffer[g_wmi_mgmt_event_buf_idx].data,\ b, 16); \ wmi_mgmt_event_log_buffer[g_wmi_mgmt_event_buf_idx].time = \ - cdf_get_log_timestamp(); \ + qdf_get_log_timestamp(); \ g_wmi_mgmt_event_buf_idx++; \ } @@ -168,7 +168,7 @@ int wmi_get_host_credits(wmi_unified_t wmi_handle); #ifdef MEMORY_DEBUG wmi_buf_t wmi_buf_alloc_debug(wmi_unified_t wmi_handle, uint16_t len, uint8_t *file_name, - uint32_t line_num) + uint32_t line_num) { wmi_buf_t wmi_buf; @@ -855,7 +855,7 @@ int wmi_unified_cmd_send(wmi_unified_t wmi_handle, wmi_buf_t buf, int len, SET_HTC_PACKET_INFO_TX(pkt, NULL, cdf_nbuf_data(buf), len + sizeof(WMI_CMD_HDR), - /* htt_host_data_dl_len(buf)+20 */ + /* htt_host_data_dl_len(buf)+20 */ wmi_handle->wmi_endpoint_id, htc_tag); SET_HTC_PACKET_NET_BUF_CONTEXT(pkt, buf); @@ -883,7 +883,7 @@ int wmi_unified_cmd_send(wmi_unified_t wmi_handle, wmi_buf_t buf, int len, pr_err("%s %d, htc_send_pkt failed\n", __func__, __LINE__); } - return ((status == A_OK) ? EOK : -1); + return (status == A_OK) ? EOK : -1; } /* WMI Event handler register API */ @@ -928,8 +928,8 @@ int wmi_unified_unregister_event_handler(wmi_unified_t wmi_handle, WMI_EVT_ID event_id) { uint32_t idx = 0; - if ((idx = - wmi_unified_get_event_handler_ix(wmi_handle, event_id)) == -1) { + idx = wmi_unified_get_event_handler_ix(wmi_handle, event_id); + if (idx == -1) { printk("%s : event handler is not registered: event id 0x%x \n", __func__, event_id); return -1; @@ -1344,8 +1344,8 @@ wmi_unified_connect_htc_service(struct wmi_unified *wmi_handle, /* connect to control service */ connect.service_id = WMI_CONTROL_SVC; - if ((status = - htc_connect_service(htc_handle, &connect, &response)) != EOK) { + status = htc_connect_service(htc_handle, &connect, &response); + if (status != EOK) { printk (" Failed to connect to WMI CONTROL service status:%d \n", status); |
