# 2.6.24 kernel module for rt2500pci does not support iwpriv

## Hefistion

Hi,

I have a Conceptronic WLan card with a rt2500 chipset 

I'm using the 2.6.24-r3 gentoo-sources in amd64 system with following configuration:

```

{M} Improved wireless configuration API             

        [ ]   nl80211 new netlink interface support                     

        -*- Wireless extensions                                                  

  

        <M> Generic IEEE 802.11 Networking Stack (mac80211)                     

  

        [ ]   Enable debugging output                                            

  

        < > Generic IEEE 802.11 Networking Stack                                 

                                                 

[*] Wireless LAN (pre-802.11)  

         [*] Wireless LAN (IEEE 802.11)                                           

        <M>   Ralink driver support                                              

        <M> Ralink rt2500 pci/pcmcia support                                     

        [*]   RT2500 rfkill support           

```

my lsmod output:

```

hefistion@nederland /home/hefistion $ lsmod | grep rt

rt2500pci              18688  0

rt2x00pci               8256  1 rt2500pci

rt2x00lib              17408  2 rt2500pci,rt2x00pci

rfkill                  6736  1 rt2x00lib

input_polldev           4368  1 rt2x00lib

mac80211              111308  3 rt2500pci,rt2x00pci,rt2x00lib

eeprom_93cx6            2752  1 rt2500pci

```

my /etc/conf.net

```

modules=( "iwconfig" )

mode_wlan0="managed"

essid_wlan0="Casa"

iwpriv_Casa=(

   "set AuthMode=WPAPSK"

   "set EncrypType=TKIP"

   "set WPAPSK=WPAKEY"

)

 config_wlan0=("192.168.0.3 netmask 255.255.255.0 brd 192.168.0.255")

 routes_wlan0=("default gw 192.168.0.1")

```

When I run /etc/init.d/net.wlan0

```

nederland ~ # /etc/init.d/net.wlan0 start

 * Starting wlan0

 *   Configuring wireless network for wlan0

wlan0     no private ioctls.

 *   wlan0 does not support the following private ioctls

 *     set AuthMode=WPAPSK

wlan0     no private ioctls.

 *   wlan0 does not support the following private ioctls

 *     set EncrypType=TKIP

wlan0     no private ioctls.

 *   wlan0 does not support the following private ioctls

 *     set WPAPSK=WPAKEY

 *   Failed to configure wireless for wlan0                                            [ !! ]

nederland ~ #                           
```

Thanks.

----------

## Yamakuzure

I have the same problem.

I am playing around with wpa_supplicant now for hours, but it isn't working either.  :Sad: 

----------

## Hefistion

anybody?   :Crying or Very sad:   :Crying or Very sad:   :Crying or Very sad: 

----------

## Yamakuzure

Well, as for wpa_supplicant, I can't get it to work.  :Sad: 

----------

## regomodo

has anybody tried the serialmonkey drivers? I've yet to find a distro that doesn't work with them. 

I did try them last week but borked my system before i could get a proper look at why my rt2500 pci card wouldn't work

----------

## Yamakuzure

Has anyone found out how to get rt2500pci to work with wpa, yet?

wpa_supplicant does not work. (for me...)

----------

## overkll

Shouldn't need wpa_supplicant.  The rt2500 chip is capable WPAPSK on its own.  I've just started fiddling with kernel 2.6.24 and the native driver.  If I figure out a good working setup, I'll report back

So far I got it to work in Open mode, but the speed really sucks - 1mb.  Signal strength is less than half of what it was with the out of kernel driver (net-wireless/rt2500) and kernel 2.6.23.

I may just end up using dd-wrt on an old Linksys WRT54G and turn it into a wireless client/bridge untli this new module gets the bugs worked out.

The good news is that "iwlist wlan0 scan" outputs more details on available AP's including encryption type, even for hidden essid's.

Seems to work better built-in to the kernel as opposed to modules - still testing though...

----------

## didumos

