net/netdev: Simplify handling of SIOCSIFMTU

The call of netdev_ifr_dev is already simplified by commit fd53db56b6

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
This commit is contained in:
Zhe Weng 2023-08-07 10:07:53 +08:00 committed by Xiang Xiao
parent 97c26f2376
commit c2ba0dfd6c

View file

@ -927,11 +927,7 @@ static int netdev_ifr_ioctl(FAR struct socket *psock, int cmd,
req->ifr_mtu = NETDEV_PKTSIZE(dev) - dev->d_llhdrlen;
break;
case SIOCSIFMTU: /* Set MTU size */
dev = netdev_ifr_dev(req);
if (dev)
{
NETDEV_PKTSIZE(dev) = req->ifr_mtu + dev->d_llhdrlen;
}
NETDEV_PKTSIZE(dev) = req->ifr_mtu + dev->d_llhdrlen;
break;
#ifdef CONFIG_NET_ICMPv6_AUTOCONF