Madwifi and hostapd IEEE80211_IOCTL_SETMLME

Jouni Malinen j
Mon Mar 19 19:30:27 PDT 2007

On Mon, Mar 19, 2007 at 05:27:15PM -0700, David wrote:

> Setup: gentoo, with everything correctly compiled in, WPA2-PSK with
> AES-CCMP setup, no radius or EAP server, tried with madwifi and the new
> madwifi, and tried with hostapd 0.4.10, 0.5.7, and 0.6-2/24/2007(devel).
>  On hostapd 5 series with either of the madwifi's and I get the same error.

> (hostapd 4 and 6 series do not compile against madwifi 0.9.3, though on madwifi
> they do and they give the same errors when compiled.)

Please be more specific on what fails to compile. I had no problems
building the current head of 0.4.x, 0.5.x, or 0.6.x branches against
madwifi 0.9.3.

> It's a classic case of the IEEE80211_IOCTL_SETMLME function not working or
> passing parameters correctly.  On one of the hostapd forms someone said they
> tried this:
> -       madwifi_set_iface_flags(drv, 0);        /* mark down during setup */
> +       madwifi_set_iface_flags(drv, 1);        /* bring up for setup */

And like I've said number of times, this is incorrect.

> This problem seems to pop up regardless of madwifi or hostapd version.  Becasue
> of this the clients lose connectivity every few minutes and sometimes are not
> able to even "see" the ap.  The clients are a mixture of winXP (built-in XP
> wireless) and linux (using wpa_supp) so the problem is not the client end.  Can
> this be fixed - I am not really good at coding but it seems there is something
> in the code not correctly passing parameters to the ioctl_setmlme function when
> the interface is first initialized.

I do not think that the initial setmlme would have anything to do with
later disconnections.

Could you please send me a debug log showing the disconnection both from
hostapd and wpa_supplicant?

> Jouri and others - are you guys aware of this?  What's the fix?

I have not seen this issue myself or a clear debug log showing what
would be causing the problem.

> Here is the output with hostapd 0.5.7 on madwifi 0.9.3

> madwifi_sta_deauth: addr=ff:ff:ff:ff:ff:ff reason_code=3
> ioctl[IEEE80211_IOCTL_SETMLME]: Invalid argument	//** problem **

Ignoring this particular message in the debug log, do you see any real
problems caused by this? As far as I know, this is not really causing
problems--the driver is just notifying that it cannot deauthenticate
this address which is kind of understandable.

> And here is the madiwfi portion of dmesg:


Neither of the logs showed any real problems as far as I can tell. I
would need to see debug log showing the error time (i.e., the point
when a station gets disconnected or fails to associate). It would be
nice to see debug logs from both hostapd and wpa_supplicant and in
addition, debug log from the madwifi driver (from both hosts, if madwifi
was used on both). The driver debugging should be enabled to show at
least some of the management frame processing.

Jouni Malinen                                            PGP id EFC895FA

More information about the Hostap mailing list