madwifi_sta_deauth: Failed to deauth STA (addr 00:92:c3:80:05:7d reason 2)

Peter Zhou peterzhou2003
Thu Jan 28 23:35:59 PST 2010


Hello all,

I am trying to create an AP using
madwifi(madwifi-0.9.4-r4110-20100119)+hostapd(hostapd-0.6.9)+kernel(2.6.30.5)
with Atheros AR5213a CM9-GP card in ixp425 board.

Everything is Ok when I run hostapd with no encryption method, but if
I use WPA(WPA2)-psk with TKIP in encryption method, then my client
can't connect to the AP with the error message
'madwifi_process_wpa_ie: Failed to get WPA/RSN IE'.

There was a subject about 'madwifi_process_wpa_ie: Failed to get
WPA/RSN IE' in the mail list. I followed Pavel Roskin's patch in the
list.

Index: net80211/ieee80211_ioctl.h
===================================================================
--- net80211/ieee80211_ioctl.h  (revision 4103)
+++ net80211/ieee80211_ioctl.h  (working copy)
@@ -287,7 +287,7 @@
       u_int8_t        wpa_macaddr[IEEE80211_ADDR_LEN];
       u_int8_t        wpa_ie[IEEE80211_MAX_OPT_IE];
       u_int8_t        rsn_ie[IEEE80211_MAX_OPT_IE];
