network/netdev: introduce .iftype to netdev vtable

And disable .generate_mac flag for non-ether interfaces.
This commit is contained in:
Yu Watanabe
2021-11-27 06:38:26 +09:00
parent a67e0507c3
commit 9f0cf80dd0
23 changed files with 78 additions and 12 deletions
+3
View File
@@ -1,10 +1,13 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include <linux/if_arp.h>
#include "netdevsim.h"
const NetDevVTable netdevsim_vtable = {
.object_size = sizeof(NetDevSim),
.sections = NETDEV_COMMON_SECTIONS,
.create_type = NETDEV_CREATE_INDEPENDENT,
.iftype = ARPHRD_ETHER,
.generate_mac = true,
};