How to cleanly unload libertas module
Cyril HAENEL
chaenel at free.fr
Tue Jul 8 03:10:19 EDT 2008
Our need is to have the current consumption of the board as low as
possible when there is nothing to do. The board needs to wake up approx
every hour, connect to a server and get data. Because for now the driver
doesn't implements the standby mode, we need to find another solution.
We looked in the driver to see if we can implement the standby function
ourself, but it seems to be complicated for us.
So my idea is to reset the wlan module when we don't it to save power.
We have seen that the wlan module consumption is very low when we put it
in reset.
Regards,
Cyril
Dan Williams a écrit :
>On Fri, 2008-07-04 at 09:42 +0200, Holger Schurig wrote:
>
>
>>>When I do an ifdown to unregister the wlan interface, and I
>>>try to unload the libertas_cs and libertas modules, it does't
>>>work because rmmod says me that the module is busy.
>>>
>>>
>>Works for me (with compact flash):
>>
>>ifdown eth1
>>pccardctl eject
>>rmmod libertas_cs
>>rmmod libertas
>>
>>
>
>Yeah, because I think you can disconnect the device itself (pccardctl
>eject) and then libertas cleans up and frees stuff. If the card is
>soldered on or otherwise not removable, this probably won't work.
>
>
>
>>Note that, because the CF driver registered itself with the
>>PCMCIA subsystem, just doing "ifdown eth1" doesn't set the usage
>>count to 0. After all, you can still access the card when the
>>interface is down. Maybe the same is true for SDIO. You must do
>>your SDIO-equivalent of "pccardctl eject", so that the driver
>>get's de-registered. In the SDIO case, you must trigger that the
>>SDIO subsystem calls your if_sdio_remove() function.
>>
>>
>
>ifdown just stops the queues (lbs_eth_stop). ifup starts them again.
>You'd have to rmmod the driver to close the device and disconnect it
>completely. The current architecture loads the firmware and grabs the
>device on probe. We should try to track down where the module reference
>is coming from though, just to understand whether it _should_ be there
>or not. Ideally you can rmmod the module at any time and it cleans up
>after itself.
>
>What you probably really want is the ability to power down the
>transmitter, which would be "iwconfig ethX txpower off". Or is that not
>sufficient?
>
>Dan
>
>
>_______________________________________________
>libertas-dev mailing list
>libertas-dev at lists.infradead.org
>http://lists.infradead.org/mailman/listinfo/libertas-dev
>
>
>
>
--
Cyril Haenel
Registered Linux User #332632
More information about the libertas-dev
mailing list