[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100330085253.GL30801@buzzloop.caiaq.de>
Date: Tue, 30 Mar 2010 10:52:53 +0200
From: Daniel Mack <daniel@...aq.de>
To: Holger Schurig <hs4233@...l.mn-solutions.de>
Cc: linux-kernel@...r.kernel.org, Dan Williams <dcbw@...hat.com>,
"John W. Linville" <linville@...driver.com>,
Bing Zhao <bzhao@...vell.com>,
libertas-dev@...ts.infradead.org, linux-wireless@...r.kernel.org,
netdev@...r.kernel.org
Subject: Re: [PATCH] net/wireless/libertas: do not call wiphy_unregister()
w/o wiphy_register()
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists