Przeglądaj źródła

[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>
tags/v1.20.1
Michael Brown 14 lat temu
rodzic
commit
5273c2748c
2 zmienionych plików z 3 dodań i 2 usunięć
  1. 2
    0
      src/include/ipxe/vlan.h
  2. 1
    2
      src/net/vlan.c

+ 2
- 0
src/include/ipxe/vlan.h Wyświetl plik

@@ -59,6 +59,8 @@ struct vlan_header {
59 59
  */
60 60
 #define VLAN_PRIORITY_IS_VALID( priority ) ( (priority) <= 7 )
61 61
 
62
+extern struct net_device * vlan_find ( struct net_device *trunk,
63
+				       unsigned int tag );
62 64
 extern int vlan_can_be_trunk ( struct net_device *trunk );
63 65
 extern int vlan_create ( struct net_device *trunk, unsigned int tag,
64 66
 			 unsigned int priority );

+ 1
- 2
src/net/vlan.c Wyświetl plik

@@ -193,8 +193,7 @@ static void vlan_sync ( struct net_device *netdev ) {
193 193
  * @v tag		VLAN tag
194 194
  * @ret netdev		VLAN device, if any
195 195
  */
196
-static struct net_device * vlan_find ( struct net_device *trunk,
197
-				       uint16_t tag ) {
196
+struct net_device * vlan_find ( struct net_device *trunk, unsigned int tag ) {
198 197
 	struct net_device *netdev;
199 198
 	struct vlan_device *vlan;
200 199
 

Ładowanie…
Anuluj
Zapisz