I'm using NDIS 5.1 on Win XP.  I observe that after a successful association station receives a connect event, and then if AP dissociates for some reason before PMKSA or PTKSA finishes successfully, then the driver/card restarts the association implicitly and station gets connect event  again, but there is no disconnect event in between.   
<br><br><div class="gmail_quote">On Dec 15, 2007 8:23 AM, Jouni Malinen &lt;<a href="mailto:j@w1.fi">j@w1.fi</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div class="Wj3C7c">On Mon, Dec 10, 2007 at 07:52:44PM +0530, Paresh Sawant wrote:<br><br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; I&#39;m running wpa_supplicant on Wind-XP with CONFIG_USE_NDISUIO<br>&gt; defined. Ihave complied code in VS 2005. I see that
<br>&gt; &quot;MSNdis_StatusMediaDisconnect&quot; type of event is NOT notified to<br>&gt; wpa_supplicant by WMI. I notice that &quot;MSNdis_StatusMediaConnect&quot; is notified<br>&gt; by WMI and the event handler is invoked appropriately. But it fails for
<br>&gt; media_disconnect type. So in case of AP dissociates for some reason how can<br>&gt; the wpa_supplicant know the state of the station is<br>&gt; un-authenticated(state-1)?<br><br></div></div>Which NDIS driver are you using? I&#39;ve seen Media Disconnect notification
<br>to work fine with many cards. Do you see any WMI notifications for<br>disconnect (i.e., what exact do you mena with event handler failing)?<br><font color="#888888"><br>--<br>Jouni Malinen &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;PGP id EFC895FA
<br>_______________________________________________<br>HostAP mailing list<br><a href="mailto:HostAP@shmoo.com">HostAP@shmoo.com</a><br><a href="http://lists.shmoo.com/mailman/listinfo/hostap" target="_blank">http://lists.shmoo.com/mailman/listinfo/hostap
</a><br></font></blockquote></div><br>