[svn-commits] sruffell: branch 1.4 r4686 - /branches/1.4/kernel/wctc4xxp/base.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Sun Oct 4 14:31:50 CDT 2009


Author: sruffell
Date: Sun Oct  4 14:31:45 2009
New Revision: 4686

URL: http://svnview.digium.com/svn/zaptel?view=rev&rev=4686
Log:
wctc4xxp: Update to use struct net_device_ops.

Accomodates a change in the linux kernel network device interface.

This is a backport from https://origsvn.digium.com/svn/dahdi/linux/trunk@6717

From: sruffell <sruffell at 22b186d9-ae4d-0410-a2cf-b1b22c4d6fbd>

Modified:
    branches/1.4/kernel/wctc4xxp/base.c

Modified: branches/1.4/kernel/wctc4xxp/base.c
URL: http://svnview.digium.com/svn/zaptel/branches/1.4/kernel/wctc4xxp/base.c?view=diff&rev=4686&r1=4685&r2=4686
==============================================================================
--- branches/1.4/kernel/wctc4xxp/base.c (original)
+++ branches/1.4/kernel/wctc4xxp/base.c Sun Oct  4 14:31:45 2009
@@ -730,6 +730,17 @@
 	return 0;
 }
 
+#ifdef HAVE_NET_DEVICE_OPS
+const struct net_device_ops wctc4xxp_netdev_ops = {
+	.ndo_set_multicast_list = &wctc4xxp_net_set_multi,
+	.ndo_open = &wctc4xxp_net_up,
+	.ndo_stop = &wctc4xxp_net_down,
+	.ndo_start_xmit = &wctc4xxp_net_hard_start_xmit,
+	.ndo_get_stats = &wctc4xxp_net_get_stats,
+	.ndo_do_ioctl = &wctc4xxp_net_ioctl,
+};
+#endif
+
 /**
  * wctc4xxp_net_register - Register a new network interface.
  * @wc: transcoder card to register the interface for.
@@ -761,14 +772,21 @@
 	netdev->priv = wc;
 #	endif
 	memcpy(netdev->dev_addr, our_mac, sizeof(our_mac));
+
+#	ifdef HAVE_NET_DEVICE_OPS
+	netdev->netdev_ops = &wctc4xxp_netdev_ops;
+#	else
 	netdev->set_multicast_list = &wctc4xxp_net_set_multi;
 	netdev->open = &wctc4xxp_net_up;
 	netdev->stop = &wctc4xxp_net_down;
 	netdev->hard_start_xmit = &wctc4xxp_net_hard_start_xmit;
 	netdev->get_stats = &wctc4xxp_net_get_stats;
 	netdev->do_ioctl = &wctc4xxp_net_ioctl;
+#	endif
+
 	netdev->promiscuity = 0;
 	netdev->flags |= IFF_NOARP;
+
 #	if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24)
 	netdev->poll = &wctc4xxp_poll;
 	netdev->weight = 64;




More information about the svn-commits mailing list