diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2012-08-31 13:21:35 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2012-08-31 13:21:35 +0200 |
commit | ab7f558a2c6376396c021d57175c6faaba57554c (patch) | |
tree | 6ddde20eab0ae231e0064ff704dac4e876647135 /plugins/zte | |
parent | c6a1d91cd5683df2551fd7b9750f23bbad5c1077 (diff) |
zte: handle Icera-based devics that use DHCP
This is the port to git master of the following commit:
commit d2654a287c309346cc46b535dd974b0a5fc06fd4
Author: Dan Williams <dcbw@redhat.com>
Date: Tue Aug 28 12:15:30 2012 -0500
zte: handle Icera-based devics that use DHCP
Since we can't autodetect that the devices use DHCP, we'll need to
tag them with udev rules for the time being.
Diffstat (limited to 'plugins/zte')
-rw-r--r-- | plugins/zte/77-mm-zte-port-types.rules | 3 | ||||
-rw-r--r-- | plugins/zte/mm-plugin-zte.c | 7 |
2 files changed, 10 insertions, 0 deletions
diff --git a/plugins/zte/77-mm-zte-port-types.rules b/plugins/zte/77-mm-zte-port-types.rules index ac008dd7..6fcbbf2f 100644 --- a/plugins/zte/77-mm-zte-port-types.rules +++ b/plugins/zte/77-mm-zte-port-types.rules @@ -183,5 +183,8 @@ ATTRS{idProduct}=="2002", ENV{.MM_USBIFNUM}=="01", ENV{ID_MM_ZTE_PORT_TYPE_AUX}= ATTRS{idProduct}=="2003", ENV{.MM_USBIFNUM}=="03", ENV{ID_MM_ZTE_PORT_TYPE_MODEM}="1" ATTRS{idProduct}=="2003", ENV{.MM_USBIFNUM}=="01", ENV{ID_MM_ZTE_PORT_TYPE_AUX}="1" +# Icera-based devices that use DHCP, not AT%IPDPADDR +ATTRS{product}=="K3805-z", ENV{ID_MM_ZTE_ICERA_DHCP}="1" + LABEL="mm_zte_port_types_end" diff --git a/plugins/zte/mm-plugin-zte.c b/plugins/zte/mm-plugin-zte.c index 739393c6..241e5b2c 100644 --- a/plugins/zte/mm-plugin-zte.c +++ b/plugins/zte/mm-plugin-zte.c @@ -92,6 +92,13 @@ grab_port (MMPlugin *self, pflags = MM_AT_PORT_FLAG_SECONDARY; } + if (g_udev_device_get_property_as_boolean (port, "ID_MM_ZTE_ICERA_DHCP")) { + mm_dbg ("Icera-based ZTE modem will use DHCP"); + g_object_set (modem, + MM_BROADBAND_MODEM_ICERA_DEFAULT_IP_METHOD, MM_BEARER_IP_METHOD_DHCP, + NULL); + } + return mm_base_modem_grab_port (modem, mm_port_probe_get_port_subsys (probe), mm_port_probe_get_port_name (probe), |