Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

modemmanager: do not disable modem on reconnect #24184

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

feckert
Copy link
Member

@feckert feckert commented May 17, 2024

Description:
If the modem loses the connection, an attempt is made to re-establish the connection via the report-down script.

Until now, the modem was disabled when the modem processed the teardown of the modemmanager protohandler. The immediate up events of netifd renables the modem right away. This takes time, which is not necessary.

This commit changes the behavior so that the modem is not disabled when the modemmanager is disconnected via the report-down script.

Maintainer: me / @<github-user> (find it by checking history of the package Makefile)
Compile tested: (put here arch, model, OpenWrt version)
Run tested: (put here arch, model, OpenWrt version, tests done)

If the modem loses the connection, an attempt is made to re-establish the
connection via the report-down script.

Until now, the modem was disabled when the modem processed the teardown of
the modemmanager protohandler. The immediate up events of netifd renables
the modem right away. This takes time, which is not necessary.

This commit changes the behavior so that the modem is not disabled when
the modemmanager is disconnected via the report-down script.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
# The modem therefore does not need to be disabled.
local disable="$(uci_get_state network "$interface" disable_modem "1")"
if [ "${disable}" -eq 0 ]; then
echo "Modem remains enabled"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might something like: "Skipping modem disable" be more informative?

@lynxthecat
Copy link

@feckert nicely done! This looks good to me, but I am hopeful that we can get input from others more experienced with the mechanics of netifd and ModemManager than I.

@neheb
Copy link
Contributor

neheb commented May 22, 2024

  WARNING: PKG_MIRROR_HASH does not match modemmanager-1.22.0.tar.zst hash 72d129a00d51f0acf4c421f02dd342728ca42980bd9644e3c9a69ca0792fd60b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants