diff options
author | Stephen Hemminger <shemminger@linux-foundation.org> | 2009-01-09 13:01:36 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-01-21 14:02:38 -0800 |
commit | 2d8b223d81a385a746befc7facf93680f4185533 (patch) | |
tree | 930973b52f7ced4c0515cae49a7b5968e8185506 | |
parent | 5a7616af604caf0d436a1ed0d4298bb25cd77d67 (diff) |
hdlcdrv: convert to net_device_ops
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Thomas Sailer <t.sailer@alumni.ethz.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/hamradio/hdlcdrv.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/net/hamradio/hdlcdrv.c b/drivers/net/hamradio/hdlcdrv.c index 1215a49c38f..61de56e45ee 100644 --- a/drivers/net/hamradio/hdlcdrv.c +++ b/drivers/net/hamradio/hdlcdrv.c @@ -617,6 +617,14 @@ static int hdlcdrv_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) /* --------------------------------------------------------------------- */ +static const struct net_device_ops hdlcdrv_netdev = { + .ndo_open = hdlcdrv_open, + .ndo_stop = hdlcdrv_close, + .ndo_start_xmit = hdlcdrv_send_packet, + .ndo_do_ioctl = hdlcdrv_ioctl, + .ndo_set_mac_address = hdlcdrv_set_mac_address, +}; + /* * Initialize fields in hdlcdrv */ @@ -656,21 +664,13 @@ static void hdlcdrv_setup(struct net_device *dev) s->bitbuf_hdlc.shreg = 0x80; #endif /* HDLCDRV_DEBUG */ - /* - * initialize the device struct - */ - dev->open = hdlcdrv_open; - dev->stop = hdlcdrv_close; - dev->do_ioctl = hdlcdrv_ioctl; - dev->hard_start_xmit = hdlcdrv_send_packet; - dev->get_stats = hdlcdrv_get_stats; /* Fill in the fields of the device structure */ s->skb = NULL; + dev->netdev_ops = &hdlcdrv_netdev; dev->header_ops = &ax25_header_ops; - dev->set_mac_address = hdlcdrv_set_mac_address; dev->type = ARPHRD_AX25; /* AF_AX25 device */ dev->hard_header_len = AX25_MAX_HEADER_LEN + AX25_BPQ_HEADER_LEN; |