diff options
author | Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com> | 2014-10-23 14:19:59 -0400 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2015-01-21 14:31:14 -0600 |
commit | a428de82158fc9006820a2b4888e7260dfbfdbda (patch) | |
tree | 0b2008d15962e8a385140f6e8ac6be6a9c81faa4 /src/devices | |
parent | c3e319266c64a418f9edba2c95187fefc04c203f (diff) | |
download | NetworkManager-a428de82158fc9006820a2b4888e7260dfbfdbda.tar.gz |
wifi: set wireless powersave for nl80211 devices when activateddcbw/wifi-powersave
Signed-off-by: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>
(fixups and WEXT implementation by dcbw)
Diffstat (limited to 'src/devices')
-rw-r--r-- | src/devices/wifi/nm-device-wifi.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/devices/wifi/nm-device-wifi.c b/src/devices/wifi/nm-device-wifi.c index 7d3dc9a1d7..403b01af9d 100644 --- a/src/devices/wifi/nm-device-wifi.c +++ b/src/devices/wifi/nm-device-wifi.c @@ -743,6 +743,8 @@ deactivate (NMDevice *device) if (priv->initial_hw_addr) nm_device_set_hw_addr (device, priv->initial_hw_addr, "reset", LOGD_WIFI); + nm_platform_wifi_set_powersave (ifindex, 0); + /* Ensure we're in infrastructure mode after deactivation; some devices * (usually older ones) don't scan well in adhoc mode. */ @@ -2758,6 +2760,11 @@ act_stage2_config (NMDevice *device, NMDeviceStateReason *reason) if ((nm_ap_get_mode (ap) == NM_802_11_MODE_ADHOC) || nm_ap_is_hotspot (ap)) ensure_hotspot_frequency (self, s_wireless, ap); + if (nm_ap_get_mode (ap) == NM_802_11_MODE_INFRA) { + nm_platform_wifi_set_powersave (nm_device_get_ifindex (device), + nm_setting_wireless_get_powersave (s_wireless)); + } + /* Build up the supplicant configuration */ config = build_supplicant_config (self, connection, nm_ap_get_freq (ap)); if (config == NULL) { |