From: Daniel Wagner <wagi@monom.org>
To: Kevin Wilson <wkevils@gmail.com>
Cc: Dan Williams <dcbw@redhat.com>,
Johannes Berg <johannes@sipsolutions.net>,
linux-wireless@vger.kernel.org, networkmanager-list@gnome.org
Subject: Re: NetworkManager and mac80211_hwsim
Date: Fri, 20 Feb 2009 15:57:43 +0100 [thread overview]
Message-ID: <20090220145743.GA9325@toronto053.server4you.de> (raw)
In-Reply-To: <20090219172002.GE28934@toronto053.server4you.de>
As it seems some more tweaking was needed to get it running
with the current HAL head. Does this work for you?
daniel
---
NetworkManager wants to read info.linux.driver for all devices.
Since a mac80211_hwsim device doesn't have a real parent the
property is not added. So let's add this property if there
is no proper parent and it is a 80211 device.
Signed-off-by: Daniel Wagner <wagi@monom.org>
---
v2: Set address for wmaster devices to nil. Otherwise the real
networking device is overwritten.
hald/linux/device.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/hald/linux/device.c b/hald/linux/device.c
index 21b9176..83b4a30 100644
--- a/hald/linux/device.c
+++ b/hald/linux/device.c
@@ -1576,6 +1576,7 @@ net_add (const gchar *sysfs_path, const gchar *device_file, HalDevice *parent_de
guint media_type;
gint flags;
gint addr_len;
+ gboolean real_parent = TRUE;
d = NULL;
d = hal_device_new ();
@@ -1588,6 +1589,7 @@ net_add (const gchar *sysfs_path, const gchar *device_file, HalDevice *parent_de
HAL_ERROR (("Device '%s' has no parent and couldn't find computer root object."));
goto error;
}
+ real_parent = FALSE;
}
}
@@ -1662,6 +1664,11 @@ net_add (const gchar *sysfs_path, const gchar *device_file, HalDevice *parent_de
hal_device_property_set_string (d, "info.category", "net.80211");
hal_device_add_capability (d, "net.80211");
hal_device_property_set_uint64 (d, "net.80211.mac_address", mac_address);
+
+ if (!real_parent) {
+ /* This is must be a mac80211_hwsim device */
+ hal_device_property_set_string (parent_dev, "info.linux.driver", "mac80211_hwsim");
+ }
} else if (stat (bridge_path, &s) == 0 && (s.st_mode & S_IFDIR)) {
hal_device_property_set_string (d, "info.product", "Bridge Interface");
hal_device_property_set_string (d, "info.category", "net.bridge");
@@ -1691,6 +1698,7 @@ net_add (const gchar *sysfs_path, const gchar *device_file, HalDevice *parent_de
hal_device_property_set_string (d, "info.product", "Networking Wireless Control Interface");
hal_device_property_set_string (d, "info.category", "net.80211control");
hal_device_add_capability (d, "net.80211control");
+ hal_device_property_set_string (d, "net.address", "00:00:00:00:00:00");
}
#else
#warning ARPHRD_IEEE80211_RADIOTAP and/or ARPHRD_IEEE80211_PRISM not defined!
--
1.6.0.2.GIT
prev parent reply other threads:[~2009-02-20 14:57 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-16 16:00 NetworkManager and mac80211_hwsim Daniel Wagner
2009-02-16 16:04 ` Johannes Berg
2009-02-16 17:25 ` Daniel Wagner
2009-02-16 18:00 ` Dan Williams
2009-02-18 8:06 ` Daniel Wagner
2009-02-18 8:35 ` Johannes Berg
2009-02-19 7:01 ` Daniel Wagner
2009-02-19 14:17 ` Kevin Wilson
2009-02-19 17:20 ` Daniel Wagner
2009-02-20 14:57 ` Daniel Wagner [this message]
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=20090220145743.GA9325@toronto053.server4you.de \
--to=wagi@monom.org \
--cc=dcbw@redhat.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=networkmanager-list@gnome.org \
--cc=wkevils@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).