# Trouble getting RaLink Device 3062 running

## Force2010

I've recently gone into the world of gentoo routering and I've got everything up and running fine on the wired side, have been using gentoo for a while and I'm comfortable with running a simple router/dns/fileserver box.

The last thing I need to do is setup a WAP using the PCI wireless card that I installed. The problem I'm having is that nothing will detect it, therefore I'm unable to bring it up. I've tried most things to get it running, manually compiling the driver from the RaLink site, this doesn't seem to work on 2.6.36-gentoo-r5 kernel though. I've also tried using the inbuilt kernel drivers with no luck. I've tried too many things to remember, and I'm now at a dead end.

Would be appreciated if anyone has any ideas on what I can do to get the wlan up and running.

My lspci shows the following;

```
00:0b.0 Network controller [0280]: RaLink Device [1814:3062] Subsystem: RaLink Device [1814:3062]
```

Thanks!

----------

## Force2010

No one got any ideas? My networks not even running at half it's potential at the minute, I've been attempting to get it working again over the past few days, like using the live-cd to try and bring it online but thats not worked either, now I'm most definetly stuck.

----------

## Jaglover

What results did you get with rt2800pci driver when you enabled it in kernel.

----------

## Force2010

As far as I could tell, nothing really happened, I've got the firmware for the 3062 chipset in /lib/firmware.

----------

## Force2010

Ok, quick update, I told the kernel to compile the drivers as a module so I'm now getting the following;

modprobe rt2800pci

```
FATAL: Error inserting rt2800pci (/lib/modules/2.6.36-gentoo-r5/kernel/drivers/net/wireless/rt2x00/rt2800pci.ko): Unknown symbol in module, or unknown parameter (see dmesg)
```

dmesg

```

[   64.051132] rt2800lib: Unknown symbol crc_ccitt (err 0)

[   64.056495] rt2800pci: Unknown symbol rt2800_config_shared_key (err 0)

[   64.057333] rt2800pci: Unknown symbol rt2800_reset_tuner (err 0)

[   64.059487] rt2800pci: Unknown symbol rt2800_validate_eeprom (err 0)

[   64.059887] rt2800pci: Unknown symbol rt2800_link_stats (err 0)

[   64.061349] rt2800pci: Unknown symbol rt2800_rfkill_poll (err 0)

[   64.061998] rt2800pci: Unknown symbol rt2800_probe_hw_mode (err 0)

[   64.063553] rt2800pci: Unknown symbol rt2800_read_eeprom_efuse (err 0)

[   64.065666] rt2800pci: Unknown symbol rt2800_efuse_detect (err 0)

[   64.066103] rt2800pci: Unknown symbol rt2800_config_filter (err 0)

[   64.067380] rt2800pci: Unknown symbol rt2800_conf_tx (err 0)

[   64.069145] rt2800pci: Unknown symbol rt2800_check_firmware (err 0)

[   64.069549] rt2800pci: Unknown symbol rt2800_mcu_request (err 0)

[   64.070093] rt2800pci: Unknown symbol rt2800_init_eeprom (err 0)

[   64.071820] rt2800pci: Unknown symbol rt2800_config_pairwise_key (err 0)

[   64.073950] rt2800pci: Unknown symbol rt2800_init_bbp (err 0)

[   64.075637] rt2800pci: Unknown symbol rt2800_init_rfcsr (err 0)

[   64.076075] rt2800pci: Unknown symbol rt2800_get_tsf (err 0)

[   64.078707] rt2800pci: Unknown symbol rt2800_load_firmware (err 0)

[   64.080758] rt2800pci: Unknown symbol eeprom_93cx6_multiread (err 0)

[   64.082802] rt2800pci: Unknown symbol rt2800_process_rxwi (err 0)

[   64.084495] rt2800pci: Unknown symbol rt2800_link_tuner (err 0)

[   64.085340] rt2800pci: Unknown symbol rt2800_config_intf (err 0)

[   64.086756] rt2800pci: Unknown symbol rt2800_set_rts_threshold (err 0)

[   64.088099] rt2800pci: Unknown symbol rt2800_wait_wpdma_ready (err 0)

[   64.089315] rt2800pci: Unknown symbol rt2800_init_registers (err 0)

[   64.090722] rt2800pci: Unknown symbol rt2800_get_tkip_seq (err 0)

[   64.092017] rt2800pci: Unknown symbol rt2800_ampdu_action (err 0)

[   64.093368] rt2800pci: Unknown symbol rt2800_config_ant (err 0)

[   64.095354] rt2800pci: Unknown symbol rt2800_config (err 0)

[   64.096286] rt2800pci: Unknown symbol rt2800_write_beacon (err 0)

[   64.097865] rt2800pci: Unknown symbol rt2800_write_txwi (err 0)

[   64.101353] rt2800pci: Unknown symbol rt2800_config_erp (err 0)

```

