From e0a4c74fccc6f577e36dfa9c0849e35625acf1dd Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Mon, 10 Jan 2005 15:22:21 +0000 Subject: [PATCH] 2005-01-10 Dan Williams * src/NetworkManagerDevice.c - Minor fixups & corrections to "auto" frequency mode, make it less chatty with syslog git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@367 4912f4e0-d625-0410-9fb7-b9a5a253dbdc --- ChangeLog | 6 ++++++ src/NetworkManagerDevice.c | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index e045ff6001..34ab7eb57b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-01-10 Dan Williams + + * src/NetworkManagerDevice.c + - Minor fixups & corrections to "auto" frequency mode, make it + less chatty with syslog + 2005-01-10 Dan Williams * src/NetworkManagerDevice.c diff --git a/src/NetworkManagerDevice.c b/src/NetworkManagerDevice.c index cb44a889d6..f9e1a5b412 100644 --- a/src/NetworkManagerDevice.c +++ b/src/NetworkManagerDevice.c @@ -866,17 +866,17 @@ void nm_device_set_frequency (NMDevice *dev, const double freq) if (err == -1) { gboolean success = FALSE; - if ((freq <= 0) && ((errno == -EINVAL) || (errno == -EOPNOTSUPP))) + if ((freq <= 0) && ((errno == EINVAL) || (errno == EOPNOTSUPP))) { /* Ok, try "auto" the iwconfig way if the Atheros way didn't work */ - wrq.u.freq.m = 0; + wrq.u.freq.m = -1; wrq.u.freq.e = 0; wrq.u.freq.flags = 0; if (iw_set_ext (sk, nm_device_get_iface (dev), SIOCSIWFREQ, &wrq) != -1) success = TRUE; } - if (!success) + if (!success && (errno != EOPNOTSUPP) && (errno != EINVAL)) syslog (LOG_ERR, "nm_device_set_frequency(): error setting frequency %f for device %s. errno = %d", freq, nm_device_get_iface (dev), errno); }