# MSI PC60G WiFi Card [RaLink RT2561/RT61 Chipset] Issues

## Angryguy

I recently purchased the MSI PC60G WiFi Card for my desktop and am having some issues in getting it running under Gentoo (after finally deciding to try the long upgrade path rather than the longer reinstall option).

The card is detected as having the aforementioned Ralink RT2561/RT61 chipset.  I'm trying to get it working using the nativve linux drivers under amd64, although I do have the XP x64 drivers as a fallback if I want to try ndiswrapper.

The story so far . . 

0. :-> emerge wireless-tools

1. :-> lspci | grep Net

00:07.0 Network controller: RaLink RT2561/RT61 802.11g PCI

     Actually, it gave unknown device at first until I ran:->update-pciids

2. Added the following to /etc/portage/package.keywords

 net-wireless/ralink-rt61 ~amd64

3. :-> emerge net-wireless/ralink-rt61

At this point, following a reset, 

- the rt61 module is loaded 

- iwconfig now lists ra0 with "no wireless connections"

- ifconfig does not list ra0 by default

4. :-> ifconfig ra0 up

ifconfig and iwconfig now list ra0 as expected.

I am now trying to get the device up and running, however I'm not having much luck.

5. :-> iwconfig ra0 essid me2 key WEP_KEY_HERE

However :-> iwconfig ra0 will only give me:

ra0       RT61 Wireless  ESSID:""  Nickname:""

          Mode:Auto  Frequency:2.412 GHz  Bit Rate=54 Mb/s

          RTS thr:off   Fragment thr:off

          Encryption key: WEP_KEY_HERE

No matter what I try, I can't get any field to change except the Encryption key.  The iwconfig utility does not give me any errors, it just refuses to let me update the ESSID or mode, and hence I can't get it to work.

Additionally, as long as ra0 is up, I can't access the network through the ethernet eth0 until I do "ifconfig ra0 down."  I guess the configurations must be conflicting.  fyi, I have tried configuring ra0 while eth0 is down without it making any difference.

Any ideas?

- Thanks

----------

## azlan

howdy  :Smile: 

Your problem is that your using the wrong driver.. you should be using the net-wireless/rt61 driver not the net-wireless/ralink-rt61.

Also this is a relatively new driver and I'm not sure if WEP is working on it yet, it may be you will have to give it a try yourself.

----------

## Angryguy

I'm not sure what the difference between the two are, other than the one you mentioned being marked as beta, but I'll give it a try.

I removed the ralink-rt61 and am trying to install the net-wireless/rt61 module without success:

The compilation fails with a few errors (below).  

Any ideas?  

Thanks

```
 * Found sources for kernel version:

 *     2.6.19-gentoo-r5

 * Checking for suitable kernel configuration options...                  [ ok ]>>> Unpacking source...

>>> Unpacking rt61-1.1.0-b1.tar.gz to /var/tmp/portage/net-wireless/rt61-1.1.0_beta1/work

>>> Source unpacked.

>>> Compiling source in /var/tmp/portage/net-wireless/rt61-1.1.0_beta1/work/rt61-1.1.0-b1 ...

 * Preparing rt61 module

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

  CC [M]  /var/tmp/portage/net-wireless/rt61-1.1.0_beta1/work/rt61-1.1.0-b1/Module/rtmp_main.o

/var/tmp/portage/net-wireless/rt61-1.1.0_beta1/work/rt61-1.1.0-b1/Module/rtmp_main.c: In function `RT61_probe':

/var/tmp/portage/net-wireless/rt61-1.1.0_beta1/work/rt61-1.1.0-b1/Module/rtmp_main.c:256: error: structure has no member named `get_wireless_stats'

/var/tmp/portage/net-wireless/rt61-1.1.0_beta1/work/rt61-1.1.0-b1/Module/rtmp_main.c: In function `RT61_open':

/var/tmp/portage/net-wireless/rt61-1.1.0_beta1/work/rt61-1.1.0-b1/Module/rtmp_main.c:374: warning: passing arg 2 of `request_irq' from incompatible pointer type/var/tmp/portage/net-wireless/rt61-1.1.0_beta1/work/rt61-1.1.0-b1/Module/rtmp_main.c: In function `rt61_resume':

