diff mbox

libertas: name the network device wlan%d

Message ID 1250000012-25673-1-git-send-email-daniel@caiaq.de
State Not Applicable, archived
Delegated to: David Miller
Headers show

Commit Message

Daniel Mack Aug. 11, 2009, 2:13 p.m. UTC
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 <daniel@caiaq.de>
Cc: Roel Kluin <roel.kluin@gmail.com>
Cc: John W. Linville <linville@tuxdriver.com>
Cc: netdev@vger.kernel.org
---
 drivers/net/wireless/libertas/main.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Comments

John W. Linville Aug. 11, 2009, 2:34 p.m. UTC | #1
On Tue, Aug 11, 2009 at 04:13:32PM +0200, Daniel Mack wrote:
> 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 <daniel@caiaq.de>
> Cc: Roel Kluin <roel.kluin@gmail.com>
> Cc: John W. Linville <linville@tuxdriver.com>
> Cc: netdev@vger.kernel.org

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
Bob Dunlop Aug. 12, 2009, 7:56 a.m. UTC | #2
> > 
> > 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.
Daniel Mack Aug. 12, 2009, 8:55 a.m. UTC | #3
On Wed, Aug 12, 2009 at 08:56:24AM +0100, Bob Dunlop wrote:
> > > 
> > > 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.

Yes, our story here is very similar :)

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Dan Williams Aug. 12, 2009, 4:31 p.m. UTC | #4
On Tue, 2009-08-11 at 10:34 -0400, John W. Linville wrote:
> On Tue, Aug 11, 2009 at 04:13:32PM +0200, Daniel Mack wrote:
> > 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 <daniel@caiaq.de>
> > Cc: Roel Kluin <roel.kluin@gmail.com>
> > Cc: John W. Linville <linville@tuxdriver.com>
> > Cc: netdev@vger.kernel.org
> 
> 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


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Daniel Drake Aug. 13, 2009, 3:48 a.m. UTC | #5
2009/8/12 Dan Williams <dcbw@redhat.com>:
> 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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Dan Williams Aug. 13, 2009, 5:28 p.m. UTC | #6
On Thu, 2009-08-13 at 09:33 +0545, Daniel Drake wrote:
> 2009/8/12 Dan Williams <dcbw@redhat.com>:
> > 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:

Acked-by: Dan Williams <dcbw@redhat.com>

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c
index 89575e4..584022f 100644
--- a/drivers/net/wireless/libertas/main.c
+++ b/drivers/net/wireless/libertas/main.c
@@ -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);