mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-26 03:00:13 +01:00
Set the default powersave value to enabled
This is an Ubuntu-specific patch to enable wireless powersave by default. Should it not work for you for some reason, you can safely add: powersave=0 to the section: [802-11-wireless] In the configuration file for your connection under /etc/NetworkManager/system-connections/.
This commit is contained in:
parent
26721b8a88
commit
15ab4bda5b
1 changed files with 5 additions and 2 deletions
|
|
@ -673,7 +673,7 @@ nm_setting_wireless_get_hidden (NMSettingWireless *setting)
|
|||
guint32
|
||||
nm_setting_wireless_get_powersave (NMSettingWireless *setting)
|
||||
{
|
||||
g_return_val_if_fail (NM_IS_SETTING_WIRELESS (setting), 0);
|
||||
g_return_val_if_fail (NM_IS_SETTING_WIRELESS (setting), 1);
|
||||
|
||||
return NM_SETTING_WIRELESS_GET_PRIVATE (setting)->powersave;
|
||||
}
|
||||
|
|
@ -883,6 +883,9 @@ verify (NMSetting *setting, GSList *all_settings, GError **error)
|
|||
static void
|
||||
nm_setting_wireless_init (NMSettingWireless *setting)
|
||||
{
|
||||
NMSettingWirelessPrivate *priv = NM_SETTING_WIRELESS_GET_PRIVATE (setting);
|
||||
|
||||
priv->powersave = 1;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -1281,7 +1284,7 @@ nm_setting_wireless_class_init (NMSettingWirelessClass *setting_class)
|
|||
g_object_class_install_property
|
||||
(object_class, PROP_POWERSAVE,
|
||||
g_param_spec_uint (NM_SETTING_WIRELESS_POWERSAVE, "", "",
|
||||
0, G_MAXUINT32, 0,
|
||||
0, G_MAXUINT32, 1,
|
||||
G_PARAM_READWRITE |
|
||||
G_PARAM_STATIC_STRINGS));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue