summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmir Vadai <amirv@mellanox.com>2014-02-25 18:17:51 +0200
committerDavid S. Miller <davem@davemloft.net>2014-02-26 15:38:06 -0500
commit76a066f2a2a0268b565459c417b59724b5a3197b (patch)
treef1c9eff45d072f62292a6015ca80af9c39dd4d71
parent3f85944fe207d0225ef21a2c0951d4946fc9a95d (diff)
net/mlx4_en: Expose port number through sysfs
Initialize dev_port with port number (0 based) to be accessed through sysfs from user space. Signed-off-by: Amir Vadai <amirv@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/en_netdev.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
index fad45316200a..caa488a286f0 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
@@ -2342,6 +2342,7 @@ int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int port,
SET_NETDEV_DEV(dev, &mdev->dev->pdev->dev);
dev->dev_id = port - 1;
+ dev->dev_port = port - 1;
/*
* Initialize driver private data