----------

## NeddySeagoon

Force2010,

Unknown symbol errors are caused by not having something that your module depends on in the kernel selected.

Use 

```
wgetpaste /usr/src/linux/.config
```

to put your entire kernel configuration file on a pastebin.

You can grep the kernel source to see where your missing symbols are defined, then enable those modules.

----------

## Force2010

Here is my kernel config:

http://force.vrocker-hosting.co.uk/config.txt

----------

## NeddySeagoon

Force2010,

Looking for one symbol at random in the kernel

```
/usr/src/linux/drivers $ grep -R rt2800_config_shared_key ./*

./net/wireless/rt2x00/rt2800lib.c:int rt2800_config_shared_key(struct rt2x00_dev *rt2x00dev,
```

belongs to something in /usr/src/linux/drivers/net/wireless/rt2x00/Kconfig

Ralink rt2800 (USB) support (EXPERIMENTAL) looks promising as from reading the Kconfig above, it allows  "rt2800usb - Include support for rt30xx (USB) devices" to be seen, which is what you really want.

Turn on both of those options. They are under 

```
Device Drivers

 Network device support 

  Wireless LAN

   Ralink driver support 
```

You still need the staging driver too.   I got the above from gentoo-sources-2.6.37

----------

## Force2010

Right, I'll give that a try and see what happens, 'tis a PCI card though so seems odd enabling USB stuff.

Update:

Tried to load the module again but still the same errors.

lspci -kvv

```

00:0b.0 Network controller: RaLink Device 3062

        Subsystem: RaLink Device 3062

        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-

        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=slow >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-

        Latency: 32 (500ns min, 1000ns max), Cache Line Size: 32 bytes

        Interrupt: pin A routed to IRQ 10

        Region 0: Memory at e8000000 (32-bit, non-prefetchable) [size=64K]

        Capabilities: [40] Power Management version 3

                Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)

                Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-

        Kernel modules: rt2800pci

```

Update 2:

Just noticed you said to include the staging drivers, I have no idea which ones to include though.

Update 3:

Included the rt2860 staging drivers but it was no use. D:

----------

## chithanh

Module load failures almost always means that your kernel and modules don't match, because you changed something in the kernel config from N to Y without installing and booting the new kernel.

Also run update-pciids to replace the product ID with something more meaningful in lspci.

----------

## Force2010

I see. Well this is the first time I've actually compiled a kernel myself, always gone with genkernel. Not entirely sure what I could have changed though, since when I compile a new kernel I always run make && make modules_install, mount /boot, copy the new bzImage, umount and reboot.

----------

## chithanh

Check the output of "uname -a" (build date and time) to verify that you are running the kernel you think you are.

----------

## Force2010

Yep, thats returning what it should be.

----------

## NeddySeagoon

Force2010,

Tell us exactly how you have been running genkernel.  If you don't have the command quite right, it will wipe out your carefully crafted kernel .config file and use its own generic one.

----------

## Force2010

This is a totally clean install of Gentoo with my kernel config so theres no chance for the old genkernel that I used to interfere.

----------

## NeddySeagoon

Force2010,

Now I'm confused - you said you used genkernel to build your kernels.

What command did you use to run genkernel ?

It may still be in your back buffer .bash_history

What effect did building the module(s) that I pointed out supply some of your missing symbols?

Has the error message changed any?

If so, what have you done and what is it now ?

If the error has not changed tell what you have done and post the errors again anyway.

Its difficult working with filtered information.

----------

## Force2010

Ok, about 1 week ago I formatted the HDD of the PC acting as the router/file server and started a fresh Gentoo install. Since it's a slow machine I decided it would be easier if I create my own kernel, (since having previously used genkernel before the format I knew it would take ~2 hours to compile).

