Skip to content

Commit

Permalink
xtensa: ISS: init network interface name before the probe
Browse files Browse the repository at this point in the history
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Chris Zankel <chris@zankel.net>
  • Loading branch information
Max Filippov authored and Chris Zankel committed Jan 14, 2014
1 parent 8c8ad85 commit 358b181
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions arch/xtensa/platforms/iss/network.c
Original file line number Diff line number Diff line change
Expand Up @@ -544,6 +544,13 @@ static int iss_net_configure(int index, char *init)
.have_mac = 0,
};

/*
* If this name ends up conflicting with an existing registered
* netdevice, that is OK, register_netdev{,ice}() will notice this
* and fail.
*/
snprintf(dev->name, sizeof(dev->name), "eth%d", index);

/*
* Try all transport protocols.
* Note: more protocols can be added by adding '&& !X_init(lp, eth)'.
Expand Down Expand Up @@ -575,13 +582,6 @@ static int iss_net_configure(int index, char *init)
platform_device_register(&lp->pdev);
SET_NETDEV_DEV(dev, &lp->pdev.dev);

/*
* If this name ends up conflicting with an existing registered
* netdevice, that is OK, register_netdev{,ice}() will notice this
* and fail.
*/
snprintf(dev->name, sizeof(dev->name), "eth%d", index);

dev->netdev_ops = &iss_netdev_ops;
dev->mtu = lp->mtu;
dev->watchdog_timeo = (HZ >> 1);
Expand Down

0 comments on commit 358b181

Please sign in to comment.