drivers: nxp_enet: Fix tx error handling
The code path for error handling and timestamping in tx path was meant to be identical in function to old eth_mcux driver, but there is actually a discrepancy causing no error handling for timestamped frames, fix it. Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
This commit is contained in:
parent
9abc17b034
commit
b29190c314
1 changed files with 5 additions and 4 deletions
|
|
@ -224,15 +224,16 @@ static int eth_nxp_enet_tx(const struct device *dev, struct net_pkt *pkt)
|
|||
|
||||
ret = ENET_SendFrame(data->base, &data->enet_handle, data->tx_frame_buf,
|
||||
total_len, RING_ID, frame_is_timestamped, pkt);
|
||||
if (ret == kStatus_Success) {
|
||||
|
||||
if (ret != kStatus_Success) {
|
||||
LOG_ERR("ENET_SendFrame error: %d", ret);
|
||||
ENET_ReclaimTxDescriptor(data->base, &data->enet_handle, RING_ID);
|
||||
ret = -EIO;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (frame_is_timestamped) {
|
||||
eth_wait_for_ptp_ts(dev, pkt);
|
||||
} else {
|
||||
LOG_ERR("ENET_SendFrame error: %d", ret);
|
||||
ENET_ReclaimTxDescriptor(data->base, &data->enet_handle, RING_ID);
|
||||
}
|
||||
|
||||
exit:
|
||||
|
|
|
|||
Loading…
Reference in a new issue