# unable to compile driver RaLink RT3090 802.11n 1T/1R

## Cr0t

```
make[1]: Entering directory `/root/drivers/rt3090/DPO_RT3090_LinuxSTA_V2.3.1.7_20100618_WiFiBTCombo_RFKill/tools'

gcc -g bin2h.c -o bin2h

make[1]: Leaving directory `/root/drivers/rt3090/DPO_RT3090_LinuxSTA_V2.3.1.7_20100618_WiFiBTCombo_RFKill/tools'

/root/drivers/rt3090/DPO_RT3090_LinuxSTA_V2.3.1.7_20100618_WiFiBTCombo_RFKill/tools/bin2h

cp -f os/linux/Makefile.6 /root/drivers/rt3090/DPO_RT3090_LinuxSTA_V2.3.1.7_20100618_WiFiBTCombo_RFKill/os/linux/Makefile

make -C /lib/modules/2.6.36-gentoo-r1/build SUBDIRS=/root/drivers/rt3090/DPO_RT3090_LinuxSTA_V2.3.1.7_20100618_WiFiBTCombo_RFKill/os/linux modules

make[1]: Entering directory `/usr/src/linux-2.6.36-gentoo-r1'

  CC [M]  /root/drivers/rt3090/DPO_RT3090_LinuxSTA_V2.3.1.7_20100618_WiFiBTCombo_RFKill/os/linux/../../os/linux/sta_ioctl.o

In file included from /root/drivers/rt3090/DPO_RT3090_LinuxSTA_V2.3.1.7_20100618_WiFiBTCombo_RFKill/include/rt_config.h:160,

                 from /root/drivers/rt3090/DPO_RT3090_LinuxSTA_V2.3.1.7_20100618_WiFiBTCombo_RFKill/os/linux/../../os/linux/sta_ioctl.c:40:

/root/drivers/rt3090/DPO_RT3090_LinuxSTA_V2.3.1.7_20100618_WiFiBTCombo_RFKill/include/cfg80211.h:38:1: warning: "RT_CFG80211_CRDA_REG_RULE_APPLY" redefined

In file included from /root/drivers/rt3090/DPO_RT3090_LinuxSTA_V2.3.1.7_20100618_WiFiBTCombo_RFKill/include/rt_config.h:74,

                 from /root/drivers/rt3090/DPO_RT3090_LinuxSTA_V2.3.1.7_20100618_WiFiBTCombo_RFKill/os/linux/../../os/linux/sta_ioctl.c:40:

/root/drivers/rt3090/DPO_RT3090_LinuxSTA_V2.3.1.7_20100618_WiFiBTCombo_RFKill/include/cfg80211extr.h:75:1: warning: this is the location of the previous definition

In file included from /root/drivers/rt3090/DPO_RT3090_LinuxSTA_V2.3.1.7_20100618_WiFiBTCombo_RFKill/include/rt_config.h:160,

                 from /root/drivers/rt3090/DPO_RT3090_LinuxSTA_V2.3.1.7_20100618_WiFiBTCombo_RFKill/os/linux/../../os/linux/sta_ioctl.c:40:

/root/drivers/rt3090/DPO_RT3090_LinuxSTA_V2.3.1.7_20100618_WiFiBTCombo_RFKill/include/cfg80211.h:42:1: warning: "RT_CFG80211_REINIT" redefined

In file included from /root/drivers/rt3090/DPO_RT3090_LinuxSTA_V2.3.1.7_20100618_WiFiBTCombo_RFKill/include/rt_config.h:74,

                 from /root/drivers/rt3090/DPO_RT3090_LinuxSTA_V2.3.1.7_20100618_WiFiBTCombo_RFKill/os/linux/../../os/linux/sta_ioctl.c:40:

/root/drivers/rt3090/DPO_RT3090_LinuxSTA_V2.3.1.7_20100618_WiFiBTCombo_RFKill/include/cfg80211extr.h:98:1: warning: this is the location of the previous definition

In file included from /root/drivers/rt3090/DPO_RT3090_LinuxSTA_V2.3.1.7_20100618_WiFiBTCombo_RFKill/include/rt_config.h:160,

                 from /root/drivers/rt3090/DPO_RT3090_LinuxSTA_V2.3.1.7_20100618_WiFiBTCombo_RFKill/os/linux/../../os/linux/sta_ioctl.c:40:

/root/drivers/rt3090/DPO_RT3090_LinuxSTA_V2.3.1.7_20100618_WiFiBTCombo_RFKill/include/cfg80211.h:46:1: warning: "RT_CFG80211_SCANNING_INFORM" redefined

In file included from /root/drivers/rt3090/DPO_RT3090_LinuxSTA_V2.3.1.7_20100618_WiFiBTCombo_RFKill/include/rt_config.h:74,

                 from /root/drivers/rt3090/DPO_RT3090_LinuxSTA_V2.3.1.7_20100618_WiFiBTCombo_RFKill/os/linux/../../os/linux/sta_ioctl.c:40:

/root/drivers/rt3090/DPO_RT3090_LinuxSTA_V2.3.1.7_20100618_WiFiBTCombo_RFKill/include/cfg80211extr.h:82:1: warning: this is the location of the previous definition

/root/drivers/rt3090/DPO_RT3090_LinuxSTA_V2.3.1.7_20100618_WiFiBTCombo_RFKill/os/linux/../../os/linux/sta_ioctl.c: In function 'rt_ioctl_siwencode':

/root/drivers/rt3090/DPO_RT3090_LinuxSTA_V2.3.1.7_20100618_WiFiBTCombo_RFKill/os/linux/../../os/linux/sta_ioctl.c:1471: warning: suggest parentheses around operand of '!' or change '&' to '&&' or '!' to '~'

/root/drivers/rt3090/DPO_RT3090_LinuxSTA_V2.3.1.7_20100618_WiFiBTCombo_RFKill/os/linux/../../os/linux/sta_ioctl.c: At top level:

/root/drivers/rt3090/DPO_RT3090_LinuxSTA_V2.3.1.7_20100618_WiFiBTCombo_RFKill/os/linux/../../os/linux/sta_ioctl.c:2997: error: unknown field 'private' specified in initializer

/root/drivers/rt3090/DPO_RT3090_LinuxSTA_V2.3.1.7_20100618_WiFiBTCombo_RFKill/os/linux/../../os/linux/sta_ioctl.c:2997: warning: initialization from incompatible pointer type

/root/drivers/rt3090/DPO_RT3090_LinuxSTA_V2.3.1.7_20100618_WiFiBTCombo_RFKill/os/linux/../../os/linux/sta_ioctl.c:2998: error: unknown field 'num_private' specified in initializer

/root/drivers/rt3090/DPO_RT3090_LinuxSTA_V2.3.1.7_20100618_WiFiBTCombo_RFKill/os/linux/../../os/linux/sta_ioctl.c:2998: warning: excess elements in struct initializer

/root/drivers/rt3090/DPO_RT3090_LinuxSTA_V2.3.1.7_20100618_WiFiBTCombo_RFKill/os/linux/../../os/linux/sta_ioctl.c:2998: warning: (near initialization for 'rt28xx_iw_handler_def')

/root/drivers/rt3090/DPO_RT3090_LinuxSTA_V2.3.1.7_20100618_WiFiBTCombo_RFKill/os/linux/../../os/linux/sta_ioctl.c:2999: error: unknown field 'private_args' specified in initializer

