diff options
-rw-r--r-- | drivers/net/irda/sir_dev.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/net/irda/sir_dev.c b/drivers/net/irda/sir_dev.c index 803c0be3fc7e..d940809762ec 100644 --- a/drivers/net/irda/sir_dev.c +++ b/drivers/net/irda/sir_dev.c | |||
@@ -865,6 +865,12 @@ out: | |||
865 | return 0; | 865 | return 0; |
866 | } | 866 | } |
867 | 867 | ||
868 | static const struct net_device_ops sirdev_ops = { | ||
869 | .ndo_start_xmit = sirdev_hard_xmit, | ||
870 | .ndo_open = sirdev_open, | ||
871 | .ndo_stop = sirdev_close, | ||
872 | .ndo_do_ioctl = sirdev_ioctl, | ||
873 | }; | ||
868 | /* ----------------------------------------------------------------------------- */ | 874 | /* ----------------------------------------------------------------------------- */ |
869 | 875 | ||
870 | struct sir_dev * sirdev_get_instance(const struct sir_driver *drv, const char *name) | 876 | struct sir_dev * sirdev_get_instance(const struct sir_driver *drv, const char *name) |
@@ -908,10 +914,7 @@ struct sir_dev * sirdev_get_instance(const struct sir_driver *drv, const char *n | |||
908 | dev->netdev = ndev; | 914 | dev->netdev = ndev; |
909 | 915 | ||
910 | /* Override the network functions we need to use */ | 916 | /* Override the network functions we need to use */ |
911 | ndev->hard_start_xmit = sirdev_hard_xmit; | 917 | ndev->netdev_ops = &sirdev_ops; |
912 | ndev->open = sirdev_open; | ||
913 | ndev->stop = sirdev_close; | ||
914 | ndev->do_ioctl = sirdev_ioctl; | ||
915 | 918 | ||
916 | if (register_netdev(ndev)) { | 919 | if (register_netdev(ndev)) { |
917 | IRDA_ERROR("%s(), register_netdev() failed!\n", __func__); | 920 | IRDA_ERROR("%s(), register_netdev() failed!\n", __func__); |