1 Star 0 Fork 48

shafeipaozi/lwip

forked from src-openEuler/lwip 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-fix-compiling-ETHARP_SUPPORT_VLAN.patch 1.19 KB
一键复制 编辑 原始数据 按行查看 历史
compile_success 提交于 2023-11-03 14:13 . add vlan support
From f72227aadcc1d0d8c46a8b4fe62ba3d03ffa42c3 Mon Sep 17 00:00:00 2001
From: Simon Goldschmidt <[email protected]>
Date: Wed, 7 Nov 2018 10:49:06 +0100
Subject: [PATCH] fix compiling ETHARP_SUPPORT_VLAN without LWIP_HOOK_VLAN_SET
and LWIP_VLAN_PCP
---
src/netif/ethernet.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/netif/ethernet.c b/src/netif/ethernet.c
index 9e367f8cc..6db434b46 100644
--- a/src/netif/ethernet.c
+++ b/src/netif/ethernet.c
@@ -273,7 +273,7 @@ ethernet_output(struct netif * netif, struct pbuf * p,
struct eth_hdr *ethhdr;
u16_t eth_type_be = lwip_htons(eth_type);
-#if ETHARP_SUPPORT_VLAN
+#if ETHARP_SUPPORT_VLAN && (defined(LWIP_HOOK_VLAN_SET) || LWIP_VLAN_PCP)
s32_t vlan_prio_vid;
#ifdef LWIP_HOOK_VLAN_SET
vlan_prio_vid = LWIP_HOOK_VLAN_SET(netif, p, src, dst, eth_type);
@@ -297,7 +297,7 @@ ethernet_output(struct netif * netif, struct pbuf * p,
eth_type_be = PP_HTONS(ETHTYPE_VLAN);
} else
-#endif /* ETHARP_SUPPORT_VLAN && defined(LWIP_HOOK_VLAN_SET) */
+#endif /* ETHARP_SUPPORT_VLAN && (defined(LWIP_HOOK_VLAN_SET) || LWIP_VLAN_PCP) */
{
if (pbuf_add_header(p, SIZEOF_ETH_HDR) != 0) {
goto pbuf_header_failed;
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/shafeipaozi/lwip.git
[email protected]:shafeipaozi/lwip.git
shafeipaozi
lwip
lwip
master

搜索帮助