Hi <span style="color: rgb(0, 0, 0);">Pavel Roskin</span>.<br>I debugged again and found the error comes from&nbsp; set80211priv(struct madwifi_driver_data *drv, int op, void *data, int len) in driver_madwifi.c file.<br><br>When it run to ioctl(drv-&gt;ioctl_sock, op, &amp;iwr) , it return a value of -1, and then set80211priv() return -1 with the message ioctl[IEEE80211_IOCTL_SETMLME]: Argument list too long in the end.<br>
<br>I print the value of drv-&gt;ioctl_sock and op and it&#39;s drv-&gt;ioctl_sock=3,op=35824 in my platform.<br><br>Can you give me some ideas to resolve this solution? Thank you very much.<br><br><br>Regards£¬<br>Peter Zhou<br>
<br><div class="gmail_quote">2010/1/9 Pavel Roskin <span dir="ltr">&lt;<a href="mailto:proski@gnu.org">proski@gnu.org</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">On Wed, 2010-01-06 at 11:16 +0800, Peter Zhou wrote:<br>
<br>
&gt; ioctl[unknown???]: Invalid argument<br>
&gt; madwifi_process_wpa_ie: Failed to get WPA/RSN IE<br>
<br>
</div>It looks like the IEEE80211_IOCTL_GETWPAIE request is failing with<br>
-EINVAL. &nbsp;MadWifi would process it in ieee80211_ioctl_getwpaie(), which<br>
would fail if the request size mismatches what MadWifi expects.<br>
<br>
Maybe sizeof(struct ieee80211req_wpaie) is different in userspace and in<br>
the kernel for your platform?<br>
<br>
Perhaps the easiest solution would be to apply this patch to MadWifi and<br>
recompile both MadWifi and hostapd. &nbsp;Please report if it made any<br>
difference for you.<br>
<br>
If it doesn&#39;t help, please print iwr-&gt;u.data.length and sizeof(wpaie) in<br>
the beginning of ieee80211_ioctl_getwpaie() in MadWifi.<br>
<br>
Index: net80211/ieee80211_ioctl.h<br>
===================================================================<br>
--- net80211/ieee80211_ioctl.h &nbsp;(revision 4103)<br>
+++ net80211/ieee80211_ioctl.h &nbsp;(working copy)<br>
@@ -287,7 +287,7 @@<br>
 &nbsp; &nbsp; &nbsp; &nbsp;u_int8_t &nbsp; &nbsp; &nbsp; &nbsp;wpa_macaddr[IEEE80211_ADDR_LEN];<br>
 &nbsp; &nbsp; &nbsp; &nbsp;u_int8_t &nbsp; &nbsp; &nbsp; &nbsp;wpa_ie[IEEE80211_MAX_OPT_IE];<br>
 &nbsp; &nbsp; &nbsp; &nbsp;u_int8_t &nbsp; &nbsp; &nbsp; &nbsp;rsn_ie[IEEE80211_MAX_OPT_IE];<br>
-};<br>
+} __packed;<br>
<br>
&nbsp;/*<br>
 &nbsp;* Retrieve per-node statistics.<br>
<br>
--<br>
Regards,<br>
<font color="#888888">Pavel Roskin<br>
</font></blockquote></div><br>