From: Valentine Fatiev <valentinef@nvidia.com>
Subject: [PATCH] BACKPORT:
 drivers/net/ethernet/mellanox/mlx5/core/en/rep/bond.c

Change-Id: Ia046503d46ac9224512dc3b9227136a91588e3f8
---
 drivers/net/ethernet/mellanox/mlx5/core/en/rep/bond.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

--- a/drivers/net/ethernet/mellanox/mlx5/core/en/rep/bond.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en/rep/bond.c
@@ -3,8 +3,12 @@
 
 #include <linux/netdevice.h>
 #include <linux/list.h>
+#ifdef HAVE_BASECODE_EXTRAS
+#include <net/bonding.h>
+#endif
+#ifdef HAVE_NET_LAG_H
 #include <net/lag.h>
-
+#endif
 #include "mlx5_core.h"
 #include "eswitch.h"
 #include "esw/acl/ofld.h"
@@ -212,8 +216,10 @@ static void mlx5e_rep_changelowerstate_e
 	if (!lag_dev)
 		return;
 
+#ifdef HAVE_NET_LAG_PORT_DEV_TXABLE
 	netdev_dbg(netdev, "lag_dev(%s)'s slave vport(%d) is txable(%d)\n",
 		   lag_dev->name, fwd_vport_num, net_lag_port_dev_txable(netdev));
+#endif
 
 	/* Point everyone's egress acl to the vport of the active representor */
 	netdev_for_each_lower_dev(lag_dev, dev, iter) {
