[Aloisio, sorry for double reply, I forgot to CC the list] On Tue, 2009-01-13 at 17:45 -0300, Aloisio Almeida wrote: > Hi all, > > I noticed that wireless devices are always scanning, and this is very > bad to power consuption in embedded systems. > I would like to create a way to prevent automatic scan and just > perform it when some cliente ask for it. > Is it possible to do this? I mean, does it "brake" in some way the nm structure? Sounds good. Actually if you look at some current embedded devices they are performing wireless scan only after user has indicated he wants to create a wireless connection. > Actually, I already did this patch to 0.6.6 version, but zero lines > applied in new code :) Now i would like to create the patch and submit > to upstream. > > The basic idea is just make can_scan function (src/nm-device-wifi.c) > return FALSE due to some user configurations or run flags > (--no-bg-scan). In this case, "performScan" dbus method and > "ScanPerformed" dbus signal must be created to allow clients to ask > for a scan and to notice that the scan has been performed. Would those be added in org.freedesktop.NetworkManager interface or per wireless device in Device.Wireless? > I'm attaching the 0.6.6 patch, as I said before the idea is the same. > > Any comments? Is it a good way to implement that? I would like to have also a dbus option which you can change without restarting the daemon; setScanningEnabled() or something like that. '--no-bg-scan' would initialize it as false on daemon startup. It could be changed during system operation based on power profiles or something like that. Anyway it would give more flexibility. Of course that could be too close to wirelessEnabled (), though... -- Antti
Attachment:
signature.asc
Description: This is a digitally signed message part