mirror of https://gitee.com/openkylin/linux.git
irda/au1k_ir: convert to net_device_ops
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
e186d174e0
commit
602355a035
|
@ -198,6 +198,17 @@ static int au1k_irda_init_iobuf(iobuff_t *io, int size)
|
||||||
return io->head ? 0 : -ENOMEM;
|
return io->head ? 0 : -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static const struct net_device_ops au1k_irda_netdev_ops = {
|
||||||
|
.ndo_open = au1k_irda_start,
|
||||||
|
.ndo_stop = au1k_irda_stop,
|
||||||
|
.ndo_start_xmit = au1k_irda_hard_xmit,
|
||||||
|
.ndo_tx_timeout = au1k_tx_timeout,
|
||||||
|
.ndo_do_ioctl = au1k_irda_ioctl,
|
||||||
|
.ndo_change_mtu = eth_change_mtu,
|
||||||
|
.ndo_validate_addr = eth_validate_addr,
|
||||||
|
.ndo_set_mac_address = eth_mac_addr,
|
||||||
|
};
|
||||||
|
|
||||||
static int au1k_irda_net_init(struct net_device *dev)
|
static int au1k_irda_net_init(struct net_device *dev)
|
||||||
{
|
{
|
||||||
struct au1k_private *aup = netdev_priv(dev);
|
struct au1k_private *aup = netdev_priv(dev);
|
||||||
|
@ -209,11 +220,7 @@ static int au1k_irda_net_init(struct net_device *dev)
|
||||||
if (err)
|
if (err)
|
||||||
goto out1;
|
goto out1;
|
||||||
|
|
||||||
dev->open = au1k_irda_start;
|
dev->netdev_ops = &au1k_irda_netdev_ops;
|
||||||
dev->hard_start_xmit = au1k_irda_hard_xmit;
|
|
||||||
dev->stop = au1k_irda_stop;
|
|
||||||
dev->do_ioctl = au1k_irda_ioctl;
|
|
||||||
dev->tx_timeout = au1k_tx_timeout;
|
|
||||||
|
|
||||||
irda_init_max_qos_capabilies(&aup->qos);
|
irda_init_max_qos_capabilies(&aup->qos);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue