qcacmn: Make inline OS-abstraction APIs as non-inline
OS-abstraction API's are made non-inline to avoid direct usage of kernel API's. Change-Id: Ib35aa9271d98054ab582fc079e62714bb7fdae99
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -184,6 +184,32 @@ qal_vbus_register_driver(struct qdf_pfm_drv *pfdev);
|
|||||||
*/
|
*/
|
||||||
QDF_STATUS
|
QDF_STATUS
|
||||||
qal_vbus_deregister_driver(struct qdf_pfm_drv *pfdev);
|
qal_vbus_deregister_driver(struct qdf_pfm_drv *pfdev);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qal_vbus_gpio_set_value_cansleep() - assign a gpio's value
|
||||||
|
* @gpio: gpio whose value will be assigned
|
||||||
|
* @value: value to assign
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS_SUCCESS on success
|
||||||
|
*/
|
||||||
|
QDF_STATUS
|
||||||
|
qal_vbus_gpio_set_value_cansleep(unsigned int gpio, int value);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* rcu_read_lock() - mark the beginning of an RCU read-side critical section
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS_SUCCESS on success
|
||||||
|
*/
|
||||||
|
QDF_STATUS
|
||||||
|
qal_vbus_rcu_read_lock(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* rcu_read_unlock() - mark the end of an RCU read-side critical section
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS_SUCCESS on success
|
||||||
|
*/
|
||||||
|
QDF_STATUS
|
||||||
|
qal_vbus_rcu_read_unlock(void);
|
||||||
#else
|
#else
|
||||||
static inline QDF_STATUS
|
static inline QDF_STATUS
|
||||||
qal_vbus_get_iorsc(int devnum, uint32_t flag, char *devname)
|
qal_vbus_get_iorsc(int devnum, uint32_t flag, char *devname)
|
||||||
@@ -262,5 +288,24 @@ qal_vbus_deregister_driver(struct qdf_pfm_drv *pfdev)
|
|||||||
{
|
{
|
||||||
return __qal_vbus_deregister_driver(pfdev);
|
return __qal_vbus_deregister_driver(pfdev);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline QDF_STATUS
|
||||||
|
qal_vbus_gpio_set_value_cansleep(unsigned int gpio, int value)
|
||||||
|
{
|
||||||
|
return __qal_vbus_gpio_set_value_cansleep(gpio, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline QDF_STATUS
|
||||||
|
qal_vbus_rcu_read_lock(void)
|
||||||
|
{
|
||||||
|
return __qal_vbus_rcu_read_lock();
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline QDF_STATUS
|
||||||
|
qal_vbus_rcu_read_unlock(void)
|
||||||
|
{
|
||||||
|
return __qal_vbus_rcu_read_unlock();
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* __QAL_VBUS_DEV_H */
|
#endif /* __QAL_VBUS_DEV_H */
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2019-2020 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2019-2021 The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -265,4 +265,56 @@ __qal_vbus_deregister_driver(struct qdf_pfm_drv *pfdev)
|
|||||||
|
|
||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* __qal_vbus_gpio_set_value_cansleep() - assign a gpio's raw value
|
||||||
|
* @gpio: gpio whose value will be assigned
|
||||||
|
* @value: value to assign
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS_SUCCESS on success
|
||||||
|
*/
|
||||||
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)
|
||||||
|
static inline QDF_STATUS
|
||||||
|
__qal_vbus_gpio_set_value_cansleep(unsigned int gpio, int value)
|
||||||
|
{
|
||||||
|
gpio_set_value_cansleep(gpio, value);
|
||||||
|
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
static inline QDF_STATUS
|
||||||
|
__qal_vbus_gpio_set_value_cansleep(unsigned int gpio, int value)
|
||||||
|
{
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* __qal_vbus_rcu_read_lock() - mark the beginning of an RCU read-side critical
|
||||||
|
* section
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS_SUCCESS on success
|
||||||
|
*/
|
||||||
|
static inline QDF_STATUS
|
||||||
|
__qal_vbus_rcu_read_lock(void)
|
||||||
|
{
|
||||||
|
rcu_read_lock();
|
||||||
|
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* __qal_vbus_rcu_read_unlock() - marks the end of an RCU read-side critical
|
||||||
|
* section.
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS_SUCCESS on success
|
||||||
|
*/
|
||||||
|
static inline QDF_STATUS
|
||||||
|
__qal_vbus_rcu_read_unlock(void)
|
||||||
|
{
|
||||||
|
rcu_read_unlock();
|
||||||
|
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* __I_QAL_VBUS_DEV_H */
|
#endif /* __I_QAL_VBUS_DEV_H */
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2017-2020 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2017-2021 The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -32,6 +32,9 @@
|
|||||||
/* representation of qdf dentry */
|
/* representation of qdf dentry */
|
||||||
typedef __qdf_dentry_t qdf_dentry_t;
|
typedef __qdf_dentry_t qdf_dentry_t;
|
||||||
typedef __qdf_debugfs_file_t qdf_debugfs_file_t;
|
typedef __qdf_debugfs_file_t qdf_debugfs_file_t;
|
||||||
|
typedef __qdf_debugfs_blob_wrap_t qdf_debugfs_blob_wrap_t;
|
||||||
|
typedef __qdf_entry_t qdf_entry_t;
|
||||||
|
typedef __qdf_file_ops_t qdf_file_ops_t;
|
||||||
|
|
||||||
/* qdf file modes */
|
/* qdf file modes */
|
||||||
#define QDF_FILE_USR_READ 00400
|
#define QDF_FILE_USR_READ 00400
|
||||||
@@ -272,6 +275,39 @@ qdf_dentry_t qdf_debugfs_create_file_simplified(const char *name, uint16_t mode,
|
|||||||
*/
|
*/
|
||||||
int qdf_debugfs_printer(void *priv, const char *fmt, ...);
|
int qdf_debugfs_printer(void *priv, const char *fmt, ...);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_debugfs_create_blob() - create a debugfs file that is used to read
|
||||||
|
* a binary blob
|
||||||
|
* @name: a pointer to a string containing the name of the file to create.
|
||||||
|
* @mode: the permission that the file should have
|
||||||
|
* @parent: a pointer to the parent dentry for this file. This should be a
|
||||||
|
* directory dentry if set. If this parameter is %NULL, then the
|
||||||
|
* file will be created in the root of the debugfs filesystem.
|
||||||
|
* @blob: a pointer to a qdf_debugfs_blob_wrap_t which contains a pointer
|
||||||
|
* to the blob data and the size of the data.
|
||||||
|
*
|
||||||
|
* Return: dentry structure pointer on success, NULL otherwise.
|
||||||
|
*/
|
||||||
|
qdf_dentry_t qdf_debugfs_create_blob(const char *name, umode_t mode,
|
||||||
|
qdf_dentry_t parent,
|
||||||
|
qdf_debugfs_blob_wrap_t blob);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_debugfs_create_entry() - create a debugfs file for read or write
|
||||||
|
* something
|
||||||
|
* @name: name of the file
|
||||||
|
* @mode: qdf file mode
|
||||||
|
* @parent: parent node. If NULL, defaults to base qdf_debugfs_root
|
||||||
|
* @data: Something data that caller want to read or write
|
||||||
|
* @fops: file operations { .read, .write ... }
|
||||||
|
*
|
||||||
|
* Return: dentry structure pointer on success, NULL otherwise.
|
||||||
|
*/
|
||||||
|
qdf_dentry_t qdf_debugfs_create_entry(const char *name, uint16_t mode,
|
||||||
|
qdf_dentry_t parent,
|
||||||
|
qdf_entry_t data,
|
||||||
|
const qdf_file_ops_t fops);
|
||||||
|
|
||||||
#else /* WLAN_DEBUGFS */
|
#else /* WLAN_DEBUGFS */
|
||||||
|
|
||||||
static inline QDF_STATUS qdf_debugfs_init(void)
|
static inline QDF_STATUS qdf_debugfs_init(void)
|
||||||
@@ -373,5 +409,22 @@ int qdf_debugfs_printer(void *priv, const char *fmt, ...)
|
|||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline
|
||||||
|
qdf_dentry_t qdf_debugfs_create_blob(const char *name, umode_t mode,
|
||||||
|
qdf_dentry_t parent,
|
||||||
|
qdf_debugfs_blob_wrap_t blob)
|
||||||
|
{
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline
|
||||||
|
qdf_dentry_t qdf_debugfs_create_entry(const char *name, uint16_t mode,
|
||||||
|
qdf_dentry_t parent,
|
||||||
|
qdf_entry_t data,
|
||||||
|
const qdf_file_ops_t *fops)
|
||||||
|
{
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
#endif /* WLAN_DEBUGFS */
|
#endif /* WLAN_DEBUGFS */
|
||||||
#endif /* _QDF_DEBUGFS_H */
|
#endif /* _QDF_DEBUGFS_H */
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2014-2020 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2014-2021 The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -49,6 +49,155 @@ typedef __qdf_workqueue_t qdf_workqueue_t;
|
|||||||
*/
|
*/
|
||||||
typedef __qdf_bh_t qdf_bh_t;
|
typedef __qdf_bh_t qdf_bh_t;
|
||||||
|
|
||||||
|
#ifdef ENHANCED_OS_ABSTRACTION
|
||||||
|
/**
|
||||||
|
* qdf_create_bh - creates the bottom half deferred handler
|
||||||
|
* @bh: pointer to bottom
|
||||||
|
* @func: deferred function to run at bottom half interrupt context.
|
||||||
|
* @arg: argument for the deferred function
|
||||||
|
* Return: none
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
qdf_create_bh(qdf_bh_t *bh, qdf_defer_fn_t func, void *arg);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_sched - schedule a bottom half (DPC)
|
||||||
|
* @bh: pointer to bottom
|
||||||
|
* Return: none
|
||||||
|
*/
|
||||||
|
void qdf_sched_bh(qdf_bh_t *bh);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_destroy_bh - destroy the bh (synchronous)
|
||||||
|
* @bh: pointer to bottom
|
||||||
|
* Return: none
|
||||||
|
*/
|
||||||
|
void qdf_destroy_bh(qdf_bh_t *bh);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_create_workqueue - create a workqueue, This runs in non-interrupt
|
||||||
|
* context, so can be preempted by H/W & S/W intr
|
||||||
|
* @name: string
|
||||||
|
*
|
||||||
|
* Return: pointer of type qdf_workqueue_t
|
||||||
|
*/
|
||||||
|
qdf_workqueue_t *qdf_create_workqueue(char *name);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_create_singlethread_workqueue() - create a single threaded workqueue
|
||||||
|
* @name: string
|
||||||
|
*
|
||||||
|
* This API creates a dedicated work queue with a single worker thread to avoid
|
||||||
|
* wasting unnecessary resources when works which needs to be submitted in this
|
||||||
|
* queue are not very critical and frequent.
|
||||||
|
*
|
||||||
|
* Return: pointer of type qdf_workqueue_t
|
||||||
|
*/
|
||||||
|
qdf_workqueue_t *qdf_create_singlethread_workqueue(char *name);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_alloc_unbound_workqueue - allocate an unbound workqueue
|
||||||
|
* @name: string
|
||||||
|
*
|
||||||
|
* Return: pointer of type qdf_workqueue_t
|
||||||
|
*/
|
||||||
|
qdf_workqueue_t *qdf_alloc_unbound_workqueue(char *name);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_destroy_workqueue - Destroy the workqueue
|
||||||
|
* @hdl: OS handle
|
||||||
|
* @wqueue: pointer to workqueue
|
||||||
|
*
|
||||||
|
* Return: none
|
||||||
|
*/
|
||||||
|
void qdf_destroy_workqueue(qdf_handle_t hdl, qdf_workqueue_t *wqueue);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_cancel_work() - Cancel a work
|
||||||
|
* @work: pointer to work
|
||||||
|
*
|
||||||
|
* Cancel work and wait for its execution to finish.
|
||||||
|
* This function can be used even if the work re-queues
|
||||||
|
* itself or migrates to another workqueue. On return
|
||||||
|
* from this function, work is guaranteed to be not
|
||||||
|
* pending or executing on any CPU. The caller must
|
||||||
|
* ensure that the workqueue on which work was last
|
||||||
|
* queued can't be destroyed before this function returns.
|
||||||
|
*
|
||||||
|
* Return: true if work was pending, false otherwise
|
||||||
|
*/
|
||||||
|
bool qdf_cancel_work(qdf_work_t *work);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_disable_work - disable the deferred task (synchronous)
|
||||||
|
* @work: pointer to work
|
||||||
|
*
|
||||||
|
* Return: unsigned int
|
||||||
|
*/
|
||||||
|
uint32_t qdf_disable_work(qdf_work_t *work);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_flush_work - Flush a deferred task on non-interrupt context
|
||||||
|
* @work: pointer to work
|
||||||
|
*
|
||||||
|
* Wait until work has finished execution. work is guaranteed to be
|
||||||
|
* idle on return if it hasn't been requeued since flush started.
|
||||||
|
*
|
||||||
|
* Return: none
|
||||||
|
*/
|
||||||
|
void qdf_flush_work(qdf_work_t *work);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_create_work - create a work/task queue, This runs in non-interrupt
|
||||||
|
* context, so can be preempted by H/W & S/W intr
|
||||||
|
* @hdl: OS handle
|
||||||
|
* @work: pointer to work
|
||||||
|
* @func: deferred function to run at bottom half non-interrupt context.
|
||||||
|
* @arg: argument for the deferred function
|
||||||
|
*
|
||||||
|
* Return: QDF status
|
||||||
|
*/
|
||||||
|
QDF_STATUS qdf_create_work(qdf_handle_t hdl, qdf_work_t *work,
|
||||||
|
qdf_defer_fn_t func, void *arg);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_sched_work - Schedule a deferred task on non-interrupt context
|
||||||
|
* @hdl: OS handle
|
||||||
|
* @work: pointer to work
|
||||||
|
*
|
||||||
|
* Retrun: none
|
||||||
|
*/
|
||||||
|
void qdf_sched_work(qdf_handle_t hdl, qdf_work_t *work);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_queue_work - Queue the work/task
|
||||||
|
* @hdl: OS handle
|
||||||
|
* @wqueue: pointer to workqueue
|
||||||
|
* @work: pointer to work
|
||||||
|
*
|
||||||
|
* Return: none
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
qdf_queue_work(qdf_handle_t hdl, qdf_workqueue_t *wqueue, qdf_work_t *work);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_flush_workqueue - flush the workqueue
|
||||||
|
* @hdl: OS handle
|
||||||
|
* @wqueue: pointer to workqueue
|
||||||
|
*
|
||||||
|
* Return: none
|
||||||
|
*/
|
||||||
|
void qdf_flush_workqueue(qdf_handle_t hdl, qdf_workqueue_t *wqueue);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_destroy_work - destroy the deferred task (synchronous)
|
||||||
|
* @hdl: OS handle
|
||||||
|
* @work: pointer to work
|
||||||
|
*
|
||||||
|
* Return: none
|
||||||
|
*/
|
||||||
|
void qdf_destroy_work(qdf_handle_t hdl, qdf_work_t *work);
|
||||||
|
#else
|
||||||
/**
|
/**
|
||||||
* qdf_create_bh - creates the bottom half deferred handler
|
* qdf_create_bh - creates the bottom half deferred handler
|
||||||
* @bh: pointer to bottom
|
* @bh: pointer to bottom
|
||||||
@@ -250,5 +399,6 @@ static inline void qdf_destroy_work(qdf_handle_t hdl, qdf_work_t *work)
|
|||||||
{
|
{
|
||||||
__qdf_disable_work(work);
|
__qdf_disable_work(work);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /*_QDF_DEFER_H*/
|
#endif /*_QDF_DEFER_H*/
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2018-2020 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -88,6 +88,30 @@ qdf_dev_modify_irq_status(uint32_t irnum, unsigned long cmask,
|
|||||||
*/
|
*/
|
||||||
QDF_STATUS
|
QDF_STATUS
|
||||||
qdf_dev_set_irq_affinity(uint32_t irnum, struct qdf_cpu_mask *cpmask);
|
qdf_dev_set_irq_affinity(uint32_t irnum, struct qdf_cpu_mask *cpmask);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_dev_set_irq_status_flags() - set irq status flags
|
||||||
|
* @irnum: irq number
|
||||||
|
* @set: status flag to set
|
||||||
|
*
|
||||||
|
* This function will set the status for an irq
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS_SUCCESS on success
|
||||||
|
*/
|
||||||
|
QDF_STATUS
|
||||||
|
qdf_dev_set_irq_status_flags(unsigned int irnum, unsigned long set);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_dev_clear_irq_status_flags() - clear irq status flags
|
||||||
|
* @irnum: irq number
|
||||||
|
* @clear: status flag to clear
|
||||||
|
*
|
||||||
|
* This function will clear the status for an irq
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS_SUCCESS on success
|
||||||
|
*/
|
||||||
|
QDF_STATUS
|
||||||
|
qdf_dev_clear_irq_status_flags(unsigned int irnum, unsigned long clr);
|
||||||
#else
|
#else
|
||||||
static inline QDF_STATUS
|
static inline QDF_STATUS
|
||||||
qdf_dev_alloc_mem(struct qdf_dev *qdfdev, struct qdf_devm **mrptr,
|
qdf_dev_alloc_mem(struct qdf_dev *qdfdev, struct qdf_devm **mrptr,
|
||||||
@@ -114,6 +138,18 @@ qdf_dev_set_irq_affinity(uint32_t irnum, struct qdf_cpu_mask *cpmask)
|
|||||||
{
|
{
|
||||||
return __qdf_dev_set_irq_affinity(irnum, cpmask);
|
return __qdf_dev_set_irq_affinity(irnum, cpmask);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline QDF_STATUS
|
||||||
|
qdf_dev_set_irq_status_flags(unsigned int irnum, unsigned long set)
|
||||||
|
{
|
||||||
|
return __qdf_dev_set_irq_status_flags(irnum, set);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline QDF_STATUS
|
||||||
|
qdf_dev_clear_irq_status_flags(unsigned int irnum, unsigned long clr)
|
||||||
|
{
|
||||||
|
return __qdf_dev_clear_irq_status_flags(irnum, clr);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static inline int qdf_topology_physical_package_id(unsigned int cpu)
|
static inline int qdf_topology_physical_package_id(unsigned int cpu)
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2014-2018 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2014-2018, 2021 The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -35,6 +35,126 @@ typedef __qdf_hrtimer_data_t qdf_hrtimer_data_t;
|
|||||||
typedef enum qdf_hrtimer_restart_status(*qdf_hrtimer_func_t)
|
typedef enum qdf_hrtimer_restart_status(*qdf_hrtimer_func_t)
|
||||||
(qdf_hrtimer_data_t *timer);
|
(qdf_hrtimer_data_t *timer);
|
||||||
|
|
||||||
|
#ifdef ENHANCED_OS_ABSTRACTION
|
||||||
|
/**
|
||||||
|
* qdf_hrtimer_start() - Starts hrtimer in given context
|
||||||
|
* @timer: pointer to the qdf_hrtimer_data_t object
|
||||||
|
* @interval: interval to forward as qdf_ktime_t object
|
||||||
|
* @mode: mode of qdf_hrtimer_data_t
|
||||||
|
*
|
||||||
|
* Starts hrtimer in given context
|
||||||
|
*
|
||||||
|
* Return: void
|
||||||
|
*/
|
||||||
|
void qdf_hrtimer_start(qdf_hrtimer_data_t *timer, qdf_ktime_t interval,
|
||||||
|
enum qdf_hrtimer_mode mode);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_hrtimer_cancel() - Cancels hrtimer in given context
|
||||||
|
* @timer: pointer to the qdf_hrtimer_data_t object
|
||||||
|
*
|
||||||
|
* Cancels hrtimer in given context
|
||||||
|
*
|
||||||
|
* Return: int
|
||||||
|
*/
|
||||||
|
int qdf_hrtimer_cancel(qdf_hrtimer_data_t *timer);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_hrtimer_init() - init hrtimer based on context
|
||||||
|
* @timer: pointer to the qdf_hrtimer_data_t object
|
||||||
|
* @callback: callback function to be fired
|
||||||
|
* @qdf_clock_id: clock type
|
||||||
|
* @qdf_hrtimer_mode: mode of qdf_hrtimer_data_t
|
||||||
|
* @qdf_context_mode: interrupt context mode
|
||||||
|
*
|
||||||
|
* starts hrtimer in a context passed as per qdf_context_mode
|
||||||
|
*
|
||||||
|
* Return: void
|
||||||
|
*/
|
||||||
|
void qdf_hrtimer_init(qdf_hrtimer_data_t *timer,
|
||||||
|
qdf_hrtimer_func_t callback,
|
||||||
|
enum qdf_clock_id clock,
|
||||||
|
enum qdf_hrtimer_mode mode,
|
||||||
|
enum qdf_context_mode ctx);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_hrtimer_kill() - kills hrtimer in given context
|
||||||
|
* @timer: pointer to the hrtimer object
|
||||||
|
*
|
||||||
|
* kills hrtimer in given context
|
||||||
|
*
|
||||||
|
* Return: void
|
||||||
|
*/
|
||||||
|
void qdf_hrtimer_kill(__qdf_hrtimer_data_t *timer);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_hrtimer_get_remaining() - check remaining time in the timer
|
||||||
|
* @timer: pointer to the qdf_hrtimer_data_t object
|
||||||
|
*
|
||||||
|
* check whether the timer is on one of the queues
|
||||||
|
*
|
||||||
|
* Return: remaining time as qdf_ktime_t object
|
||||||
|
*/
|
||||||
|
qdf_ktime_t qdf_hrtimer_get_remaining(qdf_hrtimer_data_t *timer);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_hrtimer_is_queued() - check whether the timer is on one of the queues
|
||||||
|
* @timer: pointer to the qdf_hrtimer_data_t object
|
||||||
|
*
|
||||||
|
* check whether the timer is on one of the queues
|
||||||
|
*
|
||||||
|
* Return: false when the timer was not in queue
|
||||||
|
* true when the timer was in queue
|
||||||
|
*/
|
||||||
|
bool qdf_hrtimer_is_queued(qdf_hrtimer_data_t *timer);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_hrtimer_callback_running() - check if callback is running
|
||||||
|
* @timer: pointer to the qdf_hrtimer_data_t object
|
||||||
|
*
|
||||||
|
* check whether the timer is running the callback function
|
||||||
|
*
|
||||||
|
* Return: false when callback is not running
|
||||||
|
* true when callback is running
|
||||||
|
*/
|
||||||
|
bool qdf_hrtimer_callback_running(qdf_hrtimer_data_t *timer);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_hrtimer_active() - check if timer is active
|
||||||
|
* @timer: pointer to the qdf_hrtimer_data_t object
|
||||||
|
*
|
||||||
|
* Check if timer is active. A timer is active, when it is enqueued into
|
||||||
|
* the rbtree or the callback function is running.
|
||||||
|
*
|
||||||
|
* Return: false if timer is not active
|
||||||
|
* true if timer is active
|
||||||
|
*/
|
||||||
|
bool qdf_hrtimer_active(qdf_hrtimer_data_t *timer);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_hrtimer_cb_get_time() - get remaining time in callback
|
||||||
|
* @timer: pointer to the qdf_hrtimer_data_t object
|
||||||
|
*
|
||||||
|
* Get remaining time in the hrtimer callback
|
||||||
|
*
|
||||||
|
* Return: time remaining as qdf_ktime_t object
|
||||||
|
*/
|
||||||
|
qdf_ktime_t qdf_hrtimer_cb_get_time(qdf_hrtimer_data_t *timer);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_hrtimer_forward() - forward the hrtimer
|
||||||
|
* @timer: pointer to the qdf_hrtimer_data_t object
|
||||||
|
* @now: current time as qdf_ktime_t object
|
||||||
|
* @interval: interval to forward as qdf_ktime_t object
|
||||||
|
*
|
||||||
|
* Forward the timer expiry so it will expire in the future
|
||||||
|
*
|
||||||
|
* Return: the number of overruns
|
||||||
|
*/
|
||||||
|
uint64_t qdf_hrtimer_forward(qdf_hrtimer_data_t *timer,
|
||||||
|
qdf_ktime_t now,
|
||||||
|
qdf_ktime_t interval);
|
||||||
|
#else
|
||||||
/**
|
/**
|
||||||
* qdf_hrtimer_start() - Starts hrtimer in given context
|
* qdf_hrtimer_start() - Starts hrtimer in given context
|
||||||
* @timer: pointer to the qdf_hrtimer_data_t object
|
* @timer: pointer to the qdf_hrtimer_data_t object
|
||||||
@@ -186,5 +306,6 @@ static inline uint64_t qdf_hrtimer_forward(qdf_hrtimer_data_t *timer,
|
|||||||
{
|
{
|
||||||
return __qdf_hrtimer_forward(timer, now, interval);
|
return __qdf_hrtimer_forward(timer, now, interval);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* _QDF_HRTIMER_H */
|
#endif /* _QDF_HRTIMER_H */
|
||||||
|
@@ -3633,58 +3633,6 @@ qdf_nbuf_reg_free_cb(qdf_nbuf_free_t cb_func_ptr)
|
|||||||
__qdf_nbuf_reg_free_cb(cb_func_ptr);
|
__qdf_nbuf_reg_free_cb(cb_func_ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* qdf_nbuf_set_timestamp() - set the timestamp for frame
|
|
||||||
*
|
|
||||||
* @buf: sk buff
|
|
||||||
*
|
|
||||||
* Return: void
|
|
||||||
*/
|
|
||||||
static inline void
|
|
||||||
qdf_nbuf_set_timestamp(struct sk_buff *skb)
|
|
||||||
{
|
|
||||||
__qdf_nbuf_set_timestamp(skb);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* qdf_nbuf_get_timestamp() - get the timestamp for frame
|
|
||||||
*
|
|
||||||
* @buf: sk buff
|
|
||||||
*
|
|
||||||
* Return: timestamp stored in skb in ms
|
|
||||||
*/
|
|
||||||
static inline uint64_t
|
|
||||||
qdf_nbuf_get_timestamp(struct sk_buff *skb)
|
|
||||||
{
|
|
||||||
return __qdf_nbuf_get_timestamp(skb);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* qdf_nbuf_get_timedelta_ms() - get time difference in ms
|
|
||||||
*
|
|
||||||
* @buf: sk buff
|
|
||||||
*
|
|
||||||
* Return: time difference ms
|
|
||||||
*/
|
|
||||||
static inline uint64_t
|
|
||||||
qdf_nbuf_get_timedelta_ms(struct sk_buff *skb)
|
|
||||||
{
|
|
||||||
return __qdf_nbuf_get_timedelta_ms(skb);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* qdf_nbuf_get_timedelta_us() - get time difference in micro seconds
|
|
||||||
*
|
|
||||||
* @buf: sk buff
|
|
||||||
*
|
|
||||||
* Return: time difference in micro seconds
|
|
||||||
*/
|
|
||||||
static inline uint64_t
|
|
||||||
qdf_nbuf_get_timedelta_us(struct sk_buff *skb)
|
|
||||||
{
|
|
||||||
return __qdf_nbuf_get_timedelta_us(skb);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* qdf_nbuf_count_get() - get global nbuf gauge
|
* qdf_nbuf_count_get() - get global nbuf gauge
|
||||||
*
|
*
|
||||||
@@ -4047,6 +3995,77 @@ static inline void qdf_record_nbuf_nbytes(
|
|||||||
}
|
}
|
||||||
#endif /* CONFIG_WLAN_SYSFS_MEM_STATS */
|
#endif /* CONFIG_WLAN_SYSFS_MEM_STATS */
|
||||||
|
|
||||||
|
#ifdef ENHANCED_OS_ABSTRACTION
|
||||||
|
/**
|
||||||
|
* qdf_nbuf_set_timestamp() - set the timestamp for frame
|
||||||
|
* @buf: pointer to network buffer
|
||||||
|
*
|
||||||
|
* Return: none
|
||||||
|
*/
|
||||||
|
void qdf_nbuf_set_timestamp(qdf_nbuf_t buf);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_nbuf_get_timestamp() - get the timestamp for frame
|
||||||
|
* @buf: pointer to network buffer
|
||||||
|
*
|
||||||
|
* Return: timestamp stored in skb in ms
|
||||||
|
*/
|
||||||
|
uint64_t qdf_nbuf_get_timestamp(qdf_nbuf_t buf);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_nbuf_get_timedelta_ms() - get time difference in ms
|
||||||
|
* @buf: pointer to network buffer
|
||||||
|
*
|
||||||
|
* Return: time difference ms
|
||||||
|
*/
|
||||||
|
uint64_t qdf_nbuf_get_timedelta_ms(qdf_nbuf_t buf);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_nbuf_get_timedelta_us() - get time difference in micro seconds
|
||||||
|
* @buf: pointer to network buffer
|
||||||
|
*
|
||||||
|
* Return: time difference in micro seconds
|
||||||
|
*/
|
||||||
|
uint64_t qdf_nbuf_get_timedelta_us(qdf_nbuf_t buf);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_nbuf_net_timedelta() - get time delta
|
||||||
|
* @t: time as qdf_ktime_t object
|
||||||
|
*
|
||||||
|
* Return: time delta as ktime_t object
|
||||||
|
*/
|
||||||
|
qdf_ktime_t qdf_nbuf_net_timedelta(qdf_ktime_t t);
|
||||||
|
#else
|
||||||
|
static inline void
|
||||||
|
qdf_nbuf_set_timestamp(struct sk_buff *skb)
|
||||||
|
{
|
||||||
|
__qdf_nbuf_set_timestamp(skb);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline uint64_t
|
||||||
|
qdf_nbuf_get_timestamp(struct sk_buff *skb)
|
||||||
|
{
|
||||||
|
return __qdf_nbuf_get_timestamp(skb);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline uint64_t
|
||||||
|
qdf_nbuf_get_timedelta_ms(struct sk_buff *skb)
|
||||||
|
{
|
||||||
|
return __qdf_nbuf_get_timedelta_ms(skb);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline uint64_t
|
||||||
|
qdf_nbuf_get_timedelta_us(struct sk_buff *skb)
|
||||||
|
{
|
||||||
|
return __qdf_nbuf_get_timedelta_us(skb);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline qdf_ktime_t qdf_nbuf_net_timedelta(qdf_ktime_t t)
|
||||||
|
{
|
||||||
|
return __qdf_nbuf_net_timedelta(t);
|
||||||
|
}
|
||||||
|
#endif /* ENHANCED_OS_ABSTRACTION */
|
||||||
|
|
||||||
#ifdef CONFIG_NBUF_AP_PLATFORM
|
#ifdef CONFIG_NBUF_AP_PLATFORM
|
||||||
#include <i_qdf_nbuf_api_w.h>
|
#include <i_qdf_nbuf_api_w.h>
|
||||||
#else
|
#else
|
||||||
|
@@ -28,7 +28,240 @@
|
|||||||
|
|
||||||
typedef __qdf_time_t qdf_time_t;
|
typedef __qdf_time_t qdf_time_t;
|
||||||
typedef __qdf_ktime_t qdf_ktime_t;
|
typedef __qdf_ktime_t qdf_ktime_t;
|
||||||
|
typedef __qdf_timespec_t qdf_timespec_t;
|
||||||
|
typedef __qdf_work_struct_t qdf_work_struct_t;
|
||||||
|
|
||||||
|
#ifdef ENHANCED_OS_ABSTRACTION
|
||||||
|
/**
|
||||||
|
* qdf_ns_to_ktime - Converts nanoseconds to a qdf_ktime_t object
|
||||||
|
* @ns: time in nanoseconds
|
||||||
|
*
|
||||||
|
* Return: nanoseconds as qdf_ktime_t object
|
||||||
|
*/
|
||||||
|
qdf_ktime_t qdf_ns_to_ktime(uint64_t ns);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_ktime_add - Adds two qdf_ktime_t objects and returns
|
||||||
|
* a qdf_ktime_t object
|
||||||
|
* @ktime1: time as qdf_ktime_t object
|
||||||
|
* @ktime2: time as qdf_ktime_t object
|
||||||
|
*
|
||||||
|
* Return: sum of both qdf_ktime_t as qdf_ktime_t object
|
||||||
|
*/
|
||||||
|
qdf_ktime_t qdf_ktime_add(qdf_ktime_t ktime1, qdf_ktime_t ktime2);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_ktime_get - Gets the current time as qdf_ktime_t object
|
||||||
|
*
|
||||||
|
* Return: current time as qdf_ktime_t object
|
||||||
|
*/
|
||||||
|
qdf_ktime_t qdf_ktime_get(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_ktime_real_get - Gets the current wall clock as qdf_ktime_t object
|
||||||
|
*
|
||||||
|
* Return: current wall clock as qdf_ktime_t object
|
||||||
|
*/
|
||||||
|
qdf_ktime_t qdf_ktime_real_get(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_ktime_add_ns - Adds qdf_ktime_t object and nanoseconds value and
|
||||||
|
* returns the qdf_ktime_t object
|
||||||
|
* @ktime: time as qdf_ktime_t object
|
||||||
|
* @ns: time in nanoseconds
|
||||||
|
*
|
||||||
|
* Return: qdf_ktime_t object
|
||||||
|
*/
|
||||||
|
qdf_ktime_t qdf_ktime_add_ns(qdf_ktime_t ktime, int64_t ns);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_ktime_to_ms - Convert the qdf_ktime_t object into milliseconds
|
||||||
|
* @ktime: time as qdf_ktime_t object
|
||||||
|
*
|
||||||
|
* Return: qdf_ktime_t in milliseconds
|
||||||
|
*/
|
||||||
|
int64_t qdf_ktime_to_ms(qdf_ktime_t ktime);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_ktime_to_ns - Convert the qdf_ktime_t object into nanoseconds
|
||||||
|
* @ktime: time as qdf_ktime_t object
|
||||||
|
*
|
||||||
|
* Return: qdf_ktime_t in nanoseconds
|
||||||
|
*/
|
||||||
|
int64_t qdf_ktime_to_ns(qdf_ktime_t ktime);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_system_ticks - Count the number of ticks elapsed from the time when
|
||||||
|
* the system booted
|
||||||
|
*
|
||||||
|
* Return: ticks
|
||||||
|
*/
|
||||||
|
qdf_time_t qdf_system_ticks(void);
|
||||||
|
|
||||||
|
#define qdf_system_ticks_per_sec __qdf_system_ticks_per_sec
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_system_ticks_to_msecs - convert ticks to milliseconds
|
||||||
|
* @clock_ticks: Number of ticks
|
||||||
|
*
|
||||||
|
* Return: unsigned int Time in milliseconds
|
||||||
|
*/
|
||||||
|
uint32_t qdf_system_ticks_to_msecs(unsigned long clock_ticks);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_system_msecs_to_ticks - convert milliseconds to ticks
|
||||||
|
* @msec: Time in milliseconds
|
||||||
|
*
|
||||||
|
* Return: unsigned long number of ticks
|
||||||
|
*/
|
||||||
|
qdf_time_t qdf_system_msecs_to_ticks(uint32_t msecs);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_get_system_uptime - Return a monotonically increasing time
|
||||||
|
* This increments once per HZ ticks
|
||||||
|
*
|
||||||
|
* Return: qdf_time_t system up time in ticks
|
||||||
|
*/
|
||||||
|
qdf_time_t qdf_get_system_uptime(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_get_bootbased_boottime_ns() - Get the bootbased time in nanoseconds
|
||||||
|
*
|
||||||
|
* qdf_get_bootbased_boottime_ns() function returns the number of nanoseconds
|
||||||
|
* that have elapsed since the system was booted. It also includes the time when
|
||||||
|
* system was suspended.
|
||||||
|
*
|
||||||
|
* Return:
|
||||||
|
* The time since system booted in nanoseconds
|
||||||
|
*/
|
||||||
|
uint64_t qdf_get_bootbased_boottime_ns(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_get_system_timestamp - Return current timestamp
|
||||||
|
*
|
||||||
|
* Return: unsigned long timestamp in ms.
|
||||||
|
*/
|
||||||
|
unsigned long qdf_get_system_timestamp(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_udelay - delay in microseconds
|
||||||
|
* @usecs: Number of microseconds to delay
|
||||||
|
*
|
||||||
|
* Return: none
|
||||||
|
*/
|
||||||
|
void qdf_udelay(int usecs);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_mdelay - Delay in milliseconds.
|
||||||
|
* @msec: Number of milliseconds to delay
|
||||||
|
*
|
||||||
|
* Return: none
|
||||||
|
*/
|
||||||
|
void qdf_mdelay(int msecs);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_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
|
||||||
|
*/
|
||||||
|
bool qdf_system_time_after(qdf_time_t a, qdf_time_t b);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_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
|
||||||
|
*/
|
||||||
|
bool qdf_system_time_before(qdf_time_t a, qdf_time_t b);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_system_time_after_eq() - 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
|
||||||
|
*/
|
||||||
|
bool qdf_system_time_after_eq(qdf_time_t a, qdf_time_t b);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* enum qdf_timestamp_unit - what unit the qdf timestamp is in
|
||||||
|
* @KERNEL_LOG: boottime time in uS (micro seconds)
|
||||||
|
* @QTIMER: QTIME in (1/19200)S
|
||||||
|
*
|
||||||
|
* This enum is used to distinguish which timer source is used.
|
||||||
|
*/
|
||||||
|
enum qdf_timestamp_unit {
|
||||||
|
KERNEL_LOG,
|
||||||
|
QTIMER,
|
||||||
|
};
|
||||||
|
|
||||||
|
#ifdef MSM_PLATFORM
|
||||||
|
#define QDF_LOG_TIMESTAMP_UNIT QTIMER
|
||||||
|
#define QDF_LOG_TIMESTAMP_CYCLES_PER_10_US 192
|
||||||
|
#else
|
||||||
|
#define QDF_LOG_TIMESTAMP_UNIT KERNEL_LOG
|
||||||
|
#define QDF_LOG_TIMESTAMP_CYCLES_PER_10_US 10
|
||||||
|
#endif /* end of MSM_PLATFORM */
|
||||||
|
|
||||||
|
uint64_t qdf_log_timestamp_to_usecs(uint64_t time);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_get_log_timestamp_to_secs() - get time stamp for logging in seconds
|
||||||
|
*
|
||||||
|
* Return: The current logging timestamp normalized to second precision
|
||||||
|
*/
|
||||||
|
void qdf_log_timestamp_to_secs(uint64_t time, uint64_t *secs,
|
||||||
|
uint64_t *usecs);
|
||||||
|
|
||||||
|
uint64_t qdf_usecs_to_log_timestamp(uint64_t usecs);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_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
|
||||||
|
*/
|
||||||
|
uint64_t qdf_get_log_timestamp(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_get_log_timestamp_usecs() - get time stamp for logging in microseconds
|
||||||
|
*
|
||||||
|
* Return: The current logging timestamp normalized to microsecond precision
|
||||||
|
*/
|
||||||
|
uint64_t qdf_get_log_timestamp_usecs(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_get_monotonic_boottime - get monotonic kernel boot time
|
||||||
|
* This API is similar to qdf_get_system_boottime but it includes
|
||||||
|
* time spent in suspend.
|
||||||
|
*
|
||||||
|
* Return: Time in microseconds
|
||||||
|
*/
|
||||||
|
uint64_t qdf_get_monotonic_boottime(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_time_ktime_get_real_time() - Get the time of day in qdf_timespec_t
|
||||||
|
* @ts: pointer to the qdf_timespec_t
|
||||||
|
*
|
||||||
|
* Return: None
|
||||||
|
*/
|
||||||
|
void qdf_time_ktime_get_real_time(qdf_timespec_t *ts);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_time_sched_clock - scheduler clock
|
||||||
|
*
|
||||||
|
* Return: current time in nanosec units.
|
||||||
|
*/
|
||||||
|
unsigned long long qdf_time_sched_clock(void);
|
||||||
|
#else
|
||||||
/**
|
/**
|
||||||
* qdf_ns_to_ktime - Converts nanoseconds to a qdf_ktime_t object
|
* qdf_ns_to_ktime - Converts nanoseconds to a qdf_ktime_t object
|
||||||
* @ns: time in nanoseconds
|
* @ns: time in nanoseconds
|
||||||
@@ -374,4 +607,15 @@ static inline uint64_t qdf_get_monotonic_boottime(void)
|
|||||||
return __qdf_get_monotonic_boottime();
|
return __qdf_get_monotonic_boottime();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline void qdf_time_ktime_get_real_time(qdf_timespec_t *ts)
|
||||||
|
{
|
||||||
|
return __qdf_time_ktime_get_real_time(ts);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline unsigned long long qdf_time_sched_clock(void)
|
||||||
|
{
|
||||||
|
return __qdf_time_sched_clock();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2017 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2017,2021 The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -30,6 +30,9 @@
|
|||||||
|
|
||||||
typedef struct dentry *__qdf_dentry_t;
|
typedef struct dentry *__qdf_dentry_t;
|
||||||
typedef struct seq_file *__qdf_debugfs_file_t;
|
typedef struct seq_file *__qdf_debugfs_file_t;
|
||||||
|
typedef struct debugfs_blob_wrapper *__qdf_debugfs_blob_wrap_t;
|
||||||
|
typedef void *__qdf_entry_t;
|
||||||
|
typedef const struct file_operations *__qdf_file_ops_t;
|
||||||
|
|
||||||
#ifdef WLAN_DEBUGFS
|
#ifdef WLAN_DEBUGFS
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2019-2020 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2019-2021 The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -188,4 +188,39 @@ static inline int __qdf_core_ctl_set_boost(bool boost)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* __qdf_dev_set_irq_status_flags() - set irq status flags
|
||||||
|
* @irnum: irq number
|
||||||
|
* @set: status flag to set
|
||||||
|
*
|
||||||
|
* This function will set the status for an irq
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS_SUCCESS on success
|
||||||
|
*/
|
||||||
|
static inline QDF_STATUS
|
||||||
|
__qdf_dev_set_irq_status_flags(unsigned int irnum, unsigned long set)
|
||||||
|
{
|
||||||
|
irq_set_status_flags(irnum, set);
|
||||||
|
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* __qdf_dev_clear_irq_status_flags() - clear irq status flags
|
||||||
|
* @irnum: irq number
|
||||||
|
* @clear: status flag to clear
|
||||||
|
*
|
||||||
|
* This function will set the status for an irq
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS_SUCCESS on success
|
||||||
|
*/
|
||||||
|
static inline QDF_STATUS
|
||||||
|
__qdf_dev_clear_irq_status_flags(unsigned int irnum, unsigned long clr)
|
||||||
|
{
|
||||||
|
irq_clear_status_flags(irnum, clr);
|
||||||
|
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* __I_QDF_DEV_H */
|
#endif /* __I_QDF_DEV_H */
|
||||||
|
@@ -38,6 +38,7 @@
|
|||||||
#include <linux/tcp.h>
|
#include <linux/tcp.h>
|
||||||
#include <qdf_util.h>
|
#include <qdf_util.h>
|
||||||
#include <qdf_nbuf_frag.h>
|
#include <qdf_nbuf_frag.h>
|
||||||
|
#include "qdf_time.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Use socket buffer as the underlying implementation as skbuf .
|
* Use socket buffer as the underlying implementation as skbuf .
|
||||||
@@ -2546,6 +2547,17 @@ static inline uint16_t __qdf_nbuf_get_gso_segs(struct sk_buff *skb)
|
|||||||
return skb_shinfo(skb)->gso_segs;
|
return skb_shinfo(skb)->gso_segs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* __qdf_nbuf_net_timedelta() - get time delta
|
||||||
|
* @t: time as __qdf_ktime_t object
|
||||||
|
*
|
||||||
|
* Return: time delta as ktime_t object
|
||||||
|
*/
|
||||||
|
static inline qdf_ktime_t __qdf_nbuf_net_timedelta(qdf_ktime_t t)
|
||||||
|
{
|
||||||
|
return net_timedelta(t);
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_NBUF_AP_PLATFORM
|
#ifdef CONFIG_NBUF_AP_PLATFORM
|
||||||
#include <i_qdf_nbuf_w.h>
|
#include <i_qdf_nbuf_w.h>
|
||||||
#else
|
#else
|
||||||
|
@@ -41,10 +41,23 @@
|
|||||||
#ifdef MSM_PLATFORM
|
#ifdef MSM_PLATFORM
|
||||||
#include <asm/arch_timer.h>
|
#include <asm/arch_timer.h>
|
||||||
#endif
|
#endif
|
||||||
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0))
|
||||||
|
#include <linux/sched/clock.h>
|
||||||
|
#else
|
||||||
|
#include <linux/sched.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef unsigned long __qdf_time_t;
|
typedef unsigned long __qdf_time_t;
|
||||||
typedef ktime_t __qdf_ktime_t;
|
typedef ktime_t __qdf_ktime_t;
|
||||||
|
|
||||||
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 24)
|
||||||
|
typedef struct timespec64 __qdf_timespec_t;
|
||||||
|
#else
|
||||||
|
typedef struct timeval __qdf_timespec_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
typedef struct work_struct __qdf_work_struct_t;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* __qdf_ns_to_ktime() - Converts nanoseconds to a ktime object
|
* __qdf_ns_to_ktime() - Converts nanoseconds to a ktime object
|
||||||
* @ns: time in nanoseconds
|
* @ns: time in nanoseconds
|
||||||
@@ -361,4 +374,91 @@ static inline uint64_t __qdf_get_bootbased_boottime_ns(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* __qdf_time_ms_to_ktime() - Converts milliseconds to a ktime object
|
||||||
|
* @ms: time in milliseconds
|
||||||
|
*
|
||||||
|
* Return: milliseconds as ktime object
|
||||||
|
*/
|
||||||
|
static inline ktime_t __qdf_time_ms_to_ktime(uint64_t ms)
|
||||||
|
{
|
||||||
|
return ms_to_ktime(ms);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* __qdf_time_ktime_real_get() - Gets the current wall clock as ktime object
|
||||||
|
*
|
||||||
|
* Return: current wall clock as ktime object
|
||||||
|
*/
|
||||||
|
static inline ktime_t __qdf_time_ktime_real_get(void)
|
||||||
|
{
|
||||||
|
return ktime_get_real();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* __qdf_time_sched_clock() - schedule clock
|
||||||
|
*
|
||||||
|
* Return: returns current time in nanosec units.
|
||||||
|
*/
|
||||||
|
static inline unsigned long long __qdf_time_sched_clock(void)
|
||||||
|
{
|
||||||
|
return sched_clock();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* __qdf_time_ktime_sub() - Subtract two ktime objects and returns
|
||||||
|
* a ktime object
|
||||||
|
* @time1: time as ktime object
|
||||||
|
* @time2: time as ktime object
|
||||||
|
*
|
||||||
|
* Return: subtraction of ktime objects as ktime object
|
||||||
|
*/
|
||||||
|
static inline ktime_t __qdf_time_ktime_sub(ktime_t ktime1, ktime_t ktime2)
|
||||||
|
{
|
||||||
|
return ktime_sub(ktime1, ktime2);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* __qdf_time_ktime_set() - Set a ktime_t variable from a seconds/nanoseconds
|
||||||
|
* value
|
||||||
|
* @secs: seconds to set
|
||||||
|
* @nsecs: nanoseconds to set
|
||||||
|
*
|
||||||
|
* Return: The ktime_t representation of the value.
|
||||||
|
*/
|
||||||
|
static inline ktime_t __qdf_time_ktime_set(const s64 secs,
|
||||||
|
const unsigned long nsecs)
|
||||||
|
{
|
||||||
|
return ktime_set(secs, nsecs);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* __qdf_time_ktime_to_us() - Convert the ktime_t object into microseconds
|
||||||
|
* @ktime: time as ktime_t object
|
||||||
|
*
|
||||||
|
* Return: ktime_t in microseconds
|
||||||
|
*/
|
||||||
|
static inline int64_t __qdf_time_ktime_to_us(ktime_t ktime)
|
||||||
|
{
|
||||||
|
return ktime_to_us(ktime);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* __qdf_time_ktime_get_real_time() - Get the time of day in qdf_timespec_t
|
||||||
|
* @ts: pointer to the qdf_timespec_t to be set
|
||||||
|
*
|
||||||
|
* Return: none
|
||||||
|
*/
|
||||||
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 24)
|
||||||
|
static inline void __qdf_time_ktime_get_real_time(__qdf_timespec_t *ts)
|
||||||
|
{
|
||||||
|
ktime_get_real_ts64(ts);
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
static inline void __qdf_time_ktime_get_real_time(__qdf_timespec_t *ts)
|
||||||
|
{
|
||||||
|
do_gettimeofday(ts);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2017-2020 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2017-2021 The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -543,3 +543,40 @@ int qdf_debugfs_printer(void *priv, const char *fmt, ...)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
qdf_export_symbol(qdf_debugfs_printer);
|
qdf_export_symbol(qdf_debugfs_printer);
|
||||||
|
|
||||||
|
qdf_dentry_t qdf_debugfs_create_blob(const char *name, umode_t mode,
|
||||||
|
qdf_dentry_t parent,
|
||||||
|
qdf_debugfs_blob_wrap_t blob)
|
||||||
|
{
|
||||||
|
return debugfs_create_blob(name, mode, parent, blob);
|
||||||
|
}
|
||||||
|
|
||||||
|
qdf_export_symbol(qdf_debugfs_create_blob);
|
||||||
|
|
||||||
|
qdf_dentry_t qdf_debugfs_create_entry(const char *name, uint16_t mode,
|
||||||
|
qdf_dentry_t parent,
|
||||||
|
qdf_entry_t data,
|
||||||
|
const qdf_file_ops_t fops)
|
||||||
|
{
|
||||||
|
qdf_dentry_t file;
|
||||||
|
umode_t filemode;
|
||||||
|
|
||||||
|
if (!name || !fops)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
if (!parent)
|
||||||
|
parent = qdf_debugfs_get_root();
|
||||||
|
|
||||||
|
filemode = qdf_debugfs_get_filemode(mode);
|
||||||
|
file = debugfs_create_file(name, filemode, parent, data, fops);
|
||||||
|
|
||||||
|
if (IS_ERR_OR_NULL(file)) {
|
||||||
|
QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
|
||||||
|
"%s creation failed 0x%pK", name, file);
|
||||||
|
file = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return file;
|
||||||
|
}
|
||||||
|
|
||||||
|
qdf_export_symbol(qdf_debugfs_create_entry);
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2014-2019 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2014-2019,2021 The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -27,6 +27,7 @@
|
|||||||
|
|
||||||
#include "i_qdf_defer.h"
|
#include "i_qdf_defer.h"
|
||||||
#include <qdf_module.h>
|
#include <qdf_module.h>
|
||||||
|
#include <qdf_defer.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* __qdf_defer_func() - defer work handler
|
* __qdf_defer_func() - defer work handler
|
||||||
@@ -47,3 +48,107 @@ void __qdf_defer_func(struct work_struct *work)
|
|||||||
}
|
}
|
||||||
qdf_export_symbol(__qdf_defer_func);
|
qdf_export_symbol(__qdf_defer_func);
|
||||||
|
|
||||||
|
#ifdef ENHANCED_OS_ABSTRACTION
|
||||||
|
void
|
||||||
|
qdf_create_bh(qdf_bh_t *bh, qdf_defer_fn_t func, void *arg)
|
||||||
|
{
|
||||||
|
__qdf_init_bh(bh, func, arg);
|
||||||
|
}
|
||||||
|
|
||||||
|
void qdf_sched_bh(qdf_bh_t *bh)
|
||||||
|
{
|
||||||
|
__qdf_sched_bh(bh);
|
||||||
|
}
|
||||||
|
|
||||||
|
void qdf_destroy_bh(qdf_bh_t *bh)
|
||||||
|
{
|
||||||
|
__qdf_disable_bh(bh);
|
||||||
|
}
|
||||||
|
|
||||||
|
void qdf_destroy_work(qdf_handle_t hdl, qdf_work_t *work)
|
||||||
|
{
|
||||||
|
__qdf_disable_work(work);
|
||||||
|
}
|
||||||
|
|
||||||
|
qdf_export_symbol(qdf_destroy_work);
|
||||||
|
|
||||||
|
void qdf_flush_work(qdf_work_t *work)
|
||||||
|
{
|
||||||
|
__qdf_flush_work(work);
|
||||||
|
}
|
||||||
|
|
||||||
|
qdf_export_symbol(qdf_flush_work);
|
||||||
|
|
||||||
|
uint32_t qdf_disable_work(qdf_work_t *work)
|
||||||
|
{
|
||||||
|
return __qdf_disable_work(work);
|
||||||
|
}
|
||||||
|
|
||||||
|
qdf_export_symbol(qdf_disable_work);
|
||||||
|
|
||||||
|
bool qdf_cancel_work(qdf_work_t *work)
|
||||||
|
{
|
||||||
|
return __qdf_cancel_work(work);
|
||||||
|
}
|
||||||
|
|
||||||
|
qdf_export_symbol(qdf_cancel_work);
|
||||||
|
|
||||||
|
qdf_workqueue_t *qdf_create_workqueue(char *name)
|
||||||
|
{
|
||||||
|
return __qdf_create_workqueue(name);
|
||||||
|
}
|
||||||
|
|
||||||
|
qdf_export_symbol(qdf_create_workqueue);
|
||||||
|
|
||||||
|
qdf_workqueue_t *qdf_create_singlethread_workqueue(char *name)
|
||||||
|
{
|
||||||
|
return __qdf_create_singlethread_workqueue(name);
|
||||||
|
}
|
||||||
|
|
||||||
|
qdf_export_symbol(qdf_create_singlethread_workqueue);
|
||||||
|
|
||||||
|
void qdf_destroy_workqueue(qdf_handle_t hdl,
|
||||||
|
qdf_workqueue_t *wqueue)
|
||||||
|
{
|
||||||
|
return __qdf_destroy_workqueue(wqueue);
|
||||||
|
}
|
||||||
|
|
||||||
|
qdf_export_symbol(qdf_destroy_workqueue);
|
||||||
|
|
||||||
|
qdf_workqueue_t *qdf_alloc_unbound_workqueue(char *name)
|
||||||
|
{
|
||||||
|
return __qdf_alloc_unbound_workqueue(name);
|
||||||
|
}
|
||||||
|
|
||||||
|
qdf_export_symbol(qdf_alloc_unbound_workqueue);
|
||||||
|
|
||||||
|
QDF_STATUS qdf_create_work(qdf_handle_t hdl, qdf_work_t *work,
|
||||||
|
qdf_defer_fn_t func, void *arg)
|
||||||
|
{
|
||||||
|
return __qdf_init_work(work, func, arg);
|
||||||
|
}
|
||||||
|
|
||||||
|
qdf_export_symbol(qdf_create_work);
|
||||||
|
|
||||||
|
void qdf_sched_work(qdf_handle_t hdl, qdf_work_t *work)
|
||||||
|
{
|
||||||
|
__qdf_sched_work(work);
|
||||||
|
}
|
||||||
|
|
||||||
|
qdf_export_symbol(qdf_sched_work);
|
||||||
|
|
||||||
|
void
|
||||||
|
qdf_queue_work(qdf_handle_t hdl, qdf_workqueue_t *wqueue, qdf_work_t *work)
|
||||||
|
{
|
||||||
|
return __qdf_queue_work(wqueue, work);
|
||||||
|
}
|
||||||
|
|
||||||
|
qdf_export_symbol(qdf_queue_work);
|
||||||
|
|
||||||
|
void qdf_flush_workqueue(qdf_handle_t hdl, qdf_workqueue_t *wqueue)
|
||||||
|
{
|
||||||
|
return __qdf_flush_workqueue(wqueue);
|
||||||
|
}
|
||||||
|
|
||||||
|
qdf_export_symbol(qdf_flush_workqueue);
|
||||||
|
#endif
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2018 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2018,2021 The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -89,3 +89,31 @@ qdf_dev_set_irq_affinity(uint32_t irnum, struct qdf_cpu_mask *cpmask)
|
|||||||
}
|
}
|
||||||
|
|
||||||
qdf_export_symbol(qdf_dev_set_irq_affinity);
|
qdf_export_symbol(qdf_dev_set_irq_affinity);
|
||||||
|
|
||||||
|
#ifdef ENHANCED_OS_ABSTRACTION
|
||||||
|
QDF_STATUS
|
||||||
|
qdf_dev_set_irq_status_flags(unsigned int irnum, unsigned long set)
|
||||||
|
{
|
||||||
|
if (irnum <= 0)
|
||||||
|
return QDF_STATUS_E_INVAL;
|
||||||
|
|
||||||
|
irq_set_status_flags(irnum, set);
|
||||||
|
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
qdf_export_symbol(qdf_dev_set_irq_status_flags);
|
||||||
|
|
||||||
|
QDF_STATUS
|
||||||
|
qdf_dev_clear_irq_status_flags(unsigned int irnum, unsigned long clr)
|
||||||
|
{
|
||||||
|
if (irnum <= 0)
|
||||||
|
return QDF_STATUS_E_INVAL;
|
||||||
|
|
||||||
|
irq_clear_status_flags(irnum, clr);
|
||||||
|
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
qdf_export_symbol(qdf_dev_clear_irq_status_flags);
|
||||||
|
#endif
|
||||||
|
@@ -5151,3 +5151,40 @@ QDF_NBUF_TRACK *qdf_nbuf_get_track_tbl(uint32_t index)
|
|||||||
return gp_qdf_net_buf_track_tbl[index];
|
return gp_qdf_net_buf_track_tbl[index];
|
||||||
}
|
}
|
||||||
#endif /* MEMORY_DEBUG */
|
#endif /* MEMORY_DEBUG */
|
||||||
|
|
||||||
|
#ifdef ENHANCED_OS_ABSTRACTION
|
||||||
|
void qdf_nbuf_set_timestamp(qdf_nbuf_t buf)
|
||||||
|
{
|
||||||
|
__qdf_nbuf_set_timestamp(buf);
|
||||||
|
}
|
||||||
|
|
||||||
|
qdf_export_symbol(qdf_nbuf_set_timestamp);
|
||||||
|
|
||||||
|
uint64_t qdf_nbuf_get_timestamp(qdf_nbuf_t buf)
|
||||||
|
{
|
||||||
|
return __qdf_nbuf_get_timestamp(buf);
|
||||||
|
}
|
||||||
|
|
||||||
|
qdf_export_symbol(qdf_nbuf_get_timestamp);
|
||||||
|
|
||||||
|
uint64_t qdf_nbuf_get_timedelta_us(qdf_nbuf_t buf)
|
||||||
|
{
|
||||||
|
return __qdf_nbuf_get_timedelta_us(buf);
|
||||||
|
}
|
||||||
|
|
||||||
|
qdf_export_symbol(qdf_nbuf_get_timedelta_us);
|
||||||
|
|
||||||
|
uint64_t qdf_nbuf_get_timedelta_ms(qdf_nbuf_t buf)
|
||||||
|
{
|
||||||
|
return __qdf_nbuf_get_timedelta_ms(buf);
|
||||||
|
}
|
||||||
|
|
||||||
|
qdf_export_symbol(qdf_nbuf_get_timedelta_ms);
|
||||||
|
|
||||||
|
qdf_ktime_t qdf_nbuf_net_timedelta(qdf_ktime_t t)
|
||||||
|
{
|
||||||
|
return __qdf_nbuf_net_timedelta(t);
|
||||||
|
}
|
||||||
|
|
||||||
|
qdf_export_symbol(qdf_nbuf_net_timedelta);
|
||||||
|
#endif
|
||||||
|
Reference in New Issue
Block a user