(Last update: 15 Sep 2006)
The hardware
The Linksys WMP54G is an IEEE 802.11g (54Mbps) wireless PCI card. It is backward-compatible with 802.11b (11Mbps). It does not have the Linksys-proprietary "SpeedBooster" feature.
You can get one at amazon.com or many other places.
Linksys has sold several versions of this card. This page will be most useful to you if you have version 4.1:
- Chipset: Ralink RT61
- PCI ID: 1814:0301-1814:0302
The instructions that follow should be useful on most Linux distributions, but the one I used is Fedora Core 5.
Other online references
If you can't find exactly what you need here, try these other pages:
- The NdisWrapper project
- Ralink Corporation, makers of the RT61 chipset
- The rt2x00 Open Source project, which has a beta driver for the same chipset (which I haven't tried yet).
Step-by-step instructions
These instructions assume that:
- you have installed the hardware in your computer;
- you are running the version of the kernel that you will ultimately want to use with the Wireless-G card;
- you want to use the Wireless-G card as the main interface on your computer.
Further, you should be using a recent 2.6 kernel (I used Fedora's most recent 2.6.17). Again, keep in mind that the shell examples below are from FC5.
1. Download and install the driver.
- Download the RT61 driver from Ralink. As of this writing, the most recent version is 1.0.4.0, available here. Copy it to somewhere reasonable, like /usr/src.
- Untar it, and compile the module:
# cd /usr/src # tar xf RT61_Linux_STA_Drv1.0.4.0.tar.gz # cd RT61_Linux_STA_Drv1.0.4.0/Module # dos2unix Configure # sh Configure # make # cp rt61.ko /lib/modules/`uname -r`/kernel/drivers/net
That dos2unix command is necessary because Ralink's script contains embedded ^M characters. If you don't have dos2unix, install the dos2unix package:# yum install dos2unix
- Add the following line to /etc/modprobe.conf
alias ra0 rt61
- Run depmod -a
2. Download, install, and configure wpa_supplicant
- If you haven't already, install the wpa_supplicant package:
# yum install wpa_supplicant
This step is not strictly necessary, but it will make your life easier. - Now (this is where it gets a bit strange), download the wpa_supplicant sources, available here.
- Copy them somewhere reasonable (for example, /usr/src)
and untar:
# cd /usr/src # tar xf wpa_supplicant-0.4.9.tar.gz
- Extend wpa_supplicant to support the Ralink driver:
- Copy the Ralink driver sources to the wpa_supplicant
directory:
# cp /usr/src/RT61_Linux_STA_Drv1.0.4.0/WPA_Supplicant/driver_ralink.[ch] \ /usr/src/wpa_supplicant-0.4.9
- Apply this wpa.patch, which I
created based on the instructions in
/usr/src/RT61_Linux_STA_Drv1.0.4.0/WPA_Supplicant/README:
# cd /usr/src/wpa_supplicant-0.4.9 # patch -p0 -b < wpa.patch
- Build:
# cp defconfig .config # make
- Replace the original wpa_supplicant with the one you just built:
# cd /usr/sbin # mv wpa_supplicant wpa_supplicant.orig # cp /usr/src/wpa_supplicant-0.4.9/wpa_supplicant .
- Prevent yum from changing your new wpa_supplicant (unless you really want it to) by adding a line like this to /etc/yum.conf:
exclude=wpa_supplicant
- Copy the Ralink driver sources to the wpa_supplicant
directory:
- Now edit /etc/wpa_supplicant.conf to match the
configuration on your wireless router. Excellent documentation on how
to do this is available online, and via
man 5 wpa_supplicant.conf. In my case, I have a Linksys
Wireless-G broadband router (WRT54GL), which I configured to support
WPA2
with TKIP and AES
cyphers. As a result, my wpa_supplicant.conf looks like
this:
ctrl_interface=/var/run/wpa_supplicant ctrl_interface_group=wheel network={ ssid="any" key_mgmt=NONE } network={ ssid="my-ssid" proto=WPA2 key_mgmt=WPA-PSK psk=some-long-string priority=1000 }
The "some-long-string" is obtained by running:# wpa_passphrase my-ssid my-password
where "my-password" is the WPA shared key you entered when you configured the wireless router.
3. Configure the init scripts
- Edit /etc/sysconfig/network-scripts/ifcfg-ra0 to control
the new Ralink interface, ra0. For example:
DEVICE=ra0 BOOTPROTO=dhcp ONBOOT=yes
- Edit /etc/sysconfig/wpa_supplicant with information about ra0:
INTERFACES="-ira0" DRIVERS="-Dralink"
- Ensure that the wpa_supplicant service runs at the run
levels you care about. For example:
# chkconfig --level 35 wpa_supplicant on # chkconfig --list wpa_supplicant wpa_supplicant 0:off 1:off 2:off 3:on 4:off 5:on 6:off
4. Test things out
- Stop services:
# service wpa_supplicant stop Stopping wpa_supplicant: [ OK ] # service network stop Shutting down loopback interface: [ OK ] [root@home wpa_supplicant]# ifconfig
- Restart them:
# service network start Bringing up loopback interface: [ OK ] Bringing up interface ra0: [ OK ] # service wpa_supplicant start Starting wpa_supplicant: ioctl[SIOCGIWAP]: Transport endpoint is not connected ioctl[SIOCGIWAP]: Transport endpoint is not connected ioctl[SIOCGIWAP]: Transport endpoint is not connected ioctl[SIOCGIWAP]: Transport endpoint is not connected [ OK ]
The errors appear to be transient. I don't know what causes them. - Look around:
# ifconfig ra0 ra0 Link encap:Ethernet HWaddr 00:18:39:06:7F:38 inet addr:192.168.1.20 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: fe80::218:39ff:fe06:7f38/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:140167 errors:0 dropped:0 overruns:0 frame:0 TX packets:89614 errors:14 dropped:14 overruns:0 carrier:0 collisions:14747 txqueuelen:1000 RX bytes:19385867 (18.4 MiB) TX bytes:127430668 (121.5 MiB) Interrupt:209 # ping 192.168.1.1 PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data. 64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=3.59 ms 64 bytes from 192.168.1.1: icmp_seq=2 ttl=64 time=0.803 ms --- 192.168.1.1 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1001ms rtt min/avg/max/mdev = 0.803/2.196/3.590/1.394 ms
Outstanding issues
- On startup, syslog records the following error:
BUG: sleeping function called from invalid context at mm/slab.c:2817 in_atomic():1, irqs_disabled():1 <c045856d> kmem_cache_alloc+0x1b/0x4f <f89eaac0> link_status_handler+0x1a/0x220 [rt61] <f89e398b> BssTableSearch+0x49/0x62 [rt61] <f89ea9e6> AssocPostProc+0xe1/0x1a1 [rt61] <f89eb0b5> PeerAssocRspAction+0xda/0x138 [rt61] <f89dff4a> StateMachinePerformAction+0x16/0x19 [rt61] <f89e426e> MlmeHandler+0x96/0xd4 [rt61] <f89e443f> MlmeEnqueueForRecv+0x193/0x1a7 [rt61] <c04186cb> try_to_wake_up+0xe9/0xf3 <c0425143> __group_send_sig_info+0x78/0x83 <c04258dd> group_send_sig_info+0x4e/0x56 <c046b6c2> send_sigio_to_task+0xcb/0xd6 <c04bbefb> constraint_expr_eval+0x3a5/0x429 <c04bc1a7> context_struct_compute_av+0x228/0x287 <c04afe6a> avc_alloc_node+0x16/0x129 <c04afd3d> avc_latest_notif_update+0x5a/0x63 <c04b0133> avc_has_perm_noaudit+0x1b6/0x2e5 <c04186cb> try_to_wake_up+0xe9/0xf3 <c0425143> __group_send_sig_info+0x78/0x83 <c04258dd> group_send_sig_info+0x4e/0x56 <c046b6c2> send_sigio_to_task+0xcb/0xd6 <f89f0864> RTMPHandleRxDoneInterrupt+0xcce/0xcd6 [rt61] <c0443fc6> get_page_from_freelist+0x26e/0x3d7 <c04186cb> try_to_wake_up+0xe9/0xf3 <c04186cb> try_to_wake_up+0xe9/0xf3 <c0417f91> __wake_up_common+0x2f/0x53 <c04187d0> complete+0x2b/0x3d <c04c9991> end_that_request_last+0x7c/0x8d <c05532fd> ide_end_request+0xd0/0xd8 <c0560603> cdrom_newpc_intr+0x26e/0x2e1 <c055f8d3> cdrom_end_request+0x3ea/0x405 <c0560c7b> cdrom_transfer_packet_command+0xa2/0xcb <c055ddc3> cdrom_timer_expiry+0x0/0x4e <c0602dac> _spin_lock_irqsave+0x9/0xd <f89ed379> RTMPUpdateTupleCache+0x8a/0x12b [rt61] <f89f082a> RTMPHandleRxDoneInterrupt+0xc94/0xcd6 [rt61] <c056073a> cdrom_pc_intr+0xc4/0x1fe <c0602dac> _spin_lock_irqsave+0x9/0xd <f89ed6d4> RTMPHandleMgmtRingDmaDoneInterrupt+0x5a/0x88 [rt61] <f89df5a8> RTMPIsr+0x79/0xf8 [rt61] <c043db6a> handle_IRQ_event+0x23/0x4c <c043dc0f> __do_IRQ+0x7c/0xd1 <c0405035> do_IRQ+0x63/0x80 ======================= <c04036f2> common_interrupt+0x1a/0x20 <c0401eeb> default_idle+0x2b/0x53 <c0401f4d> cpu_idle+0x3a/0x4f <c0720724> start_kernel+0x2d7/0x2db <c0720249> unknown_bootoption+0x0/0x204
I don't quite know what causes this, but it doesn't seem to cause any problems. - It's probably worthwhile to try the driver from the rt2x00 project, though apparently it is still quite a raw beta.
-
Wireless tools (iwconfig, etc.) don't work. That's a bummer,
because, for example, I don't know how to control the channel the card
should use:
# iwconfig -i ra0 Error : unrecognised wireless request "ra0"
- Performance is ho-hum. I get 10-15Mbps during large (> 200 MB) file transfers to an 802.11g Mac Powerbook. Hard to debug this given that the wireless tools don't work yet.