Re: [RFC] mac80211: notify the user space about low signal quality
From: Kalle Valo <hidden>
Date: 2008-09-16 08:25:52
Dan Williams [off-list ref] writes:
On Mon, 2008-09-15 at 17:10 +0200, Holger Schurig wrote:quoted
quoted
So why does this need a new event? Can't wpa_supplicant monitor the signal quality (or level/noise if the driver doesn't provide "quality") and do what it needs to do without any changes to the kernel at all?It could, but to do this, wpa_supplicant (or whatever) would have to periodically get awake, send the query command to mac80211 and get the result. With an event, it just sits sleeping until some interesting event arrives. Nicer programming idiom, AFAIK.
I agree, this is the kind of design we should strive for.
Except that everything that listens to WEXT events gets woken up every time an event comes in anyway. So any card doing background scanning will wake up the supplicant too
No, in good condition there won't be scanning going on and hence nothing will wake up supplicant. And with good hardware design (with beacon filtering) not even the CPU is woken up. But you are proposing means that the suplicant (and hence the CPU) would be waken all the time, despite the signal condition. Not good.
I honestly think that every few seconds is OK here.
No, it really isn't ok. There are CPUs, like TI's OMAP 3430, where CPU wake up takes a relatively long time and is expensive from power consumption point of view. Useless periodic timers are a bad idea.
My main problem is that adding a beacon threshold to mac80211 isn't a great idea because it's not a standard value and it's not something really applicable to mac80211; it's policy which is different for different programs, and the way you've implemented it here it's global for the interface.
Still I don't see a problem here, all the mac80211 drivers should already now report similar signal strenght to the mac80211 in comparable level. And I doubt that there's that much need for the applications to adjust the roaming thershold itself. I would assume it would be more like enable and disable, if not even that. Of course it would be nice to be able to configure the threshold from user space, but I find that as an extra feature. We should try get good default values by testing. -- Kalle Valo