Skip to content
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

Merged
merged 2 commits into from
Apr 11, 2016

Conversation

cgundogan
Copy link
Member

Currently, at86rf2xx_netdev is broken.
The driver will never go into idle state, because dev->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 a DEBUG.

@cgundogan cgundogan added Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) Area: network Area: Networking Area: drivers Area: Device drivers labels Apr 11, 2016
@cgundogan cgundogan added this to the Release 2016.04 milestone Apr 11, 2016
@cgundogan cgundogan added the Impact: major The PR changes a significant part of the code base. It should be reviewed carefully label Apr 11, 2016
if (dev->pending_tx > 0) {
dev->pending_tx--;
}

if (dev->pending_tx == 0) {
Copy link
Member

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?

Copy link
Member Author

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?

Copy link
Member

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...

@cgundogan
Copy link
Member Author

addressed comments

@cgundogan cgundogan added the CI: needs squashing Commits in this PR need to be squashed; If set, CI systems will mark this PR as unmergable label Apr 11, 2016
@OlegHahm
Copy link
Member

ACK - please squash.

@cgundogan cgundogan added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR and removed CI: needs squashing Commits in this PR need to be squashed; If set, CI systems will mark this PR as unmergable labels Apr 11, 2016
@cgundogan
Copy link
Member Author

squashed

@OlegHahm OlegHahm merged commit 70a2d68 into RIOT-OS:master Apr 11, 2016
@cgundogan cgundogan deleted the pr/at86rf2xx_netdev/fix branch April 11, 2016 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: drivers Area: Device drivers Area: network Area: Networking CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Impact: major The PR changes a significant part of the code base. It should be reviewed carefully Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants