aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/hamradio/hdlcdrv.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@linux-foundation.org>2009-01-09 08:01:36 -0500
committerDavid S. Miller <davem@davemloft.net>2009-01-21 17:02:38 -0500
commit2d8b223d81a385a746befc7facf93680f4185533 (patch)
tree930973b52f7ced4c0515cae49a7b5968e8185506 /drivers/net/hamradio/hdlcdrv.c
parent5a7616af604caf0d436a1ed0d4298bb25cd77d67 (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>
Diffstat (limited to 'drivers/net/hamradio/hdlcdrv.c')
-rw-r--r--drivers/net/hamradio/hdlcdrv.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/net/hamradio/hdlcdrv.c b/drivers/net/hamradio/hdlcdrv.c
index 1215a49c38f1..61de56e45eed 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)
617 617
618/* --------------------------------------------------------------------- */ 618/* --------------------------------------------------------------------- */
619 619
620static const struct net_device_ops hdlcdrv_netdev = {
621 .ndo_open = hdlcdrv_open,
622 .ndo_stop = hdlcdrv_close,
623 .ndo_start_xmit = hdlcdrv_send_packet,
624 .ndo_do_ioctl = hdlcdrv_ioctl,
625 .ndo_set_mac_address = hdlcdrv_set_mac_address,
626};
627
620/* 628/*
621 * Initialize fields in hdlcdrv 629 * Initialize fields in hdlcdrv
622 */ 630 */
@@ -656,21 +664,13 @@ static void hdlcdrv_setup(struct net_device *dev)
656 s->bitbuf_hdlc.shreg = 0x80; 664 s->bitbuf_hdlc.shreg = 0x80;
657#endif /* HDLCDRV_DEBUG */ 665#endif /* HDLCDRV_DEBUG */
658 666
659 /*
660 * initialize the device struct
661 */
662 dev->open = hdlcdrv_open;
663 dev->stop = hdlcdrv_close;
664 dev->do_ioctl = hdlcdrv_ioctl;
665 dev->hard_start_xmit = hdlcdrv_send_packet;
666 dev->get_stats = hdlcdrv_get_stats;
667 667
668 /* Fill in the fields of the device structure */ 668 /* Fill in the fields of the device structure */
669 669
670 s->skb = NULL; 670 s->skb = NULL;
671 671
672 dev->netdev_ops = &hdlcdrv_netdev;
672 dev->header_ops = &ax25_header_ops; 673 dev->header_ops = &ax25_header_ops;
673 dev->set_mac_address = hdlcdrv_set_mac_address;
674 674
675 dev->type = ARPHRD_AX25; /* AF_AX25 device */ 675 dev->type = ARPHRD_AX25; /* AF_AX25 device */
676 dev->hard_header_len = AX25_MAX_HEADER_LEN + AX25_BPQ_HEADER_LEN; 676 dev->hard_header_len = AX25_MAX_HEADER_LEN + AX25_BPQ_HEADER_LEN;