# rt2500 with kernel 2.6.22 [solved]

## Timmer

Okay, so after pouring over the forums for the last hour or so, I think I've managed to make myself more confused than when I started.

I emerge gentoo-sources-2.6.22 today (on amd64) and then did a module-rebuild rebuild, and the rt2500 driver complained that CONFIG_NET_RADIO wasn't enabled in the new kernel.  I grepped it and it wasn't even an option anymore.  So then I looked around, and I saw some things on the forums saying that I should really be using the rt2x00 drivers, and that as of the 2.6.22 kernel, they were included in the kernel as a mac80211 thing.  

So I went back to menuconfig, enabled mac80211 support, maked, etc. , rebooted, and had no internet.  I wasn't really surprised, since I didn't ever configure anything, but there was no indication of what to configure.  And after a ifconfig -a revealed that all i had for network connections were lo and dummy0, I figured I'd done something wrong.

So then I decided i'd go back to the 2.6.21 kernel and do the intermediary step of using rt2x00 instead of rt2500.  That build failed with an error about mac80211 not being activated in the kernel, so I went back to the kernel, enabled the macsoft, and it gave me the same error.  The mac hardware wasn't an option.

So then I decided that since it was an option in the 2.6.22 kernel, I'd give that a shot, but then rt2x00 requested CONFIG_NET_RADIO, which was the beginning of all this trouble in the first place.

So I'm wondering how on earth I'm actually supposed to get all this working together.Last edited by Timmer on Tue Jul 17, 2007 12:02 am; edited 1 time in total

----------

## UB|K

hi,

the 2.6.22 kernel comes with a new wireless stack: the option "NET_RADIO" as just disappeared.

So if you edit the ebuild and comment out:

```
CONFIG_CHECK="NET_RADIO"
```

it should build fine if your kernel is correctly configured with the new wireless options...

For your problems with 2.6.21, it's just normal: in the README that comes with the rt2x00 package (9999 version aka cvs version) it says:

 *Quote:*   

> The minimal required kernel version is 2.6.22-rc1

 

I'm building gentoo-sources-2.6.22 atm and i'll also try to build rt2x00, i'll post feedbacks here when it's done, good luck!

edit: i removed CONFIG_CHECK="NET_RADIO" from the ebuild and it still fails.

I also tried to build the daily cvs package directly from serialmonkey's site, it builds ok but the drivers doesn't (fails to associate AP).

Bad luck... i'll stay with a 2.6.20 kernel and the legacy rt61 driver.

----------

## trolley

I get this:

```

>>> Compiling source in /var/tmp/portage/net-wireless/rt2x00-9999/work/rt2x00-9999 ...

 * Preparing 80211 module

  CC [M]  /var/tmp/portage/net-wireless/rt2x00-9999/work/rt2x00-9999/rt2500usb.o

  CC [M]  /var/tmp/portage/net-wireless/rt2x00-9999/work/rt2x00-9999/rt2x00usb.o

  CC [M]  /var/tmp/portage/net-wireless/rt2x00-9999/work/rt2x00-9999/rt2x00dev.o

  CC [M]  /var/tmp/portage/net-wireless/rt2x00-9999/work/rt2x00-9999/rt2x00mac.o

  LD [M]  /var/tmp/portage/net-wireless/rt2x00-9999/work/rt2x00-9999/rt2x00lib.o

  Building modules, stage 2.

  MODPOST 3 modules

  CC      /var/tmp/portage/net-wireless/rt2x00-9999/work/rt2x00-9999/rt2500usb.mod.o

  CC      /var/tmp/portage/net-wireless/rt2x00-9999/work/rt2x00-9999/rt2x00lib.mod.o

  CC      /var/tmp/portage/net-wireless/rt2x00-9999/work/rt2x00-9999/rt2x00usb.mod.o

  LD [M]  /var/tmp/portage/net-wireless/rt2x00-9999/work/rt2x00-9999/rt2500usb.ko

  LD [M]  /var/tmp/portage/net-wireless/rt2x00-9999/work/rt2x00-9999/rt2x00lib.ko

  LD [M]  /var/tmp/portage/net-wireless/rt2x00-9999/work/rt2x00-9999/rt2x00usb.ko

>>> Source compiled.

>>> Test phase [not enabled]: net-wireless/rt2x00-9999

>>> 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

```

----------

## username234

 *trolley wrote:*   

> I get this:
> 
> ```
> 
> >>> Compiling source in /var/tmp/portage/net-wireless/rt2x00-9999/work/rt2x00-9999 ...
> ...

 

Try emerge --sync, (I read that portage has been updated to correct this problem) and then try again, if that doesn't work download the drivers from here

----------

## trolley

Using the standard ebuild fails because of the check for CONFIG_NET_RADIO which no longer exists.

----------

## johannis

I also have an RT2500 wireless chip and I'm running gentoo-sources-2.6.22 at this moment.

I used the rt2500 legacy driver:

"CVS hourly tarball: rt2500-CVS"

from http://rt2x00.serialmonkey.com/wiki/index.php/Downloads.

I followed the instructions in the README file:

 *Quote:*   

> a. $tar -xvzf rt2500-x.x.x.tar.gz
> 
>     go to "./rt2500-x.x.x/Module" directory.
> 
> b. $make                # compile driver source code
> ...

 

Be sure that you do this while you are already running the 2.6.22 kernel! Otherwise the old kernel will be used and the module will be compiled for your old kernel.

After this run:

```
update-modules

