--- zzzz-none-000/linux-2.6.32.61/include/linux/if_vlan.h 2013-06-10 09:43:48.000000000 +0000 +++ ar9-7330-650/linux-2.6.32.61/include/linux/if_vlan.h 2015-03-02 14:40:02.000000000 +0000 @@ -63,7 +63,12 @@ return (struct vlan_ethhdr *)skb_mac_header(skb); } -#define VLAN_VID_MASK 0xfff +#define VLAN_PRIO_MASK 0xe000 /* Priority Code Point */ +#define VLAN_PRIO_SHIFT 13 +#define VLAN_CFI_MASK 0x1000 /* Canonical Format Indicator */ +#define VLAN_TAG_PRESENT VLAN_CFI_MASK +#define VLAN_VID_MASK 0x0fff /* VLAN Identifier */ +#define VLAN_N_VID 4096 /* found in socket.c */ extern void vlan_ioctl_set(int (*hook)(struct net *, void __user *)); @@ -105,6 +110,16 @@ array[vlan_id % VLAN_GROUP_ARRAY_PART_LEN] = dev; } +/* + * AVM: backport from 2.6.39, make is_vlan_dev public + * + * commit 6dcbbe25dcc9bd2bdeb4f685f8fb874ffc10e6be: net: move is_vlan_dev into public header file (v2) + */ +static inline int is_vlan_dev(struct net_device *dev) +{ + return dev->priv_flags & IFF_802_1Q_VLAN; +} + #define vlan_tx_tag_present(__skb) ((__skb)->vlan_tci) #define vlan_tx_tag_get(__skb) ((__skb)->vlan_tci) @@ -121,39 +136,39 @@ unsigned int vlan_tci); #else -static inline struct net_device *vlan_dev_real_dev(const struct net_device *dev) +static inline struct net_device *vlan_dev_real_dev(const struct net_device *dev __attribute__ ((unused))) { BUG(); return NULL; } -static inline u16 vlan_dev_vlan_id(const struct net_device *dev) +static inline u16 vlan_dev_vlan_id(const struct net_device *dev __attribute__ ((unused))) { BUG(); return 0; } -static inline int __vlan_hwaccel_rx(struct sk_buff *skb, struct vlan_group *grp, - u16 vlan_tci, int polling) +static inline int __vlan_hwaccel_rx(struct sk_buff *skb __attribute__ ((unused)), struct vlan_group *grp __attribute__ ((unused)), + u16 vlan_tci __attribute__ ((unused)), int polling __attribute__ ((unused))) { BUG(); return NET_XMIT_SUCCESS; } -static inline int vlan_hwaccel_do_receive(struct sk_buff *skb) +static inline int vlan_hwaccel_do_receive(struct sk_buff *skb __attribute__ ((unused))) { return 0; } -static inline int vlan_gro_receive(struct napi_struct *napi, - struct vlan_group *grp, - unsigned int vlan_tci, struct sk_buff *skb) +static inline int vlan_gro_receive(struct napi_struct *napi __attribute__ ((unused)), + struct vlan_group *grp __attribute__ ((unused)), + unsigned int vlan_tci __attribute__ ((unused)), struct sk_buff *skb __attribute__ ((unused))) { return NET_RX_DROP; } -static inline int vlan_gro_frags(struct napi_struct *napi, - struct vlan_group *grp, unsigned int vlan_tci) +static inline int vlan_gro_frags(struct napi_struct *napi __attribute__ ((unused)), + struct vlan_group *grp __attribute__ ((unused)), unsigned int vlan_tci __attribute__ ((unused))) { return NET_RX_DROP; }