Dear all,
 
      When I try hostapd +madwifi dirver with wpa-psk, I got the follownig problems,
      associated
      New STA
      ioctl[unknown???]: Invalid argument
      Failed to get WPA/RSN information element.
 
      I have trace some source codes and find the following with node debug open ,
 
Using interface ath0 with hwaddr 00:11:f5:21:0b:41 and ssid 'linux'
madwifi_configure_wpa: group key cipher=1
madwifi_configure_wpabr0: port 2(ath0) entering learning state
: pairwise key ciphers=0x2
 
madwifi_configure_wpa: key management algorithms=0x2
madwifi_configure_wpa:br0: port 2(ath0) entering forwarding state
 rsn capabilitiebr0: topology change detecteds=0x0
madwifi_c, propagatingonfigure_wpa:
enable WPA= 0x1
 
madwifi_set_privacy: enabled=1
WPA: group state machine entering state GTK_INIT
GMK - hexdump(len=32):
 e7 b5 4c db 2a bc 18 e0 f9 9c 82 2a 97 23 cb 77 4e
 df f8 57 93 1c b9 90 31 20 d9 74 da 8c 26 2f
GTK - hexdump(len=32):
 
 ac fb 1b d0 0f 5f 23 85 6c e4 85 63 2c 6d 8c 7a 7c
 3e be f0 72 a4 4d fe da 12 ad 55 39 f1 f3 47
WPA: group state machine entering state SETKEYSDONE
madwifi_set_key: alg=TKIP addr=00:00:00:00:00:00 key_idx=1
Flushing old station entries
Deauthenticate all stations
 
ieee80211_setup_node 00:10:c6:1c:ce:b2
ieee80211_free_node 00:10:c6:1c:ce:b2 refcnt 2
ieee80211_free_node 00:10:c6:1c:ce:b2 refcnt 3
ieee80211_free_node 00:10:c6:1c:ce:b2 refcnt 4
ieee80211_free_node 00:10:c6:1c:ce:b2 refcnt 3
ieee80211_free_node 00:10:c6:1c:ce:b2 refcnt 2
ieee80211_free_node 00:10:c6:1c:ce:b2 refcnt 1
_ieee80211_free_node 00:10:c6:1c:ce:b2
 associated
  New STA
ioctl[unknown???]: Invalid argument
Failed to get WPA/RSN information element.
ieee80211_setup_node 00:30:95:ff:00:3f
ieee80211_free_node 00:30:95:ff:00:3f refcnt 2
ieee80211_free_node 00:30:95:ff:00:3f refcnt 1
_ieee80211_free_node 00:30:95:ff:00:3f
ieee80211_setup_node 00:30:95:ff:00:3f
ieee80211_free_node 00:30:95:ff:00:3f refcnt 2
ieee80211_free_node 00:30:95:ff:00:3f refcnt 1
_ieee80211_free_node 00:30:95:ff:00:3f
ieee80211_setup_node 00:30:95:ff:00:3f
ieee80211_free_node 00:30:95:ff:00:3f refcnt 2
ieee80211_free_node 00:30:95:ff:00:3f refcnt 1
_ieee80211_free_node 00:30:95:ff:00:3f
ieee80211_setup_node 00:10:c6:1c:ce:b2
ieee80211_free_node 00:10:c6:1c:ce:b2 refcnt 2
ieee80211_free_node 00:10:c6:1c:ce:b2 refcnt 1
_ieee80211_free_node 00:10:c6:1c:ce:b2
ieee80211_setup_node 00:10:c6:1c:ce:b2
ieee80211_free_node 00:10:c6:1c:ce:b2 refcnt 2
ieee80211_free_node 00:10:c6:1c:ce:b2 refcnt 1
_ieee80211_free_node 00:10:c6:1c:ce:b2
ieee80211_setup_node 00:10:c6:1c:ce:b2
ieee80211_free_node 00:10:c6:1c:ce:b2 refcnt 2
ieee80211_free_node 00:10:c6:1c:ce:b2 refcnt 1
_ieee80211_free_node 00:10:c6:1c:ce:b2
ieee80211_setup_node 00:10:c6:1c:ce:b2
ieee80211_free_node 00:10:c6:1c:ce:b2 refcnt 2
ieee80211_free_node 00:10:c6:1c:ce:b2 refcnt 1
_ieee80211_free_node 00:10:c6:1c:ce:b2
ieee80211_setup_node 00:10:c6:1c:ce:b2
ieee80211_free_node 00:10:c6:1c:ce:b2 refcnt 2
ieee80211_free_node 00:10:c6:1c:ce:b2 refcnt 1
_ieee80211_free_node 00:10:c6:1c:ce:b2
ieee80211_setup_node 00:30:95:ff:00:3f
ieee80211_free_node 00:30:95:ff:00:3f refcnt 2
ieee80211_free_node 00:30:95:ff:00:3f refcnt 1
_ieee80211_free_node 00:30:95:ff:00:3f
ieee80211_setup_node 00:30:95:ff:00:3f
ieee80211_free_node 00:30:95:ff:00:3f refcnt 2
ieee80211_free_node 00:30:95:ff:00:3f refcnt 1
_ieee80211_free_node 00:30:95:ff:00:3f
ieee80211_setup_node 00:30:95:ff:00:3f
ieee80211_free_node 00:30:95:ff:00:3f refcnt 2
ieee80211_free_node 00:30:95:ff:00:3f refcnt 1
_ieee80211_free_node 00:30:95:ff:00:3f
ieee80211_setup_node 00:30:95:ff:00:3f
ieee80211_free_node 00:10:c6:1c:ce:b2 refcnt 2
ieee80211_free_node 00:10:c6:1c:ce:b2 refcnt 3
ieee80211_free_node 00:10:c6:1c:ce:b2 refcnt 4
ieee80211_free_node 00:10:c6:1c:ce:b2 refcnt 3
ieee80211_free_node 00:10:c6:1c:ce:b2 refcnt 2
ieee80211_free_node 00:10:c6:1c:ce:b2 refcnt 1
_ieee80211_free_node 00:10:c6:1c:ce:b2
 802.11: associated
ioctl[unknown???]: Invalid argument
Failed to get WPA/RSN information element.
 
    When STA has been associated with the AP, it will start wpa authentication, and if ap can't find the specified sta, it will give the above the message.
 
    Why can't AP find the specified sta?  Because node reference count has been reduced to zero somewhere and it has been released. I trace the source code, and I always find ath_tx_processq will release the node. However, I can't understand why tx path will release the node. According to my understanding, only deauthentiction or station age out will cause the node to be released.
 
    More strangely, different clients have different results. Most client wireless cards will work well with madwifi master in the above configuraiton. Atheros window clients usually output the above results.
 
 
    Could someone please explain me why and how to fix it? Appreciate any help and tips.
 
    Thanks,
    hualab