src: add udev watcher to improve modem recovery

Most of the modem issues follow a (incomplete) USB device reset. Instead 
of relying solely on the existing timer, this patch adds a udev monitor 
which resets the modem as soon as its associated USB device is reset, 
which greatly improves recovery time.
This commit is contained in:
Arnaud Ferraris
2020-12-18 01:37:06 +01:00
parent 74b91c7d58
commit 62a07f9c51
7 changed files with 64 additions and 0 deletions

12
src/udev.h Normal file
View File

@@ -0,0 +1,12 @@
/*
* Copyright (C) 2020 Arnaud Ferraris <arnaud.ferraris@gmail.com>
*
* SPDX-License-Identifier: GPL-3.0-or-later
*/
#pragma once
#include "manager.h"
void udev_init (struct EG25Manager *data);
void udev_destroy (struct EG25Manager *data);