Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[vlan] Expose vlan_find() to network card drivers
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>
  • Loading branch information
mcb30 committed Dec 1, 2010
1 parent 51a9e51 commit 5273c27
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/include/ipxe/vlan.h
Expand Up @@ -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 );
Expand Down
3 changes: 1 addition & 2 deletions src/net/vlan.c
Expand Up @@ -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;

Expand Down

0 comments on commit 5273c27

Please sign in to comment.