Once I got the installation up and running with a kernel that I had created myself (not genkernel), I proceeded to set the machine up as it was before (acting as my router/file server). The problem I'm having is that I can't get the wireless PCI card up and running, as I need this for the WAP. (I couldn't do this on the old install using genkernel either).

When I include the rt2800pci driver as a module and try and load it, I get the following error:

```

FATAL: Error inserting rt2800pci (/lib/modules/2.6.36-gentoo-r5/kernel/drivers/net/wireless/rt2x00/rt2800pci.ko): Unknown symbol in module, or unknown parameter (see dmesg)

```

So I run dmesg and get the following:

```

[   64.051132] rt2800lib: Unknown symbol crc_ccitt (err 0)

[   64.056495] rt2800pci: Unknown symbol rt2800_config_shared_key (err 0)

[   64.057333] rt2800pci: Unknown symbol rt2800_reset_tuner (err 0)

[   64.059487] rt2800pci: Unknown symbol rt2800_validate_eeprom (err 0)

[   64.059887] rt2800pci: Unknown symbol rt2800_link_stats (err 0)

[   64.061349] rt2800pci: Unknown symbol rt2800_rfkill_poll (err 0)

[   64.061998] rt2800pci: Unknown symbol rt2800_probe_hw_mode (err 0)

[   64.063553] rt2800pci: Unknown symbol rt2800_read_eeprom_efuse (err 0)

[   64.065666] rt2800pci: Unknown symbol rt2800_efuse_detect (err 0)

[   64.066103] rt2800pci: Unknown symbol rt2800_config_filter (err 0)

[   64.067380] rt2800pci: Unknown symbol rt2800_conf_tx (err 0)

[   64.069145] rt2800pci: Unknown symbol rt2800_check_firmware (err 0)

[   64.069549] rt2800pci: Unknown symbol rt2800_mcu_request (err 0)

[   64.070093] rt2800pci: Unknown symbol rt2800_init_eeprom (err 0)

[   64.071820] rt2800pci: Unknown symbol rt2800_config_pairwise_key (err 0)

[   64.073950] rt2800pci: Unknown symbol rt2800_init_bbp (err 0)

[   64.075637] rt2800pci: Unknown symbol rt2800_init_rfcsr (err 0)

[   64.076075] rt2800pci: Unknown symbol rt2800_get_tsf (err 0)

[   64.078707] rt2800pci: Unknown symbol rt2800_load_firmware (err 0)

[   64.080758] rt2800pci: Unknown symbol eeprom_93cx6_multiread (err 0)

[   64.082802] rt2800pci: Unknown symbol rt2800_process_rxwi (err 0)

[   64.084495] rt2800pci: Unknown symbol rt2800_link_tuner (err 0)

[   64.085340] rt2800pci: Unknown symbol rt2800_config_intf (err 0)

[   64.086756] rt2800pci: Unknown symbol rt2800_set_rts_threshold (err 0)

[   64.088099] rt2800pci: Unknown symbol rt2800_wait_wpdma_ready (err 0)

[   64.089315] rt2800pci: Unknown symbol rt2800_init_registers (err 0)

[   64.090722] rt2800pci: Unknown symbol rt2800_get_tkip_seq (err 0)

[   64.092017] rt2800pci: Unknown symbol rt2800_ampdu_action (err 0)

[   64.093368] rt2800pci: Unknown symbol rt2800_config_ant (err 0)

[   64.095354] rt2800pci: Unknown symbol rt2800_config (err 0)

[   64.096286] rt2800pci: Unknown symbol rt2800_write_beacon (err 0)

[   64.097865] rt2800pci: Unknown symbol rt2800_write_txwi (err 0)

[   64.101353] rt2800pci: Unknown symbol rt2800_config_erp (err 0) 

```

lspci -kvv gives the following information about the wireless PCI card.

```

00:0b.0 Network controller: RaLink Device 3062

        Subsystem: RaLink Device 3062

        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-

        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=slow >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-

        Latency: 32 (500ns min, 1000ns max), Cache Line Size: 32 bytes

        Interrupt: pin A routed to IRQ 10

        Region 0: Memory at e8000000 (32-bit, non-prefetchable) [size=64K]

        Capabilities: [40] Power Management version 3

                Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)

                Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-

        Kernel modules: rt2800pci 

```

Hope that clears things up for you.  :Smile: 

----------

## NeddySeagoon

Force2010,

Thank you for the refresher.

Lets have a look for some of tose symbols in the kernel.  You have parts of the kernel you need missing. Thats why you get 

```
Unknown symbol 
```

Your rt2800pci module needs rt2800_config_shared_key but it is defined in another piece of the kernel code, which you have turned off.

So ...  

```
cd /usr/src/linux/drivers/

$ grep -R rt2800_config_shared_key ./*

./net/wireless/rt2x00/rt2800lib.c:int rt2800_config_shared_key(struct rt2x00_dev *rt2x00dev,

./net/wireless/rt2x00/rt2800lib.c:EXPORT_SYMBOL_GPL(rt2800_config_shared_key);

./net/wireless/rt2x00/rt2800usb.c:   .config_shared_key   = rt2800_config_shared_key,

./net/wireless/rt2x00/rt2800pci.c:   .config_shared_key   = rt2800_config_shared_key,

./net/wireless/rt2x00/rt2800lib.h:int rt2800_config_shared_key(struct rt2x00_dev *rt2x00dev,
```

Shows its defined in ./net/wireless/rt2x00/rt2800lib somewhere.

Reading 

```
less ./net/wireless/rt2x00/Kconfig 
```

which is the configuration file for the  ./net/wireless/rt2x00 directory shows

```
config RT2800PCI

        tristate "Ralink rt28xx/rt30xx/rt35xx (PCI/PCIe/PCMCIA) support (EXPERIMENTAL)"

        depends on (RT2800PCI_PCI || RT2800PCI_SOC) && EXPERIMENTAL

        select RT2800_LIB

        select RT2X00_LIB_PCI if RT2800PCI_PCI

        select RT2X00_LIB_SOC if RT2800PCI_SOC

        select RT2X00_LIB_HT

        select RT2X00_LIB_FIRMWARE

        select RT2X00_LIB_CRYPTO

        select CRC_CCITT

        select EEPROM_93CX6

        ---help---

          This adds support for rt2800/rt3000/rt3500 wireless chipset family.

          Supported chips: RT2760, RT2790, RT2860, RT2880, RT2890 & RT3052

          This driver is non-functional at the moment and is intended for

          developers.

          When compiled as a module, this driver will be called "rt2800pci.ko".

if RT2800PCI

config RT2800PCI_RT30XX

        bool "rt2800pci - Include support for rt30xx (PCI/PCIe/PCMCIA) devices"

        default y

        ---help---

          This adds support for rt30xx wireless chipset family to the

          rt2800pci driver.

          Supported chips: RT3090, RT3091 & RT3092

          Support for these devices is non-functional at the moment and is

          intended for testers and developers.

config RT2800PCI_RT35XX

        bool "rt2800pci - Include support for rt35xx (PCI/PCIe/PCMCIA) devices"

        default n

        ---help---

          This adds support for rt35xx wireless chipset family to the

          rt2800pci driver.

          Supported chips: RT3060, RT3062, RT3562, RT3592

          Support for these devices is non-functional at the moment and is

          intended for testers and developers.

endif
```

 Notice the top section ...

```
config RT2800PCI

        tristate "Ralink rt28xx/rt30xx/rt35xx (PCI/PCIe/PCMCIA) support (EXPERIMENTAL)"

        depends on (RT2800PCI_PCI || RT2800PCI_SOC) && EXPERIMENTAL

        select RT2800_LIB

        select RT2X00_LIB_PCI if RT2800PCI_PCI

        select RT2X00_LIB_SOC if RT2800PCI_SOC

        select RT2X00_LIB_HT

        select RT2X00_LIB_FIRMWARE

        select RT2X00_LIB_CRYPTO

        select CRC_CCITT

        select EEPROM_93CX6
```

 this means when you use menuconfig to turn on the RT2800PCI option, it also forces on all the select ... options too.

That you have symbols missing that are provided by RT2800_LIB and by CRC_CCITT suggests you have been editing the .config file with $EDITOR.

If you have done that your kernel config and all the intermediate files are scrap.  The best you can do is a 

```
make mrproper 
```

to restore your kernel tree to pristine condition and start again.  You cannot salvage anything from a .config file that has been changed without using one of the provided tools.

----------

## Force2010

Hmm ok, I'll give that a try then. Seems odd though because I've only ever used make menuconfig to change any settings within the kernel.

I'm guessing after running make mrproper, I'll have to re-enable all the kernel options I had before and remove the others?

----------

## NeddySeagoon

Force2010,

If you have only ever used make menuconfig post your kernel .config before you trash everything.

I'll check the settings.

Maybe you have found a kernel bug.

----------

## Force2010

http://force.vrocker-hosting.co.uk/config.txt

That should be the latest config for the kernel.

----------

## NeddySeagoon

Force2010

```
CONFIG_RT2800PCI_PCI=y

CONFIG_RT2800PCI=m

# CONFIG_RT2800PCI_RT30XX is not set

CONFIG_RT2800PCI_RT35XX=y

# CONFIG_RT2500USB is not set

# CONFIG_RT73USB is not set

# CONFIG_RT2800USB is not set

CONFIG_RT2800_LIB=m

CONFIG_RT2X00_LIB_PCI=m

CONFIG_RT2X00_LIB=m

CONFIG_RT2X00_LIB_HT=y

CONFIG_RT2X00_LIB_FIRMWARE=y

CONFIG_RT2X00_LIB_CRYPTO=y

CONFIG_RT2X00_LIB_LEDS=y
```

Heres the exciting part of your kernel config.

Your very first post in this thread says 

```
00:0b.0 Network controller [0280]: RaLink Device [1814:3062] Subsystem: RaLink Device [1814:3062]
```

This page shows you are on the right track.

Why did you set 

```
# CONFIG_RT2800PCI_RT30XX is not set

CONFIG_RT2800PCI_RT35XX=y
```

so you have support for 35xx devices and not 30xx, which is what you seem to have?

I'm surprised to see 

```
CONFIG_RT2800_LIB=m

CONFIG_RT2X00_LIB_PCI=m

CONFIG_RT2X00_LIB=m
```

all listed as modules - from your Unknown symbol errors, we know that some symbols are defined in CONFIG_RT2X00_LIB.

As its =m, that suggests

```
 make modules_install
```

 is getting the module dependencies wrong and the RT2800 lib module is not being loaded.

You did run 

```
 make modules_install
```

when you installed your kernel ?

That command copies all the modules to /lib/modules/`uname -r`/ and works out the dependencies, so modprobe loads all the needed modules, in the right order, when you load a module into the kernel.

What modules do you have installed (not loaded)? 

```
modprobe -l
```

  will list them.

If you see anything like rt2800lib there, try to modprobe it, then your wireless driver module.

----------

## Force2010

I'm pretty sure I run make modules_install after every kernel compile. I'm current recompiling with the 30XX support as a module and will let you know the outcome.

Before I did this I run modprobe -l

```

force@hunter ~ $ sudo modprobe -l

/lib/modules/2.6.36-gentoo-r5/kernel/drivers/scsi/scsi_wait_scan.ko

/lib/modules/2.6.36-gentoo-r5/kernel/drivers/net/wireless/rt2x00/rt2800pci.ko

/lib/modules/2.6.36-gentoo-r5/kernel/drivers/net/wireless/rt2x00/rt2800lib.ko

/lib/modules/2.6.36-gentoo-r5/kernel/drivers/net/wireless/rt2x00/rt2x00pci.ko

/lib/modules/2.6.36-gentoo-r5/kernel/drivers/net/wireless/rt2x00/rt2x00lib.ko

/lib/modules/2.6.36-gentoo-r5/kernel/net/netfilter/xt_mark.ko

/lib/modules/2.6.36-gentoo-r5/kernel/arch/x86/kernel/test_nx.ko

```

I was able to modprobe the rt2x00lib/pci modules but nothing else, would just give me the usual error that I've posted earlier in the thread.

----------

## NeddySeagoon

Force2010,

Exactly the same error or were there fewer Unknown symbols?

With rt2800lib loaded, I would expect the symbols it provides to be satisfied.

----------

## Force2010

Right then, kernel compiled and all the modules installed.

```

force@hunter ~ $ sudo modprobe rt2800lib

FATAL: Error inserting rt2800lib (/lib/modules/2.6.36-gentoo-r5/kernel/drivers/net/wireless/rt2x00/rt2800lib.ko): Unknown symbol in module, or unknown parameter (see dmesg)

```

Returns the following on dmesg

```

[  107.132573] rt2800lib: Unknown symbol crc_ccitt (err 0)

```

That's the only error, if I try and modprobe the pci one then I get the exact same Unknown symbol errors as before.

----------

## NeddySeagoon

Force2010, 

We are getting closer.

```
crc_ccitt
```

is provided by 

```
Library routines  --->

 {*} CRC-CCITT functions
```

 and it should be forced on as its needed by other things.

If its off, make it a module and try again.

----------

## Force2010

According to make menuconfig this is already forced on, should I try to compile as a module and load that?

----------

## NeddySeagoon

Force2010,

Its supposed to be forced on. You will probably find you cannot change its setting

----------

## Force2010

Ah ok, wonder why rt2800lib can't be loaded as a module then, since like you said, it depends on that.

----------

## Force2010

I've still not managed to get this working, it's something to do with the crc_ccitt but that is included in the kernel, so I'm stumped.

I'm sure I'll get there one day though!

----------

