Patchwork [02/77] atm: cconvert clip driver to net_device_ops

login
register
mail settings
Submitter stephen hemminger
Date March 21, 2009, 5:35 a.m.
Message ID <20090321053712.726058041@vyatta.com>
Download mbox | patch
Permalink /patch/24839/
State Accepted
Delegated to: David Miller
Headers show

Comments

stephen hemminger - March 21, 2009, 5:35 a.m.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

---
 net/atm/clip.c |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
David Miller - March 22, 2009, 2:34 a.m.
From: Stephen Hemminger <shemminger@vyatta.com>
Date: Fri, 20 Mar 2009 22:35:29 -0700

> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

Applied.
--
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/net/atm/clip.c	2009-03-19 22:40:30.510964125 -0700
+++ b/net/atm/clip.c	2009-03-19 22:42:40.824964180 -0700
@@ -552,10 +552,13 @@  static int clip_setentry(struct atm_vcc 
 	return error;
 }
 
+static const struct net_device_ops clip_netdev_ops = {
+	.ndo_start_xmit = clip_start_xmit,
+};
+
 static void clip_setup(struct net_device *dev)
 {
-	dev->hard_start_xmit = clip_start_xmit;
-	/* sg_xmit ... */
+	dev->netdev_ops = &clip_netdev_ops;
 	dev->type = ARPHRD_ATM;
 	dev->hard_header_len = RFC1483LLC_LEN;
 	dev->mtu = RFC1626_MTU;
@@ -615,7 +618,7 @@  static int clip_device_event(struct noti
 	}
 
 	/* ignore non-CLIP devices */
-	if (dev->type != ARPHRD_ATM || dev->hard_start_xmit != clip_start_xmit)
+	if (dev->type != ARPHRD_ATM || dev->netdev_ops != &clip_netdev_ops)
 		return NOTIFY_DONE;
 
 	switch (event) {