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:
@@ -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"
|
||||
|
||||
|
@@ -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),
|
||||
|
Reference in New Issue
Block a user