2005-01-10 Dan Williams <dcbw@redhat.com>

* 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
This commit is contained in:
Dan Williams 2005-01-10 15:22:21 +00:00
parent d2567b098e
commit e0a4c74fcc
2 changed files with 9 additions and 3 deletions

View file

@ -1,3 +1,9 @@
2005-01-10 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerDevice.c
- Minor fixups & corrections to "auto" frequency mode, make it
less chatty with syslog
2005-01-10 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerDevice.c

View file

@ -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);
}