netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] libertas: name the network device wlan%d
@ 2009-08-11 14:13 Daniel Mack
  2009-08-11 14:34 ` John W. Linville
       [not found] ` <20090811151051.GA18186@guralp.com>
  0 siblings, 2 replies; 8+ messages in thread
From: Daniel Mack @ 2009-08-11 14:13 UTC (permalink / raw)
  To: libertas-dev; +Cc: Daniel Mack, Roel Kluin, John W. Linville, netdev

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(-)

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);
-- 
1.6.3.3


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] libertas: name the network device wlan%d
  2009-08-11 14:13 [PATCH] libertas: name the network device wlan%d Daniel Mack
@ 2009-08-11 14:34 ` John W. Linville
  2009-08-12  7:56   ` Bob Dunlop
  2009-08-12 16:31   ` Dan Williams
       [not found] ` <20090811151051.GA18186@guralp.com>
  1 sibling, 2 replies; 8+ messages in thread
From: John W. Linville @ 2009-08-11 14:34 UTC (permalink / raw)
  To: Daniel Mack; +Cc: libertas-dev, Roel Kluin, netdev

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
-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] libertas: name the network device wlan%d
       [not found] ` <20090811151051.GA18186@guralp.com>
@ 2009-08-11 15:33   ` Daniel Mack
  0 siblings, 0 replies; 8+ messages in thread
From: Daniel Mack @ 2009-08-11 15:33 UTC (permalink / raw)
  To: libertas-dev; +Cc: Roel Kluin, John W. Linville, netdev

On Tue, Aug 11, 2009 at 04:10:51PM +0100, Bob Dunlop wrote:
> On Tue, Aug 11 at 04:13, 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.
> 
> Just a nit pick but shouldn't the patch also include:
> 
> @@ -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);
> 
> 
> So collars and cuffs match.

Oh, of course.

Thanks,
Daniel

>From 63ace51c76ef513553f4b30da80603f1f81114d0 Mon Sep 17 00:00:00 2001
From: Daniel Mack <daniel@caiaq.de>
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.

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 |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

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


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] libertas: name the network device wlan%d
  2009-08-11 14:34 ` John W. Linville
@ 2009-08-12  7:56   ` Bob Dunlop
  2009-08-12  8:55     ` Daniel Mack
  2009-08-12 16:31   ` Dan Williams
  1 sibling, 1 reply; 8+ messages in thread
From: Bob Dunlop @ 2009-08-12  7:56 UTC (permalink / raw)
  To: John W. Linville; +Cc: Daniel Mack, netdev, Roel Kluin, libertas-dev

> > 
> > 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.

-- 
        Bob Dunlop
        Guralp Systems Limited
        http://www.guralp.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] libertas: name the network device wlan%d
  2009-08-12  7:56   ` Bob Dunlop
@ 2009-08-12  8:55     ` Daniel Mack
  0 siblings, 0 replies; 8+ messages in thread
From: Daniel Mack @ 2009-08-12  8:55 UTC (permalink / raw)
  To: John W. Linville, netdev, Roel Kluin, libertas-dev

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 :)


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] libertas: name the network device wlan%d
  2009-08-11 14:34 ` John W. Linville
  2009-08-12  7:56   ` Bob Dunlop
@ 2009-08-12 16:31   ` Dan Williams
  2009-08-13  3:48     ` Daniel Drake
  1 sibling, 1 reply; 8+ messages in thread
From: Dan Williams @ 2009-08-12 16:31 UTC (permalink / raw)
  To: John W. Linville; +Cc: Daniel Mack, libertas-dev, Roel Kluin, netdev, dsd

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



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] libertas: name the network device wlan%d
  2009-08-12 16:31   ` Dan Williams
@ 2009-08-13  3:48     ` Daniel Drake
  2009-08-13 17:28       ` Dan Williams
  0 siblings, 1 reply; 8+ messages in thread
From: Daniel Drake @ 2009-08-13  3:48 UTC (permalink / raw)
  To: Dan Williams
  Cc: John W. Linville, Daniel Mack, libertas-dev, Roel Kluin, netdev

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] libertas: name the network device wlan%d
  2009-08-13  3:48     ` Daniel Drake
@ 2009-08-13 17:28       ` Dan Williams
  0 siblings, 0 replies; 8+ messages in thread
From: Dan Williams @ 2009-08-13 17:28 UTC (permalink / raw)
  To: Daniel Drake
  Cc: netdev, Roel Kluin, John W. Linville, Daniel Mack, libertas-dev

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>


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-08-13 17:29 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-11 14:13 [PATCH] libertas: name the network device wlan%d Daniel Mack
2009-08-11 14:34 ` John W. Linville
2009-08-12  7:56   ` Bob Dunlop
2009-08-12  8:55     ` Daniel Mack
2009-08-12 16:31   ` Dan Williams
2009-08-13  3:48     ` Daniel Drake
2009-08-13 17:28       ` Dan Williams
     [not found] ` <20090811151051.GA18186@guralp.com>
2009-08-11 15:33   ` Daniel Mack

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).