summaryrefslogtreecommitdiffstats
path: root/net/8021q/vlan_mvrp.c
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2013-04-19 02:04:29 +0000
committerDavid S. Miller <davem@davemloft.net>2013-04-19 14:45:27 -0400
commit1fd9b1fc310314911f66d2f14a8e4f0ef37bf47b (patch)
tree20422146c46fb38a5cdd0d14e671a0793c3389b4 /net/8021q/vlan_mvrp.c
parent80d5c3689b886308247da295a228a54df49a44f6 (diff)
downloadop-kernel-dev-1fd9b1fc310314911f66d2f14a8e4f0ef37bf47b.zip
op-kernel-dev-1fd9b1fc310314911f66d2f14a8e4f0ef37bf47b.tar.gz
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 <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/8021q/vlan_mvrp.c')
-rw-r--r--net/8021q/vlan_mvrp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/8021q/vlan_mvrp.c b/net/8021q/vlan_mvrp.c
index d9ec1d5..e0fe091 100644
--- a/net/8021q/vlan_mvrp.c
+++ b/net/8021q/vlan_mvrp.c
@@ -38,6 +38,8 @@ int vlan_mvrp_request_join(const struct net_device *dev)
const struct vlan_dev_priv *vlan = vlan_dev_priv(dev);
__be16 vlan_id = htons(vlan->vlan_id);
+ if (vlan->vlan_proto != htons(ETH_P_8021Q))
+ return 0;
return mrp_request_join(vlan->real_dev, &vlan_mrp_app,
&vlan_id, sizeof(vlan_id), MVRP_ATTR_VID);
}
@@ -47,6 +49,8 @@ void vlan_mvrp_request_leave(const struct net_device *dev)
const struct vlan_dev_priv *vlan = vlan_dev_priv(dev);
__be16 vlan_id = htons(vlan->vlan_id);
+ if (vlan->vlan_proto != htons(ETH_P_8021Q))
+ return;
mrp_request_leave(vlan->real_dev, &vlan_mrp_app,
&vlan_id, sizeof(vlan_id), MVRP_ATTR_VID);
}
OpenPOWER on IntegriCloud