[PATCH] net/wireless/libertas: do not call wiphy_unregister() w/o wiphy_register()

Daniel Mack daniel at caiaq.de
Tue Mar 30 04:52:53 EDT 2010


On Tue, Mar 30, 2010 at 08:49:07AM +0200, Holger Schurig wrote:
> > The libertas driver calls wiphy_unregister() without a prior
> > wiphy_register() when a devices fails initialization. Fix this by
> > introducing a private flag.
> 
> Nice.
> 
> However, I wonder: do we really need a private variable?  Does each driver 
> introduce a private variable for this?

I didn't check other drivers thoroughly. I just saw the comment on the
function which does the wiphy allocation and considered libertas to be
special in the way it deals with the wireless core:

/*
 * At this time lbs_private *priv doesn't even exist, so we just allocate
 * memory and don't initialize the wiphy further. This is postponed until we
 * can talk to the firmware and happens at registration time in
 * lbs_cfg_wiphy_register().
 */

And as I didn't find any function to tell me whether a wiphy has been
registered and not just allocated, I saw no other way than manually
track what the libertas driver does.

If there's any better solution, I'd happily test it.

Thanks,
Daniel




More information about the libertas-dev mailing list