mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-10-05 22:29:49 +00:00
Use LINK_STATS_INC instead of #if LINK_STATS...
This commit is contained in:
parent
6e612e5def
commit
7f3cff6e09
@ -145,9 +145,7 @@ low_level_output(struct netif *netif, struct pbuf *p)
|
|||||||
pbuf_header(p, ETH_PAD_SIZE); /* reclaim the padding word */
|
pbuf_header(p, ETH_PAD_SIZE); /* reclaim the padding word */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if LINK_STATS
|
LINK_STATS_INC(link.xmit);
|
||||||
lwip_stats.link.xmit++;
|
|
||||||
#endif /* LINK_STATS */
|
|
||||||
|
|
||||||
return ERR_OK;
|
return ERR_OK;
|
||||||
}
|
}
|
||||||
@ -198,15 +196,11 @@ low_level_input(struct netif *netif)
|
|||||||
pbuf_header(p, ETH_PAD_SIZE); /* reclaim the padding word */
|
pbuf_header(p, ETH_PAD_SIZE); /* reclaim the padding word */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if LINK_STATS
|
LINK_STATS_INC(link.recv);
|
||||||
lwip_stats.link.recv++;
|
|
||||||
#endif /* LINK_STATS */
|
|
||||||
} else {
|
} else {
|
||||||
drop packet();
|
drop packet();
|
||||||
#if LINK_STATS
|
LINK_STATS_INC(link.memerr);
|
||||||
lwip_stats.link.memerr++;
|
LINK_STATS_INC(link.drop);
|
||||||
lwip_stats.link.drop++;
|
|
||||||
#endif /* LINK_STATS */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return p;
|
return p;
|
||||||
|
Loading…
Reference in New Issue
Block a user