]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[vlan] Expose vlan_find() to network card drivers
authorMichael Brown <mcb30@ipxe.org>
Wed, 1 Dec 2010 18:46:50 +0000 (18:46 +0000)
committerMichael Brown <mcb30@ipxe.org>
Wed, 1 Dec 2010 18:46:50 +0000 (18:46 +0000)
Some network cards automatically strip the VLAN header, providing the
VLAN tag via a side channel such as a completion queue entry.  These
cards need to be able to report receive completions directly against
the relevant VLAN device.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/include/ipxe/vlan.h
src/net/vlan.c

index c9a9821a25708b008c25cb289ae1fb2a37c08621..d9f4484e6bc0e76731b5449912c082efb56f6be2 100644 (file)
@@ -59,6 +59,8 @@ struct vlan_header {
  */
 #define VLAN_PRIORITY_IS_VALID( priority ) ( (priority) <= 7 )
 
+extern struct net_device * vlan_find ( struct net_device *trunk,
+                                      unsigned int tag );
 extern int vlan_can_be_trunk ( struct net_device *trunk );
 extern int vlan_create ( struct net_device *trunk, unsigned int tag,
                         unsigned int priority );
index 4440fd84f3226a1cbf5b7eeb8f59a87f8d0b2909..9ac560f1e8a0a9594eac85015d48192752e2fc38 100644 (file)
@@ -193,8 +193,7 @@ static void vlan_sync ( struct net_device *netdev ) {
  * @v tag              VLAN tag
  * @ret netdev         VLAN device, if any
  */
-static struct net_device * vlan_find ( struct net_device *trunk,
-                                      uint16_t tag ) {
+struct net_device * vlan_find ( struct net_device *trunk, unsigned int tag ) {
        struct net_device *netdev;
        struct vlan_device *vlan;