You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/12/08 09:33:30 UTC
[GitHub] [nuttx] pstys commented on a diff in pull request #7821: Add mtu set and interface name set in ioctl
pstys commented on code in PR #7821:
URL: https://github.com/apache/nuttx/pull/7821#discussion_r1043123728
##########
net/netdev/netdev_ioctl.c:
##########
@@ -860,6 +877,15 @@ static int netdev_ifr_ioctl(FAR struct socket *psock, int cmd,
case SIOCGIFMTU: /* Get MTU size */
req->ifr_mtu = NETDEV_PKTSIZE(dev);
break;
+ case SIOCSIFMTU: /* Set MTU size */
+ {
+ dev = netdev_ifr_dev(req);
+ if (dev)
+ {
+ NETDEV_PKTSIZE(dev) = req->ifr_mtu;
+ }
+ }
Review Comment:
Done
--
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-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org