2008-07-02 Dan Williams <dcbw@redhat.com>

* src/nm-device-wifi.c
		- (can_scan): don't scan when a shared connection is activated since
			that makes drivers mad (causing disconnects); also NM doesn't need
			to hedge against disconnects by keeping up-to-date network topology
			because the connection originates from the local machine, and thus
			there should be no disconnects



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3796 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Dan Williams 2008-07-02 12:46:45 +00:00
parent b6bc5ac3c8
commit 6f22c03c1b
2 changed files with 29 additions and 0 deletions

View file

@ -1,3 +1,12 @@
2008-07-02 Dan Williams <dcbw@redhat.com>
* src/nm-device-wifi.c
- (can_scan): don't scan when a shared connection is activated since
that makes drivers mad (causing disconnects); also NM doesn't need
to hedge against disconnects by keeping up-to-date network topology
because the connection originates from the local machine, and thus
there should be no disconnects
2008-07-01 Dan Williams <dcbw@redhat.com>
Fix mobile broadband username/password issues. NM was never requesting

View file

@ -48,6 +48,8 @@
#include "nm-setting-wireless.h"
#include "nm-setting-wireless-security.h"
#include "nm-setting-8021x.h"
#include "nm-setting-ip4-config.h"
#include "nm-setting-ip6-config.h"
#include "NetworkManagerSystem.h"
static gboolean impl_device_get_access_points (NMDeviceWifi *device,
@ -1538,6 +1540,7 @@ can_scan (NMDeviceWifi *self)
guint32 sup_state;
NMDeviceState dev_state;
gboolean is_disconnected = FALSE;
NMActRequest *req;
g_return_val_if_fail (priv->supplicant.iface != NULL, FALSE);
@ -1558,6 +1561,23 @@ can_scan (NMDeviceWifi *self)
if (is_disconnected)
return TRUE;
/* Don't scan when a shared connection is active; it makes drivers mad */
req = nm_device_get_act_request (NM_DEVICE (self));
if (req) {
NMConnection *connection;
NMSettingIP4Config *s_ip4;
NMSettingIP6Config *s_ip6;
connection = nm_act_request_get_connection (req);
s_ip4 = (NMSettingIP4Config *) nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG);
if (s_ip4 && !strcmp (s_ip4->method, NM_SETTING_IP4_CONFIG_METHOD_SHARED))
return FALSE;
s_ip6 = (NMSettingIP6Config *) nm_connection_get_setting (connection, NM_TYPE_SETTING_IP6_CONFIG);
if (s_ip6 && !strcmp (s_ip6->method, NM_SETTING_IP6_CONFIG_METHOD_SHARED))
return FALSE;
}
/* Devices supporting only B/G frequencies can scan when disconnected
* and activated, but not when activating. We don't allow a/b/g devices to
* scan when activated, because there are just too many channels to scan and