xref: /wlan-driver/qca-wifi-host-cmn/qal/inc/qal_bridge.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1*5113495bSYour Name /*
2*5113495bSYour Name  * Copyright (c) 2021 The Linux Foundation. All rights reserved.
3*5113495bSYour Name  * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
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 /**
21*5113495bSYour Name  * DOC: qal_bridge
22*5113495bSYour Name  * QCA driver framework for bridge related APIs prototype
23*5113495bSYour Name  */
24*5113495bSYour Name 
25*5113495bSYour Name #ifndef __QAL_BRIDGE_H
26*5113495bSYour Name #define __QAL_BRIDGE_H
27*5113495bSYour Name 
28*5113495bSYour Name /* Include Files */
29*5113495bSYour Name #include "qdf_types.h"
30*5113495bSYour Name #include "i_qal_bridge.h"
31*5113495bSYour Name 
32*5113495bSYour Name typedef __qal_notify_blk_t qal_notify_blk_t;
33*5113495bSYour Name typedef __qal_netdev_t qal_netdev_t;
34*5113495bSYour Name typedef __qal_br_fdb_entry_t qal_br_fdb_entry_t;
35*5113495bSYour Name 
36*5113495bSYour Name #ifdef ENHANCED_OS_ABSTRACTION
37*5113495bSYour Name 
38*5113495bSYour Name QDF_STATUS
39*5113495bSYour Name qal_bridge_fdb_register_notify(qal_notify_blk_t nb);
40*5113495bSYour Name 
41*5113495bSYour Name QDF_STATUS
42*5113495bSYour Name qal_bridge_fdb_unregister_notify(qal_notify_blk_t nb);
43*5113495bSYour Name 
44*5113495bSYour Name qal_br_fdb_entry_t
45*5113495bSYour Name qal_bridge_fdb_has_entry(qal_netdev_t dev, const char *addr, uint16_t vid);
46*5113495bSYour Name 
47*5113495bSYour Name QDF_STATUS
48*5113495bSYour Name qal_bridge_fdb_delete_by_netdev(qal_netdev_t dev,
49*5113495bSYour Name 				const unsigned char *addr, uint16_t vid);
50*5113495bSYour Name 
51*5113495bSYour Name QDF_STATUS
52*5113495bSYour Name qal_bridge_fdb_update_register_notify(qal_notify_blk_t nb);
53*5113495bSYour Name 
54*5113495bSYour Name QDF_STATUS
55*5113495bSYour Name qal_bridge_fdb_update_unregister_notify(qal_notify_blk_t nb);
56*5113495bSYour Name 
57*5113495bSYour Name QDF_STATUS
58*5113495bSYour Name qal_bridge_fdb_add_or_refresh_by_netdev(qal_netdev_t dev,
59*5113495bSYour Name 					const unsigned char *addr,
60*5113495bSYour Name 					uint16_t vid,
61*5113495bSYour Name 					uint16_t state);
62*5113495bSYour Name #else
63*5113495bSYour Name static inline QDF_STATUS
qal_bridge_fdb_register_notify(qal_notify_blk_t nb)64*5113495bSYour Name qal_bridge_fdb_register_notify(qal_notify_blk_t nb)
65*5113495bSYour Name {
66*5113495bSYour Name 	return __qal_bridge_fdb_register_notify(nb);
67*5113495bSYour Name }
68*5113495bSYour Name 
69*5113495bSYour Name static inline QDF_STATUS
qal_bridge_fdb_unregister_notify(qal_notify_blk_t nb)70*5113495bSYour Name qal_bridge_fdb_unregister_notify(qal_notify_blk_t nb)
71*5113495bSYour Name {
72*5113495bSYour Name 	return __qal_bridge_fdb_unregister_notify(nb);
73*5113495bSYour Name }
74*5113495bSYour Name 
75*5113495bSYour Name static inline qal_br_fdb_entry_t
qal_bridge_fdb_has_entry(qal_netdev_t dev,const char * addr,uint16_t vid)76*5113495bSYour Name qal_bridge_fdb_has_entry(qal_netdev_t dev, const char *addr, uint16_t vid)
77*5113495bSYour Name {
78*5113495bSYour Name 	return __qal_bridge_fdb_has_entry(dev, addr, vid);
79*5113495bSYour Name }
80*5113495bSYour Name 
81*5113495bSYour Name static inline QDF_STATUS
qal_bridge_fdb_delete_by_netdev(qal_netdev_t dev,const unsigned char * addr,uint16_t vid)82*5113495bSYour Name qal_bridge_fdb_delete_by_netdev(qal_netdev_t dev,
83*5113495bSYour Name 				const unsigned char *addr, uint16_t vid)
84*5113495bSYour Name {
85*5113495bSYour Name 	return __qal_bridge_fdb_delete_by_netdev(dev, addr, vid);
86*5113495bSYour Name }
87*5113495bSYour Name 
88*5113495bSYour Name static inline QDF_STATUS
qal_bridge_fdb_update_register_notify(qal_notify_blk_t nb)89*5113495bSYour Name qal_bridge_fdb_update_register_notify(qal_notify_blk_t nb)
90*5113495bSYour Name {
91*5113495bSYour Name 	return __qal_bridge_fdb_update_register_notify(nb);
92*5113495bSYour Name }
93*5113495bSYour Name 
94*5113495bSYour Name static inline QDF_STATUS
qal_bridge_fdb_update_unregister_notify(qal_notify_blk_t nb)95*5113495bSYour Name qal_bridge_fdb_update_unregister_notify(qal_notify_blk_t nb)
96*5113495bSYour Name {
97*5113495bSYour Name 	return __qal_bridge_fdb_update_unregister_notify(nb);
98*5113495bSYour Name }
99*5113495bSYour Name 
100*5113495bSYour Name QDF_STATUS
qal_bridge_fdb_add_or_refresh_by_netdev(qal_netdev_t dev,const unsigned char * addr,uint16_t vid,uint16_t state)101*5113495bSYour Name qal_bridge_fdb_add_or_refresh_by_netdev(qal_netdev_t dev,
102*5113495bSYour Name 					const unsigned char *addr,
103*5113495bSYour Name 					uint16_t vid,
104*5113495bSYour Name 					uint16_t state)
105*5113495bSYour Name {
106*5113495bSYour Name 	__qal_bridge_fdb_add_or_refresh_by_netdev(dev, addr, vid, state);
107*5113495bSYour Name }
108*5113495bSYour Name #endif
109*5113495bSYour Name 
110*5113495bSYour Name #endif /* __QAL_BRIDGE_H */
111