From 2c8cb145c2adb177b0e318ca13f28b49838e2cb8 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Mon, 12 Sep 2016 12:40:32 +0200 Subject: [PATCH] device: drop NMDeviceVlan:bring_up() implementation This retry loop was added by commit dc6341acec2d12856265d6976420d56f0560410b. But I suspect, that the main-point there was not to retry the netlink request to set the interface up. Why would that fail, and why would a failure to set the interface up require a retry? I think it was added to wait for carrier. But waiting for carrier was later dropped with commit 5074898591ae99f79b0cc4872c3c7cf018abee82 and it is not clear why we would wait for carrier at all -- we don't do that for other device types either. --- src/devices/nm-device-vlan.c | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/devices/nm-device-vlan.c b/src/devices/nm-device-vlan.c index 16edc0d2ba..ad9d2486a8 100644 --- a/src/devices/nm-device-vlan.c +++ b/src/devices/nm-device-vlan.c @@ -282,20 +282,6 @@ get_generic_capabilities (NMDevice *dev) return NM_DEVICE_CAP_CARRIER_DETECT | NM_DEVICE_CAP_IS_SOFTWARE; } -static gboolean -bring_up (NMDevice *dev, gboolean *no_firmware) -{ - gboolean success = FALSE; - guint i = 20; - - while (i-- > 0 && !success) { - success = NM_DEVICE_CLASS (nm_device_vlan_parent_class)->bring_up (dev, no_firmware); - g_usleep (50); - } - - return success; -} - /******************************************************************/ static gboolean @@ -673,7 +659,6 @@ nm_device_vlan_class_init (NMDeviceVlanClass *klass) parent_class->realize_start_notify = realize_start_notify; parent_class->unrealize_notify = unrealize_notify; parent_class->get_generic_capabilities = get_generic_capabilities; - parent_class->bring_up = bring_up; parent_class->act_stage1_prepare = act_stage1_prepare; parent_class->ip4_config_pre_commit = ip4_config_pre_commit; parent_class->is_available = is_available;