broadband-modem-mbim: use device manufacturer information when available
MBIM modems can be supported by the 'generic' plugin. Instead of treating the plugin name (i.e. Generic) as the manufacturer, it's more useful to use the manufacturer information reported by the underlying USB device if that is available.
This commit is contained in:

committed by
Aleksander Morgado

parent
3a0d658b5d
commit
f8a375b1fa
@@ -235,9 +235,17 @@ modem_load_manufacturer (MMIfaceModem *self,
|
||||
gpointer user_data)
|
||||
{
|
||||
GTask *task;
|
||||
gchar *manufacturer;
|
||||
gchar *manufacturer = NULL;
|
||||
MMPortMbim *port;
|
||||
|
||||
manufacturer = g_strdup (mm_base_modem_get_plugin (MM_BASE_MODEM (self)));
|
||||
port = mm_base_modem_peek_port_mbim (MM_BASE_MODEM (self));
|
||||
if (port) {
|
||||
manufacturer = g_strdup (mm_kernel_device_get_physdev_manufacturer (
|
||||
mm_port_peek_kernel_device (MM_PORT (port))));
|
||||
}
|
||||
|
||||
if (!manufacturer)
|
||||
manufacturer = g_strdup (mm_base_modem_get_plugin (MM_BASE_MODEM (self)));
|
||||
|
||||
task = g_task_new (self, NULL, callback, user_data);
|
||||
g_task_return_pointer (task, manufacturer, g_free);
|
||||
|
Reference in New Issue
Block a user