Skip to content

netdev2_tap: fix strange event_callback argument#4859

Merged
OlegHahm merged 1 commit intoRIOT-OS:masterfrom
miri64:netdev2_tap/fix/strange-isr-arg
Feb 21, 2016
Merged

netdev2_tap: fix strange event_callback argument#4859
OlegHahm merged 1 commit intoRIOT-OS:masterfrom
miri64:netdev2_tap/fix/strange-isr-arg

Conversation

@miri64
Copy link
Copy Markdown
Member

@miri64 miri64 commented Feb 20, 2016

Occurrences like this make me wonder if this value if ever checked for NETDEV2_EVENT_RX_COMPLETE. Some other drivers set it to netdev->isr_arg as this fix does, some leave it NULL.

@miri64 miri64 added Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) Area: network Area: Networking labels Feb 20, 2016
@miri64 miri64 added this to the Release 2016.03 milestone Feb 20, 2016
@miri64 miri64 force-pushed the netdev2_tap/fix/strange-isr-arg branch from 7b5d087 to eb4d985 Compare February 20, 2016 15:08
@kaspar030 kaspar030 added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Feb 20, 2016
@kaspar030
Copy link
Copy Markdown
Contributor

Wow, we're lucky that value never got used.

I remember that in the first incarnation of gnrc_netdev2 I used the argument to distinguish ethernet/iee802154/..., but then decided to use layering à la gnrc_netdev2_eth.

ACK.

OlegHahm added a commit that referenced this pull request Feb 21, 2016
…r-arg

netdev2_tap: fix strange event_callback argument
@OlegHahm OlegHahm merged commit 24e3574 into RIOT-OS:master Feb 21, 2016
@kaspar030
Copy link
Copy Markdown
Contributor

Now that I'm thinking about it ... The argument is not needed at all. isr_arg is saved within netdev2_t, which is passed to the event_callback. No need to carve out one member and supply it again as argument, right?

@miri64 miri64 deleted the netdev2_tap/fix/strange-isr-arg branch February 21, 2016 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: network Area: Networking CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR 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.

3 participants