Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion net/modemmanager/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=modemmanager
PKG_VERSION:=1.24.0
PKG_RELEASE:=14
PKG_RELEASE:=15

PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://gitlab.freedesktop.org/mobile-broadband/ModemManager.git
Expand Down
13 changes: 3 additions & 10 deletions net/modemmanager/files/etc/hotplug.d/net/25-modemmanager-net
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,12 @@
# We require a interface name
[ -n "${INTERFACE}" ] || exit

# Virtual net devices (SQM IFB, GRE, bridges, veth, tun/tap, ...)
# can never be modems; mm_report_event drops them internally, skip
# the log-noisy hotplug script entirely.
case "${DEVPATH}" in
/devices/virtual/*) exit ;;
esac

# Always make sure the rundir exists
mkdir -m 0755 -p "${MODEMMANAGER_RUNDIR}"

# Report network interface
mm_report_event "${ACTION}" "${INTERFACE}" "net" "/sys${DEVPATH}" || exit
Comment thread
feckert marked this conversation as resolved.
mm_log "info" "${ACTION} network interface ${INTERFACE}: event processed"
mm_report_event "${ACTION}" "${INTERFACE}" "net" "/sys${DEVPATH}"

# Look for an associated cdc-wdm interface

Expand All @@ -33,6 +26,6 @@ esac

# Report cdc-wdm device, if any
[ -n "${cdcwdm}" ] && {
mm_log "info" "${ACTION} cdc interface ${cdcwdm}: custom event processed"
mm_report_event "${ACTION}" "${cdcwdm}" "usbmisc" "/sys${DEVPATH}"
mm_report_event "${ACTION}" "${cdcwdm}" "usbmisc" "/sys${DEVPATH}" &&
mm_log "info" "${ACTION} cdc interface ${cdcwdm}: custom event processed"
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
mkdir -m 0755 -p "${MODEMMANAGER_RUNDIR}"

# Report TTY
mm_report_event "${ACTION}" "${DEVNAME}" "tty" "/sys${DEVPATH}" || exit
mm_log "info" "${ACTION} serial interface ${DEVNAME}: event processed"
mm_report_event "${ACTION}" "${DEVNAME}" "tty" "/sys${DEVPATH}"
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
mkdir -m 0755 -p "${MODEMMANAGER_RUNDIR}"

# Report wwan
mm_report_event "${ACTION}" "${DEVNAME}" "wwan" "/sys${DEVPATH}" || exit
mm_log "info" "${ACTION} wwan control port ${DEVNAME}: event processed"
mm_report_event "${ACTION}" "${DEVNAME}" "wwan" "/sys${DEVPATH}"
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ mm_report_event() {
mm_log "debug" "mbim vlan netdevice $name"
;;
*)
return
return 1
;;
esac
}
Expand All @@ -161,7 +161,7 @@ mm_report_event() {
# Skip live report if MM isn't up; wrapper will replay from cache.
if [ ! -s "${MODEMMANAGER_PID_FILE}" ] || \
! kill -0 "$(cat "${MODEMMANAGER_PID_FILE}" 2>/dev/null)" 2>/dev/null; then
return
return 0
fi

# Report the event
Expand All @@ -170,6 +170,8 @@ mm_report_event() {
if [ "$?" -ne "0" ]; then
mm_log "error" "Couldn't report kernel event: ${result}"
fi

return 0
}

mm_report_event_from_cache_line() {
Expand Down
Loading