-/* Registers with the poll loop to wake up from the next call to poll_block()
- * when netdev_monitor_poll(monitor) would indicate that a device has
- * changed. */
-void
-netdev_monitor_poll_wait(const struct netdev_monitor *monitor)
-{
- if (!shash_is_empty(&monitor->changed_netdevs)) {
- poll_immediate_wake();
- } else {
- /* XXX Nothing needed here for netdev_linux, but maybe other netdev
- * classes need help. */
- }
-}
-\f
-/* Restore the network device flags on 'netdev' to those that were active
- * before we changed them. Returns 0 if successful, otherwise a positive
- * errno value.
- *
- * To avoid reentry, the caller must ensure that fatal signals are blocked. */
-static int
-restore_flags(struct netdev *netdev)
-{
- if (netdev->changed_flags) {
- enum netdev_flags restore = netdev->save_flags & netdev->changed_flags;
- enum netdev_flags old_flags;
- return netdev_get_dev(netdev)->netdev_class->update_flags(netdev,
- netdev->changed_flags & ~restore,
- restore, &old_flags);
- }
- return 0;
-}
-
-/* Close all netdevs on shutdown so they can do any needed cleanup such as
- * destroying devices, restoring flags, etc. */
-static void
-close_all_netdevs(void *aux OVS_UNUSED)
-{
- struct netdev *netdev, *next;
- LIST_FOR_EACH_SAFE(netdev, next, struct netdev, node, &netdev_list) {
- netdev_close(netdev);
+ netdev->netdev_class->update_flags(netdev,
+ saved_flags & saved_values,
+ saved_flags & ~saved_values,
+ &old_flags);
+ }