rt2460 and linux 2.6.31

As of linux 2.6.31 there is no mainline support for the Ralink rt2680 Wifi chipset. While there is an official driver provided by Ralinktech, it is incompatible with 2.6.31 due to the fact that post 2.6.29 the kernel's net_device_ops API has changed and 2.6.31 also removed CONFIG_COMPAT_NET_DEV_OPS backwards compatibility.

So I came up with a small patch to the Ralink driver.

The solution is to get the module source from http://www.ralinktech.com/support.php?s=2 (tested with version 2.1.2.0 from 05/21/2009) and apply the patch before compilation..

Ralinktech provides a README file how to do this, basically you'll need the kernel-source or kernel-headers, and then simply type make after unzipping and patching the module source.

Discussion

Bernie Power, 20.11.2009 22:34

I'm very interested in your patch. Please excuse my ignorance.Can you give more details of how to apply the patch. Best Regards Bernie

Robin Gareus, 20.11.2009 23:13

Ralink has since updated their driver to 2.2.0.0 but that version is still incompatible with linux 2.6.31. Anyway you can grab 2.1.2.0 from here.

You need to have the linux-kernel-headers package installed and of course a c-compiler + make + patch etc.

Then try the following in a Terminal:

cd /tmp/
wget http://rg42.org/_media/wiki/2009_0521_rt2860_linux_sta_v2.1.2.0.tgz
wget http://rg42.org/_media/blog/rt2460/2009_0521_rt2860_linux_sta_v2.1.2.0_2.6.31.patch
tar xvzf 2009_0521_rt2860_linux_sta_v2.1.2.0.tgz
cd 2009_0521_RT2860_Linux_STA_V2.1.2.0/
patch -p1 < ../2009_0521_rt2860_linux_sta_v2.1.2.0_2.6.31.patch
make -i
sudo make install

To load and test the module run:

sudo modprobe rt2860sta
iwconfig 

On the next reboot the module should be loaded automatically.

Note the make install installs the kernel module just fine, but also copies the firmware to /etc/Wireless/RT2860STA. Depending on your GNU/Linux distribution this may not be the correct location.

However you may already have the firmware (from a previous installation of the driver done by your distro); and you can simply delete /etc/Wireless/ again. More information on this is available in the README file provided by Ralinktech.

Bernie Power, 23.11.2009 22:32

Thankyou for your advice having obtained the files then patched and installed etc.. I seem no further forward. Still the card refuses to work with WEP or WPA. I may be forced to change the card I feel.

Best Regards Bernie

Robin Gareus, 23.11.2009 23:12

The netbook with the rt2860 chipset to which I have access connects just fine to WPA and WPA2 access-points. I have not tested WEP.

Could it be that you are still using an older firmware (ie one installed by your distribution) rather than the one from the compiled driver?

Did you try if it works with an older kernel and Ralink's 2.2.0.0 driver?

Anyway, if you have the option to replace the WiFi-card with a different model, check http://linuxwireless.org/ for a list of devices supported by Linux before buying.

good luck, robin

Bernie Power, 25.11.2009 20:25

Thanks for your continued help and encouragment. I persisted and reinstalled your patched drivers again. Still nothing. Then I updated the kernel to 2.6.31-15 from -14 and behold, WPA is working. Well kind of. Passphrase mode works but preshared key doesn't seem to at the moment. Anyway is a large step forward. Thanks again for your time and help. Best regards Bernie

Daniel James, 16.12.2009 19:31

Hi Bernie,

The secret to getting rt2860 WPA working with NetworkManager or wicd is in the Ralink readme file. In the file os/linux/config.mk you need to change the default:

# Support Native WpaSupplicant for Network Maganger

HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=n

to:

HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=y

Then rebuild the modules. If you want to create a deb file for the modules, the method suggested here works:

http://newbiedoc.berlios.de/wiki/Module-Assistant_-_using_upstream_tarballs

Robin Gareus, 17.12.2009 08:51

Hey Daniel,

Thanks for the info. The above patch already included HAS_WPA_SUPPLICANT=y which works just fine here with WPA and network-manager here.

Did you have a look at the source what the difference between HAS_WPA_SUPPLICANT and HAS_NATIVE_WPA_SUPPLICANT_SUPPORT is?

Daniel James, 17.12.2009 19:00

Hi Robin,

I didn't take a close look at the source, but a WPA Personal (PSK) access point here would not authenticate with either wicd or NetworkManager until I made this change to the config. The Ralink readme recommends this change if you are using NetworkManager, so that's good enough for me :-)

Enter your comment (wiki syntax is allowed):
 
blog/rt2460_and_linux_2.6.31.txt · Last modified: 18.09.2009 12:33 by rgareus
   |