mirror of
https://github.com/apache/nuttx.git
synced 2025-01-13 07:28:38 +08:00
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:
parent
97c26f2376
commit
c2ba0dfd6c
1 changed files with 1 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue