diff options
Diffstat (limited to 'plugins/mm-plugin-huawei.c')
-rw-r--r-- | plugins/mm-plugin-huawei.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/plugins/mm-plugin-huawei.c b/plugins/mm-plugin-huawei.c index fc1a23f1..534d1a3c 100644 --- a/plugins/mm-plugin-huawei.c +++ b/plugins/mm-plugin-huawei.c @@ -49,6 +49,7 @@ mm_plugin_create (void) #define TAG_HUAWEI_PCUI_PORT "huawei-pcui-port" #define TAG_HUAWEI_MODEM_PORT "huawei-modem-port" +#define TAG_HUAWEI_NDIS_PORT "huawei-ndis-port" #define TAG_HUAWEI_DIAG_PORT "huawei-diag-port" #define TAG_GETPORTMODE_SUPPORTED "getportmode-supported" @@ -115,6 +116,7 @@ getportmode_response_cb (MMPluginBaseSupportsTask *task, cache_port_mode (plugin, response->str, "PCUI:", TAG_HUAWEI_PCUI_PORT); cache_port_mode (plugin, response->str, "MDM:", TAG_HUAWEI_MODEM_PORT); + cache_port_mode (plugin, response->str, "NDIS:", TAG_HUAWEI_NDIS_PORT); cache_port_mode (plugin, response->str, "DIAG:", TAG_HUAWEI_DIAG_PORT); g_object_set_data (G_OBJECT (plugin), TAG_GETPORTMODE_SUPPORTED, GUINT_TO_POINTER (1)); @@ -294,6 +296,10 @@ grab_port (MMPluginBase *base, pflags = MM_AT_PORT_FLAG_PRIMARY; else if (usbif + 1 == GPOINTER_TO_INT (g_object_get_data (G_OBJECT (base), TAG_HUAWEI_MODEM_PORT))) pflags = MM_AT_PORT_FLAG_PPP; + else if (!g_object_get_data (G_OBJECT (base), TAG_HUAWEI_MODEM_PORT) && + usbif + 1 == GPOINTER_TO_INT (g_object_get_data (G_OBJECT (base), TAG_HUAWEI_NDIS_PORT))) + /* If NDIS reported only instead of MDM, use it */ + pflags = MM_AT_PORT_FLAG_PPP; else if (!g_object_get_data (G_OBJECT (base), TAG_GETPORTMODE_SUPPORTED)) { /* If GETPORTMODE is not supported, we assume usbif 0 is the modem port */ if ((usbif == 0) && (ptype == MM_PORT_TYPE_AT)) { |