I have a PCI card that uses the rt2500 chipset and it has been mostly working for me under the 2.6.24 kernel with wpa_supplicant. Pretty much the only problem I have is that the speed detection doesn't work and it is always set to 1 Mb/s, so I just do a sudo iwconfig wlan0 rate 54M when my desktop comes up. I think this issue is fixed in 2.6.25 although I haven't tried it in a while. Anyway, here is what works for me:

Kernel config:

```
Networking --->

    Wireless --->

        -*- Improved wireless configuration API

        [ ]   nl80211 new netlink interface support

        -*- Wireless extensions

        [*] Generic IEEE 802.11 Networking Stack (mac80211)

        [ ]   Enable debugging output

        [*] Generic IEEE 802.11 Networking Stack

        [ ]   Enable full debugging output

        [ ]   IEEE 802.11 WEP encryption (802.1x)

        [*]   IEEE 802.11i CCMP support

        [ ]   IEEE 802.11i TKIP encryption

        [ ]   Software MAC add-on to the IEEE 802.11 networking stack

Device Drivers --->

    [*] Network device support --->

        Wireless LAN --->

            [*] Wireless LAN (IEEE 802.11)

                [*]   Ralink driver support

            [*] Ralink rt2500 pci/pcmcia support
```

/etc/wpa_supplicant/wpa_supplicant.conf

```
network={

    ssid="my_essid"

    psk="my_secret_password"

}
```

/etc/conf.d/net

```
modules=( "wpa_supplicant" )

wpa_supplicant_wlan0="-D wext"
```

Edit: overkll, I'd love to know how to get this working without wpa_supplicant so if you find anything out then let us know.   :Smile:   I know they do have this new config API but I have yet to see an example of how to use it.

----------

## Yamakuzure

I've just seen in the changelog of the 2.6.25 kernel, that there *are* alot of changes to the rt2x00 drivers. Well, maybe we just have to wait for the .25 kernel?

didumos, that is exactly how I tried and failed. But maybe I missed one or more of the wlan kernel settings, so I will try out. Hopefully I can manage to try it out tonight. Thanks for the information!

----------

## overkll

 *didumos wrote:*   

> Edit: overkll, I'd love to know how to get this working without wpa_supplicant so if you find anything out then let us know.  I know they do have this new config API but I have yet to see an example of how to use it.

 

After some searching and reading, it seems that rt2500 chips (not rt61) need wpa_supplicant for WPA.  This is according to a dev a serialmonkey.com

I've seen some posts here in the Gentoo forums that state iwpriv commands work to set up WPA, but those successes are with the old driver, or with the new kernel drivers AND rt61 devices which depend on firmware downloads.

I haven't tried it out yet, but it seems us users of rt2500 chips need to use wpa_supplicant in order to use WPA with the new kernel drivers.

didumos,

It's been a few months since I've last worked with wpa_supplicant, but your config file looks incomplete for WPA.  Did you emerge wpa_supplicant with qt3 or qt4 use flags?  If so, you can use the gui to scan and configure WPA.  I believe (going from memory) there is a line in wpa_supplicant.conf that needs to designate that users can change the config file in order for the gui to be able to edit wpa_supplicant.conf, but I don't remember the exact verbage.  Check the manpage or the example config file.

I'm waiting for some lengthy emerges to complete before I can continue...  :Sad: 

----------

## didumos

 *overkll wrote:*   

> didumos,
> 
> It's been a few months since I've last worked with wpa_supplicant, but your config file looks incomplete for WPA.  Did you emerge wpa_supplicant with qt3 or qt4 use flags?  If so, you can use the gui to scan and configure WPA.  I believe (going from memory) there is a line in wpa_supplicant.conf that needs to designate that users can change the config file in order for the gui to be able to edit wpa_supplicant.conf, but I don't remember the exact verbage.  Check the manpage or the example config file.

 

