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

Change-Id: Ia034ebe2c8e012aaa02b3e03a92fe60dc908f5e3
---
 .../ethernet/mellanox/mlx5/core/en/devlink.h  | 23 ++++++++++++++++---
 1 file changed, 20 insertions(+), 3 deletions(-)

--- a/drivers/net/ethernet/mellanox/mlx5/core/en/devlink.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en/devlink.h
@@ -7,11 +7,28 @@
 #include <net/devlink.h>
 #include "en.h"
 
-struct mlx5e_dev *mlx5e_create_devlink(struct device *dev,
-				       struct mlx5_core_dev *mdev);
-void mlx5e_destroy_devlink(struct mlx5e_dev *mlx5e_dev);
+#ifdef HAVE_DEVLINK_PER_AUXDEV
 int mlx5e_devlink_port_register(struct mlx5e_dev *mlx5e_dev,
 				struct mlx5_core_dev *mdev);
 void mlx5e_devlink_port_unregister(struct mlx5e_dev *mlx5e_dev);
+#else
+int mlx5e_devlink_port_register(struct mlx5e_priv *priv);
+void mlx5e_devlink_port_unregister(struct mlx5e_priv *priv);
+
+static inline struct devlink_port *
+mlx5e_devlink_get_dl_port(struct mlx5e_priv *priv)
+{
+	return &priv->mdev->mlx5e_res.dl_port;
+}
+#endif
+
+void mlx5e_destroy_devlink(struct mlx5e_dev *mlx5e_dev);
+struct mlx5e_dev *mlx5e_create_devlink(struct device *dev,
+				       struct mlx5_core_dev *mdev);
+
+struct devlink_port *mlx5e_get_devlink_port(struct net_device *dev);
+void mlx5e_devlink_port_type_eth_set(struct mlx5e_priv *priv);
+
+void mlx5e_devlink_get_port_parent_id(struct mlx5_core_dev *dev, struct netdev_phys_item_id *ppid);
 
 #endif
