xref: /wlan-driver/qca-wifi-host-cmn/global_lmac_if/inc/wlan_global_lmac_if_api.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1*5113495bSYour Name /*
2*5113495bSYour Name  * Copyright (c) 2016-2021 The Linux Foundation. All rights reserved.
3*5113495bSYour Name  *
4*5113495bSYour Name  *
5*5113495bSYour Name  * Permission to use, copy, modify, and/or distribute this software for
6*5113495bSYour Name  * any purpose with or without fee is hereby granted, provided that the
7*5113495bSYour Name  * above copyright notice and this permission notice appear in all
8*5113495bSYour Name  * copies.
9*5113495bSYour Name  *
10*5113495bSYour Name  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
11*5113495bSYour Name  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
12*5113495bSYour Name  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
13*5113495bSYour Name  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14*5113495bSYour Name  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15*5113495bSYour Name  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
16*5113495bSYour Name  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17*5113495bSYour Name  * PERFORMANCE OF THIS SOFTWARE.
18*5113495bSYour Name  */
19*5113495bSYour Name 
20*5113495bSYour Name #ifndef _WLAN_GLOBAL_LMAC_IF_API_H_
21*5113495bSYour Name #define _WLAN_GLOBAL_LMAC_IF_API_H_
22*5113495bSYour Name 
23*5113495bSYour Name #include "wlan_objmgr_cmn.h"
24*5113495bSYour Name #include "wlan_objmgr_psoc_obj.h"
25*5113495bSYour Name 
26*5113495bSYour Name /**
27*5113495bSYour Name  * wlan_global_lmac_if_open() - global lmac_if open
28*5113495bSYour Name  * @psoc: psoc context
29*5113495bSYour Name  *
30*5113495bSYour Name  * Opens up lmac_if southbound layer. This function calls OL,DA and UMAC
31*5113495bSYour Name  * modules to register respective tx and rx callbacks.
32*5113495bSYour Name  *
33*5113495bSYour Name  * Return: QDF_STATUS
34*5113495bSYour Name  */
35*5113495bSYour Name QDF_STATUS wlan_global_lmac_if_open(struct wlan_objmgr_psoc *psoc);
36*5113495bSYour Name 
37*5113495bSYour Name /**
38*5113495bSYour Name  * wlan_global_lmac_if_rx_ops_register() - UMAC rx handler register
39*5113495bSYour Name  * @rx_ops: Pointer to rx_ops structure to be populated
40*5113495bSYour Name  *
41*5113495bSYour Name  * Register umac RX callabacks which will be called by DA/OL/WMA/WMI
42*5113495bSYour Name  *
43*5113495bSYour Name  * Return: QDF_STATUS_SUCCESS - in case of success
44*5113495bSYour Name  */
45*5113495bSYour Name QDF_STATUS wlan_global_lmac_if_rx_ops_register
46*5113495bSYour Name 		(struct wlan_lmac_if_rx_ops *rx_ops);
47*5113495bSYour Name 
48*5113495bSYour Name /**
49*5113495bSYour Name  * wlan_global_lmac_if_close() - Close global lmac_if
50*5113495bSYour Name  * @psoc: psoc context
51*5113495bSYour Name  *
52*5113495bSYour Name  * Deregister global lmac_if TX and RX handlers
53*5113495bSYour Name  *
54*5113495bSYour Name  * Return: QDF_STATUS_SUCCESS - in case of success
55*5113495bSYour Name  */
56*5113495bSYour Name QDF_STATUS wlan_global_lmac_if_close(struct wlan_objmgr_psoc *psoc);
57*5113495bSYour Name 
58*5113495bSYour Name /**
59*5113495bSYour Name  * wlan_global_lmac_if_set_txops_registration_cb() -tx
60*5113495bSYour Name  * registration callback assignment
61*5113495bSYour Name  * @dev_type: Dev type can be either Direct attach or Offload
62*5113495bSYour Name  * @handler: handler to be called for LMAC tx ops registration
63*5113495bSYour Name  *
64*5113495bSYour Name  * API to assign appropriate tx registration callback handler based on the
65*5113495bSYour Name  * device type(Offload or Direct attach)
66*5113495bSYour Name  *
67*5113495bSYour Name  * Return: QDF_STATUS_SUCCESS - in case of success
68*5113495bSYour Name  */
69*5113495bSYour Name QDF_STATUS wlan_global_lmac_if_set_txops_registration_cb(WLAN_DEV_TYPE dev_type,
70*5113495bSYour Name 		QDF_STATUS (*handler)(struct wlan_lmac_if_tx_ops *));
71*5113495bSYour Name 
72*5113495bSYour Name #ifdef WLAN_CONV_SPECTRAL_ENABLE
73*5113495bSYour Name /**
74*5113495bSYour Name  * wlan_lmac_if_sptrl_set_rx_ops_register_cb ()- Spectral LMAC Rx ops
75*5113495bSYour Name  * registration callback assignment
76*5113495bSYour Name  * @handler: Handler to be called for spectral LMAC rx ops registration
77*5113495bSYour Name  *
78*5113495bSYour Name  * API to assign appropriate Spectral LMAC rx ops registration callback handler
79*5113495bSYour Name  *
80*5113495bSYour Name  * Return: QDF_STATUS_SUCCESS - in case of success
81*5113495bSYour Name  */
82*5113495bSYour Name QDF_STATUS wlan_lmac_if_sptrl_set_rx_ops_register_cb(void (*handler)
83*5113495bSYour Name 				(struct wlan_lmac_if_rx_ops *));
84*5113495bSYour Name 
85*5113495bSYour Name #endif /* WLAN_CONV_SPECTRAL_ENABLE */
86*5113495bSYour Name 
87*5113495bSYour Name #ifdef WLAN_IOT_SIM_SUPPORT
88*5113495bSYour Name /**
89*5113495bSYour Name  * wlan_lmac_if_iot_sim_set_rx_ops_register_cb ()- IOT_SIM LMAC Rx ops
90*5113495bSYour Name  * registration callback assignment
91*5113495bSYour Name  * @handler: Handler to be called for iot sim LMAC rx ops registration
92*5113495bSYour Name  *
93*5113495bSYour Name  * API to assign appropriate iot sim LMAC rx ops registration callback handler
94*5113495bSYour Name  *
95*5113495bSYour Name  * Return: QDF_STATUS_SUCCESS - in case of success
96*5113495bSYour Name  */
97*5113495bSYour Name QDF_STATUS wlan_lmac_if_iot_sim_set_rx_ops_register_cb(void (*handler)
98*5113495bSYour Name 				(struct wlan_lmac_if_rx_ops *));
99*5113495bSYour Name #endif
100*5113495bSYour Name 
101*5113495bSYour Name /**
102*5113495bSYour Name  * wlan_lmac_if_son_set_rx_ops_register_cb ()- SON Rx ops
103*5113495bSYour Name  * registration callback assignment
104*5113495bSYour Name  * @handler: Handler to be called for SON rx ops registration
105*5113495bSYour Name  *
106*5113495bSYour Name  * API to assign appropriate SON rx ops registration callback handler
107*5113495bSYour Name  *
108*5113495bSYour Name  * Return: QDF_STATUS_SUCCESS - in case of success
109*5113495bSYour Name  */
110*5113495bSYour Name QDF_STATUS wlan_lmac_if_son_set_rx_ops_register_cb(void (*handler)
111*5113495bSYour Name 				(struct wlan_lmac_if_rx_ops *));
112*5113495bSYour Name #endif /* _WLAN_LMAC_IF_API_H */
113