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

* dhcpcd/client.c
		- Remove some debug messages
		- Wrap others in #ifdef DEBUG/#endif

	* src/NetworkManager.c
		- Remove some debug messages
		- Clarify some debug messages
		- Remove code related to old single-thread wireless scanning

	* src/NetworkManagerAP.[ch]
		- New AP property "last_seen" to track how recently an AP was
			found in a scan
		- Start using 'const' more in function arguments

	* src/NetworkManagerAPList.[ch]
		- (nm_ap_list_merge_scanned_ap): new, selectively update attributes
			of an AP found in an AP list from a source AP, or if not found
			in the list add the source AP
		- (nm_ap_list_combine): remove, no longer needed

	* src/NetworkManagerDevice.c
		- Each device now has a "worker" thread from start to end of its life.
			Scanning for wireless devices now happens in that thread,
			not in a single "wireless scanning thread" for all devices as
			previously.  Activation consists of adding an idle handler to the
			thread's main loop/context, which gets run at the next available
			opportunity.
		- Wireless scanning is also simplified, there is now only one list of
			access points per wireless device, and APs older than 60s are
			removed from the list.  Previously, we kept results for the last
			3 scans and merged whole lists, which was complicated.
		- Cleaned up activation debug messages.
		- Wireless activation and access-point search routines now use Open System
			authentication before trying Shared Key.
		- Removed some code in nm_device_update_best_ap() that could cause cards
			to loose their link to the access point.
		- Scanning now uses a backoff algorithm, where the inverval becomes
			progressively longer between scans when the list of scanned access
			points doesn't change.  A change will revert to the shortest scan
			interval (20s).

	* src/NetworkManagerWireless.[ch]
		- Remove code related to old single-thread wireless scanning


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@382 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Dan Williams
2005-01-18 22:08:22 +00:00
parent 39851ae123
commit c9b41bb448
14 changed files with 522 additions and 525 deletions

View File

@@ -130,8 +130,10 @@ static NMDevice * nm_policy_auto_get_best_device (NMData *data)
element = g_slist_next (element);
}
#if 0
syslog (LOG_NOTICE, "AUTO: Best wired device = %s, best wireless device = %s (%s)", best_wired_dev ? nm_device_get_iface (best_wired_dev) : "(null)",
best_wireless_dev ? nm_device_get_iface (best_wireless_dev) : "(null)", best_wireless_dev ? nm_device_get_essid (best_wireless_dev) : "null" );
#endif
if (best_wireless_dev || best_wired_dev)
{
@@ -258,7 +260,7 @@ gboolean nm_policy_activation_finish (gpointer user_data)
nm_device_get_ap_address (dev, &addr);
nm_dbus_add_network_address (data->dbus_connection, NETWORK_TYPE_ALLOWED, nm_device_get_essid (dev), &addr);
}
syslog (LOG_INFO, "nm_state_modification_monitor() activated device %s", nm_device_get_iface (data->active_device));
syslog (LOG_INFO, "Activation (%s) successful, device activated.", nm_device_get_iface (data->active_device));
}
else
{
@@ -277,16 +279,16 @@ gboolean nm_policy_activation_finish (gpointer user_data)
/* Unref because nm_device_get_best_ap() refs it before returning. */
nm_ap_unref (ap);
}
syslog (LOG_INFO, "nm_state_modification_monitor() failed to activate device %s (%s)", nm_device_get_iface (dev), ap ? nm_ap_get_essid (ap) : "(none)");
syslog (LOG_INFO, "Activation (%s) failed for access point (%s)", nm_device_get_iface (dev), ap ? nm_ap_get_essid (ap) : "(none)");
}
else
syslog (LOG_INFO, "nm_state_modification_monitor() failed to activate device %s", nm_device_get_iface (dev));
syslog (LOG_INFO, "Activation (%s) failed.", nm_device_get_iface (dev));
nm_data_mark_state_changed (data);
}
out:
g_free (result);
nm_device_unref (dev);
g_free (result);
return FALSE;
}
@@ -317,7 +319,7 @@ gboolean nm_state_modification_monitor (gpointer user_data)
nm_ap_list_unref (data->allowed_ap_list);
data->allowed_ap_list = nm_ap_list_new (NETWORK_TYPE_ALLOWED);
if (data->allowed_ap_list)
nm_ap_list_populate (data->allowed_ap_list, data);
nm_ap_list_populate_from_nmi (data->allowed_ap_list, data);
data->update_ap_lists = FALSE;
}
@@ -364,10 +366,9 @@ gboolean nm_state_modification_monitor (gpointer user_data)
if (best_dev)
{
/* Begin activation on the new device */
syslog (LOG_INFO, "nm_state_modification_monitor(): beginning activation for device '%s'", nm_device_get_iface (best_dev));
nm_device_ref (best_dev);
data->active_device = best_dev;
nm_device_activation_begin (data->active_device);
nm_device_activation_schedule_start (data->active_device);
/* nm_policy_get_best_device() signals us that the user forced
* a device upon us and that we should lock the active device.