/root/drivers/rt3090/DPO_RT3090_LinuxSTA_V2.3.1.7_20100618_WiFiBTCombo_RFKill/os/linux/../../os/linux/sta_ioctl.c:2999: warning: excess elements in struct initializer

/root/drivers/rt3090/DPO_RT3090_LinuxSTA_V2.3.1.7_20100618_WiFiBTCombo_RFKill/os/linux/../../os/linux/sta_ioctl.c:2999: warning: (near initialization for 'rt28xx_iw_handler_def')

/root/drivers/rt3090/DPO_RT3090_LinuxSTA_V2.3.1.7_20100618_WiFiBTCombo_RFKill/os/linux/../../os/linux/sta_ioctl.c:3000: error: unknown field 'num_private_args' specified in initializer

/root/drivers/rt3090/DPO_RT3090_LinuxSTA_V2.3.1.7_20100618_WiFiBTCombo_RFKill/os/linux/../../os/linux/sta_ioctl.c:3000: warning: excess elements in struct initializer

/root/drivers/rt3090/DPO_RT3090_LinuxSTA_V2.3.1.7_20100618_WiFiBTCombo_RFKill/os/linux/../../os/linux/sta_ioctl.c:3000: warning: (near initialization for 'rt28xx_iw_handler_def')

make[2]: *** [/root/drivers/rt3090/DPO_RT3090_LinuxSTA_V2.3.1.7_20100618_WiFiBTCombo_RFKill/os/linux/../../os/linux/sta_ioctl.o] Error 1

make[1]: *** [_module_/root/drivers/rt3090/DPO_RT3090_LinuxSTA_V2.3.1.7_20100618_WiFiBTCombo_RFKill/os/linux] Error 2

make[1]: Leaving directory `/usr/src/linux-2.6.36-gentoo-r1'

make: *** [LINUX] Error 2
```

----------

## idella4

Cr0t

RT3090 802.11n is a usb wireless.

This type of error output occurs when the package you are compiling is mis-matched to the version of an onter-related package, in rgus case the kernel.

The kernel caters to rt drivers quite well

try

[

code]

 .config - Linux Kernel v2.6.36-gentoo-r1 Configuration

 ───────────────────────────────────────────────────────────────────────────────────────────────────

  ┌─────────────────────────────────────── Search Results ───────────────────────────────────────┐

  │ Symbol: RT2800USB_RT30XX [=n]                                                                │  

  │ Type  : boolean                                                                              │  

  │ Prompt: rt2800usb - Include support for rt30xx (USB) devices                                 │  

  │   Defined at drivers/net/wireless/rt2x00/Kconfig:157                                         │  

  │   Depends on: NETDEVICES [=y] && WLAN [=y] && RT2X00 [=m] && RT2800USB [=n]                  │  

  │   Location:                                                                                  │  

  │     -> Device Drivers                                                                        │  

  │       -> Network device support (NETDEVICES [=y])                                            │  

  │         -> Wireless LAN (WLAN [=y])                                                          │  

  │           -> Ralink driver support (RT2X00 [=m])                                             │  

  │             -> Ralink rt2800 (USB) support (EXPERIMENTAL) (RT2800USB [=n])                   │  

  │                                                                                              │  

 [/code]

----------

## Cr0t

If you check the PCI driver it says that the 3090 is supported, however not working. RALink provides a driver, but doesn't compile under kernel 2.3.30+. I am not 100% sure under which kernel it started to fail, but it would be pretty difficult for me to roll back to a lower version of the kernel.

----------

## chithanh

Support for RT3090 has been completed and is waiting for inclusion in the 2.6.38 kernel.

You can get it today from wireless-next.git or compat-wireless.

----------

## Cr0t

I tried the drivers, which didn't work..... doesn't even say anything that they support it in the first place.

----------

## chithanh

"didn't work" is not a very precise problem description. According to this commit message it is supported.

 *Quote:*   

> +         This adds support for rt27xx/rt28xx/rt30xx wireless chipset family.
> 
> +         Supported chips: RT2760, RT2790, RT2860, RT2880, RT2890, RT3052,
> 
> +                          RT3090, RT3091 & RT3092

 

----------

## Cr0t

 *chithanh wrote:*   

> "didn't work" is not a very precise problem description. According to this commit message it is supported.
> 
>  *Quote:*   +         This adds support for rt27xx/rt28xx/rt30xx wireless chipset family.
> 
> +         Supported chips: RT2760, RT2790, RT2860, RT2880, RT2890, RT3052,
> ...

 I followed the install instructions and even if I load the driver iwconfig doesn't show wlan0. I will work on it and post an update tomorrow.

----------

## chithanh

Check dmesg, maybe you have wrong/missing firmware.

----------

## fredbear5150

Chitanh - so what are you saying precisely - that to get a working RT3090 card you need to wait for the .38 kernel? Or is there an existing driver that compiles against > 2.6.30 and <=2.6.36?

There also appear to be some staging drivers for it in the latest kernel versions <=2.6.36 but I have been unable to get any of these to work - though I've yet to try 2.6.36-r3 from Gentoo sources.

----------

## chithanh

To summarize:rt3090 is in current mainline kernel not supported by the rt2800pci driver.

There is a staging driver which claims to support it, but I found it to not work too well for my rt3070.

In the wireless-next tree, which will be merged to mainline during the 2.6.38 merge window, the rt2800pci driver has rt3090 support. For convenience, the kernel wireless developers offer a compat-wireless tree which builds against the latest release (2.6.36 at the time of writing) and contains the latest development in kernel wifi drivers.

For ralink devices, you need to install firmware, either through the linux-firmware package or download directly from ralink and place in /lib/firmware

----------

## Ant P.

This seems to be a recurring problem from the rt2x00 developers: moving drivers out of the staging tree when they don't even work. Happened to me with the RT2860 driver.

----------

## Cr0t

If I install that driver instead of the kernel driver on the reboot it never even tries to load the driver. If I manually load the driver it never recognizes the new device and therefore never shows wlan0.

----------

## fredbear5150

Cr0t -> Yep, I am getting the same problem...

If it helps, here's a bit about my set up.

I'm trying to get RT3090 wireless working on an Asus EEE PC 1001HA, it's a 32-bit Intel Atom CPU so I'm in x86 architecture. I'm currently using gentoo-sources 2.6.34-r12 for a kernel.

Before building anything new, I made sure no devices were selected in wireless drivers, I also disabled all staging drivers. I then installed the "pentoo" overlay and got compat-wireless from there - I've so far tried the latest stable version of compat-wireless which is 2.6.36, that built the drivers fine after I unmasked the firmware dependency package it wanted.

However, it doesn't detect the RT3090, I've also manually inserted the modules to see if wlan0 shows up in iwconfig but no luck.

I do think I am "on the right track" because I have been also playing around with two other USB wireless dongles on this machine - an older RTL8187 dongle which has always worked with the standard kernel driver, and a tiny RTL8192 USB dongle that I purchased recently as a temporary solution to the RT3090 not working. For the RTL8192, it worked intermittently with the kernel staging drivers but I have just plugged it into the EEE PC now and it works fine with compat-wireless, it is detected and starts up the moment I plug it in. (compat-wireless also builds some new RTL8192 drivers as well.)

Therefore, I conclude from this that compat-wireless 2.6.36 doesn't have 3090 support, so I am going to unmask a later version to see if that builds and works against gentoo-sources 2.6.34-r12.

I did try the gentoo-sources 2.6.36-r3 kernel and unmasked the latest wireless-compat (2.6.37-rc3) to build against that but it wouldn't build - plus 2.6.36-r3 was causing some other problems on the EEE PC so I've gone back to 2.6.34-r12.

