# Ralink WLAN not working since kernel update

## Warhead

I am using an RaLink RT2561/RT61 wireless network contoller on an MSI M670 Notbook using the 64bit kernel sources for amd dual core processors.

I have used the rt61 driver Module provides with the net-wireless/ralink-rt61 since September and apart from having to edit /etc/Wireless/RT61STA/rt61sta.dat by hand evertime my notebook has to connect to anoter AC than the on at home it was working fine. Today I installed the 2.6.24-r3 gentoo kernel sources, using the build-in device drivers for that wirelescard, which has failed completly. The module was loaded but prints seldom messeges to /var/log/messages/

```

phy0: Failed to initialize wep

phy0: -> rt2x00lib_probe_dev: Error - Failed to initialize hw.

ACPI: PCI interrupt for device 0000:04:09.0 disabled

rt61pci: probe of 0000:04:09.0 failed with error -12

```

I can not even see the device by using

```

ifconfig -a

```

Since I have not the slightes idea, how this error occurs and there is no thread in ths forum regarding this errormessages, I decided to diable the kernel support for this driver and use the ralink-rt61 ebuild instead. But re-emerging it I get this:

```

>>> Emerging (1 of 1) net-wireless/ralink-rt61-1.1.1.0 to /

 * IS_Linux_STA_6x_D_1.1.1.0.tar.gz RMD160 SHA1 SHA256 size ;-) ...       [ ok ]

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

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

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

 * checking IS_Linux_STA_6x_D_1.1.1.0.tar.gz ;-) ...                      [ ok ]

 * Determining the location of the kernel source code

 * Found kernel source directory:

 *     /usr/src/linux

 * Found kernel object directory

 *     /lib/modules/2.6.24-gentoo-r3/build

 * Found sources for kernel version:

            *     2.6.24-gentoo-r3

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

 >>> Unpacking source...

 >>> Unpacking IS_Linux_STA_6x_D_1.1.1.0.tar.gz to /var/tmp/portage/net-wireless/ralink-rt61-1.1.1.0/work

 >>> Source unpacked.

 >>> Compiling source in /var/tmp/portage/net-wireless/ralink-rt61-1.1.1.0/work/

S_Linux_STA_6x_D_1.1.1.0 ...

 * Applying rtmp_main.diff ...                                            [ ok

 * Preparing rt61 module

 make -C /lib/modules/2.6.24-gentoo-r3/build SUBDIRS=/var/tmp/portage/net-wirele

 s/ralink-rt61-1.1.1.0/work/IS_Linux_STA_6x_D_1.1.1.0/Module modules

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

 make[1]: warning: jobserver unavailable: using -j1.  Add `+' to parent make rul

 .

 scripts/Makefile.build:46: *** CFLAGS was changed in "/var/tmp/portage/net-wire

 ess/ralink-rt61-1.1.1.0/work/IS_Linux_STA_6x_D_1.1.1.0/Module/Makefile". Fix it

 to use EXTRA_CFLAGS.  Stop.

 make[1]: *** [_module_/var/tmp/portage/net-wireless/ralink-rt61-1.1.1.0/work/IS

 Linux_STA_6x_D_1.1.1.0/Module] Error 2

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

 make: *** [all] Error 2

  *

  * ERROR: net-wireless/ralink-rt61-1.1.1.0 failed.

  * Call stack:

  *               ebuild.sh, line   49:  Called src_compile

  *             environment, line 3178:  Called linux-mod_src_compile

  *             environment, line 2433:  Called die

  * The specific snippet of code:

  *               emake HOSTCC="$(tc-getBUILD_CC)" CC="$(get-KERNEL_CC)" LDFLAGS

  "$(get_abi_LDFLAGS)" ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS} || die "Un

  ble to make ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS}.";

  *  The die message:

  *   Unable to make    .

  *

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

  vant.

  * A complete build log is located at '/var/tmp/portage/net-wireless/ralink-rt6

  -1.1.1.0/temp/build.log'.

  * The ebuild environment file is located at '/var/tmp/portage/net-wireless/ral

  nk-rt61-1.1.1.0/temp/environment'.

  *

```

I fail to see, what is going on. All wireless networking guides are about one year old, and do not comment on the current kernel device drivers. Can anybody explan this to me? Having wireless connection is quite essential for that machine, and in the end I do not care if it is achived via the kernel drivers or the ebuild, but ONE of those should be working.

Regards

Warhead

----------

## Ghotrix

Same problem:(

----------

## priapus

Same problem here.  I found this link that seems to describe this problem but I am not sure how to apply what it says.  I have a fresh install and it's really pissing me off because everything else works great except I can't get on the internet.  :Crying or Very sad: 

----------

## shakalsrecko

same problem here. im not sure, but i think, problem is in /Module/Makefile in row 13 in ralink-rt61 package

in that row some flags are appended to CFLAGS. for some reason, "make" doesnt want to change CFLAGS in the middle of compiling, and sugest(make) to fix this whit EXTRA_CFLAGS. I have no idea how to do that, but I hope my post will help someone else to find solution.

----------

## IvanMajhen

Why don't you use 2.6.25 kernel drivers?

----------

## makton3g

I'm running in to the same problem. I'm running the rtlink2600 chipset and can't get RT61 to compile. The "in kernal" driver is not going to be compatable with this chipset. So, I'm either going to figure out how to get the extended CFLAGS or I'll try the ndiswrapper to get this card to work. I fould a couple typos in the makefile, but nothing fixed the problem.

Here is the Makefile

```

