pkarashchenko commented on code in PR #6519:
URL: https://github.com/apache/incubator-nuttx/pull/6519#discussion_r906664910


##########
net/netdev/netdev_carrier.c:
##########
@@ -62,8 +62,12 @@ int netdev_carrier_on(FAR struct net_driver_s *dev)
 {
   if (dev)
     {
-      dev->d_flags |= IFF_RUNNING;
-      netlink_device_notify(dev);
+      if (!IFF_IS_RUNNING(dev->d_flags))

Review Comment:
   Yes and no :) I mean if 2 out of 100 drivers can call `netdev_carrier_on` in 
a row, then we add check (extra code) for 98 cases that do not need it. Now if 
driver call it once then event is reported once to netlink, so no issue.
   Anyway this will lead to a code duplication in 2 (or more) cases.
   I do not have anything against this change, so we can keep it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to