-
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
drivers: Introduce a general interface for network device drivers #1492
Conversation
Can someone with a cc2420 board test if this works? |
@LudwigOrtmann you might want to review, too, now that I started to adapt |
I'd like to but I'm mostly out of resources right now and the PR is so intimidating. |
When I'm done with native I'll write some tests :-) |
Rebased and squashed. Will provide tests tomorrow. |
Rebased and squashed |
Had to rebase and used the chance to squash some commits. |
I'm done \o/ |
No you're not, buildtest fails for |
Orrr, MSP430-libc! Was kannst du eigentlich?!!? |
Now it should work. |
I do not really understand why the unittests fail oO. On my machine everything is running smoothly |
ping? |
dc4e169
to
0cda0fa
Compare
Needed to rebasedue to Makefile-change in #1714 |
0cda0fa
to
e58ce9b
Compare
Split into 4 PRs (including this one) to simplify review (hopefully). Dependency graph is as follows:
|
Maybe I'm going to say something stupid, but... doesn't this "one size fits all" API change make everything more complex? I kind of feel that the drivers/include/netdev/base.h file contains many elements that have few relations to each other (e.g.: very low-level details like hardware addresses in host byte order, along with high-level layers like TCP or CCN)...This "semantic mix" makes me uneasy. Isn't there also a risk of increasing code size? Every layer will have to "cope" with elements they are not related to... It may cause a problem if one wants to use the whole network layer on limited devices (like Telosb for example) However, since I couldn't attend netxork-related meetings, maybe were these issues already discussed and decisions taken? |
There is no semantic mixing IMHO. If a device does not support and option it can always return
We know this is far from perfect, but I think this PR is a step in a better direction. |
* | ||
* @extends clist_node_t | ||
*/ | ||
typedef struct __attribute__((packed)) netdev_hlist_t { |
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.
Why packed?
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.
because otherwise there would be alignment problems if you put it in a static array (namly pktbuf in #1638 ;-))
tests/netdev on native: |
Well, okay, ACK. |
Squashed & rebased & waiting for Travis to be done |
Kicked Travis. |
And go. |
drivers: Introduce a general interface for network device drivers
This is thought to merge the concepts of @rousselk's #925 and my #1448. It also addresses #1448 (comment)
Things to do:
ieee802154_radio_driver_t
subclass ofnet_dev_driver_t
Dependency graph: