[RFC] libertas: first stab at cfg80211 support
Holger Schurig
hs4233 at mail.mn-solutions.de
Mon Sep 28 11:24:59 EDT 2009
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
More information about the libertas-dev
mailing list