-};
+} __packed;

 /*
 * Retrieve per-node statistics.


Then the old error message disappeared, but I got new error message
and my client could't connect the AP.
The main error message is as below:

......
ioctl[unknown???]: Invalid argument
madwifi_get_seqnum: Failed to get encryption data (addr
ff:ff:ff:ff:ff:ff key_idx 1)
ath0: STA 00:92:c3:80:05:7d WPA: sending 1/2 msg of Group Key Handshake
WPA: Send EAPOL(version=1 secure=1 mic=1 ack=1 install=0 pairwise=0
kde_len=32 keyidx=1 encr=1)
Plaintext EAPOL-Key Key Data - hexdump(len=32): [REMOVED]
TX EAPOL - hexdump(len=145): 00 92 c3 80 05 7d 00 0b 6b 0a ee 7d 88 8e
02 03 00 7f fe 03 91 00 20 00 00 00 00 00 00 00 06 bf db c0 91 c2 f6
23 dc be
ath0: STA 00:92:c3:80:05:7d WPA: EAPOL-Key timeout
WPA: 00:92:c3:80:05:7d WPA_PTK_GROUP entering state REKEYNEGOTIATING
WPA: 00:92:c3:80:05:7d WPA_PTK_GROUP entering state KEYERROR
WPA: 00:92:c3:80:05:7d WPA_PTK entering state DISCONNECT
hostapd_wpa_auth_disconnect: WPA authenticator requests disconnect:
STA 00:92:c3:80:05:7d reason 2
madwifi_sta_deauth: addr=00:92:c3:80:05:7d reason_code=2

======line=190,function=set80211priv in file driver_madwifi.c
ioctl[IEEE80211_IOCTL_SETMLME]: Argument list too long
madwifi_sta_deauth: Failed to deauth STA (addr 00:92:c3:80:05:7d reason 2)
WPA: 00:92:c3:80:05:7d WPA_PTK_GROUP entering state IDLE
WPA: 00:92:c3:80:05:7d WPA_PTK entering state DISCONNECTED
WPA: 00:92:c3:80:05:7d WPA_PTK entering state INITIALIZE
madwifi_del_key: addr=00:92:c3:80:05:7d key_idx=0
madwifi_set_sta_authorized: addr=00:92:c3:80:05:7d authorized=0

======line=190,function=set80211priv in file driver_madwifi.c
ioctl[IEEE80211_IOCTL_SETMLME]: Argument list too long
madwifi_set_sta_authorized: Failed to unauthorize STA 00:92:c3:80:05:7d
ath0: STA 00:92:c3:80:05:7d IEEE 802.1X: unauthorizing port
Could not set station 00:92:c3:80:05:7d flags for kernel driver (errno=29).
ath0: STA 00:92:c3:80:05:7d IEEE 802.11: deauthenticated due to local
deauth request
Wireless event: cmd=0x8c02 len=99
Custom wireless event: 'STA-TRAFFIC-STAT
mac=00:92:c3:80:05:7d
rx_packets=2
rx_bytes=250
tx_packets=6
tx_bytes=794
'
Wireless event: cmd=0x8c04 len=20
ath0: STA 00:92:c3:80:05:7d IEEE 802.11: disassociated
......


I debugged and found the 'IEEE80211_IOCTL_SETMLME' is comming from
static const char *opnames[] after '#ifdef MADWIFI_NG' in
driver_madwifi.c.
Why there is a define MADWIFI_NG? It should be removed in the new
madwifi driver.
OK,there is a ifdef IEEE80211_IOCTL_SETWMMPARAMS then define
MADWIFI_NG in driver_madwifi.c and the IEEE80211_IOCTL_SETWMMPARAMS is
defined in net80211/ieee80211_ioctl.h.
What's the problem is?

I also found there is a define MADWIFI_BSD in driver_madwifi.c. Are
CONFIG_DRIVER_BSD(in .config) and MADWIFI_BSD interrelated?
When I disabled the define MADWIFI_BSD and MADWIFI_NG(If I only
disabled MADWIFI_NG,the compiler comes error with
'driver_madwifi.c:611: error: 'IEEE80211_IOCTL_GETSTASTATS' undeclared
(first use in this function)').
The error message channed as below:

......
======line=190,function=set80211priv in file driver_madwifi.c
ioctl[unknown???]: Invalid argument
madwifi_get_seqnum: Failed to get encryption data (addr
ff:ff:ff:ff:ff:ff key_idx 1)
ath0: STA 00:92:c3:80:05:7d WPA: sending 1/2 msg of Group Key Handshake
WPA: Send EAPOL(version=1 secure=1 mic=1 ack=1 install=0 pairwise=0
kde_len=32 keyidx=1 encr=1)
Plaintext EAPOL-Key Key Data - hexdump(len=32): [REMOVED]
TX EAPOL - hexdump(len=145): 00 92 c3 80 05 7d 00 0b 6b 0a ee 7d 88 8e
02 03 00 7f fe 03 91 00 20 00 00 00 00 00 00 00 06 9a 66 55 c7 e9 6b
58 a6 3b
ath0: STA 00:92:c3:80:05:7d WPA: EAPOL-Key timeout
WPA: 00:92:c3:80:05:7d WPA_PTK_GROUP entering state REKEYNEGOTIATING
WPA: 00:92:c3:80:05:7d WPA_PTK_GROUP entering state KEYERROR
WPA: 00:92:c3:80:05:7d WPA_PTK entering state DISCONNECT
hostapd_wpa_auth_disconnect: WPA authenticator requests disconnect:
STA 00:92:c3:80:05:7d reason 2
madwifi_sta_deauth: addr=00:92:c3:80:05:7d reason_code=2

======line=190,function=set80211priv in file driver_madwifi.c
ioctl[IEEE80211_IOCTL_GETRSN]: Argument list too long
madwifi_sta_deauth: Failed to deauth STA (addr 00:92:c3:80:05:7d reason 2)
WPA: 00:92:c3:80:05:7d WPA_PTK_GROUP entering state IDLE
WPA: 00:92:c3:80:05:7d WPA_PTK entering state DISCONNECTED
WPA: 00:92:c3:80:05:7d WPA_PTK entering state INITIALIZE
madwifi_del_key: addr=00:92:c3:80:05:7d key_idx=0
madwifi_set_sta_authorized: addr=00:92:c3:80:05:7d authorized=0

======line=190,function=set80211priv in file driver_madwifi.c
ioctl[IEEE80211_IOCTL_GETRSN]: Argument list too long
madwifi_set_sta_authorized: Failed to unauthorize STA 00:92:c3:80:05:7d
ath0: STA 00:92:c3:80:05:7d IEEE 802.1X: unauthorizing port
Could not set station 00:92:c3:80:05:7d flags for kernel driver (errno=29).
ath0: STA 00:92:c3:80:05:7d IEEE 802.11: deauthenticated due to local
deauth request
Wireless event: cmd=0x8c02 len=99
Custom wireless event: 'STA-TRAFFIC-STAT
mac=00:92:c3:80:05:7d
rx_packets=2
rx_bytes=250
tx_packets=6
tx_bytes=794
'
Wireless event: cmd=0x8c04 len=20
ath0: STA 00:92:c3:80:05:7d IEEE 802.11: disassociated
......


Thanks.
-- 
Best Regards,
Peter



More information about the Hostap mailing list