diff options
author | Patrick McHardy <kaber@trash.net> | 2013-04-18 22:04:28 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-04-19 14:45:27 -0400 |
commit | 80d5c3689b886308247da295a228a54df49a44f6 (patch) | |
tree | ce7b1e6898c3f9fea945e67fd06b125dfcc61fe7 /include | |
parent | f646968f8f7c624587de729115d802372b9063dd (diff) |
net: vlan: prepare for 802.1ad VLAN filtering offload
Change the rx_{add,kill}_vid callbacks to take a protocol argument in
preparation of 802.1ad support. The protocol argument used so far is
always htons(ETH_P_8021Q).
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/if_vlan.h | 4 | ||||
-rw-r--r-- | include/linux/netdevice.h | 16 |
2 files changed, 9 insertions, 11 deletions
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h index fee28291a824..fcb9ef82aae1 100644 --- a/include/linux/if_vlan.h +++ b/include/linux/if_vlan.h | |||
@@ -93,8 +93,8 @@ extern u16 vlan_dev_vlan_id(const struct net_device *dev); | |||
93 | extern bool vlan_do_receive(struct sk_buff **skb); | 93 | extern bool vlan_do_receive(struct sk_buff **skb); |
94 | extern struct sk_buff *vlan_untag(struct sk_buff *skb); | 94 | extern struct sk_buff *vlan_untag(struct sk_buff *skb); |
95 | 95 | ||
96 | extern int vlan_vid_add(struct net_device *dev, unsigned short vid); | 96 | extern int vlan_vid_add(struct net_device *dev, __be16 proto, u16 vid); |
97 | extern void vlan_vid_del(struct net_device *dev, unsigned short vid); | 97 | extern void vlan_vid_del(struct net_device *dev, __be16 proto, u16 vid); |
98 | 98 | ||
99 | extern int vlan_vids_add_by_dev(struct net_device *dev, | 99 | extern int vlan_vids_add_by_dev(struct net_device *dev, |
100 | const struct net_device *by_dev); | 100 | const struct net_device *by_dev); |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 7eb7e03ee417..f8898a435dc5 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -784,15 +784,13 @@ struct netdev_fcoe_hbainfo { | |||
784 | * 3. Update dev->stats asynchronously and atomically, and define | 784 | * 3. Update dev->stats asynchronously and atomically, and define |
785 | * neither operation. | 785 | * neither operation. |
786 | * | 786 | * |
787 | * int (*ndo_vlan_rx_add_vid)(struct net_device *dev, unsigned short vid); | 787 | * int (*ndo_vlan_rx_add_vid)(struct net_device *dev, __be16 proto, u16t vid); |
788 | * If device support VLAN filtering (dev->features & | 788 | * If device support VLAN filtering this function is called when a |
789 | * NETIF_F_HW_VLAN_CTAG_FILTER) | 789 | * VLAN id is registered. |
790 | * this function is called when a VLAN id is registered. | ||
791 | * | 790 | * |
792 | * int (*ndo_vlan_rx_kill_vid)(struct net_device *dev, unsigned short vid); | 791 | * int (*ndo_vlan_rx_kill_vid)(struct net_device *dev, unsigned short vid); |
793 | * If device support VLAN filtering (dev->features & | 792 | * If device support VLAN filtering this function is called when a |
794 | * NETIF_F_HW_VLAN_CTAG_FILTER) | 793 | * VLAN id is unregistered. |
795 | * this function is called when a VLAN id is unregistered. | ||
796 | * | 794 | * |
797 | * void (*ndo_poll_controller)(struct net_device *dev); | 795 | * void (*ndo_poll_controller)(struct net_device *dev); |
798 | * | 796 | * |
@@ -936,9 +934,9 @@ struct net_device_ops { | |||
936 | struct net_device_stats* (*ndo_get_stats)(struct net_device *dev); | 934 | struct net_device_stats* (*ndo_get_stats)(struct net_device *dev); |
937 | 935 | ||
938 | int (*ndo_vlan_rx_add_vid)(struct net_device *dev, | 936 | int (*ndo_vlan_rx_add_vid)(struct net_device *dev, |
939 | unsigned short vid); | 937 | __be16 proto, u16 vid); |
940 | int (*ndo_vlan_rx_kill_vid)(struct net_device *dev, | 938 | int (*ndo_vlan_rx_kill_vid)(struct net_device *dev, |
941 | unsigned short vid); | 939 | __be16 proto, u16 vid); |
942 | #ifdef CONFIG_NET_POLL_CONTROLLER | 940 | #ifdef CONFIG_NET_POLL_CONTROLLER |
943 | void (*ndo_poll_controller)(struct net_device *dev); | 941 | void (*ndo_poll_controller)(struct net_device *dev); |
944 | int (*ndo_netpoll_setup)(struct net_device *dev, | 942 | int (*ndo_netpoll_setup)(struct net_device *dev, |