mirror of
https://github.com/apache/nuttx.git
synced 2026-05-22 13:52:22 +08:00
net/netdev/netdev_register.c: skip mld_devinit if Nic can not support mld
avoid unnecessary operations Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
This commit is contained in:
@@ -475,7 +475,12 @@ int netdev_register(FAR struct net_driver_s *dev, enum net_lltype_e lltype)
|
||||
#ifdef CONFIG_NET_MLD
|
||||
/* Configure the device for MLD support */
|
||||
|
||||
mld_devinit(dev);
|
||||
if ((flags & IFF_MULTICAST) != 0)
|
||||
{
|
||||
/* MLD is only supported on multicast capable devices */
|
||||
|
||||
mld_devinit(dev);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef NET_ICMPv6_HAVE_STACK
|
||||
|
||||
Reference in New Issue
Block a user