diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2009-03-20 19:35:43 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-21 19:33:48 -0700 |
commit | 0bd11f27ed3b3c04b1a753b6c8bdc79ffc1b8cef (patch) | |
tree | 70bf318a595e787601415d6cc53265a38dfb8821 /drivers/net/irda/via-ircc.c | |
parent | 02087be61af0e48eae42566d3c5783f2f44337c8 (diff) | |
download | kernel-crypto-0bd11f27ed3b3c04b1a753b6c8bdc79ffc1b8cef.tar.gz kernel-crypto-0bd11f27ed3b3c04b1a753b6c8bdc79ffc1b8cef.tar.xz kernel-crypto-0bd11f27ed3b3c04b1a753b6c8bdc79ffc1b8cef.zip |
irda: convert via-ircc to net_device_ops
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/irda/via-ircc.c')
-rw-r--r-- | drivers/net/irda/via-ircc.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/drivers/net/irda/via-ircc.c b/drivers/net/irda/via-ircc.c index 8b3e545924c..864798502ff 100644 --- a/drivers/net/irda/via-ircc.c +++ b/drivers/net/irda/via-ircc.c @@ -310,6 +310,19 @@ static void __exit via_ircc_cleanup(void) pci_unregister_driver (&via_driver); } +static const struct net_device_ops via_ircc_sir_ops = { + .ndo_start_xmit = via_ircc_hard_xmit_sir, + .ndo_open = via_ircc_net_open, + .ndo_stop = via_ircc_net_close, + .ndo_do_ioctl = via_ircc_net_ioctl, +}; +static const struct net_device_ops via_ircc_fir_ops = { + .ndo_start_xmit = via_ircc_hard_xmit_fir, + .ndo_open = via_ircc_net_open, + .ndo_stop = via_ircc_net_close, + .ndo_do_ioctl = via_ircc_net_ioctl, +}; + /* * Function via_ircc_open (iobase, irq) * @@ -428,10 +441,7 @@ static __devinit int via_ircc_open(int i, chipio_t * info, unsigned int id) self->tx_fifo.tail = self->tx_buff.head; /* Override the network functions we need to use */ - dev->hard_start_xmit = via_ircc_hard_xmit_sir; - dev->open = via_ircc_net_open; - dev->stop = via_ircc_net_close; - dev->do_ioctl = via_ircc_net_ioctl; + dev->netdev_ops = &via_ircc_sir_ops; err = register_netdev(dev); if (err) @@ -798,11 +808,11 @@ static void via_ircc_change_speed(struct via_ircc_cb *self, __u32 speed) if (speed > 115200) { /* Install FIR xmit handler */ - dev->hard_start_xmit = via_ircc_hard_xmit_fir; + dev->netdev_ops = &via_ircc_fir_ops; via_ircc_dma_receive(self); } else { /* Install SIR xmit handler */ - dev->hard_start_xmit = via_ircc_hard_xmit_sir; + dev->netdev_ops = &via_ircc_sir_ops; } netif_wake_queue(dev); } |