/var/tmp/portage/net-wireless/rt61-1.1.0_beta1/work/rt61-1.1.0-b1/Module/rtmp_main.c:1013: warning: ignoring return value of `pci_enable_device', declared with attribute warn_unused_result

make[3]: *** [/var/tmp/portage/net-wireless/rt61-1.1.0_beta1/work/rt61-1.1.0-b1/Module/rtmp_main.o] Error 1

make[2]: *** [_module_/var/tmp/portage/net-wireless/rt61-1.1.0_beta1/work/rt61-1.1.0-b1/Module] Error 2

make[1]: *** [modules] Error 2

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

rt61.ko failed to build!

make: *** [module] Error 1

!!! ERROR: net-wireless/rt61-1.1.0_beta1 failed.

Call stack:

  ebuild.sh, line 1614:   Called dyn_compile

  ebuild.sh, line 971:   Called qa_call 'src_compile'

  environment, line 4073:   Called src_compile

  rt61-1.1.0_beta1.ebuild, line 35:   Called linux-mod_src_compile

  linux-mod.eclass, line 511:   Called die

!!! Unable to make  KERNDIR=/usr/src/linux KERNOUT=/lib/modules/2.6.19-gentoo-r5/build clean module.

!!! 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/rt61-1.1.0_beta1/temp/build.log'.

```

UPDATE:

I'm trying to give ndiswrapper a try in the meantime.  I have the rt61.sys file Windows x64 is using, but I can't find the inf file.  There is an rt2500usb.INF and a rt73.INF, but no rt61.inf in windows . . . It is the same story in both the XP and x64 windows installs.

----------

## MixedSoul

I'm having the same problem! the ralink-rt61 won't work and the rt61 won't emerge... i used to use the rt61 driver and it worked fine, but then i had to reinstall Gentoo (new barebone) and i just can't get it to compile with the gentoo-sources-2.6.20-r4 (i had 2.6.19-r*).

Is there any kernel config the could cause this?

Thx in advance

----------

## Angryguy

That's a good question.  I enabled the Wireless option that I saw in the kernel config, but I haven't checked if there's anything else it requires.

Googling, I just found this guide: http://rt2x00.serialmonkey.com/wiki/index.php?title=Slackware9_rt61_Howto

I don't know how old this guide is, but hopefully it's still referring to the correct kernel options.

 *Quote:*   

> Kernel Configuration 
> 
> Your kernel will need to support wireless networking and all subsystems appropriate for your card. For the RT61PCI, this included CONFIG_NET_WIRELESS, CONFIG_NET_RADIO, and CONFIG_PCI. The default Slackware kernel should have all of this but if you build your own kernels you may want to double check that nothing has been disabled. 
> 
> 

 

I also just found:

 *Quote:*   

> RT61
> 
> -------
> 
> http://www.ralink.com.tw/drivers/Linux/RT6...v1.0.4.0.tar.gz
> ...

 

And this post from linuxquestions.org seems to be addressing these exact issues with a reported solution editing the rt61sta.dat file.

I'm home for the holidays though, so I won't be back at my computer to try it until the end of the week.  Let me know if you have any luck, that last link sounds like it should work.

----------

## MixedSoul

Thanks for the fast reply, but I've seen those too..

when i try to emerge rt61 i get:

```
!!! Unable to make  KERNDIR=/usr/src/linux KERNOUT=/lib/modules/2.6.20-gentoo-r4/build clean module.
```

is this any help?

----------

## MixedSoul

Ok..  I've just tried my ralink with ralink-rt61 driver (since i can't compile rt61) and it connected to a wireless network without any encryption or protection.. so i guess everything is fine except for WEP and/or WPA support (that was probably why i couldn't connect to my home network; and i had a couple a things wrong in my kernel too, somehow i've overlooked some configurations or forgot to save them, but nothing changed after i compiled the right options in kernel.. until now)

So any idea if WPA and/or WEP is supported and if so, how can i get them to work?

Or how can i compile the rt61 driver?(i keep getting the:"Unable to make  KERNDIR=/usr/src/linux KERNOUT=/lib/modules/2.6.20-gentoo-r4/build clean module" error)

----------

## MixedSoul

New development (kind of) compiling rt61 driver (not ralink-rt61)...

First i tried to edit /var/tmp/portage/net-wireless/rt61-1.1.0_beta1/work/rt61-1.1.0-b1/Module/rtmp_main.c by commenting out the line 256 where it refers to a member on the net_device struct that (the error message says) doesn't exist and then i compiled it manually without errors (with a few warnings that i already had before), but this resulted in the same functionality i already had with ralink-rt61 driver (can connect only to unsecured wireless networks, no WEP/WPA)..

Then i added the member get_wireless_stats to the net_device struct in linux/netdevice.h ( void* get_wireless_stats, to ensure compatibility), and again it compiled without errors (just the same warnings).

And then (like before):

```
ifconfig ra0 down

modprobe -r rt61

modprobe rt61
```

And this time my eth0 won't work with ra0 turned on and, when i try to change some setting in ra0, Gentoo crashes and i have to hard reboot it! (i believe this happened to someone else in this or other Linux forum)

Maybe it's not much help to figure out the problem.. but i hope it's something..

----------

