net: Remove IFF_DOWN flag to compatible with Linux/*BSD#2647
Conversation
turn off interface by checking IFF_UP flag isn't set: apache/nuttx#1838 Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
|
[Experimental Bot, please feedback here] No, the provided PR summary does not meet the NuttX Requirements. Here's why and how to improve it: Missing Information in Summary:
Impact:
Testing:
Example of an Improved Summary Section: Remember: A good PR description saves everyone time and increases the chances of your contribution being accepted quickly. |
cederom
left a comment
There was a problem hiding this comment.
Thank you @xiaoxiang781216 :-)
|
@xiaoxiang781216 could you please check for issues on Here's what I had before this change: Here's what I have now, seems to be stuck: Noticed that the PR it depends on has not been merged. I'll wait until it is and let you know if all good. |
|
Thanks for reporting, I am looking into it. |
|
@fdcavalcanti Whether your local environment contains the patch apache/nuttx#13842 ? |
|
Yes, just checked test reports and it's ok. Thanks. |
| void alt1250_netdev_ifdown(FAR struct alt1250_s *dev) | ||
| { | ||
| dev->net_dev.d_flags = IFF_DOWN; | ||
| dev->net_dev.d_flags = ~IFF_UP; |
There was a problem hiding this comment.
@xiaoxiang781216
Sorry for the delay, let me confirm.
Is this as you intended? Or is it a mistake?
dev->net_dev.d_flags &= ~IFF_UP;
There was a problem hiding this comment.
Yes, it's intended to follow how other POSIX OS turn off netdev. After IFF_DOWN is removed, ~IFF_UP represent down.
Summary
turn off interface by checking IFF_UP flag isn't set: apache/nuttx#1838
depends on apache/nuttx#13842
Impact
improve the combability
Testing
internal test