diff options
author | Dan Williams <dcbw@redhat.com> | 2014-11-17 09:32:54 -0600 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2015-10-30 10:17:06 +0100 |
commit | 04b74b9ee661deb6dc0993842529ed38a92c86f8 (patch) | |
tree | 895e047caabba434c03542c1b6022e4794eef3c6 | |
parent | 0e964a3f0860f2d82d74e6a4c18c84883c268c59 (diff) | |
download | NetworkManager-04b74b9ee661deb6dc0993842529ed38a92c86f8.tar.gz |
fixup! wifi: set wireless power-save for nl80211 devices when activated
-rw-r--r-- | src/platform/nm-platform.c | 8 | ||||
-rw-r--r-- | src/platform/wifi/wifi-utils-wext.c | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/platform/nm-platform.c b/src/platform/nm-platform.c index 4a442efce3..88778f18f7 100644 --- a/src/platform/nm-platform.c +++ b/src/platform/nm-platform.c @@ -1690,6 +1690,12 @@ nm_platform_wifi_get_ssid (NMPlatform *self, int ifindex) return klass->wifi_get_ssid (self, ifindex); } +static void +wifi_set_powersave (NMPlatform *p, int ifindex, guint32 powersave) +{ + /* empty */ +} + void nm_platform_wifi_set_powersave (NMPlatform *self, int ifindex, guint32 powersave) { @@ -3087,6 +3093,8 @@ nm_platform_class_init (NMPlatformClass *platform_class) G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); + platform_class->wifi_set_powersave = wifi_set_powersave; + /* Signals */ SIGNAL (SIGNAL_LINK_CHANGED, log_link) SIGNAL (SIGNAL_IP4_ADDRESS_CHANGED, log_ip4_address) diff --git a/src/platform/wifi/wifi-utils-wext.c b/src/platform/wifi/wifi-utils-wext.c index b807f62c7e..00d764638a 100644 --- a/src/platform/wifi/wifi-utils-wext.c +++ b/src/platform/wifi/wifi-utils-wext.c @@ -181,7 +181,7 @@ wifi_wext_set_powersave (WifiData *data, guint32 powersave) strncpy (wrq.ifr_name, wext->parent.iface, IFNAMSIZ); if (ioctl (wext->fd, SIOCSIWPOWER, &wrq) < 0) { if (errno != ENODEV) { - nm_log_err (LOGD_HW | LOGD_WIFI, "(%s): error setting powersave %d", + nm_log_err (LOGD_HW | LOGD_WIFI, "(%s): error setting powersave %" G_GUINT32_FORMAT, wext->parent.iface, powersave); } return FALSE; |