1 /* 2 * Copyright (c) 2021 The Linux Foundation. All rights reserved. 3 * Copyright (c) 2021-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 #ifndef __DP_LI_H 20 #define __DP_LI_H 21 22 #include <dp_types.h> 23 #include <dp_mon.h> 24 #include <hal_li_tx.h> 25 #include <hal_li_rx.h> 26 27 /* WBM2SW ring id for rx release */ 28 #define WBM2SW_REL_ERR_RING_NUM 3 29 30 /** 31 * struct dp_soc_li - Extended DP soc for LI targets 32 * @soc: dp soc structure 33 */ 34 struct dp_soc_li { 35 struct dp_soc soc; 36 }; 37 38 /** 39 * struct dp_pdev_li - Extended DP pdev for LI targets 40 * @pdev: dp_pdev structure 41 */ 42 struct dp_pdev_li { 43 struct dp_pdev pdev; 44 }; 45 46 /** 47 * struct dp_vdev_li - Extended DP vdev for LI targets 48 * @vdev: dp_vdev structure 49 */ 50 struct dp_vdev_li { 51 struct dp_vdev vdev; 52 }; 53 54 /** 55 * struct dp_peer_li - Extended DP peer for LI targets 56 * @peer: dp_peer structure 57 */ 58 struct dp_peer_li { 59 struct dp_peer peer; 60 }; 61 62 /** 63 * struct dp_mon_soc_li - Extended DP mon soc for LI targets 64 * @mon_soc: dp_mon_soc structure 65 */ 66 struct dp_mon_soc_li { 67 struct dp_mon_soc mon_soc; 68 }; 69 70 /** 71 * struct dp_mon_pdev_li - Extended DP mon pdev for LI targets 72 * @mon_pdev: dp_mon_pdev structure 73 */ 74 struct dp_mon_pdev_li { 75 struct dp_mon_pdev mon_pdev; 76 }; 77 78 /** 79 * dp_get_soc_context_size_LI() - get context size for dp_soc_li 80 * 81 * Return: value in bytes for LI specific soc structure 82 */ 83 qdf_size_t dp_get_soc_context_size_li(void); 84 85 /** 86 * dp_initialize_arch_ops_li() - initialize LI specific arch ops 87 * @arch_ops: arch ops pointer 88 * 89 * Return: none 90 */ 91 void dp_initialize_arch_ops_li(struct dp_arch_ops *arch_ops); 92 93 /** 94 * dp_get_context_size_li() - get LI specific size for peer/vdev/pdev/soc 95 * @arch_ops: arch ops pointer 96 * 97 * Return: size in bytes for the context_type 98 */ 99 100 qdf_size_t dp_get_context_size_li(enum dp_context_type context_type); 101 102 /** 103 * dp_mon_get_context_size_li() - get LI specific size for mon pdev/soc 104 * @arch_ops: arch ops pointer 105 * 106 * Return: size in bytes for the context_type 107 */ 108 109 qdf_size_t dp_mon_get_context_size_li(enum dp_context_type context_type); 110 #endif 111