1 /* 2 * Copyright (c) 2019 The Linux Foundation. All rights reserved. 3 * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. 4 * 5 * Permission to use, copy, modify, and/or distribute this software for 6 * any purpose with or without fee is hereby granted, provided that the 7 * above copyright notice and this permission notice appear in all 8 * copies. 9 * 10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 11 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 12 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 13 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 14 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 15 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 16 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 17 * PERFORMANCE OF THIS SOFTWARE. 18 */ 19 20 /** 21 * DOC: qld_priv.h 22 * QLD: This file provides Private functions for qld 23 */ 24 25 #ifndef _QLD_PRIV_H_ 26 #define _QLD_PRIV_H_ 27 28 #include <qdf_lock.h> 29 #include <qdf_list.h> 30 #include <qld_api.h> 31 32 #define qld_alert(format, args...) \ 33 QDF_TRACE_FATAL(QDF_MODULE_ID_QLD, format, ## args) 34 35 #define qld_err(format, args...) \ 36 QDF_TRACE_ERROR(QDF_MODULE_ID_QLD, format, ## args) 37 38 #define qld_warn(format, args...) \ 39 QDF_TRACE_WARN(QDF_MODULE_ID_QLD, format, ## args) 40 41 #define qld_info(format, args...) \ 42 QDF_TRACE_INFO(QDF_MODULE_ID_QLD, format, ## args) 43 44 #define qld_debug(format, args...) \ 45 QDF_TRACE_DEBUG(QDF_MODULE_ID_QLD, format, ## args) 46 47 /** 48 * struct qld_list_handle - Top level qld structure 49 * @qld_lock: Spinlock for structure 50 * @qld_list: linked list for linking 51 * @qld_max_list: maximum list size 52 */ 53 struct qld_list_handle { 54 qdf_spinlock_t qld_lock; 55 qdf_list_t qld_list; 56 uint32_t qld_max_list; 57 }; 58 59 /** 60 * struct qld_node - qld node 61 * @node: single node of linked list 62 * @entry: single qld_entry in list 63 */ 64 struct qld_node { 65 qdf_list_node_t node; 66 struct qld_entry entry; 67 }; 68 69 #endif /*_QLD_PRIV_H_*/ 70