mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-16 13:34:30 +00:00
dlci: convert to net_device_ops
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
07d117cf0a
commit
49e8abaf62
@ -200,7 +200,7 @@ static int dlci_transmit(struct sk_buff *skb, struct net_device *dev)
|
|||||||
|
|
||||||
netif_stop_queue(dev);
|
netif_stop_queue(dev);
|
||||||
|
|
||||||
ret = dlp->slave->hard_start_xmit(skb, dlp->slave);
|
ret = dlp->slave->netdev_ops->ndo_start_xmit(skb, dlp->slave);
|
||||||
switch (ret)
|
switch (ret)
|
||||||
{
|
{
|
||||||
case DLCI_RET_OK:
|
case DLCI_RET_OK:
|
||||||
@ -295,11 +295,9 @@ static int dlci_dev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
|
|||||||
|
|
||||||
static int dlci_change_mtu(struct net_device *dev, int new_mtu)
|
static int dlci_change_mtu(struct net_device *dev, int new_mtu)
|
||||||
{
|
{
|
||||||
struct dlci_local *dlp;
|
struct dlci_local *dlp = netdev_priv(dev);
|
||||||
|
|
||||||
dlp = netdev_priv(dev);
|
return dev_set_mtu(dlp->slave, new_mtu);
|
||||||
|
|
||||||
return((*dlp->slave->change_mtu)(dlp->slave, new_mtu));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int dlci_open(struct net_device *dev)
|
static int dlci_open(struct net_device *dev)
|
||||||
@ -479,17 +477,21 @@ static const struct header_ops dlci_header_ops = {
|
|||||||
.create = dlci_header,
|
.create = dlci_header,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const struct net_device_ops dlci_netdev_ops = {
|
||||||
|
.ndo_open = dlci_open,
|
||||||
|
.ndo_stop = dlci_close,
|
||||||
|
.ndo_do_ioctl = dlci_dev_ioctl,
|
||||||
|
.ndo_start_xmit = dlci_transmit,
|
||||||
|
.ndo_change_mtu = dlci_change_mtu,
|
||||||
|
};
|
||||||
|
|
||||||
static void dlci_setup(struct net_device *dev)
|
static void dlci_setup(struct net_device *dev)
|
||||||
{
|
{
|
||||||
struct dlci_local *dlp = netdev_priv(dev);
|
struct dlci_local *dlp = netdev_priv(dev);
|
||||||
|
|
||||||
dev->flags = 0;
|
dev->flags = 0;
|
||||||
dev->open = dlci_open;
|
|
||||||
dev->stop = dlci_close;
|
|
||||||
dev->do_ioctl = dlci_dev_ioctl;
|
|
||||||
dev->hard_start_xmit = dlci_transmit;
|
|
||||||
dev->header_ops = &dlci_header_ops;
|
dev->header_ops = &dlci_header_ops;
|
||||||
dev->change_mtu = dlci_change_mtu;
|
dev->netdev_ops = &dlci_netdev_ops;
|
||||||
dev->destructor = free_netdev;
|
dev->destructor = free_netdev;
|
||||||
|
|
||||||
dlp->receive = dlci_receive;
|
dlp->receive = dlci_receive;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user