linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: "Luis R. Rodriguez" <mcgrof@gmail.com>
Cc: Stephen Hemminger <shemminger@vyatta.com>,
	"John W. Linville" <linville@tuxdriver.com>,
	linux-wireless@vger.kernel.org, linux-hotplug@vger.kernel.org
Subject: Re: wireless device and udev
Date: Tue, 08 Dec 2009 20:07:08 +0000	[thread overview]
Message-ID: <1260302828.2901.17.camel@violet> (raw)
In-Reply-To: <43e72e890912081050w265bcbc1sd1380ef52fc0799b@mail.gmail.com>

Hi Luis,

> >> > The default udev persistent network rules based on hardware mac id doesn't
> >> > work well when multiple SSID's are created on an access-point.  The command
> >> >  iw phy phy0 interface add wlan1 type managed
> >> >
> >> > is supposed to make a device name wlan1, but udev sees that it has the same
> >> > mac address as wlan0 and gets confused leaving the device named wlan1_rename
> >> >
> >> > It looks like wlanX is breaking assumptions of existing udev persistent network
> >> > device name generation rules.  Perhaps there needs to be special case for wlanX
> >> > devices?
> >>
> >> Yes, probably so.  But what would it be?  Factoring-in SSID is clearly
> >> not right for the usual case (i.e. one interface on a mobile device).
> >> I'm not sure what else one could use as a key.
> >>
> >> What does udev do for bridge, bond, or vlan devices?  Don't those
> >> share MAC addresses with the underlying physical device?
> >>
> >> John
> >
> > At least on ubuntu/debian the name whitelist is:
> >
> >
> > # device name whitelist
> > KERNEL!="eth*|ath*|wlan*[0-9]|msh*|ra*|sta*|ctc*|lcs*|hsi*", GOTO="persistent_net_generator_end"
> >
> > So bond or bridge don't match and don't get tampered with.
> >
> > The problem is that wlan* device names are used for both hardware and virtual
> > devices.  Udev scripts can be fixed "do the right thing" but there is not sufficient
> > information for the script to decide how to attach persistent name.
> > What values from sysfs (ie attributes) should script be using?  This probably
> > means that additional attributes needed to be added to wireless device infrastructure
> > in kernel.
> 
> We could likely use the new SET_NETDEV_DEVTYPE() but I have yet to see
> where this is exported. It must be there somewhere.

they are part of the uevent the kernel sends. It will have the DEVTYPE
value there. However this has to be exactly the hardware type and in
both cases it will be "wlan" and has to be. The analogy that works here
is similar to partitions and disks in the storage world. We have just
different kinds of network interfaces.

Regards

Marcel



  parent reply	other threads:[~2009-12-08 20:07 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20091207172616.7470ed2b@nehalam>
2009-12-08 14:29 ` wireless device and udev John W. Linville
2009-12-08 15:24   ` Marco d'Itri
2009-12-08 18:43   ` Stephen Hemminger
2009-12-08 18:50     ` Luis R. Rodriguez
2009-12-08 18:59       ` Stephen Hemminger
2009-12-08 19:51         ` Luis R. Rodriguez
2009-12-08 20:07       ` Marcel Holtmann [this message]
2009-12-08 18:52     ` John W. Linville
2009-12-08 19:29       ` Johannes Berg
2009-12-08 20:05         ` John W. Linville
2009-12-09  3:54           ` Andrey Borzenkov
2009-12-09  8:30             ` Johannes Berg
2009-12-09 15:05             ` John W. Linville

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1260302828.2901.17.camel@violet \
    --to=marcel@holtmann.org \
    --cc=linux-hotplug@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=mcgrof@gmail.com \
    --cc=shemminger@vyatta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).