diff options
| author | Dan Williams <dcbw@redhat.com> | 2014-07-23 14:07:33 -0500 |
|---|---|---|
| committer | Dan Williams <dcbw@redhat.com> | 2014-07-23 14:26:40 -0500 |
| commit | 2e0ba9d865dd386ba719f7aaaf72c101c4eb7bfa (patch) | |
| tree | a9bb2e9f53c5c9051752d80fa1bdcad46d7a1c90 /src | |
| parent | 784d2631700528bde2ae85bca1b551c185d9c270 (diff) | |
| download | NetworkManager-dcbw/wwan-ipv6.tar.gz | |
wwan: use a shorter DHCP timeoutdcbw/wwan-ipv6
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/devices/wwan/nm-device-modem.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/devices/wwan/nm-device-modem.c b/src/devices/wwan/nm-device-modem.c index cc08d176d7..fd1b7f2868 100644 --- a/src/devices/wwan/nm-device-modem.c +++ b/src/devices/wwan/nm-device-modem.c @@ -592,6 +592,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) { NMDeviceModemPrivate *priv = NM_DEVICE_MODEM_GET_PRIVATE (self); @@ -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; |
