rt61pci: problems with hostapd after upgrade to 2.6.31

Live forum: http://rt2x00.serialmonkey.com/viewtopic.php?t=5712

wraiden

14-10-2009 18:28:40

Hello,

i have a total loss of hostapd functionality after upgrading form 2.6.30.x to vanilla kernel 2.6.31.x...

Mobile devices can connect but can't send or receive any ip traffic (including DHCP and ARP requests).

# no changes here, its the same version that was running fine on 2.6.30.x kernels
hostapd v0.6.9

# modinfo rt61pci
filename /lib/modules/2.6.31.4/kernel/drivers/net/wireless/rt2x00/rt61pci.ko
license GPL
firmware rt2661.bin
firmware rt2561s.bin
firmware rt2561.bin
description Ralink RT61 PCI & PCMCIA Wireless LAN driver.
version 2.3.0
author http//rt2x00.serialmonkey.com
srcversion 801A037A3E53BB7E7E9C627
alias pciv00001814d00000401sv*sd*bc*sc*i*
alias pciv00001814d00000302sv*sd*bc*sc*i*
alias pciv00001814d00000301sv*sd*bc*sc*i*
depends rt2x00lib,rt2x00pci,eeprom_93cx6,crc-itu-t
vermagic 2.6.31.4 SMP mod_unload PENTIUMIII
parm nohwcryptDisable hardware encryption. (bool)


I'm able to patch the kernel if someone could guide me what patches are needed.
It would be nice if the needed fixes would get into the next stable release.

I'll try to upgrade to 2.6.32-rc4 and look if the fixes needed are in it.

thanks in advance,

Marc

wraiden

16-10-2009 21:57:37

Upgrade to 2.6.32-rc4 didn't change anything.

hostapd.conf
interface=wlan0
bridge=br0
driver=nl80211
logger_syslog=-1
logger_syslog_level=0
logger_stdout=-1
logger_stdout_level=2
dump_file=/tmp/hostapd.dump
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
ssid=testap
country_code=DE
ieee80211d=1
hw_mode=g
channel=10
beacon_int=100
dtim_period=2
max_num_sta=255
rts_threshold=2347
fragm_threshold=2346
macaddr_acl=0
auth_algs=3
ignore_broadcast_ssid=0
wme_enabled=1
wme_ac_bk_cwmin=4
wme_ac_bk_cwmax=10
wme_ac_bk_aifs=7
wme_ac_bk_txop_limit=0
wme_ac_bk_acm=0
wme_ac_be_aifs=3
wme_ac_be_cwmin=4
wme_ac_be_cwmax=10
wme_ac_be_txop_limit=0
wme_ac_be_acm=0
wme_ac_vi_aifs=2
wme_ac_vi_cwmin=3
wme_ac_vi_cwmax=4
wme_ac_vi_txop_limit=94
wme_ac_vi_acm=0
wme_ac_vo_aifs=2
wme_ac_vo_cwmin=2
wme_ac_vo_cwmax=3
wme_ac_vo_txop_limit=47
wme_ac_vo_acm=0
eapol_key_index_workaround=0
eap_server=0
own_ip_addr=192.168.0.1
wpa=2
wpa_passphrase=abcdefg
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP CCMP

