# [Solved] In kernel RT61 issues 2.6.27-r7

## AHauntingRequiem

I'm having issues getting my Ralink RT2561/RT61 card up and running and I'm not exactly sure where the issue lies. I have WPA encryption enabled on my router so I am using WPA_supplicant, however, it does not seem to recognize the built in driver. ifconfig recognizes the card, but running ifconfig wlan0 up results in: 

 *Quote:*   

> djinn linux # ifconfig wlan0 up
> 
> SIOCSIFFLAGS: No such file or directory
> 
> 

 

I believe the issue might be related to firmware as dmesg reports this:

 *Quote:*   

> 
> 
> firmware: requesting rt2561s.bin
> 
> phy0 -> rt2x00lib_request_firmware: Error - Failed to request Firmware.
> ...

 

If this is the case I don't know how to update the firmware. I have it currently stored in /lib/firmware. I've been poking around the internet for the past week or two trying to resolve this, but I am no closer to a solution.

Some relevant info that may invariably be asked for:

/usr/src/linux/.config

 *Quote:*   

> 
> 
>  Wireless LAN
> 
> #
> ...

 

ifconfig -a:

 *Quote:*   

> wlan0     Link encap:Ethernet  HWaddr 00:1F:1F:1D:2C:EA  
> 
>           BROADCAST MULTICAST  MTU:1500  Metric:1
> 
>           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
> ...

 

wpa_supplicant.conf:

 *Quote:*   

>   GNU nano 2.1.7    File: /etc/wpa_supplicant/wpa_supplicant.conf               
> 
> # This is a network block that connects to any unsecured access point.
> 
> # We give it a low priority so any defined blocks are preferred.
> ...

 Last edited by AHauntingRequiem on Wed Jan 07, 2009 9:50 pm; edited 1 time in total

----------

## NeddySeagoon

AHauntingRequiem,

Firmware is your first problem. The driver is looking for a file called /lib/fimware/rt2561s.bin Exactly that.

If you have a compressed file, you need to decompress it.

You can get your firmware here

All the firmware files are provided compressed in zip format.

----------

## Napalm Llama

I have a very similar error, but I don't think it's firmware-based.  Mine (rt2500, 2.6.27-gentoo-r7) does this:

```
gaspode ~ # ifconfig ra0 up

SIOCSIFFLAGS: Operation not supported
```

Do you have any idea why that might be?

----------

## AHauntingRequiem

 *NeddySeagoon wrote:*   

> AHauntingRequiem,
> 
> Firmware is your first problem. The driver is looking for a file called /lib/fimware/rt2561s.bin Exactly that.
> 
> If you have a compressed file, you need to decompress it.
> ...

 

I had the firmware already, uncompressed and all.

----------

## NeddySeagoon

AHauntingRequiem,

With the exact file name that the kernel was looking for?

I'll look back through your kernel confing after you have confirmed that.

----------

## NeddySeagoon

Napalm Llama

What appears at the end of dmeag when you do 

```
ifconfig ra0 up 
```

From the name ra0, you are not using the in kernel driver for your wireless and you should be with that kernel.

----------

## Napalm Llama

Aha, thanks for the pointer.  The hint that it might not be called ra0 any longer was all I needed.

ifconfig -a was showing up a wlan0_ren at the bottom of its list.  I'd previously assumed that this was another thing like wmaster0, and ignored it.  Upon further investigation however, I was set straight by /proc/net/dev - which informed me that ifconfig was actually truncating the interface's full name of wlan0_rename.  I took this implied advice, and used UDEV to rename it to wlan0.  I reconfigured /etc/conf.d/net to work with wpa_supplicant, and now it connects without a hitch  :Smile: 

AHauntingRequiem, sorry for hijacking your thread!

----------

## AHauntingRequiem

 *NeddySeagoon wrote:*   

> AHauntingRequiem,
> 
> With the exact file name that the kernel was looking for?
> 
> I'll look back through your kernel confing after you have confirmed that.

 

 *Quote:*   

> djinn ~ # ls /lib/firmware
> 
> LICENSE.ralink-firmware.txt   rt2561.bin   rt2561s.bin   rt2661.bin
> 
> djinn ~ #

 

Should I have only the rt2651s.bin firmware in there?

*edit*

I removed all the other files and still have the same issue.

----------

## NeddySeagoon

AHauntingRequiem,

Junk in /lib/firmware is harmless - the kernel wo;; only look for the file it wants.

Try 

```
zgrep CONFIG_FW_LOADER /proc/config.gz
```

it must be =m or =y

If the event that you don't have /proc/config.gz, try 

```
grep CONFIG_FW_LOADER /usr/src/linux/.config
```

If that produces the right answer, have you edited your kernel .config file with anything other than make ....  ?

