# ralink rt73 and kernel 2.6.22

## gab74

My notebook has a RALINK RT73 usb wireless

Searching on internet i found that i must use rt2x00 with USE="rt73usb"

After some modifications in the source code

```

You need to make 2 modifications to get it to build

In file rt2x00mac.c change "rt2x00dev->interface.id," to "//rt2x00dev->interface.id," on line 60 and 64

Add a missing definition to rt2x00.h with;

echo '#define IEEE80211_TXCTL_LONG_RETRY_LIMIT (1<<10)' >> rt2x00.h

```

and using

 ebuild /usr/portage/net-wireless/rt2x00/rt2x00-9999.ebuild compile

i compile successfully but

when i install

 ebuild /usr/portage/net-wireless/rt2x00/rt2x00-9999.ebuild install

i receive this error :

```

>>> WORKDIR is up-to-date, keeping...

>>> It appears that 'rt2x00-9999' is already compiled; skipping.

>>> Remove '/var/tmp/portage/net-wireless/rt2x00-9999/.compiled' to force compilation.

>>> It appears that rt2x00 has already been tested; skipping.

>>> Install rt2x00-9999 into /var/tmp/portage/net-wireless/rt2x00-9999/image/ category net-wireless

 * Installing 80211 module

install: cannot stat `80211.ko': No such file or directory

!!! ERROR: net-wireless/rt2x00-9999 failed.

Call stack:

  ebuild.sh, line 1638:   Called dyn_install

  ebuild.sh, line 1083:   Called qa_call 'src_install'

  ebuild.sh, line 44:   Called src_install

  rt2x00-9999.ebuild, line 138:   Called linux-mod_src_install

  linux-mod.eclass, line 546:   Called die

```

How can i install the ralink RT73 USB in gentoo ???

----------

## NeddySeagoon

gab74,

I have a plug in RT73 wireless dongle. You can get my net-wireless overlay here where you need the entire net-wireless directory.

It will build against 2.6.22-gentoo-r5 and -r6, associate with the AP but never pass any data.

Testing with 2.6.23-r5 shows it now associates, gets an IP address with dhcp and passes a very small amount of data before it stops working. I don't know what breaks yet but a /etc/init.d/wlan0 restart fixes it to allwo the cycle to repeat.

In short, its not usable.

Feel free to play.

----------

## gab74

So this mean that for the moment ralink rt73 doesent work on gentoo. ??

----------

## NeddySeagoon

gab74,

Not at all. It means its not working with rt2x00 and kernel 2.6.22 and possibly 2.6.23 (its not out yet) for anybody.

It works with earlier kernels and other drivers. I have not used it since 2.6.17, and it was fine there.

Its not a Gentoo issue - its a kernel and drivers issue. Its true on all distros.

You may want to try ndiswrapper and the Windows drivers, if you cannot use older kernels

----------

## gab74

Ok but Does it work with ndwrapper and windows driver on gentoo 2.6.22 R5 ???

----------

## NeddySeagoon

gab74,

rt2x00 and kernel 2.6.23-rc6 seems to work for me.  That kernel breaks other things, like vmware and nvidia drivers but I don't think that was entirely unexpected.

I don't know about ndiswrapper today. It used to work with earlier kernels.

----------

## gab74

PLease can you tell me howto compile the driver under kernel 2.6.23

important the KERNEL config about wireless stack.....

----------

## NeddySeagoon

gab74,

Where to start ...

Make a new directory called /home/<user>/kernel-2.6.23-rc6

Fetch the 2.6.22 source and the 2.6.23-rc6 patchfiles from kernel.org.

Unpack the 2.6.22 source

Uncompress the patch

Apply the patch to the kernel with 

```
patch -p1 2.6.23-rc6-patch
```

At this stage you have the sources for 2.6.23-rc6 and can configure and build them in the normal way.

I don't use genkernel, so I don't know if it works. I will know nothing of the new options though. 

Under [*] Networking support

```
 Wireless  ---> 

  │ │    <M> Improved wireless configuration API                        │ │  

  │ │    --- Wireless extensions                                        │ │  

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

If your laptop has an RF button, to turn off the transmitter, you will need

RF switch subsystem support  ---> 

Read the help about that and its suboptions ... my dongle has no such button

Under  Wireless LAN, choose 

 [*] Wireless LAN (IEEE 802.11)

Set your /usr/src/linux symlink to point to the kernel tree

With the kernel installed and running, you can emerge my patched rt2x00 against it, then set up wireless networking in the normal way 

So far, I have only tested an unencrypted link.

----------

## jstead1

Using a ralink rt73 usb adapter with the kernel driver (2.6.24), and they work great.

Don't forget to set both RT73USB and RT2500PCI, you need both (at least I did and serial monkey says so).

```
CONFIG_RT2X00=m

# CONFIG_RT2400PCI is not set

CONFIG_RT2500PCI

# CONFIG_RT61PCI is not set

# CONFIG_RT2500USB is not set

CONFIG_RT73USB
```

----------

## lindegur

What I'm I doing wrong  :Question: 

I do not find the rt2x00 driver in my kernel sources. Currently I'm using the gentoo sources 2.6.25-r7 but I can not find it  :Rolling Eyes: 

In the past I used the rt2x00 in portage successfully, but then I run in problems. As far as I remember the source disappeared from the seamonkey site, since they where waiting to move it to the kernel and had ported the source to GIT. This caused the ebuild to  fail. Since then, I wait for a kernel where I can select the rt2x00 driver.

Now rt2x00 seems back in portage but it should be also in the kernel.

I would prefer to use the one from the kernel, but obviously for that reason I must be able to select it  :Rolling Eyes: 

Or is it better to go with the portage rt2x00  :Question: 

```
cat .config | grep RT7    
```

or similar things, show nothing, but I found rndis_wlan that looks similar to the rt2x00 drivers   :Rolling Eyes: 

Of course when I 

```
make menuconfig
```

 I can select other the experimental drivers.

SORRY I Found the solution

I had in the network section Generic IEEE 802.11 Networking Stack (DEPRECATED) selected instead of Generic IEEE 802.11 Networking Stack (mac80211).

----------

## lindegur

Since I have an USB device I compiled a kernel just with rt73usb and it did not work.  :Crying or Very sad: 

Then I followed the advice of jstead1 to include rt2500pci too (even not having anything with PCI)  :Rolling Eyes: 

After

```
modprobe rt73usb

modprobe rt2500pci
```

I was able to see my WLAN access point after typing in the following commands  :Laughing:  

```
ifconfig wlan0 down

iwconfig wlan0 mode managed

iwconfig wlan0 essid Hello

iwconfig wlan0 channel 11 

ifconfig wlan0 up

iwlist wlan0 scan
```

So it looks that rt2500pci is really a must.  :Wink: 

Now I can go for the detail setup. 

Thanks for the hint!

----------

