NetworkManager/src
Thomas Haller 6d644c66a8 wwan: mark modems that are taken by a NMDevice as "claimed"
NMModem-s are either used by NMDeviceModem or by NMDeviceBt.
The mechanism how that is coordinated it odd:

  - the factory emits component-added, and then NMDeviceBt
    might take the device (and claim it). In that case, component-added
    would return TRUE to indicate that the modem should not be also
    used by NMDeviceModem.

  - next, if the modem has a driver that looks like bluetooth, NMDeviceModem
    ignores it too.

  - finally, NMDeviceModem claims the modem (which is now considered to
    be non-bluetooth).

I think the first problem is that the device factory tries to have this
generic mechanism of "component-added". It's literally only used to
cover this special case. Note that NMDeviceBt is aware of modems. So,
abstracting this just adds lots of code that could be solved better
by handling the case (of giving the modem to either NMDeviceBt or
NMDeviceModem) specifically.

NMWWanFactory itself registers to the NM_MODEM_MANAGER_MODEM_ADDED
signal and emits nm_device_factory_emit_component_added().
We could just have NMWWanFactory and NMDeviceBt both register to
that signal. Signals even support priorities, so we could have
NMDeviceBt be called first to claim the device.

Anyway, as the modem can only have one owner, the modem should have
a flag that indicates whether it's claimed or not. That will allow
multiple components all look at the same modem and moderate who is
going to take ownership.
2019-09-22 16:05:50 +02:00
..
devices wwan: mark modems that are taken by a NMDevice as "claimed" 2019-09-22 16:05:50 +02:00
dhcp dhcp: nettools: drop useless "options" GHashTable checks 2019-09-13 18:44:32 +02:00
dns all: SPDX header conversion 2019-09-10 11:19:56 +02:00
dnsmasq all: SPDX header conversion 2019-09-10 11:19:56 +02:00
initrd all: SPDX header conversion 2019-09-10 11:19:56 +02:00
ndisc all: SPDX header conversion 2019-09-10 11:19:56 +02:00
platform all: SPDX header conversion 2019-09-10 11:19:56 +02:00
ppp core: extend nm_shutdown_wait_obj_*() to support notification via a GCancellable 2019-09-22 16:05:50 +02:00
settings core: extend nm_shutdown_wait_obj_*() to support notification via a GCancellable 2019-09-22 16:05:50 +02:00
supplicant wifi: fix the supplicant config test 2019-09-20 16:24:40 +02:00
systemd all: SPDX header conversion 2019-09-10 11:19:56 +02:00
tests all: SPDX header conversion 2019-09-10 11:19:56 +02:00
vpn all: SPDX header conversion 2019-09-10 11:19:56 +02:00
main-utils.c all: SPDX header conversion 2019-09-10 11:19:56 +02:00
main-utils.h all: SPDX header conversion 2019-09-10 11:19:56 +02:00
main.c libnm: export reload flags 2019-09-17 09:30:18 +02:00
meson.build build: fix meson warning about wrong custom target argument 2019-08-05 16:05:30 +02:00
NetworkManagerUtils.c core: extend nm_shutdown_wait_obj_*() to support notification via a GCancellable 2019-09-22 16:05:50 +02:00
NetworkManagerUtils.h core: extend nm_shutdown_wait_obj_*() to support notification via a GCancellable 2019-09-22 16:05:50 +02:00
nm-act-request.c all: SPDX header conversion 2019-09-10 11:19:56 +02:00
nm-act-request.h all: SPDX header conversion 2019-09-10 11:19:56 +02:00
nm-active-connection.c all: SPDX header conversion 2019-09-10 11:19:56 +02:00
nm-active-connection.h all: SPDX header conversion 2019-09-10 11:19:56 +02:00
nm-audit-manager.c all: SPDX header conversion 2019-09-10 11:19:56 +02:00
nm-audit-manager.h all: SPDX header conversion 2019-09-10 11:19:56 +02:00
nm-auth-manager.c all: SPDX header conversion 2019-09-10 11:19:56 +02:00
nm-auth-manager.h all: SPDX header conversion 2019-09-10 11:19:56 +02:00
nm-auth-subject.c all: SPDX header conversion 2019-09-10 11:19:56 +02:00
nm-auth-subject.h all: SPDX header conversion 2019-09-10 11:19:56 +02:00
nm-auth-utils.c all: SPDX header conversion 2019-09-10 11:19:56 +02:00
nm-auth-utils.h all: SPDX header conversion 2019-09-10 11:19:56 +02:00
nm-checkpoint-manager.c all: SPDX header conversion 2019-09-10 11:19:56 +02:00
nm-checkpoint-manager.h all: SPDX header conversion 2019-09-10 11:19:56 +02:00
nm-checkpoint.c all: SPDX header conversion 2019-09-10 11:19:56 +02:00
nm-checkpoint.h all: SPDX header conversion 2019-09-10 11:19:56 +02:00
nm-config-data.c all: SPDX header conversion 2019-09-10 11:19:56 +02:00
nm-config-data.h libnm: export reload flags 2019-09-17 09:30:18 +02:00
nm-config.c all: SPDX header conversion 2019-09-10 11:19:56 +02:00
nm-config.h all: SPDX header conversion 2019-09-10 11:19:56 +02:00
nm-connectivity.c all: SPDX header conversion 2019-09-10 11:19:56 +02:00
nm-connectivity.h all: SPDX header conversion 2019-09-10 11:19:56 +02:00
nm-core-utils.c all: SPDX header conversion 2019-09-10 11:19:56 +02:00
nm-core-utils.h all: SPDX header conversion 2019-09-10 11:19:56 +02:00
nm-dbus-manager.c shared,all: add and use DBUS_INTERFACE_OBJECT_MANAGER define 2019-09-22 16:05:50 +02:00
nm-dbus-manager.h all: SPDX header conversion 2019-09-10 11:19:56 +02:00
nm-dbus-object.c all: SPDX header conversion 2019-09-10 11:19:56 +02:00
nm-dbus-object.h all: SPDX header conversion 2019-09-10 11:19:56 +02:00
nm-dbus-utils.c all: SPDX header conversion 2019-09-10 11:19:56 +02:00
nm-dbus-utils.h all: SPDX header conversion 2019-09-10 11:19:56 +02:00
nm-dcb.c all: SPDX header conversion 2019-09-10 11:19:56 +02:00
nm-dcb.h all: SPDX header conversion 2019-09-10 11:19:56 +02:00
nm-dhcp4-config.c all: SPDX header conversion 2019-09-10 11:19:56 +02:00
nm-dhcp4-config.h all: SPDX header conversion 2019-09-10 11:19:56 +02:00
nm-dhcp6-config.c all: SPDX header conversion 2019-09-10 11:19:56 +02:00
nm-dhcp6-config.h all: SPDX header conversion 2019-09-10 11:19:56 +02:00
nm-dispatcher.c all: SPDX header conversion 2019-09-10 11:19:56 +02:00
nm-dispatcher.h all: SPDX header conversion 2019-09-10 11:19:56 +02:00
nm-firewall-manager.c all: SPDX header conversion 2019-09-10 11:19:56 +02:00
nm-firewall-manager.h all: SPDX header conversion 2019-09-10 11:19:56 +02:00
nm-hostname-manager.c all: SPDX header conversion 2019-09-10 11:19:56 +02:00
nm-hostname-manager.h all: SPDX header conversion 2019-09-10 11:19:56 +02:00
nm-iface-helper.c all: SPDX header conversion 2019-09-10 11:19:56 +02:00
nm-ip4-config.c all: SPDX header conversion 2019-09-10 11:19:56 +02:00
nm-ip4-config.h all: SPDX header conversion 2019-09-10 11:19:56 +02:00
nm-ip6-config.c all: SPDX header conversion 2019-09-10 11:19:56 +02:00
nm-ip6-config.h all: SPDX header conversion 2019-09-10 11:19:56 +02:00
nm-keep-alive.c all: SPDX header conversion 2019-09-10 11:19:56 +02:00
nm-keep-alive.h all: SPDX header conversion 2019-09-10 11:19:56 +02:00
nm-logging.c all: SPDX header conversion 2019-09-10 11:19:56 +02:00
nm-logging.h all: SPDX header conversion 2019-09-10 11:19:56 +02:00
nm-manager.c libnm: export reload flags 2019-09-17 09:30:18 +02:00
nm-manager.h core: add and use NM_MANAGER_GET macro 2019-09-22 16:05:50 +02:00
nm-netns.c all: SPDX header conversion 2019-09-10 11:19:56 +02:00
nm-netns.h all: SPDX header conversion 2019-09-10 11:19:56 +02:00
nm-pacrunner-manager.c all: SPDX header conversion 2019-09-10 11:19:56 +02:00
nm-pacrunner-manager.h all: SPDX header conversion 2019-09-10 11:19:56 +02:00
nm-policy.c core: add and use NM_MANAGER_GET macro 2019-09-22 16:05:50 +02:00
nm-policy.h all: SPDX header conversion 2019-09-10 11:19:56 +02:00
nm-proxy-config.c all: SPDX header conversion 2019-09-10 11:19:56 +02:00
nm-proxy-config.h all: SPDX header conversion 2019-09-10 11:19:56 +02:00
nm-rfkill-manager.c all: SPDX header conversion 2019-09-10 11:19:56 +02:00
nm-rfkill-manager.h all: SPDX header conversion 2019-09-10 11:19:56 +02:00
nm-session-monitor.c all: SPDX header conversion 2019-09-10 11:19:56 +02:00
nm-session-monitor.h all: SPDX header conversion 2019-09-10 11:19:56 +02:00
nm-sleep-monitor.c all: SPDX header conversion 2019-09-10 11:19:56 +02:00
nm-sleep-monitor.h all: SPDX header conversion 2019-09-10 11:19:56 +02:00
nm-test-utils-core.h all: SPDX header conversion 2019-09-10 11:19:56 +02:00
nm-types.h all: SPDX header conversion 2019-09-10 11:19:56 +02:00
org.freedesktop.NetworkManager.conf wifi-p2p: rename Wi-Fi P2P 2019-02-01 17:02:57 +01:00