From: Alexander Aring <alex.aring@gmail.com>
To: linux-wpan@vger.kernel.org
Cc: Alexander Aring <alex.aring@gmail.com>
Subject: [RFC bluetooth-next 1/4] ieee802154: set wpan netdev devtype
Date: Tue, 20 Jan 2015 21:57:39 +0100 [thread overview]
Message-ID: <1421787462-24042-2-git-send-email-alex.aring@gmail.com> (raw)
In-Reply-To: <1421787462-24042-1-git-send-email-alex.aring@gmail.com>
This patch adds the setting for the netdev devtype. Like wireless which
sets this value to "wlan", this patch will set this value to "wpan".
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
---
net/ieee802154/core.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/net/ieee802154/core.c b/net/ieee802154/core.c
index 18bc7e7..b99971f 100644
--- a/net/ieee802154/core.c
+++ b/net/ieee802154/core.c
@@ -199,6 +199,10 @@ void cfg802154_dev_free(struct cfg802154_registered_device *rdev)
kfree(rdev);
}
+static const struct device_type wpan_phy_type = {
+ .name = "wpan",
+};
+
static void
cfg802154_update_iface_num(struct cfg802154_registered_device *rdev,
int iftype, int num)
@@ -223,7 +227,9 @@ static int cfg802154_netdev_notifier_call(struct notifier_block *nb,
/* TODO WARN_ON unspec type */
switch (state) {
- /* TODO NETDEV_DEVTYPE */
+ case NETDEV_POST_INIT:
+ SET_NETDEV_DEVTYPE(dev, &wpan_phy_type);
+ break;
case NETDEV_REGISTER:
wpan_dev->identifier = ++rdev->wpan_dev_id;
list_add_rcu(&wpan_dev->list, &rdev->wpan_dev_list);
--
2.2.2
next prev parent reply other threads:[~2015-01-20 20:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-20 20:57 [RFC bluetooth-next 0/4] ieee802154: UAPI changes Alexander Aring
2015-01-20 20:57 ` Alexander Aring [this message]
2015-01-20 20:57 ` [RFC bluetooth-next 2/4] ieee802154: 6lowpan: fix ARPHRD to ARPHRD_6LOWPAN Alexander Aring
2015-01-21 20:24 ` Alexander Aring
2015-01-20 20:57 ` [RFC bluetooth-next 3/4] ieee802154: change wpan-phy name to phy Alexander Aring
2015-01-20 20:57 ` [RFC bluetooth-next 4/4] ieee802154: remove deprecated sysfs entries Alexander Aring
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=1421787462-24042-2-git-send-email-alex.aring@gmail.com \
--to=alex.aring@gmail.com \
--cc=linux-wpan@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