Commit Graph

7 Commits

Author SHA1 Message Date
Daniele Palmas
654c5f5014 base-modem: add subsystem vendor ID property
Subsystem vendor ID can be used for identifying PCI modems,
so expose the property.
2022-05-24 09:22:06 +02:00
Iñigo Martínez
2bc697ce32 plugins: Fix port enums includes
The `broadmobi`, `dlink`, `telit` and `tplink` plugins include the
`mm-port-enums-types.h` header. However, they do not use any symbol
defined there.

The `huawei` plugin as includes the `mm-port-enums-types.h` header
but it does not include the build targets as dependencies.

These issues have been fixed by removing the unnecessary includes
from `broadmobi`, `dlink`, `telit` and `tplink` plugins and by
including the enums build target in the `huawei` target.
2022-03-01 09:24:37 +01:00
Aleksander Morgado
3e037dc158 plugins: AT/QCDM/GPS port type hints only applicable to TTY ports
There are modems out there, that reuse the same vid:pid for multiple
USB layouts, so there may be port type hints that are not really
applicable in all layouts.

E.g. the EM7565 in MBIM layout uses interface #0 for the MBIM port,
while in QMI layout it uses interface #0 for the QCDM port (which is
what the port type hint included in MM states). With these rules, if
we don't bind the port type hint to TTY ports only, we would be
wrongly flagging the MBIM port as possible QCDM port:

    <debug> [plugin/sierra] probes required for port cdc-wdm0: 'mbim'
    <debug> [cdc-wdm0/probe] no AT/QMI/MBIM probing in possible QCDM port
    <debug> [cdc-wdm0/probe] port is not AT-capable
    <debug> [cdc-wdm0/probe] port is not QMI-capable
    <debug> [cdc-wdm0/probe] port is not MBIM-capable
    <debug> [cdc-wdm0/probe] port probing finished: no more probings needed

Avoid this, by making sure all port type hints are added exclusively
to TTY ports. It's not a perfect solution, but it's enough for the
known cases.
2021-07-13 10:56:11 +02:00
Aleksander Morgado
950abbf8ee core: stop monitoring the 'usb' subsystem
Back in Linux < 3.6 days, the cdc-wdm ports exposed by the QMI driver
were flagged as owned by the 'usb' subsystem. That changed in 3.6 when
the subsystem was renamed to 'usbmisc':

  https://mail.gnome.org/archives/networkmanager-list/2012-June/msg00125.html

This patch removes all monitoring of the 'usb' subsystem completely,
which is anyway a valid subsystem but for which we shouldn't need any
special handling. Right now, with newer kernels, we were using that
monitoring exclusively to get notified of full USB device remove
events, which is really not required as we already process the port
removals one by one.

We simplify the logic everywhere that attempted to match either the
'usb' or 'usbmisc' subsystems, and we no longer require the explicit
checks for the port name being named 'cdc-wdm[0-9]*' in the code, as
that is already taken care of by the ID_MM_CANDIDATE udev tag rule.
2020-11-13 08:57:06 +00:00
Aleksander Morgado
8722215f7e plugins: use logging module name as plugin name 2020-04-08 17:53:42 +02:00
Aleksander Morgado
b3e56bc576 dlink: port to use object logging 2020-04-08 16:35:09 +02:00
Aleksander Morgado
1334f689e2 dlink: new plugin
Includes port type hints for the D-Link DWM-222.

  P:  Vendor=2001 ProdID=7e35 Rev=02.28
  S:  Manufacturer=Mobile Connect
  S:  Product=Mobile Connect
  S:  SerialNumber=0123456789ABCDEF
  C:  #Ifs= 6 Cfg#= 1 Atr=80 MxPwr=500mA
  I:  If#=0x0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
  I:  If#=0x1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
  I:  If#=0x2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
  I:  If#=0x3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
  I:  If#=0x4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
  I:  If#=0x5 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
2019-09-11 13:56:57 +00:00