device,plugin: reset MMDevice's hotplugged after creating the modem

The hotplugged flag was added to simplify modem probe on first time it
is created. Before the re-probe it must be set to FALSE to destroy all
existing netlink interfaces and force full reconfiguration.
This commit is contained in:
Michal Mazur
2024-12-19 09:42:26 +00:00
parent 1e865d76a8
commit 66aa3d16e5
3 changed files with 9 additions and 0 deletions
+6
View File
@@ -698,6 +698,12 @@ mm_device_get_hotplugged (MMDevice *self)
return self->priv->hotplugged;
}
void
mm_device_reset_hotplugged (MMDevice *self)
{
self->priv->hotplugged = FALSE;
}
gboolean
mm_device_get_inhibited (MMDevice *self)
{
+1
View File
@@ -107,6 +107,7 @@ GObject *mm_device_get_plugin (MMDevice *self);
MMBaseModem *mm_device_peek_modem (MMDevice *self);
MMBaseModem *mm_device_get_modem (MMDevice *self);
gboolean mm_device_get_hotplugged (MMDevice *self);
void mm_device_reset_hotplugged (MMDevice *self);
gboolean mm_device_get_inhibited (MMDevice *self);
GObject *mm_device_peek_port_probe (MMDevice *self,
+2
View File
@@ -962,6 +962,8 @@ mm_plugin_create_modem (MMPlugin *self,
return NULL;
mm_base_modem_set_hotplugged (modem, mm_device_get_hotplugged (device));
/* Reset hotplugged flag to guarantee full reconfiguration on next probe */
mm_device_reset_hotplugged (device);
if (port_probes) {
GList *l;