Messages in this thread |  | | | Subject | Re: [PATCH v2] Re: WAN: new PPP code for generic HDLC | | From | Krzysztof Halasa <> | | Date | Wed, 14 May 2008 18:17:41 +0200 |
| |
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@davemloft.net> 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
|  |