All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Mack <daniel@caiaq.de>
To: Holger Schurig <hs4233@mail.mn-solutions.de>
Cc: linux-kernel@vger.kernel.org, Dan Williams <dcbw@redhat.com>,
	"John W. Linville" <linville@tuxdriver.com>,
	Bing Zhao <bzhao@marvell.com>,
	libertas-dev@lists.infradead.org, linux-wireless@vger.kernel.org,
	netdev@vger.kernel.org
Subject: Re: [PATCH] net/wireless/libertas: do not call wiphy_unregister() w/o wiphy_register()
Date: Tue, 30 Mar 2010 10:52:53 +0200	[thread overview]
Message-ID: <20100330085253.GL30801@buzzloop.caiaq.de> (raw)
In-Reply-To: <201003300849.07441.hs4233@mail.mn-solutions.de>

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


  reply	other threads:[~2010-03-30  8:52 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-29 15:14 [PATCH] net/wireless/libertas: do not call wiphy_unregister() w/o wiphy_register() Daniel Mack
2010-03-29 15:14 ` Daniel Mack
2010-03-30  6:49 ` Holger Schurig
2010-03-30  8:52   ` Daniel Mack [this message]
2010-03-30  9:49     ` Holger Schurig
2010-03-30 10:50       ` Daniel Mack
2010-03-30 10:59         ` Holger Schurig
2010-03-30 17:04           ` Dan Williams
2010-03-30 17:04             ` Dan Williams
2010-03-30 17:20             ` John W. Linville
2010-04-08 19:03               ` John W. Linville
2010-04-09 13:51                 ` Holger Schurig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100330085253.GL30801@buzzloop.caiaq.de \
    --to=daniel@caiaq.de \
    --cc=bzhao@marvell.com \
    --cc=dcbw@redhat.com \
    --cc=hs4233@mail.mn-solutions.de \
    --cc=libertas-dev@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.