diff options
author | Beniamino Galvani <bgalvani@redhat.com> | 2016-02-10 16:46:34 +0100 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2016-02-16 00:18:06 +0100 |
commit | 10b222288e686f0e37eaf148a8d99100d75a178b (patch) | |
tree | 5448e51c595762bf56f54b4dd32cbe76d255b6ad /libnm-core/nm-setting-wireless.h | |
parent | 0f5c5ad44692d029eec60cdc7d8783b51ede59bb (diff) | |
download | NetworkManager-10b222288e686f0e37eaf148a8d99100d75a178b.tar.gz |
wifi: don't touch by default current powersave setting
Some drivers (or things outside NM like 'powertop') may turn powersave
on, so don't touch it unless explicitly configured by user.
To achieve this, add new 'default' and 'ignore' options; the former
can be used to fall back to a globally configured setting, while the
latter tells NM not to touch the current setting.
When 'default' is specified, a missing global default configuration is
equivalent to 'ignore'.
It is possible to enable Wi-Fi power saving for all connections by
dropping a file in /etc/NetworkManager/conf.d with the following
content:
[connection]
wifi.powersave=3
https://bugzilla.gnome.org/show_bug.cgi?id=760125
Diffstat (limited to 'libnm-core/nm-setting-wireless.h')
-rw-r--r-- | libnm-core/nm-setting-wireless.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/libnm-core/nm-setting-wireless.h b/libnm-core/nm-setting-wireless.h index a4c0147f40..606733fa91 100644 --- a/libnm-core/nm-setting-wireless.h +++ b/libnm-core/nm-setting-wireless.h @@ -80,6 +80,25 @@ G_BEGIN_DECLS */ #define NM_SETTING_WIRELESS_MODE_INFRA "infrastructure" +/** + * NMSettingWirelessPowersave: + * @NM_SETTING_WIRELESS_POWERSAVE_DEFAULT: use the default value + * @NM_SETTING_WIRELESS_POWERSAVE_IGNORE: don't touch existing setting + * @NM_SETTING_WIRELESS_POWERSAVE_DISABLE: disable powersave + * @NM_SETTING_WIRELESS_POWERSAVE_ENABLE: enable powersave + * + * These flags indicate whether wireless powersave must be enabled. + **/ +typedef enum { + NM_SETTING_WIRELESS_POWERSAVE_DEFAULT = 0, + NM_SETTING_WIRELESS_POWERSAVE_IGNORE = 1, + NM_SETTING_WIRELESS_POWERSAVE_DISABLE = 2, + NM_SETTING_WIRELESS_POWERSAVE_ENABLE = 3, + _NM_SETTING_WIRELESS_POWERSAVE_NUM, /*< skip >*/ + NM_SETTING_WIRELESS_POWERSAVE_LAST = _NM_SETTING_WIRELESS_POWERSAVE_NUM - 1, /*< skip >*/ +} NMSettingWirelessPowersave; + + struct _NMSettingWireless { NMSetting parent; }; |