1 /* 2 * Copyright (c) 2016-2021 The Linux Foundation. All rights reserved. 3 * 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 #ifndef _WLAN_GLOBAL_LMAC_IF_API_H_ 21 #define _WLAN_GLOBAL_LMAC_IF_API_H_ 22 23 #include "wlan_objmgr_cmn.h" 24 #include "wlan_objmgr_psoc_obj.h" 25 26 /** 27 * wlan_global_lmac_if_open() - global lmac_if open 28 * @psoc: psoc context 29 * 30 * Opens up lmac_if southbound layer. This function calls OL,DA and UMAC 31 * modules to register respective tx and rx callbacks. 32 * 33 * Return: QDF_STATUS 34 */ 35 QDF_STATUS wlan_global_lmac_if_open(struct wlan_objmgr_psoc *psoc); 36 37 /** 38 * wlan_global_lmac_if_rx_ops_register() - UMAC rx handler register 39 * @rx_ops: Pointer to rx_ops structure to be populated 40 * 41 * Register umac RX callabacks which will be called by DA/OL/WMA/WMI 42 * 43 * Return: QDF_STATUS_SUCCESS - in case of success 44 */ 45 QDF_STATUS wlan_global_lmac_if_rx_ops_register 46 (struct wlan_lmac_if_rx_ops *rx_ops); 47 48 /** 49 * wlan_global_lmac_if_close() - Close global lmac_if 50 * @psoc: psoc context 51 * 52 * Deregister global lmac_if TX and RX handlers 53 * 54 * Return: QDF_STATUS_SUCCESS - in case of success 55 */ 56 QDF_STATUS wlan_global_lmac_if_close(struct wlan_objmgr_psoc *psoc); 57 58 /** 59 * wlan_global_lmac_if_set_txops_registration_cb() -tx 60 * registration callback assignment 61 * @dev_type: Dev type can be either Direct attach or Offload 62 * @handler: handler to be called for LMAC tx ops registration 63 * 64 * API to assign appropriate tx registration callback handler based on the 65 * device type(Offload or Direct attach) 66 * 67 * Return: QDF_STATUS_SUCCESS - in case of success 68 */ 69 QDF_STATUS wlan_global_lmac_if_set_txops_registration_cb(WLAN_DEV_TYPE dev_type, 70 QDF_STATUS (*handler)(struct wlan_lmac_if_tx_ops *)); 71 72 #ifdef WLAN_CONV_SPECTRAL_ENABLE 73 /** 74 * wlan_lmac_if_sptrl_set_rx_ops_register_cb ()- Spectral LMAC Rx ops 75 * registration callback assignment 76 * @handler: Handler to be called for spectral LMAC rx ops registration 77 * 78 * API to assign appropriate Spectral LMAC rx ops registration callback handler 79 * 80 * Return: QDF_STATUS_SUCCESS - in case of success 81 */ 82 QDF_STATUS wlan_lmac_if_sptrl_set_rx_ops_register_cb(void (*handler) 83 (struct wlan_lmac_if_rx_ops *)); 84 85 #endif /* WLAN_CONV_SPECTRAL_ENABLE */ 86 87 #ifdef WLAN_IOT_SIM_SUPPORT 88 /** 89 * wlan_lmac_if_iot_sim_set_rx_ops_register_cb ()- IOT_SIM LMAC Rx ops 90 * registration callback assignment 91 * @handler: Handler to be called for iot sim LMAC rx ops registration 92 * 93 * API to assign appropriate iot sim LMAC rx ops registration callback handler 94 * 95 * Return: QDF_STATUS_SUCCESS - in case of success 96 */ 97 QDF_STATUS wlan_lmac_if_iot_sim_set_rx_ops_register_cb(void (*handler) 98 (struct wlan_lmac_if_rx_ops *)); 99 #endif 100 101 /** 102 * wlan_lmac_if_son_set_rx_ops_register_cb ()- SON Rx ops 103 * registration callback assignment 104 * @handler: Handler to be called for SON rx ops registration 105 * 106 * API to assign appropriate SON rx ops registration callback handler 107 * 108 * Return: QDF_STATUS_SUCCESS - in case of success 109 */ 110 QDF_STATUS wlan_lmac_if_son_set_rx_ops_register_cb(void (*handler) 111 (struct wlan_lmac_if_rx_ops *)); 112 #endif /* _WLAN_LMAC_IF_API_H */ 113