Skip to content

Commit

Permalink
irda/au1k_ir: convert to net_device_ops
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Alexander Beregalov authored and David S. Miller committed Apr 16, 2009
1 parent e186d17 commit 602355a
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions drivers/net/irda/au1k_ir.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,17 @@ static int au1k_irda_init_iobuf(iobuff_t *io, int size)
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)
{
struct au1k_private *aup = netdev_priv(dev);
Expand All @@ -209,11 +220,7 @@ static int au1k_irda_net_init(struct net_device *dev)
if (err)
goto out1;

dev->open = au1k_irda_start;
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;
dev->netdev_ops = &au1k_irda_netdev_ops;

irda_init_max_qos_capabilies(&aup->qos);

Expand Down

0 comments on commit 602355a

Please sign in to comment.