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.
This commit is contained in:
Aleksander Morgado
2012-08-31 13:21:35 +02:00
parent c6a1d91cd5
commit ab7f558a2c
2 changed files with 10 additions and 0 deletions

View File

@@ -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"

View File

@@ -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),