mirror of git://git.sysmocom.de/ofono
udevng: Add basic detection for MBIM
Currently only Telit LN930 has been tested to work
This commit is contained in:
parent
649d204158
commit
4a6007ba2d
|
@ -924,6 +924,41 @@ static gboolean setup_quectelqmi(struct modem_info *modem)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean setup_mbim(struct modem_info *modem)
|
||||
{
|
||||
const char *ctl = NULL, *net = NULL, *atcmd = NULL;
|
||||
GSList *list;
|
||||
|
||||
DBG("%s", modem->syspath);
|
||||
|
||||
for (list = modem->devices; list; list = list->next) {
|
||||
struct device_info *info = list->data;
|
||||
|
||||
DBG("%s %s %s %s %s %s", info->devnode, info->interface,
|
||||
info->number, info->label,
|
||||
info->sysattr, info->subsystem);
|
||||
|
||||
if (g_strcmp0(info->subsystem, "usbmisc") == 0) /* cdc-wdm */
|
||||
ctl = info->devnode;
|
||||
else if (g_strcmp0(info->subsystem, "net") == 0) /* wwan */
|
||||
net = info->devnode;
|
||||
else if (g_strcmp0(info->subsystem, "tty") == 0) {
|
||||
if (g_strcmp0(info->number, "02") == 0)
|
||||
atcmd = info->devnode;
|
||||
}
|
||||
}
|
||||
|
||||
if (ctl == NULL || net == NULL)
|
||||
return FALSE;
|
||||
|
||||
DBG("ctl=%s net=%s atcmd=%s", ctl, net, atcmd);
|
||||
|
||||
ofono_modem_set_string(modem->modem, "Device", ctl);
|
||||
ofono_modem_set_string(modem->modem, "NetworkInterface", net);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean setup_serial_modem(struct modem_info* modem)
|
||||
{
|
||||
struct serial_device_info* info;
|
||||
|
@ -1183,6 +1218,7 @@ static struct {
|
|||
{ "ublox", setup_ublox },
|
||||
{ "gemalto", setup_gemalto },
|
||||
{ "xmm7xxx", setup_xmm7xxx },
|
||||
{ "mbim", setup_mbim },
|
||||
/* Following are non-USB modems */
|
||||
{ "ifx", setup_ifx },
|
||||
{ "u8500", setup_isi_serial },
|
||||
|
@ -1511,6 +1547,7 @@ static struct {
|
|||
{ "mbm", "cdc_acm", "413c" },
|
||||
{ "mbm", "cdc_ether", "413c" },
|
||||
{ "mbm", "cdc_ncm", "413c" },
|
||||
{ "mbim", "cdc_mbim" },
|
||||
{ "mbm", "cdc_acm", "03f0" },
|
||||
{ "mbm", "cdc_ether", "03f0" },
|
||||
{ "mbm", "cdc_ncm", "03f0" },
|
||||
|
|
Loading…
Reference in New Issue