wwan: use a shorter DHCP timeout

With WWAN, the DHCP is all done in modem firmware, and never started
until we know we have a successful packet connection to the network.
Which means the modem firmware already knows the IP details and
is ready to provide them.  Furthermore, since the DHCP is done on
what is essentially a reliable, wired point-to-point link, we don't
have to waste time with retransmits for dropped packets either.
This commit is contained in:
Dan Williams 2014-07-23 14:07:33 -05:00
parent 784d263170
commit 2e0ba9d865

View file

@ -591,6 +591,18 @@ nm_device_modem_init (NMDeviceModem *self)
{
}
static void
constructed (GObject *object)
{
G_OBJECT_CLASS (nm_device_modem_parent_class)->constructed (object);
/* DHCP is always done by the modem firmware, not by the network, and
* by the time we get around to DHCP the firmware should already know
* the IP addressing details. So the DHCP timeout can be much shorter.
*/
nm_device_set_dhcp_timeout (NM_DEVICE (object), 15);
}
static void
set_modem (NMDeviceModem *self, NMModem *modem)
{
@ -684,6 +696,7 @@ nm_device_modem_class_init (NMDeviceModemClass *mclass)
object_class->dispose = dispose;
object_class->get_property = get_property;
object_class->set_property = set_property;
object_class->constructed = constructed;
device_class->check_connection_compatible = check_connection_compatible;
device_class->check_connection_available = check_connection_available;