diff mbox series

[wpan-next,v3,05/11] net: ieee802154: at86rf230: Assume invalid TRAC if not recognized

Message ID 20220303182508.288136-6-miquel.raynal@bootlin.com (mailing list archive)
State Awaiting Upstream
Delegated to: Netdev Maintainers
Headers show
Series ieee802154: Better Tx error handling | expand

Checks

Context Check Description
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Series has a cover letter
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers success CCed 6 of 6 maintainers
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 7 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/tree_selection success Guessing tree name failed - patch did not apply

Commit Message

Miquel Raynal March 3, 2022, 6:25 p.m. UTC
The TRAC register gives the MAC error codes if any. If the TRAC register
reports a value that is unknown, we should probably assume that it is
invalid.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
 drivers/net/ieee802154/at86rf230.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Alexander Aring March 13, 2022, 8:06 p.m. UTC | #1
Hi,

On Thu, Mar 3, 2022 at 1:25 PM Miquel Raynal <miquel.raynal@bootlin.com> wrote:
>
> The TRAC register gives the MAC error codes if any. If the TRAC register
> reports a value that is unknown, we should probably assume that it is
> invalid.
>

Can we instead revert 493bc90a9683 ("at86rf230: add debugfs support")
it was introduced because of some testing stuff with ack handling but
now we have an error. We might add a stats handling for such errors in
the 802.15.4 core in future to get it on a per neighbor basis.

- Alex
diff mbox series

Patch

diff --git a/drivers/net/ieee802154/at86rf230.c b/drivers/net/ieee802154/at86rf230.c
index 563031ce76f0..616acfa8cd28 100644
--- a/drivers/net/ieee802154/at86rf230.c
+++ b/drivers/net/ieee802154/at86rf230.c
@@ -694,6 +694,7 @@  at86rf230_tx_trac_check(void *context)
 			break;
 		default:
 			WARN_ONCE(1, "received tx trac status %d\n", trac);
+			lp->trac.invalid++;
 			break;
 		}
 	}