Sunday, August 26, 2007

More geek stuff - VMWare Bridging

I have successfully installed VMWare WorkStation 6.0 on a Fujitsu P1610
running Linux SuSE 10.2.

I need to bridge to my WiFi adapter ath0, which is my gateway to
the internet. VMWWS did not allow this:

+ I could not bridge to the installed WiFi modem /dev/ath0. VMWWS only
allowed bridging to the installed Network Interface Card (NIC)

I spent a week working through this with VMWare support. They finally figured out that the madwifi driver ath_pci does not support reserved header lengths. Removing that reservation from the source code for the driver, then recompiling and rebooting solved the problem.

The rest of this are the details:


The wifi modem is the Atheros 802.11a/b/g Wi-Fi. The Atheros website directed us to the MADWIFI website:

which gives the driver.

There are two files in the ath_pci source code that need patching:

+ ../ath/if_ath.c needs to have a section commented out that allows reserving the length of the header:

     dev->hard_header_len += sizeof(struct ieee80211_qosframe) +
     sizeof(struct llc) +
     IEEE80211_ADDR_LEN +
     IEEE80211_WEP_IVLEN +
     #ifdef ATH_SUPERG_FF
     dev->hard_header_len += ATH_FF_MAX_HDR;

+ Additionally there is a patch to the net80211/if_athproto.h header file that comments out a header definition and then undefines it (in case any other program has defined it):


     #define USE_HEADERLEN_RESV 1
to read

     /*#define USE_HEADERLEN_RESV 1*/

Add the line


+ Then remove the old module with modprobe -r ath_pci, recompile the driver and reload it with modprobe ath_pci

All this works, although you have to reboot. Unfortunately, it did not run. It failed with the message:

     /usr/lib/vmware/bin/vmware: symbol lookup error: /usr/lib/ undefined symbol: gtk_builder_error_quark

I googled and found that running it with an environmental variable results in it running correctly.


The command is

     VMWARE_USE_SHIPPED_GTK=force vmware &

So this is unrelated to the modem issue.

The effect of this is to have VMWare open with a Gnome theme rather than the KDE theme. Minor issue...

So I shut it down, reran the configuration to connect to ath0. I did notice this time the warning:

     WARNING: could not find
     /tmp/vmware-config0/vmnet-only/.smac_linux.x386.o.cmd for

I wonder if that is the source of the GTK problem.

I then started it with the above variable.

It works!! I was able to get to the Internet.

Good work.


A few words of caution. I patched the source for the first installed driver cited above. That worked. I previously tried patching the latest version of the driver, which failed with the kernel making all manner of complaints about not agreeing on the version of a host of driver (*.o) files. So it seems you must patch your kernel if you are going to use a different version of the module than that originally installed. I hate patching the kernel as I inevitably screw it up and end up with an unbootable system and have to reinstall the whole OS.

Patching the original source worked, I have better things to do with my time. :-)

No comments: