summaryrefslogtreecommitdiff
path: root/man
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2019-08-23 17:01:18 +0200
committerThomas Haller <thaller@redhat.com>2019-09-22 16:05:50 +0200
commit6d644c66a8baf0489188bcdd8137abcca79b0e1b (patch)
treea33a892376eeb11a2ad975ee8a3edcc479366cb4 /man
parenteae69e33dd1865f24544c135b366eb343c5a46e6 (diff)
downloadNetworkManager-6d644c66a8baf0489188bcdd8137abcca79b0e1b.tar.gz
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.
Diffstat (limited to 'man')
0 files changed, 0 insertions, 0 deletions