From: Johannes Berg <johannes@sipsolutions.net>
To: netdev@vger.kernel.org, Jouni Malinen <jkm@devicescape.com>,
Jiri Benc <jbenc@suse.cz>
Subject: [d80211 rfc] link master interface from wiphy
Date: Mon, 14 Aug 2006 10:12:01 +0200 [thread overview]
Message-ID: <44E03051.8030808@sipsolutions.net> (raw)
In-Reply-To: <44E02F41.2060300@sipsolutions.net>
I'd like to see a link from the wiphy to the master interface that
belongs to it so one can tell this easily on systems that have multiple
wireless devices. wpa_supplicant could use this, I guess. I think
another link to wlan#ap should be created (or does wpa_supplicant set
the name of that so it knows which one it will get?), or something like
that anyway.
Here's a patch to just create the master link:
--- wireless-dev.orig/net/d80211/ieee80211.c 2006-08-11
20:54:09.409674798 +0200
+++ wireless-dev/net/d80211/ieee80211.c 2006-08-11 21:26:22.629674798
+0200
@@ -4449,6 +4449,7 @@ int ieee80211_register_hw(struct net_dev
rtnl_unlock();
goto fail_dev;
}
+ sysfs_create_link(&local->class_dev.kobj, &dev->class_dev.kobj,
"master");
result = ieee80211_sysfs_add_netdevice(dev);
rtnl_unlock();
if (result < 0)
On the other hand, is there any real reason we have this code:
ndev->base_addr = dev->base_addr;
ndev->irq = dev->irq;
ndev->mem_start = dev->mem_start;
ndev->mem_end = dev->mem_end;
ndev->flags = dev->flags & IFF_MULTICAST;
SET_NETDEV_DEV(ndev, dev->class_dev.dev);
in ieee80211_if_add? Maybe we should make the virtual devices all
children of the wiphy (struct ieee80211_local) instead of making them
children of the physical device? I don't really know though. This is too
dark magic for me ;)
However, I do know that I can trivially rename the wmaster0 interface
using just 'ip link set wmaster0 name wlan3' and things will probably be
very confusing for any program that relies on the naming to know which
device is which. Hence, I think we need some symlinks here to be able to
tell which device is which. Or maybe we should directly surface the
ifindex in some sysfs attributes ;)
Comments welcome. Userspace comments as well, I'm programming something
that'll use a bunch of interfaces (wmaster, a monitor one and a sta one
probably) and I want the user to just select the physical interface, not
all these three logical ones... (in fact, I'm creating the logical
monitor interface myself in code).
johannes
PS: Yes, I do realize that doing
ip link set wlan0 name xxx
ip link set wmaster0 name wlan0
ip link set xxx name wmaster0
is confusing. But since it is possible things shouldn't fall over if the
user decides for some weird local device naming. And wpa_supplicant
shouldn't need to require being configured all the device names either.
In fact IMHO just giving it a physical device (say via mac address)
ought to be enough...
next prev parent reply other threads:[~2006-08-14 8:12 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-14 8:07 [wireless] bunch of questions and notes on d80211 Johannes Berg
2006-08-14 8:10 ` bcm43xx for d80211 softirq loop Johannes Berg
[not found] ` <44E0300D.1000402-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
2006-08-14 8:21 ` Johannes Berg
2006-08-14 13:27 ` Michael Buesch
2006-08-14 8:12 ` Johannes Berg [this message]
2006-08-14 12:01 ` [d80211 rfc] link master interface from wiphy Dan Williams
2006-08-16 17:05 ` Jiri Benc
2006-08-17 7:18 ` Johannes Berg
2006-08-14 8:13 ` [PATCH] d80211: fix some 0 vs. NULL comparisons Johannes Berg
2006-08-14 13:20 ` Johannes Berg
2006-08-14 15:48 ` Jouni Malinen
2006-08-14 8:15 ` [PATCH] d80211: get rid of the WME bitfield Johannes Berg
2006-08-14 16:12 ` Jouni Malinen
2006-08-15 7:11 ` Johannes Berg
2006-08-14 8:16 ` ieee80211_japan_5ghz / firmware etc.?? Johannes Berg
2006-08-14 8:16 ` ieee80211_set_encryption Johannes Berg
2006-08-14 15:53 ` ieee80211_set_encryption Jouni Malinen
2006-08-14 8:18 ` network manager confused with bcm43xx-d80211? Johannes Berg
2006-08-14 11:46 ` Dan Williams
2006-08-14 12:28 ` Johannes Berg
2006-08-14 12:48 ` Larry Finger
2006-08-14 12:54 ` Johannes Berg
2006-08-14 8:19 ` d80211 and sta_aid for AP functionality Johannes Berg
2006-08-17 18:21 ` Jiri Benc
2006-08-14 8:22 ` wlan#ap seems bogus Johannes Berg
2006-08-14 14:04 ` Johannes Berg
2006-08-14 18:53 ` Simon Barber
2006-08-15 7:22 ` Johannes Berg
2006-08-14 15:58 ` Jouni Malinen
2006-08-14 16:04 ` 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=44E03051.8030808@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=jbenc@suse.cz \
--cc=jkm@devicescape.com \
--cc=netdev@vger.kernel.org \
/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).