2004-11-17 Dan Williams <dcbw@redhat.com>

* Cache access point MAC addresses in NetworkManagerInfo after you've explicitly
		connected to them.  Then, after a scan, match up non-ESSID-broadcasting access
		points with any cached MAC addresses from NetworkManagerInfo.  Allows us to
		show known access points that don't broadcast their ESSID in the menus without
		any user intervention whatsoever.

	* info-daemon/NetworkManagerInfoDbus.c
		- (nmi_dbus_get_network_addresses, nmi_dbus_add_network_address): new functions
			for dbus method calls "getNetworkAddresses" and "addNetworkAddress"

	* src/NetworkManagerAP.[ch]
		- Add a "user_addresses" data member to the NMAccessPoint structure
		- (nm_ap_get_user_addresses, nm_ap_set_user_addresses): new functions for accessing
			the user_addresses data member

	* src/NetworkManagerAPList.c
		- (nm_ap_list_get_ap_by_address): check user_addresses list too, instead of just
			the AP's reported address
		- (nm_ap_list_update_network): grab the user_addresses list from NetworkManagerInfo

	* src/NetworkManagerDHCP.c
		- Increase DHCP timeout from 25s -> 30s

	* src/NetworkManagerDbus.[ch]
		- (nm_dbus_get_network_addresses, nm_dbus_add_network_address): have NMI get/set
			user addresses

	* src/NetworkManagerDevice.c
		- (nm_device_set_wireless_config): bring down the interface, wait 4s, bring it up,
			wait 2s, then configure it.  Sometimes Prism54 cards will freeze up with
			"mgnt tx queue full", seemingly in response to NM controlling the card too much.
			So, we take the card down to clear it out.
		- (nm_device_do_normal_scan): Copy over AP ESSIDs from the allowed access point list
			too, since that's where the user_addresses are

	* src/NetworkManagerPolicy.c
		- (nm_state_modification_monitor): Tell NMI to add an AP's hardware address to
			that wireless networks' user_addresses list upon successful activation


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@319 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Dan Williams
2004-11-17 17:51:36 +00:00
parent 5a62cdb837
commit 498d3f8773
10 changed files with 455 additions and 26 deletions

View File

@@ -130,9 +130,8 @@ static NMDevice * nm_policy_auto_get_best_device (NMData *data)
element = g_slist_next (element);
}
syslog (LOG_NOTICE, "AUTO: Best wired device = %s", best_wired_dev ? nm_device_get_iface (best_wired_dev) : "(null)");
syslog (LOG_NOTICE, "AUTO: Best wireless device = %s (%s)", best_wireless_dev ? nm_device_get_iface (best_wireless_dev) : "(null)",
best_wireless_dev ? nm_device_get_essid (best_wireless_dev) : "null" );
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" );
if (best_wireless_dev || best_wired_dev)
{
@@ -256,13 +255,8 @@ gboolean nm_state_modification_monitor (gpointer user_data)
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);
data->update_ap_lists = FALSE;
}
if (data->notify_device_support)
{
data->notify_device_support = FALSE;
data->update_ap_lists = FALSE;
}
}
@@ -346,6 +340,14 @@ gboolean nm_state_modification_monitor (gpointer user_data)
else if (data->active_device && nm_device_is_just_activated (data->active_device))
{
nm_dbus_signal_device_status_change (data->dbus_connection, data->active_device, DEVICE_NOW_ACTIVE);
/* Tell NetworkManagerInfo to store the MAC address of the active device's AP */
if (nm_device_is_wireless (data->active_device))
{
struct ether_addr addr;
nm_device_get_ap_address (data->active_device, &addr);
nm_dbus_add_network_address (data->dbus_connection, NETWORK_TYPE_ALLOWED, nm_device_get_essid (data->active_device), &addr);
}
syslog (LOG_INFO, "nm_state_modification_monitor() activated device %s", nm_device_get_iface (data->active_device));
}
else if (data->active_device && nm_device_did_activation_fail (data->active_device))