Commit Graph

30 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
Aleksander Morgado
61144e2103 iface-modem: remove MM_IFACE_MODEM_SIM_HOT_SWAP_CONFIGURED property
This property is used in the MMIfaceModem to flag whether the SIM hot
swap setup has been performed or not. The flag is now moved to the
iface-specific private context.

The property was also used in AT-based modems, so that implementations
supporting the SIM hot swap via AT URCs could flag the upper layers
whether the enabling of the feature was done correctly or not, and if
so, create and keep the AT ports context open. But this feature only
made sense in AT-based modems, i.e. an MBIM modem that detects SIM hot
swaps via MBIM indications exclusively should not require the AT ports
context open for anything. The check in the MMBroadbandModem object
has therefore been removed, and the logic will be updated so that it
only applies to AT-based modems.
2022-05-20 09:03:54 +00:00
Andrew Lassalle
3745ce8b1f Revert "plugins,fibocom: Add udev filter for pci wwan"
This reverts commit 115a5d876e.
2022-05-09 14:24:09 -07:00
Andrew Lassalle
115a5d876e plugins,fibocom: Add udev filter for pci wwan
Add a udev filter to identify pci wwan ports from fibocom modems.
2022-05-05 09:35:36 -07:00
Aleksander Morgado
c74a377f98 fibocom: new shared interface for common logic
The set_initial_eps_bearer_settings() operation is the same in XMM
capable and generic MBIM modem objects. Place it in a common shared
interface so that we don't duplicate code.
2022-03-09 22:05:32 +00:00
Jack Song
5fc6b9ee1b fibocom: toggle modem power after attach APN on mbim 2022-03-09 22:05:32 +00:00
Sven Schwermer
318bac1186 fibocom: Add reset functionality
Signed-off-by: Sven Schwermer <sven.schwermer@disruptive-technologies.com>
2022-03-09 09:23:15 +00:00
guihkx
c615be77fd fibocom: remove executable bit from rules file
This silents a warning given by udev:

Configuration file /usr/lib/udev/rules.d/77-mm-fibocom-port-types.rules is marked executable. Please remove executable permission bits. Proceeding anyway.
2022-02-19 00:01:05 -03:00
Aleksander Morgado
97c50e53af fibocom: detect ID_MM_FIBOCOM_INITIAL_EPS_OFF_ON on runtime
We won't create a full new different modem object based on whether the
ID_MM_FIBOCOM_INITIAL_EPS_OFF_ON tag is found or not. Instead, we
always will create the same object type, and detect whether the OFF/ON
cycle is required during runtime.
2022-02-16 13:04:45 +00:00
Aleksander Morgado
499cdf79dc fibocom: initial EPS settings update always available in parent
Assume that the method to change the initial EPS bearer settings is
always implemented in the parent, so that we can avoid the runtime
check.

This also fixes the codepath that would happen if the
iface_modem_3gpp_parent->set_initial_eps_bearer_settings == NULL
condition was valid, as that would end up with a GTask never completed.
2022-02-16 13:04:45 +00:00
Jack Song
d902ddfee5 fibocom: toggle modem power after attach APN
When the attach APN settings are changed, the device will go through a
radio on -> radio off -> radio on cycle so that the new changes are
taken into consideration.

This change is done in a Fibocom-specific MBIM modem implementation
because it's working around a firmware bug that would prevent for the
attach settings to be considered automatically.
2022-02-16 13:04:45 +00:00
Sven Schwermer
300e1023ef fibocom: Double-check connection after dialing
Fibocom's documentation states that we must double-check the connection
is established when setting up an ECM connection. The possible replies -
according to the documentation - are:

  +GTRNDIS: <state>,<cid>,<ip>,<prim. dns>,<sec. dns>
  OK

or

  +GTRNDIS: 0

