ppp: convert to net_device_ops
Convert this driver to network device ops. Compile tested only. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
acc784263b
commit
52256cfc9f
1 changed files with 5 additions and 1 deletions
|
@ -971,8 +971,13 @@ ppp_net_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static const struct net_device_ops ppp_netdev_ops = {
|
||||||
|
.ndo_do_ioctl = ppp_net_ioctl,
|
||||||
|
};
|
||||||
|
|
||||||
static void ppp_setup(struct net_device *dev)
|
static void ppp_setup(struct net_device *dev)
|
||||||
{
|
{
|
||||||
|
dev->netdev_ops = &ppp_netdev_ops;
|
||||||
dev->hard_header_len = PPP_HDRLEN;
|
dev->hard_header_len = PPP_HDRLEN;
|
||||||
dev->mtu = PPP_MTU;
|
dev->mtu = PPP_MTU;
|
||||||
dev->addr_len = 0;
|
dev->addr_len = 0;
|
||||||
|
@ -2436,7 +2441,6 @@ ppp_create_interface(int unit, int *retp)
|
||||||
dev->priv = ppp;
|
dev->priv = ppp;
|
||||||
|
|
||||||
dev->hard_start_xmit = ppp_start_xmit;
|
dev->hard_start_xmit = ppp_start_xmit;
|
||||||
dev->do_ioctl = ppp_net_ioctl;
|
|
||||||
|
|
||||||
ret = -EEXIST;
|
ret = -EEXIST;
|
||||||
mutex_lock(&all_ppp_mutex);
|
mutex_lock(&all_ppp_mutex);
|
||||||
|
|
Loading…
Add table
Reference in a new issue