drivers/ethernet: Update RX error statistics relevantly
Update such statistic on all drivers. Also, remove TX stats in native and stellaris drivers: such update is done in L2 now. Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This commit is contained in:
parent
952e494bdd
commit
8a8d4d3070
8 changed files with 44 additions and 84 deletions
|
@ -20,6 +20,7 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME);
|
|||
#include <net/net_pkt.h>
|
||||
#include <net/net_if.h>
|
||||
#include <net/ethernet.h>
|
||||
#include <ethernet/eth_stats.h>
|
||||
|
||||
#include "eth_enc28j60_priv.h"
|
||||
|
||||
|
@ -553,6 +554,7 @@ static int eth_enc28j60_rx(struct device *dev)
|
|||
pkt = net_pkt_get_reserve_rx(0, config->timeout);
|
||||
if (!pkt) {
|
||||
LOG_ERR("Could not allocate rx buffer");
|
||||
eth_stats_update_errors_rx(context->iface);
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
@ -565,6 +567,7 @@ static int eth_enc28j60_rx(struct device *dev)
|
|||
pkt_buf = net_pkt_get_frag(pkt, config->timeout);
|
||||
if (!pkt_buf) {
|
||||
LOG_ERR("Could not allocate data buffer");
|
||||
eth_stats_update_errors_rx(context->iface);
|
||||
net_pkt_unref(pkt);
|
||||
|
||||
goto done;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue