summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2009-03-20 19:35:40 +0000
committerDavid S. Miller <davem@davemloft.net>2009-03-21 19:33:46 -0700
commit2d44a22254c1c4ad35a58e6d9d15a547d8841efc (patch)
treea9624cbcf06f5c28c70e393c5250558a655280f0
parentc279b8c996e99a3fca7806986415263f840b2fa1 (diff)
irda: convert ali driver to net_device_ops
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/irda/ali-ircc.c23
1 files changed, 17 insertions, 6 deletions
diff --git a/drivers/net/irda/ali-ircc.c b/drivers/net/irda/ali-ircc.c
index 17779f9bffc..ad179558002 100644
--- a/drivers/net/irda/ali-ircc.c
+++ b/drivers/net/irda/ali-ircc.c
@@ -259,6 +259,20 @@ static void __exit ali_ircc_cleanup(void)
IRDA_DEBUG(2, "%s(), ----------------- End -----------------\n", __func__);
}
+static const struct net_device_ops ali_ircc_sir_ops = {
+ .ndo_open = ali_ircc_net_open,
+ .ndo_stop = ali_ircc_net_close,
+ .ndo_start_xmit = ali_ircc_sir_hard_xmit,
+ .ndo_do_ioctl = ali_ircc_net_ioctl,
+};
+
+static const struct net_device_ops ali_ircc_fir_ops = {
+ .ndo_open = ali_ircc_net_open,
+ .ndo_stop = ali_ircc_net_close,
+ .ndo_start_xmit = ali_ircc_fir_hard_xmit,
+ .ndo_do_ioctl = ali_ircc_net_ioctl,
+};
+
/*
* Function ali_ircc_open (int i, chipio_t *inf)
*
@@ -361,10 +375,7 @@ static int ali_ircc_open(int i, chipio_t *info)
self->tx_fifo.tail = self->tx_buff.head;
/* Override the network functions we need to use */
- dev->hard_start_xmit = ali_ircc_sir_hard_xmit;
- dev->open = ali_ircc_net_open;
- dev->stop = ali_ircc_net_close;
- dev->do_ioctl = ali_ircc_net_ioctl;
+ dev->netdev_ops = &ali_ircc_sir_ops;
err = register_netdev(dev);
if (err) {
@@ -974,7 +985,7 @@ static void ali_ircc_change_speed(struct ali_ircc_cb *self, __u32 baud)
ali_ircc_fir_change_speed(self, baud);
/* Install FIR xmit handler*/
- dev->hard_start_xmit = ali_ircc_fir_hard_xmit;
+ dev->netdev_ops = &ali_ircc_fir_ops;
/* Enable Interuupt */
self->ier = IER_EOM; // benjamin 2000/11/20 07:24PM
@@ -988,7 +999,7 @@ static void ali_ircc_change_speed(struct ali_ircc_cb *self, __u32 baud)
ali_ircc_sir_change_speed(self, baud);
/* Install SIR xmit handler*/
- dev->hard_start_xmit = ali_ircc_sir_hard_xmit;
+ dev->netdev_ops = &ali_ircc_sir_ops;
}