aboutsummaryrefslogtreecommitdiff
path: root/src/net/vlan.c
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2022-12-09 14:40:54 +0000
committerMichael Brown <mcb30@ipxe.org>2022-12-14 11:05:37 +0000
commit5e62b4bc6c7bd7c6929b3fe540fb1ba8744fd16c (patch)
tree2092637af99dc3396ce2d949fe327b30d4c9160c /src/net/vlan.c
parentb0ded89e917b48b73097d3b8b88dfa3afb264ed0 (diff)
downloadipxe-5e62b4bc6c7bd7c6929b3fe540fb1ba8744fd16c.zip
ipxe-5e62b4bc6c7bd7c6929b3fe540fb1ba8744fd16c.tar.gz
ipxe-5e62b4bc6c7bd7c6929b3fe540fb1ba8744fd16c.tar.bz2
[vlan] Allow external code to identify VLAN priority as well as tag
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/net/vlan.c')
-rw-r--r--src/net/vlan.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/net/vlan.c b/src/net/vlan.c
index 90f2934..fe44886 100644
--- a/src/net/vlan.c
+++ b/src/net/vlan.c
@@ -288,17 +288,17 @@ struct net_protocol vlan_protocol __net_protocol = {
};
/**
- * Get the VLAN tag
+ * Get the VLAN tag control information
*
* @v netdev Network device
- * @ret tag VLAN tag, or 0 if device is not a VLAN device
+ * @ret tci VLAN tag control information, or 0 if not a VLAN device
*/
-unsigned int vlan_tag ( struct net_device *netdev ) {
+unsigned int vlan_tci ( struct net_device *netdev ) {
struct vlan_device *vlan;
if ( netdev->op == &vlan_operations ) {
vlan = netdev->priv;
- return vlan->tag;
+ return ( VLAN_TCI ( vlan->tag, vlan->priority ) );
} else {
return 0;
}