[diag] handle errors of TransmitPacket() (#11076)

`TransmitPacket()` should return an error from platform Radio
implementation, as for example Radio can be in incorrect state.

If error occurs, increase `mSentErrorInvalidStatePackets` stat.

Add wrong state case to tests and fix `diag repeat stop` called
too lata.

Signed-off-by: Maciej Baczmanski <[email protected]>
This commit is contained in:
Maciej Baczmański
2025-01-09 10:47:40 -08:00
committed by GitHub
parent e7f8f75320
commit d7a266856f
6 changed files with 46 additions and 14 deletions
+1
View File
@@ -58,6 +58,7 @@ class TestDiag(thread_cert.TestCase):
'sent success packets: 0\r\n'
'sent error cca packets: 0\r\n'
'sent error abort packets: 0\r\n'
'sent error invalid state packets: 0\r\n'
'sent error others packets: 0\r\n'
'first received packet: rssi=0, lqi=0\r\n'
'last received packet: rssi=0, lqi=0\r\n',