<div>The idea to do the SELECTs in the opposite order and keep an InstanceName-to-GUID mapping is great. It will decrease the number of WMI calls per event and save a lot of time as WMI is notably slow.</div>
<div> </div>
<div>I could not find any relevant documentation regarding the source of the InstanceName from WMI. I did some investigation and found the weird behaviour regarding USB adapters I described in the previous mail (it can be seen also in the log file I sent). In the process, I also found that the InstanceName matches the Name from the Win32_PNPEntity instead.
</div>
<div><br>Bye</div>
<div> </div>
<div><span class="gmail_quote">On 8/21/06, <b class="gmail_sendername">Jouni Malinen</b> <<a href="mailto:jkmaline@cc.hut.fi">jkmaline@cc.hut.fi</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">On Mon, Aug 21, 2006 at 06:43:52PM +0300, Adrian Nistor wrote:<br><br>> sorry for the very late reply. In the attached ZIP file I included the
<br>> config file and the output of the supplicant that demonstrates the issue.<br>> It is very probable that you cannot reproduce this benaviour unless you use<br>> the same wireless card. Mine is a Sweex usb adapter based on the Ralink 2500
<br>> chipset. The issue also appeared with another 2 USB adapters from other<br>> manufacturers.<br>><br>> I also included in the ZIP the two source files I modified in order to fix<br>> the defect. The sources are based on the snapshot published in 8-Aug-2006.
<br><br>Thanks! I was trying to understand the use of PNPDeviceID in the<br>queries. Why is the Win32_PnPEntity class needed here? Is Name property<br>in that class guaranteed to match with InstanceName in the events? Why
<br>not just use Name in Win32_NetworkAdapter?<br><br>The problem for me is that I have found no documentation describing<br>where that InstanceName is coming from. Win32_NetworkAdapter class has<br>number of properties (Caption, Description, Name, ProductName) that
<br>could be used as the source or it could be something completely<br>different..<br><br>I'm actually considering of doing this in the opposite order, i.e.,<br>mapping adapter GUID to InstanceName, i.e., something like this:
<br><br>SELECT Index FROM Win32_NetworkAdapterConfiguration<br> WHERE SettingID='{GUID}'<br><br>SELECT Name FROM Win32_NetworkAdapter WHERE Index=idx<br><br>This would need to be done only once and the matching of events could
<br>actually be left to WMI since the "SELECT * FROM<br>MSNdis_StatusMediaConnect" type queries could actually be changed to<br>"SELECT * FROM MSDNdis_StatusMediaConnect WHERE InstanceName='name'"<br>(and that name would need to be the correct one; which could be Name
<br>from Win32_NetworkAdapter).<br><br>In addition to limiting number of WMI queries and reducing latency for<br>each event, this should also simplify the interface from ndis_events.c<br>to driver_ndis*.c since events would be delivered only for the correct
<br>adapter. I would just like to get confirmation on what is exact source<br>of InstanceName string in WMI..<br><br>--<br>Jouni Malinen 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">http://lists.shmoo.com/mailman/listinfo/hostap</a><br></blockquote></div><br>