Actually, in my case that wpa_supplicant set-up works fine because the config has certain defaults. For example, "key_mgmt" defaults to WPA-PSK so I don't need to set that and CCMP/AES is the default for the WPA cipher, which is what my router is set-up to use.

I got that config from the most basic example in /usr/share/doc/wpa_supplicant-0.6.3/wpa_supplicant.conf.bz2:

```
# Simple case: WPA-PSK, PSK as an ASCII passphrase, allow all valid ciphers

network={

   ssid="simple"

   psk="very secret passphrase"

   priority=5

}
```

All I did was remove the priority setting because I only connect to one access point - this isn't on a laptop, just a computer at home.

Edit: I don't use either of the QT interfaces for it, but thanks   :Smile: 

----------

## Simba7

I'm having trouble, too.. I really dislike the in-kernel driver, especially since I can't go "Master" with it. I was able to do it before with .22 and rt2x00.

..and rt2x00 won't compile with .24.

----------

## overkll

Finally got the bitch to work!

kernel config:

Networking>Wireless

```

  -*- Improved wireless configuration API                               

  [ ]   nl80211 new netlink interface support                            

  -*- Wireless extensions                                                       

  <*> Generic IEEE 802.11 Networking Stack (mac80211)         

  [ ]   Enable debugging output                                               

  <*> Generic IEEE 802.11 Networking Stack                          

  [ ]   Enable full debugging output                                           

  < >   IEEE 802.11 WEP encryption (802.1x)                           

  < >   IEEE 802.11i CCMP support                                          

  < >   IEEE 802.11i TKIP encryption                                        

  < >   Software MAC add-on to the IEEE 802.11 networking stack

```

Device Drivers>Network Device Support>Wireless LAN

```

  <M>   Ralink driver support                                   

  < > Ralink rt2400 pci/pcmcia support                    

  <M> Ralink rt2500 pci/pcmcia support

```

The IEEE 802.11 encryption is not required since wpa_supplicant handles that.

/etc/conf.d/net:

```

modules=( "wpa_supplicant" )

wpa_supplicant_wlan0="-Dwext"

config_wlan0=( "10.0.0.100/24" )

routes_wlan0=( "default via 10.0.0.10" )

associate_timeout_wlan0=60

preup () {

        iwconfig wlan0 txpower on

        iwconfig wlan0 channel 3

        iwconfig wlan0 rate 54M

}

```

/etc/wpa_supplicant/wpa_supplicant.conf

```

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=users

network={

   ssid="myAPssid"

   scan_ssid=1

   key_mgmt=WPA-PSK

   psk="mysupersecretpasskey"

}

```

The ctrl_interface_groups=users is for the gui.  It allows the wpa_supplicant.conf file to be edited by anyone in the "users" group.  Adjust or omit as you see fit.

RESULT:

```
# iwconfig wlan0

wlan0     IEEE 802.11g  ESSID:"myAPssid"  

          Mode:Managed  Frequency:2.422 GHz  Access Point: 00:xx:xx:xx:xx:xx   

          Bit Rate=54 Mb/s   Tx-Power=27 dBm   

          Retry min limit:7   RTS thr:off   Fragment thr=2346 B   

          Encryption key:9529-BDB3-42FA-3C2F-266C-4549-AB55-FB3B-5CC3-FE02-30F1-DE85-8400-A9B9-03C4-24F2 [2]

          Link Quality=90/100  Signal level=-55 dBm  

          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0

          Tx excessive retries:0  Invalid misc:0   Missed beacon:0
```

If you want to try more "iwconfig" statements, try putting them in the "preup" function in /etc/conf.d/net.

Happy Networking!    :Laughing: 

----------

## overkll

Correction:

rt2x00 only relies on the new wireless stack - mac80211.  The generic stack is not required so the kernel config should be:

```

  -*- Improved wireless configuration API                               

  [ ]   nl80211 new netlink interface support                           

  -*- Wireless extensions                                                       

  <*> Generic IEEE 802.11 Networking Stack (mac80211)         

  [ ]   Enable debugging output                                               

  < > Generic IEEE 802.11 Networking Stack                         

```

