net: vlan: prepare for 802.1ad support

Make the encapsulation protocol value a property of VLAN devices and change
the device lookup functions to take the protocol value into account.

Signed-off-by: Patrick McHardy <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
Patrick McHardy 2013-04-19 02:04:29 +00:00 • committed by David S. Miller
commit 1fd9b1fc31
12 changed files with 108 additions and 84 deletions

View file

@ -535,7 +535,8 @@ static struct net_device *brnf_get_logical_dev(struct sk_buff *skb, const struct
if (brnf_pass_vlan_indev == 0 || !vlan_tx_tag_present(skb))
return br;
vlan = __vlan_find_dev_deep(br, vlan_tx_tag_get(skb) & VLAN_VID_MASK);
vlan = __vlan_find_dev_deep(br, htons(ETH_P_8021Q),
vlan_tx_tag_get(skb) & VLAN_VID_MASK);
return vlan ? vlan : br;
}