xref: /OK3568_Linux_fs/kernel/include/net/lag.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 */
2*4882a593Smuzhiyun #ifndef _LINUX_IF_LAG_H
3*4882a593Smuzhiyun #define _LINUX_IF_LAG_H
4*4882a593Smuzhiyun 
5*4882a593Smuzhiyun #include <linux/netdevice.h>
6*4882a593Smuzhiyun #include <linux/if_team.h>
7*4882a593Smuzhiyun #include <net/bonding.h>
8*4882a593Smuzhiyun 
net_lag_port_dev_txable(const struct net_device * port_dev)9*4882a593Smuzhiyun static inline bool net_lag_port_dev_txable(const struct net_device *port_dev)
10*4882a593Smuzhiyun {
11*4882a593Smuzhiyun 	if (netif_is_team_port(port_dev))
12*4882a593Smuzhiyun 		return team_port_dev_txable(port_dev);
13*4882a593Smuzhiyun 	else
14*4882a593Smuzhiyun 		return bond_is_active_slave_dev(port_dev);
15*4882a593Smuzhiyun }
16*4882a593Smuzhiyun 
17*4882a593Smuzhiyun #endif /* _LINUX_IF_LAG_H */
18