hostapd log with logger_syslog_level=0
Oct 16 141711 hostname hostapd wlan0 STA 00XXXX8eXXXX IEEE 802.11 authentication OK (open system)
Oct 16 141711 hostname hostapd wlan0 STA 00XXXX8eXXXX MLME MLME-AUTHENTICATE.indication(00XXXX8eXXXX, OPEN_SYSTEM)
Oct 16 141711 hostname hostapd wlan0 STA 00XXXX8eXXXX MLME MLME-DELETEKEYS.request(00XXXX8eXXXX)
Oct 16 141711 hostname hostapd wlan0 STA 00XXXX8eXXXX IEEE 802.11 authenticated
Oct 16 141711 hostname hostapd wlan0 STA 00XXXX8eXXXX IEEE 802.11 association OK (aid 1)
Oct 16 141711 hostname hostapd wlan0 STA 00XXXX8eXXXX IEEE 802.11 associated (aid 1)
Oct 16 141711 hostname hostapd wlan0 STA 00XXXX8eXXXX MLME MLME-ASSOCIATE.indication(00XXXX8eXXXX)
Oct 16 141711 hostname hostapd wlan0 STA 00XXXX8eXXXX MLME MLME-DELETEKEYS.request(00XXXX8eXXXX)
Oct 16 141711 hostname hostapd wlan0 STA 00XXXX8eXXXX WPA event 1 notification
Oct 16 141711 hostname hostapd wlan0 STA 00XXXX8eXXXX WPA start authentication
Oct 16 141711 hostname hostapd wlan0 STA 00XXXX8eXXXX IEEE 802.1X unauthorizing port
Oct 16 141711 hostname hostapd wlan0 STA 00XXXX8eXXXX WPA sending 1/4 msg of 4-Way Handshake
Oct 16 141711 hostname hostapd wlan0 STA 00XXXX8eXXXX IEEE 802.1X did not Ack EAPOL-Key frame (unicast index=118)
Oct 16 141711 hostname hostapd wlan0 STA 00XXXX8eXXXX WPA EAPOL-Key timeout
Oct 16 141711 hostname hostapd wlan0 STA 00XXXX8eXXXX WPA sending 1/4 msg of 4-Way Handshake
Oct 16 141711 hostname hostapd wlan0 STA 00XXXX8eXXXX IEEE 802.1X did not Ack EAPOL-Key frame (unicast index=118)
Oct 16 141711 hostname hostapd wlan0 STA 00XXXX8eXXXX WPA event 3 notification
Oct 16 141711 hostname hostapd wlan0 STA 00XXXX8eXXXX IEEE 802.1X unauthorizing port
Oct 16 141711 hostname hostapd wlan0 STA 00XXXX8eXXXX IEEE 802.11 deauthenticated
Oct 16 141711 hostname hostapd wlan0 STA 00XXXX8eXXXX MLME MLME-DEAUTHENTICATE.indication(00XXXX8eXXXX, 1)
Oct 16 141711 hostname hostapd wlan0 STA 00XXXX8eXXXX MLME MLME-DELETEKEYS.request(00XXXX8eXXXX)
Oct 16 141711 hostname hostapd wlan0 STA 00XXXX8eXXXX IEEE 802.11 authentication OK (open system)
Oct 16 141711 hostname hostapd wlan0 STA 00XXXX8eXXXX MLME MLME-AUTHENTICATE.indication(00XXXX8eXXXX, OPEN_SYSTEM)
Oct 16 141711 hostname hostapd wlan0 STA 00XXXX8eXXXX MLME MLME-DELETEKEYS.request(00XXXX8eXXXX)
Oct 16 141711 hostname hostapd wlan0 STA 00XXXX8eXXXX IEEE 802.11 authenticated
Oct 16 141711 hostname hostapd wlan0 STA 00XXXX8eXXXX IEEE 802.11 deauthenticated
Oct 16 141711 hostname hostapd wlan0 STA 00XXXX8eXXXX MLME MLME-DEAUTHENTICATE.indication(00XXXX8eXXXX, 1)
Oct 16 141711 hostname hostapd wlan0 STA 00XXXX8eXXXX MLME MLME-DELETEKEYS.request(00XXXX8eXXXX)
Oct 16 141711 hostname hostapd wlan0 STA 00XXXX8eXXXX IEEE 802.11 authentication OK (open system)
Oct 16 141711 hostname hostapd wlan0 STA 00XXXX8eXXXX MLME MLME-AUTHENTICATE.indication(00XXXX8eXXXX, OPEN_SYSTEM)
Oct 16 141711 hostname hostapd wlan0 STA 00XXXX8eXXXX MLME MLME-DELETEKEYS.request(00XXXX8eXXXX)
Oct 16 141711 hostname hostapd wlan0 STA 00XXXX8eXXXX IEEE 802.11 authenticated
Oct 16 141711 hostname hostapd wlan0 STA 00XXXX8eXXXX IEEE 802.11 association OK (aid 1)
Oct 16 141711 hostname hostapd wlan0 STA 00XXXX8eXXXX IEEE 802.11 associated (aid 1)
Oct 16 141711 hostname hostapd wlan0 STA 00XXXX8eXXXX MLME MLME-ASSOCIATE.indication(00XXXX8eXXXX)
Oct 16 141711 hostname hostapd wlan0 STA 00XXXX8eXXXX MLME MLME-DELETEKEYS.request(00XXXX8eXXXX)
Oct 16 141711 hostname hostapd wlan0 STA 00XXXX8eXXXX WPA event 1 notification
Oct 16 141711 hostname hostapd wlan0 STA 00XXXX8eXXXX WPA start authentication
Oct 16 141711 hostname hostapd wlan0 STA 00XXXX8eXXXX IEEE 802.1X unauthorizing port
Oct 16 141711 hostname hostapd wlan0 STA 00XXXX8eXXXX WPA sending 1/4 msg of 4-Way Handshake
Oct 16 141711 hostname hostapd wlan0 STA 00XXXX8eXXXX IEEE 802.1X did not Ack EAPOL-Key frame (unicast index=118)
Oct 16 141712 hostname hostapd wlan0 STA 00XXXX8eXXXX WPA EAPOL-Key timeout
Oct 16 141712 hostname hostapd wlan0 STA 00XXXX8eXXXX WPA sending 1/4 msg of 4-Way Handshake
Oct 16 141712 hostname hostapd wlan0 STA 00XXXX8eXXXX IEEE 802.1X did not Ack EAPOL-Key frame (unicast index=118)
Oct 16 141712 hostname hostapd wlan0 STA 00XXXX8eXXXX WPA event 3 notification
Oct 16 141712 hostname hostapd wlan0 STA 00XXXX8eXXXX IEEE 802.1X unauthorizing port
Oct 16 141712 hostname hostapd wlan0 STA 00XXXX8eXXXX IEEE 802.11 deauthenticated