I'll add any further updates here.

----------

## rod

FWIW, I have the same machine as fredbear5150 (Asus 1001ha eeepc) and have had my rt3090 based card working using the Ralink driver with kernel-2.6.32-gentoo-r7. When upgrading to kernel-2.6.35-gentoo-r12 I encountered the same problem as Cr0t.

I confirm that it works with .32 but not with .34 or .35. (Something? changed in the kernel between .32 and .34?)

I'll try the wireless-next drivers in the next few days and see if I get the same problem as Cr0t encountered, in the meantime I'm going back to kernel-2.6.32-gentoo-r7 so I still have a working wireless connection  :Smile: 

----------

## Cr0t

RALink released new drivers:

http://www.ralinktech.com/support.php?s=2

... but guess what they don't compile again!

```
23:20:40^root@moviebox:~/drivers/20101125_RT3090_LinuxSTA_V2.4.0.2_WiFiBTCombo_RFKill_DPO > make

make -C tools

make[1]: Entering directory `/root/drivers/20101125_RT3090_LinuxSTA_V2.4.0.2_WiFiBTCombo_RFKill_DPO/tools'

gcc -g bin2h.c -o bin2h

make[1]: Leaving directory `/root/drivers/20101125_RT3090_LinuxSTA_V2.4.0.2_WiFiBTCombo_RFKill_DPO/tools'

/root/drivers/20101125_RT3090_LinuxSTA_V2.4.0.2_WiFiBTCombo_RFKill_DPO/tools/bin2h

cp -f os/linux/Makefile.6 /root/drivers/20101125_RT3090_LinuxSTA_V2.4.0.2_WiFiBTCombo_RFKill_DPO/os/linux/Makefile

make -C /lib/modules/2.6.36-gentoo-r3/build SUBDIRS=/root/drivers/20101125_RT3090_LinuxSTA_V2.4.0.2_WiFiBTCombo_RFKill_DPO/os/linux modules

make[1]: Entering directory `/usr/src/linux-2.6.36-gentoo-r3'

  CC [M]  /root/drivers/20101125_RT3090_LinuxSTA_V2.4.0.2_WiFiBTCombo_RFKill_DPO/os/linux/../../common/rtmp_mcu.o

/root/drivers/20101125_RT3090_LinuxSTA_V2.4.0.2_WiFiBTCombo_RFKill_DPO/os/linux/../../common/rtmp_mcu.c: In function 'RtmpAsicLoadFirmware':

/root/drivers/20101125_RT3090_LinuxSTA_V2.4.0.2_WiFiBTCombo_RFKill_DPO/os/linux/../../common/rtmp_mcu.c:354: warning: ISO C90 forbids mixed declarations and code

/root/drivers/20101125_RT3090_LinuxSTA_V2.4.0.2_WiFiBTCombo_RFKill_DPO/os/linux/../../common/rtmp_mcu.c:357: warning: passing argument 1 of 'writel' makes integer from pointer without a cast

/usr/src/linux-2.6.36-gentoo-r3/arch/x86/include/asm/io.h:64: note: expected 'unsigned int' but argument is of type 'ULONG *'

/root/drivers/20101125_RT3090_LinuxSTA_V2.4.0.2_WiFiBTCombo_RFKill_DPO/os/linux/../../common/rtmp_mcu.c:358: warning: format '%d' expects type 'int', but argument 2 has type 'ULONG'

  CC [M]  /root/drivers/20101125_RT3090_LinuxSTA_V2.4.0.2_WiFiBTCombo_RFKill_DPO/os/linux/../../os/linux/cfg80211.o

/root/drivers/20101125_RT3090_LinuxSTA_V2.4.0.2_WiFiBTCombo_RFKill_DPO/os/linux/../../os/linux/cfg80211.c:692: warning: 'enum tx_power_setting' declared inside parameter list

/root/drivers/20101125_RT3090_LinuxSTA_V2.4.0.2_WiFiBTCombo_RFKill_DPO/os/linux/../../os/linux/cfg80211.c:692: warning: its scope is only this definition or declaration, which is probably not what you want

/root/drivers/20101125_RT3090_LinuxSTA_V2.4.0.2_WiFiBTCombo_RFKill_DPO/os/linux/../../os/linux/cfg80211.c:691: error: parameter 2 ('Type') has incomplete type

/root/drivers/20101125_RT3090_LinuxSTA_V2.4.0.2_WiFiBTCombo_RFKill_DPO/os/linux/../../os/linux/cfg80211.c:1350: warning: initialization from incompatible pointer type

/root/drivers/20101125_RT3090_LinuxSTA_V2.4.0.2_WiFiBTCombo_RFKill_DPO/os/linux/../../os/linux/cfg80211.c: In function 'CFG80211_SupBandInit':

/root/drivers/20101125_RT3090_LinuxSTA_V2.4.0.2_WiFiBTCombo_RFKill_DPO/os/linux/../../os/linux/cfg80211.c:2589: warning: format '%d' expects type 'int', but argument 2 has type 'long unsigned int'

make[2]: *** [/root/drivers/20101125_RT3090_LinuxSTA_V2.4.0.2_WiFiBTCombo_RFKill_DPO/os/linux/../../os/linux/cfg80211.o] Error 1

make[1]: *** [_module_/root/drivers/20101125_RT3090_LinuxSTA_V2.4.0.2_WiFiBTCombo_RFKill_DPO/os/linux] Error 2

make[1]: Leaving directory `/usr/src/linux-2.6.36-gentoo-r3'

make: *** [LINUX] Error 2

real   0m6.357s

user   0m4.952s

sys   0m1.243s
```

/root/drivers/20101125_RT3090_LinuxSTA_V2.4.0.2_WiFiBTCombo_RFKill_DPO/os/linux/../../os/linux/cfg80211.c:691: error: parameter 2 ('Type') has incomplete type is the issue. I was able to change the type and it compiles, however the modules has issues loading.

```
rt3090sta: disagrees about version of symbol cfg80211_scan_done

rt3090sta: Unknown symbol cfg80211_scan_done (err -22)

rt3090sta: disagrees about version of symbol regulatory_hint

rt3090sta: Unknown symbol regulatory_hint (err -22)

rt3090sta: disagrees about version of symbol wiphy_register

rt3090sta: Unknown symbol wiphy_register (err -22)

rt3090sta: disagrees about version of symbol wiphy_new

rt3090sta: Unknown symbol wiphy_new (err -22)

rt3090sta: disagrees about version of symbol cfg80211_connect_result

rt3090sta: Unknown symbol cfg80211_connect_result (err -22)

rt3090sta: disagrees about version of symbol wiphy_unregister

rt3090sta: Unknown symbol wiphy_unregister (err -22)

rt3090sta: disagrees about version of symbol cfg80211_inform_bss_frame

rt3090sta: Unknown symbol cfg80211_inform_bss_frame (err -22)

rt3090sta: disagrees about version of symbol wiphy_free

rt3090sta: Unknown symbol wiphy_free (err -22)
```

----------

## Cr0t

New driver got posted, but still doesn't compile.

```
19:08:53^root@moviebox:~/drivers/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO > make

make -C tools

make[1]: Entering directory `/root/drivers/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/tools'

gcc -g bin2h.c -o bin2h

