diff options
author | Jiri Pirko <jpirko@redhat.com> | 2011-12-07 23:11:17 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-12-08 19:52:42 -0500 |
commit | 87002b03baabd2b8f6281ab6411ed88d24958de1 (patch) | |
tree | 0e5730c0d1ba887488ba420d4ea89a230f272c51 /include/linux/if_vlan.h | |
parent | 8e586137e6b63af1e881b328466ab5ffbe562510 (diff) |
net: introduce vlan_vid_[add/del] and use them instead of direct [add/kill]_vid ndo calls
This patch adds wrapper for ndo_vlan_rx_add_vid/ndo_vlan_rx_kill_vid
functions. Check for NETIF_F_HW_VLAN_FILTER feature is done in this
wrapper.
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/if_vlan.h')
-rw-r--r-- | include/linux/if_vlan.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h index 31d7c976f063..71168a6f3347 100644 --- a/include/linux/if_vlan.h +++ b/include/linux/if_vlan.h | |||
@@ -109,6 +109,9 @@ extern u16 vlan_dev_vlan_id(const struct net_device *dev); | |||
109 | extern bool vlan_do_receive(struct sk_buff **skb, bool last_handler); | 109 | extern bool vlan_do_receive(struct sk_buff **skb, bool last_handler); |
110 | extern struct sk_buff *vlan_untag(struct sk_buff *skb); | 110 | extern struct sk_buff *vlan_untag(struct sk_buff *skb); |
111 | 111 | ||
112 | extern int vlan_vid_add(struct net_device *dev, unsigned short vid); | ||
113 | extern void vlan_vid_del(struct net_device *dev, unsigned short vid); | ||
114 | |||
112 | #else | 115 | #else |
113 | static inline struct net_device * | 116 | static inline struct net_device * |
114 | __vlan_find_dev_deep(struct net_device *real_dev, u16 vlan_id) | 117 | __vlan_find_dev_deep(struct net_device *real_dev, u16 vlan_id) |
@@ -139,6 +142,15 @@ static inline struct sk_buff *vlan_untag(struct sk_buff *skb) | |||
139 | { | 142 | { |
140 | return skb; | 143 | return skb; |
141 | } | 144 | } |
145 | |||
146 | static inline int vlan_vid_add(struct net_device *dev, unsigned short vid) | ||
147 | { | ||
148 | return 0; | ||
149 | } | ||
150 | |||
151 | static inline void vlan_vid_del(struct net_device *dev, unsigned short vid) | ||
152 | { | ||
153 | } | ||
142 | #endif | 154 | #endif |
143 | 155 | ||
144 | /** | 156 | /** |