Return-path: Received: from fallback2.mail.ru ([94.100.176.87]:57663 "EHLO fallback2.mail.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755327AbZLIDzq (ORCPT ); Tue, 8 Dec 2009 22:55:46 -0500 From: Andrey Borzenkov To: linux-hotplug@vger.kernel.org Subject: Re: wireless device and udev Date: Wed, 9 Dec 2009 06:54:27 +0300 Cc: "John W. Linville" , Johannes Berg , Stephen Hemminger , "Luis R. Rodriguez" , linux-wireless@vger.kernel.org References: <20091207172616.7470ed2b@nehalam> <1260300551.32227.1.camel@johannes.local> <20091208200504.GC16303@tuxdriver.com> In-Reply-To: <20091208200504.GC16303@tuxdriver.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1393824.IuRW47ZqDp"; protocol="application/pgp-signature"; micalg=pgp-sha1 Message-Id: <200912090654.28630.arvidjaar@mail.ru> Sender: linux-wireless-owner@vger.kernel.org List-ID: --nextPart1393824.IuRW47ZqDp Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable On Tuesday 08 of December 2009 23:05:04 John W. Linville wrote: > On Tue, Dec 08, 2009 at 08:29:11PM +0100, Johannes Berg wrote: > > On Tue, 2009-12-08 at 13:52 -0500, John W. Linville wrote: > > > So, probably we need to map from the wlanX name to the phyY name, > > > then determine whether or not this is the first wlanX for phyY. > > > If not, then the name should be left alone. > > > > > > Now, how do we figure out how many wlanX's belong to phyY? > > > > And what's the "first" one? :) >=20 > I suppose I was figuring that if there was only one, it was the > first. :-) But you're right, I suppose that could be racy... >=20 > > ls /sys/class/net/wlan0/device/net/ > > > > will give you the list of interface associated with this device. >=20 > Cool... >=20 Is it possible to distinguish between automatic system enumeration when=20 new device is created and explicit name that user gives? Because in=20 example above (iw phy add interface) user already supplied specific=20 name; there is no reason for udev to (try to) mangle it. So far the only possibility seems to check for wild card in interface=20 name. So what about adding new event attribute NAME_AUTOGENERATED=3D(yes| no) and simply leaving any event with NAME_AUTOGENERATED=3Dno alone in=20 udev? Any immediate problems? --nextPart1393824.IuRW47ZqDp Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEABECAAYFAksfH3QACgkQR6LMutpd94zHlgCfQo7yGJ3Cu/fAixQ3E31T5QQk GcAAoNUJ1FYViPRmkokgl0cevJZNI2fC =oaNz -----END PGP SIGNATURE----- --nextPart1393824.IuRW47ZqDp--