make[1]: Leaving directory `/root/drivers/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/tools'

/root/drivers/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/tools/bin2h

cp -f os/linux/Makefile.6 /root/drivers/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/Makefile

make -C /lib/modules/2.6.36-gentoo-r5/build SUBDIRS=/root/drivers/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux modules

make[1]: Entering directory `/usr/src/linux-2.6.36-gentoo-r5'

  CC [M]  /root/drivers/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../common/crypt_md5.o

  CC [M]  /root/drivers/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../common/crypt_sha2.o

  CC [M]  /root/drivers/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../common/crypt_hmac.o

  CC [M]  /root/drivers/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../common/crypt_aes.o

  CC [M]  /root/drivers/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../common/crypt_arc4.o

  CC [M]  /root/drivers/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../common/mlme.o

/root/drivers/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../common/mlme.c: In function 'MlmeResetRalinkCounters':

/root/drivers/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../common/mlme.c:870:2: warning: cast from pointer to integer of different size

/root/drivers/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../common/mlme.c:870:2: warning: cast from pointer to integer of different size

/root/drivers/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../common/mlme.c: In function 'BssTableSetEntry':

/root/drivers/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../common/mlme.c:5822:39: warning: operation on 'Tab->BssOverlapNr' may be undefined

  CC [M]  /root/drivers/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../common/cmm_wep.o

  CC [M]  /root/drivers/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../common/action.o

  CC [M]  /root/drivers/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../common/cmm_data.o

  CC [M]  /root/drivers/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../common/rtmp_init.o

  CC [M]  /root/drivers/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../common/cmm_tkip.o

  CC [M]  /root/drivers/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../common/cmm_aes.o

  CC [M]  /root/drivers/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../common/cmm_sync.o

  CC [M]  /root/drivers/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../common/eeprom.o

  CC [M]  /root/drivers/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../common/cmm_sanity.o

  CC [M]  /root/drivers/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../common/cmm_info.o

  CC [M]  /root/drivers/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../common/cmm_cfg.o

  CC [M]  /root/drivers/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../common/cmm_wpa.o

  CC [M]  /root/drivers/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../common/dfs.o

  CC [M]  /root/drivers/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../common/spectrum.o

/root/drivers/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../common/spectrum.c: In function 'PeerMeasureReportAction':

/root/drivers/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../common/spectrum.c:1966:3: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int'

  CC [M]  /root/drivers/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../common/rtmp_timer.o

  CC [M]  /root/drivers/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../common/rt_channel.o

  CC [M]  /root/drivers/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../common/cmm_profile.o

  CC [M]  /root/drivers/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../common/cmm_asic.o

  CC [M]  /root/drivers/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../common/cmm_cmd.o

  CC [M]  /root/drivers/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../sta/assoc.o

  CC [M]  /root/drivers/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../sta/auth.o

  CC [M]  /root/drivers/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../sta/auth_rsp.o

  CC [M]  /root/drivers/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../sta/sync.o

  CC [M]  /root/drivers/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../sta/sanity.o

  CC [M]  /root/drivers/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../sta/rtmp_data.o

  CC [M]  /root/drivers/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../sta/connect.o

  CC [M]  /root/drivers/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../sta/wpa.o

  CC [M]  /root/drivers/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../sta/ags.o

  CC [M]  /root/drivers/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../sta/sta_cfg.o

  CC [M]  /root/drivers/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../common/rtmp_init_inf.o

  CC [M]  /root/drivers/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../os/linux/rt_profile.o

  CC [M]  /root/drivers/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../os/linux/sta_ioctl.o

/root/drivers/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../os/linux/sta_ioctl.c:2973:2: error: unknown field 'private' specified in initializer

/root/drivers/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../os/linux/sta_ioctl.c:2973:2: warning: initialization from incompatible pointer type

/root/drivers/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../os/linux/sta_ioctl.c:2974:2: error: unknown field 'num_private' specified in initializer

/root/drivers/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../os/linux/sta_ioctl.c:2974:2: warning: excess elements in struct initializer

/root/drivers/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../os/linux/sta_ioctl.c:2974:2: warning: (near initialization for 'rt28xx_iw_handler_def')

/root/drivers/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../os/linux/sta_ioctl.c:2975:2: error: unknown field 'private_args' specified in initializer

/root/drivers/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../os/linux/sta_ioctl.c:2975:26: warning: excess elements in struct initializer

/root/drivers/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../os/linux/sta_ioctl.c:2975:26: warning: (near initialization for 'rt28xx_iw_handler_def')

/root/drivers/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../os/linux/sta_ioctl.c:2976:2: error: unknown field 'num_private_args' specified in initializer

/root/drivers/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../os/linux/sta_ioctl.c:2976:2: warning: excess elements in struct initializer

/root/drivers/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../os/linux/sta_ioctl.c:2976:2: warning: (near initialization for 'rt28xx_iw_handler_def')

make[2]: *** [/root/drivers/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../os/linux/sta_ioctl.o] Error 1

make[1]: *** [_module_/root/drivers/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux] Error 2

make[1]: Leaving directory `/usr/src/linux-2.6.36-gentoo-r5'

make: *** [LINUX] Error 2
```

----------

## fornix

I am having problems compiling RALIND Driver realeased on 20101216.

Anyone got this to work?

```
nanosoft 20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO # make

make -C tools

make[1]: Entering directory `/home/fornix/Download/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/tools'

gcc -g bin2h.c -o bin2h

make[1]: Leaving directory `/home/fornix/Download/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/tools'

/home/fornix/Download/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/tools/bin2h

cp -f os/linux/Makefile.6 /home/fornix/Download/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/Makefile

make -C /lib/modules/2.6.36-gentoo-r5/build SUBDIRS=/home/fornix/Download/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux modules

make[1]: Entering directory `/usr/src/linux-2.6.36-gentoo-r5'

  CC [M]  /home/fornix/Download/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../common/crypt_md5.o

  CC [M]  /home/fornix/Download/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../common/crypt_sha2.o

  CC [M]  /home/fornix/Download/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../common/crypt_hmac.o

  CC [M]  /home/fornix/Download/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../common/crypt_aes.o

  CC [M]  /home/fornix/Download/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../common/crypt_arc4.o

  CC [M]  /home/fornix/Download/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../common/mlme.o

/home/fornix/Download/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../common/mlme.c: In function 'MlmeResetRalinkCounters':

/home/fornix/Download/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../common/mlme.c:870: warning: cast from pointer to integer of different size

/home/fornix/Download/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../common/mlme.c:870: warning: cast from pointer to integer of different size

  CC [M]  /home/fornix/Download/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../common/cmm_wep.o

  CC [M]  /home/fornix/Download/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../common/action.o

  CC [M]  /home/fornix/Download/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../common/cmm_data.o

  CC [M]  /home/fornix/Download/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../common/rtmp_init.o

  CC [M]  /home/fornix/Download/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../common/cmm_tkip.o

  CC [M]  /home/fornix/Download/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../common/cmm_aes.o

  CC [M]  /home/fornix/Download/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../common/cmm_sync.o

  CC [M]  /home/fornix/Download/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../common/eeprom.o

  CC [M]  /home/fornix/Download/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../common/cmm_sanity.o

  CC [M]  /home/fornix/Download/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../common/cmm_info.o

  CC [M]  /home/fornix/Download/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../common/cmm_cfg.o

  CC [M]  /home/fornix/Download/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../common/cmm_wpa.o

  CC [M]  /home/fornix/Download/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../common/dfs.o

  CC [M]  /home/fornix/Download/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../common/spectrum.o

/home/fornix/Download/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../common/spectrum.c: In function 'PeerMeasureReportAction':