modprobe rt2500      

/etc/init.d/net.ra0 start

```

and you are connected again  :Very Happy:  .

I know: this is not a real "Gentoo solution" but it works (as long as there is no updated ebuild to fix the problem).

----------

## Psycho Dad

 *Quote:*   

> I know: this is not a real "Gentoo solution" but it works (as long as there is no updated ebuild to fix the problem).

 

Now an updated rt2500 ebuild that works with 2.6.22 is in portage.

----------

## trolley

Not for me:

```

>>> Emerging (1 of 1) net-wireless/rt2x00-9999 to /

 * checking ebuild checksums ;-) ...                                                                                                                   [ ok ]

 * checking auxfile checksums ;-) ...                                                                                                                  [ ok ]

 * checking miscfile checksums ;-) ...                                                                                                                 [ ok ]

>>> cfg-update-1.8.2-r1: Checksum index is up-to-date ...

 * Determining the location of the kernel source code

 * Found kernel source directory:

 *     /usr/src/linux

 * Found kernel object directory:

 *     /lib/modules/2.6.22-gentoo-r1/build

 * Found sources for kernel version:

 *     2.6.22-gentoo-r1

 * Checking for suitable kernel configuration options...

 *   rt2x00-9999 requires support for Wireless LAN drivers (non-hamradio) & Wireless Extensions (CONFIG_NET_RADIO).

 * Please check to make sure these options are set correctly.

 * Failure to do so may cause unexpected problems.

 * Once you have satisfied these options, please try merging

 * this package again.

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

Call stack:

  ebuild.sh, line 1637:   Called dyn_setup

  ebuild.sh, line 704:   Called qa_call 'pkg_setup'

  ebuild.sh, line 44:   Called pkg_setup

  rt2x00-9999.ebuild, line 60:   Called linux-mod_pkg_setup

  linux-mod.eclass, line 464:   Called linux-info_pkg_setup

  linux-info.eclass, line 572:   Called check_extra_config

  linux-info.eclass, line 471:   Called die

!!! Incorrect kernel configuration options

!!! If you need support, post the topmost build error, and the call stack if relevant.

!!! A complete build log is located at '/var/tmp/portage/net-wireless/rt2x00-9999/temp/build.log'.

```

----------

## Naib

 *trolley wrote:*   

> Not for me:
> 
> ```
> 
> >>> Emerging (1 of 1) net-wireless/rt2x00-9999 to /
> ...

 

Thats cause you are using the beta rt2x00 drivers, and ppl here are talking abt the rt2500

