Crash at boot on 2.6.29-rc5
Bing Zhao
bzhao at marvell.com
Wed Feb 18 16:55:34 EST 2009
> So I think we now need an "lbs_priv()" function to use everywhere we
use
> netdev_priv() or dev->ml_priv. Given that the main netdev doesn't use
> dev->ml_priv, we can use that as a check and do something like:
>
> static inline struct lbs_private *lbs_priv(struct net_device *dev)
> {
> return dev->ml_priv ? dev->ml_priv : netdev_priv(dev);
> }
>
> and thus get the right private structure every time no matter what the
device.
> Seem sane?
>
> Dan
Dan,
As mesh and rtap have already used ml_priv to store priv structure in
netdev, how about pointing main netdev's ml_priv to priv as well? This
way all interfaces (ethX, msh0, rtap0) can use ml_priv to access the
priv data.
@@ -1171,6 +1171,7 @@ struct lbs_private *lbs_add_card(void *card,
struct device *dmdev)
goto done;
}
priv = netdev_priv(dev);
+ dev->ml_priv = priv;
if (lbs_init_adapter(priv)) {
lbs_pr_err("failed to initialize adapter structure.\n");
static inline struct lbs_private *lbs_priv(struct net_device *dev)
{
return dev->ml_priv;
}
Bing
More information about the libertas-dev
mailing list