Merge pull request #21378 from TDT-AG/pr/20230615-modemmanager
modemmanager: do not cache virtual device events
This commit is contained in:
commit
19bb9251b5
3 changed files with 9 additions and 6 deletions
|
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=modemmanager
|
PKG_NAME:=modemmanager
|
||||||
PKG_SOURCE_VERSION:=1.20.6
|
PKG_SOURCE_VERSION:=1.20.6
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=3
|
||||||
|
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE_PROTO:=git
|
||||||
PKG_SOURCE_URL:=https://gitlab.freedesktop.org/mobile-broadband/ModemManager.git
|
PKG_SOURCE_URL:=https://gitlab.freedesktop.org/mobile-broadband/ModemManager.git
|
||||||
|
|
|
@ -273,6 +273,14 @@ mm_report_event() {
|
||||||
local subsystem="$3"
|
local subsystem="$3"
|
||||||
local sysfspath="$4"
|
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
|
# Track/untrack events in cache
|
||||||
case "${action}" in
|
case "${action}" in
|
||||||
"add")
|
"add")
|
||||||
|
|
|
@ -368,11 +368,6 @@ proto_modemmanager_setup() {
|
||||||
proto_set_available "${interface}" 0
|
proto_set_available "${interface}" 0
|
||||||
return 1
|
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
|
# validate that ModemManager is handling the modem at the sysfs path
|
||||||
modemstatus=$(mmcli --modem="${device}" --output-keyvalue)
|
modemstatus=$(mmcli --modem="${device}" --output-keyvalue)
|
||||||
|
|
Loading…
Reference in a new issue