diff mbox

[09/45] rose: convert to network_device_ops

Message ID 20090109230137.377073273@linux-foundation.org
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Stephen Hemminger Jan. 9, 2009, 11:01 p.m. UTC
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

Comments

Ralf Baechle Jan. 10, 2009, 12:55 p.m. UTC | #1
On Fri, Jan 09, 2009 at 03:01:06PM -0800, Stephen Hemminger wrote:
> From: Stephen Hemminger <shemminger@linux-foundation.org>
> Date: Fri, 09 Jan 2009 15:01:06 -0800
> To: David Miller <davem@davemloft.net>, Ralf Baechle <ralf@linux-mips.org>
> Cc: netdev@vger.kernel.org, linux-hams@vger.kernel.org
> Subject: [patch 09/45] rose: convert to network_device_ops
> 
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

Acked-by: Ralf Baechle <ralf@linux-mips.org>
--
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
diff mbox

Patch

--- a/net/rose/rose_dev.c	2009-01-09 13:39:57.000000000 -0800
+++ b/net/rose/rose_dev.c	2009-01-09 13:40:29.000000000 -0800
@@ -149,18 +149,22 @@  static const struct header_ops rose_head
 	.rebuild= rose_rebuild_header,
 };
 
+static const struct net_device_ops rose_netdev_ops = {
+	.ndo_open		= rose_open,
+	.ndo_stop		= rose_close,
+	.ndo_start_xmit		= rose_xmit,
+	.ndo_set_mac_address    = rose_set_mac_address,
+};
+
 void rose_setup(struct net_device *dev)
 {
 	dev->mtu		= ROSE_MAX_PACKET_SIZE - 2;
-	dev->hard_start_xmit	= rose_xmit;
-	dev->open		= rose_open;
-	dev->stop		= rose_close;
+	dev->netdev_ops		= &rose_netdev_ops;
 
 	dev->header_ops		= &rose_header_ops;
 	dev->hard_header_len	= AX25_BPQ_HEADER_LEN + AX25_MAX_HEADER_LEN + ROSE_MIN_LEN;
 	dev->addr_len		= ROSE_ADDR_LEN;
 	dev->type		= ARPHRD_ROSE;
-	dev->set_mac_address    = rose_set_mac_address;
 
 	/* New-style flags. */
 	dev->flags		= IFF_NOARP;