Patchwork [35/45] bpqether: convert to net_device_ops

login
register
mail settings
Submitter Stephen Hemminger
Date Jan. 9, 2009, 11:01 p.m.
Message ID <20090109230139.314226600@linux-foundation.org>
Download mbox | patch
Permalink /patch/17642/
State Accepted
Delegated to: David Miller
Headers show

Comments

Stephen Hemminger - Jan. 9, 2009, 11:01 p.m.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>




--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

--- a/drivers/net/hamradio/bpqether.c	2009-01-09 14:00:32.000000000 -0800
+++ b/drivers/net/hamradio/bpqether.c	2009-01-09 14:00:32.000000000 -0800
@@ -466,16 +466,17 @@  static const struct file_operations bpq_
 
 /* ------------------------------------------------------------------------ */
 
+static const struct net_device_ops bpq_netdev_ops = {
+	.ndo_open	     = bpq_open,
+	.ndo_stop	     = bpq_close,
+	.ndo_start_xmit	     = bpq_xmit,
+	.ndo_set_mac_address = bpq_set_mac_address,
+	.ndo_do_ioctl	     = bpq_ioctl,
+};
 
 static void bpq_setup(struct net_device *dev)
 {
-
-	dev->hard_start_xmit = bpq_xmit;
-	dev->open	     = bpq_open;
-	dev->stop	     = bpq_close;
-	dev->set_mac_address = bpq_set_mac_address;
-	dev->get_stats	     = bpq_get_stats;
-	dev->do_ioctl	     = bpq_ioctl;
+	dev->netdev_ops	     = &bpq_netdev_ops;
 	dev->destructor	     = free_netdev;
 
 	memcpy(dev->broadcast, &ax25_bcast, AX25_ADDR_LEN);