mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 06:03:36 -04:00
[PPPOE]: Introduce pppoe_hdr()
For consistency with all the other skb->nh.raw accessors. Also do some really obvious simplifications in pppoe_recvmsg, well the kfree_skb one is not so obvious, but free() and kfree() have the same behaviour (hint :-) ). Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
37e6636669
commit
797659fb4a
2 changed files with 15 additions and 14 deletions
|
|
@ -112,6 +112,13 @@ struct pppoe_hdr {
|
|||
} __attribute__ ((packed));
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#include <linux/skbuff.h>
|
||||
|
||||
static inline struct pppoe_hdr *pppoe_hdr(const struct sk_buff *skb)
|
||||
{
|
||||
return (struct pppoe_hdr *)skb->nh.raw;
|
||||
}
|
||||
|
||||
struct pppoe_opt {
|
||||
struct net_device *dev; /* device associated with socket*/
|
||||
int ifindex; /* ifindex of device associated with socket */
|
||||
|
|
|
|||
Loading…
Reference in a new issue