What is libertas_devs[] and libertas_found for?

Marcelo Tosatti marcelo at kvack.org
Fri Feb 16 12:10:07 EST 2007


On Thu, Feb 15, 2007 at 10:47:27PM -0800, Luis Carlos Cobo Rus wrote:
> On 2/14/07, Holger Schurig <hs4233 at mail.mn-solutions.de> wrote:
> > Doesn't usb_deregister() handle this for us and call the .remove
> > function anyway?
> 
> Looks like it doesn't, the driver was bringing down the usb subsystem
> if a card or the module was removed while one of the interfaces of the
> driver was active before the code you refer was added.

The problem is that, on module unload, the cleanup module function has 
to send a RESET command to each device present:

static void wlan_cleanup_module(void)
{
        int i;

        ENTER();

        for (i = 0; i<libertas_found; i++) {
                wlan_private *priv = libertas_devs[i]->priv;
                reset_device(priv);
        }

Thus the need to know, from the "hardware independent" layer, the number 
of registered devices and pointer to their private structures.



More information about the libertas-dev mailing list