----------

## AHauntingRequiem

 *Quote:*   

> djinn # zgrep CONFIG_FW_LOADER /proc/config.gz
> 
> CONFIG_FW_LOADER=y
> 
> djinn #

 

Nope. I've only ever used make. This is a fresh install of a kernel on this machine so I've only have had to do this once thus far.

I just realize I hadn't posted my /etc/conf.d/net:

 *Quote:*   

> 
> 
> config_eth0=( "DHCP" )
> 
> dhcp_eth0="nodns nontp nonis"
> ...

 

Anything look wrong here?  :Confused: 

----------

## NeddySeagoon

AHauntingRequiem,

Then its should JustWork ... well the firmware loading anyway.

Check the file size - get a fresh copy for a compare, just in case you file is corrupt.

Try with the new copy too.

If that fails, post your entire kernel .config so I can look it over in menuconfig.

----------

## AHauntingRequiem

I just noticed while fixing my nvidia drivers issue that net.wlan0 is not in my /etc/init.d. I'm assuming this is problematic, but how do I add it?

----------

## Napalm Llama

```
# cd /etc/init.d

# ln -s net.lo net.wlan0
```

 :Smile: 

----------

## AHauntingRequiem

Alright! One step closer.

 *Quote:*   

> 
> 
> djinn init.d # ls -s net.lo net.wlan0
> 
> djinn init.d # ifconfig wlan0 up
> ...

 

So, I go back in and remove the iwconfig_wlan0=rt61pci line from /etc/conf.d/net and go through the process again and I get this read out:

 *Quote:*   

> 
> 
> djinn init.d # ./net.wlan0 start
> 
> * Bringing up interface wlan0
> ...

 

So it apparently doesn't like the built in kernel driver. Should I build it as a module in the kernel instead?

----------

## Napalm Llama

That warning is normal, it's a result of Gentoo's initscript handing over control of the interface to wpa_supplicant.  If all goes to plan, you ought to have an IP address and everything else within a couple of seconds.  Just make sure your wpa_supplicant.conf is in order.

I personally find this behaviour annoying, but I know of no way to make the initscript wait until the interface is ready before continuing.

----------

## AHauntingRequiem

I tried to ping www.google.com to no avail. I went back to my wpa_supplicant.conf to check everything out but it looks okay. I copied it directly from my laptop which runs just fine. I remembered I had to tell wpa_supplicant which driver to use. When I tried to configure wpa supplicant to the rt61pci driver, I received this error:

 *Quote:*   

> 
> 
> djinn etc # wpa_supplicant -iwlan0 -Drt61pci -c/etc/wpa_supplicant/wpa_supplicant.conf
> 
> Unsupported driver 'rt61pci'
> ...

 

Am I missing something here? I know the solution is going to be incredibly simple and I will kick myself for it as I already have a few times this thread.  :Embarassed: 

----------

## Napalm Llama

I think you need to use the driver "wext" - as far as I know, all the in-kernel drivers export the same interface to wpa_supplicant, and that's what it's called.

----------

## NeddySeagoon

AHauntingRequiem,

What does dmesg show ?

```
Unsupported driver 'rt61pci' 
```

is probably because you have the driver build into your kernel.

```
CONFIG_RT2X00=y

CONFIG_RT2X00_LIB=y

CONFIG_RT2X00_LIB_PCI=y

CONFIG_RT2X00_LIB_FIRMWARE=y

# CONFIG_RT2400PCI is not set

# CONFIG_RT2500PCI is not set

CONFIG_RT61PCI=y 
```

so wpa_supplicant cannot (and does not need to) load it. It may be worth trying the driver as a loadable kernel module to keep wpa_supplicant happy.

----------

## AHauntingRequiem

Okay, building it as a module worked. I am now connected via net.wlan0 on my Ammo Box.

Thank you all!

----------

## Goshanecr

Hi friends! I also have wifi card based on rt61 chipset. I'm update kernel to 2.6.28 and try to use rt61pci module. ifconfig -a shows me that interface wlan0_rename exist, but when i add to /etc/conf.d/net settings like ifconfig_wlan0_rename, etc... and ln -s /etc/init.d/net.lo /etc/init.d/net.wlan0_rename after reboot ifconfig show wmaster0_ interface... Whats wrong? How i can do that wifi interface name be just wlan0, and what i need to do with ra0 interface which also shows in ifconfig -a output? Firmware exist ..  :Smile: 

----------

## NeddySeagoon

Goshanecr,

Remove the ra0 symlink in /etc/init.d/  its no longer required but its harmless.

Replace it with (or add) a wlan0.net symlink

Remove the file  /etc/udev/rules.d/70-persistent-net.rules.

It will be recreated at reboot, then you should have a wlan0.

----------

