aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/irda/via-ircc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/irda/via-ircc.c')
-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}