aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/irda
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2009-03-20 15:35:35 -0400
committerDavid S. Miller <davem@davemloft.net>2009-03-21 22:19:16 -0400
commitd36733afd9b65546e1fe0def5d50d8c4519ee452 (patch)
tree9065d014a6b9704cb30e68bc201dc1dd38974575 /drivers/net/irda
parent9cc8ba783d56b36259b2d610e97bcda8a6fe3b02 (diff)
irda: convert irda_usb 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/irda-usb.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/net/irda/irda-usb.c b/drivers/net/irda/irda-usb.c
index 3a22dc41b656..006ba23110db 100644
--- a/drivers/net/irda/irda-usb.c
+++ b/drivers/net/irda/irda-usb.c
@@ -1401,6 +1401,14 @@ static inline void irda_usb_init_qos(struct irda_usb_cb *self)
1401} 1401}
1402 1402
1403/*------------------------------------------------------------------*/ 1403/*------------------------------------------------------------------*/
1404static const struct net_device_ops irda_usb_netdev_ops = {
1405 .ndo_open = irda_usb_net_open,
1406 .ndo_stop = irda_usb_net_close,
1407 .ndo_do_ioctl = irda_usb_net_ioctl,
1408 .ndo_start_xmit = irda_usb_hard_xmit,
1409 .ndo_tx_timeout = irda_usb_net_timeout,
1410};
1411
1404/* 1412/*
1405 * Initialise the network side of the irda-usb instance 1413 * Initialise the network side of the irda-usb instance
1406 * Called when a new USB instance is registered in irda_usb_probe() 1414 * Called when a new USB instance is registered in irda_usb_probe()
@@ -1411,15 +1419,9 @@ static inline int irda_usb_open(struct irda_usb_cb *self)
1411 1419
1412 IRDA_DEBUG(1, "%s()\n", __func__); 1420 IRDA_DEBUG(1, "%s()\n", __func__);
1413 1421
1414 irda_usb_init_qos(self); 1422 netdev->netdev_ops = &irda_usb_netdev_ops;
1415 1423
1416 /* Override the network functions we need to use */ 1424 irda_usb_init_qos(self);
1417 netdev->hard_start_xmit = irda_usb_hard_xmit;
1418 netdev->tx_timeout = irda_usb_net_timeout;
1419 netdev->watchdog_timeo = 250*HZ/1000; /* 250 ms > USB timeout */
1420 netdev->open = irda_usb_net_open;
1421 netdev->stop = irda_usb_net_close;
1422 netdev->do_ioctl = irda_usb_net_ioctl;
1423 1425
1424 return register_netdev(netdev); 1426 return register_netdev(netdev);
1425} 1427}