/home/fornix/Download/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../common/spectrum.c:1966: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int'

  CC [M]  /home/fornix/Download/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../common/rtmp_timer.o

  CC [M]  /home/fornix/Download/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../common/rt_channel.o

  CC [M]  /home/fornix/Download/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../common/cmm_profile.o

  CC [M]  /home/fornix/Download/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../common/cmm_asic.o

  CC [M]  /home/fornix/Download/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../common/cmm_cmd.o

  CC [M]  /home/fornix/Download/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../sta/assoc.o

  CC [M]  /home/fornix/Download/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../sta/auth.o

  CC [M]  /home/fornix/Download/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../sta/auth_rsp.o

  CC [M]  /home/fornix/Download/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../sta/sync.o

  CC [M]  /home/fornix/Download/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../sta/sanity.o

  CC [M]  /home/fornix/Download/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../sta/rtmp_data.o

  CC [M]  /home/fornix/Download/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../sta/connect.o

  CC [M]  /home/fornix/Download/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../sta/wpa.o

  CC [M]  /home/fornix/Download/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../sta/ags.o

  CC [M]  /home/fornix/Download/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../sta/sta_cfg.o

  CC [M]  /home/fornix/Download/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../common/rtmp_init_inf.o

  CC [M]  /home/fornix/Download/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../os/linux/rt_profile.o

  CC [M]  /home/fornix/Download/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../os/linux/sta_ioctl.o

/home/fornix/Download/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../os/linux/sta_ioctl.c:2973: error: unknown field 'private' specified in initializer

/home/fornix/Download/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../os/linux/sta_ioctl.c:2973: warning: initialization from incompatible pointer type

/home/fornix/Download/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../os/linux/sta_ioctl.c:2974: error: unknown field 'num_private' specified in initializer

/home/fornix/Download/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../os/linux/sta_ioctl.c:2974: warning: excess elements in struct initializer

/home/fornix/Download/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../os/linux/sta_ioctl.c:2974: warning: (near initialization for 'rt28xx_iw_handler_def')

/home/fornix/Download/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../os/linux/sta_ioctl.c:2975: error: unknown field 'private_args' specified in initializer

/home/fornix/Download/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../os/linux/sta_ioctl.c:2975: warning: excess elements in struct initializer

/home/fornix/Download/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../os/linux/sta_ioctl.c:2975: warning: (near initialization for 'rt28xx_iw_handler_def')

/home/fornix/Download/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../os/linux/sta_ioctl.c:2976: error: unknown field 'num_private_args' specified in initializer

/home/fornix/Download/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../os/linux/sta_ioctl.c:2976: warning: excess elements in struct initializer

/home/fornix/Download/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../os/linux/sta_ioctl.c:2976: warning: (near initialization for 'rt28xx_iw_handler_def')

make[2]: *** [/home/fornix/Download/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux/../../os/linux/sta_ioctl.o] Error 1

make[1]: *** [_module_/home/fornix/Download/20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO/os/linux] Error 2

make[1]: Leaving directory `/usr/src/linux-2.6.36-gentoo-r5'

make: *** [LINUX] Error 2

nanosoft 20101216_RT3090_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO # 

```

----------

## Cr0t

 *fornix wrote:*   

> I am having problems compiling RALIND Driver realeased on 20101216.
> 
> Anyone got this to work?
> 
> ```
> ...

 Nope.

----------

## thyrc

Sorry for reviving a rather old thread ...

Using the Ralink drivers on 2.6.35+ two things come to mind.

First, with .35 two functions where renamed by the kernel hackers:

usb_buffer_alloc() was renamed to usb_alloc_coherent()

usb_buffer_free()  was renamed to usb_free_coherent()

I don't know if these changes are already in the Ralink source for the rt3090 (for the rt2870 they are *not*), so you might have to change the include/os/rt_linux.h and os/linux/rt_usb_util.c files accordingly.

And second, since the Ralink drivers are still staging drivers, you'll need the staging headers to compile those drivers. For my rt2870 card, I just compiled the kernel with the corresponding staging module, compiled the Ralink drivers, and then removed the kernel's module and placed my own shiny new Ralink module in net/wireless instead.

```
ifconfig ra0 down

rmmod rt2870sta

rm /lib/modules/`uname -r`/kernel/drivers/staging/rt2870/rt2870sta.ko

mkdir -p /lib/modules/`uname -r`/kernel/drivers/net/wireless/

cp ./os/linux/rt2870sta.ko /lib/modules/`uname -r`/kernel/drivers/net/wireless/rt2870sta.ko

depmod -a

modprobe rt2870sta

ifconfig ra0 up
```

Just replace 'staging/rt2870' with 'staging/rt2860' (and change the module name as well, rt2860sta or rt3090sta?). If anyone needs the usb_buffer.patch (again for the rt2870, but it shouldn't be so hard to port it to the rt3090) PM me.

----------

## beguiledfoil

I am having the same problem as the original poster and cannot build the driver. Are the errors he reported fixed by having the staging headers?

If so is there any easy way to get those? I don't have a kernel with the corresponding staging module.

thanks

----------

## beguiledfoil

Hi, I got past the original compile errors (the ones cr0t posted) by including the intel 2200 drivers (Device Drivers=>Network Device Support=>Wireless LAN=>Intel PRO/Wireless 2200BG and 2915ABG Network Connection in menuconfig) in my kernel. I included them outright but they could probably have been modularized. This causes some define to be active which makes that structure have the fields it needs. I would love for an expert to explain exactly how this is supposed to be done, but including that driver is my workaround for now. I can't compile yet, but I think I just need to rename the usb buffer alloc functions and I'm off to the races.

----------

## Cr0t

 *beguiledfoil wrote:*   

> Hi, I got past the original compile errors (the ones cr0t posted) by including the intel 2200 drivers (Device Drivers=>Network Device Support=>Wireless LAN=>Intel PRO/Wireless 2200BG and 2915ABG Network Connection in menuconfig) in my kernel. I included them outright but they could probably have been modularized. This causes some define to be active which makes that structure have the fields it needs. I would love for an expert to explain exactly how this is supposed to be done, but including that driver is my workaround for now. I can't compile yet, but I think I just need to rename the usb buffer alloc functions and I'm off to the races.

 Does it work?

----------

## Cluster

 *beguiledfoil wrote:*   

> Hi, I got past the original compile errors (the ones cr0t posted) by including the intel 2200 drivers (Device Drivers=>Network Device Support=>Wireless LAN=>Intel PRO/Wireless 2200BG and 2915ABG Network Connection in menuconfig) in my kernel. I included them outright but they could probably have been modularized. This causes some define to be active which makes that structure have the fields it needs. I would love for an expert to explain exactly how this is supposed to be done, but including that driver is my workaround for now. I can't compile yet, but I think I just need to rename the usb buffer alloc functions and I'm off to the races.

 

How the heck did you figure that out?!  That was the key!  Cr0t, this is indeed the solution.  I am extremely happy to say that with the help of this thread (and a few others online) I got my wireless working under Linux kernel 2.6.37 (vanilla, Gentoo distro) on my new HP Pavilion dm1 laptop.

Steps to reproduce:

1) Use kernel 2.6.37 on x86_64 platform

2) Enable Intel 2200BG/2915 drivers (as a module is ok)

3) Download the latest Ralink driver RT5390PCIe (version 2.4.0.4 as of this writing) and extract it

4) Patch it with patches from here: https://build.opensuse.org/package/files?package=rt5390sta&project=driver%3Awireless

5) Compile. You will have warnings, but not errors!

6) Install the module. To avoid the scary-looking warning about netif_stop_queue, see comment #92 on this bug: https://bugs.gentoo.org/228553.  Note, I've not tried applying this patch myself, as I don't care about the warning.

7) Load the module into your running kernel. You should have a wlan# or ra0 interface. REJOICE.

Thanks again to everyone on this thread, and to ricardon of the Ubuntu Forums.

----------

## Cr0t

 *Cluster wrote:*   

>  *beguiledfoil wrote:*   Hi, I got past the original compile errors (the ones cr0t posted) by including the intel 2200 drivers (Device Drivers=>Network Device Support=>Wireless LAN=>Intel PRO/Wireless 2200BG and 2915ABG Network Connection in menuconfig) in my kernel. I included them outright but they could probably have been modularized. This causes some define to be active which makes that structure have the fields it needs. I would love for an expert to explain exactly how this is supposed to be done, but including that driver is my workaround for now. I can't compile yet, but I think I just need to rename the usb buffer alloc functions and I'm off to the races. 
> 
> How the heck did you figure that out?!  That was the key!  Cr0t, this is indeed the solution.  I am extremely happy to say that with the help of this thread (and a few others online) I got my wireless working under Linux kernel 2.6.37 (vanilla, Gentoo distro) on my new HP Pavilion dm1 laptop.
> 
> Steps to reproduce:
> ...

 Awesome dude! I will try it when I get home this evening. If this works you should write an ebuild for this this or a step by step intructions as a refrence for everyone.

----------

## thekraken

Cr0t,

Can I just ignore the x86_64 patch file if I'm running x86 architecture?  Will it still work?

EDIT: Wait...will this driver even compile at all in x86?  I might have gotten my hopes up too soon...

----------

## Cr0t

 *thekraken wrote:*   

> Cr0t,
> 
> Can I just ignore the x86_64 patch file if I'm running x86 architecture?  Will it still work?
> 
> EDIT: Wait...will this driver even compile at all in x86?  I might have gotten my hopes up too soon...

 I am at work right now and I am testing it on a x64 box. I wrote a script, which downloads all the required files, patches it and compiles& installs the module. I am unable to test the actual card yet, however I can test it on a different platform. Let me fire up another VM... I will look for a 32bit box. In the meantime this is the script...

```
12:20:30^root@gbox:~ > cat installrawifi.sh

