net/mlx4_en: Expose port number through sysfs
authorAmir Vadai <amirv@mellanox.com>
Tue, 25 Feb 2014 16:17:51 +0000 (18:17 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 26 Feb 2014 20:38:06 +0000 (15:38 -0500)
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>
drivers/net/ethernet/mellanox/mlx4/en_netdev.c

index fad45316200aa0fbcb115e3f6b4ec56a24ca29cd..caa488a286f0c524a49bf412741a2b32302c10a3 100644 (file)
@@ -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