Commit 7cdc15f5 authored by Krzysztof Hałasa's avatar Krzysztof Hałasa Committed by David S. Miller

WAN: Generic HDLC now uses IFF_WAN_HDLC private flag.

Signed-off-by: default avatarKrzysztof Hałasa <khc@pm.waw.pl>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a962dc25
...@@ -106,7 +106,7 @@ static int hdlc_device_event(struct notifier_block *this, unsigned long event, ...@@ -106,7 +106,7 @@ static int hdlc_device_event(struct notifier_block *this, unsigned long event,
if (dev_net(dev) != &init_net) if (dev_net(dev) != &init_net)
return NOTIFY_DONE; return NOTIFY_DONE;
if (dev->get_stats != hdlc_get_stats) if (!(dev->priv_flags & IFF_WAN_HDLC))
return NOTIFY_DONE; /* not an HDLC device */ return NOTIFY_DONE; /* not an HDLC device */
if (event != NETDEV_CHANGE) if (event != NETDEV_CHANGE)
...@@ -235,6 +235,7 @@ static void hdlc_setup_dev(struct net_device *dev) ...@@ -235,6 +235,7 @@ static void hdlc_setup_dev(struct net_device *dev)
*/ */
dev->get_stats = hdlc_get_stats; dev->get_stats = hdlc_get_stats;
dev->flags = IFF_POINTOPOINT | IFF_NOARP; dev->flags = IFF_POINTOPOINT | IFF_NOARP;
dev->priv_flags = IFF_WAN_HDLC;
dev->mtu = HDLC_MAX_MTU; dev->mtu = HDLC_MAX_MTU;
dev->type = ARPHRD_RAWHDLC; dev->type = ARPHRD_RAWHDLC;
dev->hard_header_len = 16; dev->hard_header_len = 16;
......
...@@ -66,6 +66,7 @@ ...@@ -66,6 +66,7 @@
#define IFF_SLAVE_NEEDARP 0x40 /* need ARPs for validation */ #define IFF_SLAVE_NEEDARP 0x40 /* need ARPs for validation */
#define IFF_ISATAP 0x80 /* ISATAP interface (RFC4214) */ #define IFF_ISATAP 0x80 /* ISATAP interface (RFC4214) */
#define IFF_MASTER_ARPMON 0x100 /* bonding master, ARP mon in use */ #define IFF_MASTER_ARPMON 0x100 /* bonding master, ARP mon in use */
#define IFF_WAN_HDLC 0x200 /* WAN HDLC device */
#define IF_GET_IFACE 0x0001 /* for querying only */ #define IF_GET_IFACE 0x0001 /* for querying only */
#define IF_GET_PROTO 0x0002 #define IF_GET_PROTO 0x0002
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment