Merge pull request #21378 from TDT-AG/pr/20230615-modemmanager

modemmanager: do not cache virtual device events
This commit is contained in:
Florian Eckert 2023-06-21 08:51:06 +02:00 committed by GitHub
commit 19bb9251b5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 6 deletions

View file

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=modemmanager
PKG_SOURCE_VERSION:=1.20.6
PKG_RELEASE:=1
PKG_RELEASE:=3
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://gitlab.freedesktop.org/mobile-broadband/ModemManager.git

View file

@ -273,6 +273,14 @@ mm_report_event() {
local subsystem="$3"
local sysfspath="$4"
# Do not save virtual devices
local virtual
virtual="$(echo "$sysfspath" | cut -d'/' -f4)"
[ "$virtual" = "virtual" ] && {
mm_log "debug" "sysfspath is a virtual device ($sysfspath)"
return
}
# Track/untrack events in cache
case "${action}" in
"add")

View file

@ -368,11 +368,6 @@ proto_modemmanager_setup() {
proto_set_available "${interface}" 0
return 1
}
[ -e "${device}" ] || {
echo "Device not found in sysfs"
proto_set_available "${interface}" 0
return 1
}
# validate that ModemManager is handling the modem at the sysfs path
modemstatus=$(mmcli --modem="${device}" --output-keyvalue)