vmware workstation 8 and kernel 3.x – patch

The new vmware workstation have a problem whit ( vmnic ) network interface and kernel 3.x version this patch fix it

The problem is thats the macros in old kernel version are considered “transitional”:
HAVE_ALLOC_NETDEV
HAVE_FREE_NETDEV
HAVE_NETDEV_PRIV
HAVE_NETIF_QUEUE
HAVE_NET_DEVICE_OPS

and the new version (kernel 3.x) have been released

To keep the vmware code compatible just ridefenire the missed MACRO by running this script.

#!/bin/bash
# -*- coding: UTF8 -*-

FOLDER=/tmp/$RANDOM$RANDDOM


mkdir $FOLDER

cd  $FOLDER
cp /usr/lib/vmware/modules/source/{vmnet.tar,vmnet.tar.old}
tar xvf /usr/lib/vmware/modules/source/vmnet.tar
patch -p0 < < EOF
--- vmnet-only/compat_netdevice.h	2011-03-26 06:37:29.000000000 +0100
+++ vmnet-only/compat_netdevice.h	2011-08-10 08:17:57.000000000 +0200
@@ -47,6 +47,19 @@
 #   define net_device device
 #endif
 
+/* it looks like these have been removed from the kernel 3.1
+ * probably because the "transition" is considered complete.
+ * so to keep this source compatible we just redefine them like they were
+ * previously
+ */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 1, 0)
+#define HAVE_ALLOC_NETDEV		/* feature macro: alloc_xxxdev
+					   functions are available. */
+#define HAVE_FREE_NETDEV		/* free_netdev() */
+#define HAVE_NETDEV_PRIV		/* netdev_priv() */
+#define HAVE_NETIF_QUEUE
+#define HAVE_NET_DEVICE_OPS
+#endif
 
 /*
  * SET_MODULE_OWNER appeared sometime during 2.3.x. It was setting
EOF
tar cf /usr/lib/vmware/modules/source/vmnet.tar vmnet-only 
vmware-modconfig --console --install-all 
rm -rf  $FOLDER

this patch apply a modify on vmnet-only/compat_netdevice and install new modules in kernel


.

share save 120 16 vmware workstation 8 and kernel 3.x   patch

1 comment:

  1. www.wonder-online.com

    Howdy! This is my first visit to your blog!
    We are a collection of volunteers and starting a new
    project in a community in the same niche. Your blog
    provided us valuable information to work on. You have done a outstanding job!

Lascia un Commento

L'indirizzo email non verrà pubblicato.

È possibile utilizzare questi tag ed attributi XHTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Get Adobe Flash player