libertas: name the network device wlan%d
Subsystems (3)
PATCH 1/1 libertas: name the network device wlan%d
Devices created by the libertas driver are currently called eth%d. Which is wrong, because the device does not at all have anything to do with Ethernet. And it is also confusing when used on devices with more than one network device.
Fix this by calling it wlan%d.
--- drivers/net/wireless/libertas/main.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/net/wireless/libertas/main.c +1 -0
@@ -1204,6 +1204,7 @@ struct lbs_private *lbs_add_card(void *card, struct device *dmdev)SET_NETDEV_DEV (dev, dmdev); priv->rtap_net_dev =NULL ; +strcpy (dev->name,"wlan%d" );lbs_deb_thread ("Starting main thread...\n" );init_waitqueue_head (&priv->waitq);
Signature · 1 line
1.6.3.3
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 21 lines · Bob Dunlop
Quoted 6 lines · Daniel Mack
Devices created by the libertas driver are currently called eth%d. Which is wrong, because the device does not at all have anything to do with Ethernet. And it is also confusing when used on devices with more than one network device.
Fix this by calling it wlan%d.
Just a nit pick but shouldn't the patch also include:
(quoted diff) +1
-1@@ -1176,7 +1176,7 @@ /* Allocate an Ethernet device and register it */ dev = alloc_etherdev(sizeof(struct lbs_private)); if (!dev) { - lbs_pr_err("init ethX device failed\n"); + lbs_pr_err("init wlanX device failed\n"); goto done; } priv = netdev_priv(dev);
Quoted 1 line
So collars and cuffs match.
Oh, of course.
Thanks,
Daniel
Quoted 1 line
From
63ace51c76ef513553f4b30da80603f1f81114d0Mon Sep 17 00:00:00 2001
From: Daniel Mack <[email protected]>
Date: Tue, 11 Aug 2009 16:09:34 +0200
Subject: [PATCH] libertas: name the network device wlan%d
Devices created by the libertas driver are currently called eth%d. Which is wrong, because the device does not at all have anything to do with Ethernet. And it is also confusing when used on devices with more than one network device.
Fix this by calling it wlan%d.
--- drivers/net/wireless/libertas/main.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/net/wireless/libertas/main.c +2 -1
@@ -1176,7 +1176,7 @@ struct lbs_private *lbs_add_card(void *card, struct device *dmdev)/* Allocate an Ethernet device and register it */ dev =alloc_etherdev (sizeof (struct lbs_private ));if (!dev) { -lbs_pr_err ("init ethX device failed\n" ); +lbs_pr_err ("init wlanX device failed\n" ); goto done; } priv =netdev_priv (dev);
@@ -1204,6 +1204,7 @@ struct lbs_private *lbs_add_card(void *card, struct device *dmdev)SET_NETDEV_DEV (dev, dmdev); priv->rtap_net_dev =NULL ; +strcpy (dev->name,"wlan%d" );lbs_deb_thread ("Starting main thread...\n" );init_waitqueue_head (&priv->waitq);
Signature · 1 line
1.6.3.3
Quoted 11 lines · Daniel Mack
Devices created by the libertas driver are currently called eth%d. Which is wrong, because the device does not at all have anything to do with Ethernet. And it is also confusing when used on devices with more than one network device.
Fix this by calling it wlan%d.
Signed-off-by Daniel Mack <[email protected]>Cc Roel Kluin <[email protected]>Cc John W. Linville <[email protected]>
I'm fine with changing it, but it isn't really wrong either -- it's just a name, and afterall in most cases all the user will see is ethernet frames.
Comments from the libertas driver crew?
John
Signature · 2 lines
John W. Linville Someday the world will need a hero, and you [email protected] might be all we have. Be ready.
Quoted 8 lines
Quoted 3 lines
Fix this by calling it wlan%d.
I'm fine with changing it, but it isn't really wrong either -- it's just a name, and afterall in most cases all the user will see is ethernet frames.
Comments from the libertas driver crew?
Well I've been applying the equivalent of this patch privately since we started using the libertas driver. We build systems with one or two wired Ethernets and then an optional wireless module.
A fixed name wlan0 is a lot easier than explaining to a user that the interface might be eth1 or eth2 depending on which model they have, or that eth1 might be wired or wireless. It also simplifies scripts and configuration file handling.
I'm sure there are many other solutions for big systems but this is really simple for small boys.
Signature · 3 lines
Bob Dunlop
Guralp Systems Limited
http://www.guralp.comQuoted 13 lines · Bob Dunlop
Quoted 8 lines
Quoted 3 lines
Fix this by calling it wlan%d.
I'm fine with changing it, but it isn't really wrong either -- it's just a name, and afterall in most cases all the user will see is ethernet frames.
Comments from the libertas driver crew?
Well I've been applying the equivalent of this patch privately since we started using the libertas driver. We build systems with one or two wired Ethernets and then an optional wireless module.
Quoted 7 lines
A fixed name wlan0 is a lot easier than explaining to a user that the interface might be eth1 or eth2 depending on which model they have, or that eth1 might be wired or wireless. It also simplifies scripts and configuration file handling.
I'm sure there are many other solutions for big systems but this is really simple for small boys.
Yes, our story here is very similar :)
Quoted 13 lines · John W. Linville
Quoted 11 lines · Daniel Mack
Devices created by the libertas driver are currently called eth%d. Which is wrong, because the device does not at all have anything to do with Ethernet. And it is also confusing when used on devices with more than one network device.
Fix this by calling it wlan%d.
Signed-off-by Daniel Mack <[email protected]>Cc Roel Kluin <[email protected]>Cc John W. Linville <[email protected]>
Quoted 5 lines
I'm fine with changing it, but it isn't really wrong either -- it's just a name, and afterall in most cases all the user will see is ethernet frames.
Comments from the libertas driver crew?
I don't care either way, it's completely historical. Most of the fullmac drivers used 'eth' back when. Might want to get buy-in from the OLPC crew since they probably have the most deployed units using libertas (cc-ed Daniel Drake).
Daniel, is it a problem for you guys if the libertas wifi interface name went from 'eth' -> 'wlan' ? Mesh name would be unchanged.
Dan
2009/8/12 Dan Williams <[email protected]>:
Quoted 2 lines
Daniel, is it a problem for you guys if the libertas wifi interface name went from 'eth' -> 'wlan' ? Mesh name would be unchanged.
I can't think of any problems.
Daniel
Dan Williams
Acked-byQuoted 5 lines · Daniel Drake
2009/8/12 Dan Williams <[email protected]>:
Quoted 2 lines
Daniel, is it a problem for you guys if the libertas wifi interface name went from 'eth' -> 'wlan' ? Mesh name would be unchanged.
I can't think of any problems.
In that case: