net/netdev: support SIOCGLIFMTU and SIOCGIFMTU ioctls
authorJin-Seong Kim <jseong82.kim@samsung.com>
Mon, 27 Mar 2017 08:02:22 +0000 (17:02 +0900)
committerHeesub Shin <heesub.shin@samsung.com>
Tue, 18 Apr 2017 03:02:02 +0000 (12:02 +0900)
This commit fixes netdev_ifrioctl() so that it can handle SIOCGLIFMTU
and SIOCGIFMTU ioctls properly, which returns MTU sizes.

Change-Id: I07f044e4bc69c5b538d9acde77120f00774df0f9
Signed-off-by: Jin-Seong Kim <jseong82.kim@samsung.com>
os/net/netdev/netdev_ioctl.c

index cade514..762a51c 100644 (file)
@@ -543,7 +543,7 @@ static int netdev_ifrioctl(FAR struct socket *sock, int cmd, FAR struct ifreq *r
        }
        break;
 #endif
-
+#endif
        case SIOCGLIFMTU:                       /* Get MTU size */
        case SIOCGIFMTU: {                      /* Get MTU size */
                dev = netdev_ifrdev(req);
@@ -554,7 +554,6 @@ static int netdev_ifrioctl(FAR struct socket *sock, int cmd, FAR struct ifreq *r
        }
        break;
 
-#endif
        case SIOCSIFFLAGS: {            /* Sets the interface flags */
                /* Is this a request to bring the interface up? */