summaryrefslogtreecommitdiff
path: root/drivers/net/wan/hdlc_ppp.c
diff options
context:
space:
mode:
authorAndrew Lunn <andrew@lunn.ch>2015-12-03 20:12:31 (GMT)
committerDavid S. Miller <davem@davemloft.net>2015-12-05 22:41:42 (GMT)
commit2f8364a291e8adde25c93f97a76abbcaf4b1ed3f (patch)
tree7b7e3de286880cf4938c00803df3a1ec32d22997 /drivers/net/wan/hdlc_ppp.c
parentff3516442768f0babe7ea2db62e34aee1d76e969 (diff)
downloadlinux-2f8364a291e8adde25c93f97a76abbcaf4b1ed3f.tar.xz
WAN: HDLC: Call notifiers before and after changing device type
An HDLC device can change type when the protocol driver is changed. Calling the notifier change allows potential users of the interface know about this planned change, and even block it. After the change has occurred, send a second notification to users can evaluate the new device type etc. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wan/hdlc_ppp.c')
-rw-r--r--drivers/net/wan/hdlc_ppp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/wan/hdlc_ppp.c b/drivers/net/wan/hdlc_ppp.c
index 0d76455..47fdb87 100644
--- a/drivers/net/wan/hdlc_ppp.c
+++ b/drivers/net/wan/hdlc_ppp.c
@@ -687,6 +687,7 @@ static int ppp_ioctl(struct net_device *dev, struct ifreq *ifr)
dev->hard_header_len = sizeof(struct hdlc_header);
dev->header_ops = &ppp_header_ops;
dev->type = ARPHRD_PPP;
+ call_netdevice_notifiers(NETDEV_POST_TYPE_CHANGE, dev);
netif_dormant_on(dev);
return 0;
}