######################################################################

#   Module Name: Makefile

#   Abstract: Makefile for rt61 linux driver on kernel series 2.6 

######################################################################

#Enable for wpa_supplicant's spcific driver "driver_ralink.c", default enabled.

HAS_RALINK_WPA_SUPPLICANT_SUPPORT=n

#Enable for wpa_supplicant's generic driver "driver_wext.c", used for NetworkManager

HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=y

WFLAGS += -DAGGREGATION_SUPPORT -DWMM_SUPPORT -Wall -Wstrict-prototypes -Wno-trigraphs

ifeq ($(HAS_RALINK_WPA_SUPPLICANT_SUPPORT),y)

WFLAGS += -DWPA_SUPPLICANT_SUPPORT

endif

ifeq ($(HAS_NATIVE_WPA_SUPPLICANT_SUPPORT),y)

WFLAGS += -DNATIVE_WPA_SUPPLICANT_SUPPORT

endif

## Comment/uncomment the following line to enable/disable

#CFLAGS += -DDBG

CFLAGS += $(WFLAGS)

obj-m := rt61.o

rt61-objs := rtmp_main.o \

   mlme.o   \

   connect.o   \

   sync.o   \

   assoc.o   \

   auth.o   \

   auth_rsp.o   \

   rtmp_data.o   \

   rtmp_init.o   \

   sanity.o   \

   rtmp_wep.o   \

   rtmp_info.o   \

   eeprom.o   \

   rtmp_tkip.o   \

   wpa.o   \

   md5.o   \

   rtmp_task.o   \

   

#ifdef MAT_SUPPORT

ifeq ($(HAS_ETH_CONVERT),y)

rt61-objs +=   cmm_mat.o   \

   cmm_mat_iparp.o   \

   cmm_mat_ipv6.o   \

   cmm_mat_pppoe.o

endif

#endif // MAT_SUPPORT //

ifeq ($(HAS_NATIVE_WPA_SUPPLICANT_SUPPORT),y)

rt61-objs += rtmp_wext.o

endif

## Configuration files on SuSE

#NDDIR=/etc/sysconfig/network

#MOD_CONF=/etc/modprobe.d/module-renames

## NDDIR/ifcfg-ra0

ND_CONF=/etc/sysconfig/network-scripts/ifcfg-ra0

ifdef NDDIR

   NDDIR := $(NDDIR)

else

    NDDIR := /etc/sysconfig/network-scripts

endif

ifdef MOD_CONF

   MOD_CONF := $(MOD_CONF)   

else

   MOD_CONF := /etc/modprobe.conf 

endif

all: 

   make -C /lib/modules/$(shell uname -r)/build SUBDIRS=$(shell pwd) modules

clean:

   rm -rf *.o *~ .*.cmd *.ko *.mod.c .tmp_versions built-in.o

install:

   make -C /lib/modules/$(shell uname -r)/build \

   INSTALL_MOD_DIR=extra SUBDIRS=$(shell pwd) \

   modules_install 

   @echo "Network device directory $(NDDIR)"; 

   @echo "Module configuration file $(MOD_CONF)";   

   

   @if [ -d "$(NDDIR)" ] ; then \

      if [ ! -f "$(ND_CONF)" ]; then \

         echo "Create 'ifcfg-ra0' in $(NDDIR)/"; \

         cp ifcfg-ra0 $(NDDIR)/ ; \

      fi; \

    fi

   

   @if ! grep -q 'ra0' $(MOD_CONF) ; then \

      echo "append 'alias ra0 rt61' to $(MOD_CONF)"; \

      echo "alias ra0 rt61" >> $(MOD_CONF) ; \

    fi

   /sbin/depmod -a

#   auto copy *.bin to /etc/Wireless/RT61STA

#   mkdir /etc/Wireless ;

#   mkdir /etc/Wireless/RT61STA ;

#   cp $(shell pwd)/*.bin /etc/Wireless/RT61STA ;

#   cp $(shell pwd)/*.dat /etc/Wireless/RT61STA ;

#   Copy file  on Mandriva 2007.1   

#   cp $(shell pwd)/*.bin /lib/firmware/ ;

```

Any ideas?

----------

## makton3g

[SOLVED] The newest kernel does have RT61 and it works. Only need to download the drivers from Ralink to get the firmware. The card I'm using is the following.

Linksys WP200 PCMCIA card for a DELL C640. Like a champ  :Smile: 

----------

