mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-02-04 12:39:58 +00:00
fix compiling ETHARP_SUPPORT_VLAN without LWIP_HOOK_VLAN_SET and LWIP_VLAN_PCP
This commit is contained in:
parent
153c295b6f
commit
f72227aadc
@ -273,7 +273,7 @@ ethernet_output(struct netif * netif, struct pbuf * p,
|
|||||||
struct eth_hdr *ethhdr;
|
struct eth_hdr *ethhdr;
|
||||||
u16_t eth_type_be = lwip_htons(eth_type);
|
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;
|
s32_t vlan_prio_vid;
|
||||||
#ifdef LWIP_HOOK_VLAN_SET
|
#ifdef LWIP_HOOK_VLAN_SET
|
||||||
vlan_prio_vid = LWIP_HOOK_VLAN_SET(netif, p, src, dst, eth_type);
|
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);
|
eth_type_be = PP_HTONS(ETHTYPE_VLAN);
|
||||||
} else
|
} 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) {
|
if (pbuf_add_header(p, SIZEOF_ETH_HDR) != 0) {
|
||||||
goto pbuf_header_failed;
|
goto pbuf_header_failed;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user