public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
From: Holger Schurig <hs4233@mail.mn-solutions.de>
To: libertas-dev@lists.infradead.org
Cc: linux-wireless <linux-wireless@vger.kernel.org>,
	Dan Williams <dcbw@redhat.com>
Subject: Re: [RFC] libertas: first stab at cfg80211 support
Date: Mon, 28 Sep 2009 17:24:59 +0200	[thread overview]
Message-ID: <200909281724.59854.hs4233@mail.mn-solutions.de> (raw)
In-Reply-To: <200909281321.21600.h.schurig@mn-solutions.de>

Hmm, I see two problems with my code:

> +struct wireless_dev *lbs_wdev_alloc(int sizeof_priv, struct 
device *dev)
> +{
...
> +	wdev->wiphy = wiphy_new(&lbs_cfg80211_ops,
> +		sizeof(struct lbs_private) + sizeof_priv);
...

and later:

> +	wdev = lbs_wdev_alloc(sizeof(struct lbs_private), dmdev);

That's rubbish, I now allocate "sizeof(lbs_private)" bytes twice.



Another thing is that it might be necessary to unbundle the
call of "wiphy_new()" and wiphy_register().

I need lbs_private allocated and usable, e.g. in 
lbs_start_card().

Later, in lbs_start_card(), when I query the firmware about it's 
capabilites I know enought to populate wiphy->bands. Only then 
should I call wiphy_register().

-- 
http://www.holgerschurig.de

  parent reply	other threads:[~2009-09-28 15:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-28 11:21 [RFC] libertas: first stab at cfg80211 support Holger Schurig
2009-09-28 13:31 ` Johannes Berg
2009-09-28 14:54   ` Holger Schurig
2009-09-28 14:57     ` Johannes Berg
2009-09-28 15:07       ` Holger Schurig
2009-09-28 15:24 ` Holger Schurig [this message]
2009-10-01 18:23 ` Dan Williams

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=200909281724.59854.hs4233@mail.mn-solutions.de \
    --to=hs4233@mail.mn-solutions.de \
    --cc=dcbw@redhat.com \
    --cc=libertas-dev@lists.infradead.org \
    --cc=linux-wireless@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox