mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-04 09:50:17 +01:00
device: drop NMDeviceWifi:bring_up() implementation
Instead of letting the sub-class check the "enabled" state, let it be handled by nm_device_bring_up(). Note that nm_device_get_enabled() only has two implementations: NMDeviceModem:bring_up() and NMDeviceWifi:bring_up().
This commit is contained in:
parent
b122337353
commit
9deb6ede73
2 changed files with 5 additions and 10 deletions
|
|
@ -9120,6 +9120,11 @@ nm_device_bring_up (NMDevice *self, gboolean block, gboolean *no_firmware)
|
|||
|
||||
_LOGD (LOGD_HW, "bringing up device");
|
||||
|
||||
NM_SET_OUT (no_firmware, FALSE);
|
||||
|
||||
if (!nm_device_get_enabled (self))
|
||||
return FALSE;
|
||||
|
||||
if (NM_DEVICE_GET_CLASS (self)->bring_up) {
|
||||
if (!NM_DEVICE_GET_CLASS (self)->bring_up (self, no_firmware))
|
||||
return FALSE;
|
||||
|
|
|
|||
|
|
@ -452,15 +452,6 @@ periodic_update_cb (gpointer user_data)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
bring_up (NMDevice *device, gboolean *no_firmware)
|
||||
{
|
||||
if (!NM_DEVICE_WIFI_GET_PRIVATE ((NMDeviceWifi *) device)->enabled)
|
||||
return FALSE;
|
||||
|
||||
return NM_DEVICE_CLASS (nm_device_wifi_parent_class)->bring_up (device, no_firmware);
|
||||
}
|
||||
|
||||
static void
|
||||
ap_add_remove (NMDeviceWifi *self,
|
||||
guint signum,
|
||||
|
|
@ -3138,7 +3129,6 @@ nm_device_wifi_class_init (NMDeviceWifiClass *klass)
|
|||
object_class->dispose = dispose;
|
||||
object_class->finalize = finalize;
|
||||
|
||||
parent_class->bring_up = bring_up;
|
||||
parent_class->can_auto_connect = can_auto_connect;
|
||||
parent_class->is_available = is_available;
|
||||
parent_class->check_connection_compatible = check_connection_compatible;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue