- drop obsolete and outdated manual inclusion of rpm macros
[packages/VMware-server.git] / VMware-server-linux-2.6.31.patch
CommitLineData
d1a7ed78
AG
1patch from: http://communities.vmware.com/thread/231812
2
3diff -Naur ./vmnet-only/netif.c.org ./vmnet-only/netif.c
4--- ./vmnet-only/netif.c.org 2009-10-22 09:55:41.937580511 +0200
5+++ ./vmnet-only/netif.c 2009-10-22 09:55:41.937580511 +0200
6@@ -194,10 +194,25 @@
7 *----------------------------------------------------------------------
8 */
9
10+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30)
11+static const struct net_device_ops vnet_netdev_ops = {
12+ .ndo_init = VNetNetifProbe,
13+ .ndo_open = VNetNetifOpen,
14+ .ndo_start_xmit = VNetNetifStartXmit,
15+ .ndo_stop = VNetNetifClose,
16+ .ndo_get_stats = VNetNetifGetStats,
17+ .ndo_set_mac_address = VNetNetifSetMAC,
18+ .ndo_set_multicast_list = VNetNetifSetMulticast,
19+};
20+#endif
21+
22 static void
23 VNetNetIfSetup(struct net_device *dev) // IN:
24 {
25 ether_setup(dev); // turns on IFF_BROADCAST, IFF_MULTICAST
26+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30)
27+ dev->netdev_ops = &vnet_netdev_ops;
28+#else
29 dev->init = VNetNetifProbe;
30 dev->open = VNetNetifOpen;
31 dev->hard_start_xmit = VNetNetifStartXmit;
32@@ -205,6 +220,7 @@
33 dev->get_stats = VNetNetifGetStats;
34 dev->set_mac_address = VNetNetifSetMAC;
35 dev->set_multicast_list = VNetNetifSetMulticast;
36+#endif
37 #ifdef KERNEL_2_3_43
38 /*
39 * We cannot stuck... If someone will report problems under
This page took 0.155201 seconds and 4 git commands to generate.