I've tryed with
options rt61pci nohwcrypt=1
but doesn't fixed the behavior.

Has anybody a running AP with kernel >= 2.6.31 on a rt61pci card?

So far i can only revert to kernel 2.6.30.9 to get the AP mode running.

I also checked the actual development version of hostapd and it didn't worked.

Currently i'm building 2.6.32-rc5 with rt2x00 debug support.
But i really don't know what to look for at the moment.

Any suggestions? Changesets to revert or something? Ivo? Help! wink

Marc

bamboo

17-10-2009 09:30:13

Hi,

just wanted to say that I'm seeing the exact same behavior here.
I've got a ralink card (rt61pci driver), latest hostapd packaged in debian sid (10.6.9-3).
I build custom kernels for my access point. 2.6.30.9 is the last kernel I can use to run hostapd normaly.
With 2.6.31.X, symptoms are i can get hostapd to work but for a limited period of time after booting, say ~10min.
After that i loose connection and I have to reboot the access point.
I also tried to remove power management features with 'iwconfig wlan0 power off' as suggested in another thread with no luck, iwconfig is not supported anymore and the command fails.
I tried to disable the 'enable power management by default' option from the 2.6.31.X kernels with no luck either.
I'll be glad to help, I have time, I'm a developper too, I can provide more informations on my setup if needed, I can test things involving compilation and such too.

Don't worry wraiden, you're not alone ! mrgreen

wraiden

19-10-2009 19:40:22

According to the following mails on hostap list this maybe a problem with bridge interface support of the nl80211 hostapd driver as of kernel 2.6.31

http//lists.shmoo.com/pipermail/hostap ... 20316.html
http//lists.shmoo.com/pipermail/hostap ... 20351.html

bamboo is your AP also running on a bridged interface?

Marc

bamboo

20-10-2009 00:29:32

