summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShaun Ruffell <sruffell@digium.com>2009-08-04 16:38:56 +0000
committerShaun Ruffell <sruffell@digium.com>2009-08-04 16:38:56 +0000
commit5ef375df1f02255a70bd17f71d9a0098b9c55cf3 (patch)
treec76db0852da9966c484ca623b7135697581dce19
parent9339d5cce9593fcc4ce7a4297735cd8a787a00dc (diff)
Merged revisions 6717,6760 via svnmerge from
https://origsvn.digium.com/svn/dahdi/linux/trunk ........ r6717 | sruffell | 2009-06-24 21:30:19 -0500 (Wed, 24 Jun 2009) | 3 lines wctc4xxp: Update to use struct net_device_ops. Accomodates a change in the linux kernel network device interface. ........ r6760 | sruffell | 2009-06-25 17:16:34 -0500 (Thu, 25 Jun 2009) | 1 line wctc4xxp: Make the wctc4xxp_netdev_ops structure static. ........ git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.2@6937 a0bf4364-ded3-4de4-8d8a-66a801d63aff
-rw-r--r--drivers/dahdi/wctc4xxp/base.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/dahdi/wctc4xxp/base.c b/drivers/dahdi/wctc4xxp/base.c
index 3942251..b3e3f07 100644
--- a/drivers/dahdi/wctc4xxp/base.c
+++ b/drivers/dahdi/wctc4xxp/base.c
@@ -742,6 +742,17 @@ wctc4xxp_net_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd)
return 0;
}
+#ifdef HAVE_NET_DEVICE_OPS
+static 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.
@@ -773,14 +784,21 @@ wctc4xxp_net_register(struct wcdte *wc)
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;