]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
net: export netif_open for self_test usage
authorMike Marciniszyn (Meta) <mike.marciniszyn@gmail.com>
Sat, 7 Mar 2026 10:58:43 +0000 (05:58 -0500)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 10 Mar 2026 12:53:52 +0000 (13:53 +0100)
dev_open() already is exported, but drivers which use the netdev
instance lock need to use netif_open() instead. netif_close() is
also already exported [1] so this completes the pairing.

This export is required for the following fbnic self tests to
avoid calling ndo_stop() and ndo_open() in favor of the
more appropriate netif_open() and netif_close() that notifies
any listeners that the interface went down to test and is now
coming back up.

Link: https://patch.msgid.link/20250309215851.2003708-1-sdf@fomichev.me
Signed-off-by: Mike Marciniszyn (Meta) <mike.marciniszyn@gmail.com>
Link: https://patch.msgid.link/20260307105847.1438-2-mike.marciniszyn@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
net/core/dev.c

index 6fc9350f0be8756ae849d5b0ca9b222055d96ced..f48dc299e4b270f2fedba11e669d4940e73f0d4d 100644 (file)
@@ -1731,6 +1731,7 @@ int netif_open(struct net_device *dev, struct netlink_ext_ack *extack)
 
        return ret;
 }
+EXPORT_SYMBOL(netif_open);
 
 static void __dev_close_many(struct list_head *head)
 {