mmh no, I don't use that. It runs on a single, non bridged wifi interface.

wraiden

27-10-2009 04:25:05

looks like the regression was found and fixed
http//marc.info/?l=linux-wireless&m=12 ... 921134&w=2

works for me o)

hugleo

31-10-2009 11:17:13

Something similar happens to me using 2.6.32.rc5 kernel. I can associate to my AP but I can't web surfing. I'm using pppoe and to 2.6.31.5 kernel is working ok.

ganto

06-08-2010 18:02:53

I have a similar problem as described above.

I cannot successfully create an AP with WPA2 authentication, hostapd (git latest) and Debian's testing kernel 2.6.32-5. It always results in 'WPA EAPOL-Key timeout' and then 'WPA authenticator requests disconnect'. I also tried with libnl-1.1 and libnl-2.0. It doesn't make a difference.

[code255i0ynf]authentication: STA=00:16:cb:b8:36:dc auth_alg=0 auth_transaction=1 status_code=0 wep=0
New STA
wlan0: STA 00:16:cb:b8:36:dc IEEE 802.11: authentication OK (open system)
wlan0: STA 00:16:cb:b8:36:dc MLME: MLME-AUTHENTICATE.indication(00:16:cb:b8:36:dc, OPEN_SYSTEM)
wlan0: STA 00:16:cb:b8:36:dc MLME: MLME-DELETEKEYS.request(00:16:cb:b8:36:dc)
authentication reply: STA=00:16:cb:b8:36:dc auth_alg=0 auth_transaction=2 resp=0 (IE len=0)
mgmt::auth cb
wlan0: STA 00:16:cb:b8:36:dc IEEE 802.11: authenticated
mgmt::assoc_req
association request: STA=00:16:cb:b8:36:dc capab_info=0x531 listen_interval=100
new AID 1
wlan0: STA 00:16:cb:b8:36:dc IEEE 802.11: association OK (aid 1)
mgmt::assoc_resp cb
wlan0: STA 00:16:cb:b8:36:dc IEEE 802.11: associated (aid 1)
wlan0: STA 00:16:cb:b8:36:dc MLME: MLME-ASSOCIATE.indication(00:16:cb:b8:36:dc)
wlan0: STA 00:16:cb:b8:36:dc MLME: MLME-DELETEKEYS.request(00:16:cb:b8:36:dc)
wpa_driver_nl80211_set_key: ifindex=7 alg=0 addr=0x9f544b8 key_idx=0 set_tx=1 seq_len=0 key_len=0
addr=00:16:cb:b8:36:dc
wlan0: STA 00:16:cb:b8:36:dc WPA: event 1 notification
wpa_driver_nl80211_set_key: ifindex=7 alg=0 addr=0x9f544b8 key_idx=0 set_tx=1 seq_len=0 key_len=0
addr=00:16:cb:b8:36:dc
wlan0: STA 00:16:cb:b8:36:dc WPA: start authentication
WPA: 00:16:cb:b8:36:dc WPA_PTK entering state INITIALIZE
wpa_driver_nl80211_set_key: ifindex=7 alg=0 addr=0x9f544b8 key_idx=0 set_tx=1 seq_len=0 key_len=0
addr=00:16:cb:b8:36:dc
wlan0: STA 00:16:cb:b8:36:dc IEEE 802.1X: unauthorizing port
WPA: 00:16:cb:b8:36:dc WPA_PTK_GROUP entering state IDLE
WPA: 00:16:cb:b8:36:dc WPA_PTK entering state AUTHENTICATION
WPA: 00:16:cb:b8:36:dc WPA_PTK entering state AUTHENTICATION2
WPA: 00:16:cb:b8:36:dc WPA_PTK entering state INITPSK
WPA: 00:16:cb:b8:36:dc WPA_PTK entering state PTKSTART
wlan0: STA 00:16:cb:b8:36:dc WPA: sending 1/4 msg of 4-Way Handshake
WPA: Send EAPOL(version=2 secure=0 mic=0 ack=1 install=0 pairwise=8 kde_len=0 keyidx=0 encr=0)
IEEE 802.1X: 00:16:cb:b8:36:dc TX status - version=2 type=3 length=95 - ack=1
wlan0: STA 00:16:cb:b8:36:dc WPA: EAPOL-Key timeout
WPA: 00:16:cb:b8:36:dc WPA_PTK entering state PTKSTART
wlan0: STA 00:16:cb:b8:36:dc WPA: sending 1/4 msg of 4-Way Handshake
WPA: Send EAPOL(version=2 secure=0 mic=0 ack=1 install=0 pairwise=8 kde_len=0 keyidx=0 encr=0)
wlan0: STA 00:16:cb:b8:36:dc WPA: EAPOL-Key timeout
WPA: 00:16:cb:b8:36:dc WPA_PTK entering state PTKSTART
wlan0: STA 00:16:cb:b8:36:dc WPA: sending 1/4 msg of 4-Way Handshake
WPA: Send EAPOL(version=2 secure=0 mic=0 ack=1 install=0 pairwise=8 kde_len=0 keyidx=0 encr=0)
wlan0: STA 00:16:cb:b8:36:dc WPA: EAPOL-Key timeout
WPA: 00:16:cb:b8:36:dc WPA_PTK entering state PTKSTART
wlan0: STA 00:16:cb:b8:36:dc WPA: sending 1/4 msg of 4-Way Handshake
WPA: Send EAPOL(version=2 secure=0 mic=0 ack=1 install=0 pairwise=8 kde_len=0 keyidx=0 encr=0)
wlan0: STA 00:16:cb:b8:36:dc WPA: EAPOL-Key timeout
WPA: 00:16:cb:b8:36:dc WPA_PTK entering state PTKSTART
WPA: 00:16:cb:b8:36:dc WPA_PTK entering state DISCONNECT
hostapd_wpa_auth_disconnect: WPA authenticator requests disconnect: STA 00:16:cb:b8:36:dc reason 2
WPA: 00:16:cb:b8:36:dc WPA_PTK entering state DISCONNECTED
WPA: 00:16:cb:b8:36:dc WPA_PTK entering state INITIALIZE
wpa_driver_nl80211_set_key: ifindex=7 alg=0 addr=0x9f544b8 key_idx=0 set_tx=1 seq_len=0 key_len=0
addr=00:16:cb:b8:36:dc
wlan0: STA 00:16:cb:b8:36:dc IEEE 802.1X: unauthorizing port
wlan0: STA 00:16:cb:b8:36:dc IEEE 802.11: deauthenticated due to local deauth request
mgmt::disassoc
disassocation: STA=00:16:cb:b8:36:dc reason_code=8
Station 00:16:cb:b8:36:dc trying to disassociate, but it is not associated.
[/code255i0ynf]

The same setup with kernel 2.6.29 works flawlessly (see viewtopic.php?f=5&t=4963&p=32213#p32213) .

[quote255i0ynf][i255i0ynf]Original by wraiden[/i255i0ynf]
looks like the regression was found and fixed
http//marc.info/?l=linux-wireless&m=12 ... 921134&w=2

works for me o)[/quote255i0ynf]
This fix is already included in the Debian 2.6.32-5 kernel sources. Still no luck. What exact kernel version, hostapd version, hostapd config are you running?

Somebody got an AP with rt61pci and encryption and kernel >=2.6.31 running?

denilsonsa

15-01-2011 16:31:40

Somebody got an AP with rt61pci and encryption and kernel >=2.6.31 running?[/quotel1dld00a]
Yes, I do! )

Long story short I used to have 2.6.30 kernel and everything worked. Then, after a year without updating, I've updated to 2.6.36, and my AP stopped working. Then I got help and found out a solution

[codel1dld00a]options rt61pci nohwcrypt=1[/codel1dld00a]

If you want to read all the details, I've posted everything in my blog
http//my.opera.com/CrazyTerabyte/blog/ ... ux-kernels

I'm also posting here, in this forum, because I know it will help other people!