----------

## overkll

I was experiencing intermittent deauthentication and reauthentication with the new in-kernel rt2x00 driver ( dmesg | less ).  Changing /etc/conf.d/net parameters and /etc/wpa_supplicant.conf parameters did not help.

I then tried an Atheros pci card and madwifi-ng-0.9.4 with kernel gentoo-sources-2.6.24-r4 and I had the same issue.  I thought it had to be the new kernel wireless code.

Then I upgraded the firmware on my D-Link access point.  The upgrade included adding ieee802 compliant WPA2 code.  After that, all is working perfectly.   :Laughing:   I guess WPA supplicant didn't like the code for WPA1 on the D-Link access point.

System has been up 24 hours and hasn't disconnected/reconnected once!  Signal strength is excellent!

Just thought I'd share my experience WRT the AP issue in case others experience a similar issue.

----------

## Yamakuzure

 *overkll wrote:*   

> System has been up 24 hours and hasn't disconnected/reconnected once!  Signal strength is excellent!

 Yes! this is excactly what I wanted to hear! Currently I have a disconnect/reconnect every few minutes with no more than 30% Signal strength. (90+% and perfect strength when booted into windows)

I am looking forward to this week-end, when I will try out your method.  :Smile:  Thanks alot!

----------

## redfalcon

 *overkll wrote:*   

> Finally got the bitch to work!
> 
> [...]
> 
> Happy Networking!   

 

Woah, thanks. wpa_supplicant never worked for me with kernels prior to 2.6.24-xx, but had no problems using iwpriv instead. I prepared of endless hours fiddling with my config, but your solution works perfectly!

----------

## overkll

Glad it helped.  I figured all the pain and suffering I went through could help others avoid the same frustration.

----------

## Timmer

This almost worked for me.  I had to run "dhcpcd wlan0" manually in order to get an ip.  

Here are the messages I got:

```

net.wlan0                     | * Bringing up interface wlan0

net.wlan0                     | *   Running preup ...

net.wlan0                     | *   Starting wpa_supplicant on wlan0 ...

net.wlan0                     |ioctl[SIOCSIWAUTH]: Operation not supported           [ ok ]

net.wlan0                     | *   Starting wpa_cli on wlan0 ...                    [ ok ]

net.wlan0                     | *   Backgrounding ... ...

net.wlan0                     | * WARNING: net.wlan0 has started, but is inactive

```

I solved it by putting

```

postup () {

        dhcpcd -Nt 10 wlan0

}

```

into my /etc/conf.d/net but it seems like I shouldn't have to do that.  It should just work, shouldn't it?

----------

## overkll

Post your /etc/conf.d/net file.

----------

## Timmer

Here you go.  I'm using baselayout 2, hense the slightly different syntax

```

modules="dhcpcd"

config_wlan0="dhcpcd"

dhcpcd_wlan0="-Nt 10"

# Commented stuff is my old WEP config

#modules="iwconfig"

#associate_order="preferredonly"

#preferred_aps="My_AP"

#blacklist_aps="My_Neighbors_APs"

#key_APT_C8="my_wep_key"

#iwconfig_wlan0="rate 54M"

modules="wpa_supplicant"

wpa_supplicant_wlan0="-Dwext"

config_wlan0="192.168.1.100/24"  <= I assumed this was supposed to be my computers ip address

routes_wlan0="default via 192.168.1.1" <= and this was supposed to be my gateway

associate_timeout_wlan0=60

preup () {

        iwconfig wlan0 txpower on

        iwconfig wlan0 channel 11

        iwconfig wlan0 rate 54M

}

```

----------

## Timmer

oh, well duh!  I'm just looking at this and realizing that i've got two contradictory config_wlan0 lines.  And I'll bet that's my problem.  Sorry to be a bother.

----------

## overkll

Don't worry about it.  I often post for help then answer my own posts after rereading my originals.   :Embarassed: 

----------

