linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Ben Greear <greearb@candelatech.com>
Cc: Christian Lamparter <chunkeey@googlemail.com>,
	linux-wireless <linux-wireless@vger.kernel.org>,
	"John W. Linville" <linville@tuxdriver.com>,
	rainbow lum <rainbowlum@gmail.com>
Subject: Re: phyX enumeration conflict
Date: Sun, 10 Oct 2010 18:43:55 +0200	[thread overview]
Message-ID: <1286729035.3547.10.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <4CB1DE18.9070400@candelatech.com>

On Sun, 2010-10-10 at 08:39 -0700, Ben Greear wrote:

> Sorry about that.  If anyone has any example udev magic to do this sort
> of thing, I'd like to try that out.

This works:

/etc/udev/rules.d/70-phyname.rules:
-- begin --
ACTION!="add", GOTO="phyname_end"
SUBSYSTEM!="ieee80211", GOTO="phyname_end"

# read MAC address
ENV{MATCHADDR}="$attr{macaddress}"
ENV{PHYIDX}="$attr{index}"

ENV{MATCHADDR}=="02:00:00:00:00:00", RUN+="/usr/sbin/iw %k set name hwsim0"

LABEL="phyname_end"
-- end --

Of course, you'd probably want to do something like
persistent-net-generator etc, but I'll leave that to somebody else.

Just remember you can't actually name it "phy0".

johannes


  reply	other threads:[~2010-10-10 16:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-08 19:59 phyX enumeration conflict Christian Lamparter
2010-10-10  8:09 ` Johannes Berg
2010-10-10  8:16   ` Johannes Berg
2010-10-10 15:39     ` Ben Greear
2010-10-10 16:43       ` Johannes Berg [this message]
2010-10-11 17:26         ` Ben Greear
2010-10-11 17:34           ` Johannes Berg
2010-10-11 17:46             ` Ben Greear
2010-10-11 17:56               ` Johannes Berg

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=1286729035.3547.10.camel@jlt3.sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=chunkeey@googlemail.com \
    --cc=greearb@candelatech.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=rainbowlum@gmail.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).