mirror of
https://github.com/opnsense/src.git
synced 2026-06-14 19:20:18 -04:00
LinuxKPI: netdevice: add alloc_netdev_dummy()
Add alloc_netdev_dummy() which is needed by an updated rtw88 driver. Given we already call linuxkpi_init_dummy_netdev() ourselves allow the setup function to be NULL to not initialize and start a tasq td twice. Sponsored by: The FreeBSD Foundation MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D46802
This commit is contained in:
parent
17120e4bc3
commit
105331f658
2 changed files with 4 additions and 1 deletions
|
|
@ -466,6 +466,8 @@ void linuxkpi_free_netdev(struct net_device *);
|
|||
|
||||
#define alloc_netdev(_l, _n, _f, _func) \
|
||||
linuxkpi_alloc_netdev(_l, _n, _f, _func)
|
||||
#define alloc_netdev_dummy(_l) \
|
||||
linuxkpi_alloc_netdev(_l, "dummy", NET_NAME_UNKNOWN, NULL)
|
||||
#define free_netdev(_n) \
|
||||
linuxkpi_free_netdev(_n)
|
||||
|
||||
|
|
|
|||
|
|
@ -409,7 +409,8 @@ linuxkpi_alloc_netdev(size_t len, const char *name, uint32_t flags,
|
|||
|
||||
/* This needs extending as we support more. */
|
||||
|
||||
setup_func(ndev);
|
||||
if (setup_func != NULL)
|
||||
setup_func(ndev);
|
||||
|
||||
return (ndev);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue