raiden00pl commented on code in PR #16199:
URL: https://github.com/apache/nuttx/pull/16199#discussion_r2041855826


##########
net/netdev/netdev_ioctl.c:
##########
@@ -1176,8 +1176,17 @@ static int netdev_ifr_ioctl(FAR struct socket *psock, 
int cmd,
 #endif
 
 #if defined(CONFIG_NETDEV_IOCTL) && defined(CONFIG_NETDEV_CAN_BITRATE_IOCTL)
-      case SIOCGCANBITRATE:  /* Get bitrate from a CAN controller */
       case SIOCSCANBITRATE:  /* Set bitrate of a CAN controller */
+        if (dev->d_flags & IFF_UP)
+          {
+            /* Cannot set bitrate if the interface is up.
+               If down, fall-through to common code in SIOCGCANBITRATE. */

Review Comment:
   ```suggestion
               /* Cannot set bitrate if the interface is up.
                * If down, fall-through to common code in SIOCGCANBITRATE. 
                */
   ```



-- 
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