25 August 2007

how to configure WG311v3 / Marvell Libertas 88W8335 on OpenBSD 4.1

This post is for Google (and for my future self).

The Netgear WG311v3 PCI wireless network card is listed as "supported" by OpenBSD 4.1 thanks to the malo driver. Unfortunately, you need a binary firmware blob which is not legally distributable, so it's not included by default; it's somehow available anyway and linked by the man page for the driver. The abovementioned man page also implies that you are only a pkg_add away from making it work, which is not really true. This is what you need to do:

  1. Go to the malo firmware repository and download both the 1.2 and 1.3 package.
  2. Install the 1.3 version with pkg_add (1)
  3. untar the 1.2 package
  4. copy the extracted mrv*.fw files to /etc/firmware
  5. set all your options with ifconfig, keeping the interface down (VERY IMPORTANT). In my setup, I set the nwid (aka ESSID) and nwkey (aka WEP key, which must have the "0x" suffix if expressed in hexadecimal); setting the channel or the bssid was counter-productive, better leave the interface figure it out by itself.
  6. Then bring up the interface, and do the dhclient dance if required.
NOTES: in my experience, setting a hostname.malo0 file for the interface doesn't work. Somehow, it only works if you use standard ifconfig (8) commands, making sure all the required options are set before bringing the interface up. I don't know if this depends on the network startup scripts or what, but eventually I had to add the command sequence in my rc.local.

Also, bringing the interface up & down can have unpredictable results. Sometimes the firmware won't load when you try to bring it up again, sometimes it will error out; in these cases, better to reboot. There must be a way to unload these blobs from the kernel, I just don't know it yet. Lazyweb...?

Ah, the evils of closed drivers. Unfortunately, my trusted hardware pushers didn't have any other supported PCI wifi card, and USB ones are even more evil. Anyway, I'm happy it works now. I hope this post will be helpful to somebody else as well.

Technorati Tags: ,

1 comment:

Anonymous said...

Is there any way to put this card in AP mode (eg with: "mediaopt hostap" or similar way to rtw driver)?