We just care about the state value which is 1 if everything worked.
2022-01-11 09:31:32 +00:00
Sven Schwermer
382a7c2425 fibocom: Use ECM bearer if +GTRNDIS is available
Some modems might have a net port but don't support +GTRNDIS which is
used by the ECM bearer. That case will be caught by this additional
check.
2022-01-11 09:31:32 +00:00
Sven Schwermer
c174fd29dc fibocom: Add L610 support 2022-01-11 09:31:32 +00:00
Sven Schwermer
2830cb3273 fibocom: Add udev port rules for MA510-GL 2022-01-11 09:31:32 +00:00
Sven Schwermer
c21bcb5526 fibocom: Add bearer for ECM-based connections 2022-01-11 09:31:32 +00:00
Sven Schwermer
6ad17fb22e fibocom: Subclass broadband modem
This is required in order to be able to use a custom bearer which in
turn is necessary for establishing ECM connections.
2022-01-11 09:31:32 +00:00
Mingjie Zhang
2bad8f5a0d fibocom: update FM101 port type hints to final layout
The port type hints for the FM101 were updated to be in line with the final product layout,
where USB interface #2 is now used as an AT port (not ignored) and USB interface #4 is now
used as debug port. USB interface #6 is removed as it no longer exists.
2021-12-10 19:44:28 +08:00
ZhangMingjie
3a880fd832 plugins: add fibocom FM101 to fibocom port types rules file
This patch add fibocom FM101 to 77-mm-fibocom-port-types.rules file.
which contains two sets of vid and pid pairs, "2cb7:01a2" and "2cb7:01a4".
2021-11-10 20:19:47 +08:00
Aleksander Morgado
999df00d58 fibocom: fix QMI device allowance
E.g. for a FM150:

   [1627656003.230873] [cdc-wdm0] port contents loaded:
   [1627656003.231069] [cdc-wdm0]   bus: usb
   [1627656003.231179] [cdc-wdm0]   interface: /sys/devices/pci0000:00/0000:00:14.0/usb1/1-11/1-11.4/1-11.4.4/1-11.4.4:1.4
   [1627656003.231272] [cdc-wdm0]   device: /sys/devices/pci0000:00/0000:00:14.0/usb1/1-11/1-11.4/1-11.4.4
   [1627656003.231364] [cdc-wdm0]   driver: qmi_wwan
   [1627656003.231450] [cdc-wdm0]   vendor: 2cb7
   [1627656003.231536] [cdc-wdm0]   product: 0104
   [1627656003.231626] [cdc-wdm0]   revision: 0414
   [1627656003.231722] [base-manager] adding port cdc-wdm0 at sysfs path: /sys/devices/pci0000:00/0000:00:14.0/usb1/1-11/1-11.4/1-11.4.4/1-11.4.4:1.4/usbmisc/cdc-wdm0
   ...
   [1627656004.333874] [plugin/fibocom] port cdc-wdm0 filtered by implicit QMI driver
2021-07-31 23:12:55 +02: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
Zrshuo Zhang
179e12befc fibocom: add port type hints for the NL668-AM 2021-04-07 12:18:58 +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
8eaffb654f fibocom: add FM150 port type hints 2020-04-09 12:38:50 +00:00
Aleksander Morgado
03f625aa3b fibocom: support QMI capable devices 2020-04-09 12:38:50 +00:00
Aleksander Morgado
8722215f7e plugins: use logging module name as plugin name 2020-04-08 17:53:42 +02:00
Aleksander Morgado
77080d5f26 fibocom: port to use object logging 2020-04-08 16:35:09 +02:00
Aleksander Morgado
475e182819 fibocom: support XMM-based devices 2018-08-21 17:02:39 +00:00
Aleksander Morgado
1b002a3584 fibocom: ignore intel trace port in the L850-GL 2018-08-21 17:02:39 +00:00
Aleksander Morgado
af8adcc756 fibocom: new plugin with support for MBIM devices 2018-08-21 17:02:39 +00:00