You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
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>
This commit is contained in:
committed by
David S. Miller
parent
80d5c3689b
commit
1fd9b1fc31
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user