#!/bin/bash

mkdir rawireless

cd rawireless

cat /usr/src/linux/.config | grep -i CONFIG_IPW2200 | head -1

echo downloading driver...

wget -q https://api.opensuse.org/public/source/driver:wireless/rt5390sta/2010_1216_RT5390_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO.tar.bz2

echo downloading patches...

wget -q https://api.opensuse.org/public/source/driver:wireless/rt5390sta/rt5390sta-2.4.0.4-WPA-mixed.patch

wget -q https://api.opensuse.org/public/source/driver:wireless/rt5390sta/rt5390sta-2.4.0.4-return_nonvoid_function.patch

wget -q https://api.opensuse.org/public/source/driver:wireless/rt5390sta/rt5390sta-2.4.0.4-remove-potential-conflicts-with-rt2860sta.patch

wget -q https://api.opensuse.org/public/source/driver:wireless/rt5390sta/rt5390sta-2.4.0.4-reduce_debug_output.patch

wget -q https://api.opensuse.org/public/source/driver:wireless/rt5390sta/rt5390sta-2.4.0.4-gcc-warnings-x86_64.patch

wget -q https://api.opensuse.org/public/source/driver:wireless/rt5390sta/rt5390sta-2.4.0.4-convert-devicename-to-wlanX.patch

wget -q https://api.opensuse.org/public/source/driver:wireless/rt5390sta/rt5390sta-2.4.0.4-config.patch

echo extracting driver...

tar xjpf 2010_1216_RT5390_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO.tar.bz2

cd 2010_1216_RT5390_LinuxSTA_V2.4.0.4_WiFiBTCombo_DPO

echo start patching...

patch -p0 < ../rt5390sta-2.4.0.4-WPA-mixed.patch

patch -p0 < ../rt5390sta-2.4.0.4-return_nonvoid_function.patch

patch -p0 < ../rt5390sta-2.4.0.4-remove-potential-conflicts-with-rt2860sta.patch

patch -p0 < ../rt5390sta-2.4.0.4-reduce_debug_output.patch

patch -p0 < ../rt5390sta-2.4.0.4-gcc-warnings-x86_64.patch

patch -p0 < ../rt5390sta-2.4.0.4-convert-devicename-to-wlanX.patch

patch -p0 < ../rt5390sta-2.4.0.4-config.patch

echo compile and install

make && make install && depmod -a
```

----------

## thekraken

I compiled and installed the drivers and patches with Fedora 14 32bit that I had on a flash drive and got no errors, just a few warnings.  Although the drivers in Fedora 14 compiled and installed just fine with no need for patches, i.e., the card works with Fedora with the drivers alone.  I also just ran your script for fun and got the same output, no errors, just some warnings and everything works fine.  Hopefully that's a sign of things to come when I attempt it on Gentoo later today.

----------

## Cr0t

I was able to install the driver, but if I load the driver my device does not get recognized.  :Sad: 

I checked all the logs, but nothing.

----------

## thekraken

Damn what a shame.  I'll try it on my box once gnome is emerged.  It's currently got x86 on it but hopefully I'll have better luck.  I'll post the results if anything positive happens.

----------

## thekraken

okay i don't know if this is a totally n00b suggestion but i just upgraded the kernel from 2.6.36 to 2.6.37 on my x86 box and the driver works fine now.  Here's how i did it, in case anyone needs to know:

echo " sys-kernel/gentoo-sources ~x86" >> /etc/portage/package.keywords

emerge -avuND world

Will get you 2.6.37.

For 2.6.38 you would need to use the git-sources.

edit: Just in case you don't know how to compile the new kernel. After the previous steps:

eselect kernel list

eselect kernel set * (whichever in the list was 2.6.37, should be the highest number)

cd /usr/src/linux

cp ../linux-2.6.36-r5/.config .

make oldconfig

make menuconfig (just to check the new config)

make && make modules_install

mount /boot (if you don't automount it, which you shouldn't)

cp arch/i386/boot/bzimage /boot/kernel-2.6.37-gentoo-r1 (currently 37-r1)

nano /boot/grub/menu.lst (or your editor of choice)

change the title and kernel lines to:

title Gentoo Linux 2.6.37-r1

kernel /boot/kernel-2.6.37-gentoo-r1 root=/dev/sd** (be sure to set root to the right device for you, not **)

recompile any modules that need to be recompiled

reboot

I thank cutchyacokov from reddit for the instructions.

----------

## Cr0t

You got the driver compiled& installed. If you run an iwconfig you see the device?

```
05:00.0 Network controller: RaLink RT3090 Wireless 802.11n 1T/1R PCIe

   Subsystem: Lite-On Communications Inc Device 6622

   Flags: bus master, fast devsel, latency 0, IRQ 9

   Memory at febf0000 (32-bit, non-prefetchable) [size=64K]

   Capabilities: [40] Power Management version 3

   Capabilities: [50] MSI: Enable- Count=1/32 Maskable- 64bit+

   Capabilities: [70] Express Endpoint, MSI 00

   Capabilities: [100] Advanced Error Reporting

   Capabilities: [140] Device Serial Number REMOVED_FOR_SECUTIRY
