Getting a Linksys WDT11/WPC11 Network Card to Work under Linux by Kris Kelley Introduction This document explains how to make the Linksys WDT11 work with the linux operating system. I have focused on the distributions of Slackware Linux 8.1 and Red Hat Linux 8.0. However, the instructions do not rely on software packages specific to either distribution, and therefore should be adaptable to any linux distribution. The WDT11 by Linksys is a network card in cognito. What appears to be a PCMCIA to PCI bridge is really only a PCI wireless network card. More accurately, the WDT11 is a PCI wireless network card in need of one extra piece of hardware to become fully functional. That extra piece of hardware is the WPC11, which also happens to be a standard PCMCIA wireless network card. Plug the WPC11 into the PCMCIA slot on the WDT11, and voila, you have a fully functional PCI wireless network card. As far as your operating system is concerned, the WDT11/WPC11 combination is a single device, and PCMCIA is not even a part of the equation. Because of this, the PCMCIA slot on the WDT11 *cannot* be used for any other purpose. Like most other hardware, installing the software for the WDT11/WPC11 is easy under Windows, while a bit of a challenge under linux, at least at first. Once you know which software to use, and how to configure it, set-up is a snap. The WDT11/WPC11 supports the 802.11b standard for wireless network cards. (NOTE: Those not familiar with wireless networking terminology and standards should visit http://80211-planet.webopedia.com/TERM/8/802_11.html for details on the different versions of the 802.11 standard, and the rest of the web site for other information on wireless networking. There are tons of information here!) linux-wlan-ng, available for download at http://www.linux-wlan.com/download.html, is the most popular package to provide drivers for wireless network cards that conform to the 802.11b standard, including the WDT11/WPC11. Also, because the WDT11/WPC11 is not a PCMCIA device as far as the operating system is concerned, you *don't* need PCMCIA support to use this hardware. (NOTE: For those who like to compile their own kernels, the latest linux kernel package [version 2.4.20 as of this writing] also offers a driver compatible with the WDT11/WPC11. However, this code is still in the experimental stage, and stable functionality is not guaranteed.) Steps Here are the steps I took to enable this card on a machine running Slackware 8.1 and Red Hat Linux 8.0. I did not use either distribution's package system, therefore, these instructions should be easily adaptable to other linux distributions. Note that you must have a C compiler (gcc is highly recommended) and the standard C libraries (glibc in most cases). Also, linux-wlan-ng requires the source directory for the kernel you plan on running. If /usr/src/linux or a similarly named directory is present, odds are you are in good shape. * Download the tarball for linux-wlan-ng, version 0.1.15 or later. Other documentation sources will tell you that you need to make a change to linux-wlan-ng's source code to get it to work with the WDT11/WPC11, however, version 0.1.15 already incorporates this change. (NOTE: Red Hat 8.0 users will want to use version 0.1.16-pre2 or later, to avoid some compatability issues with packages supplied by Red Hat.) * After untarring the linux-wlan-ng package into your favorite place for compiling source code, switch to the newly created linux-wlan-ng directory and "make config". You will be asked which particular driver you want to build. The PCI, PCMCIA, and USB options will build drivers for wireless network cards that use the PCI, PCMCIA, and USB interfaces. Note that the PCI driver is intended for common one-piece PCI wireless network cards. The PLX driver, on the other hand, is intended for more exotic psuedo-PCMCIA devices like the WDT11/WPC11 combination. So, assuming you're building linux-wlan-ng specifically for use with the WDT11/WPC11, say "yes" to the PLX driver and "no" to the rest. Also enter the path to your kernel source directory when prompted. You can select the default options for the rest of the config script. * After "make config" finishes, run "make all". When that finishes, run "make install". Needless to say, you will need to have root priveledges when running "make install". * While still in the linux-wlan-ng base directory, copy etc/wlan.conf to /etc (some versions of linux-wlan-ng will do this for you): cp etc/wlan.conf /etc This is the configuration file for the drivers provided by linux-wlan-ng. More to the point, this file will contain the configuration necessary to get your WDT11/WPC11 talking to your wireless access point or router. * Open the file in its new location, and edit its contents so that the configuration will be compatible with the network you plan on connecting to. You will need to be familiar with wireless networking terminology, and also familiar with how your wireless network is set up. If you are not in control of this network, talk to your network administrator. My network is an "ad-hoc" network, and the computers on my network use a common SSID for connecting to the network. The name of the network interface provided by my wireless network card is "wlan0". My /etc/wlan.conf file had these changes when I was through: WLAN_DEVICES="wlan0" IS_ADHOC=y SSID="mySSIDword" * The linux-wlan-ng package provides an rc script (etc/rc.wlan) for easy start-up and shutdown of any network interfaces provided by linux-wlan-ng drivers. You should copy this script to the directory where all your rc scripts are stored, and then ensure that the script is invoked when the system is starting up or switching to the runlevel or runlevels where you wish to have wireless networking support. For Slackware 8.1, the directory for rc scripts is /etc/rc.d, so run this command from within the linux-wlan-ng base directory: cp etc/rc.wlan /etc/rc.d Next, you will probably want wireless networking to be available only in multi-user mode. If so, modify /etc/rc.d/rc.M to invoke /etc/rc.d/rc.wlan before invoking /etc/rc.d/rc.inet1. The rc.M script will look like this after you are finished editing: # Add these lines # Initialize wlan devices. if [ -x /etc/rc.d/rc.wlan ]; then . /etc/rc.d/rc.wlan start # the "start" argument is necessary fi # The lines below appear in the original script # Initialize the network subsystem. ... For Red Hat 8.0, the directory for rc scripts is /etc/rc.d/init.d, so run this command from within the linux-wlan-ng base directory: cp etc/rc.wlan /etc/rc.d/init.d Now, create "S" and "K" links in the appropriate runlevel directories, pointing them to /etc/init.d/rc.wlan. rc.wlan as provided includes support for Red Hat's runlevel configuration tool "chkconfig", so running this command will set up wireless networking support in runlevels 2, 3, 4 and 5, and disable support in all other runlevels. chkconfig --add rc.wlan For both Slackware and Red Hat (and any other distribution), you should note the comments in rc.wlan that point out the kernel modules that drive the cards supported by linux-wlan-ng are not automatically loaded by this rc script. The easiest solution, assuming your kernel has support for module autoloading, is to just add a definition for the right module to /etc/modules.conf, and let the kernel's autoload magic take care of the rest. Assuming the name of the appropriate network interface is "wlan", add this line to /etc/modules.conf: alias wlan0 prism2_plx * Now, edit the appropriate files to configure the network interface provided by your WDT11/WPC11. For Slackware 8.1, edit /etc/rc.d/rc.inet1. If the network interface provided by your WDT11/WPC11 is the only one you will have, the variables you will want to look at are IPADDR, NETMASK, USE_DHCP, DHCP_HOSTNAME, and GATEWAY. You will not need to worry about all the variables ending in "2". In my case, I use a DHCP server to assign IP addresses, and I do not require a hostname to do so. So, this single variable definition in rc.inet1 is sufficient for my network: USE_DHCP=yes For Red Hat 8.0, create an ifcfg configuration file in /etc/sysconfig/network-scripts. Assuming "wlan0" is the name of the appropriate network interface, and assuming you are using DHCP to set IP addresses and other network configuration, create /etc/sysconfig/network-scripts/ifcfg-wlan0 and add these lines: DEVICE=wlan0 BOOTPROTO=dhcp ONBOOT=yes Also, if the network interface provided by your WDT11/WPC11 is the only one you will have, you can remove any unnecessary ifcfg configuration files that the Red Hat installation process may have placed in /etc/sysconfig/network-scripts, such as ifcfg-eth0 (but don't remove ifcfg-lo). * That's it for configuration. Give your system a trial run by either rebooting your machine, or executing the proper scripts manually. For Slackware 8.1, run these commands: /etc/rc.d/rc.wlan start /etc/rc.d/rc.inet1 For Red Hat 8.0, run these commands: /etc/rc.d/init.d/rc.wlan start /etc/rc.d/init.d/network restart (NOTE: Make sure you are running the kernel whose source directory you used to compile linux-wlan-ng.) Conclusion That's it! For those who like to keep their systems on the bleeding edge, the authors of linux-wlan-ng are constantly upgrading their software, so keep an eye on their web site for new releases. Also remember that if you later install a new linux kernel, you will need to reinstall the linux-wlan-ng package as well to ensure the kernel modules are available to the new kernel. If you have any questions, suggestions, or comments about this document, feel free to email me at skunkworx@kingwoodcable.com. Document Revision History 3-11-2003 - First public release. 3-20-2003 - Added a note about the driver available in the linux kernel package. Also changed all instances of "rc scripts" to "rc scripts" and cleaned up wording and formatting in a few places.