The rt2x00 development is pretty much on hold atm as the webby says as the lead dev's take a break to sort real-world stuff out to then hit development hard to get the final bits done to get the source accepted into the kernel tree (wooHoo). Search the rt2x00 forums, since I think only one person is actively dev'ing atm (more house-keeping with little-patch's) there may be a workaround, or he may be abt to push a new cvs out

----------

## trolley

Ah, sorry for the confusion.

----------

## Psycho Dad

Yeah, I meant the rt2500-legacy-driver that was mentioned in the post before my post.

For this legacy driver a stable ebuild based on the CVS-snapshot from yesterday was added to the portage tree yesterday.

----------

## Timmer

Okay, just finished my daily emerge -u world, and the new legacy driver's working for me.  So the solution is to use the new  legacy driver in portage (net-wireless/rt2500-1.1.0_pre2007071515).  Thanks for all the help guys - but I suppose we just had to be patient.   :Smile: 

----------

## antiflag1980

I'm having the same problem with acx, I'll try getting rid of the config_check.

----------

## antiflag1980

Doesn't work, I get this, any ideas? I should have probably started my own thread since this one is tagged solved.  Edit: Okay nevermind I did start my own thread.

```
# emerge acx

Calculating dependencies... done!

>>> Verifying ebuild Manifests...

>>> Emerging (1 of 1) net-wireless/acx-0.3.35_p20070101 to /

 * acx-20070101.tar.bz2 MD5 ;-) ...                                       [ ok ]

 * acx-20070101.tar.bz2 RMD160 ;-) ...                                    [ ok ]

 * acx-20070101.tar.bz2 SHA1 ;-) ...                                      [ ok ]

 * acx-20070101.tar.bz2 SHA256 ;-) ...                                    [ ok ]

 * acx-20070101.tar.bz2 size ;-) ...                                      [ ok ]

 * checking ebuild checksums ;-) ...                                      [ ok ]

 * checking auxfile checksums ;-) ...                                     [ ok ]

 * checking miscfile checksums ;-) ...                                    [ ok ]

 * checking acx-20070101.tar.bz2 ;-) ...                                  [ ok ]

 * Determining the location of the kernel source code

 * Found kernel source directory:

 *     /usr/src/linux

 * Found sources for kernel version:

 *     2.6.22-gentoo-r1

 * Checking for suitable kernel configuration options...                  [ ok ]

>>> Unpacking source...

>>> Unpacking acx-20070101.tar.bz2 to /var/tmp/portage/net-wireless/acx-0.3.35_p20070101/work

>>> Source unpacked.

>>> Compiling source in /var/tmp/portage/net-wireless/acx-0.3.35_p20070101/work/acx-20070101 ...

 * Preparing acx module

make: Entering directory `/usr/src/linux-2.6.22-gentoo-r1'

  CC [M]  /var/tmp/portage/net-wireless/acx-0.3.35_p20070101/work/acx-20070101/wlan.o

  CC [M]  /var/tmp/portage/net-wireless/acx-0.3.35_p20070101/work/acx-20070101/conv.o

  CC [M]  /var/tmp/portage/net-wireless/acx-0.3.35_p20070101/work/acx-20070101/ioctl.o

  CC [M]  /var/tmp/portage/net-wireless/acx-0.3.35_p20070101/work/acx-20070101/common.o

  CC [M]  /var/tmp/portage/net-wireless/acx-0.3.35_p20070101/work/acx-20070101/pci.o

  CC [M]  /var/tmp/portage/net-wireless/acx-0.3.35_p20070101/work/acx-20070101/usb.o

/var/tmp/portage/net-wireless/acx-0.3.35_p20070101/work/acx-20070101/pci.c: In function acxpci_e_open:

/var/tmp/portage/net-wireless/acx-0.3.35_p20070101/work/acx-20070101/pci.c:2107: warning: deprecated_irq_flag is deprecated (declared at include/linux/interrupt.h:66)

/var/tmp/portage/net-wireless/acx-0.3.35_p20070101/work/acx-20070101/common.c: In function acx_l_rxmonitor:

/var/tmp/portage/net-wireless/acx-0.3.35_p20070101/work/acx-20070101/common.c:2757: error: struct sk_buff has no member named mac

make[1]: *** [/var/tmp/portage/net-wireless/acx-0.3.35_p20070101/work/acx-20070101/common.o] Error 1

make: *** [_module_/var/tmp/portage/net-wireless/acx-0.3.35_p20070101/work/acx-20070101] Error 2

make: Leaving directory `/usr/src/linux-2.6.22-gentoo-r1'

 * 

 * ERROR: net-wireless/acx-0.3.35_p20070101 failed.

 * Call stack:

 *   ebuild.sh, line 1647:   Called dyn_compile

 *   ebuild.sh, line 988:   Called qa_call 'src_compile'

 *   ebuild.sh, line 44:   Called src_compile

 *   ebuild.sh, line 1327:   Called linux-mod_src_compile

 *   linux-mod.eclass, line 516:   Called die

 * 

 * Unable to make  -C /usr/src/linux SUBDIRS=/var/tmp/portage/net-wireless/acx-0.3.35_p20070101/work/acx-20070101 modules.

 * If you need support, post the topmost build error, and the call stack if relevant.

 * A complete build log is located at '/var/tmp/portage/net-wireless/acx-0.3.35_p20070101/temp/build.log'.

 * 

```

----------

## momesana

I've tried them all. They are all buggy and shitty. rt61 causes a kernel BUG at timer.h. the ebuild for ralink-rt61 doesn't build with kernel 2.6.22. The rt2x00 ebuild ist broken as well and the manually compiled version has a SERIOUS problem. after the link goes down, it can't be broght up again. That cause me a lot of headache until I read the README to the button:

 *serialmonkey readme wrote:*   

> 
> 
> ===================
> 
>  10.2: BUG - ifdown & ifup radio failure
> ...

 

If that is not a serious Bug I don't know what is. Only a Kernel panic comes next. Whateva, a driver that requires you to restart the computer after the link goes away, shouldn't call itself driver. After becoming REALLY frustrated I went to the ralink website ... I had tried their drivers before and had some issues with them but I checked the website anyway and found some bright new shiny kernel drivers ... that are right now no more than 4 days old. downloaded them, built them and tried to load them ... It didn't work  :Sad: 

Error:

WARNING: "pci_module_init" [/home/momesana/Desktop/IS_Linux_STA_6x_D_1.1.1.0/Module/rt61.ko] undefined!

The solution is to replace a line in the sources as outlined by linus torvalds on this post:

http://readlist.com/lists/vger.kernel.org/linux-kernel/67/337925.html

Ok, untarr the package and change to the directory Module. open the file rtmp_main.c and change the line (891)

return pci_module_init(&rt61_driver);

to

return pci_register_driver(&rt61_driver);

cp Make.6 Make && make all

and there you have your module. you have to cp your firmwarestuff to /etc/Wireless/RT61STA ...

Please read the provided README file carefully. You also have to set the ESSID in the /etc/Wireless/RT61STA.dat file. Remember to open it as a binary file as described in the README. Also don't forget to run dos2unix on the file before doing so.

Then eventually you can insmod the driver and start using it ... Hopefully ...

Good luck.

----------

## rufnut

momesana and Linus , thanks for your tips    

https://bugs.gentoo.org/show_bug.cgi?id=187497

 :Smile: 

----------

