1 /* 2 * Copyright (c) 2021, The Linux Foundation. All rights reserved. 3 * 4 * Permission to use, copy, modify, and/or distribute this software for any 5 * purpose with or without fee is hereby granted, provided that the above 6 * copyright notice and this permission notice appear in all copies. 7 * 8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15 */ 16 17 #ifndef _WLAN_MGMT_TXRX_RX_REO_UTILS_API_H_ 18 #define _WLAN_MGMT_TXRX_RX_REO_UTILS_API_H_ 19 20 /** 21 * DOC: wlan_mgmt_txrx_rx_reo_utils_api.h 22 * 23 * management rx-reorder public APIs and structures 24 * for umac converged components. 25 * 26 */ 27 28 #include <wlan_mgmt_txrx_utils_api.h> 29 30 struct mgmt_txrx_priv_pdev_context; 31 32 /** 33 * TODO: Dummy function to get the MLO link ID from the pdev. 34 * This is added only as a place holder for the time being. 35 * Remove this once this API is implemented in MLO manager. 36 */ 37 static inline uint8_t 38 wlan_get_mlo_link_id_from_pdev(struct wlan_objmgr_pdev *pdev) 39 { 40 return 0; 41 } 42 43 /** 44 * TODO: Dummy function to get pdev handle from MLO link ID. 45 * This is added only as a place holder for the time being. 46 * Remove this once this API is implemented in MLO manager. 47 */ 48 static inline struct wlan_objmgr_pdev * 49 wlan_get_pdev_from_mlo_link_id(uint8_t mlo_link_id) 50 { 51 return NULL; 52 } 53 54 #ifdef WLAN_MGMT_RX_REO_SUPPORT 55 #define mgmt_rx_reo_alert mgmt_txrx_alert 56 #define mgmt_rx_reo_err mgmt_txrx_err 57 #define mgmt_rx_reo_warn mgmt_txrx_warn 58 #define mgmt_rx_reo_notice mgmt_txrx_notice 59 #define mgmt_rx_reo_info mgmt_txrx_info 60 #define mgmt_rx_reo_debug mgmt_txrx_debug 61 62 /** 63 * wlan_mgmt_rx_reo_init() - Initializes the management rx-reorder module 64 * 65 * This function gets called from dispatcher init and initializes the management 66 * rx-reorder module. 67 * 68 * Return: QDF_STATUS 69 */ 70 QDF_STATUS 71 wlan_mgmt_rx_reo_init(void); 72 73 /** 74 * wlan_mgmt_rx_reo_deinit() - De initializes the management rx-reorder module 75 * 76 * This function gets called from dispatcher deinit and de initializes the 77 * management rx-reorder module. 78 * 79 * Return: QDF_STATUS 80 */ 81 QDF_STATUS 82 wlan_mgmt_rx_reo_deinit(void); 83 84 /** 85 * wlan_mgmt_rx_reo_pdev_obj_create_notification() - pdev create handler for 86 * management rx-reorder module 87 * @pdev: pointer to pdev object 88 * 89 * This function gets called from object manager when pdev is being created and 90 * creates management rx-reorder pdev context 91 * 92 * Return: QDF_STATUS 93 */ 94 QDF_STATUS 95 wlan_mgmt_rx_reo_pdev_obj_create_notification( 96 struct wlan_objmgr_pdev *pdev, 97 struct mgmt_txrx_priv_pdev_context *mgmt_txrx_pdev_ctx); 98 99 /** 100 * wlan_mgmt_rx_reo_pdev_obj_destroy_notification() - pdev destroy handler for 101 * management rx-reorder feature 102 * @pdev: pointer to pdev object 103 * 104 * This function gets called from object manager when pdev is being destroyed 105 * and destroys management rx-reorder pdev context 106 * 107 * Return: QDF_STATUS 108 */ 109 QDF_STATUS 110 wlan_mgmt_rx_reo_pdev_obj_destroy_notification( 111 struct wlan_objmgr_pdev *pdev, 112 struct mgmt_txrx_priv_pdev_context *mgmt_txrx_pdev_ctx); 113 114 /** 115 * wlan_mgmt_rx_reo_get_priv_object() - Get the pdev private object of 116 * MGMT Rx REO module 117 * @pdev: pointer to pdev object 118 * Return: Pointer to pdev private object of MGMT Rx REO module on success, 119 * else NULL 120 */ 121 struct mgmt_rx_reo_pdev_info * 122 wlan_mgmt_rx_reo_get_priv_object(struct wlan_objmgr_pdev *pdev); 123 #else 124 /** 125 * wlan_mgmt_rx_reo_pdev_obj_create_notification() - pdev create handler for 126 * management rx-reorder feature 127 * @pdev: pointer to pdev object 128 * 129 * This function gets called from object manager when pdev is being created and 130 * creates management rx-reorder pdev context 131 * 132 * Return: QDF_STATUS 133 */ 134 static inline QDF_STATUS 135 wlan_mgmt_rx_reo_pdev_obj_create_notification( 136 struct wlan_objmgr_pdev *pdev, 137 struct mgmt_txrx_priv_pdev_context *mgmt_txrx_pdev_ctx) 138 { 139 return QDF_STATUS_SUCCESS; 140 } 141 142 /** 143 * wlan_mgmt_rx_reo_pdev_obj_destroy_notification() - pdev destroy handler for 144 * management rx-reorder feature 145 * @pdev: pointer to pdev object 146 * 147 * This function gets called from object manager when pdev is being destroyed 148 * and destroys management rx-reorder pdev context 149 * 150 * Return: QDF_STATUS 151 */ 152 static inline QDF_STATUS 153 wlan_mgmt_rx_reo_pdev_obj_destroy_notification( 154 struct wlan_objmgr_pdev *pdev, 155 struct mgmt_txrx_priv_pdev_context *mgmt_txrx_pdev_ctx) 156 { 157 return QDF_STATUS_SUCCESS; 158 } 159 160 /** 161 * wlan_mgmt_rx_reo_init() - Initializes the management rx-reorder module 162 * 163 * This function gets called from dispatcher init and initializes the management 164 * rx-reorder module. 165 * 166 * Return: QDF_STATUS 167 */ 168 static inline QDF_STATUS 169 wlan_mgmt_rx_reo_init(void) 170 { 171 return QDF_STATUS_SUCCESS; 172 } 173 174 /** 175 * wlan_mgmt_rx_reo_deinit() - De initializes the management rx-reorder module 176 * 177 * This function gets called from dispatcher deinit and de initializes the 178 * management rx-reorder module. 179 * 180 * Return: QDF_STATUS 181 */ 182 static inline QDF_STATUS 183 wlan_mgmt_rx_reo_deinit(void) 184 { 185 return QDF_STATUS_SUCCESS; 186 } 187 #endif /* WLAN_MGMT_RX_REO_SUPPORT */ 188 #endif /* _WLAN_MGMT_TXRX_RX_REO_UTILS_API_H_ */ 189