-
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
mrf24j40: Move flags from netdev to radio #9583
Conversation
This changes the default flags enabled for the radio ( |
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.
question: is it possible/worth to safe a byte here?
Otherwise I'm fine with the changes!
Should be possible, but there are still some random "flags" set here and there in the driver. I have to investigate whether they actually trigger something or that they were useless from the start. |
@bergzand any progress? |
5616a49
to
bd7d9de
Compare
The NETOPT_AUTOACK command was never properly implemented in the mrf24j40 driver and internally in the driver conflicted with the NETOPT_ACK_REQ setting.
The flags from the ieee802154 struct are only used in the radio code. there is no advantage of having them in the netdev_ieee802154_t struct if the flags are defined differently per radio driver.
bd7d9de
to
fc81331
Compare
@smlng: Looked around and had to remove two calls that set obsolete flags. The driver should still work (as far as I've tested). Not sure if it was the case before, but the ack_req setting is not set at boot with this PR. PR is also rebased to latest master. |
But this is not intended, right? |
That depends on whether you consider the old implementation/behaviour a bug or a feature :) |
@smlng thanks. Would you mind setting the "Reviewed:.." labels for what you did? I'll run tests a bit later |
I've tested on a nucleo-l073rf + mrf24j40 (node A) and between that board and a samr21-xpro (node B).
-> bad but 'know' issue
-> fine
-> as expexted: B requests ACKs, A doesn't send ACKs, B retransmits
... and running 2. again -> as expected I'm fine with this PR but it feels wrong to merge it, knowing that we lose default ACK_REQ. Let's wait with merging until the fix is around. |
Could someone update me about the current status of the 802.15.4/netdev cleanups?
Is this still the case? |
@bergzand ping? |
@bergzand is the above still the case? |
@jia200x Does this PR still make sense with your netdev plans? |
Any update, should this be rebased or is it out of date now? |
@jia200x Does this PR still make sense with your netdev plans? I missed the comments! Sorry This doesn't contradict the netdev plans and I'm not aware of anyone working on porting this radio to the radio HAL. So I would say it's fine to proceed. |
|
Contribution description
The flags from the ieee802154 struct are only used in the radio code, there is no advantage of having make sense to have them in the netdev struct if their meaning is different per radio driver.
Also fixes a bug where the
NETOPT_AUTOACK
doesn't work, but is dis/enabled with theNETOPT_ACK_REQ
setting.Issues/PRs references
Minor cleanup preparing for #7736
Similar PRs are required for the other radio drivers using flags.