iwevent not reliable?

Jean Tourrilhes jt
Wed Nov 20 10:04:12 PST 2002

Jun Sun wrote :
> As a dumb experient, I left iwevent running even though I don't see
> any events (hostap driver in master mode).
> After quite a while (I don't know how long actually because I left)
> all the events came out.  It appears as if all those events are buffered
> somewhere and flushed out much later.

	Hum... It looks like a netlink issue, so I won't be able to
use my favorite excuse ("let's blame it on the firmware").
	Actually, if you could test that some event are good (such as
changing mode/freq/essid) and some events are bad (those comming from
the driver), that would please me. If all the events are problematic,
then I may have a problem.
	Note that you don't mention the version of the kernel used.

> I will probably take a look of the driver code, but would appreciate
> any pointers.

	This is the way it works :
	Card Firmware => irq (Rx Packet)
		=> HostAP irq handler => wireless_send_event()
			=> .../net/core/wireless.c => netlink_broadcast()
				=> RtNetLink => NetLink
					=> Socket API =>
						=> Application

	Wireless Extension doesn't buffer events (it's just a thin
wrapper), but Netlink does. However, NetLink has been widely used in
the kernel and by many applications, so I would find it strange that
such a bug would go unnoticed.
	Put a printk() before the wireless_send_event() to know if the
event is generated or not, then compare your kernel log and the output
of iwevent.

> Jun

	Good luck...


More information about the Hostap mailing list