```

----------

## thekraken

yup. it works fine. for x86, just upgrade the kernel and follow the steps you suggested and it gets recognized and works

----------

## Cr0t

 *thekraken wrote:*   

> yup. it works fine. for x86, just upgrade the kernel and follow the steps you suggested and it gets recognized and works

 What model do you have? Run an 'lspci -v'

----------

## thekraken

```
02:00.0 Class 0280: 1814:3090

   Subsystem: 1a3b:1087

   Flags: bus master, fast devsel, latency 0, IRQ 17

   Memory at fbff0000 (32-bit, non-prefetchable) [size=64K]

   Capabilities: [40] Power Management version 3

   Capabilities: [50] Message Signalled Interrupts: 64bit+ Queue=0/5 Enable-

   Capabilities: [70] #10 [0002]

```

that's the wireless card i'm pretty sure.  the exact model in english is RT3090 Wireless 802.11n 1T/1R PCIe[/code]

----------

## akadaedalus

 *beguiledfoil wrote:*   

> Hi, I got past the original compile errors (the ones cr0t posted) by including the intel 2200 drivers (Device Drivers=>Network Device Support=>Wireless LAN=>Intel PRO/Wireless 2200BG and 2915ABG Network Connection in menuconfig) in my kernel. I included them outright but they could probably have been modularized. This causes some define to be active which makes that structure have the fields it needs. I would love for an expert to explain exactly how this is supposed to be done, but including that driver is my workaround for now.

 

I'm not an expert but there appears to be some legacy code written between "#ifdef CONFIG_WIRELESS_EXT" statements in the kernel.  The intel driver sets that config variable among others.  This may mean breakage, I am under the impression that that is deprecated code.

very maddening.  The 2.6.38 kernel does have a working driver (rt2800pci) but I can't get the silly LED to stop blinking so I'm trying the rt3090 driver to see if it helps.

----------

## werzer

Good day!

 *Cr0t wrote:*   

>  *thekraken wrote:*   Cr0t,
> 
> Can I just ignore the x86_64 patch file if I'm running x86 architecture?  Will it still work?
> 
> EDIT: Wait...will this driver even compile at all in x86?  I might have gotten my hopes up too soon... I am at work right now and I am testing it on a x64 box. I wrote a script, which downloads all the required files, patches it and compiles& installs the module. I am unable to test the actual card yet, however I can test it on a different platform. Let me fire up another VM... I will look for a 32bit box. In the meantime this is the script...
> ...

 

I have executed your commands, but have got error:

hpwork tmp # modprobe rt5390sta

hpwork tmp # dmesg

[ 1401.657903] rt5390 0000:02:00.0: setting latency timer to 64

[ 1401.658399] <-- RTMPAllocAdapterBlock, Status=0

[ 1402.619085] KH: Use High Memory for Beacon

[ 1402.623111] <-- RTMPAllocTxRxRingMemory, Status=0

[ 1402.626559] ERROR!!! RTMPReadParametersHook failed, Status[=0x00000001]

[ 1402.654646] KH: Use High Memory for Beacon

[ 1402.658664] <-- RTMPAllocTxRxRingMemory, Status=0

[ 1402.662275] ERROR!!! RTMPReadParametersHook failed, Status[=0x00000001]

[ 1402.742960] KH: Use High Memory for Beacon

[ 1402.747051] <-- RTMPAllocTxRxRingMemory, Status=0

[ 1402.750512] ERROR!!! RTMPReadParametersHook failed, Status[=0x00000001]

How to solve this problem?

----------

## werzer

Anybody helps me?

 *Quote:*   

> 
> 
> hpwork ~ # lspci  | grep -i ralink
> 
> 02:00.0 Network controller: RaLink Device 539f
> ...

 

 *Quote:*   

> 
> 
> hpwork ~ # uname -a
> 
> Linux hpwork 2.6.36-gentoo-r8 #1 SMP Mon Mar 28 22:37:09 MSD 2011 x86_64 AMD E-350 Processor AuthenticAMD GNU/Linux
> ...

 

----------

## Cr0t

The latest driver, which came with the kernel fixed the issue for me! WOOT.

----------

## mani001

Hi,

is anyone there yet?  :Smile: 

I'm trying to make this work with kernel 2.6.38 and following Cr0t steps, I get the module to compile and load into kernel, and the device is thus recognized. For example, lspci -v gives

```

02:00.0 Network controller: RaLink Device 539f

        Subsystem: Hewlett-Packard Company Device 1637

        Flags: bus master, fast devsel, latency 0, IRQ 17

        Memory at f0100000 (32-bit, non-prefetchable) [size=64K]

        Capabilities: [40] Power Management version 3

        Capabilities: [50] MSI: Enable- Count=1/32 Maskable- 64bit+

        Capabilities: [70] Express Endpoint, MSI 00

        Capabilities: [100] Advanced Error Reporting

        Capabilities: [140] Device Serial Number 00-00-52-7f-38-da-f8-c0

        Kernel driver in use: rt5390

        Kernel modules: rt5390sta

