Commit 2be9ef13 authored by Martin Jeřábek's avatar Martin Jeřábek
Browse files

driver: correctly handle dropped TX packets (resolve TODOs)

parent 82d6a647
......@@ -595,14 +595,24 @@ static void ctucan_tx_interrupt(struct net_device *ndev)
stats->tx_packets++;
break;
case TXT_ERR:
/* This indicated that retransmit limit has been
* reached. Obviously we should not echo the
* frame, but also not indicate any kind of error.
* If desired, it was already reported (possible
* multiple times) on each arbitration lost.
*/
netdev_warn(ndev, "TXB in Error state");
can_free_echo_skb(ndev, txb_idx);
// TODO: send some error frame - but what should it contain?
stats->tx_dropped++;
break;
case TXT_ABT:
/* Same as for TXT_ERR, only with different
* cause. We *could* re-queue the frame, but
* multiqueue/abort is not supported yet anyway.
*/
netdev_warn(ndev, "TXB in Aborted state");
can_free_echo_skb(ndev, txb_idx);
// TODO: send some error frame - but what should it contain?
stats->tx_dropped++;
break;
default:
/* Bug only if the first buffer is not finished,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment