diff --git a/ChangeLog b/ChangeLog index cd8cb71931..5f9e1d84c8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2006-02-05 Dan Williams + + * src/nm-device-802-11-wireless.c + - (get_supplicant_timeout): new function; return + NM_SUPPLICANT_TIMEOUT * 2 for cards that support more than + 14 channels. These are likely a/b/g cards, like Atheros, and + slow as hell to scan. + - (supplicant_timeout_cb, supplicant_monitor_start): use + get_supplicant_timeout() + 2006-02-05 Dan Williams * src/dhcp-manager/nm-dhcp-manager.c diff --git a/src/nm-device-802-11-wireless.c b/src/nm-device-802-11-wireless.c index a29b12f814..f131b39f4c 100644 --- a/src/nm-device-802-11-wireless.c +++ b/src/nm-device-802-11-wireless.c @@ -2204,6 +2204,14 @@ supplicant_status_cb (GIOChannel *source, return TRUE; } +static int +get_supplicant_timeout (NMDevice80211Wireless *self) +{ + if(self->priv->num_freqs > 14) + return NM_SUPPLICANT_TIMEOUT * 2; + return NM_SUPPLICANT_TIMEOUT; +} + static gboolean supplicant_timeout_cb (gpointer user_data) { @@ -2213,7 +2221,7 @@ supplicant_timeout_cb (gpointer user_data) g_assert (self); nm_info ("Activation (%s/wireless): association took too long (>%ds), failing activation.", - nm_device_get_iface (dev), NM_SUPPLICANT_TIMEOUT); + nm_device_get_iface (dev), get_supplicant_timeout (self)); if (nm_device_is_activating (dev)) nm_policy_schedule_activation_failed (nm_device_get_act_request (dev)); @@ -2409,7 +2417,7 @@ supplicant_monitor_start (NMDevice80211Wireless *self) g_source_attach (self->priv->sup_status, context); /* Set up a timeout on the association to kill it after NM_SUPPLICANT_TIMEOUT seconds */ - self->priv->sup_timeout = g_timeout_source_new (NM_SUPPLICANT_TIMEOUT * 1000); + self->priv->sup_timeout = g_timeout_source_new (get_supplicant_timeout (self) * 1000); g_source_set_callback (self->priv->sup_timeout, supplicant_timeout_cb, self, NULL); g_source_attach (self->priv->sup_timeout, context);