^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) /* SPDX-License-Identifier: GPL-2.0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) #ifndef _LINUX_IF_LAG_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) #define _LINUX_IF_LAG_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) #include <linux/netdevice.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) #include <linux/if_team.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) #include <net/bonding.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) static inline bool net_lag_port_dev_txable(const struct net_device *port_dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) if (netif_is_team_port(port_dev))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) return team_port_dev_txable(port_dev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) return bond_is_active_slave_dev(port_dev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) #endif /* _LINUX_IF_LAG_H */