From: Guillaume Nault <g.nault@alphalink.fr>
To: netdev@vger.kernel.org
Cc: Paul Mackerras <paulus@samba.org>,
linux-ppp@vger.kernel.org,
"David S. Miller" <davem@davemloft.net>
Subject: [PATCH net-next 1/2] ppp: define "ppp" device type
Date: Fri, 11 Dec 2015 19:54:49 +0100 [thread overview]
Message-ID: <a88a45cd8b3a37873eef4d09f5adb1ff02a6649a.1449859708.git.g.nault@alphalink.fr> (raw)
In-Reply-To: <cover.1449859708.git.g.nault@alphalink.fr>
Let PPP devices be identified as such in /sys/class/net/<iface>/uevent.
Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
---
drivers/net/ppp/ppp_generic.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c
index 9a863c6..1cd7651 100644
--- a/drivers/net/ppp/ppp_generic.c
+++ b/drivers/net/ppp/ppp_generic.c
@@ -1138,9 +1138,15 @@ static const struct net_device_ops ppp_netdev_ops = {
.ndo_get_stats64 = ppp_get_stats64,
};
+static struct device_type ppp_type = {
+ .name = "ppp",
+};
+
static void ppp_setup(struct net_device *dev)
{
dev->netdev_ops = &ppp_netdev_ops;
+ SET_NETDEV_DEVTYPE(dev, &ppp_type);
+
dev->hard_header_len = PPP_HDRLEN;
dev->mtu = PPP_MRU;
dev->addr_len = 0;
--
2.6.4
next prev parent reply other threads:[~2015-12-11 19:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-11 18:54 [PATCH net-next 0/2] Minor PPP devices improvements Guillaume Nault
2015-12-11 18:54 ` Guillaume Nault [this message]
2015-12-11 18:54 ` [PATCH net-next 2/2] ppp: declare ppp devices as enumerated interfaces Guillaume Nault
2015-12-14 21:21 ` [PATCH net-next 0/2] Minor PPP devices improvements David Miller
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=a88a45cd8b3a37873eef4d09f5adb1ff02a6649a.1449859708.git.g.nault@alphalink.fr \
--to=g.nault@alphalink.fr \
--cc=davem@davemloft.net \
--cc=linux-ppp@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=paulus@samba.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).