```

which I assume is ok. However, it seems the card is not able to detect any access points (which I know for sure there are). Do you have any special option set in the kernel? I have in "Networking Support" -> "Wireless":

cfg80211 - wireless configuration API

enable powersave by default

cfg80211 wireless extensions compatibility

Wireless extensions sysfs files

Common routines for IEEE802.11 drivers

Generic IEEE 802.11 Networking Stack (mac80211)

isn't that enough? do you have anything else?

Greetings!!

----------

## Cr0t

I am just using the internal kernel driver. No special flags. This is what I have in my kernel. (sorry about the crappy presentation)...

```
  │ │                                                      --- Wireless                                                                                                                 │ │  

  │ │                                                      <M>   cfg80211 - wireless configuration API                                                                                  │ │  

  │ │                                                      [ ]     nl80211 testmode command                                                                                             │ │  

  │ │                                                      [ ]     enable developer warnings                                                                                            │ │  

  │ │                                                      [ ]     cfg80211 regulatory debugging                                                                                        │ │  

  │ │                                                      [*]     enable powersave by default                                                                                          │ │  

  │ │                                                      [*]     cfg80211 wireless extensions compatibility                                                                           │ │  

  │ │                                                      [*]   Wireless extensions sysfs files                                                                                        │ │  

  │ │                                                      {M}   Common routines for IEEE802.11 drivers                                                                                 │ │  

  │ │                                                      [ ]   lib80211 debugging messages                                                                                            │ │  

  │ │                                                      <M>   Generic IEEE 802.11 Networking Stack (mac80211)                                                                        │ │  

  │ │                                                            Default rate control algorithm (Minstrel)  --->                                                                        │ │  

  │ │                                                      [*]   Enable mac80211 mesh networking (pre-802.11s) support                                                                  │ │  

  │ │                                                      [*]   Enable LED triggers                                                                                                    │ │  

  │ │                                                      [ ]   Select mac80211 debugging features  --->     

  │ │                                                      --- Wireless LAN                                                                                                             │ │  

  │ │                                                      < >   Marvell 8xxx Libertas WLAN driver support with thin firmware                                                           │ │  

  │ │                                                      < >   Cisco/Aironet 34X/35X/4500/4800 ISA and PCI cards                                                                      │ │  

  │ │                                                      < >   Atmel at76c50x chipset  802.11b support                                                                                │ │  

  │ │                                                      < >   Atmel at76c503/at76c505/at76c505a USB cards                                                                            │ │  

  │ │                                                      < >   Intersil Prism GT/Duette/Indigo PCI/Cardbus (DEPRECATED)                                                               │ │  

  │ │                                                      < >   USB ZD1201 based Wireless device support                                                                               │ │  

  │ │                                                      < >   Wireless RNDIS USB support                                                                                             │ │  

  │ │                                                      < >   Realtek 8180/8185 PCI support                                                                                          │ │  

  │ │                                                      < >   Realtek 8187 and 8187B USB support                                                                                     │ │  

  │ │                                                      < >   ADMtek ADM8211 support                                                                                                 │ │  

  │ │                                                      < >   Simulated radio testing tool for mac80211                                                                              │ │  

  │ │                                                      < >   Marvell 88W8xxx PCI/PCIe Wireless support                                                                              │ │  

  │ │                                                      < >   Atheros Wireless Cards  --->                                                                                           │ │  

  │ │                                                      < >   Broadcom 43xx wireless support (mac80211 stack)                                                                        │ │  

  │ │                                                      < >   Broadcom 43xx-legacy wireless support (mac80211 stack)                                                                 │ │  

  │ │                                                      < >   IEEE 802.11 for Host AP (Prism2/2.5/3 and WEP/TKIP/CCMP)                                                               │ │  

  │ │                                                      <M>   Intel PRO/Wireless 2100 Network Connection                                                                             │ │  

  │ │                                                      [*]     Enable promiscuous mode                                                                                              │ │  

  │ │                                                      [ ]     Enable full debugging output in IPW2100 module.                                                                      │ │  

  │ │                                                      < >   Intel PRO/Wireless 2200BG and 2915ABG Network Connection                                                               │ │  

  │ │                                                      [ ]   Full debugging output for the LIBIPW component                                                                         │ │  

  │ │                                                      < >   Intel Wireless WiFi Next Gen AGN - Wireless-N/Advanced-N/Ultimate-N (iwlagn)                                           │ │  

  │ │                                                      < >   Intel Wireless WiFi 4965AGN (iwl4965)                                                                                  │ │  

  │ │                                                      < >   Intel PRO/Wireless 3945ABG/BG Network Connection (iwl3945)                                                             │ │  

  │ │                                                      < >   Marvell 8xxx Libertas WLAN driver support                                                                              │ │  

  │ │                                                      < >   Hermes chipset 802.11b support (Orinoco/Prism2/Symbol)                                                                 │ │  

  │ │                                                      < >   Softmac Prism54 support                                                                                                │ │  

  │ │                                                      <M>   Ralink driver support  --->  

  │ │                                                      --- Ralink driver support                                                                                                    │ │  

  │ │                                                      < >   Ralink rt2400 (PCI/PCMCIA) support                                                                                     │ │  

  │ │                                                      < >   Ralink rt2500 (PCI/PCMCIA) support                                                                                     │ │  

  │ │                                                      < >   Ralink rt2501/rt61 (PCI/PCMCIA) support                                                                                │ │  

  │ │                                                      <M>   Ralink rt27xx/rt28xx/rt30xx (PCI/PCIe/PCMCIA) support                                                                  │ │  

  │ │                                                      [*]     rt2800pci - Include support for rt33xx devices (EXPERIMENTAL)                                                        │ │  

  │ │                                                      [ ]     rt2800pci - Include support for rt35xx devices (EXPERIMENTAL)                                                        │ │  

  │ │                                                      [ ]     rt2800-pci - Include support for rt53xx devices (EXPERIMENTAL)                                                       │ │  

  │ │                                                      < >   Ralink rt2500 (USB) support                                                                                            │ │  

  │ │                                                      < >   Ralink rt2501/rt73 (USB) support                                                                                       │ │  

  │ │                                                      < >   Ralink rt27xx/rt28xx/rt30xx (USB) support                                                                              │ │  

  │ │                                                      [ ]   Ralink debug output  
```

----------

## mani001

Hi there Cr0t...and thanks for the fast reply!!

I was assuming you had an r5390 card (at least, that's the one that came with my HP Pavilion DM1)...but it's not so, isn't it? (you enabled "rt33xx" in the kernel). Also, I'm guessing that you're using kernel 2.6.39, right? I'm just saying because I'm using 2.6.38 and I don't have "rt2800-pci - Include support for rt53xx devices" in my kernel (I have "rt2800pci - Include support for rt33xx devices", though).

EDIT: ok you have an rt3090...according to the title of the post    :Very Happy: 

Greetings.

----------

## Cr0t

```
05:00.0 Network controller: RaLink RT3090 Wireless 802.11n 1T/1R PCIe

   Subsystem: Lite-On Communications Inc Device 6622

   Kernel driver in use: rt2800pci

   Kernel modules: rt2800pci

Linux moviebox 2.6.39-gentoo-r1 #1 SMP Sun Jun 12 18:38:06 EDT 2011 x86_64 Intel(R) Atom(TM) CPU 330 @ 1.60GHz GenuineIntel GNU/Linux
```

----------

## mani001

I tried the rt5090 driver inside kernel 2.6.39...and it doesn't work. It doesn't even recognize the card. I guess it shouldn't come as a surprise since in the help for that driver it is clearly stated that the driver is not functional   :Sad: 

Also, I tried again the driver provided by ralink and when loading the driver dmesg shows:

```

[ 5540.057422] rt5390 0000:02:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17

[ 5540.057721] rt5390 0000:02:00.0: setting latency timer to 64

[ 5540.058521] <-- RTMPAllocAdapterBlock, Status=0

[ 5540.130413] KH: Use High Memory for Beacon

[ 5540.134582] <-- RTMPAllocTxRxRingMemory, Status=0

[ 5540.146461] ERROR!!! RTMPReadParametersHook failed, Status[=0x00000001]

[ 5540.157470] KH: Use High Memory for Beacon

[ 5540.161972] <-- RTMPAllocTxRxRingMemory, Status=0

[ 5540.167207] ERROR!!! RTMPReadParametersHook failed, Status[=0x00000001]

```

That doesn't look good   :Confused: 

----------

## mani001

Just in case someone else comes across my problem:

```

cp RT2860STA.dat RT5390STA.dat

mkdir -p /etc/Wireless/RT5390STA

cp RT5390STA.dat /etc/Wireless/RT5390STA

```

did the trick (taken from http://ubuntuforums.org/showthread.php?p=10907391 )

----------

## gent0_0

mani001, I have that same laptop with 5390 card, I don't get what trick are you talking about, can you be more specific?

to debug my case: http://paste.pocoo.org/show/466589/

Cheers,

----------

## mani001

Hi there,

I followed exactly the steps given in the Ubuntu forums but I noticed that we are using different versions of the driver released by Ralink... Were you able to apply the same set of patches successfully? First, I'd try with the old driver (version 2.4.0.4) since it's working perfectly for me. If you can't find it anywhere maybe I can send it to you. Let me know how it goes.

Cheers!!

----------

## gent0_0

mani001 I use other clean way.

How a card ralink 5390 (same card inside HP Pavilion dm1...) can work on gentoo:

1- Compile a kernel with that driver (rt2800pci - Include support for rt53xx device). I use the version 3.0.3

2- Emerge linux-firmware (Latest version installed: 20110731)

3-  :Very Happy: 

----------

## mani001

mmmmm...it's good to know that also works  :Smile:  Before the "dirty" approach, I also tried including that in-kernel driver but it didn't work and in the help you can read "Support for these devices is non-functional" :-S Anyway, it was kernel 2.6.39 and I didn't install linux-firmware, so maybe that was the real reason.

Greetings!!

----------

