Skip to content

at86rf2xx_netdev: fix broken pending_tx handling#5289

Merged
OlegHahm merged 2 commits intoRIOT-OS:masterfrom
cgundogan:pr/at86rf2xx_netdev/fix
Apr 11, 2016
Merged

at86rf2xx_netdev: fix broken pending_tx handling#5289
OlegHahm merged 2 commits intoRIOT-OS:masterfrom
cgundogan:pr/at86rf2xx_netdev/fix

Conversation

@cgundogan
Copy link
Copy Markdown
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
dev->pending_tx--;
}

if (dev->pending_tx == 0) {
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member

ACK - please squash.

@cgundogan cgundogan force-pushed the pr/at86rf2xx_netdev/fix branch from c0c9805 to 9b01c6d Compare April 11, 2016 11:15
@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
Copy Markdown
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