Need configuration help with new driver

Apologies in advance for the length, but I am trying to describe my problem as completely as possible, to avoid any unnecessary posting back-and-forth.

I have just upgraded my network to wireless “N”. I have an adapter which uses the Ralink rt2860 chipset. The 2.6.31.12 kernel driver (named “rt2860sta” in “staging”) does not support AES encryption, which prevents “N”. (WPA2-PSK does work fine, just limited to 54Mbps.)

After researching this extensively, I decided to compile the newest driver version from source at the vendor’s site. This version explicitly supports N with the 2.6.31/32 kernels, when wpa_suppicant and wext are compiled in. I successfully compiled the driver, and replaced the version in staging with my new one. The kernel loads it, WPA-supplicant picks it up, it authenticates with the router, it receives an IP address, iwconfig reports 130Mbps N speed, and it works on the LAN. Everything looks fine.

However, when I attempt to reach the WAN, I get the error “network is unreachable”.

I am fairly sure the problem is with the openSUSE configuration or something unique to our distro. The new vendor driver uses the name “ra”, rather than “wlan”. In YaST/Network Settings the device does appear (as ra0), showing that it is “not configured”. I provide that data and YaST seems to accepts it, but actually does not. When I go back into YaST again, the device is still “not configured”. So I manually created a /etc/sysconfig/network/ifcfg-ra0 configuration file. Still YaST does not read it, and still YaST will not configure ra0.

Of possible note is that in a source rpm package in the Buildservice for this driver, a patch is listed that is described as “convert-devicename-to-wlanX.diff”; this suggests that the “ra” name is an issue (and that the kernel gets the “ra” from the driver?). Unfortunately, the rpm is actually empty, so I can’t look at, let alone use, the patch.

Having said that, I have seen on the web where other users have compiled this driver as ra0 and have it working named as such in their distro, by just loading it. I am wondering if there may be SuSE scripts which only look for a wireless network interface using the “wlan” naming convention, and therefore are not seeing ra0 - but this is just a guess and I don’t know for sure which scripts might be involved.

Since this is the wife’s machine, I need to be extra careful. But I would very much like to get her the N speed.

Any suggestions would be most appreciated.

Hi mingus725. From what I understand, udev plays an important part here. Have a look at 70-persistent-net.rules or similar.

Thanks Deano. I see what you mean. I’ll give that a try later today.

I found a solution, although there is still a small glitch (but that can be worked around).

The above udev rule had no effect. However, what I did find was this control parameter in /etc/sysconfig/network/config (which in the YaST sysconfig editor is under Network/General):

LINKLOCAL_INTERFACES="eth*[0-9]|tr*[0-9]|wlan[0-9]|ath[0-9]"

When “ra[0-9]” is added, YaST Network Settings implements the configuration and, voila, N is working perfectly and the wife is now getting 130Mpbs!

However, even though the parm above is described as being used in various script case statements, it also appears that “wlan” is hard-coded in some scripts. For example, the /etc/init.d/network-remotefs script is failing and consequently NFS mounts are failing. But that can easily be solved with a workaround script.

The short of this, for anyone else encountering shortcomings with the Ralink 2860 driver, is that the vendor source can be compiled and the driver used successfully in openSUSE. (For reference: The compile instructions are poor - just be sure to compile with both wpa_supplicant flags set to “y”, and edit the config.mk file’s cross-compile parms to specify the fully qualified file names for gcc and ld.)

Well done. :slight_smile:

I would have thought that the relevant udev rule could have been amended with the preferred interface name though.

Thanks. I did change the rule but it made no difference. The problem was with the SuSE networking services initialization scripts not recognizing “ra0”, which the sysconfig change fixed.

Update: You may very well be correct after all, and it may have been under my nose all along. :embarrassed: What I tried that did not work was to manually create the rule in udev. But I just discovered in YaST Network Settings that there is an option under udev rules apparently to change the name of the configuration. I’m not going to try that - at least for now - since I have everything working and I don’t want to tempt fate. I’ll put testing this method on my to-do list.

Addendum to compile instructions ref’d above: In config.mk parameter file above, there is a debug flag set, -DDBG. Remove that (but be careful not to disturb the flag which precedes it on the same line). If you don’t do this, the driver will throw kernel debug messages every second! You know the flag is set if your /var/log/messages is filled with lines like:

kernel:  9389.958117] ===>rt_ioctl_giwscan. 2(2) BSS returned, data->length = 239

This flaw is found not only in the source on the vendor site, but also in the module provided with the kernel; I saw the error in my log before compiling my own driver. It has been reported for various distros (at times associated with legitimate errors, which is probably why debug is enabled; even so, IMO it is ridiculous to be throwing constant messages if everything is working properly). Apparently this is true not just with Ralink’s rt2860 driver, but others as well.