소스 검색

[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 13 년 전
부모
커밋
5273c2748c
2개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 2
    0
      src/include/ipxe/vlan.h
  2. 1
    2
      src/net/vlan.c

+ 2
- 0
src/include/ipxe/vlan.h 파일 보기

@@ -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 파일 보기

@@ -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
 

Loading…
취소
저장