Re: [PATCH v2] Re: WAN: new PPP code for generic HDLC

From: Krzysztof Halasa
Date: Wed May 14 2008 - 12:18:15 EST


BTW: The dev->ml_priv addition is obviously a good step but I guess
you don't need the dev->priv hackery duplicated with dev->ml_priv.

Can't test it at the moment but I'd leave dev->priv alone and only get
rid of the syncppp_ptr here. Then I'd simply use dev->ml_priv as
syncppp_ptr and dev->priv would be a private driver pointer, as
usual. Generic HDLC uses dev->priv for itself but the relevant hw
drivers use hdlc->priv instead so it's not a problem.

When syncppp.c is removed we can use dev->ml_priv for HDLC layer,
dev->priv for hw driver, and hdlc->priv would be no longer needed.

I mean the following:

David Miller <davem@xxxxxxxxxxxxx> writes:

> --- a/include/net/syncppp.h
> +++ b/include/net/syncppp.h
> @@ -59,7 +59,7 @@ struct ppp_device
>
> static inline struct sppp *sppp_of(struct net_device *dev)
> {
> - struct ppp_device **ppp = dev->priv;
> + struct ppp_device **ppp = dev->ml_priv;
> BUG_ON((*ppp)->dev != dev);
> return &(*ppp)->sppp;
> }

would become:

static inline struct sppp *sppp_of(struct net_device *dev)
{
return dev->ml_priv;
}

The changes are not automatic, I'll look at it when able.
--
Krzysztof Halasa
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/