-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
at86rf2xx_netdev: fix broken pending_tx handling #5289
Conversation
if (dev->pending_tx > 0) { | ||
dev->pending_tx--; | ||
} | ||
|
||
if (dev->pending_tx == 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about --dev->pending_tx == 0
instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it guaranteed that dev->pending_tx != 0
when entering this code path? I could also put an assert there, whadayasay?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assert
may make sense indeed. pending_tx
should always be > 0 for this code path...
addressed comments |
ACK - please squash. |
c0c9805
to
9b01c6d
Compare
squashed |
Currently,
at86rf2xx_netdev
is broken.The driver will never go into
idle
state, becausedev->pending_tx
is decreased after the decision is made whether the device should go to idle or not.Result: no outgoing packets anymore. Can be tested on the iotlab testbed. ping doesn't work anymore.
The second commit is just a bonus and transforms a
printf
into aDEBUG
.