mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-10-15 12:34:55 +00:00
device: don't bother passing no_firmware uselessly
It's actually confusing in cases it's not handled. Besides, nm_device_bring_up() is just happy about NULL argument.
This commit is contained in:
parent
ff10d08079
commit
fc53f54512
|
@ -15,7 +15,7 @@
|
|||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright 2011 - 2016 Red Hat, Inc.
|
||||
* Copyright 2011 - 2018 Red Hat, Inc.
|
||||
*/
|
||||
|
||||
#include "nm-default.h"
|
||||
|
@ -363,7 +363,6 @@ static NMActStageReturn
|
|||
act_stage1_prepare (NMDevice *dev, NMDeviceStateReason *out_failure_reason)
|
||||
{
|
||||
NMActStageReturn ret = NM_ACT_STAGE_RETURN_SUCCESS;
|
||||
gboolean no_firmware = FALSE;
|
||||
|
||||
ret = NM_DEVICE_CLASS (nm_device_bond_parent_class)->act_stage1_prepare (dev, out_failure_reason);
|
||||
if (ret != NM_ACT_STAGE_RETURN_SUCCESS)
|
||||
|
@ -374,7 +373,7 @@ act_stage1_prepare (NMDevice *dev, NMDeviceStateReason *out_failure_reason)
|
|||
ret = apply_bonding_config (dev);
|
||||
if (ret != NM_ACT_STAGE_RETURN_FAILURE)
|
||||
ret = nm_device_hw_addr_set_cloned (dev, nm_device_get_applied_connection (dev), FALSE);
|
||||
nm_device_bring_up (dev, TRUE, &no_firmware);
|
||||
nm_device_bring_up (dev, TRUE, NULL);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -386,7 +385,7 @@ enslave_slave (NMDevice *device,
|
|||
gboolean configure)
|
||||
{
|
||||
NMDeviceBond *self = NM_DEVICE_BOND (device);
|
||||
gboolean success = TRUE, no_firmware = FALSE;
|
||||
gboolean success = TRUE;
|
||||
const char *slave_iface = nm_device_get_ip_iface (slave);
|
||||
NMConnection *master_con;
|
||||
|
||||
|
@ -397,7 +396,7 @@ enslave_slave (NMDevice *device,
|
|||
success = nm_platform_link_enslave (nm_device_get_platform (device),
|
||||
nm_device_get_ip_ifindex (device),
|
||||
nm_device_get_ip_ifindex (slave));
|
||||
nm_device_bring_up (slave, TRUE, &no_firmware);
|
||||
nm_device_bring_up (slave, TRUE, NULL);
|
||||
|
||||
if (!success)
|
||||
return FALSE;
|
||||
|
@ -434,7 +433,7 @@ release_slave (NMDevice *device,
|
|||
gboolean configure)
|
||||
{
|
||||
NMDeviceBond *self = NM_DEVICE_BOND (device);
|
||||
gboolean success, no_firmware = FALSE;
|
||||
gboolean success;
|
||||
gs_free char *address = NULL;
|
||||
|
||||
if (configure) {
|
||||
|
@ -463,7 +462,7 @@ release_slave (NMDevice *device,
|
|||
* IFF_UP), so we must bring it back up here to ensure carrier changes and
|
||||
* other state is noticed by the now-released slave.
|
||||
*/
|
||||
if (!nm_device_bring_up (slave, TRUE, &no_firmware))
|
||||
if (!nm_device_bring_up (slave, TRUE, NULL))
|
||||
_LOGW (LOGD_BOND, "released bond slave could not be brought up.");
|
||||
} else {
|
||||
_LOGI (LOGD_BOND, "bond slave %s was released",
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright 2011 Red Hat, Inc.
|
||||
* Copyright 2011 - 2018 Red Hat, Inc.
|
||||
*/
|
||||
|
||||
#include "nm-default.h"
|
||||
|
@ -80,7 +80,7 @@ act_stage1_prepare (NMDevice *device, NMDeviceStateReason *out_failure_reason)
|
|||
NMSettingInfiniband *s_infiniband;
|
||||
char ifname_verified[IFNAMSIZ];
|
||||
const char *transport_mode;
|
||||
gboolean ok, no_firmware = FALSE;
|
||||
gboolean ok;
|
||||
|
||||
ret = NM_DEVICE_CLASS (nm_device_infiniband_parent_class)->act_stage1_prepare (device, out_failure_reason);
|
||||
if (ret != NM_ACT_STAGE_RETURN_SUCCESS)
|
||||
|
@ -104,7 +104,7 @@ act_stage1_prepare (NMDevice *device, NMDeviceStateReason *out_failure_reason)
|
|||
/* With some drivers the interface must be down to set transport mode */
|
||||
nm_device_take_down (device, TRUE);
|
||||
ok = nm_platform_sysctl_set (nm_device_get_platform (device), NMP_SYSCTL_PATHID_NETDIR (dirfd, ifname_verified, "mode"), transport_mode);
|
||||
nm_device_bring_up (device, TRUE, &no_firmware);
|
||||
nm_device_bring_up (device, TRUE, NULL);
|
||||
|
||||
if (!ok) {
|
||||
NM_SET_OUT (out_failure_reason, NM_DEVICE_STATE_REASON_CONFIG_FAILED);
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
||||
/* NetworkManager -- Network link manager
|
||||
*
|
||||
* Copyright (C) 2013 Jiri Pirko <jiri@resnulli.us>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -16,6 +14,9 @@
|
|||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright (C) 2013 Jiri Pirko <jiri@resnulli.us>
|
||||
* Copyright (C) 2018 Red Hat, Inc.
|
||||
*/
|
||||
|
||||
#include "nm-default.h"
|
||||
|
@ -703,7 +704,7 @@ enslave_slave (NMDevice *device,
|
|||
{
|
||||
NMDeviceTeam *self = NM_DEVICE_TEAM (device);
|
||||
NMDeviceTeamPrivate *priv = NM_DEVICE_TEAM_GET_PRIVATE (self);
|
||||
gboolean success = TRUE, no_firmware = FALSE;
|
||||
gboolean success = TRUE;
|
||||
const char *slave_iface = nm_device_get_ip_iface (slave);
|
||||
NMSettingTeamPort *s_team_port;
|
||||
|
||||
|
@ -738,7 +739,7 @@ enslave_slave (NMDevice *device,
|
|||
success = nm_platform_link_enslave (nm_device_get_platform (device),
|
||||
nm_device_get_ip_ifindex (device),
|
||||
nm_device_get_ip_ifindex (slave));
|
||||
nm_device_bring_up (slave, TRUE, &no_firmware);
|
||||
nm_device_bring_up (slave, TRUE, NULL);
|
||||
|
||||
if (!success)
|
||||
return FALSE;
|
||||
|
@ -762,7 +763,7 @@ release_slave (NMDevice *device,
|
|||
{
|
||||
NMDeviceTeam *self = NM_DEVICE_TEAM (device);
|
||||
NMDeviceTeamPrivate *priv = NM_DEVICE_TEAM_GET_PRIVATE (self);
|
||||
gboolean success, no_firmware = FALSE;
|
||||
gboolean success;
|
||||
|
||||
if (configure) {
|
||||
success = nm_platform_link_release (nm_device_get_platform (device),
|
||||
|
@ -778,7 +779,7 @@ release_slave (NMDevice *device,
|
|||
* IFF_UP), so we must bring it back up here to ensure carrier changes and
|
||||
* other state is noticed by the now-released port.
|
||||
*/
|
||||
if (!nm_device_bring_up (slave, TRUE, &no_firmware))
|
||||
if (!nm_device_bring_up (slave, TRUE, NULL))
|
||||
_LOGW (LOGD_TEAM, "released team port %s could not be brought up",
|
||||
nm_device_get_ip_iface (slave));
|
||||
|
||||
|
|
Loading…
Reference in a new issue