aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/irda
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2009-03-20 15:35:43 -0400
committerDavid S. Miller <davem@davemloft.net>2009-03-21 22:33:48 -0400
commit0bd11f27ed3b3c04b1a753b6c8bdc79ffc1b8cef (patch)
tree70bf318a595e787601415d6cc53265a38dfb8821 /drivers/net/irda
parent02087be61af0e48eae42566d3c5783f2f44337c8 (diff)
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')
-rw-r--r--drivers/net/irda/via-ircc.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/drivers/net/irda/via-ircc.c b/drivers/net/irda/via-ircc.c
index 8b3e545924cc..864798502ff9 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)
310 pci_unregister_driver (&via_driver); 310 pci_unregister_driver (&via_driver);
311} 311}
312 312
313static const struct net_device_ops via_ircc_sir_ops = {
314 .ndo_start_xmit = via_ircc_hard_xmit_sir,
315 .ndo_open = via_ircc_net_open,
316 .ndo_stop = via_ircc_net_close,
317 .ndo_do_ioctl = via_ircc_net_ioctl,
318};
319static const struct net_device_ops via_ircc_fir_ops = {
320 .ndo_start_xmit = via_ircc_hard_xmit_fir,
321 .ndo_open = via_ircc_net_open,
322 .ndo_stop = via_ircc_net_close,
323 .ndo_do_ioctl = via_ircc_net_ioctl,
324};
325
313/* 326/*
314 * Function via_ircc_open (iobase, irq) 327 * Function via_ircc_open (iobase, irq)
315 * 328 *
@@ -428,10 +441,7 @@ static __devinit int via_ircc_open(int i, chipio_t * info, unsigned int id)
428 self->tx_fifo.tail = self->tx_buff.head; 441 self->tx_fifo.tail = self->tx_buff.head;
429 442
430 /* Override the network functions we need to use */ 443 /* Override the network functions we need to use */
431 dev->hard_start_xmit = via_ircc_hard_xmit_sir; 444 dev->netdev_ops = &via_ircc_sir_ops;
432 dev->open = via_ircc_net_open;
433 dev->stop = via_ircc_net_close;
434 dev->do_ioctl = via_ircc_net_ioctl;
435 445
436 err = register_netdev(dev); 446 err = register_netdev(dev);
437 if (err) 447 if (err)
@@ -798,11 +808,11 @@ static void via_ircc_change_speed(struct via_ircc_cb *self, __u32 speed)
798 808
799 if (speed > 115200) { 809 if (speed > 115200) {
800 /* Install FIR xmit handler */ 810 /* Install FIR xmit handler */
801 dev->hard_start_xmit = via_ircc_hard_xmit_fir; 811 dev->netdev_ops = &via_ircc_fir_ops;
802 via_ircc_dma_receive(self); 812 via_ircc_dma_receive(self);
803 } else { 813 } else {
804 /* Install SIR xmit handler */ 814 /* Install SIR xmit handler */
805 dev->hard_start_xmit = via_ircc_hard_xmit_sir; 815 dev->netdev_ops = &via_ircc_sir_ops;
806 } 816 }
807 netif_wake_queue(dev); 817 netif_wake_queue(dev);
808} 818}